/* ATLYSS core design system. Navy + gold. Screen-specific CSS lives in
   shop.css / order.css / studio.css / earn.css / community.css.

   Component cheat sheet (use these before inventing new classes):
   Layout   .page  .page.narrow  .page-head(.back,h1,.sub,.actions)  .row  .col  .wrap  .between  .center
            .grid .grid-2 .grid-3 .grid-4  .masonry  .split(main + aside)  .gap-1..4  .mt-1..5  .grow
   Surface  .card  .card.pad  .card.hover  .section-title  .divider  .tip  .note.warn
   Actions  .btn (.primary .outline .ghost .danger .sm .lg .block .icon)  .chip(.active) inside .chips
            .tabs > .tab(.active)   .toggle (input[type=checkbox])   .qty
   Forms    .field > label + .input/.select/.textarea + .hint/.error   .input-group
   Data     .badge(.gold .green .blue .purple .cyan .red)  .avatar(.sm .lg .xl)  .stat  .stats
            .list > .list-item(.lead,.body,.trail)  .table  .progress > i  .price  .stars
            .steps > .step(.done .current)   .timeline > .tl(.done .current)
   Media    .media (.sq .tall .wide)  .swatch(.active)  .swatches
   State    .empty  .skeleton  .muted .gold .green .red .small .mono .h2 .h3 .clamp-2
*/
:root {
  --bg: #0a0f1e;
  --bg-2: #0e1528;
  --surface: #141c33;
  --surface-2: #1c2644;
  --surface-3: #25315a;
  --line: #27325a;
  --line-soft: #1d2747;
  --text: #eef1f8;
  --muted: #9ba6c4;
  --faint: #8792b3;
  --gold: #f5a800;
  --gold-2: #ffc23d;
  --gold-ink: #1b1300;
  --blue: #4b8dff;
  --green: #18c08a;
  --purple: #a96bff;
  --cyan: #19b9d6;
  --red: #ff6b6b;
  --coral: #ff8a65;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Avenir Next", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 248px;
  --top-h: 60px;
  --tab-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
h2, .h2 { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h3, .h3 { font-size: 15.5px; line-height: 1.35; font-weight: 650; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--gold-2); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-2); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
a.link:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
svg.inline { display: inline-block; vertical-align: -3px; }
.btn svg, .chip svg, .badge svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(245, 168, 0, .35); }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 8px; }
input.sr-only:focus-visible + label { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100dvh; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#view { flex: 1; outline: none; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }

.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: rgba(10, 15, 30, .88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.top .wordmark { font-weight: 800; letter-spacing: .14em; color: var(--gold); font-size: 17px; }
.top .search { display: none; flex: 1; max-width: 460px; position: relative; }
.top .search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px 0 40px; }
.top .search svg { position: absolute; left: 13px; top: 10px; color: var(--muted); }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--text); flex: none;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn .dot {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(12, 18, 36, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--line-soft);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }
.tabbar a.active { color: var(--gold); }
.tabbar a.fab span.plus { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); margin-top: -18px; box-shadow: 0 8px 22px rgba(245, 168, 0, .35); }
.tabbar a.fab { color: var(--text); }

body.bare .side, body.bare .top, body.bare .tabbar { display: none !important; }
body.bare #view { padding-bottom: 0; }

@media (min-width: 960px) {
  .side {
    display: flex; flex-direction: column; gap: 4px; width: var(--side-w); flex: none;
    position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 18px 12px;
    background: var(--bg-2); border-right: 1px solid var(--line-soft);
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; font-weight: 800; letter-spacing: .16em; color: var(--gold); font-size: 19px; }
  .side .brand img { width: 30px; height: 30px; }
  .side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; }
  .side a.nav:hover { background: var(--surface); color: var(--text); }
  .side a.nav.active { background: rgba(245, 168, 0, .12); color: var(--gold-2); }
  .side .nav-label { padding: 14px 12px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
  .side .me-row { margin-top: auto; display: flex; align-items: center; gap: 6px; }
  .side .me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-soft); }
  .side .me:hover { background: var(--surface); }
  .tabbar { display: none; }
  #view { padding-bottom: 40px; }
  .top { padding: 0 24px; }
  .top .wordmark, .top .me-btn { display: none; }
  .top .search { display: block; }
  .top .spacer-m { display: none; }
}

/* ---------- Layout ---------- */
.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 18px 16px 8px; }
.page.narrow { max-width: 720px; }
.page.tight { max-width: 520px; }
@media (min-width: 960px) { .page { padding: 28px 28px 8px; } }
/* Actions drop to their own row when the title would be squeezed below ~200px */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.page-head .titles { flex: 1 1 200px; min-width: 0; }
.page-head .sub { color: var(--muted); margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.page-head .back { margin-top: -4px; margin-left: -8px; }

.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; text-align: center; }
.start { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.gap-1 { gap: 6px; } .gap-2 { gap: 10px; } .gap-3 { gap: 16px; } .gap-4 { gap: 24px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; } .mt-5 { margin-top: 38px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .split > * { min-width: 0; }
@media (min-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.masonry { columns: 2; column-gap: 12px; }
.masonry > * { break-inside: avoid; margin-bottom: 12px; }
@media (min-width: 760px) { .masonry { columns: 3; } }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) 360px; } .split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .split .sticky { position: sticky; top: calc(var(--top-h) + 16px); } }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.card.pad { padding: 18px; }
.card.hover { transition: transform .15s, border-color .15s; }
.card.hover:hover { transform: translateY(-2px); border-color: var(--line); }
.card.flat { background: transparent; }
.card.gold { border-color: rgba(245, 168, 0, .45); background: linear-gradient(160deg, rgba(245, 168, 0, .12), var(--surface) 60%); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 16px 0; }
.tip { background: rgba(25, 185, 214, .1); border: 1px solid rgba(25, 185, 214, .28); color: #8fe3f3; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.tip svg { flex: none; margin-top: 1px; }
.note { border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; background: var(--surface-2); color: var(--muted); }
.note.warn { background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .3); color: #ffb1b1; }
.note.ok { background: rgba(24, 192, 138, .1); border: 1px solid rgba(24, 192, 138, .3); color: #8eeccb; }
.note.gold { background: rgba(245, 168, 0, .1); border: 1px solid rgba(245, 168, 0, .3); color: var(--gold-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-weight: 650; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; text-align: center;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { background: var(--gold-2); }
.btn.outline { background: transparent; border-color: var(--gold); color: var(--gold-2); }
.btn.outline:hover { background: rgba(245, 168, 0, .1); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: transparent; border-color: rgba(255, 107, 107, .5); color: var(--red); }
.btn.danger:hover { background: rgba(255, 107, 107, .1); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 44px; }
.btn.icon.sm { width: 34px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.chips { position: relative; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); }
.chip.active, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: rgba(245, 168, 0, .14); border-color: var(--gold); color: var(--gold-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 14px; border: 0; background: none; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active, .tab[aria-selected="true"] { color: var(--gold-2); border-bottom-color: var(--gold); }

.toggle { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle:checked { background: var(--gold); }
.toggle:checked::after { transform: translateX(18px); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.qty button { width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; }
.qty button:hover { background: var(--surface-2); }
.qty output, .qty span { min-width: 34px; text-align: center; font-weight: 700; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text);
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 168, 0, .18); }
.input[aria-invalid="true"] { border-color: var(--red); }
.hint { font-size: 12.5px; color: var(--faint); }
.error { font-size: 12.5px; color: var(--red); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
input[type="range"] { width: 100%; accent-color: var(--gold); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ---------- Data display ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 750; letter-spacing: .02em; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.badge.gold { background: rgba(245, 168, 0, .16); color: var(--gold-2); }
.badge.green { background: rgba(24, 192, 138, .16); color: #5fe0b5; }
.badge.blue { background: rgba(75, 141, 255, .18); color: #9cc0ff; }
.badge.purple { background: rgba(169, 107, 255, .18); color: #cfadff; }
.badge.cyan { background: rgba(25, 185, 214, .16); color: #7fdff0; }
.badge.red { background: rgba(255, 107, 107, .16); color: #ffa3a3; }

.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #0b1020; background: var(--gold); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xl { width: 88px; height: 88px; font-size: 30px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat .d { font-size: 12.5px; color: var(--faint); margin-top: 2px; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
.list-item .lead { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-2); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .t { font-weight: 650; }
.list-item .body .s { font-size: 13px; color: var(--muted); }
.list-item .trail { flex: none; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* position: relative keeps visually-hidden (absolute) labels inside the scroll area instead of widening the page */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.price { font-weight: 800; font-variant-numeric: tabular-nums; }
.stars { display: inline-flex; gap: 1px; color: var(--gold); vertical-align: middle; }
.stars .off { color: var(--surface-3); }

.steps { display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step::before { counter-increment: step; content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--surface-3); color: var(--muted); }
.step.current::before { background: var(--gold); color: var(--gold-ink); }
.step.done::before { content: "✓"; background: var(--green); color: #04261b; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 34px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--surface-3); }
.tl:last-child::before { display: none; }
.tl .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-3); color: var(--muted); z-index: 1; }
.tl.done .n { background: var(--green); color: #04261b; }
.tl.done::before { background: var(--green); }
.tl.current .n { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 5px rgba(245, 168, 0, .2); }
.tl .t { font-weight: 700; }
.tl .s { font-size: 13px; color: var(--muted); }
.tl:not(.done):not(.current) .t { color: var(--muted); }
@media (min-width: 760px) {
  .timeline.h { flex-direction: row; }
  .timeline.h .tl { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; gap: 8px; }
  .timeline.h .tl::before { left: 50%; right: -50%; top: 16px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- Media ---------- */
.media { position: relative; aspect-ratio: 4 / 5; background: radial-gradient(120% 90% at 50% 10%, #2b3763, #172040 70%); display: grid; place-items: center; overflow: hidden; }
.media.sq { aspect-ratio: 1; }
.media.tall { aspect-ratio: 3 / 4.4; }
.media.wide { aspect-ratio: 16 / 9; }
.media > svg, .media > img { width: 100%; height: 100%; object-fit: cover; }
.media.pad > svg { width: 82%; height: 82%; object-fit: contain; }
.media .over { position: absolute; inset: auto 8px 8px 8px; display: flex; justify-content: space-between; gap: 6px; align-items: flex-end; }
.media .tl-badge { position: absolute; top: 8px; left: 8px; }
.media .tr-btn { position: absolute; top: 6px; right: 6px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(10, 15, 30, .65); color: #fff; backdrop-filter: blur(6px); }
.round-btn.on { color: var(--red); }
.round-btn.on svg { fill: currentColor; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .22); padding: 0; position: relative; }
.swatch.active, .swatch[aria-pressed="true"], .swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

/* ---------- States ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-2); }
.empty h3 { color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--muted); } .faint { color: var(--faint); }
.gold { color: var(--gold-2); } .green { color: #5fe0b5; } .red { color: var(--red); } .blue { color: #9cc0ff; } .purple { color: #cfadff; } .cyan { color: #7fdff0; }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.bold { font-weight: 700; }
.mono { font-family: var(--mono); font-size: .93em; }
.upper { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 750; }
.clamp-1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.w-full { width: 100%; }

/* Sticky call-to-action bar (sits above the tab bar on mobile) */
.cta-bar { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: 20; background: rgba(10, 15, 30, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line-soft); padding: 12px 16px; display: flex; gap: 10px; align-items: center; margin: 16px -16px 0; }
@media (min-width: 960px) { .cta-bar { bottom: 0; margin: 16px 0 0; border: 1px solid var(--line-soft); border-radius: var(--radius); } }
body.bare .cta-bar { bottom: 0; }

/* ---------- Sheet (modal) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(3, 6, 14, .66); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 520px; max-height: 90dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); animation: rise .2s; box-shadow: var(--shadow); }
.sheet.wide { max-width: 720px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; padding: 24px; } .sheet { border-radius: 22px; padding-bottom: 22px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; background: #f4f6fb; color: #0b1020; font-weight: 650; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: center; animation: rise .2s; max-width: 440px; }
.toast.ok svg { color: #0c9a6c; } .toast.err svg { color: #d93838; }
@media (min-width: 960px) { #toast-root { bottom: 24px; } }

/* ---------- Auth / onboarding (bare screens) ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.auth-hero { display: none; position: relative; overflow: hidden; background: radial-gradient(90% 70% at 20% 10%, #24336b, #0c1226 70%); padding: 48px; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 28px 22px 36px; width: 100%; max-width: 460px; margin: 0 auto; gap: 18px; }
.auth .logo { font-weight: 800; letter-spacing: .2em; color: var(--gold); font-size: 30px; }
.auth .rule { width: 72px; height: 4px; border-radius: 4px; background: var(--gold); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { width: 100%; min-height: 48px; border-radius: 999px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: Roboto, "Segoe UI", system-ui, sans-serif; }
.gbtn:hover { background: #f6f8fc; }
/* color-scheme: light keeps Google's button iframe transparent on our dark page */
.gsi-slot { min-height: 48px; display: flex; justify-content: center; color-scheme: light; }
@media (min-width: 960px) {
  .auth { grid-template-columns: 1.1fr 1fr; }
  .auth-hero { display: flex; flex-direction: column; justify-content: space-between; }
}
.hero-garments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 520px; }
.hero-garments .media { border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); }
.hero-points { display: grid; gap: 12px; max-width: 480px; }
.hero-points li { display: flex; gap: 12px; align-items: flex-start; color: #cfd6ea; }
.hero-points li svg { color: var(--gold); flex: none; margin-top: 2px; }

/* ---------- Create hub / profile / plan (core-owned screens) ---------- */
.tile { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); min-height: 118px; }
.tile:hover { border-color: var(--gold); }
.tile .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(245, 168, 0, .14); color: var(--gold-2); }
.tile.blue .ico { background: rgba(75, 141, 255, .16); color: #9cc0ff; }
.tile.green .ico { background: rgba(24, 192, 138, .16); color: #5fe0b5; }
.tile.purple .ico { background: rgba(169, 107, 255, .16); color: #cfadff; }
.tile.cyan .ico { background: rgba(25, 185, 214, .16); color: #7fdff0; }
.tile.coral .ico { background: rgba(255, 138, 101, .16); color: var(--coral); }
.profile-head { display: flex; gap: 16px; align-items: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 600; }
.plan-stage { scroll-margin-top: 80px; }
.plan-stage .num { width: 44px; height: 44px; border-radius: 13px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.plan-toc { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.plan-toc a { padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 13.5px; }
.plan-toc a:hover { background: var(--surface); color: var(--text); }
.flow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.flow span.node { padding: 5px 10px; border-radius: 8px; background: var(--surface-2); font-weight: 600; }
.flow svg { color: var(--faint); }

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