:root {
  --bg: #F1EEE8; --surface: #FBFAF7; --ink: #2A2825; --muted: #6E7A83; --line: #DDD7CC; --line-strong: #C9C1B3;
  --accent: #C4862B; --accent-ink: #1F1A12; --accent-soft: #F5E8D0; --ok: #5E8C61; --ok-soft: #E2EDE0;
  --p0: #7FA1A8; --p1: #C4862B; --p2: #5E8C61; --p3: #A8657A;
  --fur: #B98C5C; --fur-dark: #8A6340; --belly: #EBD7B8; --rock: #A5ADB2; --rock-dark: #7E888E; --pupil: #2B2320;
  --display: "Fredoka", system-ui, sans-serif; --body: "Nunito", system-ui, sans-serif;
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1A18; --surface: #25231F; --ink: #EDE7DC; --muted: #A5ADB3; --line: #3A3631; --line-strong: #4B463F;
    --accent: #DBA34E; --accent-ink: #1F1A12; --accent-soft: #3B2D17; --ok: #8DBF90; --ok-soft: #24362A;
    --p0: #8FB2B9; --p1: #DBA34E; --p2: #8DBF90; --p3: #C98AA0;
    --fur: #A97F52; --fur-dark: #7A5636; --belly: #D9C3A3; --rock: #6C767C; --rock-dark: #525B60; --pupil: #1A1512;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1A18; --surface: #25231F; --ink: #EDE7DC; --muted: #A5ADB3; --line: #3A3631; --line-strong: #4B463F;
  --accent: #DBA34E; --accent-ink: #1F1A12; --accent-soft: #3B2D17; --ok: #8DBF90; --ok-soft: #24362A;
  --p0: #8FB2B9; --p1: #DBA34E; --p2: #8DBF90; --p3: #C98AA0;
  --fur: #A97F52; --fur-dark: #7A5636; --belly: #D9C3A3; --rock: #6C767C; --rock-dark: #525B60; --pupil: #1A1512;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }
h3 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 28px 0 10px; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: inherit; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: .01em; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.sync.synced i { background: var(--ok); }
.sync.saving i { background: var(--accent); }
.sync.offline i, .sync.signedout i { background: var(--p3); }
.login { display: grid; gap: 14px; max-width: 380px; }
.login .field input { font-size: 17px; }
.err { color: var(--p3); font-weight: 700; }
.btn:disabled { opacity: .55; cursor: default; }

.bumbi-card { display: grid; grid-template-columns: 124px 1fr; gap: 10px; align-items: end; margin: 6px 0 18px; }
.bumbi-wrap { width: 124px; }
.speech { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-family: var(--display); font-weight: 500; font-size: 17px; line-height: 1.35; min-height: 52px; }
.speech::before { content: ""; position: absolute; left: -7px; bottom: 16px; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.speech p { transition: opacity .2s ease; }

.tab { display: grid; gap: 12px; }
.chip { display: inline-block; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; color: #fff; }
.chip.p0 { background: var(--p0); } .chip.p1 { background: var(--p1); } .chip.p2 { background: var(--p2); } .chip.p3 { background: var(--p3); }
.today-head, .wk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.date, .range { color: var(--muted); font-size: 14px; }
.code { font-family: var(--display); font-weight: 600; font-size: 20px; }
.label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.focus { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.25; text-wrap: balance; }
.hint { color: var(--muted); font-size: 14px; }
.hint b { color: var(--ink); }
.next { border-top: 1px solid var(--line); padding-top: 10px; }

.blocks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.block { position: relative; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: background .15s, border-color .15s; }
.block-main { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding-right: 30px; }
.rep { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; opacity: .7; }
.rep svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rep:hover { border-color: var(--line-strong); opacity: 1; }
.block.reported .rep { color: var(--p3); opacity: 1; }
.block.reported .rep svg { fill: var(--p3); }
.sheet { position: fixed; inset: 0; background: rgba(22, 19, 15, .55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.sheet-step { font-family: var(--display); font-weight: 600; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 8px 12px; font-family: var(--display); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip-btn.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.reports { display: grid; gap: 8px; }
.report { display: grid; grid-template-columns: 1fr 32px; gap: 8px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--p3); border-radius: 12px; padding: 10px 8px 10px 12px; }
.report b { font-weight: 700; }
.report small { display: block; color: var(--muted); font-size: 13px; }
.rep-del { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.rep-del:hover { color: var(--ink); }
.block input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ok); flex: 0 0 auto; }
.block.on { background: var(--ok-soft); border-color: var(--ok); }
.bt { display: grid; gap: 4px; min-width: 0; }
.bn { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; }
.bn em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 13px; white-space: nowrap; }
.bd { font-size: 14px; color: var(--muted); }
.block.on .bd { color: var(--ink); opacity: .75; }
.dw { display: grid; gap: 4px; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 14px; color: var(--ink); }
.dwl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ok); }
.dwi { display: flex; gap: 8px; }
.dwi::before { content: "\25A1"; color: var(--ok); flex: 0 0 auto; }
.dws { color: var(--muted); }
.dws b { color: var(--ink); }
.dw .fb { justify-self: start; margin-top: 2px; }
.bl { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; justify-self: start; margin-top: 2px; }
.bl:hover { text-decoration: underline; }
.dayplan { display: grid; }
.dayrow { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 0; }
.dayrow:last-child { border-bottom: 0; }
.dayrow .code { font-size: 15px; color: var(--muted); }
.dayrow.today .code { color: var(--accent); }
.dayrow small { display: block; color: var(--muted); font-size: 13px; }

.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 12px 18px; font-family: var(--display); font-weight: 600; font-size: 16px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.btn.done::after { content: " ✓"; }
.btn.ghost { color: var(--ink); }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.kv { display: grid; gap: 4px; }
.kv > b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ms { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.ms input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ok); flex: 0 0 auto; }
.ms span { font-weight: 700; }
.ms em { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.ms.pub { border-color: var(--p3); }
.ms.on { border-color: var(--ok); background: var(--ok-soft); }
.ms.on span { text-decoration: line-through; text-decoration-color: var(--ok); color: var(--muted); }
.dots { display: flex; gap: 6px; }
.dot { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--muted); }
.dot.today { border-color: var(--ink); border-width: 2px; color: var(--ink); }
.dot.on { background: var(--ok); border-color: var(--ok); color: #fff; }

.jhead { display: flex; gap: 24px; }
.big { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1; }
.big small { display: block; font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 4px; }
.strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.cell { aspect-ratio: 1; border-radius: 4px; opacity: .35; position: relative; }
.cell.p0 { background: var(--p0); } .cell.p1 { background: var(--p1); } .cell.p2 { background: var(--p2); } .cell.p3 { background: var(--p3); }
.cell.past, .cell.now, .cell.done { opacity: 1; }
.cell.now { outline: 2px solid var(--ink); outline-offset: 2px; }
.cell.pub::before { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--bg); }
.cell.done::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; }
.cell.done.pub::before { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.p0 { background: var(--p0); } .sw.p1 { background: var(--p1); } .sw.p2 { background: var(--p2); } .sw.p3 { background: var(--p3); }
details.phase { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 14px; }
details.phase summary { display: flex; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; list-style: none; }
details.phase summary::-webkit-details-marker { display: none; }
details.phase summary b { font-family: var(--display); font-weight: 600; font-size: 17px; display: block; }
details.phase summary small { color: var(--muted); font-size: 13px; }
details.phase .goal { padding-bottom: 8px; }
details.phase .hint { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.jw { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.jw:last-child { border-bottom: 0; }
.jw .code { font-size: 15px; color: var(--muted); }
.jw.now .code { color: var(--accent); }
.jw > div { display: grid; gap: 8px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.field textarea, .field input, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; }
select { font-family: var(--display); font-weight: 600; width: auto; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.past { display: grid; gap: 8px; }
.pastlog { display: grid; grid-template-columns: 44px 1fr; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pastlog .code { font-size: 15px; color: var(--muted); }
.pl b { font-weight: 700; display: block; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl small { color: var(--muted); }

.rules { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.rules li::marker { font-family: var(--display); color: var(--accent); font-weight: 600; }
.tbl { border-collapse: collapse; width: 100%; font-size: 15px; }
.tbl td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.num { white-space: nowrap; font-family: var(--display); font-weight: 600; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.links a { font-weight: 700; }
.links small { display: block; color: var(--muted); }
.sharebox { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px; }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs-inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbtn { background: none; border: 0; padding: 10px 4px 8px; display: grid; justify-items: center; gap: 3px; color: var(--muted); cursor: pointer; font-family: var(--display); font-size: 11px; font-weight: 600; }
.tabbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbtn.active { color: var(--accent); }

/* Dictionary */
h3.first { margin-top: 8px; }
#dict-q { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.count { margin-top: 10px; }
.entry { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; margin-top: 8px; }
.entry summary { list-style: none; cursor: pointer; padding: 10px 0; display: grid; gap: 2px; }
.entry summary::-webkit-details-marker { display: none; }
.e-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.e-head b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.cat { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.entry summary small { color: var(--muted); font-size: 14px; }
.entry p { padding: 0 0 12px; font-size: 15px; }
.entry em { color: var(--muted); font-style: normal; font-size: 13px; }
.plain, .entry .plain { background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; font-size: 15px; line-height: 1.45; }
.plain .pl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.term { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline dotted var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }
.term:hover { color: var(--accent); }
.daynav { display: grid; grid-template-columns: 22px 1fr 22px; align-items: stretch; gap: 4px; }
.dn-arrow { width: 22px; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0; }
.dn-days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dn { display: grid; justify-items: center; padding: 6px 0 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-family: var(--display); font-weight: 600; font-size: 13px; line-height: 1.2; color: var(--ink); cursor: pointer; }
.dn small { font-size: 11px; font-weight: 500; color: var(--muted); }
.dn.off { color: var(--muted); border-style: dashed; cursor: default; }
.dn.part small { color: var(--accent); }
.dn.full { background: var(--ok-soft); border-color: var(--ok); }
.dn.closed { color: var(--muted); border-style: dashed; }
.dn.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dn.cal > span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.dn-week { margin-top: -6px; }
.start { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.block.first { border-color: var(--accent); }
.wotd { display: grid; gap: 2px; text-align: left; width: 100%; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 12px; cursor: pointer; margin-top: 6px; color: var(--ink); }
.wotd b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.wotd small { color: var(--muted); font-size: 13px; }
.tc-head { display: flex; justify-content: space-between; align-items: center; }
.tc-term { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; }
.tc-s { font-size: 16px; margin: 0; }
.tc-plain { margin: 8px 0 0; }
.tc-m { margin: 8px 0 0; }

/* Tour */
.tour-overlay { position: fixed; inset: 0; background: rgba(22, 19, 15, .62); z-index: 50; }
.tour-on .bumbi-card { position: sticky; top: 0; z-index: 60; background: var(--bg); padding-top: 8px; margin-top: 0; }
.tour-on nav.tabs { z-index: 60; pointer-events: none; }
.tour-target { position: relative; z-index: 55; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px rgba(196, 134, 43, .28); border-radius: 12px; background: var(--bg); }
.tour-card { position: fixed; left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: 496px; margin: 0 auto; z-index: 70; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 12px 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); display: grid; gap: 10px; }
.tour-body { display: grid; gap: 8px; }
.tour-body[hidden] { display: none; }
.tour-sample { pointer-events: none; }
.tour-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-count { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--muted); }
.tour-btns { display: flex; gap: 6px; }
.btn.small { padding: 8px 12px; font-size: 14px; }

/* Intro */
.intro { position: fixed; inset: 0; z-index: 90; background: var(--bg); color: var(--ink); display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.intro-top { display: flex; justify-content: flex-end; padding: 12px 16px 0; }
.intro-mid { display: flex; align-items: center; justify-content: center; padding: 8px 24px; overflow: hidden; }
.intro-slide { max-width: 420px; width: 100%; display: grid; gap: 14px; animation: introIn .45s ease both; }
.intro-slide h2 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 7vw, 34px); line-height: 1.15; text-wrap: balance; margin: 0; }
.intro-slide p { font-size: 17px; line-height: 1.5; color: var(--muted); margin: 0; max-width: 40ch; }
.intro-art { position: relative; height: 210px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: var(--r); }
.intro-bumbi { width: 150px; position: relative; z-index: 2; }
.intro-bot { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 20px 20px; gap: 12px; }
.intro-dots { display: flex; gap: 8px; }
.intro-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background .2s, transform .2s; }
.intro-dots span.on { background: var(--accent); transform: scale(1.3); }
@keyframes introIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* slide 2: the real animal */
.intro-art.photo .intro-bumbi { width: 92px; position: absolute; left: 6px; bottom: 0; z-index: 3; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; border-radius: var(--r); z-index: 1; animation: photoIn .6s ease both; }
.credit { position: absolute; right: 8px; bottom: 6px; z-index: 3; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 7px; border-radius: 6px; text-decoration: none; }
@keyframes photoIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
/* slide 3: endless feed */
.feed { position: absolute; inset: 0; opacity: .45; z-index: 1; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent); }
.feed-col { display: grid; gap: 10px; padding: 0 40px; animation: feedScroll 9s linear infinite; }
.feed-col i { display: block; border-radius: 10px; background: var(--line-strong); }
@keyframes feedScroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
/* slide 3: a card that ticks itself */
.demo-card { position: absolute; right: 8px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; animation: cardOn .4s ease 1.1s both; }
.demo-card b { font-family: var(--display); font-weight: 600; font-size: 15px; display: block; }
.demo-card small { color: var(--muted); font-size: 12px; }
.demo-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-strong); position: relative; flex: 0 0 auto; }
.demo-check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); animation: tickIn .3s ease 1.1s both; }
@keyframes cardOn { to { background: var(--ok-soft); border-color: var(--ok); } }
@keyframes tickIn { to { transform: rotate(45deg) scale(1); } }
.demo-card { animation: cardOn .4s ease 1.1s both; }
.demo-card .demo-check { animation: checkBg .3s ease 1.1s both; }
@keyframes checkBg { to { background: var(--ok); border-color: var(--ok); } }
/* slide 4: four finished things */
.four { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.four span { font-family: var(--display); font-weight: 600; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); animation: pop .4s ease both; }
.four span:nth-child(2) { animation-delay: .35s; } .four span:nth-child(3) { animation-delay: .7s; } .four span:nth-child(4) { animation-delay: 1.05s; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
/* slide 5: two phones, one dot travelling */
.phones { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 14px; }
.phones i { width: 26px; height: 44px; border-radius: 6px; border: 2px solid var(--line-strong); background: var(--surface); }
.phones b { width: 90px; height: 2px; background: var(--line-strong); position: relative; }
.phones b::after { content: ""; position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: travel 1.6s ease-in-out infinite alternate; }
@keyframes travel { from { left: 0; } to { left: 80px; } }
@media (prefers-reduced-motion: reduce) {
  .intro-slide, .feed-col, .demo-card, .demo-check, .demo-check::after, .four span, .phones b::after, .real { animation: none; }
  .demo-card { background: var(--ok-soft); border-color: var(--ok); }
  .demo-check { background: var(--ok); border-color: var(--ok); }
  .demo-check::after { transform: rotate(45deg) scale(1); }
}

/* Bumbi */
.bumbi { width: 100%; height: auto; display: block; overflow: visible; }
.bumbi .fur { fill: var(--fur); }
.bumbi .fur-dark { fill: var(--fur-dark); }
.bumbi .belly { fill: var(--belly); }
.bumbi .rock { fill: var(--rock); }
.bumbi .rock-shadow { fill: var(--rock-dark); opacity: .35; }
.bumbi .rock-line { stroke: var(--rock-dark); stroke-width: 2; fill: none; opacity: .5; stroke-linecap: round; }
.bumbi .toes { stroke: var(--fur); stroke-width: 1.5; opacity: .8; }
.bumbi .whisker { stroke: var(--fur-dark); stroke-width: 1.2; opacity: .6; stroke-linecap: round; }
.bumbi .pupil, .bumbi .nose, .bumbi .m-o { fill: var(--pupil); }
.bumbi .glint { fill: #fff; }
.bumbi .eye-happy path, .bumbi .eye-sleep path { stroke: var(--pupil); stroke-width: 3; fill: none; stroke-linecap: round; }
.bumbi .mouths path { stroke: var(--pupil); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.bumbi .eye-happy, .bumbi .eye-sleep, .bumbi .m-happy, .bumbi .m-sleep, .bumbi .m-o, .bumbi .sparkles, .bumbi .zzz { display: none; }
.bumbi.mood-happy .eye-open, .bumbi.mood-happy .m-idle { display: none; }
.bumbi.mood-happy .eye-happy, .bumbi.mood-happy .m-happy { display: block; }
.bumbi.mood-sleepy .eye-open, .bumbi.mood-sleepy .m-idle { display: none; }
.bumbi.mood-sleepy .eye-sleep, .bumbi.mood-sleepy .m-sleep, .bumbi.mood-sleepy .zzz { display: block; }
.bumbi.mood-curious .m-idle { display: none; }
.bumbi.mood-curious .m-o { display: block; }
.bumbi.mood-curious .head { transform: rotate(-6deg); }
.bumbi.mood-proud .sparkles { display: block; }
.bumbi.mood-proud .m-idle { display: none; }
.bumbi.mood-proud .m-happy { display: block; }
.bumbi .head { transform-box: fill-box; transform-origin: 50% 90%; transition: transform .4s ease; }
.bumbi .body-group { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 4.2s ease-in-out infinite; }
.bumbi.mood-happy .body-group { animation: bounce .6s ease; }
.bumbi .eye-open { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.bumbi .sp { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: twinkle 1.6s ease-in-out infinite; }
.bumbi .sp2 { animation-delay: .6s; }
.bumbi .z { font-family: var(--display); font-size: 14px; fill: var(--muted); animation: floatz 2.4s ease-in-out infinite; }
.bumbi .z2 { animation-delay: .5s; font-size: 12px; }
.bumbi .z3 { animation-delay: 1s; font-size: 10px; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015, 1.03); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes bounce { 0% { transform: translateY(0); } 40% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes floatz { 0% { opacity: 0; transform: translateY(4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .bumbi .body-group, .bumbi .eye-open, .bumbi .sp, .bumbi .z { animation: none; }
  .speech p { transition: none; }
}
.thumb { position: absolute; inset: 0; display: block; background: #1E1C19; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-btn { display: block; position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #1E1C19; color: #FBFAF7; cursor: pointer; }
.media-btn:focus-visible { outline-offset: -3px; }
.media-icon { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(20, 18, 15, .72); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.media-btn:hover .media-icon { transform: scale(1.06); }
.media-icon svg { width: 28px; height: 28px; fill: #FBFAF7; }
.fx-media.sf .media-icon svg { fill: none; stroke: #FBFAF7; stroke-width: 1.6; stroke-linejoin: round; }

.tip { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.tip p { font-size: 14px; line-height: 1.45; }
.tip b { font-family: var(--display); font-weight: 600; }
.tip .btn { flex: 0 0 auto; }
.focus-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--ink); text-align: left; cursor: pointer; }
.focus-btn svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 2.2; }
.focus-btn b { font-family: var(--display); font-weight: 600; font-size: 15px; }
.focus-btn small { margin-left: auto; color: var(--muted); font-size: 13px; text-align: right; }
.focus-btn:hover { border-color: var(--accent); }
.focus-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.block.focused { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.fx-panel { position: fixed; inset: 0; z-index: 75; overflow-y: auto; background: var(--bg); padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
body.focus-open { overflow: hidden; }
.fx-panel > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.fx-head { position: sticky; top: 0; z-index: 2; display: grid; gap: 4px; padding: 12px 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.fx-close { justify-self: start; border: 0; background: none; padding: 6px 0; color: var(--accent); font-family: var(--display); font-weight: 600; font-size: 16px; cursor: pointer; }
.fx-title { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 0; text-wrap: balance; }
.fx-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.fx-done { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 5px 12px 5px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); font-family: var(--display); font-weight: 600; cursor: pointer; }
.fx-done input { width: 18px; height: 18px; margin: 0; accent-color: var(--ok); }
.fx-done.on { border-color: var(--ok); background: var(--ok-soft); }
.fx-body { display: grid; gap: 20px; padding-top: 16px; }
.fx-media, .fx-img { margin: 0; display: grid; gap: 8px; }
.fx-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #1E1C19; }
.fx-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fx-img img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #FBFAF7; }
figcaption { display: grid; gap: 2px; font-size: 14px; }
figcaption b { font-family: var(--display); font-weight: 600; font-size: 16px; }
figcaption span { color: var(--muted); }
figcaption .bl { margin-top: 2px; }
.fx-doc { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fx-doc b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.fx-doc ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.fx-check { margin-top: 0; }
.fx-words .chips { margin-top: 6px; }
.fx-empty { display: grid; gap: 10px; }
.fx-list { display: grid; gap: 6px; }
.fx-row { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.fx-row b { font-family: var(--display); font-weight: 600; font-size: 15px; }
.fx-row small { color: var(--muted); font-size: 13px; }
.fx-row.done b { color: var(--muted); }
.fx-row:hover { border-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .media-icon { transition: none; } }

@media (min-width: 1100px) {
  .app { max-width: 1520px; padding: 0 36px calc(84px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(440px, 540px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 44px; align-items: start; }
  .top { grid-column: 1; grid-row: 1; }
  .bumbi-card { grid-column: 1; grid-row: 2; }
  main { grid-column: 1; grid-row: 3; min-width: 0; }
  .tabs-inner { max-width: 1520px; padding: 0 36px; grid-template-columns: repeat(5, 108px); }
  .fx-panel { position: sticky; inset: auto; top: 0; z-index: auto; grid-column: 2; grid-row: 1 / 4; align-self: start; max-height: calc(100vh - 68px); padding: 0 6px 24px 2px; background: none; }
  .fx-panel > * { max-width: none; }
  .fx-head { padding-top: 18px; padding-right: 44px; }
  .fx-close { position: absolute; right: 0; top: 14px; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); font-size: 22px; line-height: 1; }
  .fx-close:hover { border-color: var(--accent); }
  .fx-empty { padding-top: 18px; }
  .fx-empty .fx-title { font-size: 24px; }
}

@media (max-width: 360px) {
  .bumbi-card { grid-template-columns: 100px 1fr; }
  .bumbi-wrap { width: 100px; }
  .speech { font-size: 15px; }
}
