/* Self-hosted Noto subsets. Latin tone marks (Yorùbá ọ̀, ẹ́, ṣ) live in the vietnamese and latin-ext files. */
@font-face { font-family: "Noto Sans"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-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: "Noto Sans"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-latin-700-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: "Noto Sans"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-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+0304,U+0308,U+0329,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: "Noto Sans"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Noto Sans"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Noto Sans Ethiopic"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-ethiopic-ethiopic-400-normal.woff2) format("woff2"); unicode-range: U+030E,U+1200-1399,U+2D80-2DDE,U+AB01-AB2E,U+1E7E0-1E7E6,U+1E7E8-1E7EB,U+1E7ED-1E7EE,U+1E7F0-1E7FE; }
@font-face { font-family: "Noto Sans Ethiopic"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-ethiopic-ethiopic-700-normal.woff2) format("woff2"); unicode-range: U+030E,U+1200-1399,U+2D80-2DDE,U+AB01-AB2E,U+1E7E0-1E7E6,U+1E7E8-1E7EB,U+1E7ED-1E7EE,U+1E7F0-1E7FE; }

:root {
  color-scheme: light dark;
  --bg: #fbf6ee;
  --text: #2b2118;
  --muted: #6b5d4f;
  --accent: #c2410c;
  --accent-text: #ffffff;
  --card: #ffffff;
  --line: #e4d8c6;
  --chip-bg: #fde68a;
  --chip-text: #4a3500;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1712;
    --text: #f4ece0;
    --muted: #b9ab98;
    --accent: #f97316;
    --accent-text: #1c1712;
    --card: #2a231b;
    --line: #473c30;
    --chip-bg: #6b4e00;
    --chip-text: #ffeaa8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", "Noto Sans Ethiopic", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
main { max-width: 36rem; margin: 0 auto; padding: 16px; }

.screen { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; padding-top: 24px; }
h1 { font-size: 1.5rem; line-height: 1.3; margin: 0; }
.screen > .icon { width: 96px; height: 96px; fill: var(--accent); }
.hint { color: var(--muted); margin: 0; }
.note {
  margin: 0; padding: 12px 16px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-style: italic;
}
.progress { margin: 0; font-weight: 700; color: var(--muted); }
.thumb { width: 100%; max-height: 40vh; object-fit: cover; border-radius: 12px; background: var(--card); }

.page-text { font-size: 28px; line-height: 1.6; margin: 0; width: 100%; text-align: left; overflow-wrap: anywhere; }
.name-chip {
  display: inline-block; padding: 0 10px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-text);
  font-size: 0.7em; font-weight: 700; line-height: 1.6; vertical-align: 0.1em;
}
.taken { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-weight: 700; }
.taken .icon { width: 24px; height: 24px; fill: currentColor; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: 999px;
  border: 2px solid var(--accent); background: transparent; color: var(--accent);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
button .icon, .button .icon { width: 28px; height: 28px; fill: currentColor; flex: none; }
.primary, .record { background: var(--accent); color: var(--accent-text); }
.big { min-height: 72px; padding: 0 40px; font-size: 1.25rem; }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.nav { justify-content: space-between; }
.status { margin: 0; min-height: 1.5em; color: var(--accent); font-weight: 700; }
.timer { margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

footer { max-width: 36rem; margin: 24px auto 0; padding: 16px; font-size: 0.8rem; color: var(--muted); text-align: center; }
footer a { color: inherit; }
.noscript { padding: 16px; text-align: center; }

/* Loading: fades in after a beat so fast loads don't flash it; hidden when scripts are off (the noscript note shows). */
.loading { padding-top: 64px; animation: appear 0.2s ease-out 0.4s both; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 5px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
@media (scripting: none) { .loading { display: none; } }
