/* Official YH8ME GAMEZ colours for every book: black, red and white. */
:root {
  --bg: #080808; --ground: #121212; --raised: #1b1b1b; --edge: #3a3a3a;
  --ink: #ffffff; --muted: #cfcfcf; --accent: #ff4a4a; --accent-soft: #ff4a4a77; --blood: #ff4a4a; --focus: #ffffff;
  --glow: #ff2a2a14; --glow-strong: #ff4a4a55;
  --read: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, Consolas, "Courier New", monospace;
}

/* Spinners: its lettering only (a hard, condensed outbreak-poster face). Colours come from yh8me.css. */
:root { --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", sans-serif; }
.welcome h1, #sceneTitle, header .brand, #tapDialog h2, #restartDialog h2 { font-weight: 400; letter-spacing: .03em; }

/* Picky Plots shared look (The Feed's layout) laid over the YH8ME GAMEZ player.
   Loaded after the player's own style.css. Only looks change here: every control, id and behaviour stays the player's.
   Each book supplies its own tokens (--bg, --ground, --raised, --edge, --ink, --muted, --accent, --blood, --focus,
   --display, --read, --mono, --glow) in a short block above this file. System fonts only: the store allows no outside files. */
:root { --gold: var(--accent); --surface: var(--ground); --text: var(--ink); --line: var(--edge); --red: var(--blood); color-scheme: dark; }
body {
  background: var(--bg); color: var(--ink); font: 18px/1.55 var(--read);
  background-image: radial-gradient(120% 50% at 50% -10%, var(--glow), transparent 60%);
  background-attachment: fixed;
}
button { border-radius: 12px; border-color: var(--edge); }
button:hover { background: var(--raised); border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #0d0905; border-radius: 10px; }
button.quiet { background: var(--raised); border: 1px solid var(--edge); color: var(--ink); border-radius: 10px; }
:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 2px; }

/* header: the book's name in its display type */
header { max-width: 720px; border-bottom: 0; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); grid-template-columns: minmax(0, 1fr) auto; }
header .brand { font: clamp(1rem, 4.6vw, 1.6rem)/1.15 var(--display); letter-spacing: .06em; text-transform: uppercase; text-align: left; grid-column: 1; }
header .header-subtitle { display: none; }
header #settingsOpen { grid-column: 2; grid-row: 1; min-height: 44px; padding: 8px 12px; font-size: 14px; text-align: center; }
main { max-width: 720px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px)); }
/* footer: the original "Created and published by YH8ME GAMEZ" strip */
footer { font-family: system-ui, sans-serif; }

/* welcome: sign line, cover beside the big title, italic tagline, the tap pad */
.welcome { max-width: none; padding: 0; display: grid; gap: 16px; }
.welcome > .eyebrow { display: none; }
.sign { display: flex; justify-content: space-between; gap: 12px; font: 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sign .adult { color: var(--blood); }
.title-row { display: grid; grid-template-columns: minmax(84px, 30%) minmax(0, 1fr); gap: 16px; align-items: end; }
.title-row .cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--edge); box-shadow: 0 10px 40px #000a; }
.welcome h1 { margin: 0; font: clamp(36px, 10.5vw, 96px)/.95 var(--display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: normal; }
.welcome h1 span { color: var(--accent); text-shadow: 0 0 30px var(--glow-strong); display: block; }
.tagline { margin: 0; font: italic 21px/1.4 var(--read); color: var(--ink); max-width: 36ch; }
.welcome .intro { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.fine { font: 13px var(--mono); color: var(--muted); margin: 0; }
.opening-notes { border-top: 1px solid var(--edge); margin-top: 6px; padding-top: 14px; max-width: 64ch; font-size: 16px; display: grid; gap: 10px; }
.opening-notes p { margin: 0; }
.start-actions { margin-top: 0; }

/* the tap pad: big, dashed, hard to miss — the same on home, choices and restart */
#homeTapSurface, #tapSurface, #restartTapSurface {
  border-radius: 18px !important; border: 2px dashed var(--accent-soft) !important;
  background: radial-gradient(80% 80% at 50% 40%, var(--glow), var(--ground)) !important; color: var(--ink);
  font: clamp(20px, 5.4vw, 26px)/1.25 var(--display) !important; letter-spacing: .03em; text-transform: uppercase; padding: 24px; text-wrap: balance;
}
#homeTapStatus, #tapStatus, #restartTapStatus { color: var(--accent); font: 15px/1.4 var(--mono) !important; }
/* home: the pad sits in the page under the title (the player used to cover the whole screen with it) */
html.home-viewport-locked { overflow: auto; }
body.home-tap-active { height: auto; overflow: auto; }
body.home-tap-active > header { position: static; background: transparent; }
body.home-tap-active { padding-bottom: calc(var(--home-footer-height) + 12px); }   /* the original footer stays pinned at the bottom */
body.home-tap-active #homeTapMenu { position: static; inset: auto; display: grid; grid-template-rows: auto auto; gap: 12px; padding: 0; background: transparent; overflow: visible; }
body.home-tap-active #homeTapSurface { min-height: min(46vh, 340px); height: auto; }

/* choices (official YH8ME GAMEZ choice screen, owner Nov 18): heading, status, the big tap pad, Repeat choices.
   No numbered list on screen: #accessibleChoices keeps the player's own visually-hidden style, so screen readers still reach it. */
#tapDialog { background: var(--bg); background-image: radial-gradient(120% 50% at 50% -10%, var(--glow), transparent 60%); color: var(--ink); }
#tapDialog h2, #restartDialog h2 { font: 28px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; text-wrap: balance; }
#accessibleChoices { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
#tapRepeat { background: var(--raised); border: 1px solid var(--edge); border-radius: 10px; }

/* the story: chapter line in display type, a thin bar, speaker names in the accent */
.chapterline { font: 16px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 3px solid var(--edge); padding-bottom: 10px; }
.chapterline span:first-child { color: var(--ink); }
.eyebrow { color: var(--accent); font-family: var(--mono); letter-spacing: .14em; }
#sceneTitle { font: clamp(34px, 9vw, 56px)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
#playback { font-family: var(--mono); color: var(--accent); }
.line { font-family: var(--read); font-size: clamp(18px, 4.6vw, 21px); line-height: 1.7; }
.speaker { font: 14px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.line.rook, .line.other { border-left-width: 3px; }
.line.speaking-passage { background: var(--glow); outline-color: var(--accent-soft); }
aside { border-color: var(--edge); }
aside h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; }

/* the control bars stay exactly as in the original YH8ME GAMEZ player: rewind and replay on top, pause and restart at the bottom */
#floatingPlayback, #floatingBottom { background: #080808; border-color: #444444; }
#floatingPlayback button, #floatingBottom button {
  background: #151515; border: 1px solid #ff5454; border-radius: 5px; color: #ffffff;
  font: 1rem/1.3 system-ui, sans-serif; text-transform: none; letter-spacing: normal; text-align: center;
}
#floatingPlayback button:hover, #floatingBottom button:hover { background: #252525; border-color: #ff5454; }
#floatingPlayback button:disabled, #floatingBottom button:disabled { opacity: .5; }

/* dialogs */
dialog { background: var(--ground); color: var(--ink); border: 1px solid var(--edge); border-radius: 16px; }
dialog::backdrop { background: #000c; }
#settings h2 { font: 26px var(--display); text-transform: uppercase; }
#settings h3 { font: 18px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.instructions-transport { background: var(--ground); }
input[type=checkbox], input[type=range] { accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
