/* ===== Кот в сапогах — общие стили ===== */
:root {
  --paper: #f6ecd6;
  --paper-2: #efe1c2;
  --card: #fbf5e6;
  --ink: #3b2a1a;
  --ink-2: #6b5640;
  --red: #9e2b25;
  --red-ink: #fff7ea;
  --gold: #c8963e;
  --green: #5b7a3a;
  --line: #d8c39a;
  --cell: #fffaf0;
  --cell-block: #e4d3ae;
  --hl: #f6dd97;
  --cur: #e7b54a;
  --wrong: #f2b8b0;
  --ok: #cfe3b4;
  --shadow: 0 1px 2px rgba(59, 42, 26, .08), 0 8px 24px rgba(59, 42, 26, .10);
  --radius: 14px;
  --font-head: "Playfair Display", Georgia, serif;
  --font-text: "PT Serif", Georgia, serif;
  --font-ui: "PT Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1510; --paper-2: #231b14; --card: #2a2119; --ink: #f1e6d0; --ink-2: #c4b194;
    --red: #e0675c; --red-ink: #1b1510; --gold: #e0b25e; --green: #9cc06f; --line: #4a3b2c;
    --cell: #30261d; --cell-block: #16110c; --hl: #5b4620; --cur: #8f6a22; --wrong: #6e2b27; --ok: #33491f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1b1510; --paper-2: #231b14; --card: #2a2119; --ink: #f1e6d0; --ink-2: #c4b194;
  --red: #e0675c; --red-ink: #1b1510; --gold: #e0b25e; --green: #9cc06f; --line: #4a3b2c;
  --cell: #30261d; --cell-block: #16110c; --hl: #5b4620; --cur: #8f6a22; --wrong: #6e2b27; --ok: #33491f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 18px/1.65 var(--font-text); -webkit-font-smoothing: antialiased;
}
img, .cat-art { max-width: 100%; display: block; }
.cat-art { height: auto; aspect-ratio: 220 / 300; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- шапка ----- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 20px var(--font-head); white-space: nowrap; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; margin-left: auto; font-family: var(--font-ui); font-size: 16px; overflow-x: auto; scrollbar-width: none; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--red-ink); background: var(--red); }
.read-progress { position: absolute; left: 0; bottom: -1px; height: 3px; background: var(--gold); width: 0; transition: width .15s; }
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0; padding-top: 6px; }
  .nav { margin-left: -12px; width: calc(100% + 24px); padding-bottom: 6px; }
}

/* ----- кнопки ----- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 600 16px/1 var(--font-ui); padding: 12px 20px; min-height: 44px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); background: var(--paper-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--red) 88%, black); }
.btn.small { padding: 8px 14px; min-height: 38px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* ----- главная: обложка ----- */
.hero { padding: 48px 0 32px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(44px, 8vw, 88px); margin-bottom: .15em; }
.hero h1 span { color: var(--red); font-style: italic; }
.hero .lead { font-size: 20px; color: var(--ink-2); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-art { position: relative; justify-self: center; width: min(400px, 100%); }
.hero-art::before {
  content: ""; position: absolute; inset: 8% 4% 0; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 45%, transparent), transparent 70%);
}
.hero-art .cat-art { position: relative; animation: bob 4s ease-in-out infinite; transform-origin: bottom center; }
.hero-cat { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.hero-cat .cat-art { width: min(260px, 100%); margin-inline: auto; }
.hero-cat.speaking .cat-art { animation: talk .45s ease-in-out infinite alternate; }

@keyframes bob { 50% { transform: rotate(-2deg) translateY(-6px); } }
@media (max-width: 760px) { .hero { padding-top: 20px; } .hero-art { order: -1; } .hero-cat .cat-art { width: 170px; margin-inline: auto; } .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 12px; } .hero .actions { justify-content: center; } .hero .lead { margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ----- главная: сказка ----- */
.section { padding: 40px 0; }
.section-title { font-size: clamp(30px, 5vw, 44px); text-align: center; }
.section-sub { text-align: center; color: var(--ink-2); margin: -8px auto 28px; max-width: 36em; }
.story { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 84px; font-family: var(--font-ui); font-size: 15px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.toc li { counter-increment: ch; }
.toc a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.toc a::before { content: counter(ch); width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); font-size: 12px; }
.toc a.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.toc a.active::before, .toc a.read::before { background: var(--gold); border-color: var(--gold); color: #3b2a1a; }
.toc a.read::before { content: "✓"; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } .toc { display: none; } }

.chapter {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 44px); margin-bottom: 28px; box-shadow: var(--shadow);
  max-width: 44em;
}
.chapter-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.chapter-head img { width: 64px; height: 64px; flex: none; }
.chapter-num { font: 600 13px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.chapter h3 { font-size: clamp(24px, 3.4vw, 32px); margin: 0; }
.chapter p { margin: 0 0 .9em; hyphens: auto; }
.chapter p:first-of-type::first-letter {
  float: left; font: 700 3.3em/.85 var(--font-head); color: var(--red); margin: .06em .1em 0 0;
}
.chapter-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chapter.speaking { outline: 3px solid var(--gold); }
.chapter.speaking p, .chapter.speaking .chapter-head { cursor: pointer; }
.chapter .reading { background: color-mix(in srgb, var(--gold) 22%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 22%, transparent); border-radius: 4px; transition: background .3s; }
.player {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; width: min(620px, 100% - 24px);
  display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 14px; overflow: hidden;
  background: var(--ink); color: var(--paper); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.3); font-family: var(--font-ui);
}
.player[hidden] { display: none; }
.player img { flex: none; }
.pl-title { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player button { flex: none; min-width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: inherit; font-size: 17px; cursor: pointer; }
.player button:hover { background: rgba(255,255,255,.12); }
.player .pl-main { background: var(--gold); color: #3b2a1a; }
.player .pl-main:hover { background: var(--gold); filter: brightness(1.08); }
.pl-progress { position: absolute; left: 0; top: 0; height: 3px; background: var(--gold); width: 0; }
@media (max-width: 520px) { .player img, .player [data-pl=rate] { display: none; } .pl-title { font-size: 13px; } }
.moral { text-align: center; font: italic 22px/1.5 var(--font-head); max-width: 32em; margin: 12px auto 0; padding: 24px; border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.game-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.game-card h3 { font-size: 26px; margin: 0; }
.game-card p { margin: 0; color: var(--ink-2); flex: 1; }
.game-card .mini { display: grid; gap: 3px; width: max-content; margin-bottom: 6px; }
.game-card .mini span { width: 22px; height: 22px; border: 1.5px solid var(--ink); background: var(--cell); font: 700 13px/19px var(--font-ui); text-align: center; }
.game-card .mini span.b { background: transparent; border-color: transparent; }
.game-card .mini span.q { background: var(--paper-2); font-size: 9px; }
.game-card .status { font: 14px var(--font-ui); color: var(--green); min-height: 1.2em; }

.site-footer { padding-bottom: 96px !important; border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 40px; color: var(--ink-2); font: 15px var(--font-ui); text-align: center; }

/* ===== Головоломки ===== */
.puzzle-page { padding: 24px 0 40px; }
.puzzle-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; margin-bottom: 16px; }
.puzzle-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 0; }
.puzzle-head p { margin: 0; color: var(--ink-2); font-size: 16px; flex: 1 1 280px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; font-family: var(--font-ui); }
.timer { font: 700 18px var(--font-ui); font-variant-numeric: tabular-nums; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); min-width: 90px; text-align: center; }
.stat { font-size: 14px; color: var(--ink-2); }
.toolbar .spacer { flex: 1; }
.menu { position: relative; }
.menu-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; }
.menu.open .menu-list { display: block; }
.menu-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; font: 15px var(--font-ui); }
.menu-list button:hover { background: var(--paper-2); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.puzzle-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.puzzle-main { min-width: 0; }
@media (max-width: 1000px) { .puzzle-layout { grid-template-columns: 1fr; } }

.clue-bar {
  display: flex; gap: 10px; align-items: center; min-height: 56px; padding: 10px 14px; margin-bottom: 12px;
  background: var(--ink); color: var(--paper); border-radius: 12px; font: 17px/1.3 var(--font-ui);
  position: sticky; top: 70px; z-index: 5;
}
.clue-bar b { background: var(--gold); color: #3b2a1a; border-radius: 6px; padding: 2px 8px; white-space: nowrap; font-size: 14px; }
.clue-bar .len { opacity: .7; white-space: nowrap; font-size: 14px; margin-left: auto; }
.clue-bar button { background: none; border: 0; color: inherit; font-size: 22px; cursor: pointer; padding: 0 6px; min-height: 36px; }
@media (max-width: 640px) { .clue-bar { top: 96px; font-size: 16px; min-height: 64px; padding: 8px 6px; } .clue-bar .len { display: none; } }

.grid-scroll { overflow-x: auto; padding: 4px 2px 10px; }
.grid {
  --size: 40px;
  display: grid; grid-template-columns: repeat(var(--cols), var(--size)); grid-auto-rows: var(--size);
  width: max-content; margin-inline: auto; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.cell { position: relative; border: 1px solid transparent; }
.cell.letter {
  background: var(--cell); border-color: var(--ink); margin: 0 -1px -1px 0; cursor: pointer;
  display: grid; place-items: center; font: 700 calc(var(--size) * .55)/1 var(--font-ui); text-transform: uppercase;
  transition: background .1s;
}
.cell.letter.in-word { background: var(--hl); }
.cell.letter.current { background: var(--cur); }
.cell.letter.wrong { background: var(--wrong); }
.cell.letter.revealed .ch { color: var(--red); }
.cell.letter.solved { background: var(--ok); }
.cell .num { position: absolute; top: 1px; left: 3px; font: 600 calc(var(--size) * .26)/1 var(--font-ui); color: var(--ink-2); }
.cell.block { background: transparent; }
.grid.scan .cell.block { background: var(--cell-block); border: 1px solid var(--line); margin: 0 -1px -1px 0; opacity: .7; }
.grid.scan .cell.block.art { background: repeating-linear-gradient(45deg, var(--cell-block) 0 6px, var(--paper-2) 6px 12px); }
.cell.pop .ch { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(1.35); } }

/* клетка-вопрос сканворда */
.cell.clue {
  background: var(--paper-2); border-color: var(--ink); margin: 0 -1px -1px 0; display: flex; flex-direction: column;
  font-family: var(--font-ui); color: var(--ink); cursor: pointer; overflow: hidden;
}
.cell.clue .q { flex: 1; display: grid; place-items: center; text-align: center; padding: 1px 2px; line-height: 1.05; font-size: 8px; hyphens: auto; overflow-wrap: anywhere; min-height: 0; }
.cell.clue .q + .q { border-top: 1px solid var(--ink); }
.cell.clue .q.active { background: var(--cur); }
.cell.clue .q.done { color: var(--green); }
.arrow { position: absolute; width: 12px; height: 12px; color: var(--red); pointer-events: none; }
.arrow.right { left: 1px; top: calc(50% - 6px); }
.arrow.down { top: 1px; left: calc(50% - 6px); }
.arrow.down-right { top: 1px; left: 1px; }
.arrow.right-down { top: 1px; left: 1px; }

/* списки вопросов */
.clues { display: grid; gap: 18px; font-family: var(--font-ui); }
.clues h2 { font: 700 20px var(--font-head); margin: 0 0 6px; }
.clues ol { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.clues li { display: flex; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 15px; line-height: 1.35; border-bottom: 1px solid var(--line); }
.clues li:last-child { border-bottom: 0; }
.clues li b { min-width: 22px; color: var(--red); }
.clues li:hover { background: var(--paper-2); }
.clues li.active { background: var(--hl); }
.clues li.done { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--gold); }
@media (max-width: 1000px) { .clues { grid-template-columns: 1fr 1fr; } .clues ol { max-height: 320px; } }
@media (max-width: 560px) { .clues { grid-template-columns: 1fr; } }

/* экранная клавиатура */
.kbd { display: grid; gap: 6px; margin: 14px auto 0; max-width: 560px; font-family: var(--font-ui); }
.kbd-row { display: flex; gap: 4px; justify-content: center; }
.kbd button {
  flex: 1 1 0; min-width: 0; height: 46px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  font: 600 17px var(--font-ui); cursor: pointer; padding: 0; box-shadow: 0 2px 0 var(--line);
}
.kbd button:active { transform: translateY(2px); box-shadow: none; }
.kbd button.wide { flex-grow: 1.8; font-size: 14px; }
.kbd[hidden] { display: none; }
.kbd-toggle { display: block; margin: 10px auto 0; }
@media (pointer: fine) and (min-width: 1001px) { .kbd.auto { display: none; } }

.side-panel { display: grid; gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-family: var(--font-ui); }
.panel h2 { font: 700 20px var(--font-head); margin: 0 0 10px; }
.leaders { list-style: none; margin: 0; padding: 0; counter-reset: l; font-size: 15px; }
.leaders li { counter-increment: l; display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.leaders li::before { content: counter(l); width: 22px; color: var(--gold); font-weight: 700; }
.leaders li span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaders li .t { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); font-size: 14px; margin: 0; }
.help { font-size: 14px; color: var(--ink-2); margin: 0; padding-left: 18px; }
.help li { margin-bottom: 4px; }
kbd { font: 600 12px var(--font-ui); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--paper); }

/* диалог победы */
dialog.win { border: 0; border-radius: 20px; padding: 28px; max-width: min(420px, 100vw - 32px); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); text-align: center; font-family: var(--font-ui); }
dialog.win::backdrop { background: rgba(27, 21, 16, .55); }
dialog.win img { width: 120px; margin: -10px auto 6px; }
dialog.win h2 { font: 700 30px var(--font-head); }
dialog.win form { display: grid; gap: 10px; margin-top: 16px; }
dialog.win input { font: 17px var(--font-ui); padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font: 15px var(--font-ui); transition: .2s; z-index: 90; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }


/* ===== Для детей 1–3 класса: картинки, крупный текст, персонаж-помощник ===== */
.scene { margin: 4px 0 22px; border-radius: 14px; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--line); background: #f6ecd6; }
.scene img { width: 100%; height: auto; }
.chapter p { font-size: 20px; line-height: 1.75; }
.chapter-head img { background: #f6ecd6; border-radius: 50%; padding: 6px; border: 2px solid var(--line); }
@media (max-width: 560px) { .chapter p { font-size: 19px; } .chapter-head img { width: 54px; height: 54px; } }

.clues li { align-items: center; font-size: 16px; }
.clues li img.pic { width: 42px; height: 42px; flex: none; background: #fbf5e6; border-radius: 8px; padding: 3px; border: 1px solid var(--line); }
.clue-pic { width: 50px; height: 50px; flex: none; background: #fbf5e6; border-radius: 10px; padding: 3px; }
.clue-pic[hidden] { display: none; }
.cell.clue .q.pic { padding: 3px; background: #fbf5e6; }
.cell.clue .q.pic img { width: 100%; height: 100%; object-fit: contain; }
.cell.clue .q.pic.active { background: var(--cur); }
.cell.clue .q.pic.done img { opacity: .55; }
.cell.letter.good { background: var(--ok); animation: good .9s ease-out; }
@keyframes good { 25% { transform: scale(1.12); } }

.mascot {
  display: flex; align-items: flex-end; gap: 10px; flex: 1 1 320px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.mascot .cat-art { width: 70px; flex: none; transform-origin: bottom center; transition: transform .15s; }
.mascot:hover .cat-art { transform: rotate(-4deg) scale(1.04); }
.mascot.speaking .cat-art { animation: talk .45s ease-in-out infinite alternate; }
@keyframes talk { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-4px); } }
.puzzle-head .bubble {
  position: relative; display: block; background: var(--card); border: 2px solid var(--ink); border-radius: 16px;
  padding: 10px 14px; margin: 0 0 22px; font: 700 17px/1.35 var(--font-ui); color: var(--ink);
}
.mascot:not(.heard) .bubble { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-4px); } 90% { transform: translateY(1px); } }
.mascot .say-on, .mascot.speaking .say-idle { display: none; }
.mascot.speaking .say-on { display: inline-flex; align-items: center; gap: 8px; }
.mascot.speaking .bubble { background: var(--hl); }
.wave { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.wave i { width: 4px; height: 100%; border-radius: 2px; background: var(--red); animation: wave .8s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.puzzle-head .bubble::before { content: ""; position: absolute; left: -11px; bottom: 14px; border: 9px solid transparent; border-right-color: var(--ink); border-left: 0; }


#clue-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.clue-bar > button { flex: none; }
@media (max-width: 480px) { .clue-bar { gap: 6px; } .clue-bar .clue-pic { width: 42px; height: 42px; } .clue-bar b { padding: 2px 5px; } }
.clue-bar .clue-say { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #3b2a1a; font-size: 20px; padding: 0; }
.clue-bar .clue-say[hidden] { display: none; }
.clue-bar .clue-say.speaking { animation: pulse .9s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 35%, transparent); } }
#read-toggle[aria-pressed="false"] { opacity: .75; }

@media print {
  .site-header, .toolbar, .kbd, .kbd-toggle, .side-panel .panel.lb, .clue-bar, .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
  .cell.letter { background: #fff !important; }
  .cell.letter .ch { visibility: hidden; }
  .puzzle-layout { grid-template-columns: 1fr; }
  .clues ol { max-height: none; overflow: visible; }
}
