/* The Starseed Alchemist: ocean blue, Atlantean teal, gold and pearl ivory (no purple, per the spec).
   Dark is the night sea; light is pearl and parchment. Every colour is a token, redefined for light mode. */
:root {
  --bg: #032235; --bg-2: #063B59; --sea: #0a4f6e;
  --panel: rgba(4, 38, 58, 0.78); --panel-solid: #052d44; --line: rgba(214, 173, 85, 0.42); --line-soft: rgba(232, 225, 206, 0.14);
  --ink: #EFE9D8; --ink-2: #B7C7C6; --muted: #8FA6A8;
  --gold: #D6AD55; --gold-hi: #F2D48C; --gold-lo: #B98A34; --teal: #087F91; --link: #6FD0DA;
  --btn-ink: #1b1405; --danger: #f09a8a; --ok: #8fe0b8;
  --glow: 0 0 0 1px var(--line), 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --display: "Cormorant Garamond", Georgia, serif; --brand: "Cinzel", Georgia, serif; --sans: "Montserrat", system-ui, sans-serif;
  --r: 18px; --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F0E2; --bg-2: #E8E1CE; --sea: #d9ebe9;
  --panel: rgba(255, 252, 244, 0.86); --panel-solid: #FFFCF4; --line: rgba(154, 116, 37, 0.38); --line-soft: rgba(24, 49, 59, 0.12);
  --ink: #18313B; --ink-2: #35525C; --muted: #5E7479;
  --gold: #9A7425; --gold-hi: #8A6520; --gold-lo: #C99A3C; --teal: #087F91; --link: #06697A;
  --btn-ink: #18313B; --danger: #a8402f; --ok: #1d7a4f;
  --glow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(24, 49, 59, 0.35);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #F5F0E2; --bg-2: #E8E1CE; --sea: #d9ebe9;
    --panel: rgba(255, 252, 244, 0.86); --panel-solid: #FFFCF4; --line: rgba(154, 116, 37, 0.38); --line-soft: rgba(24, 49, 59, 0.12);
    --ink: #18313B; --ink-2: #35525C; --muted: #5E7479;
    --gold: #9A7425; --gold-hi: #8A6520; --gold-lo: #C99A3C; --teal: #087F91; --link: #06697A;
    --btn-ink: #18313B; --danger: #a8402f; --ok: #1d7a4f;
    --glow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(24, 49, 59, 0.35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--bg);
  background-image: radial-gradient(1200px 700px at 80% -10%, color-mix(in srgb, var(--teal) 28%, transparent), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, color-mix(in srgb, var(--sea) 70%, transparent), transparent 65%);
  background-attachment: fixed; overflow-x: hidden;
}
img, video, audio { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; color: var(--ink); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 26px; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold); color: var(--btn-ink); }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line-soft); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); margin-right: auto; }
.brand img { width: 76px; height: auto; margin: -4px 0; }
.gold-img { object-fit: contain; }
:root[data-theme="light"] .gold-img { filter: brightness(0.78) saturate(1.3) contrast(1.15); }
.brand span { font: 600 24px/1.02 var(--brand); letter-spacing: 0.02em; background: linear-gradient(180deg, #F8E7B0, #D6AD55 70%, #B98A34); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .top.solid .brand span, :root[data-theme="light"] body:not(.home) .brand span { background-image: linear-gradient(180deg, #C99A3C, #8A6520); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-hi); }
:root[data-theme="light"] .nav a[aria-current="page"] { color: var(--gold); }
.tools { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--gold-hi); cursor: pointer; }
:root[data-theme="light"] .icon-btn { color: var(--gold); }
.icon-btn svg { width: 19px; height: 19px; }
.dust { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 14px; background: color-mix(in srgb, var(--gold) 10%, transparent); font-variant-numeric: tabular-nums; }
.dust b { color: var(--gold-hi); font-weight: 700; }
:root[data-theme="light"] .dust b { color: var(--gold); }
.menu-btn { display: none; }
/* the curved gold line that sweeps under the logo, as in the mockup */
.top::after { content: ""; position: absolute; left: 0; bottom: -16px; width: min(620px, 52vw); height: 34px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 34' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23D6AD55' stop-opacity='.2'/%3E%3Cstop offset='.35' stop-color='%23F2D48C'/%3E%3Cstop offset='.8' stop-color='%23D6AD55' stop-opacity='.7'/%3E%3Cstop offset='1' stop-color='%23D6AD55' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 6 C 90 20, 230 26, 360 22 S 540 6, 620 2' fill='none' stroke='url(%23g)' stroke-width='1.6'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.chev { width: 9px; height: 6px; margin-left: 6px; opacity: 0.8; }
.dd { position: relative; }
.dd > a { display: inline-flex; align-items: center; }
.dd-menu { position: absolute; left: 0; top: 100%; min-width: 220px; padding: 8px; border-radius: 14px; background: var(--panel-solid); box-shadow: var(--glow);
  display: grid; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-menu a { padding: 10px 12px; border-radius: 10px; color: var(--ink); white-space: nowrap; }
.login { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 6px; border-radius: 999px; border: 1.5px solid var(--gold);
  color: var(--gold-hi); text-decoration: none; font: 700 17px/1 var(--display); white-space: nowrap; }
:root[data-theme="light"] .login { color: var(--gold); }
.login-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); color: #0d2a35; }
.login-ic svg { width: 17px; height: 17px; }
/* home: see-through over the artwork, with light lettering whatever the theme, until the page scrolls */
.home .top { background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background 0.25s ease; }
.home .top:not(.solid) { --ink: #F3E9CF; --gold-hi: #F2D48C; --gold: #D6AD55; --line: rgba(214, 173, 85, 0.5); }
.home .top.solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.home .top.solid::after { opacity: 0; }
@media (max-width: 1300px) {
  .dd-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; box-shadow: none; padding: 0 0 4px 16px; min-width: 0; }
  .dd-menu a { padding: 10px 12px; font-size: 15px; color: var(--ink-2); }
  .chev { display: none; }
  .login { padding: 0 6px; }
  .top::after { width: 70vw; }
  .nav { position: fixed; inset: 84px 0 auto 0; max-height: calc(100vh - 84px); overflow-y: auto; flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 22px; background: var(--panel-solid);
    border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: -1; }
  .nav.open { transform: none; }
  .nav a { padding: 14px 12px; font-size: 16px; }
  .menu-btn { display: grid; }
  .brand span { font-size: 15px; }
  .top .acct-label { display: none; }
}
@media (max-width: 420px) { .brand span { display: none; } }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 18px/1 var(--display); letter-spacing: 0.01em; text-decoration: none; color: #1d1405;
  /* luminous molten gold, as in the mockup: a bright upper half, a deeper amber lower half, a lit rim and a soft halo */
  background: linear-gradient(180deg, #FFF4CF 0%, #FBDD8C 18%, #F2C25E 48%, #DFA43A 52%, #E9B44D 78%, #FCDB8A 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 5px rgba(140, 82, 8, 0.35), 0 0 0 1px #F7D98F, 0 0 0 2px rgba(120, 78, 16, 0.55), 0 0 18px rgba(246, 199, 96, 0.55), 0 6px 14px -6px rgba(0, 0, 0, 0.6);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.6);
  white-space: nowrap; transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease; }
.btn:hover { filter: brightness(1.08) saturate(1.1); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 5px rgba(140, 82, 8, 0.35), 0 0 0 1px #F7D98F, 0 0 0 2px rgba(120, 78, 16, 0.55), 0 0 26px rgba(246, 199, 96, 0.75), 0 6px 14px -6px rgba(0, 0, 0, 0.6); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); text-shadow: none; }
.login-ic, .yt-tile { background: linear-gradient(180deg, #FFF4CF 0%, #FBDD8C 18%, #F2C25E 48%, #DFA43A 52%, #E9B44D 78%, #FCDB8A 100%) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px #F7D98F, 0 0 14px rgba(246, 199, 96, 0.5); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 17px; }
.btn.wide { width: 100%; }
.btn svg { width: 18px; height: 18px; }
label.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select {
  width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: color-mix(in srgb, var(--bg) 60%, transparent);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.msg { font-size: 14px; min-height: 1.4em; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

.panel { background: var(--panel); border-radius: var(--r); box-shadow: var(--glow); position: relative; }
.eyebrow-rule { display: flex; align-items: center; gap: 18px; justify-content: center; color: var(--gold); }
.eyebrow-rule::before, .eyebrow-rule::after { content: ""; height: 1px; flex: 1; max-width: 260px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow-rule::after { background: linear-gradient(270deg, transparent, var(--gold)); }

/* ---------- landing ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 70px) 0 clamp(28px, 5vw, 56px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(48px, 6.6vw, 92px); letter-spacing: -0.01em; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--gold-hi); }
:root[data-theme="light"] .hero h1 em { color: var(--gold); }
.hero .lede { font: italic 400 clamp(20px, 2.1vw, 26px)/1.4 var(--display); color: var(--ink-2); margin-top: 22px; max-width: 30ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-art { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--glow); aspect-ratio: 606 / 406; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(242, 212, 140, 0.55), inset 0 0 60px rgba(3, 34, 53, 0.35); pointer-events: none; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; aspect-ratio: 16 / 11; }
}

.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.path { padding: 28px 22px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; align-content: start; }
.path::before { content: ""; position: absolute; inset: 7px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); pointer-events: none; }
.path svg, .path img { width: 56px; height: 50px; color: var(--gold); }
.path h2 { font-size: 27px; color: var(--gold-hi); }
:root[data-theme="light"] .path h2 { color: var(--gold); }
.path p { color: var(--ink-2); font-size: 15px; max-width: 26ch; }
.path .btn { margin-top: auto; }
@media (max-width: 980px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .paths { grid-template-columns: 1fr; } .path { grid-template-columns: auto 1fr; text-align: left; justify-items: start; padding: 20px; column-gap: 16px; }
  .path svg, .path img { grid-row: span 2; width: 44px; height: 40px; } .path .btn { grid-column: 1 / -1; width: 100%; } }

.section { padding: clamp(40px, 7vw, 84px) 0 0; }
.journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); overflow: hidden; }
.journey .copy { padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; align-content: center; }
.journey .art { min-height: 260px; background: url(crystal.jpg) center / cover; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; counter-increment: s; color: var(--ink-2); }
.steps li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 600 20px var(--display); color: var(--btn-ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); }
.steps b { color: var(--ink); display: block; font-size: 16px; }
@media (max-width: 860px) { .journey { grid-template-columns: 1fr; } .journey .art { min-height: 180px; order: -1; } }

.latest { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-top: 26px; }
.player { overflow: hidden; aspect-ratio: 16 / 9; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.today { padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; align-content: center;
  background: radial-gradient(400px 300px at 100% 100%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%), var(--panel); }
.today h2 { font-size: 30px; }
.today p { color: var(--ink-2); }
@media (max-width: 860px) { .latest { grid-template-columns: 1fr; } }

.peek { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
@media (max-width: 860px) { .peek { grid-template-columns: 1fr; } }

.pillars { margin-top: clamp(48px, 7vw, 90px); border-block: 1px solid var(--line); }
.pillars .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.pillars div { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px 10px; font: 500 19px var(--display); color: var(--ink); }
.pillars div + div { border-left: 1px solid var(--line); }
.pillars img { width: 38px; height: 34px; flex: none; }
@media (max-width: 760px) { .pillars .wrap { grid-template-columns: 1fr 1fr; } .pillars div:nth-child(3) { border-left: 0; } .pillars div:nth-child(n + 3) { border-top: 1px solid var(--line); } }

/* the glowing wave above the footer */
.wave { height: clamp(40px, 5vw, 70px); background: url(img/wave.jpg) center / cover no-repeat; }
:root[data-theme="light"] .wave { opacity: 0.85; }

.foot { padding: 40px 0 46px; color: var(--ink-2); font-size: 14px; }
.foot .wrap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.foot .mark { text-align: center; display: grid; justify-items: center; gap: 6px; }
.foot .mark img { width: 72px; height: auto; }
.foot .mark b { font: 600 20px var(--brand); color: var(--gold); letter-spacing: 0.04em; }
.foot .mark i { font-family: var(--display); font-size: 17px; }
.foot nav { display: flex; gap: 18px; justify-content: flex-end; flex-wrap: wrap; }
.foot nav a { color: var(--ink-2); }
.foot .social { display: flex; gap: 10px; }
.foot .note { grid-column: 1 / -1; text-align: center; font-size: 13px; color: var(--muted); max-width: 70ch; margin: 8px auto 0; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } .foot nav { justify-content: center; } .foot .mark { order: -1; } }

/* ---------- feed ---------- */
.feed-layout { display: grid; grid-template-columns: minmax(0, 640px) 320px; gap: 28px; justify-content: center; padding: 28px 0 60px; }
.feed-side { position: sticky; top: 96px; align-self: start; display: grid; gap: 16px; }
@media (max-width: 1000px) { .feed-layout { grid-template-columns: minmax(0, 640px); } .feed-side { position: static; order: -1; } }
.feed { display: grid; gap: 22px; }
.post { overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; }
.post-head img { width: 40px; height: 40px; border-radius: 50%; }
.post-head b { display: block; font-size: 15px; }
.post-head time { font-size: 13px; color: var(--muted); }
.post-head .price { margin-left: auto; font-weight: 700; color: var(--gold-hi); font-size: 14px; white-space: nowrap; }
:root[data-theme="light"] .post-head .price { color: var(--gold); }
.post-text { padding: 0 18px 16px; display: grid; gap: 8px; }
.post-text h3 { font-size: 28px; }
.post-text p { color: var(--ink-2); white-space: pre-line; }
.post-text .body { color: var(--ink); white-space: pre-line; }
.post-media { position: relative; background: var(--bg-2); }
.post-media img, .post-media video { width: 100%; max-height: 720px; object-fit: cover; }
.post-media audio { width: calc(100% - 36px); margin: 16px 18px; }
.cover-blank { aspect-ratio: 4 / 3; background: url(crystal.jpg) center / cover; }
.locked .post-media img, .locked .cover-blank { filter: blur(14px) saturate(1.1) brightness(0.8); transform: scale(1.08); }
.lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 20px;
  background: radial-gradient(closest-side, rgba(3, 34, 53, 0.6), rgba(3, 34, 53, 0.15)); color: #EFE9D8; }
.lock svg { width: 40px; height: 40px; color: #F2D48C; }
.lock span { font: 600 22px var(--display); }
.lock .btn { color: #1b1405; }
.post-foot { display: flex; gap: 10px; padding: 12px 18px 16px; color: var(--muted); font-size: 13px; align-items: center; border-top: 1px solid var(--line-soft); }
.more { text-align: center; color: var(--muted); padding: 24px; }
.wallet { padding: 22px; display: grid; gap: 14px; }
.wallet .bal { font: 600 46px/1 var(--display); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .wallet .bal { color: var(--gold); }
.wallet .bal small { font: 500 15px var(--sans); color: var(--ink-2); margin-left: 6px; }
.packs { display: grid; gap: 10px; }
.pack { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pack:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.pack[aria-pressed="true"] { border-color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold-hi); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.pack b { font: 600 24px var(--display); color: var(--gold-hi); }
:root[data-theme="light"] .pack b { color: var(--gold); }
.pack em { font-style: normal; font-size: 12px; color: var(--ok); font-weight: 600; }
.pack strong { font-size: 16px; }

dialog { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(460px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(2, 16, 26, 0.66); backdrop-filter: blur(4px); }
dialog .panel { padding: 26px; display: grid; gap: 16px; background: var(--panel-solid); }
dialog h3 { font-size: 30px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--panel-solid); color: var(--ink); box-shadow: var(--glow);
  padding: 14px 20px; border-radius: 14px; max-width: calc(100% - 32px); font-size: 15px; }

/* ---------- account and admin ---------- */
.narrow { width: min(480px, 100% - 2 * var(--gutter)); margin: 36px auto 70px; }
.card { padding: clamp(22px, 4vw, 32px); display: grid; gap: 16px; }
.card h1 { font-size: clamp(36px, 5vw, 46px); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); padding: 4px; }
.tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; }
.tabs button[aria-selected="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); color: var(--btn-ink); }
.oauth { display: grid; gap: 10px; }
.oauth .btn { background: var(--panel-solid); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rows { display: grid; }
.rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.rows > div:last-child { border-bottom: 0; }
.rows span { color: var(--ink-2); }
.plus { color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.minus { color: var(--ink-2); font-variant-numeric: tabular-nums; }

.admin { padding: 28px 0 70px; display: grid; gap: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stats .panel { padding: 18px; }
.stats b { display: block; font: 600 36px/1.1 var(--display); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .stats b { color: var(--gold); }
.stats span { color: var(--ink-2); font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 960px) { .two { grid-template-columns: 1fr; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr.pick { cursor: pointer; }
.table tr.pick:hover td { background: color-mix(in srgb, var(--gold) 7%, transparent); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.tag.published { color: var(--ok); }
.scroll-x { overflow-x: auto; }
.prose { display: grid; gap: 14px; color: var(--ink-2); }
.prose h2 { font-size: 30px; margin-top: 12px; }
.prose b { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- creator feed: profile, tabs, post cards, locked panels, media grid ---------- */
.post-media.yt iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.tag-free { margin-left: auto; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.profile { overflow: hidden; }
.pf-cover { height: clamp(150px, 22vw, 210px); background: url(img/hero-clear.jpg) 78% 62% / cover no-repeat; }
.pf-body { padding: 0 22px 22px; display: grid; gap: 8px; }
.pf-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -48px; }
.pf-avatar { width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--panel-solid); box-shadow: 0 0 0 2px var(--gold); background: var(--panel-solid); }
.pf-stats { display: flex; gap: 16px; font-size: 14px; color: var(--ink-2); padding-bottom: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pf-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.profile h1 { font-size: clamp(28px, 3vw, 34px); display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.badge { width: 22px; height: 22px; color: var(--gold); flex: none; vertical-align: -3px; }
.handle { color: var(--muted); font-size: 14px; }
.live { color: var(--ok); }
.pf-bio { color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.pf-sub { display: grid; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.pf-sub-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sub-btn { justify-content: space-between; padding: 0 24px; min-height: 54px; font-size: 19px; }
.subbed { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.subbed svg { width: 26px; height: 26px; color: var(--gold); }
.subbed small { font-weight: 400; color: var(--ink-2); }
#manage-btn { justify-self: start; }

.pf-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 0 18px; border-bottom: 1px solid var(--line-soft); }
.pf-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 8px; color: var(--ink-2); font: 600 15px var(--sans); cursor: pointer; text-transform: uppercase; letter-spacing: 0.06em; }
.pf-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.pf-tabs b { color: var(--gold); margin-right: 4px; }

.post-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.post-av { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--gold); }
.post-head b { display: flex; align-items: center; gap: 5px; font-size: 15px; }
.post-head .badge { width: 17px; height: 17px; }
.post-head .handle { display: block; font-size: 13px; }
.post-head time { font-size: 13px; color: var(--muted); align-self: start; padding-top: 4px; }
.post-text { padding: 0 18px 14px; }
.post-text h3 { font-size: 26px; }
.locked .post-media { min-height: 280px; }
.locked .post-media > img, .locked .cover-blank { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lock { background: linear-gradient(180deg, rgba(3, 26, 42, 0.35), rgba(3, 26, 42, 0.8)); gap: 18px; }
.lock-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: rgba(3, 26, 42, 0.7); box-shadow: inset 0 0 0 1px rgba(214, 173, 85, 0.5); font: 600 14px var(--sans); color: #EFE9D8; }
.lock-chip svg { width: 18px; height: 18px; color: #F2D48C; }
.lock-chip b { color: #F2D48C; }
.lock-actions { display: grid; gap: 10px; justify-items: center; }
.lock-actions .btn { min-width: 250px; }
.btn.ghost.on-dark { color: #F3E9CF; box-shadow: inset 0 0 0 1px rgba(242, 212, 140, 0.7); background: rgba(3, 26, 42, 0.45); }
.post-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line-soft); }
.act { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; }
.act:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); color: var(--ink); }
.act svg { width: 22px; height: 22px; }
.act[data-like] svg { fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1); }
.act.liked { color: #e8607a; }
.act.liked svg { fill: currentColor; transform: scale(1.12); }
.tag-open, .tag-sub { margin-left: auto; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.tag-open { color: var(--ok); }
.tag-sub { color: var(--gold); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--bg-2); display: block; }
.tile img, .tile .cover-blank { width: 100%; height: 100%; object-fit: cover; }
.tile.locked img, .tile.locked .cover-blank { filter: blur(12px) brightness(0.75); transform: scale(1.1); }
.tile-lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; color: #F2D48C; font: 700 13px var(--sans); }
.tile-lock svg { width: 26px; height: 26px; }
.tile-ic { position: absolute; right: 8px; top: 6px; color: #fff; text-shadow: 0 1px 4px #000; }

.perks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--ink-2); }
.perks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.perks li::before { content: "✦"; color: var(--gold); }
.sub-price { font-size: 16px; color: var(--ink-2); }
.sub-price b { font: 600 34px var(--display); color: var(--ink); margin-right: 6px; }
.tip-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tip-amounts .pack { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 0; padding: 10px 6px; }
:root[data-theme="light"] .wallet .bal, :root[data-theme="light"] .pack b { color: var(--gold); }
@media (max-width: 520px) { .tiles { gap: 3px; } .lock-actions .btn { min-width: 0; } .pf-stats { gap: 10px; font-size: 13px; } .post-foot .act span { font-size: 13px; } }
.lock .btn svg { width: 18px; height: 18px; color: currentColor; }
.lock .lock-chip span, .lock .btn span { font: inherit; }
.post-head img.post-av { width: 44px; height: 44px; }
.dust svg { width: 15px; height: 15px; color: var(--gold); }
@media (max-width: 1000px) {
  /* phones: the profile leads; the wallet shows when the Stardust counter is tapped */
  .feed-side { display: none; }
  .feed-side:target, .feed-side.show { display: grid; order: -1; }
}
.post-head b { display: block; } .post-head b .badge { display: inline-block; margin-left: 4px; vertical-align: -3px; }

/* ---------- merch shop ---------- */
.shop { padding: 30px 0 70px; }
.shop-head { text-align: center; display: grid; gap: 8px; margin-bottom: 28px; }
.shop-head h1 { font-size: clamp(40px, 5vw, 60px); color: var(--gold-hi); }
:root[data-theme="light"] .shop-head h1 { color: var(--gold); }
.shop-head p { color: var(--ink-2); font: italic 500 21px/1.45 var(--display); }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.product-img { position: relative; aspect-ratio: 1; background: var(--bg-2); }
.product-img img, .product-img .cover-blank { width: 100%; height: 100%; object-fit: cover; }
.sold, .few { position: absolute; left: 12px; top: 12px; padding: 5px 12px; border-radius: 999px; font: 700 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(3, 26, 42, 0.8); color: #F3E9CF; }
.few { color: #F2D48C; }
.product-body { padding: 16px 16px 18px; display: grid; gap: 10px; align-content: start; }
.product h3 { font-size: 24px; }
.product .price { font: 600 20px var(--display); color: var(--gold); }
.product .desc { color: var(--ink-2); font-size: 14px; }
.product .btn { margin-top: 4px; }
.bag { position: sticky; top: 100px; padding: 22px; display: grid; gap: 14px; }
.bag h2 { font-size: 30px; }
.bag-items { display: grid; gap: 12px; }
.bag-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.bag-item img, .bag-item > span { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg-2); }
.bag-item b { display: block; font-size: 14px; }
.bag-item small { display: block; color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); padding: 3px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--ink); font-size: 18px; cursor: pointer; }
.qty span { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.bag-fab { display: none; }
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .bag { position: static; }
  .bag-fab:not([hidden]) { display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 20; }
}

/* with the Shop link the menu needs a little more room */
.top .wrap { width: min(1340px, 100% - 2 * var(--gutter)); }
.nav a, .brand span { white-space: nowrap; }
.nav a { padding: 8px 11px; }
@media (max-width: 560px) {
  .products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-body { padding: 12px; gap: 8px; }
  .product h3 { font-size: 19px; }
  .product .desc { display: none; }
  .product .btn { min-height: 42px; font-size: 16px; padding: 0 10px; }
}

/* each card takes the shape of its media: --r is width / height. Tall media is capped to the screen height and
   centred on a soft stage, so a Short never towers over the feed; nothing is cropped once it's unlocked. */
.post-media.fit { --r: 1; --h: min(78vh, 760px); display: grid; place-items: center; background: #031a29; overflow: hidden; }
.post-media.fit > img, .post-media.fit > video, .post-media.fit > iframe {
  width: min(100%, calc(var(--h) * var(--r))); height: auto; max-height: var(--h); aspect-ratio: var(--r); object-fit: contain; border: 0; display: block; }
.post-media.fit:not([style]) > img, .post-media.fit:not([style]) > video { aspect-ratio: auto; }
.locked .post-media.fit { min-height: 0; aspect-ratio: auto; }
.locked .post-media.fit::before { content: ""; display: block; width: min(100%, calc(var(--h) * var(--r))); aspect-ratio: var(--r); max-height: var(--h); }
.locked .post-media.fit:not([style])::before { aspect-ratio: 4 / 3; }
.locked .post-media.fit > img, .locked .post-media.fit > .cover-blank { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; aspect-ratio: auto; }
.post-media.yt.fit > iframe { width: min(100%, calc(var(--h) * var(--r))); }
