/* css/wardrobe.css (cosmetics overhaul 2026-10-12; visual pass 2 2026-10-15) — pickers with more than 4 choices and
   the Szafa:
   - .scr-lp*  ListPicker (js/ui/screens/kit.js listPicker): one §4 row per choice — icon well · name · count · ›
     (owner: the wrapped multi-row tabs of the Szafa and the Katalog QC „wyglądają fatalnie”)
   - .scr-md*  master–detail (kit.js masterDetail): phone = list → page with „‹ name count” in the title, a short slide;
     wide landscape desktop = 260 px list column + page
   - .cos-*    Szafa (js/ui/screens/wardrobe.js, skins.js): 3D thumbnails (.cos-thumb from js/render/thumbs.js), the
     stage (live ziomek) with ‹ › turn buttons in its bottom corners, neutral cards with a corner rarity tag (rare /
     epic = default tag, legendary = the best tag), the equip pop + check badge, the preview card.
   Tokens of css/main.css only. No rarity borders, no glows, no shimmer (§7); the equip pop plays once. */

/* ------------------------------------------------------------------ ListPicker (§4 rows) */
.scr-lp { display: flex; flex-direction: column; gap: 8px; }
.scr-lp__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  background: var(--raised);
  border: 0;
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: var(--cur-hand);
  transition: background-color var(--mo-fast) var(--mo-out);
}
.scr-lp__row:active { background: var(--raised-2); }
.scr-lp__row:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.scr-lp__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--text-2);
}
.scr-lp__label { flex: 1; min-width: 0; font-weight: 800; font-size: var(--fs-16); line-height: var(--lh-tight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-lp__count { flex: none; font-size: var(--fs-14); font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; }
.scr-lp__chev { flex: none; display: grid; color: var(--text-dim); }
/* select mode (the 260 px desktop column): no chevrons (the lit row says where you are), a long name takes two
   lines instead of an ellipsis („Zegarki i biżuteria”); the current row = --raised-2 + the green left bar */
.scr-lp--select .scr-lp__row { min-height: 44px; }
.scr-lp--select .scr-lp__label { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.scr-lp--select .scr-lp__chev { display: none; }
.scr-lp--select .scr-lp__row.is-active { background: var(--raised-2); box-shadow: inset 4px 0 0 var(--green); }
@media (hover: hover) and (pointer: fine) {
  .scr-lp__row:hover { background: var(--raised-2); }
}

/* ------------------------------------------------------------------ master–detail */
.scr-md,
.scr-md__view,
.scr-md__side,
.scr-md__main,
.scr-md__detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.scr-md__view.is-fwd { animation: scr-md-fwd var(--mo-med) var(--mo-out) both; }
.scr-md__view.is-back { animation: scr-md-back var(--mo-med) var(--mo-out) both; }
.scr-md__main.is-fade { animation: scr-md-fade var(--mo-med) var(--mo-out) both; }
@keyframes scr-md-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes scr-md-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes scr-md-fade { from { opacity: 0.25; } to { opacity: 1; } }

/* „‹ Czapki 5/32” — the screen title (or the page head of a tabs() list) while a page is open */
.scr__title.scr-md__title,
.scr-md__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scr-md__head { font-weight: 900; font-size: var(--fs-16); }
/* ‹ = a ghost sm icon button */
.scr-md__back {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -4px 0 -4px 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--raised-2);
  color: var(--text);
  box-shadow: var(--sh-edge-sm);
  cursor: var(--cur-hand);
  transition: transform var(--mo-fast) var(--mo-out), box-shadow var(--mo-fast) var(--mo-out);
}
.scr-md__back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge-c); }
.scr-md__back:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.scr-md__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-md__count { flex: none; height: 20px; padding: 0 6px; border-radius: var(--r-xs); background: var(--raised-2); color: var(--text-2); font-size: var(--fs-12); font-weight: 800; line-height: 20px; }

/* wide landscape desktop: list column + page (the sheet widens below) */
.scr-md.scr-md--wide { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
/* owner 2026-10-16: the left column (3D preview + categories) stays put while only the right grid scrolls */
.scr-md--wide > .scr-md__side { position: sticky; top: 0; max-height: calc(100dvh - 120px); overflow-y: auto; }
.scr-md--wide .scr-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }

/* Katalog QC: an item never QC'd is a bare „?” tile (its „Jeszcze nie było” is for screen readers only) */
.scr-cat.is-unknown { justify-content: center; }

/* ------------------------------------------------------------------ Szafa: stage (live 3D ziomek, js/render/thumbs.js createStage)
   owner 2026-10-17 („ten podgląd jest ewidentnie za mały, a na czapce jeszcze mniejszy”): 40 % of a phone's height
   (240–340 px; the sticky hero still leaves the cards room), 300–440 px tall and the column's full width on the wide
   desktop (flex: none — the sticky column used to squeeze it to 140 px); the camera fits the look itself.
   --r-md, THE 2 px border, the --raised-2 slate (a black outfit — the robe, the night shift — vanished on the old
   near-black) */
.cos-stage {
  position: relative;
  flex: none;
  height: clamp(240px, calc(40dvh - 20px), 340px);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--raised-2);
  overflow: hidden;
  touch-action: pan-y; /* a sideways drag turns the ziomek, a vertical one still scrolls the sheet */
  cursor: grab;
}
.cos-stage:active { cursor: grabbing; }
.cos-stage[hidden],
.cos-stage.cos-stage--off { display: none; }
/* the floor: gone in the chest-up hat view (thumbs.js focus 'head'), where it would cut across the chest */
.cos-stage::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: rgba(0, 0, 0, 0.14); pointer-events: none; transition: opacity var(--mo-slow) var(--mo-out); }
.cos-stage.is-head::before { opacity: 0; }
.cos-stage__cv { position: relative; display: block; width: 100%; height: 100%; }
/* wide: the stage holds the top of the sticky column; the slot list and the weekly row scroll under it */
.scr-md--wide .cos-stage { position: sticky; top: 0; z-index: 2; height: clamp(300px, calc(100dvh - 480px), 440px); }
.scr-md--wide.scr-ward__md { grid-template-columns: 320px minmax(0, 1fr); }
/* short landscape windows (1280×720 at 150 % zoom = 853×480 … 960×540): a smaller stage, so the slot list still shows */
@media (max-height: 640px) { .scr-md--wide .cos-stage { height: clamp(200px, calc(100dvh - 300px), 300px); } }
.scr-ward__md.scr-md--wide > .scr-md__side { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
/* „Przymierzasz”: the item on the ziomek is not owned yet — a default tag in the top-left corner */
.cos-stage__try {
  position: absolute;
  top: 8px;
  left: 8px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-xs);
  background: var(--panel);
  color: var(--text-2);
  font-size: var(--fs-12);
  font-weight: 800;
  line-height: 20px;
  pointer-events: none;
}
.cos-stage__try[hidden] { display: none; }
/* ‹ › turn the ziomek: two ghost sm icon buttons in the stage's bottom corners (never over the torso) */
.cos-stage__turn {
  position: absolute;
  bottom: 8px;
  z-index: 1;
}
.cos-stage__turn--l { left: 8px; }
.cos-stage__turn--r { right: 8px; }

/* ------------------------------------------------------------------ Szafa: the hero (phones; js/ui/screens/wardrobe.js)
   One card: the big stage, then name · rarity · price / buy / wear right under it. On tall phones it stays under the
   sticky title band while the cards scroll (--ward-top = the band's height, measured by wardrobe.js), on an opaque
   plate in the sheet's colour so the cards pass under it. */
.cos-hero { position: relative; }
.cos-hero__card {
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: var(--r-md);
  background: var(--raised);
  overflow: hidden;
}
.cos-hero .cos-stage { border: 0; border-bottom: 2px solid var(--line); border-radius: 0; }
.cos-hero .scr-ward__preview.cos-prev { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
@media (min-height: 700px) {
  .scr-md:not(.scr-md--wide) .cos-hero.is-try {
    position: sticky;
    top: calc(var(--ward-top, 40px) - var(--sheet-body-pt, 0px));
    z-index: 2;
    margin: -8px 0;
    padding: 8px 0;
    background: var(--panel);
  }
}

/* ------------------------------------------------------------------ Szafa: weekly row (4 cards; 2×2 in the desktop column) */
.cos-weekly__left { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: var(--fs-12); font-weight: 800; }
.cos-weekly__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.scr-md--wide .cos-weekly__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* desktop column: stage · slot list · weekly — the list (the navigation) stays above the fold of an 800 px screen */
.scr-md--wide .scr-md__side > .cos-weekly { order: 1; }

/* ------------------------------------------------------------------ Szafa: cards (neutral §4 cards + a corner tag) */
.cos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* big screens (owner 2026-10-20, a 40" monitor: 4 squeezed columns, „Żółta…”, „Rzadk”, „10” for 100): as many
   columns as fit at a readable card width — the name, the rarity tag, the price and the shard bar always fit */
.scr-md--wide .cos-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.cos-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  background: var(--raised);
  border: 0;
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: var(--cur-hand);
}
/* beats the old grid-cell look of css/screens.css (.scr-ward__item.is-sel / .is-eq): worn = the green ring, picked =
   the --raised-2 fill */
.cos-card.scr-ward__item { box-shadow: none; }
.cos-card.scr-ward__item.is-eq { box-shadow: inset 0 0 0 2px var(--green); }
.cos-card.is-sel { background: var(--raised-2); }
.cos-card.scr-ward__item.is-sel:not(.is-eq) { box-shadow: inset 0 0 0 2px var(--text-2); }
.cos-card__thumb {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  width: min(var(--thumb, 72px), 100%);
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cos-card__thumb > .scr-sw { width: 100%; height: 100%; }
/* rarity = a corner tag (skins.js): rare / epic default (epic in white), legendary the best tag */
.cos-card__rar { position: absolute; top: 4px; left: 4px; z-index: 1; pointer-events: none; }
.cos-card__rar.is-epic { color: var(--text); }
/* locked: --panel and dim text (no grey-out filter: §3) */
.cos-card.scr-ward__item.is-locked { background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.cos-card.scr-ward__item.is-locked > :not(.scr-ward__lock) { filter: none; opacity: 1; }
.cos-card:not(.is-owned) .scr-sw { filter: none; }
/* a long name takes two lines („Czapka kucharska”, not „Czapka kuchar…”); the price sits on the card's bottom edge,
   so a row of cards keeps its prices on one line */
.cos-card__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; width: 100%; font-size: var(--fs-14); font-weight: 800; line-height: var(--lh-tight); text-align: left; overflow: hidden; overflow-wrap: break-word; }
.cos-card.is-locked .cos-card__name { color: var(--text-dim); }
.cos-card__foot { display: flex; align-items: center; justify-content: flex-start; min-height: 20px; margin-top: auto; color: var(--text-dim); }
.cos-card__price { font-size: var(--fs-14); font-weight: 900; color: var(--text); }
.cos-card__price .num { color: var(--text); }
.cos-card__price.is-poor .num { color: var(--text-dim); }
/* weekly row: which slot a flat swatch is (spray = vehicle paint, mat, hall, sign, frame) */
.cos-card__slot { position: absolute; right: 4px; bottom: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-xs); background: var(--panel); color: var(--text-2); pointer-events: none; }
/* a weekly discount: a bad tag in the top-right corner (the rarity tag owns the top-left) */
.cos-card__off { position: absolute; top: 4px; right: 4px; z-index: 1; height: 20px; padding: 0 6px; border-radius: var(--r-xs); background: var(--red); color: #fff; font-size: var(--fs-12); font-weight: 800; line-height: 20px; }
.cos-card__tick {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: var(--ring-new);
}
.cos-card.is-eq .cos-card__tick { display: grid; animation: cos-tick var(--mo-med) var(--mo-spring) both; }
/* the weekly row: picture + price only (the name stays for screen readers and the tooltip) */
.cos-card--mini { padding: 4px; }
.cos-card--mini .cos-card__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cos-card--mini .cos-card__foot { justify-content: center; }

/* equip: one pop (skins.js celebrateCard), the check badge pops in */
.cos-card.is-pop { animation: cos-pop var(--mo-slow) var(--mo-spring); }
@keyframes cos-pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes cos-tick { from { transform: scale(0); } to { transform: scale(1); } }
/* reduced motion: the badge just shows brighter for 300 ms (a still state toggled by skins.js — no animation) */
.cos-card.is-flash .cos-card__tick { filter: brightness(1.3); }

/* ------------------------------------------------------------------ 3D thumbnails (skins.js swatch / cosCard) */
/* one mid-slate tile for every rarity (a dark hat on the old near-black tile all but vanished; colour = meaning) */
.scr-sw.scr-sw--3d { background: var(--raised-2); border-radius: var(--r-sm); }
/* the thumbnail canvas carries its CSS size inline (thumbs.js); it fills the swatch box it was put in */
.scr-sw--3d > .cos-thumb { display: block; width: 100% !important; height: 100% !important; }
.scr-sw--card { border-radius: var(--r-sm); }

/* ------------------------------------------------------------------ Szafa: preview card (name · rarity · action) */
.scr-ward__preview.cos-prev {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--raised);
  border: 0;
  border-radius: var(--r-md);
}
.cos-prev__thumb { flex: none; display: grid; }
.cos-prev__thumb .scr-sw--lg { width: 96px; height: 96px; }
.cos-prev__main { flex: 1 1 110px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.cos-prev__name { font-weight: 900; font-size: var(--fs-16); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.cos-prev .scr-ward__act { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }

/* ------------------------------------------------------------------ desktop: the Szafa and the Katalog get a wider panel
   2026-10-20: the panel's content is zoomed by --ui (css/sheets.css, up to 1.8 on a 4K screen), so a fixed 820 px
   panel left a 4K screen ~455 px of content (the 4 squeezed columns). The width scales with --ui too: 1040 content
   px on every big screen, never over 74 % of the window (the hall stays visible on 1280×720). */
@media (min-width: 900px) and (orientation: landscape) {
  .sheet[data-sheet="wardrobe"],
  .sheet[data-sheet="catalog"] { width: min(calc(1040px * var(--ui, 1)), max(820px, 74vw), calc(100% - 24px)); }
}

/* ------------------------------------------------------------------ reduced motion: no pop (the badge just appears) */
:root[data-reduce-motion="true"] .cos-card.is-pop { animation: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-reduce-motion="false"]) .cos-card.is-pop { animation: none; }
}

/* skin shards (2026-10-20, sim/shards.js): a thin flat bar in the rarity colour + „3/10” under the price of a skin not
   owned yet; the Szafa preview shows the long „Fragmenty 3/10” */
.cos-shards { display: flex; align-items: center; gap: 6px; width: 100%; }
.cos-shards[hidden] { display: none; }
.cos-shards__bar { flex: 1 1 auto; height: 6px; min-width: 24px; border-radius: var(--r-pill); background: var(--bg); overflow: hidden; }
.cos-shards__fill { display: block; height: 100%; background: var(--rar, var(--text-2)); }
.cos-shards__n { flex: none; font-size: var(--fs-12); font-weight: 800; color: var(--text-2); }
.cos-shards--long { max-width: 220px; }

/* 3D menu models (2026-10-20, skins.js modelTile): the Sklep crates, the hire and build cards get a 56 px well with
   the cached 3D thumbnail (js/render/thumbs.js modelThumb) instead of the 32 px icon well; the icon stays (centred in
   the well) without WebGL2 */
.scr-ico.scr-ico--3d { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--raised-2); }
.scr-ico--3d > .model-thumb { display: block; width: 100% !important; height: 100% !important; }

/* ------------------------------------------------------------------ the unlock reveal (js/ui/unlock-reveal.js)
   Chunky pass 2026-10-20 (owner: „bardziej jak Roblox”): a new skin / item as a live 3D model turning slowly on a
   round pedestal, popping in with a bounce over slow light rays and twinkles in the rarity colour (--rar). The rays
   are a clip-path starburst (no gradient), they turn and the twinkles blink only while the reveal is open (the two
   loops on the motion allow-list); reduced motion: still, the model just appears. The kicker is the yellow reward
   stamp (ink on yellow, 9:1), the rarity a navy chip with a rarity dot and border (white text). */
.modal.modal--unlock {
  position: relative;
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  border-color: var(--rar, var(--line));
  overflow-x: hidden;
  text-align: center;
}

.unl__kicker {
  position: relative;
  z-index: 2;
  margin: 0 0 calc(-1 * var(--sp-3));
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--yellow);
  color: var(--ink);
  font-size: var(--fs-20);
  font-weight: var(--fw-num);
  line-height: var(--lh-tight);
  box-shadow: 0 var(--edge) 0 var(--yellow-dark);
  transform: rotate(-3deg);
  animation: unl-kicker var(--mo-pop) var(--mo-spring) var(--mo-med) backwards;
}

.unl__stage {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1;
  flex: none;
  isolation: isolate;
}

/* the spotlight disc and the pedestal the model stands on */
.unl__stage::before {
  content: '';
  position: absolute;
  inset: 9%;
  z-index: 0;
  border-radius: 50%;
  background: var(--rar, var(--line));
  opacity: 0.2;
}
.unl__stage--fig::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 9%;
  height: 13%;
  z-index: 1;
  border-radius: 50%;
  background: var(--panel-raised);
  box-shadow: 0 0 0 3px var(--rar, var(--line)), 0 var(--btn-lip) 0 var(--edge-c);
}

/* the rays stay inside a circle around the model (they never run under the name) */
.unl__burst {
  position: absolute;
  inset: -6%;
  z-index: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
}
.unl__rays {
  position: absolute;
  inset: -10%;
  background: var(--rar, var(--yellow));
  opacity: 0.26;
  clip-path: polygon(50% 50%, 44.8% 0.3%, 55.2% 0.3%, 50% 50%, 70.3% 4.3%, 79.4% 9.5%, 50% 50%, 90.5% 20.6%, 95.7% 29.7%, 50% 50%, 99.7% 44.8%, 99.7% 55.2%, 50% 50%, 95.7% 70.3%, 90.5% 79.4%, 50% 50%, 79.4% 90.5%, 70.3% 95.7%, 50% 50%, 55.2% 99.7%, 44.8% 99.7%, 50% 50%, 29.7% 95.7%, 20.6% 90.5%, 50% 50%, 9.5% 79.4%, 4.3% 70.3%, 50% 50%, 0.3% 55.2%, 0.3% 44.8%, 50% 50%, 4.3% 29.7%, 9.5% 20.6%, 50% 50%, 20.6% 9.5%, 29.7% 4.3%);
  pointer-events: none;
  animation: unl-rays 18s linear infinite;
}
.unl__rays--2 {
  inset: 6%;
  opacity: 0.16;
  rotate: 15deg;
  animation-duration: 26s;
  animation-direction: reverse;
}

/* twinkles: 4-point stars around the model */
.unl__spark {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  background: #ffffff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  pointer-events: none;
  animation: unl-twinkle 1.8s ease-in-out infinite;
}
.unl__spark--1 { left: 8%; top: 14%; }
.unl__spark--2 { right: 10%; top: 8%; width: 24px; height: 24px; animation-delay: 0.5s; background: var(--yellow); }
.unl__spark--3 { right: 4%; top: 52%; width: 14px; height: 14px; animation-delay: 1.1s; }
.unl__spark--4 { left: 3%; top: 60%; width: 22px; height: 22px; animation-delay: 0.8s; background: var(--yellow); }
.unl__spark--5 { left: 26%; top: 2%; width: 12px; height: 12px; animation-delay: 1.4s; }
.unl__spark--6 { right: 24%; bottom: 20%; width: 12px; height: 12px; animation-delay: 0.3s; }

/* the model pops in: from small and tilted, past full size, settles */
.unl__model {
  position: absolute;
  inset: 2% 6% 9%;
  z-index: 2;
  display: grid;
  place-items: center;
  animation: unl-pop var(--mo-pop) var(--mo-spring) backwards;
}
.unl__stage--head .unl__model { inset: 4% 4% 0; }
.unl__cv { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.unl__cv[hidden],
.unl__flat[hidden] { display: none; }
.unl__flat { display: grid; place-items: center; }
.unl__flat > .scr-sw { transform: scale(1.7); box-shadow: 0 0 0 2px var(--rar, var(--line)); }

.modal--unlock .unl__name {
  max-width: 100%;
  margin-top: var(--sp-1);
  font-size: var(--fs-24);
  overflow-wrap: anywhere;
}

.unl__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.unl__rar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 2px solid var(--rar, var(--line));
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: var(--fw-num);
  line-height: 1;
}
.unl__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rar, var(--line)); }
.unl__cat { color: var(--text-2); font-size: var(--fs-14); font-weight: var(--fw-label); }

.unl__acts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  margin-top: var(--sp-3);
}

@keyframes unl-rays { to { transform: rotate(360deg); } }
@keyframes unl-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}
@keyframes unl-pop {
  0% { opacity: 0; transform: scale(0.2) rotate(-14deg); }
  55% { opacity: 1; transform: scale(1.14) rotate(4deg); }
  80% { transform: scale(0.96) rotate(-1deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes unl-kicker {
  0% { opacity: 0; transform: rotate(-3deg) scale(2); }
  100% { opacity: 1; transform: rotate(-3deg) scale(1); }
}

/* short windows (a phone in a browser with its bars, 150–200 % desktop zoom): a smaller stage */
@media (max-height: 700px) {
  .unl__stage { width: min(100%, 220px); }
}

/* reduced motion (setting or OS): the rays and twinkles stand still, nothing pops — the still 3/4 view */
:root[data-reduce-motion="true"] :is(.unl__rays, .unl__spark, .unl__model, .unl__kicker) { animation: none; }
:root[data-reduce-motion="true"] .unl__spark { opacity: 0.8; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-reduce-motion="false"]) :is(.unl__rays, .unl__spark, .unl__model, .unl__kicker) { animation: none; }
  :root:not([data-reduce-motion="false"]) .unl__spark { opacity: 0.8; }
}

/* ------------------------------------------------------------------ 2026-10-22 polish: Szafa slot pages on phones
   Owner (iPhone, Szafa › Czapki): the 3D preview took almost the whole screen, the cards got a thin strip and the
   „Fragmenty 0/10” + buy bar overlapped them. Now on every phone height: the hero (stage + one compact row: name ·
   rarity · shards | action) is ~36 % of the viewport and stays pinned under the title band on EVERY slot page, the
   3-column grid scrolls under it; bigger card thumbnails (the card's full width), names on 2 lines, the price and
   the shard bar always visible. The cards' last row clears the sheet's bottom edge. Wide desktop keeps its columns. */
@media not all and (min-width: 900px) and (orientation: landscape) {
  .scr-md:not(.scr-md--wide) .cos-hero {
    position: sticky;
    top: calc(var(--ward-top, 40px) - var(--sheet-body-pt, 0px));
    z-index: 2;
    margin: -8px 0;
    padding: 8px 0;
    background: var(--panel);
  }
  .cos-hero .cos-stage { height: clamp(124px, calc(36dvh - 84px), 300px); }
  .cos-hero .scr-ward__preview.cos-prev { flex-wrap: nowrap; gap: 10px; padding: 8px 10px 10px 12px; }
  .cos-hero .cos-prev__thumb .scr-sw--lg { width: 56px; height: 56px; }
  .cos-hero .cos-prev__main { flex: 1 1 0; gap: 3px; }
  .cos-hero .cos-prev__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .cos-hero .cos-shards--long { max-width: none; }
  .cos-hero .cos-prev .scr-ward__act { flex: none; flex-wrap: nowrap; max-width: 52%; }
  .scr-ward__md:not(.scr-md--wide) .cos-grid { padding-bottom: 12px; }
  .scr-ward__md:not(.scr-md--wide) .cos-grid .cos-card { padding: 6px 6px 8px; }
  .scr-ward__md:not(.scr-md--wide) .cos-grid .cos-card__thumb { width: 100%; }
  .scr-ward__md:not(.scr-md--wide) .cos-grid .cos-card__name { min-height: calc(2em * var(--lh-tight)); font-size: var(--fs-14); }
}
