/* Dopa stylesheet.
 *
 * Preserved from the prototype: the paper/ink palette, the lavender brand panel,
 * Plus Jakarta Sans, the studio-grey product ground, and the squared editorial
 * photography.
 *
 * Deliberately removed: the glass panels, the gold gradient buttons, the sheen
 * sweeps, the confetti, the spinning reward chrome. Those existed to dress up
 * mechanics Dopa no longer has - the scratch card, the mystery box, the daily
 * credit - and they fought the fashion.
 *
 * The game mechanics sit underneath a fashion interface: restrained type, thin
 * rules, real photography, and colour used only where it means something.
 */

:root {
  --bg: #FFFFFF;
  --ink: #111113;
  --muted: #6E7079;
  --line: #E4E5E8;
  --studio: #F1F1F3;
  --studio2: #E3E4E8;
  --chip: #F4F4F6;
  --accent: #111113;
  --accent-ink: #FFFFFF;
  --sale: #A3122A;
  --good: #1F7A4D;
  --brand: #C8B6FF;
  --brand-ink: #16112B;
  --brand-soft: #EFE9FF;
  --display: "Plus Jakarta Sans", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 2px;
  --r-md: 6px;
  --ease: cubic-bezier(.22, .8, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E10; --ink: #F2F1EE; --muted: #9A9BA3; --line: #26272C;
    --studio: #1B1B1F; --studio2: #141417; --chip: #1C1C20;
    --accent: #F2F1EE; --accent-ink: #0E0E10; --sale: #F07A8C; --good: #6FCB98;
    --brand: #B9A6F5; --brand-ink: #14101F; --brand-soft: #241F33;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
summary { cursor: pointer; }

svg.i, .i {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.wrap { max-width: 1240px; margin: 0 auto; }
.nojs { padding: 40px 0; max-width: 60ch; }
.nojs h1 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.05; }

/* ------------------------------------------------------------------ chrome -- */

/* The strip is part of the header, inside the sticky element rather than above
   it. Outside it, a view change that scrolls back to the top slid the whole
   header down by the strip's height, which read as the controls jumping. */
.promo {
  margin: 0 -16px; padding: 9px 16px; background: var(--brand); color: var(--brand-ink);
  text-align: center; font-size: 12px; letter-spacing: .04em;
}
.top {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  margin: 0 -16px; padding: 0 16px; border-bottom: 1px solid var(--line);
}
.bar { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-block: 10px; }
.bar .l, .bar .r { display: flex; gap: 6px; align-items: center; }
.bar .r { justify-content: flex-end; }
.logo { line-height: 0; }
.logo .wm { width: 78px; height: 26px; color: var(--ink); }
.ib { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); }
.ib.on { color: var(--sale); }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--ink); color: var(--bg); font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px; font-variant-numeric: tabular-nums;
}
.badge.pop { animation: pop .45s var(--spring, var(--ease)); }
@keyframes pop { 40% { transform: scale(1.3); } }

.nav { max-width: 1240px; margin: 0 auto; display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button {
  padding: 6px 0 11px; font-size: 13px; font-weight: 500; white-space: nowrap;
  border-bottom: 1px solid transparent; color: var(--muted);
}
.nav button[aria-current="true"] { color: var(--ink); border-color: var(--ink); }

.tabbar { display: none; }

/* ------------------------------------------------------------------ layout -- */

/* A view change fades in. It deliberately does not translate: a re-render under
   the shopper's finger must never move the control they just pressed. */
.enter { animation: enter .28s var(--ease) both; }
@keyframes enter { from { opacity: 0; } }

/* A removed card leaves without moving its neighbours. */
.card.leaving { opacity: 0; transform: scale(.97); transition: opacity .18s var(--ease), transform .18s var(--ease); pointer-events: none; }
.row-h { display: flex; justify-content: space-between; align-items: baseline; margin: 34px 0 14px; gap: 12px; }
.row-h h2 { font-size: 19px; font-weight: 600; margin: 0; }
.row-h button, .row-h .c { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumb { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.crumb button { text-decoration: underline; text-underline-offset: 2px; }
.lede { color: var(--muted); max-width: 62ch; margin: 8px 0 0; }
.fine { font-size: 12.5px; color: var(--muted); }
.fine2 { font-size: 12.5px; color: var(--muted); max-width: 62ch; }
.linkb { text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* -------------------------------------------------------------- home: hero -- */

.hero { background: var(--brand); color: var(--brand-ink); margin: 20px 0 8px; padding: clamp(22px, 3.4vw, 52px); }
.hero-copy { min-width: 0; }
.hero-art { display: none; }
@media (min-width: 900px) {
  .hero.brand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); align-items: center; gap: clamp(20px, 3vw, 52px); }
  .hero-art { display: grid; place-items: center; }
  .hero-art svg { width: min(400px, 100%); height: auto; }
}
.hero h1 {
  font-family: var(--display); font-weight: 400; margin: 0;
  font-size: clamp(30px, 5vw, 58px); line-height: 1.02; letter-spacing: -.03em; max-width: 20ch;
  text-wrap: balance;
}
.hero p { margin: 14px 0 0; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.45; max-width: 54ch; }
.hero-acts { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.hero-acts .linkb { color: var(--brand-ink); }

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-ink); color: var(--brand); padding: 14px 26px;
  font-weight: 600; font-size: 14px; letter-spacing: .01em; border-radius: var(--r-sm); min-height: 48px;
}
.hero .cta { background: var(--brand-ink); color: #fff; }
.hero .linkb { text-decoration-color: currentColor; }

.battle-entry {
  margin-top: 34px; border: 1px solid var(--ink); padding: clamp(20px, 2.6vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.battle-entry h2 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 36px); margin: 0; letter-spacing: -.02em; }
.battle-entry p { margin: 8px 0 0; color: var(--muted); max-width: 46ch; }
.battle-entry .cta { background: var(--ink); color: var(--bg); }

.starter { margin-top: 40px; padding: clamp(20px, 2.6vw, 34px); background: var(--studio); }
.starter h2 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.6vw, 32px); margin: 0; letter-spacing: -.02em; }
.starter p { margin: 10px 0 18px; color: var(--muted); max-width: 58ch; }
.starter .cta { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------------------- media + cards -- */

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.rail-fixed { grid-auto-columns: minmax(190px, 210px); }
.rail::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 16px; padding-bottom: 40px; }

.shot { position: relative; aspect-ratio: 3/4; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, var(--studio) 55%, var(--studio2)); }
.shot .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.shot .ph svg { width: 74%; transition: transform .5s var(--ease); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot.missing { display: grid; place-items: center; color: var(--muted); background: var(--studio); }

.card { position: relative; display: flex; flex-direction: column; gap: 9px; text-align: left; }
.card-open { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.card-open:hover .shot .ph svg { transform: scale(1.03); }
/* One line: price on the left, a compact control on the right. The stacking
   version lives in the phone breakpoint, where the two genuinely cannot share a
   line without the label wrapping. */
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; }
.card-foot .price { flex: 1 1 auto; min-width: 0; }
.card-foot .btn.inline { flex: 0 0 auto; white-space: nowrap; padding: 0 10px; min-height: 34px; font-size: 13px; gap: 5px; }
.card-foot .btn.inline .i { width: 15px; height: 15px; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.pname { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.price { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.price .was { color: var(--muted); text-decoration: line-through; margin-right: 6px; }
.price .now { color: var(--sale); font-weight: 600; }
.price .off { color: var(--sale); margin-left: 6px; font-size: 12px; }
.pill { position: absolute; left: 10px; top: 10px; background: var(--bg); color: var(--ink); font-size: 11px; font-weight: 600; padding: 4px 8px; letter-spacing: .04em; text-transform: uppercase; }
.pill.sale { background: var(--sale); color: #fff; }
.save {
  position: absolute; right: 8px; top: 8px; z-index: 2; width: 36px; height: 36px;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(255,255,255,.82); backdrop-filter: blur(6px);
}
.save svg { width: 18px; height: 18px; }
.save.on svg { fill: var(--sale); stroke: var(--sale); }
.save.labelled { position: static; width: auto; height: 48px; padding: 0 18px; gap: 8px; display: inline-flex; align-items: center; border: 1px solid var(--ink); background: none; backdrop-filter: none; }
.save.labelled span { font-size: 14px; font-weight: 600; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--ink); color: var(--bg); min-height: 52px; padding: 0 22px;
  font-weight: 600; font-size: 15px; width: 100%; border-radius: var(--r-sm);
}
.btn.sec { background: none; color: var(--ink); border: 1px solid var(--ink); }
.btn.sm { width: auto; min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.btn.inline { width: auto; min-height: 38px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn.inline .i { width: 17px; height: 17px; }
.btn:disabled { background: var(--chip); color: var(--muted); border-color: transparent; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.985); }

.depts { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.dept { background: var(--studio); aspect-ratio: 3/4; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; text-align: left; }
.dept .ph { flex: 1; display: grid; place-items: center; }
.dept .ph svg { width: 80%; }
.dept span { font-weight: 600; font-size: 13.5px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { background: var(--chip); border-radius: 999px; padding: 7px 14px; font-size: 13px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip.tc { background: none; border: 1px solid var(--line); }
.sel { border: 1px solid var(--line); background: var(--bg); padding: 9px 10px; font-size: 13px; border-radius: var(--r-sm); }

/* ------------------------------------------------------------ shop listing -- */

.lhead { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-end; margin: 24px 0 14px; }
.lhead h1 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: -.02em; margin: 0; }
.lhead .c { color: var(--muted); font-size: 13px; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.more { display: grid; gap: 12px; justify-items: center; padding-bottom: 40px; color: var(--muted); font-size: 13px; }
.more .btn { width: auto; min-height: 46px; padding: 0 26px; }
.empty { text-align: center; padding: 56px 10px; color: var(--muted); }
.empty h4 { font-size: 18px; color: var(--ink); margin: 0 0 6px; font-weight: 600; }
.az { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.az a { font-size: 13px; font-weight: 600; color: var(--muted); }
.dlist { display: grid; gap: 18px; padding-bottom: 40px; }
.dlist h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.drow { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; }
.drow .dn { font-size: 14.5px; }
.dsearch { max-width: 520px; margin-bottom: 8px; }

/* ------------------------------------------------------------------- pdp -- */

.pdp { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; margin-top: 14px; }
.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gal .shot:first-child { grid-column: 1 / -1; aspect-ratio: 4/5; }
/* Feed-zero pieces have one image. Let it be large without towering over the
   column beside it and stranding the buy controls in empty space. */
.gal .shot:only-child { max-height: 74vh; }
.buy { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; position: sticky; top: 120px; align-self: start; }
.buy h1 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.08; margin: 0; letter-spacing: -.02em; }
.buy .price { font-size: 18px; }
.buy .blink { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.pdp-drop { background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; padding: 9px 12px; }
.lbl { display: flex; justify-content: space-between; width: 100%; align-items: baseline; font-size: 13px; font-weight: 600; }
.lbl button { font-weight: 400; text-decoration: underline; color: var(--muted); }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.size { min-width: 48px; min-height: 42px; border: 1px solid var(--line); font-size: 13.5px; padding: 0 10px; }
.size[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.row2b { display: flex; gap: 10px; width: 100%; align-items: stretch; }
.row2b .btn { flex: 1; }
.row2b .save.labelled { flex: 0 0 auto; }
.owned { display: flex; align-items: center; gap: 12px; background: var(--studio); padding: 10px 14px; font-size: 13.5px; width: 100%; }
.irl { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; border-top: 1px solid var(--line); padding-top: 14px; flex-wrap: wrap; }
.irl span { font-size: 14px; font-weight: 600; }
.irl small { display: block; color: var(--muted); font-size: 12px; max-width: 40ch; }
.irl .btn { width: auto; min-height: 42px; padding: 0 16px; font-size: 13.5px; }
.buy details { width: 100%; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.buy details ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.shake { animation: shake .4s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* -------------------------------------------------------- search + drawers -- */

.search { position: fixed; inset: 0; z-index: 55; background: var(--bg); padding: 16px; overflow-y: auto; }
.search .in { max-width: 900px; margin: 0 auto; }
.sbox { display: flex; gap: 10px; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.sbox input { flex: 1; border: 0; background: none; font-size: 20px; outline: none; padding: 6px 0; }
.sh5 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.trend { display: flex; flex-wrap: wrap; gap: 8px; }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.44); opacity: 0; transition: opacity .3s; z-index: 45; }
.scrim.on { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg);
  z-index: 50; display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .32s var(--ease); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.left { right: auto; left: 0; transform: translateX(-100%); }
.drawer.on { transform: none; }
.dh { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dh h3 { margin: 0; font-size: 16px; font-weight: 600; }
.db { flex: 1; overflow-y: auto; padding: 4px 18px 20px; }
.df { border-top: 1px solid var(--line); padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; }

.ln { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding-block: 14px; border-bottom: 1px solid var(--line); align-items: start; }
.ln .shot { aspect-ratio: 3/4; }
.ln .brand { font-size: 12.5px; }
.lnbody { display: grid; gap: 2px; }
.ln .meta { font-size: 12.5px; color: var(--muted); }
.lnacts { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.ln .price { text-align: right; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 30px; height: 28px; }
.qty span { min-width: 24px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; }
.sum .v { text-align: right; font-variant-numeric: tabular-nums; }
.sum .t { font-weight: 700; font-size: 15px; padding-top: 6px; border-top: 1px solid var(--line); }
.sum .v.t { padding-top: 6px; border-top: 1px solid var(--line); }
.sum .save { color: var(--good); }
.added { display: flex; align-items: center; gap: 8px; background: var(--studio); padding: 10px 12px; font-size: 13.5px; margin-top: 12px; }

/* ------------------------------------------------------------- wardrobe -- */

.wh { margin: 22px 0 20px; }
.wh h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.025em; margin: 0; }
.wstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.wstats > div { background: var(--bg); padding: 14px 16px; display: grid; gap: 4px; }
.wstats span { font-size: 12px; color: var(--muted); }
.wstats b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wtools { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
.wtools .chips { margin: 0; }
.taste { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

.wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 16px; padding-bottom: 40px; }
.wgrid.gallery { grid-template-columns: repeat(3, 1fr); gap: 34px 18px; }
.wgrid.index { grid-template-columns: 1fr; gap: 0; }
.wpiece { position: relative; display: grid; gap: 8px; }
.wopen { display: grid; gap: 8px; text-align: left; }
.wacts { display: flex; align-items: center; justify-content: space-between; }
.star svg { width: 18px; height: 18px; }
.star.on svg { fill: var(--sale); stroke: var(--sale); }
.wpiece .ib { width: 30px; height: 30px; }
.wgrid.index .wpiece {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.wgrid.index .wopen { grid-template-columns: 96px 1fr; grid-template-rows: auto auto; column-gap: 16px; }
.wgrid.index .wopen .shot { grid-row: 1 / 3; }
.empty-teach { border-top: 1px solid var(--line); padding-top: 26px; max-width: 68ch; }
.empty-teach h2 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0 0 14px; letter-spacing: -.02em; }
.steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; gap: 3px; }
.steps b { font-size: 15px; }
.steps span { color: var(--muted); font-size: 14px; max-width: 58ch; }

/* --------------------------------------------------------- create (looks) -- */

.looks, .cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.look, .collection { border: 1px solid var(--line); padding: 16px; display: grid; gap: 12px; }
.lhd { display: grid; gap: 3px; }
.lhd b { font-size: 15.5px; }
.lhd small { color: var(--muted); font-size: 12.5px; }
.lthumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lthumbs::-webkit-scrollbar { display: none; }
.lthumbs .shot { width: 68px; flex: 0 0 68px; }
.lacts { display: flex; flex-wrap: wrap; gap: 14px; }
.lacts .linkb { font-size: 12.5px; color: var(--muted); }

.sheet { position: fixed; inset: 0; z-index: 75; display: grid; place-items: end center; background: rgba(0,0,0,.45); padding: 0; animation: fadein .2s both; }
@keyframes fadein { from { opacity: 0; } }
.sheet-card {
  background: var(--bg); width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 24px 22px calc(22px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px;
  position: relative; animation: sheetin .3s var(--ease) both;
}
.sheet-card.wide { width: min(760px, 100%); }
@keyframes sheetin { from { transform: translateY(22px); opacity: 0; } }
.sheet-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; }
.sheet-card h3 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0; letter-spacing: -.02em; }
.sheet-card p { margin: 0; color: var(--muted); font-size: 14px; }
.lsub { font-size: 13.5px; }
.lpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
.ltile { display: grid; gap: 5px; text-align: left; }
.ltile .shot { outline: 2px solid transparent; outline-offset: 2px; }
.ltile[aria-pressed="true"] .shot { outline-color: var(--ink); }
.ltile span { font-size: 12.5px; font-weight: 600; }
.ltile small { font-size: 11.5px; color: var(--muted); }
.lname { border: 0; border-bottom: 1px solid var(--line); padding: 11px 0; font-size: 16px; background: none; }
.lxp { font-size: 13px; color: var(--muted); }
.piece-sheet { display: grid; gap: 16px; }
.piece-sheet .shot { aspect-ratio: 4/5; }
.piece-body { display: grid; gap: 8px; }
.piece-body h3 { font-size: 22px; }

/* --------------------------------------------------------------- activity -- */

.order { border: 1px solid var(--line); padding: 16px; display: grid; gap: 14px; margin-bottom: 16px; }
.order.done { opacity: .82; }
.ohead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ohead b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ohead span { font-size: 12.5px; color: var(--muted); }
.oitems { display: grid; gap: 0; }
.oitems .ln:last-child { border-bottom: 0; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.track div { background: var(--chip); padding: 9px 8px; font-size: 11.5px; color: var(--muted); text-align: center; letter-spacing: .02em; }
.track div.done { background: var(--ink); color: var(--bg); }

.missions { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mission { background: var(--bg); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mission b { font-size: 14.5px; }
.mission small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.mbar { display: block; height: 3px; background: var(--line); margin-top: 9px; max-width: 260px; }
.mbar i { display: block; height: 100%; background: var(--ink); }

.tier { border: 1px solid var(--line); padding: 18px 20px; display: grid; gap: 10px; }
.tier .hd { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.tier .lv { font-family: var(--display); font-size: 24px; letter-spacing: -.02em; }
.tier .pts { font-size: 13px; color: var(--muted); }
.tier .bar { height: 4px; background: var(--line); overflow: hidden; }
.tier .bar i { display: block; height: 100%; background: var(--ink); transition: width .6s var(--ease); }
.tier small { font-size: 12.5px; color: var(--muted); }

.pledger { border-top: 1px solid var(--line); }
.plrow { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.plrow b { font-variant-numeric: tabular-nums; }
.plrow b.minus { color: var(--muted); }
.plrow small { color: var(--muted); font-size: 12px; }
.hlog { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hlog li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hlog small { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------- rewards + points -- */

.rewards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.reward { background: var(--bg); padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.reward b { font-size: 15px; }
.reward small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; max-width: 46ch; }
.reward.owned { background: var(--studio); }
.plist { margin: 0; padding-left: 18px; display: grid; gap: 10px; max-width: 74ch; color: var(--muted); font-size: 14px; }
.plist b { color: var(--ink); }
.ptable { border-top: 1px solid var(--line); }
.prow { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.prow .pl small { display: block; color: var(--muted); font-size: 12px; }
.prow .px { font-weight: 600; font-variant-numeric: tabular-nums; }
.ptiers { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ptier { background: var(--bg); padding: 14px 16px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.ptier.on { background: var(--brand-soft); color: var(--brand-ink); }
.ptier .pn { font-family: var(--display); font-size: 18px; }
.ptier .pa { font-size: 12.5px; color: var(--muted); }
.ptier.on .pa { color: var(--brand-ink); }

/* --------------------------------------------------------------- profile -- */

.profile { margin: 22px 0 18px; display: grid; gap: 18px; }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.phead h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px); margin: 0; letter-spacing: -.025em; }
.tn { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tnote { background: var(--bg); padding: 14px 16px; display: grid; gap: 4px; }
.tnote b { font-size: 15px; font-weight: 600; }
.tnote small { color: var(--muted); font-size: 12.5px; }
.setrow { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.setrow small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* --------------------------------------------------- the dopa transaction -- */

.confirm-screen, .placed { max-width: 720px; margin: 30px auto 60px; display: grid; gap: 18px; }
.confirm-screen h1, .placed h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 46px); margin: 0; letter-spacing: -.03em; }
.co-lines { display: grid; }
.co-lines .ln:first-child { border-top: 1px solid var(--line); }
.fictionbox { background: var(--brand-soft); color: var(--brand-ink); padding: 16px 18px; display: grid; gap: 4px; font-size: 16px; }
.fictionbox b { font-size: 19px; font-variant-numeric: tabular-nums; }
.fictionbox small { color: var(--brand-ink); opacity: .72; font-size: 12.5px; }
.fictionbox.big { padding: 22px 20px; font-size: clamp(17px, 1.6vw, 21px); }
.fictionbox.big b { font-size: clamp(24px, 2.6vw, 34px); }
/* The two totals are one sentence, not a stack of labels. */
.fictionbox.big { display: block; line-height: 1.4; }
.fictionbox.big b { white-space: nowrap; }
.fictionbox.big small { display: block; margin-top: 10px; }
.placed-mark { width: 52px; height: 52px; border: 1px solid var(--ink); display: grid; place-items: center; }
.placed-mark .i { width: 26px; height: 26px; }
.placed-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.placed-acts .btn { flex: 1 1 200px; }

/* ---------------------------------------------------------------- battle -- */

.battle { max-width: 900px; margin: 0 auto; }
.battle-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.battle-head span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.battle h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); margin: 0 0 20px; letter-spacing: -.03em; }
.battle-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bside { display: grid; gap: 7px; text-align: left; }
.bside .shot { aspect-ratio: 3/4; }
.bside:hover .shot .ph svg { transform: scale(1.03); }

/* --------------------------------------------------------------- for you -- */

.fyhead { margin: 24px 0 8px; }
.fyhead h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); margin: 0; letter-spacing: -.025em; }
.fyhead p { color: var(--muted); max-width: 62ch; margin: 8px 0 0; }

/* --------------------------------------------------------------- sidebar -- */

.sidebody { position: relative; }
.sgrp { margin-bottom: 22px; }
.sgrp h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.srow { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.srow small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sletter h5 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 12px 0 2px; }
.sprod { grid-template-columns: 48px 1fr auto; display: grid; align-items: center; gap: 12px; }
.sprod .shot { width: 48px; aspect-ratio: 3/4; }
.sprod span b { display: block; font-size: 13px; }
.sprod span { font-size: 13px; }
.sempty { color: var(--muted); font-size: 13.5px; }
.scrub { position: absolute; right: 6px; top: 120px; bottom: 40px; display: flex; flex-direction: column; justify-content: center; gap: 1px; width: 20px; z-index: 2; }
.scrub button { font-size: 9.5px; color: var(--muted); line-height: 1.1; }

/* ---------------------------------------------------------- inbox + toast -- */

.nrow { display: grid; gap: 3px; padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.nrow:hover b { text-decoration: underline; text-underline-offset: 3px; }
.nrow b { font-size: 14px; }
.nrow span { font-size: 13.5px; color: var(--muted); }
.nrow small { font-size: 12px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); background: var(--ink); color: var(--bg);
  padding: 11px 18px; font-size: 14px; z-index: 80; opacity: 0;
  transition: opacity .25s, transform .3s var(--ease); pointer-events: none; display: flex; gap: 8px; align-items: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.skel { display: grid; gap: 16px; padding-top: 24px; }
.skelrow { display: grid; gap: 8px; }
.skelrow i { display: block; height: 150px; background: var(--studio); }
.skelrow b { display: block; height: 12px; width: 34%; background: var(--studio); }
.skelrow span { display: block; height: 12px; width: 56%; background: var(--studio); }

/* ---------------------------------------------------------------- footer -- */

.foot {
  margin-top: 40px; border-top: 1px solid var(--line); padding: 28px 0 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; font-size: 13px;
}
.foot h5 { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot button { display: block; margin-bottom: 5px; color: var(--ink); }
.foot button:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot .fine { grid-column: 1 / -1; display: grid; gap: 6px; font-size: 11.5px; color: var(--muted); max-width: 80ch; }
.foot .fine b { color: var(--ink); font-size: 12.5px; }

/* ---------------------------------------------------------- motion safety -- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.flyer { border-radius: var(--r-md); overflow: hidden; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1080px) {
  .grid, .wgrid { grid-template-columns: repeat(3, 1fr); }
  .wgrid.gallery { grid-template-columns: repeat(3, 1fr); }
  .depts { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; gap: 24px; }
  .buy { position: static; }
  .looks, .cols { grid-template-columns: 1fr; }
  .wstats { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: 1fr 1fr; }
  .scrub { display: none; }
}

@media (max-width: 720px) {
  /* The padding stays at 16px on every width: the promo and header bleed out by
     exactly this amount, so a smaller padding here would push the page 2px wider
     than the viewport and give every screen a horizontal scrollbar. */
  body { padding: 0 16px; font-size: 15px; }
  /* The wardrobe has a lot to say before the pieces: tighten it so a full row
     of the wardrobe is visible on a phone without scrolling. */
  .wh { margin: 14px 0 14px; }
  .wstats > div { padding: 11px 13px; }
  .wstats b { font-size: 18px; }
  .row-h { margin: 22px 0 12px; }
  .wtools { margin: 12px 0; }
  .hero-acts { gap: 12px; }
  .hero-acts .linkb { flex-basis: 100%; }
  /* In a two-column card the price and a labelled control cannot share a line
     without the label wrapping, so the control takes the full width. */
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card-foot .btn.inline { width: 100%; min-height: 38px; }
  .card-foot .price { order: 1; }
  .card-foot .btn.inline { order: 2; }
  /* Committing to a Dopa should not be below the fold on a phone. */
  .confirm-screen #place { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
  .desk-only { display: none; }
  .nav { display: none; }
  .grid, .wgrid, .wgrid.gallery { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; }
  .rail { grid-auto-columns: minmax(152px, 1fr); }
  .rail-fixed { grid-auto-columns: minmax(152px, 168px); }
  .depts { grid-template-columns: repeat(2, 1fr); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 30; background: var(--bg); border-top: 1px solid var(--line);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--muted); position: relative; padding: 2px 0; }
  .tabbar button[aria-current="true"] { color: var(--ink); }
  .tabbar .i { width: 21px; height: 21px; }
  .tabbar .badge { top: -2px; right: calc(50% - 20px); }
  /* On a phone the primary control of every card sits at the bottom of the
     screen, so the toast goes where it covers the least: just under the header,
     out of the way of the thing the shopper is about to press. */
  .toast {
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    bottom: auto;
    transform: translate(-50%, -12px);
    max-width: calc(100% - 32px);
  }
  .toast.on { transform: translate(-50%, 0); }
  .cart-pad, .wrap { padding-bottom: 64px; }
  .battle-pair { grid-template-columns: 1fr; }
  .track { grid-template-columns: repeat(2, 1fr); }
  .sheet { place-items: end stretch; }
  .sheet-card, .sheet-card.wide { width: 100%; max-height: 92vh; }
  .confirm-screen, .placed { margin: 20px auto 80px; }
  .placed-acts .btn { flex: 1 1 100%; }
  .mission { flex-direction: column; align-items: flex-start; }
  .reward { flex-direction: column; align-items: flex-start; }
}
