/* Who Gets Your Hours? — the film's card language: cream ground, heavy black
   type, a short orange rule, stick figures; the cartoon's red for underlines. */
@font-face { font-family: 'Public Sans'; src: url('/assets/publicsans.5ed4d31c98.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Patrick Hand'; src: url('/assets/hand.ac5bc9033b.woff2') format('woff2'); font-display: swap; }

:root {
  --cream: #efebe1; --paper: #f7f4ec; --ink: #1b1a17; --soft: #55524b; --rule: #cbc5b6;
  --orange: #c4621f; --red: #d3322a; --green: #2f6b45;
  --c-day: #1b1a17; --c-lee: #c4621f; --c-feed: #8a3fb0; --c-max: #2f6b45;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.55 'Public Sans', system-ui, sans-serif; padding-bottom: 120px; }
a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
img, video, canvas { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---- bar ---- */
.bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: rgba(239,235,225,.94); border-bottom: 1.5px solid var(--ink); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; font-size: 13px; margin-right: auto; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand img { flex: none; }
.bar-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 14px; cursor: pointer; }
.bar-btn svg { width: 15px; height: 15px; }
.bar-btn.ghost { background: transparent; color: var(--ink); }

main { max-width: 680px; margin: 0 auto; padding: 0 14px; }

/* ---- hero ---- */
.hero { padding: 14px 0 8px; }
.film { position: relative; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.film video { width: 100%; aspect-ratio: 16 / 9; background: var(--cream); }
.badge { position: absolute; left: 10px; top: 10px; background: var(--ink); color: var(--cream); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
h1 { font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 12vw, 72px); line-height: .95; letter-spacing: -.01em; margin: 18px 0 6px; }
h1 span { display: block; }
h1::after, h2::after { content: ''; display: block; width: 44px; height: 4px; background: var(--orange); margin-top: 12px; }
.deck { font-size: 18px; color: var(--soft); margin: 10px 0 16px; }

.listen { background: var(--ink); color: var(--cream); border-radius: var(--r); padding: 14px; }
.listen-btn { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--orange); color: #fff; border: 0; border-radius: 12px; padding: 14px; cursor: pointer; }
.lb-ico { flex: none; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--orange); display: grid; place-items: center; }
.lb-ico svg { width: 26px; height: 26px; margin-left: 3px; }
.lb-txt b { display: block; font-size: 19px; line-height: 1.2; }
.lb-txt small { display: block; font-size: 14px; opacity: .92; margin-top: 3px; }
.listen[data-playing='1'] .lb-txt b::before { content: 'Playing · '; }
.cast { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cast li { border-left: 4px solid; padding: 4px 8px; font-size: 13px; line-height: 1.3; min-width: 0; transition: background .2s; border-radius: 0 6px 6px 0; }
.cast b { display: block; font-size: 15px; }
.cast span { opacity: .8; }
.c-day { border-color: #f7f4ec; } .c-lee { border-color: var(--orange); } .c-feed { border-color: #c58ee0; } .c-max { border-color: #7fc79b; }
.cast li.talking { background: rgba(255,255,255,.14); }
.hint { font-size: 13px; opacity: .75; margin: 10px 0 0; }

.toc ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 16px 0 4px; }
.toc a { display: inline-block; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; background: var(--paper); }

/* ---- cards: one per chapter, laid out like the film's cards ---- */
.card { margin: 26px 0; padding: 18px 16px 22px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); }
.kick { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); border-bottom: 1.5px solid var(--ink); padding-bottom: 6px; margin: 0 0 14px; }
h2 { font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 8vw, 42px); line-height: 1.02; margin: 0 0 8px; }
h3 { font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.sub { color: var(--soft); margin: 10px 0 14px; }
.quiet { font-size: 13px; color: var(--soft); }
.note { font-size: 15px; color: var(--soft); border-left: 3px solid var(--rule); padding-left: 12px; margin: 16px 0 0; }
.note p { margin: 0 0 10px; }
.big-line { font-weight: 900; text-transform: uppercase; font-size: 24px; line-height: 1.1; margin: 20px 0 6px; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.closing { font-size: 18px; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.wide { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* the spoken element */
.speaking { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) { .speaking { transition: outline-color .2s; } }

/* ---- 01 dial ---- */
.dial-card { display: grid; gap: 14px; }
.dial { width: min(300px, 80vw); margin: 0 auto; }
.dial-ring { fill: var(--cream); stroke: var(--ink); stroke-width: 2; }
.dial-hole { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.dial-big { font-weight: 900; font-size: 38px; text-anchor: middle; fill: var(--ink); }
.dial-small { font-size: 11px; text-anchor: middle; fill: var(--soft); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.tick { stroke: var(--ink); stroke-width: 1; }
.w-sleep { fill: #3b4a6b; } .w-work { fill: #1b1a17; } .w-chores { fill: #9a948a; } .w-scroll { fill: #c4621f; } .w-game { fill: #8a3fb0; } .w-yours { fill: #2f6b45; } .w-over { fill: var(--red); }
.sl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; border-left: 6px solid; background: var(--cream); }
.sl span { font-weight: 600; font-size: 15px; }
.sl output { font-weight: 800; font-variant-numeric: tabular-nums; }
.sl input { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); height: 32px; }
.s-sleep { border-color: #3b4a6b; } .s-work { border-color: #1b1a17; } .s-chores { border-color: #9a948a; } .s-scroll { border-color: #c4621f; } .s-game { border-color: #8a3fb0; }
.sliders { display: grid; gap: 8px; }
.left { font-size: 20px; font-weight: 800; margin: 14px 0 6px; }
.left b { color: var(--green); }
.left.over b { color: var(--red); }
.side { display: grid; gap: 8px; margin-top: 10px; }
.mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--cream); border-radius: 10px; font-size: 15px; }
.mini input { width: 88px; min-height: 40px; padding: 4px 8px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; text-align: right; font-weight: 700; }
.mini b { order: -1; display: none; }
.year { font-size: 16px; }
.year b { font-weight: 800; }

@media (min-width: 620px) { .dial-card { grid-template-columns: 300px 1fr; align-items: center; } }

/* ---- 02 flips ---- */
.flips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flip { position: relative; min-height: 150px; padding: 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); cursor: pointer; text-align: left; perspective: 600px; }
.flip > span { position: absolute; inset: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; border-radius: 10px; backface-visibility: hidden; }
.flip i { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.flip b { font-size: 16px; line-height: 1.25; }
.f-back { background: var(--ink); color: var(--cream); transform: rotateY(180deg); }
.f-back i { color: #f0b48a; }
.flip[aria-pressed='true'] .f-front { transform: rotateY(-180deg); }
.flip[aria-pressed='true'] .f-back { transform: rotateY(0); }
@media (prefers-reduced-motion: no-preference) { .flip > span { transition: transform .45s; } }
@media (prefers-reduced-motion: reduce) { .flip > span { backface-visibility: visible; } .flip[aria-pressed='true'] .f-front, .flip[aria-pressed='false'] .f-back { visibility: hidden; } .flip > span { transform: none !important; } }
.flip[aria-pressed='true'] { border-color: var(--orange); }
.facts { margin-top: 16px; padding: 14px; background: var(--cream); border-radius: 12px; }
.facts ul { margin: 0; padding-left: 18px; }
.facts li { margin: 8px 0; font-size: 15px; }

/* ---- 03 loop ---- */
.ring { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: s; }
.ring li { display: grid; grid-template-columns: 34px 1fr; gap: 0 10px; align-items: center; padding: 10px; border: 2px solid var(--rule); border-radius: 12px; background: var(--cream); counter-increment: s; opacity: .55; }
.ring li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rule); font-weight: 900; }
.ring li b { font-weight: 800; text-transform: uppercase; }
.ring li span { font-size: 14px; color: var(--soft); }
.ring li.on { opacity: 1; border-color: var(--orange); }
.ring li.on::before { background: var(--orange); color: #fff; }
.loop-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.loop-out { flex-basis: 100%; margin: 4px 0 0; font-weight: 700; }

/* ---- 04 ledger ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips button { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--cream); font-weight: 600; cursor: pointer; }
.chips button[aria-checked='true'] { background: var(--ink); color: var(--cream); }
.domains { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dom { text-align: left; padding: 10px; min-height: 96px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); cursor: pointer; }
.dom b { display: block; font-weight: 900; text-transform: uppercase; font-size: 15px; }
.dom span { font-size: 13px; color: var(--soft); line-height: 1.3; display: block; margin-top: 4px; }
.dom[aria-pressed='true'] { background: var(--red); border-color: var(--red); color: #fff; }
.dom[aria-pressed='true'] span { color: #fff; }
.ledger-out { font-size: 17px; font-weight: 600; margin: 14px 0 0; min-height: 2.5em; }

/* ---- 05 clocks ---- */
.panel { margin: 0 0 12px; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.stones-wrap[hidden] { display: none; }
.stones { display: flex; gap: 6px; margin-bottom: 10px; }
.stone { flex: 1; min-height: 56px; border-radius: 40% 46% 38% 44% / 52% 44% 56% 48%; border: 2px solid var(--ink); background: #d8d4cc; font-weight: 900; text-transform: uppercase; font-size: 13px; line-height: 1.1; cursor: pointer; padding: 6px; }
.stone[aria-selected='true'] { background: var(--ink); color: #fff; box-shadow: 0 0 0 3px var(--red); }
.stone-panel { background: var(--cream); border-radius: 12px; padding: 12px; }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.calc label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.calc input { min-height: 44px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; font-weight: 700; }
.clock-out { font-size: 18px; font-weight: 700; margin: 12px 0 0; }

/* ---- 06 books ---- */
.switch { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.switch button { flex: 1; min-height: 44px; border: 0; background: transparent; font-weight: 700; cursor: pointer; }
.switch button[aria-pressed='true'] { background: var(--ink); color: var(--cream); }
.meters ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.meters li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--cream); border-radius: 10px; }
.meters .up, .meters .down { font-weight: 900; text-transform: uppercase; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.meters .up { background: var(--green); color: #fff; } .meters .up::before { content: '▲ '; }
.meters .down { background: var(--red); color: #fff; } .meters .down::before { content: '▼ '; }
.meters[data-books='seller'] .m-you, .meters[data-books='you'] .m-seller { display: none; }
.case { margin-top: 16px; padding: 14px; border: 2px dashed var(--ink); border-radius: 12px; }
.case p { margin: 0; font-size: 15px; }
.walk { margin-top: 16px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: w; display: grid; gap: 6px; }
.steps li { counter-increment: w; background: var(--cream); border-radius: 10px; }
.steps button { width: 100%; text-align: left; min-height: 48px; padding: 8px 12px; border: 0; background: transparent; font-weight: 800; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.steps button::before { content: counter(w); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-size: 13px; }
.steps button[aria-expanded='false'] + p { display: none; }
.steps p { margin: 0; padding: 0 12px 12px 48px; font-size: 15px; color: var(--soft); }

/* ---- 07 shame ---- */
.frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.frame { padding: 10px 8px; min-height: 90px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); text-align: left; cursor: pointer; }
.frame b { display: block; font-weight: 900; text-transform: uppercase; font-size: 14px; }
.frame span { font-size: 13px; color: var(--soft); display: block; margin-top: 4px; }
.frame[aria-pressed='true'] { background: var(--ink); color: var(--cream); }
.frame[aria-pressed='true'] span { color: #e6dfd0; }
.said { font-family: 'Patrick Hand', cursive; font-size: 24px; line-height: 1.25; margin: 16px 0 6px; padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 22px; position: relative; }
.said-what { font-weight: 700; margin: 8px 0 0; }
.dots-wrap { margin-top: 18px; }
.dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; max-width: 360px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--rule); }
.dots i.hot { background: var(--orange); }
.dots-wrap p { font-size: 15px; }

/* ---- 08 hour ---- */
.four { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.four li { padding: 10px; border-radius: 12px; background: var(--cream); border-top: 4px solid var(--green); }
.four b { display: block; font-weight: 900; text-transform: uppercase; }
.four span { font-size: 13px; color: var(--soft); }
.pick { display: grid; gap: 10px; margin-top: 16px; padding: 14px; border: 2px solid var(--ink); border-radius: 12px; }
.pick label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.pick select, .pick input { min-height: 46px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; font-size: 17px; }
.hour-card { margin: 14px 0 0; }
.hour-card[hidden] { display: none; }
.hour-card canvas { width: 100%; max-width: 420px; border: 2px solid var(--ink); border-radius: 12px; }

/* ---- songs ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { flex: 1; min-height: 46px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); font-weight: 800; cursor: pointer; line-height: 1.15; padding: 4px 8px; }
.tabs button[aria-selected='true'] { background: var(--ink); color: var(--cream); }
.lyrics { margin-top: 12px; }
.lyrics h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--orange); margin: 16px 0 4px; }
.lyrics p { margin: 0; }
.lyrics button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 3px 6px; border-radius: 6px; font-size: 17px; line-height: 1.4; cursor: pointer; color: var(--soft); }
.lyrics button.now { color: var(--ink); background: #fbe2cf; font-weight: 700; }
.deck-player { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--ink); color: var(--cream); border-radius: 12px; }
.dp-play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; cursor: pointer; display: grid; place-items: center; }
.dp-play svg { width: 24px; height: 24px; }
.dp-track { flex: 1; display: grid; gap: 2px; }
.dp-track input { width: 100%; accent-color: var(--orange); }
.dp-track span { font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---- share ---- */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile-pick { width: 100%; padding: 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); overflow: hidden; cursor: pointer; text-align: left; }
.tile-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile-pick span { display: block; padding: 8px; font-weight: 700; font-size: 14px; line-height: 1.25; }
.sh-dialog { width: min(520px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); overflow: auto; }
.sh-dialog::backdrop { background: rgba(27,26,23,.55); }
.sh-x { all: unset; position: absolute; right: 10px; top: 6px; font-size: 30px; line-height: 1; cursor: pointer; padding: 4px 10px; }
.sh-head { font-weight: 900; text-transform: uppercase; margin: 0 0 10px; }
.sh-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-choice { padding: 0; border: 2px solid var(--ink); border-radius: 10px; background: var(--cream); overflow: hidden; cursor: pointer; text-align: left; }
.sh-choice img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.sh-choice span { display: block; padding: 6px 8px; font-size: 13px; font-weight: 700; }
.sh-back { border: 0; background: transparent; font-weight: 700; padding: 4px 0 10px; cursor: pointer; }
.sh-card { width: 100%; border-radius: 10px; border: 1.5px solid var(--ink); }
.sh-post { font-weight: 600; }
.sh-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-acts .btn { min-height: 44px; padding: 0 10px; font-size: 14px; }
.sh-acts .btn.wide { grid-column: 1 / -1; }
.sh-masto { display: none; grid-column: 1 / -1; gap: 6px; }
.sh-masto.on { display: flex; }
.sh-masto input { flex: 1; min-height: 44px; border: 1.5px solid var(--ink); border-radius: 8px; padding: 0 10px; }
.sh-small { font-size: 12px; color: var(--soft); }

/* ---- sources, footer ---- */
.sources ol { padding-left: 20px; font-size: 14px; }
.sources li { margin: 6px 0; }
.sources li:target { background: #fbe2cf; }
.transcript { margin-top: 14px; }
.transcript summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.transcript p { font-size: 15px; margin: 4px 0; }
.transcript p b { margin-right: 6px; }
.t-ch { font-weight: 900; text-transform: uppercase; margin-top: 14px !important; }
.foot { max-width: 680px; margin: 0 auto; padding: 10px 14px 30px; font-size: 14px; color: var(--soft); }

/* ---- share card pages ---- */
.card-body main { padding-top: 16px; }
.card-main img { border: 2px solid var(--ink); border-radius: 12px; }
.card-others { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.card-others a { font-size: 14px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; }

/* ---- the player, in the film's colours ---- */
body #narrator.np { --np-bg: #1b1a17; --np-panel: #26241f; --np-ink: #f7f4ec; --np-dim: #ddd6c6; --np-faint: #b4ad9d; --np-rule: #45413a; --np-accent: #e98a4a; font-family: 'Public Sans', system-ui, sans-serif; }
