/* W-113 · Items (item-belt.js): the strip under the HUD (the belt on the left, the relic row moved in on the right), the
   round item slots, and the "belt is full" sheet. Both layouts are here: the phone first, the laptop in the media rule. */
#hud-strip{flex-shrink:0;display:flex;align-items:center;gap:6px;height:38px;padding:0 8px;position:relative;z-index:3;
  background:linear-gradient(#00000026,#00000010);border-bottom:1px solid #927347aa}
#hud-strip[hidden]{display:none}
#game:is([data-era="2"],[data-era="3"],[data-era="4"]) #hud-strip{border-color:var(--era-edge,#927347)}
/* The relic row keeps its own markup and chips; inside the strip it only gives up its own background and line. */
#hud-strip #relic-row{flex:1;min-width:0;height:auto;padding:0;background:none;border:0}
#item-belt{display:flex;align-items:center;gap:4px;flex-shrink:0}
#item-belt[hidden]{display:none}
.belt-label{font-size:var(--fs-xs);font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#e7d6ae;opacity:.8;margin-right:2px}
#game:is([data-era="2"],[data-era="3"],[data-era="4"]) .belt-label{color:var(--era-light,#e7d6ae)}
.belt-slot{position:relative;width:32px;height:32px;min-height:0;padding:0;border-radius:50%;display:grid;place-items:center;flex-shrink:0;
  border:1px solid #d9b775aa;background:radial-gradient(circle at 50% 38%,#f6e7c24a,#1c150c88 78%);box-shadow:inset 0 1px 0 #fff3,0 1px 2px #0008}
.belt-slot .belt-art{width:26px;height:26px;object-fit:contain;border-radius:50%;pointer-events:none;filter:drop-shadow(0 1px 1px #0009)}
.belt-slot.empty{border-style:dashed;border-color:#d9b77566;background:#00000022;box-shadow:none}
.belt-slot.usable{border-color:#f0cf82}
.belt-slot.usable:not(.selected){animation:belt-ready 2.4s ease-in-out infinite}
.belt-slot.selected{border:2px solid #ffe08a;box-shadow:0 0 0 3px #ffd36644,0 0 12px #ffd366aa;transform:translateY(-1px) scale(1.08)}
@keyframes belt-ready{0%,100%{box-shadow:inset 0 1px 0 #fff3,0 1px 2px #0008}50%{box-shadow:inset 0 1px 0 #fff3,0 0 8px #f0cf8288}}
@media (prefers-reduced-motion:reduce){.belt-slot.usable{animation:none}}
:root[data-motion="reduced"] .belt-slot.usable{animation:none}

/* The belt is full: the mastered pick's sheet (upgrade-flow.css) over the page. */
#belt-full{position:absolute;left:0;right:0;top:44px;bottom:0;z-index:11;display:flex;padding:5px;background:#231d16e6;
 --uf-sheet:var(--era-paper,url('/assets/ui/parchment.svg'));--uf-card:var(--era-card,url('/assets/ui/card.svg'));--uf-edge:var(--era-edge,#ac9560);--uf-paper:var(--paper,#e6d7af)}
#game:not([data-era="2"]):not([data-era="3"]):not([data-era="4"]) #belt-full{--uf-paper:#e6d7af}
#belt-full.hidden{display:none}
.belt-choice{width:100%}
.belt-choice>div{flex:1;min-width:0}
.belt-choice>em{flex-shrink:0;font-style:normal;font-size:var(--fs-xs);font-weight:700;padding:6px 10px;border:1px solid color-mix(in srgb,var(--uf-edge) 70%,transparent);border-radius:14px;background:#fff4}
.belt-choice.new small{color:#8a5a12;font-weight:700}
.belt-choice .mf-art{border-radius:50%}

/* The deck view's belt, above the cards. */
.deck-belt-head{font-size:var(--fs-sm);margin:0 0 6px}
.deck-belt{margin-bottom:12px}

/* The laptop layout (the same query as wide.css): a taller strip and larger slots, and the map's side panels start under it. */
@media (min-width:960px) and (min-height:600px) and (min-aspect-ratio:5/4){
  #hud-strip{height:44px;padding:0 14px;gap:10px}
  .belt-slot{width:38px;height:38px}
  .belt-slot .belt-art{width:31px;height:31px}
  .belt-label{font-size:var(--fs-sm)}
  /* W-121 W-003 (T3's wide list): on a laptop the strip rides in the HUD row, between the era mark and the resources, so
     the map and the board get its 44 px back. */
  #hud-strip{position:absolute;top:0;left:64px;height:46px;max-width:calc(100% - 560px);background:none;border:0}
  #hud-strip #relic-row{flex:0 1 auto}
  #belt-full{top:46px}
  #belt-full .uf-sheet{max-width:720px;margin:0 auto;align-self:flex-start}
}

/* W-169 (#100), the new screen on a phone (not the laptop's wide layout): the strip's band goes in a fight; the items sit
   in the action bar (main.js dockBelt) without their label. W-185 (#168), the designer: "Rather than having it 3 across
   we will have it be in a 2x2 grid. This means we will make that bottom menu a bit taller but we will also regain some
   of the horizontal space. We will put that towards making the send button bigger. We will then make it just a bit
   taller so that below we can have space for a row of relics." The items stand in a 2×2 block, Send wave takes the
   width they gave back (and a little height), and the relics' row runs along the bar's foot, from the left. */
@media not all and (min-width:960px) and (min-height:600px) and (min-aspect-ratio:5/4){
#game[data-screen="v19"].in-battle #hud-strip{display:none}
#game[data-screen="v19"] #actions #item-belt{display:grid;grid-template-columns:repeat(2,27px);grid-auto-rows:27px;gap:3px}
#game[data-screen="v19"] #actions #item-belt .belt-label{display:none}
#game[data-screen="v19"] #actions #item-belt .belt-slot{width:27px;height:27px}
#game[data-screen="v19"] #actions #item-belt .belt-art{width:22px;height:22px}
#game[data-screen="v19"] #actions{gap:5px;flex-wrap:wrap;row-gap:5px}
#game[data-screen="v19"] #actions #end-turn{flex:1 1 auto;min-width:0;height:54px;min-height:54px;padding-left:6px;padding-right:6px;white-space:nowrap;font-size:var(--fs-lg);gap:6px}
#game[data-screen="v19"] #actions #end-turn .ui-icon{width:18px;height:18px}
#game[data-screen="v19"] #actions #end-turn::before,#game[data-screen="v19"] #actions #end-turn::after{display:none}
#game[data-screen="v19"].belt-docked #actions>#relic-row{order:9;flex:1 0 100%;height:34px;padding:4px 2px 0;margin:0 -2px;gap:5px;border:0;border-top:1px solid #99815b55;background:none}
#game[data-screen="v19"].belt-docked #actions>#relic-row .relic-chip{width:30px;height:30px}
#game[data-screen="v19"].belt-docked #actions>#relic-row .relic-chip .relic-icon{width:26px;height:26px}
}
/* W-185 (#167, #168): wherever the relic row sits (the map's top strip, a fight's bar, the laptop's HUD) it fills from the
   left and, once it would pass the edge, drags sideways (drag-scroll.js): no scrollbar, and a soft fade on a side with
   more beyond it. Pulled past an end the icons give a little and spring back (--pull). */
#relic-row.relic-scroll{justify-content:flex-start;overflow:hidden;touch-action:pan-y;user-select:none;-webkit-user-select:none;
  --fl:0px;--fr:0px;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%)}
#relic-row.relic-scroll.scrolls{cursor:grab}
#relic-row.relic-scroll.dragging{cursor:grabbing}
#relic-row.relic-scroll.fade-l{--fl:26px}
#relic-row.relic-scroll.fade-r{--fr:26px}
#relic-row.relic-scroll>.relic-chip{translate:var(--pull,0px) 0}
.relic-fx.floating{position:fixed;right:auto;transform:translate(-50%,-100%);z-index:30}
/* The map's top strip on a phone (#167, the designer: "By the end of a run we run out of space here for relics and they
   overlap the item."): the items keep their row, and the relics get one of their own under it. */
@media not all and (min-width:960px) and (min-height:600px) and (min-aspect-ratio:5/4){
#hud-strip:has(#relic-row:not([hidden])){flex-wrap:wrap;height:auto;row-gap:0;padding-top:3px;padding-bottom:3px}
#hud-strip:has(#relic-row:not([hidden]))>#item-belt{height:34px}
#hud-strip>#relic-row.relic-scroll{flex:1 0 100%;height:36px;padding:0 2px;margin:0 -2px;border-top:1px solid #92734755}
/* W-169 (#125), the designer: "every time you confirm place a tower the screen jumps a little bit. I'm trying to avoid
   having the screen jumpiness". Measured in the phone view: the Cancel · Place bar, beside the items now in the action
   bar, ran past the screen's edge and wrapped its label, so the bar grew 46 → 58 px (the board refitted 6 px up and back)
   and tapping Place scrolled the whole screen 17 px sideways for a moment. Staging, the bar keeps Send wave's place: the
   same height, on one line, inside the row (the piles and redraw step aside while a card is staged, as for a stone), and
   the screen itself can't be scrolled. */
#game[data-screen="v19"]{overflow:clip}
#game[data-screen="v19"] #actions:has(.stage-bar) :is(.piles,.redraw){display:none}
#game[data-screen="v19"] #actions .stage-bar{flex:1 1 auto;min-width:0;height:54px;overflow:hidden}
#game[data-screen="v19"] #actions .stage-bar :is(.small-button,.primary){min-height:0;height:54px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game[data-screen="v19"] #actions .stage-bar .small-button{padding:0 9px}
#game[data-screen="v19"] #actions .stage-bar .primary{font-size:var(--fs-md);padding:0 8px}
}
