/* GODBODY, World 07: the world's tokens (TOLD contract: the same names as brand/tokens.css), its face, and its effects.
   Big Shoulders Display: SIL Open Font License 1.1 (Fontsource), self-hosted like every TOLD face. */
@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/BigShouldersDisplay-800-latin-ext.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: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/BigShouldersDisplay-800-latin.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;
}

/* godbody: default light = night (the black Atlantic under sodium light) */
[data-world="godbody"] {
  --ground: #07090B; --surface: #0E1316; --raised: #161D21; --text: #E7ECEC; --mute: #A3AEB2; --untold: #A9B3B6;
  --told: #FFFFFF; --now: #FFB547; --voice: #F2A33A; --accent: #C8343E; --accent-text: #F28B92; --gl: #F2A33A;
  --line: #5E6D73; --focus: #FFFFFF; --focus-halo: #07090B;
  --tier-book: #E9E4DA; --tier-attested: #86BFAE; --tier-disputed: #A3B6E0; --tier-dramatised: #E3976B; --tier-inference: #B3AEA5;
  --crown: #C98B2E; --crown-hi: #E6A64A; --crown-ink: #07090B; --hair: rgba(255, 255, 255, .12);
  color-scheme: dark;
  --f-title: "Big Shoulders Display", "Archivo", "Atkinson Hyperlegible Next", "Noto Sans Orthography", "Arial Narrow", sans-serif;
  --title-wt: 800; --title-style: normal; --title-wd: 100; --title-ls: .02em; --title-case: uppercase;
  --card-bg: #07090B; --card-text: #E7ECEC; --card-accent: #F2A33A;
}
[data-world="godbody"][data-light="down"], [data-world="godbody"] [data-light="down"] {
  --ground: #07090B; --surface: #0E1316; --raised: #161D21; --text: #E7ECEC; --mute: #A3AEB2; --untold: #A9B3B6;
  --told: #FFFFFF; --now: #FFB547; --voice: #F2A33A; --accent: #C8343E; --accent-text: #F28B92; --gl: #F2A33A;
  --line: #5E6D73; --focus: #FFFFFF; --focus-halo: #07090B;
  --tier-book: #E9E4DA; --tier-attested: #86BFAE; --tier-disputed: #A3B6E0; --tier-dramatised: #E3976B; --tier-inference: #B3AEA5;
  --crown: #C98B2E; --crown-hi: #E6A64A; --crown-ink: #07090B; --hair: rgba(255, 255, 255, .12);
  color-scheme: dark;
}
[data-world="godbody"][data-light="up"], [data-world="godbody"] [data-light="up"] {
  --ground: #EEEAE3; --surface: #F6F3EE; --raised: #FFFFFF; --text: #14181B; --mute: #4F575C; --untold: #454D52;
  --told: #0B0E10; --now: #8A3B12; --voice: #8A3B12; --accent: #9E1B26; --accent-text: #9E1B26; --gl: #8A3B12;
  --line: #85827B; --focus: #7A2A00; --focus-halo: #FFFFFF;
  --tier-book: #1E1A16; --tier-attested: #2C6656; --tier-disputed: #34508A; --tier-dramatised: #8E4322; --tier-inference: #5C554C;
  --crown: #8C5A1E; --crown-hi: #73480F; --crown-ink: #FFFFFF; --hair: rgba(0, 0, 0, .12);
  color-scheme: light;
}
[data-world="godbody"][data-light="half"], [data-world="godbody"] [data-light="half"] {
  --ground: #1E2227; --surface: #272C32; --raised: #30363D; --text: #E7E4DE; --mute: #B2AFA8; --untold: #BDBAB3;
  --told: #FFFFFF; --now: #FFB547; --voice: #F2A33A; --accent: #C98B2E; --accent-text: #F2C27A; --gl: #D6D2CA;
  --line: #7C838B; --focus: #FFFFFF; --focus-halo: #0B0B0C;
  --tier-book: #E9E4DA; --tier-attested: #86BFAE; --tier-disputed: #A3B6E0; --tier-dramatised: #E3976B; --tier-inference: #B3AEA5;
  --crown: #C98B2E; --crown-hi: #E6A64A; --crown-ink: #0B0B0C; --hair: rgba(255, 255, 255, .12);
  color-scheme: dark;
}
[data-world="godbody"] .wtitle, .wtitle[data-world="godbody"] { text-transform: uppercase; letter-spacing: .02em; }

/* the reader's own canvas layer: above the page, below the bar and dialogs, never catching a tap */
canvas.gb-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
/* the deep rhythm: the world's reading atmosphere (the house's .reading-atmosphere layer, reader-polish.css) */
canvas.gb-atmos { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none !important; user-select: none; z-index: 2; contain: strict; }
@media (prefers-reduced-motion: reduce), (prefers-reduced-data: reduce) { canvas.gb-atmos { display: none !important; } }
html[data-reading-motion="still"] canvas.gb-atmos, html[data-reading-data="save"] canvas.gb-atmos, html[data-app-motion="reduce"] canvas.gb-atmos { display: none !important; }
@media print { canvas.gb-atmos, canvas.gb-fx { display: none !important; } }
article.reader.chapter[data-book="godbody"] .ch-text {
  transform: translate(var(--gb-shake-x, 0), var(--gb-shake-y, 0)) scale(calc(var(--gb-thump, 1) * var(--gb-draw, 1)));
  transform-origin: 50% 40%; transition: transform .12s ease-out;
}
.gb-moment-controls { display: flex; gap: 12px; align-items: center; margin: -.4em 0 1.4em; font: 500 13px/1.3 var(--f-ui, "Atkinson Hyperlegible Next", sans-serif); color: var(--mute); }
.gb-moment-controls button { min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.gb-moment-controls button[aria-pressed="true"] { border-color: var(--voice); color: var(--voice); }
.gb-moment-controls span { text-transform: lowercase; letter-spacing: .04em; }
p[data-gb-moment][data-gb-playing="true"] { text-shadow: 0 0 22px color-mix(in srgb, var(--voice) 35%, transparent); transition: text-shadow .6s; }
.gb-stamp { margin: -.6em 0 1.2em; font: 600 13px/1.3 "Atkinson Hyperlegible Mono", ui-monospace, monospace; color: var(--voice); letter-spacing: .08em;
  opacity: 0; transform: translateY(4px); transition: opacity .5s, transform .5s; }
.gb-stamp.on { opacity: 1; transform: none; }
.gb-stamp .gb-stamp-k { display: inline-block; padding: 1px 7px; border: 1px solid currentColor; text-transform: uppercase; margin-right: 6px; }
.gb-stamp .gb-stamp-w { color: var(--mute); font-weight: 400; letter-spacing: .02em; }

/* the living cover recipe: a slow heartbeat glow under the plate */
.ep-cover[data-living="pulse"] { position: relative; isolation: isolate; }
.ep-cover[data-living="pulse"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 80% at 50% 70%, rgba(200, 52, 62, .0) 40%, rgba(200, 52, 62, .22) 100%);
  animation: gb-heart 1.3s ease-out infinite; mix-blend-mode: screen; }
@keyframes gb-heart { 0% { opacity: 0 } 6% { opacity: .9 } 22% { opacity: .2 } 30% { opacity: .65 } 60%, 100% { opacity: 0 } }

/* the planet's chart (Explore) */
.gb-chart .kick { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; color: var(--mute); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.gb-vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin: 0 0 32px; }
.gb-vital { border-top: 2px solid var(--voice); padding-top: 14px; min-width: 0; }
.gb-vital .who { display: block; font: 800 22px/1 var(--f-title); text-transform: uppercase; letter-spacing: .04em; color: var(--voice); margin-bottom: 10px; }
.gb-vital q { display: block; font-size: 1.12em; line-height: 1.45; }
.gb-vital cite { display: block; margin-top: 8px; color: var(--mute); font-style: normal; font-size: 13px; }
.gb-trace { width: 100%; height: 26px; margin-top: 12px; color: var(--accent-text); }
.gb-trace path { stroke-dasharray: 200; stroke-dashoffset: 200; animation: gb-trace 2.6s linear infinite; }
.gb-vital:nth-child(2) .gb-trace path { animation-duration: 4.2s; }
.gb-vital:nth-child(3) .gb-trace path { animation-duration: 3.3s; }
.gb-vital:nth-child(4) .gb-trace path { animation-duration: 1.9s; }
@keyframes gb-trace { to { stroke-dashoffset: -200; } }

/* the unedited record (between chapters) */
.gb-record { max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px 14px;
  font: 400 14px/1.5 "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--line) 35%, transparent) 31px 32px); }
.gb-record-head { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 10px; color: var(--voice); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.gb-record ol { list-style: none; margin: 0; padding: 0; }
.gb-record li { display: grid; grid-template-columns: 76px 104px minmax(0, 1fr); gap: 4px 12px; padding: 6px 0; min-height: 32px; align-items: baseline; }
.gb-record li .l { grid-column: 3; color: var(--mute); font-family: var(--f-read, Literata, Georgia, serif); font-size: 14px; }
.gb-record li.empty { display: block; color: var(--mute); }
.gb-record time { color: var(--voice); }
.gb-record .d { color: var(--mute); }
.gb-record a { color: var(--text); }
.gb-record-acts { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
@media (max-width: 560px) { .gb-record li { grid-template-columns: 70px minmax(0, 1fr); } .gb-record li .d { display: none; } .gb-record li a, .gb-record li .l { grid-column: 2; } }

/* the game: Log the time */
.gb-game { max-width: 960px; }
.gb-game canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; border-radius: 6px; border: 1px solid var(--line); background: #05080A; }
.gb-game-read { display: flex; gap: 22px; flex-wrap: wrap; margin: 12px 0; color: var(--mute); font-size: 13px; letter-spacing: .1em; }
.gb-game-read b { color: var(--voice); font-weight: 700; }
.gb-game-acts { display: flex; gap: 12px; flex-wrap: wrap; }
.gb-game-acts [data-log] { min-width: 180px; min-height: 52px; font-size: 18px; text-transform: uppercase; letter-spacing: .08em; }
.gb-game-line { min-height: 3.2em; margin-top: 16px; font-size: 1.1em; line-height: 1.45; }
.gb-game-line cite { display: block; color: var(--mute); font-style: normal; font-size: 13px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .ep-cover[data-living="pulse"]::after, .gb-trace path { animation: none; }
  article.reader.chapter[data-book="godbody"] .ch-text { transform: none !important; }
}
[data-app-motion="reduce"] article.reader.chapter[data-book="godbody"] .ch-text,
[data-reading-motion="still"] article.reader.chapter[data-book="godbody"] .ch-text { transform: none !important; }
[data-reading-motion="still"] .ep-cover[data-living="pulse"]::after { animation: none; }
