/* Sówka: system wizualny. Ciepły papier, sowi błękit, słońce, koral, mięta. Duże cele dotyku dla dzieci. */

@font-face { font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("../fonts/nunito-latin-wght-normal.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("../fonts/nunito-latin-ext-wght-normal.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: "Baloo 2"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/baloo-2-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/baloo-2-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Baloo 2"; font-style: normal; font-display: swap; font-weight: 800;
  src: url("../fonts/baloo-2-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-display: swap; font-weight: 800;
  src: url("../fonts/baloo-2-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F7EEDD;
  --paper-deep: #EFE1C6;
  --card: #FFFBF2;
  --ink: #2E3142;
  --ink-soft: #625E63;
  --line: #E5D6BA;
  --owl: #3F6E8C;
  --owl-dark: #2C5068;
  --owl-soft: #DCE8EC;
  --sun: #E9B145;
  --sun-soft: #F8EACB;
  --coral: #E26D55;
  --coral-dark: #B9472F;
  --coral-soft: #F8DCD2;
  --mint: #5A7A48;
  --mint-soft: #E2EBD6;
  --night: #1E2B3C;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 14px 34px -16px rgba(36, 48, 74, 0.35);
  --shadow-sm: 0 6px 16px -10px rgba(36, 48, 74, 0.4);
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-head: "Baloo 2", "Nunito", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 0.4em; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); font-weight: 700; }
p { margin: 0 0 0.8em; text-wrap: pretty; }
a { color: var(--owl-dark); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--owl); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- elementy wspólne ---------- */

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; }
.brand b { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.01em; }
.kicker { font-weight: 800; color: var(--coral-dark); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--owl); color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 4px 0 var(--owl-dark); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background 160ms;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--owl-dark); }
.btn--sun { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 #D9A21E; }
.btn--sun:active { box-shadow: 0 1px 0 #D9A21E; }
.btn--coral { background: var(--coral); box-shadow: 0 4px 0 var(--coral-dark); }
.btn--coral:active { box-shadow: 0 1px 0 var(--coral-dark); }
.btn--ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:active { transform: translateY(1px); box-shadow: inset 0 0 0 2px var(--owl); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.btn--big { min-height: 64px; padding: 16px 30px; font-size: 1.2rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.06); }
  .btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--owl); }
}

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2.5vw, 28px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--line); cursor: pointer; font-weight: 700; user-select: none;
}
.chip[aria-pressed="true"] { background: var(--owl-soft); border-color: var(--owl); color: var(--owl-dark); }
.chip--add { border-style: dashed; color: var(--ink-soft); }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .label, fieldset > legend { font-weight: 800; font-size: 0.95rem; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  background: #fff;
}
.textarea { min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--owl); outline: none; box-shadow: 0 0 0 4px var(--owl-soft); }
.help { font-size: 0.88rem; color: var(--ink-soft); }
.error-text { color: var(--coral-dark); font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
fieldset > legend { margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--owl); }

.lang-switch { display: inline-flex; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); padding: 3px; }
.lang-switch button { border: 0; background: transparent; min-width: 44px; min-height: 36px; border-radius: 999px; font-weight: 800; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.toast-area { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: min(520px, 100% - 32px); }
.toast { background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; animation: rise 240ms var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.ai-note { display: inline-flex; gap: 8px; align-items: center; font-size: 0.82rem; color: var(--ink-soft); }
.ai-note b { background: var(--ink); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 0.72rem; letter-spacing: 0.06em; }

/* ---------- pomocnicze ---------- */
.mt { margin-top: 10px; }
.stack { display: grid; gap: 10px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.label { display: block; font-size: 0.85rem; font-weight: 800; color: var(--ink-soft); margin-bottom: 6px; }
.plain { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.block { display: block; margin-top: 6px; }
.panel > * + *, .chapter > * + * { margin-top: 14px; }
.panel .busy + *, .panel h2 + * { margin-top: 6px; }
.tool { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; font-size: 1.3rem; }
.tool[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--owl-soft); }
.swatch { width: 28px; height: 28px; border-radius: 50%; display: block; }
.icon-btn--line { background: #fff; box-shadow: inset 0 0 0 2px var(--line); flex: 0 0 auto; width: 50px; height: 50px; }
figure.chapter__img { margin: 0; }
.chapter__img .busy img { width: 110px; }
.lead { font-size: 1.15rem; }
.foot b { color: var(--ink); }

/* ---------- strona główna ---------- */
.hero__img--small { margin-top: 20px; max-width: 520px; }
.form-grid--name { display: grid; gap: 0 12px; grid-template-columns: 1fr 120px; }
.textarea--short { min-height: 64px; }
.btn--wide { width: 100%; }
details.more { margin-top: 4px; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--ink-soft); min-height: 44px; display: flex; align-items: center; }
#create h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }

.top { padding: 16px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.hero { padding: clamp(16px, 3vw, 40px) 0 clamp(40px, 6vw, 80px); }
.hero__grid { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1fr 1.15fr; } }
.hero__img { border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); }
.hero__img img { width: 100%; height: auto; }
.hero .lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--ink-soft); max-width: 36ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.section { padding: clamp(40px, 6vw, 88px) 0; }
.section--tint { background: var(--paper-deep); }
.section__head { max-width: 640px; margin-bottom: 28px; }

.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { display: grid; gap: 6px; align-content: start; }
.feature img { width: 132px; height: 132px; margin: -6px 0 4px -6px; }
.feature p { color: var(--ink-soft); margin: 0; }

.principles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.principle { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); }
.principle .dot { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--sun-soft); }
.principle h3 { font-size: 1.12rem; margin-bottom: 2px; }
.principle p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

.split { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 0.8fr 1.2fr; } }
.split img { max-width: 320px; margin-inline: auto; }

.create { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .create { grid-template-columns: 0.75fr 1.25fr; } }
.create__aside img { width: 200px; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-section { border-top: 2px dashed var(--line); padding-top: 18px; margin-top: 6px; }
.form-section h3 { display: flex; gap: 10px; align-items: center; }

.links { display: grid; gap: 14px; }
.linkrow { display: grid; gap: 8px; background: #fff; border-radius: 18px; padding: 14px 16px; border: 2px solid var(--line); }
.linkrow__head { display: flex; gap: 10px; align-items: center; font-weight: 800; }
.linkrow code { font-size: 0.85rem; word-break: break-all; color: var(--ink-soft); }
.linkrow .chips { gap: 6px; }

.foot { padding: 32px 0 40px; color: var(--ink-soft); font-size: 0.9rem; border-top: 2px solid var(--line); }
.foot .wrap { display: grid; gap: 8px; }
.foot__legal { font-size: 0.8rem; }

/* ---------- pokój spotkania ---------- */

.busy { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 0; }
.busy img { width: 150px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.dots::after { content: "…"; display: inline-block; width: 1.2em; text-align: left; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.home-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.home-tile { display: grid; justify-items: center; gap: 4px; padding: 14px 10px; border-radius: 20px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; text-align: center; font-size: 1.05rem; }
.home-tile img { width: 96px; height: 96px; }
@media (hover: hover) and (pointer: fine) { .home-tile:hover { border-color: var(--owl); } }

.note { border-radius: 18px; padding: 14px 16px; background: var(--sun-soft); }
.note--owl { background: var(--owl-soft); }
.note--mint { background: var(--mint-soft); }
.note--coral { background: var(--coral-soft); }
.note b { display: block; margin-bottom: 2px; }
.adult-only { border: 2px dashed var(--owl); border-radius: 18px; padding: 14px 16px; background: #fff; }
.adult-only > .label { font-size: 0.78rem; font-weight: 800; color: var(--owl-dark); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px; }

/* historia */
.chapter { display: grid; gap: 14px; }
.chapter__img { position: relative; border-radius: 20px; overflow: hidden; background: var(--paper-deep); aspect-ratio: 3 / 2; display: grid; place-items: center; }
.chapter__img img { width: 100%; height: 100%; object-fit: cover; }
.chapter__img .ai-tag { position: absolute; right: 10px; bottom: 10px; background: rgba(36, 48, 74, 0.8); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: 8px; }
.chapter__text { font-size: clamp(1.12rem, 1rem + 0.5vw, 1.32rem); line-height: 1.65; white-space: pre-line; }
.chapter__meta { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .chapter__meta { grid-template-columns: 1fr 1fr; } }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choice { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 18px; border-radius: 20px; border: 3px solid var(--line); background: #fff; font-weight: 800; font-size: 1.1rem; text-align: left; cursor: pointer; }
.choice .emo { font-size: 2rem; }
.choice[aria-pressed="true"] { border-color: var(--owl); background: var(--owl-soft); }
@media (hover: hover) and (pointer: fine) { .choice:hover { border-color: var(--owl); } }
.prev-chapters summary { cursor: pointer; font-weight: 800; color: var(--ink-soft); min-height: 44px; display: flex; align-items: center; }
.prev-chapters .mini { padding: 10px 0; border-top: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row--between { justify-content: space-between; }
.idea { display: flex; gap: 8px; }
.idea .input { flex: 1; }

/* rysowanie */
.draw-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 20px; overflow: hidden; border: 3px solid var(--line); touch-action: none; }
.draw-wrap canvas, .draw-wrap .guide, .draw-wrap .guide-letter { position: absolute; inset: 0; width: 100%; height: 100%; }
.draw-wrap .guide { object-fit: contain; pointer-events: none; transition: opacity 320ms; }
.draw-wrap .guide-letter { display: grid; place-items: center; pointer-events: none; font-family: var(--font-head); font-weight: 800; color: transparent; -webkit-text-stroke: 3px #9AA6BD; line-height: 1; transition: opacity 320ms; }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.level { min-height: 56px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; padding: 6px; font-size: 0.92rem; }
.level[aria-pressed="true"] { background: var(--mint-soft); border-color: var(--mint); color: var(--mint); }
.lightbox { position: fixed; inset: 0; background: #fff; z-index: 90; display: grid; place-items: center; }
.lightbox img, .lightbox .guide-letter { width: 100vw; height: 100dvh; object-fit: contain; filter: contrast(1.6); }
.lightbox .guide-letter { display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: transparent; -webkit-text-stroke: 6px #000; }
.lightbox .close { position: fixed; right: 16px; top: 16px; }
.lightbox .hint { position: fixed; left: 16px; bottom: 16px; color: var(--ink-soft); font-weight: 700; }

/* poznaj, emocje, quiz, film */
.animal-head { display: flex; gap: 16px; align-items: center; }
.animal-head .big-emo { font-size: 4rem; line-height: 1; }
.facts { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; counter-reset: f; }
.facts li { background: #fff; border-radius: 16px; padding: 12px 16px 12px 52px; position: relative; border: 2px solid var(--line); font-size: 1.08rem; }
.facts li::before { counter-increment: f; content: counter(f); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-weight: 800; }
.cards3 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards3 { grid-template-columns: repeat(3, 1fr); } }

.emotions { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.emotion { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; min-height: 120px; border-radius: 20px; border: 3px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; }
.emotion .emo { font-size: 2.6rem; }
.emotion[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-soft); }
.target { text-align: center; padding: 14px; border-radius: 20px; background: var(--owl-soft); }
.target .emo { font-size: 4rem; }
.match-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.match { padding: 12px 14px; border-radius: 16px; background: #fff; border: 2px solid var(--line); font-weight: 800; }
.match.is-ok { border-color: var(--mint); background: var(--mint-soft); }

.quiz-q { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); line-height: 1.2; }
.answers { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .answers { grid-template-columns: repeat(3, 1fr); } }
.answer { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; min-height: 120px; border-radius: 22px; border: 3px solid var(--line); background: #fff; font-weight: 800; font-size: 1.15rem; cursor: pointer; text-align: center; }
.answer .emo { font-size: 2.4rem; }
.answer.is-correct { border-color: var(--mint); background: var(--mint-soft); }
.answer.is-wrong { border-color: var(--coral); background: var(--coral-soft); }
.answer.is-key { box-shadow: inset 0 0 0 3px var(--mint); }
.stars { font-size: 2rem; letter-spacing: 4px; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__shield { position: absolute; inset: 0; display: grid; align-items: end; justify-items: center; padding: 12px; }
.player__shield span { background: rgba(255, 253, 248, 0.92); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 0.9rem; }
.vlist { display: grid; gap: 8px; }
.vitem { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-weight: 700; }

/* koniec czasu */
.overlay { position: fixed; inset: 0; background: rgba(27, 36, 64, 0.55); display: grid; place-items: center; z-index: 70; padding: 16px; }
.overlay .card { max-width: 520px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.overlay .card img { width: 180px; }

/* ---------- książka ---------- */

body.book { background: var(--paper-deep); }
.book-wrap { width: min(860px, 100% - 32px); margin: 0 auto; padding: 28px 0 60px; display: grid; gap: 22px; }
.cover { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 36px 20px; }
.cover img { width: 170px; }
.page { background: var(--card); border-radius: 28px; padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); }
.page .chapter__text { font-size: 1.2rem; }
.page figure { margin: 0 0 16px; }
.page figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.gallery figure { margin: 0; background: #fff; border-radius: 18px; padding: 8px; border: 2px solid var(--line); }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media print {
  .book-actions, .bar, .tabs, .toast-area, .skip { display: none !important; }
  body.book { background: #fff; }
  .page { box-shadow: none; break-inside: avoid; border: 1px solid #ddd; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* start: opowiedz Sówce */
.tell {
  display: grid; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden;
  transition: border-color 160ms, box-shadow 160ms;
}
.tell:focus-within { border-color: var(--owl); box-shadow: 0 0 0 4px var(--owl-soft); }
.tell__text {
  width: 100%; min-height: 140px; padding: 14px 16px 6px; border: 0; background: transparent; resize: vertical;
  font: inherit; font-size: 1.05rem; color: inherit; outline: none;
}
.tell__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-top: 1px dashed var(--line); background: var(--paper); }
.tell__count { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tell__mic {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 16px 6px 12px; border-radius: 999px;
  border: 2px solid var(--coral); background: var(--card); color: var(--coral-dark); font: inherit; font-weight: 800; cursor: pointer;
  transition: background 160ms, color 160ms;
}
.tell__ico { font-size: 1.05rem; line-height: 1; }
.tell__dot { display: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.tell__mic:hover { background: var(--coral-soft); }
.tell__mic:focus-visible { outline: 3px solid var(--owl); outline-offset: 2px; }
.tell__mic[aria-pressed="true"] { background: var(--coral); color: #fff; }
.tell__mic[aria-pressed="true"] .tell__dot { display: inline-block; animation: tell-rec 1.2s ease-out infinite; }
.tell__mic[aria-pressed="true"] .tell__ico { display: none; }
@keyframes tell-rec { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9); } 100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }
#manual[open] summary { margin-bottom: 8px; }

/* faktura papieru jak w ręcznie malowanej książce (styl Sówki, brand/style/STYL.md) */
body:not(.room) { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); background-size: 180px; background-blend-mode: multiply; }
