/* Unwrap: shared base (fonts, tokens, buttons, utilities) */
@font-face { font-family: 'Young Serif'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/young-serif-latin-400-normal.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: 'Young Serif'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/young-serif-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/onest-latin-wght-normal.woff2) format('woff2-variations'), url(../fonts/onest-latin-wght-normal.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: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/onest-latin-ext-wght-normal.woff2) format('woff2-variations'), url(../fonts/onest-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Azeret Mono'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/azeret-mono-latin-wght-normal.woff2) format('woff2-variations'), url(../fonts/azeret-mono-latin-wght-normal.woff2) format('woff2'); }

:root {
  --bg0: #140d1b; --bg1: #2b1b36; --glow: #3d5aa8;
  --ink: #fff8ef; --muted: rgba(255, 243, 230, 0.76);
  --gold: #ffcf5a; --gold-l: #ffe9a8; --gold-d: #b9820f; --on-gold: #2a1606;
  --paper: #fffaf1; --paper-ink: #2a1b12; --paper-muted: #76604c;
  --panel: rgba(24, 15, 31, 0.82);
  --display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Azeret Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg0); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.1; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255, 207, 90, 0.9); border-radius: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--body); font-weight: 700; font-size: 16px; letter-spacing: 0.005em; text-decoration: none; white-space: nowrap;
  background: rgba(255, 255, 255, 0.1); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22), 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22), 0 1px 0 rgba(0, 0, 0, 0.35); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-l) -40%, var(--gold) 55%); color: var(--on-gold);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 5px 0 var(--gold-d), 0 10px 24px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--gold-l) -20%, var(--gold) 60%); }
.btn-primary:active { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1), 0 1px 0 var(--gold-d); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); }
.btn-big { min-height: 58px; font-size: 19px; padding: 0 30px; }
.btn-small { min-height: 44px; font-size: 15px; padding: 0 16px; }
.btn-glow { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 5px 0 var(--gold-d), 0 0 0 7px rgba(255, 207, 90, 0.25), 0 10px 30px rgba(255, 207, 90, 0.35); } }

.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 64px); transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 14px; background: rgba(20, 12, 26, 0.92); color: var(--ink); font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
