/* Zo-Gear shop (phone). Dark sci-fi, one neon accent (cyan) for selection, gold for coins and the main action,
   green for what you wear. Cheap to draw: flat gradients, no blur, no filters, no big shadows. */
.zs {
  --zs-bg: #070b1f; --zs-bg2: #0c1433; --zs-tile: #0f1738; --zs-line: rgba(120,190,255,.16); --zs-ink: #eef3ff; --zs-soft: #93a1d4;
  --zs-neon: #46e0ff; --zs-gold: #ffd23f; --zs-gold-ink: #2a1f00; --zs-good: #3ddc97; --zs-good-ink: #032617; --zs-bad: #ff7a93;
  position: fixed; inset: 0; display: grid; overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(190px, 38dvh) auto minmax(0, 1fr) auto;
  grid-template-areas: "top" "stage" "tabs" "grid" "act";
  background: radial-gradient(90% 46% at 50% 26%, rgba(70,224,255,.13), transparent 70%), linear-gradient(180deg, var(--zs-bg2), var(--zs-bg) 60%);
  color: var(--zs-ink); font: 600 15px/1.2 system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
:where(.zs) button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.zs button:focus-visible { outline: 3px solid var(--zs-neon); outline-offset: 2px; }

/* top bar: coins (left), market clock (centre, added by the page), Done (right) */
.zs-top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 6px; }
.zs-pill { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 10px; border-radius: 99px; background: rgba(255,210,63,.1);
  box-shadow: inset 0 0 0 1.5px rgba(255,210,63,.45); color: var(--zs-gold); font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.zs-pill.zs-pop { animation: zs-pop .35s ease-out; }
.zs-done { margin-left: auto; min-width: 88px; height: 44px; padding: 0 20px; border-radius: 99px; color: var(--zs-neon); box-shadow: inset 0 0 0 2px var(--zs-neon);
  font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.zs-done:active { transform: scale(.96); background: rgba(70,224,255,.12); }
.zs-coin { display: inline-block; flex: none; width: .95em; height: .95em; border-radius: 50%; vertical-align: -.12em; background: radial-gradient(circle at 35% 35%, #fff3b0 0 18%, #ffd23f 19% 62%, #d99a00 63%); box-shadow: inset 0 0 0 2px #c98a00; }

/* preview: name on top, your Zo-Gear on a glowing pad. The picture is contained in its box, so it is never cut. */
.zs-stage { grid-area: stage; position: relative; min-height: 0; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 2px 14px 6px; }
.zs-caption { display: flex; align-items: baseline; gap: 8px; min-width: 0; height: 24px; }
.zs-caption b { font-size: 19px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.zs-caption small { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--zs-soft); }
.zs-caption small[data-r] { color: var(--rc-ink); }
.zs-view { position: relative; min-height: 0; }
.zs-podium { position: absolute; left: 50%; bottom: 0; width: min(78%, 300px); aspect-ratio: 4 / 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(70,224,255,.32), rgba(70,224,255,.12) 62%, transparent 64%, transparent 78%, rgba(70,224,255,.75) 82%, transparent 92%); }
.zs-bot { position: absolute; inset: 0 0 3% 0; width: 100%; height: 97%; object-fit: contain; object-position: 50% 100%; transition: opacity .15s; }
.zs-bot.zs-wait { opacity: .55; }
.zs-bot.zs-pop { animation: zs-pop .4s ease-out; }
@keyframes zs-pop { 40% { transform: scale(1.07); } }

/* slot tabs: all of them fit, no sideways scrolling */
.zs-tabs { grid-area: tabs; display: flex; gap: 4px; padding: 4px 8px; border-bottom: 1px solid var(--zs-line); }
.zs-tab { flex: 1 1 0; min-width: 0; min-height: 52px; display: grid; justify-items: center; align-content: center; gap: 3px; padding: 4px 0 6px; border-radius: 10px 10px 0 0;
  color: var(--zs-soft); font-size: 11px; font-weight: 800; letter-spacing: .02em; position: relative; }
.zs-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-tab img { width: 28px; height: 28px; object-fit: contain; opacity: .55; }
.zs-tab img:not([src]) { visibility: hidden; }
.zs-tab[aria-selected="true"] { color: var(--zs-ink); background: linear-gradient(180deg, transparent, rgba(70,224,255,.1)); }
.zs-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 3px; border-radius: 3px; background: var(--zs-neon); }
.zs-tab[aria-selected="true"] img { opacity: 1; }

/* item grid. Rarity = a tint and an edge; state = the chip and the frame:
   price (can afford) · dim + pink price (too expensive) · Owned · green frame + ✓ (wearing) · cyan ring (trying on) */
.zs-grid { grid-area: grid; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px 12px 14px; display: grid; gap: 10px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); overscroll-behavior: contain; }
@media (orientation: portrait) and (max-height: 700px) { /* small phones: a smaller stage leaves three rows of items */
  .zs { grid-template-rows: auto minmax(140px, 27dvh) auto minmax(0, 1fr) auto; } .zs-grid { gap: 8px; } }
.zs-tile { position: relative; aspect-ratio: 1; min-width: 0; border-radius: 14px; padding: 6px 6px 26px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(var(--rc), .26), rgba(var(--rc), .06) 70%), var(--zs-tile); box-shadow: inset 0 0 0 1px rgba(var(--rc), .45); transition: transform .08s; }
.zs-tile:active { transform: scale(.95); }
/* no filter on tile images: a drop-shadow per thumbnail is repainted on every scroll frame on phones */
.zs-tile img { width: 100%; height: 100%; min-height: 0; object-fit: contain; opacity: 0; transition: opacity .2s; }
.zs-tile img.zs-in { opacity: 1; }
.r-common { --rc: 150,160,200; --rc-ink: #b9c2e6; } .r-uncommon { --rc: 61,220,151; --rc-ink: #6ff0b6; } .r-rare { --rc: 70,170,255; --rc-ink: #7cc4ff; }
.r-epic { --rc: 190,110,255; --rc-ink: #cf9bff; } .r-legendary { --rc: 255,190,60; --rc-ink: #ffd36b; }
.zs-chip { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 20px; display: flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 7px; background: rgba(4,8,24,.6); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zs-chip.zs-poor { color: var(--zs-bad); }
.zs-chip.zs-poor .zs-coin { opacity: .6; }
.zs-tile[data-chip^="poor"] img { opacity: .4; }
.zs-chip.zs-own { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--zs-ink); background: rgba(255,255,255,.12); }
.zs-chip.zs-on { background: var(--zs-good); color: var(--zs-good-ink); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.zs-tile.zs-wearing { box-shadow: inset 0 0 0 2px var(--zs-good); }
.zs-sel { outline: 3px solid var(--zs-neon); outline-offset: 2px; }
.zs-tile.zs-pop { animation: zs-pop .4s ease-out; }

/* action bar: one button that says what a tap does */
.zs-act { grid-area: act; padding: 10px 12px max(12px, env(safe-area-inset-bottom)); background: var(--zs-bg); border-top: 1px solid var(--zs-line); }
.zs-btn { width: 100%; height: 56px; border-radius: 16px; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s; }
.zs-btn:not(:disabled):active { transform: scale(.98); }
.zs-btn.zs-buy { background: var(--zs-gold); color: var(--zs-gold-ink); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.zs-btn.zs-wear { background: var(--zs-neon); color: #03222b; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.zs-btn.zs-poor { background: rgba(255,122,147,.1); box-shadow: inset 0 0 0 1.5px rgba(255,122,147,.4); color: var(--zs-bad); font-size: 17px; cursor: default; }
.zs-btn.zs-quiet { background: rgba(61,220,151,.1); box-shadow: inset 0 0 0 1.5px rgba(61,220,151,.45); color: var(--zs-good); font-size: 17px; cursor: default; }
.zs-btn.zs-hint { color: var(--zs-soft); font-size: 15px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--zs-line); cursor: default; }

/* landscape phone: preview left, shop right */
@media (orientation: landscape) and (max-height: 560px) {
  .zs { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "stage top" "stage tabs" "stage grid" "act grid"; }
  .zs-top { padding-top: max(6px, env(safe-area-inset-top)); padding-left: 4px; padding-right: max(12px, env(safe-area-inset-right)); }
  .zs-stage { padding: max(8px, env(safe-area-inset-top)) 10px 4px max(12px, env(safe-area-inset-left)); border-right: 1px solid var(--zs-line); }
  .zs-act { border-top: 0; border-right: 1px solid var(--zs-line); background: transparent; padding: 6px 10px max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .zs-btn { height: 48px; font-size: 18px; }
  .zs-tabs { padding-top: 0; padding-right: max(8px, env(safe-area-inset-right)); }
  .zs-tab { min-height: 46px; }
  .zs-tab img { width: 24px; height: 24px; }
  .zs-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); padding-right: max(12px, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) { .zs-bot, .zs-tile, .zs-pill { animation: none !important; transition: none; } }
