:root {
  --bg: #09090e; --surface: #101017; --raised: #17171f; --deep: #060609;
  --text: #efeae0; --muted: #a8a498; --faint: #7d7a72;
  --line: #25252f; --line-gold: #6e6248;
  --gold: #c4ab72; --gold-bright: #e6d7ae; --gold-soft: #1b1913; --on-gold: #1a1408;
  --danger: #e8806b; --danger-soft: #3b1913;
  --ok: #66c4b4; --ok-soft: #0f2b28;
  --warn: #edbb63; --warn-soft: #35270f;
  --sans: 'Zen Kaku Gothic New', system-ui, -apple-system, 'Hiragino Sans', sans-serif;
  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.is-tobari { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.75 var(--sans); letter-spacing: .02em; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; padding: 0; border: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.only-pc { display: none; }
@media (min-width: 768px) { .only-pc { display: block; } .only-sp { display: none; } }

/* Type */
.wordmark { font: 400 20px/1.2 'Cinzel Decorative', serif; color: var(--gold-bright); letter-spacing: .06em; background: none; border: 0; padding: 0; cursor: pointer; }
.h1 { font: 600 22px/1.5 var(--serif); letter-spacing: .08em; }
.h3 { font: 500 15px/1.6 var(--sans); }
.eyebrow { font: 400 11px/1.6 Cinzel, serif; color: var(--gold); letter-spacing: .24em; }
.lead { font: 500 16px/1.9 var(--serif); }
.note { font-size: 12px; line-height: 1.7; color: var(--muted); }
.legend, legend { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.textlink { color: var(--gold-bright); font-size: 13px; }
.empty { color: var(--muted); padding: 24px 0; }
.bigNum { font: 600 26px/1.4 var(--serif); }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 10px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: 500 14px/1.4 var(--serif); letter-spacing: .14em; cursor: pointer; transition: border-color .2s, background .2s; }
.btn:hover { border-color: var(--line-gold); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn--main { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-bright); }
.btn--main:hover { background: #26221a; }
.btn--small { width: auto; min-height: 44px; padding: 8px 18px; font-size: 13px; flex: none; }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.linkbtn { display: inline-block; min-height: 44px; padding: 10px 12px; background: none; border: 0; color: var(--muted); font-size: 13px; letter-spacing: .14em; cursor: pointer; }
.linkbtn:hover { color: var(--gold-bright); }
.iconbtn { width: 44px; height: 44px; background: none; border: 0; color: var(--muted); cursor: pointer; }

/* Layout */
.hdr { position: relative; display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 16px; }
.hdr--back { justify-content: flex-start; height: 56px; gap: 8px; border-bottom: 1px solid var(--line); background: var(--deep); }
.hdr--back .hdr__mark { display: none; }
.hdr__back { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -12px; font-size: 26px; line-height: 1; }
.hdr__title { font: 500 15px/1.4 var(--sans); }
.deskNav { display: none; }
.page { max-width: 640px; margin: 0 auto; padding: 8px 16px 48px; display: grid; gap: 20px; }
.page--narrow { max-width: 460px; }
.page--wide { max-width: 1040px; }
.center-head { justify-items: stretch; }
.center-head > .eye, .center-head > .eyebrow, .center-head > .h1 { justify-self: center; text-align: center; }
.stack { display: grid; gap: 16px; }
.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.twoCol { display: grid; gap: 20px; }
.ftr { display: grid; justify-items: center; gap: 14px; padding: 44px 16px calc(36px + var(--safe-b)); background: var(--deep); text-align: center; }
.ftr nav { display: grid; gap: 8px; font-size: 12px; color: var(--muted); }
.ftr small { color: var(--faint); font: 400 10px Cinzel, serif; letter-spacing: .2em; }
.tabs { position: sticky; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--deep); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; font-size: 11px; color: var(--faint); }
.tabs a[aria-current] { color: var(--gold-bright); font-weight: 700; }

/* Panels */
.panel { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel--line { border-color: var(--line-gold); }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 13px; }
.kv dt { color: var(--muted); flex: none; }
.kv dd { text-align: right; font-weight: 500; }
.kv--total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; align-items: baseline; }
.kv--total dd { font: 600 19px var(--serif); }
.kv--block { display: block; }
.kv--block dd { text-align: left; font-weight: 400; margin-top: 4px; white-space: pre-wrap; }
.notice { padding: 10px 14px; border-radius: 6px; font-size: 13px; background: var(--warn-soft); color: var(--warn); }
.notice--bad { background: var(--danger-soft); color: var(--danger); }
.notice--ok { background: var(--ok-soft); color: var(--ok); }
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--raised); color: var(--muted); }
.chip--gold { background: var(--gold-soft); color: var(--gold-bright); }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--bad { background: var(--danger-soft); color: var(--danger); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pills a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.pills a[aria-current] { border-color: var(--gold); color: var(--gold-bright); background: var(--gold-soft); }

/* Forms */
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-size: 12px; color: var(--muted); }
.input { width: 100%; min-height: 48px; padding: 10px 12px; background: var(--deep); border: 1px solid var(--line); border-radius: 6px; font-size: 16px; }
.input:focus { border-color: var(--gold); outline: none; }
textarea.input { resize: vertical; }
.input--code { font: 500 24px/1 'Cinzel', monospace; letter-spacing: .5em; text-align: center; }
.input--time { width: auto; min-height: 44px; padding: 6px; font-size: 14px; }
.fieldRow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input, .slot input, .pick input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__body { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.choice__body small { color: var(--muted); }
.choice input:checked + .choice__body { border-color: var(--gold); background: var(--gold-soft); }
.choice input:focus-visible + .choice__body, .slot input:focus-visible + span, .pick input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.day { display: grid; justify-items: center; padding: 8px 4px; min-height: 56px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 13px; line-height: 1.4; }
.day small { font-size: 11px; color: var(--muted); }
.day[aria-current] { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-bright); }
.day.is-off { opacity: .45; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { position: relative; display: block; text-align: center; font-size: 13px; }
.slot span, a.slot { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.slot input:checked + span { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-bright); }
.slot.is-off { opacity: .4; }
.option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 8px; }
.option input { accent-color: var(--gold); width: 20px; height: 20px; order: 2; margin-left: auto; }
.option span { display: grid; }
.option small { color: var(--muted); font-size: 12px; }
.option.is-on { border-color: var(--gold); background: var(--gold-soft); }
.option.is-off { opacity: .55; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick span { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 13px; }
.pick input:checked + span { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-bright); }
.check { display: flex; gap: 10px; align-items: center; font-size: 13px; min-height: 44px; }
.check input { accent-color: var(--gold); width: 20px; height: 20px; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; margin-left: auto; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { display: block; height: 100%; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--faint); transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--on-gold); }
.switch input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* Booking */
.has-bar .ftr { padding-bottom: calc(104px + var(--safe-b)); }
.flow { display: grid; gap: 20px; max-width: 640px; margin: 0 auto; padding: 12px 16px 24px; }
.flow__main { display: grid; gap: 20px; min-width: 0; }
.flow__side { display: grid; gap: 12px; }
.steps { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps__n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); font-size: 11px; }
.steps .is-now { color: var(--text); }
.steps .is-now .steps__n { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.steps .is-done { color: var(--muted); }
.steps .is-done .steps__n { border-color: var(--gold-bright); color: var(--gold-bright); }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + var(--safe-b)); background: var(--deep); border-top: 1px solid var(--line); }
.bar__price { display: grid; flex: none; font: 600 20px/1.2 var(--serif); }
.bar__price small { font: 400 11px var(--sans); color: var(--muted); }
.bcard { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.bcard__body { min-width: 0; }
.bcard__name { font: 600 16px/1.5 var(--serif); letter-spacing: .08em; }
.bcard__price { margin-left: auto; font: 600 19px var(--serif); }
.hold { font-size: 12px; color: var(--warn); text-align: center; }
.deadline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--gold); border-radius: 8px; background: var(--gold-soft); }
.deadline small { display: block; font-size: 11px; color: var(--muted); }
.deadline strong { font: 600 16px var(--serif); }

/* Tellers */
.portrait { display: block; position: relative; overflow: hidden; background: var(--deep); flex: none; --tint: 196, 171, 114; }
.tint-lapis { --tint: 90, 150, 200; }
.tint-rubedo { --tint: 200, 104, 76; }
.tint-verdigris { --tint: 96, 180, 150; }
.portrait img, .portrait svg { width: 100%; height: 100%; object-fit: cover; }
.portrait--thumb { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-gold); }
.portrait--card { aspect-ratio: 5 / 6; width: 120px; border-radius: 999px 999px 8px 8px; border: 1px solid var(--line); }
.portrait--hero { aspect-ratio: 5 / 6; width: 100%; }
.portrait__halo { fill: rgba(var(--tint), .42); }
.portrait__ring { fill: none; stroke: rgba(var(--tint), .4); stroke-width: 1; stroke-dasharray: 2 6; }
.portrait__shape { fill: #050507; }
.tlist { display: grid; }
.tcard { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tcard__link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.tcard .portrait--card { width: 56px; height: 56px; aspect-ratio: 1; border-radius: 50%; }
.tcard__text { display: grid; min-width: 0; }
.tcard__name { font: 600 16px/1.5 var(--serif); letter-spacing: .08em; }
.tcard__price { font-size: 12px; color: var(--gold-bright); }
.profile { display: grid; gap: 20px; }
.profile__figure { position: relative; }
.profile__title { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; }
.profile__title h1 { font: 600 34px/1.4 var(--serif); letter-spacing: .2em; }
.profile__main { display: grid; gap: 20px; padding: 0 16px 24px; }
.profile__about { display: grid; gap: 8px; }
.prices { display: grid; }
.rowCard { display: flex; align-items: center; gap: 12px; }
.rowCard__text { flex: 1; min-width: 0; }
.rowCard__time { font: 600 16px var(--serif); }
.hist { display: grid; }
.hist .rowCard { padding: 12px 0; border-bottom: 1px solid var(--line); }
.next { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--gold); border-radius: 8px; background: var(--surface); }
.next__head { display: flex; justify-content: space-between; align-items: center; }
.next__who { display: flex; align-items: center; gap: 14px; }
.homeGrid { display: grid; gap: 16px; }
.sectionHead { display: flex; justify-content: space-between; align-items: baseline; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat strong { font: 600 24px/1.4 var(--serif); }
.rank { display: grid; gap: 4px; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; font-size: 14px; }
.rank li > :last-child { margin-left: auto; color: var(--muted); }
.rank .is-me { background: var(--gold-soft); }
.rank__n { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-gold); border-radius: 50%; font-size: 12px; }
.week { display: grid; }
.week__row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.week__row strong { width: 24px; font: 600 16px var(--serif); }
.offList li { display: flex; justify-content: space-between; align-items: center; padding-left: 12px; border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; background: var(--surface); }
.photoEdit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.photoEdit label { position: relative; }

/* Auth */
.auth { display: grid; gap: 16px; max-width: 420px; margin: 0 auto; padding: 12px 16px 48px; }
.auth > .eyebrow, .auth > .h1, .auth > .muted { text-align: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.links { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.links a { min-height: 44px; display: inline-flex; align-items: center; }
.qr { width: 200px; margin: 0 auto; padding: 8px; background: #fff; border-radius: 8px; }
.qr svg { width: 100%; height: auto; }
.secret { word-break: break-all; font-size: 13px; color: var(--gold-bright); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.codes code { font: 500 14px 'Cinzel', monospace; letter-spacing: .08em; }
.bullets { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }

/* Room */
body.room { height: 100dvh; overflow: hidden; overscroll-behavior: none; }
.roomHost { position: fixed; top: 0; left: 0; right: 0; height: var(--room-h, 100dvh); }
.intake { margin: 8px; font-size: 13px; }
.ended { display: grid; justify-items: center; gap: 14px; max-width: 460px; min-height: 100dvh; align-content: center; margin: 0 auto; padding: 32px 16px; text-align: center; }
.ended .btn { width: 100%; }
.eye { width: 120px; height: auto; }

/* Tobari menu */
.tobari { position: fixed; inset: 0; z-index: 100; display: grid; background: rgba(6, 6, 9, 0); transition: background .5s; }
.tobari__veil { position: absolute; inset: 0; background: linear-gradient(180deg, #0b0b13, #060609); transform: translateY(-100%); transition: transform .55s cubic-bezier(.7, 0, .2, 1); }
.tobari.is-open .tobari__veil, .tobari--page .tobari__veil { transform: none; }
.tobari--page { position: relative; min-height: 100dvh; background: var(--bg); }
.tobari__body { position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 24px; padding: 24px 16px calc(32px + var(--safe-b)); opacity: 0; transition: opacity .4s .2s; }
.tobari.is-open .tobari__body, .tobari--page .tobari__body { opacity: 1; }
.tobari__main { display: flex; flex-direction: row-reverse; align-self: center; gap: 44px; }
.tobari__main a, .tobari__main button { writing-mode: vertical-rl; font: 400 26px/1.5 'Yuji Syuku', var(--serif); letter-spacing: .42em; min-width: 44px; background: none; border: 0; padding: 0; cursor: pointer; }
.tobari__main a:hover, .tobari__main button:hover { color: var(--gold-bright); }
.tobari__sub { display: grid; gap: 6px; justify-items: center; font-size: 12px; color: var(--muted); }
.tobari__close { min-height: 44px; }

/* Top: static layout. This is also what reduced motion and no-script visitors get.
   Layers are whole pictures. Where each one rests comes from layers.css, written by tools/art/layers.py:
   --w is its width in viewport widths, (--ax, --ay) the anchor inside it, which lands at
   x = --tx viewport widths and y = --y0 + --ty viewport widths. */
.top { background: var(--deep); }
.stage { position: relative; }
.stage__view { position: relative; --eye-y: 95.2vw; }
.plate { position: relative; overflow: hidden; --y0: 50%; }
.plate--tree { height: 116.4vw; background: radial-gradient(90% 80% at 50% 40%, #0a142c, var(--deep)); }
.plate--ring { height: 216.4vw; background: radial-gradient(90% 60% at 50% 47%, #14122e, var(--deep)); }
.plate--yi { height: 140.8vw; background: #050507; }
.plate--scales { height: 130.5vw; background: radial-gradient(70% 70% at 66% 56%, #1a0e07, #060608); }
.lyr { position: absolute; display: block; width: calc(var(--w) * 100vw); left: calc((var(--tx) - var(--ax) * var(--w)) * 100vw); top: calc(var(--y0) + (var(--ty) - var(--ay) * var(--ar) * var(--w)) * 100vw); transform-origin: calc(var(--ax) * 100%) calc(var(--ay) * 100%); }
.lyr img { display: block; width: 100%; height: auto; }
.veil { position: absolute; z-index: 2; left: 50%; top: calc(72vw); width: 160vw; height: 144vw; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(6, 6, 10, .96), rgba(6, 6, 10, .9) 42%, rgba(6, 6, 10, .45) 72%, transparent); pointer-events: none; }
.emblem { position: absolute; z-index: 3; left: 11.5vw; top: 69.7vw; width: 77vw; }
.emblem__in { display: grid; justify-items: center; gap: 2.4vw; }
.emblem__eye { position: relative; display: block; width: 100%; }
.emblem__eye::before { content: ''; position: absolute; inset: -14%; background: radial-gradient(closest-side, rgba(219, 184, 112, .16), transparent); pointer-events: none; }
.emblem__eye img { width: 100%; height: auto; }
.emblem__ball { position: absolute; inset: 0; transform-origin: 37.5% 36%; }
.emblem__word { font: 400 7vw/1.1 'Cinzel Decorative', serif; color: var(--gold-bright); letter-spacing: .05em; white-space: nowrap; text-shadow: 0 0 18px rgba(219, 184, 112, .3); }
.miniLogo { position: fixed; z-index: 40; top: 16px; left: 50%; min-height: 44px; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .5s; }
.miniLogo.is-on { opacity: 1; pointer-events: auto; }

/* The last scene: face-down cards on a full screen of stars. */
.scene { position: relative; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 40px; min-height: 100vh; min-height: 100svh; padding: 88px 16px 64px; background: url('/art/stars_sp.webp') center / cover, var(--deep); }
.fan { position: relative; width: 100vw; height: 270px; perspective: 900px; }
.card { --cx: 0px; --cy: 0px; --cr: 0deg; --lift: 0px; position: absolute; top: 0; left: 50%; width: 136px; margin-left: -68px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-gold); box-shadow: 0 14px 32px rgba(0, 0, 0, .6); transform-origin: 50% 110%; transform: translate(var(--cx), calc(var(--cy) + var(--lift))) rotate(var(--cr)); transition: transform .25s; -webkit-tap-highlight-color: transparent; }
.card img { display: block; width: 100%; height: auto; }
.card--2 { --cx: -92px; --cy: 10px; --cr: -9deg; }
.card--3 { --cy: -4px; z-index: 2; }
.card--4 { --cx: 92px; --cy: 10px; --cr: 9deg; }
.card--1 { --cx: -330px; --cy: 44px; --cr: -18deg; }
.card--5 { --cx: 330px; --cy: 44px; --cr: 18deg; }
@media (hover: hover) { .card:hover { --lift: -12px; } }

/* Fee and footer sit apart from the scene, on their own ground. */
.fee { position: relative; z-index: 5; display: grid; justify-items: center; gap: 14px; padding: 64px 24px 56px; background: #0b0b11; border-top: 1px solid var(--line-gold); text-align: center; }
.fee::before { content: ''; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); background: #0b0b11; border: 1px solid var(--line-gold); }
.fee__price { font: 500 16px/1.7 var(--serif); letter-spacing: .08em; }
.fee .note { max-width: 560px; }
.top .ftr { background: #0b0b11; border-top: 1px solid var(--line); }

/* Top: depth motion */
.depth .stage__view { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 800px; perspective-origin: 50% 50%; transform-style: preserve-3d; background: var(--deep); --eye-y: 42svh; }
.depth .plate { position: absolute; inset: 0; height: auto; overflow: visible; background: none; transform-style: preserve-3d; pointer-events: none; }
.depth .lyr { will-change: transform, opacity; visibility: hidden; backface-visibility: hidden; }
.depth .veil { top: var(--eye-y); width: 150vmin; height: 130vmin; transition: none; }
.depth .emblem { top: calc(var(--eye-y) - 25.54vw); will-change: transform, opacity; transform-style: preserve-3d; }
.depth .emblem__in { animation: arrive 2.2s cubic-bezier(.16, 1, .3, 1) both; }
.depth .emblem__ball { animation: open 1.1s .95s cubic-bezier(.3, 0, .15, 1) both; }
.depth .emblem__word { animation: fadeIn 1.2s 1.1s both; }
.depth .scene { position: absolute; inset: 0; z-index: 4; min-height: 0; opacity: 0; visibility: hidden; pointer-events: none; }
.depth .scene.is-on { pointer-events: auto; }
.depth .fan .card { transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), opacity .7s; }
.depth .fan:not(.is-in) .card { opacity: 0; transform: translateZ(-1400px) rotate(0deg); transition-duration: .4s; transition-delay: 0s; }
.depth .fan.is-in .card--1 { transition-delay: 0s; }
.depth .fan.is-in .card--2 { transition-delay: .12s; }
.depth .fan.is-in .card--3 { transition-delay: .24s; }
.depth .fan.is-in .card--4 { transition-delay: .36s; }
.depth .fan.is-in .card--5 { transition-delay: .48s; }
.depth .fan.is-in .card:hover { transition: transform .25s; }
@keyframes arrive { from { transform: translateZ(-2400px); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes open { from { transform: scaleY(.02); opacity: 0; } 20% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 768px) {
  .lyr.only-sp { display: none; }
  .stage__view { --eye-y: 25.9vw; }
  .plate--tree { height: 36.1vw; }
  .plate--ring { height: 69.4vw; }
  .plate--yi { height: 50vw; }
  .plate--scales { height: 44.4vw; }
  .veil { top: 27.5vw; width: 72vw; height: 60vw; }
  .emblem { left: 35.4vw; top: 16.25vw; width: 29.2vw; }
  .emblem__in { gap: .9vw; }
  .emblem__word { font-size: 2.9vw; }
  .depth .stage__view { --eye-y: 40svh; }
  .depth .veil { width: 90vmin; height: 86vmin; }
  .depth .emblem { top: calc(var(--eye-y) - 9.69vw); }
  .scene { gap: 56px; background-image: url('/art/stars_pc.webp'); padding: 96px 16px 72px; }
  .fan { height: 360px; }
  .card { width: 196px; margin-left: -98px; }
  .card--2 { --cx: -176px; --cy: 14px; }
  .card--4 { --cx: 176px; --cy: 14px; }
  .card--1 { --cx: -340px; --cy: 52px; }
  .card--5 { --cx: 340px; --cy: 52px; }
}

/* Card flip between the top page and the drawn card. */
.flip { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.flip__shade { position: absolute; inset: 0; background: var(--deep); opacity: 0; transition: opacity .45s ease; }
.flip.is-go .flip__shade { opacity: 1; }
.flip__card { position: absolute; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); transition: transform .5s cubic-bezier(.45, 0, .7, .4); }
.flip__card > img { display: block; width: 100%; height: auto; }

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

/* Admin */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 16px; padding: 16px; background: var(--deep); border-bottom: 1px solid var(--line); }
.side nav { display: grid; gap: 4px; }
.side nav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.side nav a[aria-current] { background: var(--gold-soft); color: var(--gold-bright); border: 1px solid var(--line-gold); }
.side__group { margin-top: 12px; padding-left: 12px; font-size: 11px; color: var(--faint); }
.side__foot { margin-top: auto; display: grid; gap: 6px; font-size: 13px; }
.side__foot small { display: block; color: var(--faint); font-size: 11px; }
.adminMain { display: grid; align-content: start; gap: 20px; padding: 20px 16px 48px; min-width: 0; }
.adminHead { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.adminHead h1 { font: 600 20px var(--serif); letter-spacing: .08em; }
.adminCols { display: grid; gap: 20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tbl th { padding: 10px 12px; text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); background: var(--raised); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl__who { display: flex; align-items: center; gap: 10px; }
.tbl__who .portrait--thumb { width: 32px; height: 32px; }
.tbl__act { min-width: 120px; }
.tbl__act form { display: inline-block; margin-right: 6px; }
.account { font-size: 12px; color: var(--gold-bright); margin-bottom: 6px; }
.btnRow { display: flex; flex-wrap: wrap; gap: 10px; }
.btnRow .btn { width: auto; }
.progress { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.progress .is-now { color: var(--gold-bright); }
.prose { line-height: 2; }

@media (min-width: 768px) {
  body { font-size: 15px; }
  .h1 { font-size: 26px; }
  .hdr { height: 80px; padding: 0 32px; }
  .hdr--back { justify-content: center; background: none; border: 0; height: 80px; }
  .hdr--back .hdr__back, .hdr--back .hdr__title { display: none; }
  .hdr--back .hdr__mark { display: block; }
  .deskNav { display: flex; gap: 24px; position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); }
  .deskNav--l { left: 32px; }
  .deskNav--r { right: 32px; }
  .deskNav a[aria-current] { color: var(--gold-bright); }
  .tabs:not(.tabs--teller) { display: none; }
  .tabs--teller { position: fixed; top: 0; bottom: auto; left: 0; right: 0; border: 0; background: none; pointer-events: none; justify-content: end; grid-auto-columns: 96px; padding-right: 16px; }
  .tabs--teller a { pointer-events: auto; min-height: 80px; }
  .flow { grid-template-columns: minmax(0, 1fr) 340px; max-width: 1000px; gap: 32px; padding: 8px 32px 64px; align-items: start; }
  .flow__side { position: sticky; top: 24px; }
  .bar { position: static; padding: 0; background: none; border: 0; }
  .has-bar .ftr { padding-bottom: 36px; }
  .profile { grid-template-columns: 420px minmax(0, 1fr); gap: 40px; max-width: 1040px; margin: 0 auto; padding: 16px 32px 64px; }
  .profile + .bar { position: static; justify-content: flex-end; max-width: 1040px; margin: -48px auto 40px; padding: 0 32px; }
  .profile + .bar .btn { width: 320px; }
  .profile__figure { border: 1px solid var(--line); border-radius: 12px; padding: 16px; align-self: start; }
  .profile__title { position: static; margin-top: 12px; }
  .profile__main { padding: 0; }
  .tlist { grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
  .tcard { display: grid; justify-items: center; gap: 8px; border: 0; padding: 0; text-align: center; }
  .tcard__link { display: grid; justify-items: center; gap: 12px; }
  .tcard .portrait--card { width: 100%; height: auto; aspect-ratio: 5 / 6; border-radius: 999px 999px 8px 8px; }
  .tcard__text { justify-items: center; }
  .homeGrid { grid-template-columns: 1fr 1fr; align-items: start; }
  .twoCol { grid-template-columns: 1fr 1fr; align-items: start; gap: 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 240px)); }
  .stats--4 { grid-template-columns: repeat(4, 1fr); }
  .codes { grid-template-columns: 1fr 1fr; }
  .admin { grid-template-columns: 220px minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: 100dvh; border-bottom: 0; border-right: 1px solid var(--line); }
  .adminMain { padding: 28px 32px 64px; }
  .adminCols { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  .adminCols--edit { grid-template-columns: minmax(0, 1fr) 300px; }
  .adminCols--half { grid-template-columns: 1fr 1fr; }
}

/* Card drawn */
.drawn { display: grid; justify-items: center; gap: 8px; max-width: 420px; margin: 0 auto; padding: 16px 16px 48px; text-align: center; }
.drawnCard { display: grid; justify-items: center; align-content: center; gap: 10px; width: 220px; aspect-ratio: 360 / 590; margin-bottom: 12px; padding: 18px 16px; border: 1px solid var(--line-gold); border-radius: 12px; background: radial-gradient(120% 80% at 50% 20%, #1a1830, #0a0a10 70%); box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 5px #0a0a10, inset 0 0 0 6px rgba(219, 184, 112, .25); }
.drawnCard .portrait--card { width: 100%; }
.drawn__name { font: 600 26px/1.4 var(--serif); letter-spacing: .2em; }
.drawn__meta { font-size: 13px; }
.drawn .btn { margin-top: 20px; }
body.draw { background: url('/art/stars_sp.webp') center / cover fixed, var(--bg); min-height: 100dvh; }
@media (min-width: 768px) { body.draw { background-image: url('/art/stars_pc.webp'); } .drawnCard { width: 240px; } }
.flip-in .drawnCard { animation: flipIn .55s cubic-bezier(.25, .6, .3, 1) both; }
.flip-in .drawn > :not(.drawnCard), .flip-in .hdr { animation: fadeIn .5s .35s both; }
/* The page behind the card comes out of the same dark the top page faded to. */
.flip-in::after { content: ''; position: fixed; inset: 0; z-index: -1; background: var(--deep); pointer-events: none; animation: fadeOut .7s .15s both; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes flipIn { from { transform: perspective(1200px) rotateY(-90deg); } to { transform: perspective(1200px) rotateY(0deg); } }
