/* Aukuro – /receptai/ recipe & item finder (assets/js/receptai.js). Builds on site.css + guide.css (recipe cards .rc,
   Minecraft slots .mcui/.slot, .rxchip). Browse = inventory tabs + icon grids; search = rows with icon, short
   description and where it is made. ≥ 901px the list and the open item sit side by side. */
.rx-main { width: min(max(1280px, var(--page-w)), 100%); margin: 0 auto; padding: 0 var(--gutter) 90px; }
.rx-head { margin-top: 24px; }
.rx-head .lead { margin: 0 0 14px; }
.rx-q { display: block; position: relative; }
.rx-q input { width: 100%; min-height: 60px; padding: 12px 16px 12px 58px; font: 400 26px/1 var(--font-mono); color: #fff; background: #000;
  border: 3px solid #5a5a5a; box-shadow: inset 3px 3px 0 #000; }
.rx-q::before { content: ""; position: absolute; left: 16px; top: 50%; width: 32px; height: 32px; margin-top: -16px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23cfcfcf' d='M5 1h4v1h1v1h1v1h1v4h-1v1h-1v1h-1v1H5v-1H4V9H3V8H2V4h1V3h1V2h1zm0 2v1H4v4h1v1h4V8h1V4H9V3z'/%3E%3Cpath fill='%23ffd95e' d='M11 10h1v1h1v1h1v1h1v2h-2v-1h-1v-1h-1v-1h-1z'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; opacity: .9; }
.rx-q input:focus { border-color: #ffff55; outline: none; }
.rx-q input::placeholder { color: #8b8b99; }
.rx-kbd { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.rx-kbd kbd { font: 400 13px var(--font-mono); padding: 0 5px; border: 1px solid #666; background: #111; }

/* inventory tabs */
.rx-tabs { display: flex; gap: 6px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.rx-tab { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 74px; max-width: 156px; padding: 6px 6px 5px;
  cursor: pointer; color: #e8e8e8; font: 600 13px/1.1 var(--font-head); text-align: center;
  background: linear-gradient(#3b3b45, #2a2a33); border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.14), inset -2px -2px 0 rgba(0,0,0,.45); }
.rx-tab b { font: 400 12px var(--font-mono); color: var(--muted); }
.rx-tab:hover { color: #ffff55; }
.rx-tab[aria-pressed="true"] { color: #ffff55; background: linear-gradient(#5d5a2a, #3d3b1c); box-shadow: inset 2px 2px 0 rgba(255,255,160,.3), inset -2px -2px 0 rgba(0,0,0,.45); }
.rx-tab:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.rx-tico { width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.45)); }
.rx-tico.all { display: block; background:
  linear-gradient(#c6c6c6, #c6c6c6) 2px 2px / 12px 12px no-repeat, linear-gradient(#c6c6c6, #c6c6c6) 18px 2px / 12px 12px no-repeat,
  linear-gradient(#c6c6c6, #c6c6c6) 2px 18px / 12px 12px no-repeat, linear-gradient(#c6c6c6, #c6c6c6) 18px 18px / 12px 12px no-repeat; }
.rx-tn { overflow-wrap: anywhere; }
.rx-ts { display: none; }
.rx-profs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rx-profs .rxchip { min-height: 36px; }
.rxchip[aria-pressed="true"] { color: #ffff55; border-color: rgba(255,255,85,.7); background: rgba(255,255,85,.12); }
.rx-n { margin: 10px 0 0; }

.rx-app { display: grid; gap: 16px; margin-top: 16px; }

/* browse: one inventory grid per section */
.rx-sec { padding: 12px 14px 14px; margin-bottom: 14px; }
.rx-sh { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 22px var(--font-head); color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.rx-sh .ico { width: 32px; height: 32px; image-rendering: pixelated; }
.rx-sh .muted { font-size: 16px; }
.rx-inv { display: grid; grid-template-columns: repeat(auto-fill, 52px); padding: 4px; width: fit-content; max-width: 100%;
  background: #c6c6c6; border: 2px solid #000; box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555; }
.rx-slot { position: relative; display: grid; place-items: center; width: 52px; height: 52px; background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; text-decoration: none; }
.rx-slot .ico { width: 36px; height: 36px; image-rendering: pixelated; }
.rx-slot:hover, .rx-slot:focus-visible { background: #a9a9a9; outline: none; z-index: 3; }
.rx-slot.on { background: #c9c26a; }
.rx-slot:hover::after, .rx-slot:focus-visible::after { content: attr(data-n); position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
  white-space: nowrap; padding: 3px 7px; font: 400 15px var(--font-pixel); color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  background: #100010; border: 2px solid #2a0a5e; pointer-events: none; }
.rx-slot.has-rx::before { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; background: #55ff55; box-shadow: 1px 1px 0 #000; }

/* search results */
.rx-results { display: grid; padding: 6px; gap: 4px; }
.rx-res { display: flex; align-items: center; gap: 12px; padding: 7px 10px; color: #f4f4f4; text-decoration: none; border: 2px solid transparent; scroll-margin: 70px 0 10px; }
.rx-res:hover, .rx-res.act, .rx-res:focus-visible { background: rgba(255,255,255,.07); border-color: #ffff55; outline: none; }
.rx-res.on { background: rgba(80, 76, 20, .6); }
.rx-rico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; }
.rx-rico .ico { width: 40px; height: 40px; image-rendering: pixelated; }
.rx-rt { display: grid; gap: 2px; min-width: 0; }
.rx-rt b { font: 600 20px/1.15 var(--font-head); text-shadow: 2px 2px 0 #000; overflow-wrap: anywhere; }
.rx-rd { color: #c9cbd8; font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rx-rbs { display: flex; flex-wrap: wrap; gap: 4px; }
.rx-rbs:empty { display: none; }
.rx-res.mc b { color: #d6d6de; }
.rb { display: inline-block; padding: 1px 6px; font: 600 13px/1.4 var(--font-head); color: #e8e8f0; background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18); white-space: nowrap; }
.rb.who { color: #ffd95e; border-color: rgba(255,217,94,.45); }
.rb.lvl { color: #9fd3ff; border-color: rgba(159,211,255,.45); }
.rb.age { color: #c9a7ff; border-color: rgba(201,167,255,.45); }
.rb.st { color: #b7f0b7; border-color: rgba(120,220,120,.4); }
.rb.src { color: var(--muted); }
.noico { display: inline-block; background: repeating-linear-gradient(45deg, #2b2b33 0 4px, #35353f 4px 8px); }
.ico.hat { image-rendering: pixelated; }
.linkbtn { padding: 0; font: inherit; color: #9fd3ff; text-decoration: underline; background: none; border: 0; cursor: pointer; }

/* open item */
.rx-detail { padding: 16px; min-width: 0; }
.rx-dtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.rx-back { min-height: 40px; padding: 6px 14px; }
.rx-dh { display: flex; gap: 14px; align-items: flex-start; }
.rx-bigslot { flex: none; display: grid; place-items: center; width: 80px; height: 80px; background: #8b8b8b; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff; }
.rx-big { width: 64px; height: 64px; image-rendering: pixelated; }
.rx-dh h2 { margin: 0; font: 600 clamp(26px, 4vw, 34px)/1.1 var(--font-head); color: #fff; text-shadow: 3px 3px 0 var(--mc-shadow); overflow-wrap: anywhere; }
.rx-cat { margin: 4px 0 0; font: 600 16px var(--font-head); color: var(--muted); }
.rx-cat a { color: #9fd3ff; }
.rx-desc { margin: 6px 0 0; line-height: 1.4; }
.rx-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.rx-facts .rb { font-size: 15px; padding: 3px 8px; }
.rx-block { margin-top: 18px; }
.rx-block h3 { margin: 0 0 8px; font: 600 21px var(--font-head); color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.rx-rc { margin-bottom: 10px; }
.rx-rc .tags:first-child { margin-top: 0; }
/* multi-step recipes (dough → bake, mash → barrel …): numbered steps */
.rx-rc .rsteps { counter-reset: rxstep; }
.rx-rc .rsteps:not(.alt):has(> .mcwrap + .mcwrap) > .mcwrap { counter-increment: rxstep; }
.rx-rc .rsteps:not(.alt):has(> .mcwrap + .mcwrap) > .mcwrap::before { content: counter(rxstep) " žingsnis"; display: block; margin: 0 0 4px;
  font: 400 14px var(--font-pixel); color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
/* ingredient slots with a card of their own: click → that card */
.rx-rc .slot.go { cursor: pointer; }
.rx-rc .slot.go::before { content: ""; position: absolute; right: 1px; top: 1px; width: 5px; height: 5px; background: #ffff55;
  box-shadow: 1px 1px 0 #3f3f15; pointer-events: none; }
.rx-rc .slot.go:hover { background-color: #c9c26a; }
.rx-vlink { display: inline-block; margin-top: 6px; font: 600 15px var(--font-head); color: #9fd3ff; }
.rx-hint { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.rx-how { margin: 0; line-height: 1.45; }
/* one fish and its dishes: Žalia žuvis → Kepta → Rūkyta as tabs of one card */
.rx-fam { display: flex; gap: 6px; margin: 2px 0 12px; overflow-x: auto; padding-bottom: 2px; }
.rx-famt { flex: none; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; color: #e8e8e8; text-decoration: none;
  background: linear-gradient(#3b3b45, #2a2a33); border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.14), inset -2px -2px 0 rgba(0,0,0,.45); }
.rx-famt > span { display: flex; flex-direction: column; line-height: 1.15; }
.rx-famt b { font: 600 14px var(--font-head); }
.rx-famt small { font-size: 12px; color: var(--muted); }
.rx-famt:hover { color: #ffff55; }
.rx-famt.on { color: #ffff55; background: linear-gradient(#5d5a2a, #3d3b1c); box-shadow: inset 2px 2px 0 rgba(255,255,160,.3), inset -2px -2px 0 rgba(0,0,0,.45); }
.rx-famt:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.rx-src dl.facts { margin-bottom: 6px; }
.rx-src .rsteps.alt { display: flex; flex-wrap: wrap; gap: 8px 12px; }

.rx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 3px 10px 3px 4px; color: #f4f4f4; text-decoration: none;
  font: 600 17px var(--font-head); background: rgba(0,0,0,.4); border: 2px solid rgba(255,255,255,.14); }
.rx-chip .ico { width: 28px; height: 28px; image-rendering: pixelated; }
.rx-chip:hover, .rx-chip:focus-visible { border-color: #ffff55; color: #ffff55; outline: none; }
.rx-chip.mc { color: #d6d6de; }
ul.rx-guide { margin: 0; padding-left: 20px; line-height: 1.6; }
.rx-copy { font-size: 15px; }
.rx-empty { margin: 0; }

@media (min-width: 901px) {
  .rx-app.has-detail { grid-template-columns: minmax(0, 1fr) minmax(400px, 48%); align-items: start; }
  .rx-detail { position: sticky; top: 68px; max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain; }
  .rx-back { display: none; }
  .rx-dtop { justify-content: flex-end; margin-bottom: 0; }
}
@media (max-width: 900px) {
  .rx-profs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .rx-profs .rxchip { flex: none; }
  .rx-app.has-detail .rx-list { display: none; }
  .rx-detail { scroll-margin-top: 64px; }
  .rx-kbd { display: none; }
}
@media (max-width: 520px) {
  .rx-head { margin-top: 14px; }
  .rx-q input { min-height: 54px; font-size: 21px; padding-left: 50px; }
  .rx-q::before { left: 12px; width: 28px; height: 28px; margin-top: -14px; }
  .rx-tab { min-width: 64px; max-width: 112px; font-size: 12px; }
  .rx-tl.has-short { display: none; }
  .rx-famt { flex: 1 1 0; min-width: 0; padding: 5px 6px; gap: 6px; }
  .rx-famt small { display: none; }
  .rx-famt b { font-size: 13px; overflow-wrap: anywhere; }
  .rx-ts { display: inline; }
  .rx-sec { padding: 10px; }
  .rx-inv { grid-template-columns: repeat(auto-fill, 44px); }
  .rx-slot { width: 44px; height: 44px; }
  .rx-slot .ico { width: 32px; height: 32px; }
  .rx-res { gap: 10px; padding: 6px; }
  .rx-rico { width: 46px; height: 46px; }
  .rx-rico .ico { width: 32px; height: 32px; }
  .rx-rt b { font-size: 18px; }
  .rx-rd { font-size: 14px; }
  .rx-detail { padding: 12px; }
  .rx-bigslot { width: 60px; height: 60px; }
  .rx-big { width: 48px; height: 48px; }
  .rx-detail .mcui { max-width: 100%; }
}
