/* Self-hosted fonts (SIL Open Font License): Inter, Playfair Display. Latin subset. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/playfair-display-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/playfair-display-italic-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0b1530;
  --navy-2: #13204a;
  --navy-3: #1c2c5e;
  --cream: #fbf6ea;
  --paper: #fffdf7;
  --ink: #141a33;
  --muted: #a8b0cc;
  --gold: #e9c55a;
  --gold-2: #c99a2e;
  --gold-grad: linear-gradient(135deg, #fff3b0 0%, #e9c55a 35%, #c99a2e 70%, #f6dc86 100%);
  --red: #c8102e;
  --red-2: #a50d26;
  --pink: #ff5c9a;
  --radius: 18px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: #f4f1e8;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(233, 197, 90, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(200, 16, 46, 0.12), transparent 60%),
    var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
canvas {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.08;
  margin: 0 0 0.4em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--gold);
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: 30px;
  text-decoration: none;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.logo.small {
  font-size: 26px;
  margin: 0 0 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font: 800 16px/1.1 var(--sans);
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  background: var(--navy-3);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible,
.chip:focus-within,
.compare-handle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-lg {
  padding: 16px 26px;
  font-size: 18px;
}
.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}
.btn-red {
  background: linear-gradient(180deg, #e0143a, var(--red-2));
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-gold {
  background: var(--gold-grad);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(233, 197, 90, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(233, 197, 90, 0.55);
  color: #fff;
}
.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
  padding: 6px;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(11, 21, 48, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 197, 90, 0.18);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav a:not(.btn) {
  color: #e9e4d6;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
@media (max-width: 640px) {
  .nav a:not(.btn) {
    display: none;
  }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 36px var(--gutter) 28px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding-top: 64px;
    padding-bottom: 48px;
  }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(42px, 8vw, 84px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero h1 .gold-text {
  font-style: italic;
  display: inline-block;
  padding-right: 0.08em;
}
.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  max-width: 36em;
  color: #e9e4d6;
  margin: 0 0 10px;
}
.lede.small {
  font-weight: 800;
  color: #fff;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}
.privacy {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.drop-hint {
  font-size: 13px;
  color: rgba(168, 176, 204, 0.7);
  margin: 4px 0 0;
}
@media (hover: none) {
  .drop-hint {
    display: none;
  }
}

/* Mascot */
.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mascot-frame {
  position: relative;
  width: min(360px, 78vw);
}
.mascot {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}
.mascot-tag {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  font: 800 13px var(--sans);
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.8);
  color: #fff;
  transition: background 0.4s;
}
.mascot-frame.after .mascot-tag {
  background: var(--gold);
  color: var(--navy);
}
.mascot-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}
.mascot * {
  transition: fill 0.7s ease, transform 0.7s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.6s ease, stroke 0.7s ease;
  transform-box: fill-box;
}
.mascot .skin {
  fill: #f1cdb0;
}
.mascot .shirt {
  fill: #1f2f63;
}
.mascot .hair {
  fill: #6b4a2b;
  transform-origin: 50% 70%;
}
.mascot .pillow {
  transform-origin: center;
  transform: scale(0.6);
}
.mascot .cheek {
  fill: #e88b8b;
  opacity: 0.35;
  transform-origin: center;
}
.mascot .contour {
  fill: none;
  stroke: #8a5a3c;
  stroke-width: 10;
  stroke-linecap: round;
  opacity: 0;
}
.mascot .brow path {
  fill: none;
  stroke: #5a3d26;
  stroke-width: 6;
  stroke-linecap: round;
}
.mascot .brow.l {
  transform-origin: 100% 50%;
}
.mascot .brow.r {
  transform-origin: 0% 50%;
}
.mascot .eye .lid {
  fill: #fff;
}
.mascot .eye circle {
  fill: #3e5a6e;
}
.mascot .eye .lash {
  fill: none;
  stroke: #111;
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0;
}
.mascot .eye .liner {
  fill: none;
  stroke: #111;
  stroke-width: 3;
  opacity: 0;
}
.mascot .eye.l {
  transform-origin: 100% 50%;
}
.mascot .eye.r {
  transform-origin: 0% 50%;
}
.mascot .nose path {
  fill: none;
  stroke: #b98366;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mascot .nose {
  transform-origin: 50% 80%;
}
.mascot .lips {
  transform-origin: 50% 40%;
}
.mascot .lip-u,
.mascot .lip-l {
  fill: #c9787a;
}
.mascot .gloss {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
}
.after .mascot .skin {
  fill: #f0a055;
}
.after .mascot .hair {
  fill: #f5df9c;
  transform: scale(1.12, 1.08);
}
.after .mascot .pillow {
  transform: scale(1.12);
}
.after .mascot .cheek {
  opacity: 0.75;
  transform: scale(1.5);
}
.after .mascot .contour {
  opacity: 0.18;
}
.after .mascot .brow.l {
  transform: translateY(-12px) rotate(10deg);
}
.after .mascot .brow.r {
  transform: translateY(-12px) rotate(-10deg);
}
.after .mascot .brow path {
  stroke: #3a2516;
  stroke-width: 7;
}
.after .mascot .eye .lash,
.after .mascot .eye .liner,
.after .mascot .gloss {
  opacity: 1;
}
.after .mascot .eye.l {
  transform: rotate(-7deg);
}
.after .mascot .eye.r {
  transform: rotate(7deg);
}
.after .mascot .nose {
  transform: scale(0.72, 0.9);
}
.after .mascot .lips {
  transform: scale(1.45, 1.9);
}
.after .mascot .lip-u,
.after .mascot .lip-l {
  fill: #e0508a;
}
@media (prefers-reduced-motion: reduce) {
  .mascot * {
    transition: none;
  }
}

/* Ticker / marquee */
.ticker {
  padding: 12px 0 28px;
  border-top: 1px solid rgba(233, 197, 90, 0.15);
  border-bottom: 1px solid rgba(233, 197, 90, 0.15);
  background: rgba(0, 0, 0, 0.18);
}
.ticker-title {
  font: 800 13px var(--sans);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  padding: 8px var(--gutter) 14px;
  margin: 0;
}
.marquee {
  display: grid;
  gap: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-row {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee var(--marquee-dur, 60s) linear infinite;
}
.marquee-row.reverse {
  animation-direction: reverse;
}
.marquee:hover .marquee-row {
  animation-play-state: paused;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-row {
    animation: none;
  }
  .marquee {
    overflow-x: auto;
  }
}
.tile {
  position: relative;
  flex: none;
  width: 128px;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--navy-2);
  box-shadow: 0 0 0 1px rgba(233, 197, 90, 0.25);
  cursor: pointer;
  padding: 0;
  border: 0;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  font: 700 12px/1.3 var(--sans);
  color: var(--muted);
  padding: 10px;
  cursor: default;
  background: repeating-linear-gradient(45deg, rgba(233, 197, 90, 0.06) 0 10px, transparent 10px 20px), var(--navy-2);
}
.tile.placeholder b {
  display: block;
  font-size: 28px;
  margin-bottom: 4px;
}

/* Editor */
.editor {
  display: grid;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  scroll-margin-top: 64px;
}
@media (min-width: 960px) {
  .editor {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    align-items: start;
  }
  .stage-wrap {
    position: sticky;
    top: 78px;
  }
}
.stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #070d1f;
  box-shadow: 0 0 0 2px rgba(233, 197, 90, 0.5), 0 30px 60px rgba(0, 0, 0, 0.45);
  min-height: 320px;
  display: grid;
  place-items: center;
}
.compare {
  position: relative;
  width: min(100%, calc(64vh * var(--ar, 0.8)));
  aspect-ratio: var(--ar, 0.8);
  margin: 0 auto;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 960px) {
  .compare {
    width: min(100%, calc(76vh * var(--ar, 0.8)));
  }
}
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.compare-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split, 50%));
  -webkit-clip-path: inset(0 0 0 var(--split, 50%));
}
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 44px;
  margin-left: -22px;
  cursor: ew-resize;
  touch-action: none;
  display: flex;
  justify-content: center;
}
.compare-handle::before {
  content: '';
  width: 4px;
  height: 100%;
  background: var(--gold-grad);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}
.compare-handle span {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.compare-handle span::before {
  content: '◀ ▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--navy);
  letter-spacing: 2px;
}
.compare-label {
  position: absolute;
  top: 12px;
  font: 800 12px var(--sans);
  letter-spacing: 1.5px;
  padding: 5px 10px;
  border-radius: 999px;
  pointer-events: none;
}
.compare-label.before {
  left: 12px;
  background: rgba(20, 20, 24, 0.75);
}
.compare-label.after {
  right: 12px;
  background: var(--gold);
  color: var(--navy);
}
.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(7, 13, 31, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.3s;
}
.spinner {
  font-size: 48px;
  animation: wobble 0.9s ease-in-out infinite alternate;
}
@keyframes wobble {
  from {
    transform: rotate(-25deg) scale(0.95);
  }
  to {
    transform: rotate(20deg) scale(1.08);
  }
}
.stage-overlay.error .spinner {
  animation: none;
}
.status {
  font: 700 18px/1.4 var(--sans);
  margin: 0;
  max-width: 26em;
}
.progress {
  width: min(280px, 70%);
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--gold-grad);
  transition: width 0.2s;
}
.stage-hint {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin: 10px 0 0;
}

.panel {
  display: grid;
  gap: 18px;
}
.plan {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 197, 90, 0.22);
  border-radius: var(--radius);
  padding: 20px;
}
.panel-title {
  font-size: 28px;
  font-style: italic;
  margin-bottom: 14px;
}
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-weight: 800;
}
.field-row output {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  color: var(--gold);
  font-size: 19px;
  text-align: right;
}
input[type='range'] {
  width: 100%;
  margin: 14px 0 4px;
  accent-color: var(--gold);
  height: 28px;
}
.scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.chips {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips legend {
  font-weight: 800;
  margin-bottom: 10px;
  padding: 0;
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.chip:has(input:checked) {
  background: rgba(233, 197, 90, 0.18);
  box-shadow: inset 0 0 0 1.5px var(--gold);
  color: #fff;
}
.chip.on {
  background: rgba(233, 197, 90, 0.18);
  box-shadow: inset 0 0 0 1.5px var(--gold);
}
.chip.unavailable {
  opacity: 0.5;
}
.look-row {
  align-items: center;
  margin: 0 0 16px;
}
.look-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16);
}
.look-switch button {
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  background: transparent;
  color: var(--muted);
  font: 800 14px var(--sans);
  cursor: pointer;
}
.look-switch button[aria-checked='true'] {
  background: var(--gold-grad);
  color: var(--navy);
}
.look-switch button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Receipt */
.receipt {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  padding: 20px 20px 26px;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: rotate(-0.6deg);
}
.receipt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background:
    linear-gradient(135deg, var(--paper) 6px, transparent 0) 0 0 / 12px 12px repeat-x,
    linear-gradient(225deg, var(--paper) 6px, transparent 0) 0 0 / 12px 12px repeat-x;
}
.receipt-head {
  text-align: center;
  border-bottom: 1px dashed #b9b2a0;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.receipt-head strong {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
}
.receipt-head span {
  font-size: 12px;
  color: #6b6553;
}
.receipt-who {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}
.receipt-who span {
  font-size: 12px;
  color: #6b6553;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.receipt-who select {
  font: 700 14px var(--mono);
  color: var(--ink);
  background: #f3ecd9;
  border: 1px solid #d9cfb5;
  border-radius: 6px;
  padding: 8px;
  width: 100%;
}
.receipt-lines {
  list-style: none;
  padding: 0;
  margin: 0;
}
.receipt-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
.receipt-lines li span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.receipt-lines li.empty {
  color: #8a8472;
  font-style: italic;
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  margin-top: 10px;
  padding-top: 8px;
  font-size: 18px;
  font-weight: 800;
}
.receipt-payer {
  margin: 8px 0 0;
  font-weight: 700;
}
.receipt-foot {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  color: #6b6553;
}

.actions {
  display: grid;
  gap: 10px;
}

/* Phones: keep Share / Post one thumb away while scrolling the treatment plan. */
.sticky-actions {
  display: none;
}
@media (max-width: 959px) {
  .sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 12px var(--gutter) max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(11, 21, 48, 0), rgba(11, 21, 48, 0.92) 30%);
  }
  .sticky-actions .btn {
    padding: 14px 12px;
    font-size: 16px;
  }
}
.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Menu / steps */
.menu,
.wall,
.faq {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--gutter);
}
.section-title {
  font-size: clamp(32px, 5vw, 52px);
  font-style: italic;
  font-weight: 900;
  margin-bottom: 6px;
}
.section-sub {
  color: var(--muted);
  margin: 0 0 26px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.steps li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 197, 90, 0.2);
  border-radius: var(--radius);
  padding: 22px;
}
.steps h3 {
  font-size: 22px;
  margin: 10px 0 6px;
}
.steps p {
  margin: 0;
  color: #d9d4c6;
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: var(--navy);
  font: 900 18px var(--serif);
}

/* Wall */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
@media (min-width: 700px) {
  .wall-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
.wall-card {
  display: block;
  padding: 0;
  border: 0;
  text-align: left;
  color: inherit;
  background: var(--navy-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(233, 197, 90, 0.25);
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.wall-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--gold), 0 12px 30px rgba(0, 0, 0, 0.4);
}
.wall-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #070d1f;
}
.wall-card span {
  display: block;
  padding: 10px 12px 12px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
}
.wall-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 30px 10px;
  border: 2px dashed rgba(233, 197, 90, 0.3);
  border-radius: var(--radius);
}
.wall-more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid rgba(233, 197, 90, 0.2);
  padding: 14px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
}
.faq details p {
  color: #d9d4c6;
  margin: 10px 0 0;
  max-width: 50em;
}

.footer {
  text-align: center;
  padding: 36px var(--gutter) max(36px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid rgba(233, 197, 90, 0.15);
}
.footer p {
  margin: 4px 0;
}
.muted {
  opacity: 0.7;
}

/* Dialogs */
.sheet {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 0;
  border-radius: 22px;
  padding: 22px;
  background: #0f1b3d;
  color: #f4f1e8;
  box-shadow: 0 0 0 1px rgba(233, 197, 90, 0.35), 0 40px 80px rgba(0, 0, 0, 0.6);
}
.sheet::backdrop {
  background: rgba(3, 6, 15, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet h2 {
  font-size: 26px;
  font-style: italic;
  padding-right: 36px;
}
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
}
.sheet-close button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.format-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 4px;
  margin: 4px 0 14px;
}
.format-toggle button {
  border: 0;
  background: none;
  color: #fff;
  font: 700 14px var(--sans);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.format-toggle button[aria-checked='true'] {
  background: var(--gold);
  color: var(--navy);
}
.card-preview {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 12px;
  background: #070d1f;
}
.card-preview.small {
  max-height: 36vh;
}
.card-wrap {
  position: relative;
}
.card-preview:not([src]) {
  aspect-ratio: 4 / 5;
}
.card-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font: 700 15px var(--sans);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.card-preview {
  transition: opacity 0.15s ease;
}
.rendering .card-preview {
  opacity: 0.35;
}
.rendering .card-wait {
  opacity: 1;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}
.share-actions .btn {
  flex: 1 1 auto;
}
.share-actions .share-send {
  flex-basis: 100%;
}
.card-preview.tappable {
  cursor: pointer;
}
/* Phones: keep the send button on screen under the preview. */
@media (max-width: 640px) {
  .sheet {
    padding: 16px;
  }
  .sheet h2 {
    font-size: 22px;
  }
  .format-toggle button {
    font-size: 13px;
    padding: 8px 10px;
  }
  #share-dialog .card-preview {
    max-height: 36vh;
    max-height: 36svh;
  }
  #share-dialog .share-actions {
    margin-top: 12px;
  }
}
.share-note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 12px;
}
.intents {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.intents a {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.intents a:hover {
  background: rgba(233, 197, 90, 0.2);
}
.post-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: none;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form-error {
  color: #ff9aa9;
  min-height: 1.2em;
  margin: 0;
  font-weight: 700;
}
.post-done {
  text-align: center;
  padding: 10px 0;
}
.big-emoji {
  font-size: 64px;
  margin: 0;
}
.lightbox img {
  width: 100%;
  border-radius: 12px;
}
.lightbox-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  margin: 12px 0;
}
.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.drop-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(11, 21, 48, 0.85);
  border: 4px dashed var(--gold);
  font: italic 900 clamp(28px, 5vw, 48px) var(--serif);
  color: var(--gold);
}
.drop-veil[hidden] {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  max-width: calc(100vw - 32px);
}
.toast[hidden] {
  display: none;
}

/* Shared post page (/p/:id) */
.share-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  text-align: center;
}
.share-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 2px rgba(233, 197, 90, 0.5), 0 30px 60px rgba(0, 0, 0, 0.45);
  margin: 10px 0 20px;
}
.share-cta {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

/* Admin */
.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px var(--gutter) 60px;
}
.admin-badge {
  font: 800 12px var(--sans);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}
.admin-login {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.admin-login input {
  font: 600 17px var(--sans);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(233, 197, 90, 0.5);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.admin-tabs [role='tab'] {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font: 800 14px var(--sans);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.admin-tabs [role='tab'][aria-selected='true'] {
  background: var(--gold);
  color: var(--navy);
}
.admin-tabs b {
  margin-left: 4px;
  opacity: 0.75;
}
.admin-help {
  color: var(--muted);
  font-size: 14px;
  max-width: 60em;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.admin-card {
  background: var(--navy-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(233, 197, 90, 0.25);
  display: flex;
  flex-direction: column;
}
.admin-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #070d1f;
}
.admin-meta {
  display: grid;
  gap: 2px;
  padding: 10px 12px 0;
  font-size: 13px;
}
.admin-meta strong {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
}
.admin-meta code {
  color: var(--muted);
  font-size: 12px;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px 12px;
}
.admin-empty {
  color: var(--muted);
}

/* Classic / AI mode switch */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 18px;
}
.mode-switch button {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16);
  color: #fff;
  font: 800 15px var(--sans);
  cursor: pointer;
}
.mode-switch button span {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}
.mode-switch button[aria-checked='true'] {
  background: rgba(233, 197, 90, 0.16);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.ai-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(233, 197, 90, 0.12), rgba(200, 16, 46, 0.08));
  box-shadow: inset 0 0 0 1px rgba(233, 197, 90, 0.35);
}
.ai-lede,
.ai-quota,
.ai-msg,
.ai-fund {
  margin: 0;
  font-size: 14px;
}
.ai-quota {
  color: var(--muted);
}
.ai-msg:empty {
  display: none;
}
.ai-msg {
  color: #ffd6dc;
  font-weight: 700;
}
.ai-consent {
  font-size: 14px;
}
.ai-fund.urgent {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(233, 197, 90, 0.18);
  font-weight: 700;
}

/* Why we made this */
.why,
.support {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--gutter);
}
.why-body {
  max-width: 44em;
  font-size: clamp(17px, 2.1vw, 20px);
  color: #e9e4d6;
}
.why-body p {
  margin: 0 0 14px;
}
.why-tag,
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  color: var(--gold);
}
.why-tag {
  font-size: clamp(22px, 3vw, 30px);
  margin-top: 8px !important;
}
.footer-tag {
  font-size: 18px;
}

/* Donations */
.donate-card {
  display: grid;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 197, 90, 0.22);
  max-width: 760px;
}
.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.donate-amounts .btn {
  min-width: 120px;
}
.crypto h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.crypto-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.crypto-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}
.crypto-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.crypto-sym {
  font: 800 11px var(--sans);
  letter-spacing: 1px;
  color: var(--gold);
}
.crypto-addr {
  font: 13px/1.4 var(--mono);
  color: #e9e4d6;
  word-break: break-all;
}
.crypto-actions {
  display: flex;
  gap: 8px;
}
.donate-fine {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.qr-sheet {
  width: min(380px, calc(100vw - 24px));
  text-align: center;
}
.qr {
  width: min(260px, 70vw);
  margin: 6px auto 12px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  color: var(--navy);
  min-height: 120px;
  display: grid;
  place-items: center;
}
.qr svg {
  width: 100%;
  height: auto;
  display: block;
}
.qr-address {
  font: 13px/1.4 var(--mono);
  word-break: break-all;
  color: #e9e4d6;
}
.qr-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.qr-note {
  font-size: 13px;
  color: var(--muted);
}

/* Photo before/after in the hero (shown once img/hero-*.jpg exist) */
.hero-photo {
  margin: 0;
  width: min(420px, 86vw);
}
.hero-tabs {
  display: flex;
  width: max-content;
  margin: 0 auto 12px;
}
.hero-compare {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(233, 197, 90, 0.7), 0 30px 60px rgba(0, 0, 0, 0.5);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split, 50%));
  -webkit-clip-path: inset(0 0 0 var(--split, 50%));
}
.hero-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 4px;
  margin-left: -2px;
  background: var(--gold-grad);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.hero-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.hero-photo .mascot-caption {
  text-align: center;
}
/* Phones: put the before/after right under the headline, cropped wider so the
   upload buttons still make the first screen. */
@media (max-width: 899px) {
  .hero:has(.hero-photo:not([hidden])) {
    row-gap: 0;
  }
  .hero:has(.hero-photo:not([hidden])) .hero-copy {
    display: contents;
  }
  .hero:has(.hero-photo:not([hidden])) .hero-art {
    order: 1;
  }
  .hero:has(.hero-photo:not([hidden])) :is(.cta-row, .privacy, .drop-hint) {
    order: 2;
  }
  .hero:has(.hero-photo:not([hidden])) .lede {
    order: 3;
  }
  .hero:has(.hero-photo:not([hidden])) .lede:not(.small) {
    margin-top: 22px;
  }
  .hero-photo .hero-compare {
    aspect-ratio: 5 / 4;
  }
  .hero-photo .hero-img {
    object-position: 50% 36%;
  }
  .hero-photo .mascot-caption {
    margin-top: 8px;
  }
}

/* Admin: Traffic dashboard. Chart colors validated for this surface (dataviz
   palette check): gold for visitors, blue for visits. */
.traffic {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}
.traffic-range {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.traffic-range button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  color: #d9dcea;
  font: 700 13px var(--sans);
  cursor: pointer;
}
.traffic-range button[aria-checked='true'] {
  background: var(--gold-grad);
  color: var(--navy);
  box-shadow: none;
}
.traffic-body {
  display: grid;
  gap: 14px;
  transition: opacity 0.2s ease;
  --viz-1: #b8862a;
  --viz-2: #3987e5;
}
.traffic-body.loading {
  opacity: 0.55;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.stat-tile,
.viz-card {
  margin: 0;
  background: var(--navy-2);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.stat-tile {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}
.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.stat-value {
  font: 700 30px var(--sans);
  color: #fff;
  overflow-wrap: break-word;
}
.stat-value.is-text {
  font-size: 21px;
  line-height: 1.25;
  padding: 5px 0 4px;
}
.stat-note {
  font-size: 12px;
  color: var(--muted);
}
.viz-card {
  padding: 16px;
  min-width: 0;
}
.viz-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
}
.viz-legend {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: #d9dcea;
}
.viz-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.viz-key,
.viz-tip-key {
  display: inline-block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
}
.viz-plot {
  position: relative;
}
.viz-svg {
  display: block;
  overflow: visible;
}
.viz-grid {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}
.viz-axis {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.viz-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.viz-line.is-partial {
  stroke-dasharray: 3 5;
}
.viz-dot {
  stroke: var(--navy-2);
  stroke-width: 2;
}
.viz-end {
  fill: #e9ecf5;
  font-size: 12px;
  font-weight: 700;
}
.viz-cross {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
}
.viz-hit {
  cursor: crosshair;
  outline: none;
}
.viz-hit:focus-visible {
  stroke: var(--gold);
  stroke-width: 2;
}
.viz-tip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 130px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  pointer-events: none;
}
.viz-tip-title {
  font-size: 12px;
  color: var(--muted);
}
.viz-tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.viz-tip-row b {
  color: #fff;
}
.viz-tip-row span {
  color: var(--muted);
}
.viz-table summary {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.viz-table table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.viz-table th,
.viz-table td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.viz-table th:first-child,
.viz-table td:first-child {
  text-align: left;
}
.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.viz-title {
  margin: 0 0 10px;
  font-size: 15px;
}
.rank-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rank-list li {
  display: grid;
  grid-template-columns: minmax(0, 10em) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e9ecf5;
}
.rank-bar {
  display: block;
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: var(--viz-1);
}
.rank-list .is-other .rank-name {
  color: var(--muted);
}
.rank-list .is-other .rank-bar {
  background: rgba(255, 255, 255, 0.22);
}
.rank-value {
  color: #e9ecf5;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.viz-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
