/* QuickSpeak Książki: strona książki i czytnik.
   Kolory i kroje jak w pozostałych aplikacjach platformy (fiolet, limonka, morski; Englebert, Poppins, Inter).
   Czytnik: poziomo zdjęcie z lewej i tekst z prawej, pionowo zdjęcie tylko na otwarciu rozdziału.
   Tekst dzieli się na strony kolumnami CSS, kartka obraca się wokół lewej krawędzi (wzór: tryb czytania Biblii w Rok). */

:root {
	--purple: #4845B6;
	--purple-2: #5B58D6;
	--lime: #DEFD36;
	--teal: #18464C;
	--green: #39B688;
	--ink: #18464C;
	--muted: #6B7280;
	--line: #E5E7EB;
	--bg: #F4F5FB;
	--card: #FFFFFF;
	--soft: #F7F8FC;
	--shadow: 0 6px 24px rgba(24, 70, 76, .08);
	--paper: #FBF8F1;
	--paper-ink: #1E2A2C;
	--paper-line: #E9E3D6;
	--paper-card: #FFFFFF;
	--now: rgba(222, 253, 54, .6);
	--sel: rgba(72, 69, 182, .14);
	--gloss: #4845B6;
	--mark: #B9D400;
}

:root[data-theme="dark"] {
	--ink: #EEF0F4;
	--muted: #9AA3B2;
	--line: #2C313A;
	--bg: #121417;
	--card: #1B1E24;
	--soft: #22262E;
	--shadow: 0 6px 24px rgba(0, 0, 0, .35);
	--paper: #15171B;
	--paper-ink: #E8E6E0;
	--paper-line: #2A2E36;
	--paper-card: #1E2128;
	--now: rgba(91, 88, 214, .5);
	--sel: rgba(222, 253, 54, .13);
	--gloss: #A9A7F5;
	--mark: #DEFD36;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
[hidden] { display: none !important; }
html.rd-open, html.rd-open body { overflow: hidden; }

.boot { padding: 80px 24px; text-align: center; color: var(--muted); }
.display { font-family: 'Englebert', 'Poppins', sans-serif; font-weight: 400; letter-spacing: .01em; }
.eyebrow { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------------------------------------------------------------- strona książki */

.hd {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 10px;
	min-height: 56px; padding: env(safe-area-inset-top, 0px) 14px 0;
	background: var(--teal); color: #fff;
}
.hd__back { font: 600 15px 'Poppins', sans-serif; text-decoration: none; padding: 10px 4px; }
.hd__sync { margin-left: auto; font-size: 12px; opacity: .8; }
.hd__btn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 16px; }

.home { max-width: 980px; margin: 0 auto; padding: 18px 16px 120px; }
.hero { display: grid; gap: 18px; padding: 18px; border-radius: 24px; background: var(--purple); color: #fff; }
.hero__cover { position: relative; width: 100%; max-width: 280px; aspect-ratio: 3 / 4; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #111; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__cover span { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); font: 400 30px/1.05 'Englebert', sans-serif; }
.hero__txt .eyebrow { color: var(--lime); margin: 0 0 6px; }
.hero__txt h1 { font-size: 40px; }
.hero__txt p.blurb { margin: 10px 0 14px; font-size: 16px; line-height: 1.55; opacity: .95; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, .14); font: 600 12px 'Poppins', sans-serif; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 50px; padding: 0 22px; border: 0; border-radius: 16px;
	background: var(--card); color: var(--ink); text-decoration: none;
	font: 700 16px 'Poppins', sans-serif;
}
.btn.btn--lime { background: var(--lime); color: var(--teal); }
.btn.btn--ghost { background: rgba(255, 255, 255, .14); color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; }
@media (min-width: 760px) {
	.hero { grid-template-columns: 260px minmax(0, 1fr); align-items: center; padding: 28px; gap: 30px; }
	.hero__txt h1 { font-size: 54px; }
}

.sec { margin-top: 26px; }
.sec h2 { font: 700 18px 'Poppins', sans-serif; margin: 0 0 10px; }
.toc { list-style: none; margin: 0; padding: 0; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.toc li + li { border-top: 1px solid var(--line); }
.toc a, .toc div.toc__row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; min-height: 60px; }
.toc__n { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); font: 700 14px 'Poppins', sans-serif; }
.toc li.is-done .toc__n { background: var(--green); border-color: var(--green); color: #fff; }
.toc li.is-here .toc__n { background: var(--purple); border-color: var(--purple); color: #fff; }
.toc__t { flex: 1 1 auto; min-width: 0; font: 600 16px 'Poppins', sans-serif; }
.toc__m { flex: 0 0 auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.toc li.is-soon { opacity: .55; }

.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.marks li { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.marks a { flex: 1 1 auto; min-width: 0; text-decoration: none; }
.marks a small { display: block; color: var(--muted); font-size: 12px; }
.marks button { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--soft); }
.empty { padding: 16px; border-radius: 16px; background: var(--card); color: var(--muted); font-size: 14px; }
.credits { margin: 26px 0 0; color: var(--muted); font-size: 12px; }

.mini {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 25;
	display: flex; align-items: center; gap: 12px; max-width: 620px; margin: 0 auto; padding: 8px 14px 8px 8px;
	border-radius: 20px; background: var(--teal); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.mini button { flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--lime); color: var(--teal); font-size: 16px; }
.mini a { flex: 1 1 auto; min-width: 0; text-decoration: none; font: 600 14px 'Poppins', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini a small { display: block; font: 500 12px 'Inter', sans-serif; opacity: .75; }

.toast { position: fixed; left: 50%; bottom: 96px; z-index: 90; transform: translateX(-50%); max-width: 86vw; padding: 10px 16px; border-radius: 14px; background: #111; color: #fff; font-size: 14px; }

/* ----------------------------------------------------------------------- czytnik */

.rd {
	--rd-font: 20px;
	--rd-pad: clamp(18px, 5vw, 56px);
	position: fixed; inset: 0; z-index: 50;
	display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
	background: var(--paper); color: var(--paper-ink);
}
.rd.rd--land { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }
.rd__art { display: none; position: relative; overflow: hidden; background: #0d0f12; }
.rd--land .rd__art { display: block; }
.rd__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.rd__art img.is-changing { opacity: 0; }
.rd__art p { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 70px 28px 26px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font: 400 34px/1.05 'Englebert', sans-serif; }
.rd__art p small { display: block; margin-bottom: 6px; font: 700 12px 'Poppins', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }

.rd__page { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.rd__top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; border-bottom: 1px solid var(--paper-line); }
.rd__where { flex: 1 1 auto; min-width: 0; margin: 0; font: 600 13px 'Poppins', sans-serif; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd__tools { display: flex; gap: 6px; }
.rd .rd-btn {
	flex: 0 0 auto; min-width: 44px; height: 44px; padding: 0 12px;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	border: 1px solid var(--paper-line); border-radius: 14px; background: var(--paper-card); color: var(--paper-ink);
	font: 700 15px 'Poppins', sans-serif; text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.rd .rd-btn:disabled { opacity: .35; cursor: default; }
.rd .rd-btn[aria-pressed="true"] { border-color: var(--purple-2); background: var(--sel); }
.rd .rd-btn.rd-btn--play { min-width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: var(--lime); color: var(--teal); font-size: 18px; }
.rd .rd-btn.rd-btn--full { display: none; }
@media (min-width: 700px) { .rd .rd-btn.rd-btn--full { display: inline-flex; } }

.rd__view { position: relative; min-height: 0; overflow: hidden; perspective: 2200px; }
.rd__sheet {
	position: absolute; top: 0; right: 0; bottom: 0; left: 0;
	padding: clamp(14px, 3vh, 34px) var(--rd-pad);
	background: var(--paper);
	transform-origin: left center;
	-webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.rd__sheet--top { transition: transform .46s cubic-bezier(.45, .05, .25, 1); }
.rd__sheet::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .0) 60%, rgba(0, 0, 0, .16)); transition: opacity .46s ease; }
.rd__sheet--top.is-turning::after { opacity: 1; }
.rd__clip { height: 100%; overflow: hidden; }
.rd__flow {
	height: 100%;
	column-fill: auto;
	font: 400 var(--rd-font)/1.62 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
	-webkit-user-select: none; user-select: none;
}
.rd__flow p { margin: 0 0 .85em; orphans: 2; widows: 2; }

.rd-opening { break-inside: avoid; margin: 0 0 1.1em; }
.rd-opening__img { height: var(--rd-arth, 200px); margin: 0 0 18px; border-radius: 18px; overflow: hidden; background: #0d0f12; }
.rd-opening__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd--land .rd-opening__img { display: none; }
.rd__flow p.rd-kicker { display: inline-block; margin: 0 0 8px; padding: 4px 12px; border-radius: 99px; background: var(--lime); color: var(--teal); font: 700 12px 'Poppins', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.rd__flow h1.rd-title { margin: 0; font: 400 calc(var(--rd-font) * 1.9)/1.05 'Englebert', 'Poppins', sans-serif; }

.rd .s { border-radius: 6px; padding: 2px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; cursor: pointer; transition: background .18s ease; }
.rd .s.is-now { background: var(--now); }
.rd .s.is-sel { background: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.rd .s.is-mark { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.rd .g { font-style: normal; border-bottom: 2px dotted var(--gloss); cursor: help; }
/* zwroty "dodatkowe": dymek tylko w trybie "Więcej" tłumaczeń */
.rd:not(.rd--more) .g.g--x { border-bottom: 0; cursor: pointer; }
.rd .g.is-open { background: var(--sel); border-radius: 4px; }

.rd-end { break-inside: avoid; margin: 2.2em 0 0; padding: 22px 18px; border-radius: 20px; background: var(--paper-card); border: 1px solid var(--paper-line); text-align: center; }
.rd-end b { display: block; margin: 0 0 4px; font: 400 calc(var(--rd-font) * 1.35)/1.1 'Englebert', sans-serif; }
.rd-end span { display: block; margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.rd-end .rd-btn { margin: 4px; }
.rd-end .rd-btn.rd-btn--go { background: var(--purple); border-color: var(--purple); color: #fff; padding: 0 22px; height: 50px; }

.rd__bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--paper-line); }
.rd__mid { flex: 1 1 auto; min-width: 0; display: grid; gap: 5px; }
.rd__prog { height: 5px; border-radius: 99px; background: var(--paper-line); overflow: hidden; }
.rd__prog i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--purple-2); transition: width .3s ease; }
.rd__count { margin: 0; font: 600 12px 'Poppins', sans-serif; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rd__float { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 10px); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: none; }
.rd__bar { position: relative; }
.rd__float > * { pointer-events: auto; box-shadow: 0 8px 26px rgba(0, 0, 0, .22); }
.rd .rd-btn.rd-btn--pill { height: 46px; border-radius: 99px; padding: 0 16px; font-size: 14px; background: var(--teal); border-color: var(--teal); color: #fff; }
.rd .rd-btn.rd-btn--pill.is-on { background: var(--lime); border-color: var(--lime); color: var(--teal); }

.rd__tip {
	position: fixed; z-index: 70; max-width: min(320px, 86vw); padding: 9px 14px; border-radius: 14px;
	background: var(--purple); color: #fff; font: 600 15px/1.35 'Inter', sans-serif; box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
	pointer-events: none;
}
.rd__tip::after { content: ''; position: absolute; left: var(--tip-x, 50%); top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--purple); }
.rd__tip.is-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--purple); }

.rd__pop {
	position: absolute; z-index: 60; top: calc(60px + env(safe-area-inset-top, 0px)); right: 12px; width: min(300px, calc(100% - 24px));
	padding: 14px; border-radius: 20px; background: var(--paper-card); border: 1px solid var(--paper-line); box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
	display: grid; gap: 14px;
}
.rd__pop p { margin: 0 0 6px; font: 700 12px 'Poppins', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rd__row { display: flex; align-items: center; gap: 8px; }
.rd__row .rd-btn { flex: 1 1 0; }
.rd__size { flex: 0 0 56px; text-align: center; font: 700 15px 'Poppins', sans-serif; }
.rd__check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rd__check input { width: 20px; height: 20px; accent-color: var(--purple); }

.rd__toc { position: absolute; inset: 0; z-index: 65; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); }
.rd__toc-card { width: 100%; max-width: 560px; max-height: 82%; overflow: auto; padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0; background: var(--bg); color: var(--ink); }
.rd__toc-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
.rd__toc-head b { flex: 1 1 auto; font: 700 18px 'Poppins', sans-serif; }
.rd__toc-card .rd-btn { background: var(--card); border-color: var(--line); color: var(--ink); }
.rd__toc-card .rd__home { display: flex; width: 100%; margin-top: 12px; }
@media (min-width: 700px) {
	.rd__toc { align-items: center; }
	.rd__toc-card { border-radius: 24px; }
}

@media (max-width: 420px) {
	.rd .rd-btn { min-width: 42px; padding: 0 10px; }
	.rd__tools { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
	.rd__sheet--top, .rd__sheet::after { transition: none; }
}

/* ------------------------------------------------- ustawienie tłumaczeń, fiszki */

.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font: 600 14px 'Poppins', sans-serif; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font: 600 13px 'Poppins', sans-serif; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--purple); color: #fff; }
.btn.btn--purple { background: var(--purple); color: #fff; margin: 0 0 12px; }
.btn small { font: 600 12px 'Poppins', sans-serif; opacity: .8; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.btn.btn--soft { background: var(--soft); border: 1px solid var(--line); color: var(--ink); }

.home.home--narrow { max-width: 640px; }
.fc__h { font-size: 34px; margin: 6px 0 14px; }
.fc { padding: 22px 20px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.fc .eyebrow { margin: 0 0 14px; color: var(--purple-2); }
.fc__ctx { margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: var(--soft); font-size: 15px; text-align: left; }
.fc__ctx small { display: block; margin-bottom: 2px; font: 600 11px 'Poppins', sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fc__mini { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 11px; vertical-align: middle; }
.fc__text { margin: 6px 0 10px; font: 500 24px/1.4 'Inter', sans-serif; }
.fc__text.is-masked { letter-spacing: .04em; color: var(--muted); }
.fc__meta { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.fc__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fc__left { margin: 16px 0 0; font: 600 12px 'Poppins', sans-serif; color: var(--muted); }
.fc.fc--done .fc__text { font-size: 20px; }

/* --------------------------------- runda 3: wybór powtórki, quiz, powrót do czytania */

.toc li { display: flex; align-items: center; }
.toc li > a:first-child, .toc li > .toc__row { flex: 1 1 auto; min-width: 0; }
.toc a.toc__q { flex: 0 0 auto; min-height: 0; margin-right: 12px; padding: 7px 12px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); font: 700 12px 'Poppins', sans-serif; color: var(--purple-2); white-space: nowrap; }
.backnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.backnav .btn { margin: 0; flex: 1 1 200px; }
.fc__lbl { margin: 14px 0 8px; font: 700 12px 'Poppins', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; }
.fc.fc--setup { text-align: left; }
.fc.fc--setup .fc__meta { margin: 0; }
.fc.fc--setup .fc__btns { margin-top: 18px; justify-content: stretch; }
.fc.fc--setup .fc__btns .btn { flex: 1 1 auto; }
.modes { display: grid; gap: 8px; }
@media (min-width: 560px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { display: block; width: 100%; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--soft); text-align: left; }
.mode b { display: block; font: 700 15px 'Poppins', sans-serif; }
.mode span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.mode[aria-pressed="true"] { border-color: var(--purple-2); background: var(--card); }
.fc__btns.fc__btns--top { margin-bottom: 12px; }
.qz__q { margin: 0 0 16px; font: 500 22px/1.4 'Inter', sans-serif; }
.qz__opts { display: grid; gap: 8px; width: 100%; }
.qz__opts .btn { justify-content: flex-start; text-align: left; min-height: 52px; height: auto; padding: 10px 16px; font: 500 16px/1.35 'Inter', sans-serif; }
.qz__in { flex: 1 1 180px; min-height: 50px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--soft); color: var(--ink); font: 500 18px 'Inter', sans-serif; }
.qz__in:focus { outline: none; border-color: var(--purple-2); }
.qz__fb { margin: 14px 0 0; font: 700 16px 'Poppins', sans-serif; }
.qz__fb.is-ok { color: var(--green); }
.qz__fb.is-no { color: #D9534F; }
.qz__more { margin: 6px 0 0; font-size: 16px; }
.qz__more.qz__more--ans { margin: 0 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--soft); font: 500 20px/1.4 'Inter', sans-serif; }
.qz__say { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.qz .fc__btns + .fc__btns { margin-top: 16px; }
.btn[disabled] { opacity: .55; }

/* ------------------------------------ runda 4: kafle ćwiczeń, pytanie w fiszce, podsumowanie quizu */

.tiles { display: grid; gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { display: block; padding: 16px 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; }
.tile b { display: block; font: 700 16px 'Poppins', sans-serif; }
.tile span { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }
.tile i { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 99px; background: var(--purple); color: #fff; font: 700 13px 'Poppins', sans-serif; font-style: normal; }
.tile__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); font: 700 13px 'Poppins', sans-serif; color: var(--purple-2); text-decoration: none; }
details.more { margin-top: 22px; }
details.more summary { cursor: pointer; padding: 12px 4px; font: 700 15px 'Poppins', sans-serif; color: var(--muted); }
details.more .marks { margin-top: 6px; }
.fc__ctx.fc__ctx--q { font: 500 18px/1.45 'Inter', sans-serif; text-align: center; }
.qz__q .fc__mini { margin-left: 4px; }
.qlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qlog li { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font-size: 16px; }
.qlog li > span { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.qlog li.is-ok > span { background: var(--green); border-color: var(--green); color: #fff; }
.qlog small { display: block; margin-bottom: 2px; font-size: 13px; color: var(--muted); }


/* ------------------------------------ runda 9: ekran zakończenia książki */

.fin { padding: 30px 22px; border-radius: 24px; background: var(--purple); color: #fff; text-align: center; }
.fin .eyebrow { color: var(--lime); margin: 0 0 8px; }
.fin h1 { margin: 0; font-size: 46px; line-height: 1.05; }
.fin p.blurb { margin: 10px 0 16px; font-size: 17px; line-height: 1.5; }
.fin .chips { justify-content: center; margin: 0; }
.tiles.tiles--one { grid-template-columns: 1fr; }
.tile .btn { margin-top: 12px; min-height: 44px; font-size: 14px; }
.fin__back { margin: 22px 0 0; text-align: center; font: 600 14px 'Poppins', sans-serif; color: var(--muted); }
.fin__back a { color: inherit; }
.fin__lead { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ------------------------------------ runda 16: wybór ścieżki, słuchanie bez tekstu, powtarzanie za lektorem */

.way__opts { display: grid; gap: 8px; }
@media (min-width: 640px) { .way__opts { grid-template-columns: 1fr 1fr; } }
.way__opt { display: block; width: 100%; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; }
.way__opt b { display: block; font: 700 15px 'Poppins', sans-serif; }
.way__opt span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.way__opt[aria-pressed="true"] { border-color: var(--purple-2); box-shadow: var(--shadow); }
.way__opt[aria-pressed="true"] b::after { content: ' ✓'; color: var(--purple-2); }

.lab__ch { margin: -6px 0 14px; color: var(--muted); }
.fc.lab__card { text-align: left; }
.lab__h { margin: 0 0 8px; font: 700 18px 'Poppins', sans-serif; }
.lab__tip { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.lab__steps, .lab__qs { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.45; }
.lab__qs { padding: 12px 14px 12px 34px; border-radius: 16px; background: var(--soft); font-size: 15px; }
.lab__card .fc__btns { justify-content: flex-start; }
.lab__player { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.lab__play { flex: 0 0 60px; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--lime); color: var(--teal); font-size: 20px; cursor: pointer; }
.lab__meta { flex: 1 1 auto; min-width: 0; }
.lab__prog { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.lab__prog i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--purple-2); transition: width .3s linear; }
.lab__count { display: block; margin-top: 6px; font: 600 12px 'Poppins', sans-serif; color: var(--muted); }
.lab__player .btn { flex: 0 0 auto; min-height: 44px; font-size: 13px; }
.btn.is-on { background: var(--lime); border-color: var(--lime); color: var(--teal); }
.lab__strips { max-height: 300px; overflow: auto; margin: 0 0 18px; padding: 14px; border-radius: 16px; background: var(--soft); }
.lab__strips p { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.lab__strips p + p { margin-top: 14px; }
.lab__strips i { display: block; height: 12px; border-radius: 99px; background: var(--line); transition: background .2s; }
.lab__strips i.is-past { background: var(--muted); opacity: .45; }
.lab__strips i.is-now { background: var(--purple-2); }
.lab__strips.is-tap i { cursor: pointer; height: 16px; }
.lab__sum { margin: 14px 0 18px; padding: 12px 16px; border-radius: 16px; background: var(--soft); list-style: none; display: grid; gap: 6px; font-size: 15px; text-align: left; }
.lab__card.fc--done { text-align: center; }
.lab__card.fc--done .fc__btns { justify-content: center; }
.lab__skip { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.lab__skip a { color: var(--purple-2); font-weight: 700; }

/* pauza na powtórzenie zdania: pasek nad odtwarzaczem czytnika */
.rd__gap { position: absolute; left: 0; right: 0; bottom: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px 11px; background: var(--paper-card); border-top: 1px solid var(--paper-line); box-shadow: 0 -8px 22px rgba(0, 0, 0, .10); }
.rd__gap[hidden] { display: none; }
.rd__gap span { flex: 1 1 auto; min-width: 0; font: 700 14px/1.3 'Poppins', sans-serif; color: var(--purple-2); }
.rd .rd__gap .rd-btn { flex: 0 0 auto; height: 36px; min-width: 0; padding: 0 12px; border-radius: 99px; font-size: 13px; }
.rd__gap i { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--purple-2); }
.rd__bar.is-gap .rd__float { bottom: calc(100% + 64px); }

/* ------------------------------------ runda 20: wersja pokazowa (kłódki) i okno oferty */

.lockbox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.lockbox p { flex: 1 1 260px; margin: 0; font-size: 15px; line-height: 1.45; }
.lockbox .btn { flex: 0 0 auto; }
.toc li.is-locked { opacity: 1; }
.toc .toc__lock { display: flex; align-items: center; width: 100%; border: 0; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font: inherit; }
.toc li.is-locked .toc__t { color: var(--muted); }
.toc li.is-locked .toc__m { color: var(--purple-2); font-weight: 700; }
.rd__toc li.is-locked a { color: var(--muted); }

.offer { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center; padding: 12px; background: rgba(12, 16, 22, .62); overflow: auto; }
@media (min-width: 640px) { .offer { align-items: center; } }
.offer__card { position: relative; width: 100%; max-width: 480px; padding: 24px 20px 18px; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .4); }
.offer__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 15px; cursor: pointer; }
.offer .eyebrow { margin: 0 0 6px; color: var(--purple-2); }
.offer h2 { margin: 0 44px 8px 0; font-size: 30px; line-height: 1.1; }
.offer__lead { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.offer__pool { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--lime); color: var(--teal); font: 700 14px/1.4 'Poppins', sans-serif; }
.offer__opt { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--soft); color: var(--ink); text-decoration: none; }
.offer__opt.offer__opt--best { margin-top: 22px; border-color: var(--purple-2); background: var(--card); }
.offer__tag { position: absolute; top: -12px; left: 14px; padding: 3px 12px; border-radius: 99px; background: var(--purple-2); color: #fff; font: 700 12px 'Poppins', sans-serif; }
.offer__txt { flex: 1 1 auto; min-width: 0; }
.offer__txt b { display: block; font: 700 17px 'Poppins', sans-serif; }
.offer__txt span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.offer__pay { flex: 0 0 auto; text-align: right; }
.offer__pay em { display: block; font-style: normal; font: 700 20px 'Poppins', sans-serif; white-space: nowrap; }
.offer__pay em s { font-weight: 500; font-size: 14px; color: var(--muted); }
.offer__pay i { display: inline-block; margin-top: 6px; padding: 7px 14px; border-radius: 99px; background: var(--lime); color: var(--teal); font: 700 13px 'Poppins', sans-serif; font-style: normal; white-space: nowrap; }
.offer__foot { margin: 12px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* Zamknięte rozdziały w spisie: ta sama wysokość i odstępy co otwarte. */
.toc .toc__lock { gap: 12px; padding: 14px 16px; min-height: 60px; }
/* Poziom: każdy ma swój kolor (ten sam w bibliotece i na pudełkach). */
.chip--lv { font-weight: 700; }
.chip--lv1 { background: #39B688; color: #fff; }
.chip--lv2 { background: #8FA8F6; color: #1A1F30; }
.chip--lv3 { background: #1A1F30; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
/* Informacja o głosie automatycznym do czasu nagrań lektora */
.lockbox--draft p { margin: 0; }
.offer__note { margin: -6px 0 14px; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--soft); border-radius: 12px; padding: 10px 12px; }
/* Koniec rozdziału, gdy karta zakończenia jest na następnej stronie */
.rd__flow p.rd-endmark { margin: 1.4em 0 0; text-align: center; break-inside: avoid; }
/* Słuchanie ciągłe: następna historia */
.nb { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: flex-end; justify-content: center; padding: 12px; background: rgba(12, 16, 22, .62); }
.nb__card { width: 100%; max-width: 480px; padding: 24px 20px 18px; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .4); text-align: center; }
.nb__card h2 { margin: 6px 0 8px; }
.nb__blurb { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.nb__in { margin: 0 0 14px; font-weight: 600; }
.nb__row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (min-width: 700px) { .nb { align-items: center; } }
/* Tryb „Wszystko”: każde zdanie ma tłumaczenie; dymek zdania jest szerszy niż dymek zwrotu */
.rd.rd--all .rd__tip { max-width: min(420px, 90vw); font-weight: 500; }
/* Przyciski nad paskiem (po dotknięciu zdania): mniejsze, żeby nie zasłaniały tekstu */
.rd__float { gap: 6px; left: 8px; right: 8px; }
.rd .rd-btn.rd-btn--pill { height: 38px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
/* Strona książki na telefonie: mała okładka obok tytułu, opis i przyciski wyżej (mniej przewijania) */
@media (max-width: 759px) {
	.hero { grid-template-columns: 92px minmax(0, 1fr); column-gap: 14px; row-gap: 0; padding: 14px; }
	.hero__txt { display: contents; }
	.hero__cover { grid-column: 1; grid-row: 1 / span 2; width: 92px; max-width: none; margin: 0; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); align-self: start; }
	.hero__cover span { display: none; }
	.hero__txt .eyebrow { grid-column: 2; grid-row: 1; align-self: end; font-size: 11px; margin: 0 0 4px; }
	.hero__txt h1 { grid-column: 2; grid-row: 2; align-self: start; font-size: 32px; line-height: 1.02; margin: 0; }
	.hero__txt p.blurb, .hero__txt .chips, .hero__txt .hero__cta { grid-column: 1 / -1; }
	.hero__txt p.blurb { margin: 12px 0 10px; font-size: 15px; line-height: 1.5; }
	.hero__txt .chips { margin-bottom: 12px; }
	.hero__cta .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
}
/* Ćwiczenia w zakładkach */
.ptabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; padding-bottom: 2px; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 13px 'Poppins', sans-serif; cursor: pointer; }
.ptabs button[aria-selected="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.ppanel { padding: 16px 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.ppanel[hidden] { display: none; }
.ppanel > p { margin: 0; font-size: 14px; color: var(--muted); }
.ppanel .btn { margin-top: 12px; min-height: 44px; font-size: 14px; }
/* Pod tytułem: poziom i czas (na telefonie obok okładki); szczegóły w boksie "O książce" */
@media (max-width: 759px) {
	.hero__txt .chips { grid-column: 2; grid-row: 3; align-self: start; margin: 8px 0 0; }
	.hero__txt p.blurb { grid-row: 4; }
	.hero__txt .hero__cta { grid-row: 5; }
	.hero__cover { grid-row: 1 / span 3; }
}
.about dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; padding: 16px 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; }
.about dt { color: var(--muted); font-weight: 600; }
.about dd { margin: 0; }

/* podpowiedź o shadowingu pod przełącznikiem pauz i w zakładce Powtarzanie */
.rd__pop p.rd__shtip, .rd__shtip { margin: -4px 0 0 30px; font-family: inherit; font-weight: 400; font-size: 13px; line-height: 1.45; letter-spacing: 0; text-transform: none; color: var(--muted); }
.ppanel > p + p { margin-top: 8px; }
/* Pomysły z porównania ze StoryLearning (2026-10-23) */
/* "Znasz to!": zwrot z zapisanego zdania wraca w tekście */
.rd .g.g--known, .rd mark.kn { background: linear-gradient(transparent 58%, rgba(57, 182, 136, .30) 0); color: inherit; border-radius: 2px; cursor: help; }
.rd mark.kn.is-open, .rd .g.g--known.is-open { background: var(--sel); }
.rd-end .rd-end__kn { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--green); }
.rd__tip { white-space: pre-line; }
/* Tłumaczenia wyłączone: bez podkreśleń i bez dymków */
.rd.rd--off .g, .rd.rd--off .g.g--x { border-bottom: 0; cursor: inherit; }
.rd.rd--off .g.g--known, .rd.rd--off mark.kn { background: none; cursor: inherit; }
.rd__pop .rd__row { flex-wrap: wrap; }
/* Ocena historii */
.rate { margin: 18px auto 0; max-width: 420px; text-align: center; }
.rate__q { margin: 0 0 8px; font-weight: 700; font-size: 15px; }
.rate__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rate .rd-btn[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.rate__d p { margin: 12px 0 8px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.rate__d .rate__go { display: inline-flex; align-items: center; text-decoration: none; }
/* Dzienny cel */
.goal { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.goal__bar { flex: 1; height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.goal__bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.goal span { white-space: nowrap; font-weight: 600; }
.goal.is-done span { color: var(--green); }
.rd__toc-card .goal { margin: 0 0 12px; background: var(--paper); border-color: var(--paper-line); }
.rd__pop .rd__row .rd-btn { flex: 1 0 auto; padding: 0 10px; font-size: 14px; }
.fin .rate .rd-btn {
	min-width: 44px; height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid rgba(255, 255, 255, .28); border-radius: 14px; background: rgba(255, 255, 255, .12); color: #fff; font: 700 15px 'Poppins', sans-serif; text-decoration: none; cursor: pointer;
}
.fin .rate .rd-btn[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--teal); }
.fin .rate__d p { color: rgba(255, 255, 255, .88); }
/* "Wszystko": każde zdanie da się przetłumaczyć, więc każde jest podkreślone */
.rd.rd--all .s { text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--gloss) 60%, transparent); text-decoration-thickness: 1px; text-underline-offset: 6px; cursor: pointer; }
.rd.rd--all .s.is-mark { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 5px; }
/* czas dziś obok numeru strony */
.rd__time { display: block; margin: 1px 0 0; font: 600 11px 'Poppins', sans-serif; color: var(--muted); white-space: nowrap; }
.rd__time.is-done { color: var(--green); }
/* Znane słowa i zwroty: zielony kolor tekstu zamiast drugiego podkreślenia (tryb "Wszystko" podkreśla już zdania) */
.rd mark.kn, .rd .g.g--known { background: none; color: color-mix(in srgb, var(--green) 80%, var(--paper-ink)); }
.rd mark.kn.is-open, .rd .g.g--known.is-open { background: var(--sel); }
.rd.rd--off mark.kn, .rd.rd--off .g.g--known { color: inherit; }
/* czas dziś w jednej linii z numerem strony */
.rd__mid { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; }
.rd__prog { grid-column: 1 / -1; }
.rd__time { display: block; margin: 0; text-align: right; font-size: 12px; }
