:root[data-theme="mono-dark"] {
  --theme-bg: #090909;
  --theme-panel: #151515;
  --theme-chrome: #101010;
  --theme-ink: #f5f5f5;
  --theme-muted: #c0c0c0;
  --theme-edge: #535353;
  --theme-accent: #ededed;
  --theme-wash: #272727;
  --theme-button: #ededed;
  --theme-button-ink: #111;
  --theme-orbit: #ffffff42;
}
:root[data-theme="gold-light"] {
  color-scheme: light;
  --theme-bg: #f6f2e6;
  --theme-panel: #fffdf6;
  --theme-chrome: #f1e9d5;
  --theme-ink: #221a11;
  --theme-muted: #5d5040;
  --theme-edge: #c4a872;
  --theme-accent: #795313;
  --theme-wash: #ead9af;
  --theme-button: #42311a;
  --theme-button-ink: #fff8e6;
  --theme-orbit: #80551855;
}
:root[data-theme="mono-light"] {
  color-scheme: light;
  --theme-bg: #f3f3f3;
  --theme-panel: #fff;
  --theme-chrome: #e9e9e9;
  --theme-ink: #161616;
  --theme-muted: #545454;
  --theme-edge: #a0a0a0;
  --theme-accent: #343434;
  --theme-wash: #dedede;
  --theme-button: #232323;
  --theme-button-ink: #fff;
  --theme-orbit: #18181842;
}

:root[data-theme]:not([data-theme="gold-dark"]) body {
  --bg: var(--theme-bg);
  --panel: var(--theme-panel);
  --ink: var(--theme-ink);
  --text: var(--theme-ink);
  --muted: var(--theme-muted);
  --edge: var(--theme-edge);
  --border: var(--theme-edge);
  --gold: var(--theme-accent);
}
:root[data-theme]:not([data-theme="gold-dark"]) :is(.site-header, .site-footer, .band, .rules div, .payment-split div, .navbar, .footer) {
  background: var(--theme-chrome);
  border-color: var(--edge);
}
:root[data-theme]:not([data-theme="gold-dark"]) :is(.hero-band, .community-band) {
  background: radial-gradient(ellipse at 75% 44%, var(--theme-wash), var(--bg) 74%);
}
:root[data-theme]:not([data-theme="gold-dark"]) .landing .panel {
  background: linear-gradient(145deg, var(--theme-chrome), var(--panel) 65%);
}
:root[data-theme]:not([data-theme="gold-dark"]) .landing .panel:hover { border-color: var(--gold); box-shadow: none; }
:root[data-theme]:not([data-theme="gold-dark"]) :is(.button, .nav-dl-btn),
:root[data-theme]:not([data-theme="gold-dark"]) .steps li::before {
  color: var(--theme-button-ink);
  background: var(--theme-button);
}
:root[data-theme]:not([data-theme="gold-dark"]) :is(.button, .nav-dl-btn):hover { opacity: .88; }
:root[data-theme]:not([data-theme="gold-dark"]) .phone-shell {
  border-color: var(--edge);
  box-shadow: 0 0 0 4px var(--panel), 0 18px 34px #0003;
}
:root[data-theme]:not([data-theme="gold-dark"]) .coin-stage::before { background: none; }
:root[data-theme]:not([data-theme="gold-dark"]) .wallet-coin-stage {
  background: radial-gradient(ellipse, var(--theme-wash), transparent 68%);
}
:root[data-theme]:not([data-theme="gold-dark"]) .coin-orbit { border-color: var(--theme-orbit); box-shadow: none; }
:root[data-theme^="mono-"] .coin-orbit-inner::before,
:root[data-theme^="mono-"] .coin-orbit-outer::after {
  background: var(--gold);
  box-shadow: 0 0 .8rem var(--theme-orbit);
}
:root[data-theme]:not([data-theme="gold-dark"]) :is(.policy-section p, .policy-section ul li) { color: var(--muted); }
:root[data-theme]:not([data-theme="gold-dark"]) .policy-page .grad { background: none; -webkit-text-fill-color: var(--gold); }
:root[data-theme]:not([data-theme="gold-dark"]) .policy-page .hero-badge { background: var(--panel); border-color: var(--edge); color: var(--gold); }

.theme-picker {
  position: fixed;
  z-index: 10;
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  color: var(--ink);
}
.theme-picker summary, .theme-options {
  border: 1px solid var(--edge);
  background: var(--panel);
  box-shadow: 0 .65rem 2rem #0003;
}
.theme-picker summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: max-content;
  min-height: 44px;
  margin-inline-start: auto;
  padding: .45rem .9rem;
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker[open] summary, .theme-picker summary:hover { border-color: var(--gold); }
.theme-icon {
  width: .9rem;
  aspect-ratio: 1;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--gold) 50%, transparent 50%);
}
.theme-options {
  position: absolute;
  right: 0;
  bottom: calc(100% + .55rem);
  width: min(15rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5.5rem);
  max-height: calc(100dvh - 5.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  padding: .4rem;
  border-radius: 1rem;
}
.theme-options button {
  display: grid;
  grid-template-columns: 1.15rem 1fr 1rem;
  align-items: center;
  width: 100%;
  gap: .6rem;
  min-height: 44px;
  padding: .45rem .6rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.theme-options button:hover, .theme-options button[aria-pressed="true"] { border-color: var(--edge); }
.theme-swatch {
  aspect-ratio: 1;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--swatch-base) 50%, var(--swatch-accent) 50%);
}
[data-choice="gold-dark"] { --swatch-base: #100d0a; --swatch-accent: #f3c777; }
[data-choice="mono-dark"] { --swatch-base: #090909; --swatch-accent: #ededed; }
[data-choice="gold-light"] { --swatch-base: #f6f2e6; --swatch-accent: #ae7d30; }
[data-choice="mono-light"] { --swatch-base: #f3f3f3; --swatch-accent: #232323; }
.theme-tick { visibility: hidden; color: var(--gold); font-weight: 800; }
[aria-pressed="true"] .theme-tick { visibility: visible; }
.landing .footer-bottom { padding-bottom: 4.75rem; }
@media (max-width: 23rem) {
  .theme-picker { inset-inline-end: max(.75rem, env(safe-area-inset-right)); }
  .theme-picker summary { gap: .4rem; padding-inline: .65rem; font-size: .9rem; }
}

::view-transition-old(root), ::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) { animation: reveal-theme .62s cubic-bezier(.22,.75,.25,1) both; }
@keyframes reveal-theme {
  from { clip-path: circle(0 at var(--theme-center)); }
  to { clip-path: circle(var(--theme-radius) at var(--theme-center)); }
}
