/* Woof Wisdom: black, cream, neon orange. Poppins for text, Instrument Serif italic for the accent word, JetBrains Mono for labels. */
:root {
  --bg: #0B0B0A; --surface: #171614; --surface-2: #22201D; --line: #24221F; --line-2: #3A3631;
  --cream: #F4F0E8; --soft: #B5AEA3; --muted: #8F887E; --orange: #D97757; --orange-deep: #5A4130; --orange-bg: #15110E;
  --chip: #CFC8BC; --btn-line: #5A5048; --field: #141312; --bubble: #2A2522; --track: #2E2B27; --card-line: #2A2724; --draft: #E3B07F;
  --radius: 20px; --gutter: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--cream); font-family: Poppins, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.orange { color: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--gutter) 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 13px; font-weight: 500; color: var(--chip); }
.wordmark { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.wordmark .serif { color: var(--orange); font-size: 23px; }
.streak { height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line-2); display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.streak svg { color: var(--orange); }

.view { flex: 1; padding: 22px var(--gutter) 120px; display: flex; flex-direction: column; gap: 22px; outline: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 480px; margin: 0 auto; display: flex; padding: 0 6px env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); }
.tabs a { flex: 1; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--muted); }
.tabs a:hover { color: var(--cream); }
.tabs a[aria-current="page"] { color: var(--orange); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }

h1 { margin: 0; font-size: 30px; line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
h1 .serif { font-size: 36px; color: var(--orange); }
h2 { margin: 0; font-size: 22px; font-weight: 700; }
p { margin: 0; }
.lede { font-size: 14px; line-height: 1.55; color: var(--soft); }
.small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; }

.hero { position: relative; display: block; height: 300px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,10,0) 45%, rgba(11,11,10,.88) 100%); }
.hero .cap { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero .cap strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; max-width: 230px; }
.play { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; background: var(--orange); display: grid; place-items: center; }
.corner { position: absolute; z-index: 1; top: 14px; width: 18px; height: 18px; border-top: 2px solid var(--cream); }
.corner.l { left: 14px; border-left: 2px solid var(--cream); }
.corner.r { right: 14px; border-right: 2px solid var(--cream); }

.btn { flex: 1; min-height: 50px; padding: 0 18px; border-radius: 25px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600; border: 1px solid var(--btn-line); background: transparent; cursor: pointer; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--bg); }
.btn:hover { border-color: var(--orange); }

.card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--card-line); display: flex; flex-direction: column; gap: 10px; }
.card.warm { background: var(--orange-bg); border-color: var(--orange-deep); }
.card.card-link { flex-direction: row; align-items: center; gap: 16px; }
.badge { align-self: flex-start; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); }
.draft { color: var(--draft); }
.icon-box { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; border: 1px solid var(--orange); display: grid; place-items: center; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .card { flex: 0 0 272px; min-height: 220px; }
.title-serif { font-size: 30px; line-height: 1; }

.script { font-size: 18px; line-height: 1.6; }
.source { padding-top: 14px; border-top: 1px solid var(--line); }

.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 85%; padding: 12px 15px; font-size: 14px; line-height: 1.5; border-radius: 18px; }
.bubble.me { align-self: flex-end; background: var(--bubble); border-bottom-right-radius: 4px; }
.bubble.gb { align-self: flex-start; background: var(--surface); border: 1px solid var(--card-line); border-bottom-left-radius: 4px; }
.bubble.gb a { color: var(--orange); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-2); background: transparent; color: var(--chip); font-size: 13px; font-weight: 500; cursor: pointer; }
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--orange); color: var(--cream); }
.composer { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 10px 0; background: var(--bg); }
.field { flex: 1; min-width: 0; width: 100%; min-height: 46px; padding: 0 16px; border-radius: 23px; border: 1px solid var(--line-2); background: var(--field); outline: none; }
.field:focus { border-color: var(--orange); }
.send { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--orange); display: grid; place-items: center; cursor: pointer; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.ep img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.ep { display: flex; flex-direction: column; gap: 8px; position: relative; }
.ep .tag { position: absolute; top: 10px; left: 10px; padding: 6px 9px; border-radius: 8px; background: var(--orange); color: var(--bg); letter-spacing: .08em; font-size: 10px; }
.progress { height: 4px; border-radius: 2px; background: var(--track); }
.progress span { display: block; height: 100%; border-radius: 2px; background: var(--orange); }

.option { width: 100%; text-align: left; min-height: 56px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 15px; line-height: 1.4; }
.option:hover { border-color: var(--orange); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
label { font-size: 13px; color: var(--soft); }

.arc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-left: 1px solid var(--orange-deep); margin-left: 6px; }
.arc li { position: relative; padding: 0 0 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.arc li::before { content: ""; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.arc li:last-child { padding-bottom: 0; }
.arc p { font-size: 15px; line-height: 1.55; color: var(--cream); }

.why { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.why div { display: flex; flex-direction: column; gap: 6px; }
.why dd { margin: 0; font-size: 15px; line-height: 1.55; }
.mantra > p { font-size: 32px; line-height: 1.1; color: var(--cream); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.steps li::marker { color: var(--orange); font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* Paper pages: reading moments (a wisdom card, your result, a dog profile) turn to the warm cream of the episode covers. */
html.paper {
  --bg: #F0E9DC; --surface: #E8DFCE; --surface-2: #DDD3C0; --line: #D6CBB6; --line-2: #C4B8A2;
  --cream: #1B1A18; --soft: #4B453D; --muted: #6E665B; --orange: #B04E2C; --orange-deep: #D9B9A4; --orange-bg: #F7E9DD;
  --chip: #3E3A34; --btn-line: #9A8E7E; --field: #F7F2E9; --bubble: #E2D6C2; --track: #D6CBB6; --card-line: #D9CEBB; --draft: #8A4F14;
  color-scheme: light;
}
html, body, .top, .tabs { transition: background-color .35s ease, color .35s ease; }
@media (prefers-reduced-motion: reduce) { html, body, .top, .tabs { transition: none; } }

.body { font-size: 15px; line-height: 1.6; color: var(--soft); }
.belief { padding: 4px 0 4px 18px; border-left: 2px solid var(--orange); display: flex; flex-direction: column; gap: 8px; }
.belief p { font-size: 26px; line-height: 1.2; color: var(--cream); }
.closing { font-size: 22px; line-height: 1.35; text-align: center; color: var(--cream); padding: 8px 6px; text-wrap: balance; }
.dogs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dog { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--card-line); background: var(--surface); display: flex; flex-direction: column; }
.dog-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.dog-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.lock-badge { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(11,11,10,.7); display: grid; place-items: center; }
.dog-portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; display: block; }
.dog.you { border-color: var(--orange); }
.dog.locked { border-style: dashed; }
.dog.locked .dog-text { position: absolute; left: 0; bottom: 0; }
.dog-icon { display: block; }
a.dog:hover { border-color: var(--orange); }
