:root {
  --bg: #FAF7F1; --surface: #FFFFFF; --text: #13362C; --muted: #4A5E55; --accent: #0F5C4A; --on-accent: #FAF7F1;
  --gold: #94701F; --border: #E2E4DC; --tint: #E7F0EB;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B2A22; --surface: #12392E; --text: #FAF7F1; --muted: #C5D3CB; --accent: #D6B36A; --on-accent: #0B2A22; --gold: #D6B36A; --border: #2E5446; --tint: #1A4A3C; }
}
@media (prefers-contrast: more) {
  :root { --text: #000000; --muted: #1F1F1F; --accent: #000000; --on-accent: #FFFFFF; --border: #000000; --tint: #FFFFFF; --bg: #FFFFFF; --surface: #FFFFFF; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --text: #FFFFFF; --muted: #E6E6E6; --accent: #FFFFFF; --on-accent: #000000; --border: #FFFFFF; --tint: #000000; --bg: #000000; --surface: #000000; }
}
* { box-sizing: border-box; }
/* Anything hidden stays hidden, even where a class below sets display. */
[hidden] { display: none !important; }
/* Safari passes its own text size setting through -apple-system-body (17px at the default).
   Everything else is in em, so it all grows with the body text. */
html { --body: 1.25rem; }
@supports (font: -apple-system-body) { html { font: -apple-system-body; --body: 1.18rem; } }
body { margin: 0; background: var(--bg); color: var(--text); font-size: var(--body); line-height: 1.5; font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif; }
.top, main, footer { max-width: 720px; margin: 0 auto; padding: 16px; }
.top { display: flex; gap: 16px; align-items: flex-start; padding-top: 28px; }
.top img { border-radius: 14px; background: var(--accent); flex: none; }
.brand { margin: 0; font-weight: 700; } .brand span { font-weight: 400; color: var(--muted); font-size: .85em; }
h1 { font: 600 1.7em/1.15 Georgia, "Times New Roman", serif; margin: 4px 0; }
h2 { font: 600 1.3em/1.2 Georgia, "Times New Roman", serif; margin: 0; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; margin: 0 0 18px; display: grid; gap: 12px; }
.note { background: var(--tint); border-left: 5px solid var(--gold); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.story .note { margin: 0; }
.card > p { margin: 0; }
button { font: inherit; font-weight: 700; min-height: 60px; border-radius: 999px; border: 2px solid var(--muted); background: var(--surface); color: var(--text); padding: 10px 22px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); min-height: 72px; }
button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
.words summary { font-weight: 700; cursor: pointer; min-height: 60px; padding: 14px 20px; border: 2px solid var(--muted); border-radius: 14px; list-style: none; }
.words summary::-webkit-details-marker { display: none; }
.words summary::before { content: "▸"; display: inline-block; width: 1.2em; }
.words[open] summary::before { content: "▾"; }
.words[open] summary { margin-bottom: 12px; }
.words-text p { margin: 0 0 .8em; }
button:disabled { opacity: .55; cursor: default; }
.reactions { display: flex; flex-wrap: wrap; gap: 10px; }
.controls { display: grid; gap: 12px; margin: 0 0 18px; }
.speed { display: flex; flex-wrap: wrap; gap: 10px; }
.speed button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--muted); border-radius: 14px; padding: 12px; }
label { font-weight: 700; display: block; margin-bottom: 4px; }
.photos { display: grid; gap: 10px; }
.photos img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 14px; background: var(--tint); }
audio { width: 100%; }
.story.chosen { border: 3px solid var(--gold); }
.story:focus { outline: none; }
.new { margin: 0; justify-self: start; font-weight: 700; font-size: .85em; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.sparks { display: flex; flex-wrap: wrap; gap: 14px; }
.spark { width: 84px; height: 84px; font-size: 2em; border-radius: 50%; background: #FFE08A; color: #6B4A00; border-color: #94701F; }
.cheers { display: flex; flex-wrap: wrap; gap: 10px; }
input { width: 100%; font: inherit; font-size: 1.6em; letter-spacing: .3em; text-align: center; color: var(--text); background: var(--bg); border: 2px solid var(--muted); border-radius: 14px; padding: 12px; }
input:focus-visible, h2:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
.voice { display: grid; gap: 10px; margin-top: 6px; }
.voice-time { margin: 0; font-weight: 700; }
.takedown-open { font-weight: 400; border-color: var(--border); }
footer { color: var(--muted); font-size: .85em; padding-bottom: 48px; }
@media (prefers-reduced-motion: no-preference) { button { transition: transform .1s; } button:active { transform: scale(.98); } }
/* The review page: plain text boxes, and a careful red for closing Connect. */
#signin input, #queue input { font-size: 1em; letter-spacing: normal; text-align: left; }
select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--muted); border-radius: 14px; padding: 12px; }
select:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
button.danger { border-color: #A12B1F; color: #A12B1F; }
@media (prefers-color-scheme: dark) { button.danger { border-color: #F2A69C; color: #F2A69C; } }
.messages { margin: 0; padding-left: 1.4em; }
video.player { width: 100%; max-height: 70vh; border-radius: 14px; background: #000000; }
/* Report a problem: tucked away at the bottom, big enough to tap. */
.report summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.report fieldset { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.report legend { font-weight: 700; margin-bottom: 6px; }
.report fieldset label { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.report input[type=radio] { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--gold); }
/* The home page: a short list, and a link that looks like a button. */
.points { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; }
a { color: var(--accent); text-underline-offset: 3px; }
a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 10px 26px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
a:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
