@layer reset, tokens, base, controls, utility;
@layer reset {
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
  max-width: 100%;
}
canvas {
  display: block;
}
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
}
@layer tokens {
:root {
  --font-body: "Corporate A BQ", "Corporate A", Georgia, "Times New Roman", serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --text-xs: .74rem;
  --text-sm: .88rem;
  --text-base: clamp(1rem, .97rem + .16vw, 1.08rem);
  --text-reader: clamp(1.04rem, 1rem + .26vw, 1.2rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --reader-scale: 1;
  --reader-width: 76ch;
  --radius: 18px;
  --radius-sm: 11px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mx: 0px;
  --my: 0px;
}
:root[data-theme="dark"] {
  --bg: #05060a;
  --bg-2: #10111a;
  --chrome: rgba(5, 6, 10, .76);
  --glass: rgba(18, 18, 26, .76);
  --control: rgba(28, 28, 38, .82);
  --control-strong: rgba(36, 35, 46, .93);
  --panel: rgba(18, 18, 26, .82);
  --panel-2: rgba(33, 32, 43, .94);
  --panel-3: rgba(42, 39, 50, .96);
  --paper: rgba(14, 14, 20, .97);
  --panel-deep: rgba(5, 6, 10, .78);
  --panel-sheen: rgba(255, 245, 218, .055);
  --panel-sheen-strong: rgba(255, 245, 218, .09);
  --ink: #f5efe4;
  --muted: rgba(245, 239, 228, .68);
  --faint: rgba(245, 239, 228, .42);
  --line: rgba(235, 220, 190, .12);
  --line-strong: rgba(245, 229, 196, .27);
  --edge-light: rgba(255, 255, 255, .07);
  --gold: #e8c478;
  --blue: #9fb9ff;
  --rose: #eab3b7;
  --signal: #e8c478;
  --signal-2: #c8d4ff;
  --violet: #bfa9ee;
  --aura: rgba(199, 170, 122, .16);
  --aura-2: rgba(128, 154, 225, .11);
  --gold-line: rgba(232, 196, 120, .38);
  --gold-glow: rgba(232, 196, 120, .18);
  --gold-haze: rgba(232, 196, 120, .12);
  --gold-haze-strong: rgba(232, 196, 120, .18);
  --blue-haze: rgba(138, 165, 236, .12);
  --shadow: 0 34px 110px rgba(0, 0, 0, .48);
  --grid: rgba(232, 196, 120, .045);
  --grid-soft: rgba(245, 239, 228, .026);
}
:root[data-theme="light"] {
  --bg: #f6efe4;
  --bg-2: #e7dccb;
  --chrome: rgba(246, 239, 228, .76);
  --glass: rgba(255, 252, 246, .78);
  --control: rgba(255, 251, 242, .84);
  --control-strong: rgba(255, 252, 246, .96);
  --panel: rgba(255, 252, 246, .86);
  --panel-2: rgba(250, 241, 225, .96);
  --panel-3: rgba(242, 229, 207, .98);
  --paper: rgba(255, 253, 248, .98);
  --panel-deep: rgba(240, 229, 211, .78);
  --panel-sheen: rgba(122, 83, 30, .045);
  --panel-sheen-strong: rgba(122, 83, 30, .08);
  --ink: #1f1912;
  --muted: rgba(31, 25, 18, .68);
  --faint: rgba(31, 25, 18, .42);
  --line: rgba(87, 64, 35, .15);
  --line-strong: rgba(87, 64, 35, .3);
  --edge-light: rgba(255, 255, 255, .7);
  --gold: #8a6224;
  --blue: #405f9f;
  --rose: #9e686a;
  --signal: #8a6224;
  --signal-2: #405f9f;
  --violet: #705890;
  --aura: rgba(138, 98, 36, .13);
  --aura-2: rgba(64, 95, 159, .09);
  --gold-line: rgba(138, 98, 36, .38);
  --gold-glow: rgba(138, 98, 36, .16);
  --gold-haze: rgba(138, 98, 36, .12);
  --gold-haze-strong: rgba(138, 98, 36, .17);
  --blue-haze: rgba(64, 95, 159, .1);
  --shadow: 0 24px 70px rgba(70, 51, 24, .16);
  --grid: rgba(138, 98, 36, .055);
  --grid-soft: rgba(31, 25, 18, .038);
}
}
@layer base {
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 18% 16%, var(--aura-2), transparent 25rem),
    radial-gradient(circle at 88% 7%, var(--aura), transparent 31rem),
    radial-gradient(circle at 56% 82%, var(--gold-haze), transparent 34rem),
    linear-gradient(135deg, var(--bg), var(--bg-2) 58%, var(--bg));
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(var(--grid-soft) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid-soft) 1px, transparent 1px) 0 0 / 24px 24px;
  mask-image: radial-gradient(ellipse 120% 85% at 50% 18%, black 0 45%, transparent 86%);
}
}
@layer controls {
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in oklab, var(--panel) 82%, transparent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.text-button {
  padding: 0 .9rem;
}
.icon-button {
  width: 40px;
  padding: 0;
}
.text-button:hover,
.icon-button:hover,
.text-button.active,
.icon-button.active {
  color: var(--ink);
  border-color: color-mix(in oklab, var(--signal) 42%, var(--line-strong));
  background: var(--panel-2);
  transform: translateY(-1px);
  box-shadow: 0 0 34px color-mix(in oklab, var(--signal) 10%, transparent);
}
.text-button.primary,
.icon-button.primary {
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold), color-mix(in oklab, var(--gold) 78%, white));
  border-color: var(--gold);
}
.icon-button svg,
.text-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
}
@layer utility {
.notice {
  grid-column: 1 / -1;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.notice h2 {
  margin: 0 0 .65rem;
  color: var(--ink);
  font-size: clamp(1.2rem, 1.05rem + .6vw, 1.65rem);
  font-weight: 400;
}
.notice p {
  max-width: 72ch;
  margin: .55rem 0 0;
  color: var(--muted);
}
.notice code {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: .86em;
  word-break: break-all;
}
[hidden] {
  display: none !important;
}
}
