@font-face {
  font-family: "Cormorant Garamond Fallback";
  src: local("Georgia");
  size-adjust: 112%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-VariableFont_wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-VariableFont_wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* LM-DERIVED-START
   Living Marble app tokens. Edition colours come from themes/private-ledger.css.
   Hex in this block is a mix of those tokens, not a second copy of an edition.
   Rose Lake water and air, Iron Gall air, and Vellum Bound air are a
   darker step of the same hue so each element colour is at least 4.5:1
   on its panel. Vellum Bound's screen accent and the Sealing Wax
   white-on-fill button are screen-only; the print gold is unchanged. */
:root {
  --gold: var(--accent);
  --raise: var(--panel);
  --font-display: "Cormorant Garamond", "Cormorant Garamond Fallback", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--font-display);
  --sans: var(--font-body);

  --lockup-title-size: clamp(1.35rem, 1.05rem + 1.6vw, 2.1rem);
  --lockup-title-weight: var(--title-weight);
  --lockup-title-tracking: 0.18em;
  --lockup-subtext-size: calc(var(--lockup-title-size) * 0.5);
  --lockup-subtext-weight: var(--subtext-weight);
  --lockup-rule: var(--brass);
  --lockup-order: 1;

  --step--1: 0.84rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;

  --panel-alpha: 0.94;
  --radius-1: 10px;
  --radius-2: 16px;
  --radius-pill: 999px;
  --hairline: 1px solid var(--line);

  --dur-press: 120ms;
  --dur-state: 240ms;
  --dur-panel: 450ms;
  --dur-ceremony: 900ms;
  --dur-bloom: 1600ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-ink: cubic-bezier(.3, 0, .1, 1);
  --spring-k: 170;
  --spring-c: 18;

  --el-water: #8EA4B0;
  --el-fire: #C4846A;
  --el-air: #C5C1B8;
  --el-earth: #8F9779;
  --water: var(--el-water);
  --fire: var(--el-fire);
  --air: var(--el-air);
  --earth: var(--el-earth);

  --card-back-image: none;
  --card-face-image: none;
}

[data-edition="rose-lake"] {
  color-scheme: light;
  --panel-rgb: 250 236 230;
  --line: #DDC7C4;
  --line-strong: #9A7275;
  --on-accent: #F4E2DA;
  --gold-ink: #F4E2DA;
  --el-water: #766873;
  --el-fire: #94574D;
  --el-air: #816665;
  --el-earth: #776155;
}

[data-edition="iron-gall"] {
  color-scheme: light;
  --panel-rgb: 240 238 233;
  --line: #C9C7C3;
  --line-strong: #6D6C6A;
  --on-accent: #E8E6E0;
  --gold-ink: #E8E6E0;
  --el-water: #58646B;
  --el-fire: #765344;
  --el-air: #6E6C67;
  --el-earth: #595D4C;
}

[data-edition="vellum-bound"] {
  color-scheme: light;
  --panel-rgb: 248 241 224;
  --line: #D3CBBB;
  --line-strong: #7B7264;
  --accent: #7D6339;
  --on-accent: #F3EAD6;
  --gold-ink: #F3EAD6;
  --el-water: #606869;
  --el-fire: #7E5642;
  --el-air: #726D64;
  --el-earth: #61614B;
}

[data-edition="sealing-wax"] {
  color-scheme: dark;
  --panel-rgb: 44 22 26;
  --line: #503C3D;
  --line-strong: #867470;
  --on-accent: #241014;
  --gold-ink: #241014;
  --panel-alpha: 0.88;
  --button-fill: #91713A;
  --button-ink: #FFFFFF;
}

[data-edition="sealing-wax"] button.primary {
  background: var(--button-fill);
  color: var(--button-ink);
}

:root {
  --tint-water: #2B3A46;
  --tint-fire: #4A1C14;
  --tint-air: #3A3936;
  --tint-earth: #2E2A1C;
  --tint-strength: 0.38;
}

[data-edition]:not([data-edition="sealing-wax"]) { --tint-strength: 0.22; }

.panel { background: rgb(var(--panel-rgb) / var(--panel-alpha)); }

@supports not (background: rgb(0 0 0 / 0.5)) {
  .panel { background: var(--panel); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-panel: 1ms; --dur-ceremony: 150ms; --dur-bloom: 150ms; }
}

html[data-motion="calm"] {
  --dur-panel: 1ms;
  --dur-ceremony: 150ms;
  --dur-bloom: 150ms;
}
/* LM-DERIVED-END */

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}

#field {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("img/marble-sealing-wax-720.webp") center / cover no-repeat;
}

[data-edition="rose-lake"] #field { background-image: url("img/marble-rose-lake-720.webp"); }
[data-edition="iron-gall"] #field { background-image: url("img/marble-iron-gall-720.webp"); }
[data-edition="vellum-bound"] #field { background-image: url("img/marble-vellum-bound-720.webp"); }
[data-edition="sealing-wax"] #field { background-image: url("img/marble-sealing-wax-720.webp"); }

#field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--field-tint, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms;
}

html[data-motion="calm"] #field::after { transition-duration: 150ms; }

.shell,
.card,
.banner,
.confirm,
.checklist {
  background: rgb(var(--panel-rgb) / var(--panel-alpha));
}

@supports not (background: rgb(0 0 0 / 0.5)) {
  .shell,
  .card,
  .banner,
  .confirm,
  .checklist { background: var(--panel); }
}

button, input, select { font: inherit; color: inherit; }

button, select { min-height: 44px; }

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-edition="vellum-bound"] :focus-visible {
  outline-color: var(--ink);
}

.shell {
  width: min(34rem, 100%);
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.1rem 1.15rem calc(1.4rem + env(safe-area-inset-bottom));
}

body.has-nav .shell {
  padding-bottom: calc(5.2rem + env(safe-area-inset-bottom));
}

body.has-pass .shell {
  padding-bottom: calc(9.5rem + env(safe-area-inset-bottom));
}

body.has-dev .debug-wrap {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.shell.gate.gate-adult { background: transparent; }

.gate {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.25rem;
  padding-block: max(1.5rem, 5vh) max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  min-width: 0;
  max-width: 100%;
}

.gate > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gate-plate {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.85rem;
  width: min(16rem, 100%);
  aspect-ratio: 1;
  padding: 1.25rem;
  border-radius: 50%;
  background: var(--disc);
}

.seal {
  width: 96px;
  height: 96px;
  display: block;
  object-fit: contain;
}

.gate-copy {
  width: 100%;
  padding: 1.1rem 1.15rem 0.4rem;
  border-radius: var(--radius-2);
}

.lockup {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  margin: 0;
}

.lockup[data-order="app"] .lockup-sub { order: -1; }

.lockup[data-size="s"] { --lockup-title-size: 1rem; }

.lockup-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: var(--lockup-title-tracking);
  font: var(--lockup-title-weight) var(--lockup-title-size) / 1.1 var(--font-display);
}

.lockup-sub {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--lockup-subtext-weight);
  font-size: var(--lockup-subtext-size);
  letter-spacing: 0;
  color: var(--muted);
}

.lockup-rule {
  width: 88px;
  height: 1px;
  background: var(--lockup-rule);
}

.preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.preview li {
  min-width: 0;
  max-width: 100%;
  min-height: 4.6rem;
  display: flex;
  align-items: flex-end;
  padding: 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.gate-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
}

.gate-actions .primary,
.gate-actions .texty {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.gate-actions .primary { width: 100%; }

.gate-actions .texty { align-self: center; }

.eyebrow {
  margin: 0;
  max-width: 100%;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

h1, h2, .rank, .teaser, .suggestion, .recognition, .banner strong {
  font-family: var(--serif);
  font-weight: 500;
}

h1 { margin: 0.15rem 0 0; font-size: 2rem; line-height: 1.15; }

h2 { margin: 0.2rem 0 0.35rem; font-size: 1.55rem; line-height: 1.2; }

.who, .lead, .caption, .meta, .hint, .label, .area-sub, .reassure {
  color: var(--muted);
}

.lead { font-size: 1.02rem; }

.who { margin: 0.2rem 0 0; }

.mast {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.mast-actions { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }

.stack { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; }

.stack > .primary, .stack > .quiet { width: 100%; }

.join { margin-top: 2rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; color: var(--muted); font-size: 0.92rem; }

input, select {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  width: 100%;
}

button.primary, button.quiet, button.texty {
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  min-height: 48px;
}

.actions button, .card > .primary { white-space: nowrap; }

button.primary {
  background: var(--gold);
  color: var(--gold-ink);
  border: 0;
  font-weight: 650;
}

button.quiet {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

button.quiet.on { border-color: var(--gold); color: var(--gold); }

button.slim { min-height: 44px; padding: 0.45rem 0.9rem; }

button.danger {
  background: transparent;
  color: var(--ink);
  border: 2px dashed currentColor;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  min-height: 48px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

button.danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin-top: 1.5rem; }

.toggle { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }

.ping-ask,
.delete-account {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.ping-ask { background: color-mix(in srgb, var(--bg) 72%, transparent); }

.delete-account { background: color-mix(in srgb, var(--bg) 28%, transparent); }

.ping-card,
.delete-card {
  width: min(28rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg);
}

.delete-card .hint { color: var(--muted); }

button.texty {
  background: none;
  border: 0;
  color: var(--muted);
  padding-left: 0;
  padding-right: 0;
  min-height: 44px;
}

button:disabled { opacity: 0.45; cursor: default; }

.error { color: var(--ink); }

.code {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 1.7rem;
  letter-spacing: 0.22em;
  margin: 0.4rem 0;
}

.rel { padding: 0.4rem 0 1.2rem; }

.tally { margin: 0.6rem 0 1rem; }

.install-help {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.install-help ol { margin: 0.6rem 0 0; padding-left: 1.2rem; }

.install-help li {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 0.35rem 0;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.install-actions button,
.install-link {
  white-space: normal;
  min-height: 44px;
}

.install-link {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: underline;
}

.rel + .rel { border-top: 1px solid var(--line); padding-top: 1.2rem; }

.banner {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  margin: 0.6rem 0 1rem;
}

.banner strong { display: block; font-size: 1.35rem; margin-bottom: 0.25rem; }

.banner p { margin: 0 0 0.8rem; }

.banner p:last-child { margin-bottom: 0; }

.areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 0.4rem;
  margin: 0.8rem 0 0.4rem;
}

.area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ring-wrap { position: relative; width: 7.4rem; height: 7.4rem; }

.ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-label {
  position: absolute;
  inset: 22%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.area-name { font-size: 0.92rem; }

.area-sub { font-size: 0.75rem; color: var(--muted); }

.ring-track, .ring-fill { fill: none; stroke-width: 2.6; }

.ring-track { stroke: var(--line-strong); }

.ring-fill {
  stroke: var(--swatch);
  stroke-linecap: round;
  stroke-dasharray: 97.39;
  stroke-dashoffset: var(--ring-gap);
}

.area[data-tone="quiet"] { --fill: 12%; --ring-gap: 85.7; }
.area[data-tone="stirring"] { --fill: 34%; --ring-gap: 64.28; }
.area[data-tone="in motion"] { --fill: 56%; --ring-gap: 42.85; }
.area[data-tone="tended"] { --fill: 78%; --ring-gap: 21.43; }
.area[data-tone="steady"] { --fill: 100%; --ring-gap: 0; }
.area[data-area="emotional"] { --swatch: var(--water); }
.area[data-area="passionate"] { --swatch: var(--fire); }
.area[data-area="mental"] { --swatch: var(--air); }
.area[data-area="physical"] { --swatch: var(--earth); }

.tone {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.caption, .nudge, .paused-note { font-size: 0.95rem; }

.nudge { color: var(--gold); }

.card {
  background: var(--raise);
  border-radius: 18px;
  padding: 1.1rem 1.05rem 1.15rem;
  margin: 0 0 0.9rem;
}

.card[data-role="actor"],
.card[data-role="both"],
.next-up { box-shadow: inset 0 2px 0 var(--gold); }

.card[data-role="recipient"] { box-shadow: inset 0 2px 0 var(--line); }

.with, .label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label { margin-top: 1rem; }

.rank { margin: 0.35rem 0 0; color: var(--gold); font-size: 1rem; }

.meta, .hint, .checkin, .reassure { margin: 0.25rem 0; }

.suggestion, .teaser, .recognition {
  font-size: 1.22rem;
  line-height: 1.4;
}

.teaser { margin-top: 0.4rem; }

.recognition { margin-top: 0.2rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.actions .primary, .actions .quiet { flex: 1 1 9rem; }

.card .primary { margin-top: 1rem; width: 100%; }

.suits, .ranks { display: grid; gap: 0.45rem; margin-top: 0.7rem; }

.suits { grid-template-columns: 1fr 1fr; }

.ranks { grid-template-columns: repeat(5, 1fr); }

.suits button, .ranks button {
  min-height: 52px;
  padding: 0.4rem 0.25rem;
  border-radius: 12px;
  line-height: 1.15;
}

.suits .pip { display: block; font-size: 1.35rem; line-height: 1; }

.actions .primary { margin-top: 0; width: auto; }

details { margin-top: 0.9rem; }

summary { cursor: pointer; color: var(--muted); }

.confirm {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-radius: 16px;
  padding: 0.95rem 1rem 1rem;
  margin-top: 0.4rem;
}

.confirm p { margin: 0; }

.stepper { margin: 1rem 0; }

.stepper button { min-width: 56px; min-height: 56px; }

.stepper-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.4rem; }

.count {
  min-width: 2ch;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.checklist {
  background: var(--raise);
  border-radius: 16px;
  padding: 0.2rem 1rem 0.4rem;
  margin: 0 0 1.2rem;
}

.checklist ol { margin: 0.2rem 0 0; padding-left: 1.2rem; }

.checklist li { margin: 0.85rem 0; }

.checklist li.done { color: var(--gold); }

.checklist .stack { margin: 0.35rem 0 0.6rem; }

.people, .pairs { list-style: none; padding: 0; margin: 0.4rem 0 1rem; }

.people li, .pairs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(var(--panel-rgb));
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-inner { display: flex; width: min(34rem, 100%); margin: 0 auto; }

nav button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  background: none;
  border: 0;
  min-height: 52px;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.1;
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-dot {
  position: absolute;
  top: 0.4rem;
  right: calc(50% - 1.05rem);
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--gold);
}

nav button.on { color: var(--gold); }

.passbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(52px + env(safe-area-inset-bottom));
  background: rgb(var(--panel-rgb));
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.8rem;
}

.pass-open {
  display: block;
  width: min(34rem, 100%);
  margin: 0 auto;
  min-height: 44px;
}

.pass-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  max-height: calc(100dvh - 52px - env(safe-area-inset-bottom) - 5rem);
  overflow-y: auto;
  background: rgb(var(--panel-rgb));
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.8rem 0.15rem;
}

.pass-name {
  display: block;
  width: min(34rem, 100%);
  margin: 0 auto 0.45rem;
  min-height: 48px;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem;
}

.debug {
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 0.82rem;
  background: #161310;
  border-radius: 12px;
  padding: 0.8rem;
}

.debug-wrap { margin: 1.2rem 0 0.4rem; }

p { overflow-wrap: break-word; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.draw-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4rem 0 0.2rem;
}

.tended {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(10, 8, 6, 0.94);
  color: var(--ivory);
}

.tended button.quiet { color: var(--ivory); }

.tend-ring { width: 7.5rem; height: 7.5rem; transform: rotate(-90deg); }

.tended .actions { width: min(20rem, 100%); }

.tend-track, .tend-fill { fill: none; stroke-width: 2.4; }

.tend-track { stroke: var(--line-strong, var(--line)); }

.tend-fill {
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  animation: tend-fill 700ms ease forwards;
}

@keyframes tend-fill { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tend-fill { animation: none; stroke-dashoffset: 0; }
}

.dev-ribbon {
  position: fixed;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 40;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #1b1714;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(5.6rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  width: max-content;
  max-width: calc(100% - 2rem);
}

.update-toast:empty { display: none; }

.update-toast button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-height: 639px) {
  .seal { display: none; }
  .gate { padding-block: 1rem; }
}

@media (min-width: 720px) {
  .shell { padding-top: 2rem; }
}

@media (min-width: 900px) {
  .shell.gate.gate-adult { width: min(64rem, 100% - 4rem); }

  .gate.gate-adult {
    grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
    column-gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    justify-items: stretch;
    text-align: left;
  }

  .gate-adult .gate-plate {
    width: 100%;
    aspect-ratio: 2.5 / 3.5;
    border-radius: 1.1rem;
    background: var(--disc);
    box-shadow:
      inset 0 0 0 1px var(--frame),
      inset 0 0 0 5px transparent,
      inset 0 0 0 6px var(--frame);
  }

  .gate-adult .gate-actions { align-items: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .lockup { animation: lockup-ink 700ms var(--ease-ink) both; }

  .gate-copy .preview li,
  .gate-actions .primary,
  .gate-actions .texty {
    animation: gate-rise 240ms var(--ease-out) both;
  }

  .gate-copy .preview li:nth-child(2) { animation-delay: 60ms; }
  .gate-copy .preview li:nth-child(3) { animation-delay: 120ms; }
  .gate-actions .primary { animation-delay: 180ms; }
  .gate-actions .texty { animation-delay: 240ms; }
}

@keyframes lockup-ink {
  from { filter: blur(6px); opacity: 0; }
  to { filter: none; opacity: 1; }
}

@keyframes gate-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lockup,
  .gate-copy .preview li,
  .gate-actions .primary,
  .gate-actions .texty { animation: none; }
}

html[data-motion="calm"] .lockup,
html[data-motion="calm"] .gate-copy .preview li,
html[data-motion="calm"] .gate-actions .primary,
html[data-motion="calm"] .gate-actions .texty { animation: none; }

.reveal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 1.2rem;
  background: rgba(10, 8, 6, 0.92);
}

.reveal-scene { perspective: 1000px; }

.reveal-card {
  width: min(16rem, 78vw);
  height: 24rem;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 450ms ease;
}

.reveal-card.is-flipped { transform: rotateY(180deg); }

.reveal-side {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid var(--gold);
  backface-visibility: hidden;
}

.reveal-back {
  background: var(--raise) var(--card-back-image) center / cover no-repeat;
}

.reveal-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.2rem;
  text-align: center;
  background: var(--bg) var(--card-face-image) center / cover no-repeat;
  transform: rotateY(180deg);
}

.reveal-rank, .reveal-pip { margin: 0; color: var(--gold); }

.reveal-pip { font-size: 2.4rem; line-height: 1; }

.reveal .primary { min-width: 12rem; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 1.25rem;
}

.legal-links a,
.legal-page a {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.legal-page {
  overflow-wrap: anywhere;
}

.legal-page .shell { padding-bottom: 2.5rem; }

.legal-page h1 { margin-bottom: 0.35rem; }

.legal-page h2 { margin-top: 1.6rem; }

@media (prefers-reduced-motion: reduce) {
  .reveal-card,
  .reveal-card.is-flipped { transform: none; transition: none; }
  .reveal-back,
  .reveal-front { transition: opacity 150ms linear; }
  .reveal-front { transform: none; opacity: 0; }
  .reveal-card.is-flipped .reveal-back { opacity: 0; }
  .reveal-card.is-flipped .reveal-front { opacity: 1; }
}

