/* QuickSpeak Music (wspólny wygląd z Mikrodialogami)
   Ten sam klimat co "400+ zwrotów": fiolet, limonka, morski, Englebert w nagłówkach. */

:root {
	--purple: #4845B6;
	--purple-2: #5B58D6;
	--lime: #DEFD36;
	--teal: #18464C;
	--green: #39B688;
	--red: #E5484D;
	--amber: #F5A524;
	--ink: #18464C;
	--muted: #6B7280;
	--line: #E5E7EB;
	--bg: #F4F5FB;
	--card: #FFFFFF;
	--soft: #F7F8FC;
	--them: #FFFFFF;
	--you: #4845B6;
	--you-ink: #FFFFFF;
	--shadow: 0 6px 24px rgba(24, 70, 76, .08);
	--r: 20px;
	--tabs-h: 64px;
	--hd-h: 56px;
}

:root[data-theme="dark"] {
	--ink: #EEF0F4;
	--muted: #9AA3B2;
	--line: #2C313A;
	--bg: #121417;
	--card: #1B1E24;
	--soft: #22262E;
	--them: #22262E;
	--you: #5B58D6;
	--shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

* { 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;
	padding-top: calc(var(--hd-h) + env(safe-area-inset-top, 0px));
	padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.15; }

.display { font-family: 'Englebert', 'Poppins', sans-serif; font-weight: 400; letter-spacing: .01em; }

/* ---------------- Header ---------------- */
.hd {
	position: fixed; top: 0; left: 0; right: 0; z-index: 50;
	height: calc(var(--hd-h) + env(safe-area-inset-top, 0px));
	padding: env(safe-area-inset-top, 0px) 12px 0;
	display: flex; align-items: center; gap: 10px;
	background: var(--teal); color: #fff;
	font-family: 'Poppins', sans-serif; font-size: 14px;
	box-shadow: 0 2px 12px rgba(24, 70, 76, .25);
}
.hd__back { color: #fff; text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.hd__back:hover { background: rgba(255,255,255,.12); }
.hd__title { flex: 1 1 auto; min-width: 0; text-align: center; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd__right { display: flex; align-items: center; gap: 8px; }
.hd__streak { background: rgba(255,255,255,.12); padding: 6px 10px; border-radius: 99px; font-weight: 700; white-space: nowrap; }
.hd__sync { font-size: 13px; opacity: .85; min-width: 18px; text-align: center; }
.hd__sync[data-state="offline"], .hd__sync[data-state="error"], .hd__sync[data-state="auth"] { color: #FFD166; }
.hd__gear { border: 0; background: rgba(255,255,255,.12); width: 36px; height: 36px; border-radius: 50%; font-size: 16px; }

/* ---------------- Layout ---------------- */
.main { max-width: 760px; margin: 0 auto; padding: 16px 16px 24px; outline: none; }
.boot { padding: 60px 0; text-align: center; color: var(--muted); }

.card {
	background: var(--card); border-radius: var(--r); padding: 20px;
	box-shadow: var(--shadow); border: 1px solid var(--line);
	margin-bottom: 14px;
}
.eyebrow { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1 1 auto; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0; border-radius: 14px; padding: 13px 20px;
	font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px;
	background: var(--purple); color: #fff; text-decoration: none;
	transition: transform .08s ease, background .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--lime { background: var(--lime); color: var(--teal); }
.btn--ghost { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.btn--green { background: var(--green); }
.btn--red { background: var(--red); }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 16px 22px; font-size: 17px; border-radius: 16px; }
.btn--sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 600; font-family: 'Poppins', sans-serif; }
.chip--lime { background: var(--lime); color: var(--teal); border-color: transparent; }
.chip--green { background: var(--green); color: #fff; border-color: transparent; }

.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s ease; }
.bar--lime > i { background: var(--lime); }

/* ---------------- Home ---------------- */
.hero {
	background: var(--purple); color: #fff; border-radius: 24px; padding: 22px;
	position: relative; overflow: hidden; margin-bottom: 14px;
	box-shadow: 0 12px 34px rgba(72, 69, 182, .35);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero h1 { font-size: 34px; margin: 4px 0 6px; }
.hero h1 .hl { color: var(--lime); }
.hero p { margin: 0 0 16px; opacity: .92; }
.hero .eyebrow { color: rgba(255,255,255,.75); }
.hero__stats { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.hero__stat { background: rgba(255,255,255,.12); border-radius: 14px; padding: 8px 12px; font-size: 13px; }
.hero__stat b { display: block; font-size: 18px; font-family: 'Poppins', sans-serif; }

.goal { display: flex; align-items: center; gap: 14px; }
.goal__ring { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-family: 'Poppins', sans-serif; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; text-decoration: none; box-shadow: var(--shadow); display: block; }
.tile b { display: block; font-family: 'Poppins', sans-serif; font-size: 16px; margin: 6px 0 2px; }
.tile .emoji { font-size: 24px; }
.tile .badge { float: right; }

.scenes { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .scenes { grid-template-columns: 1fr 1fr; } }
.scene {
	display: flex; gap: 12px; align-items: center; text-decoration: none;
	background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
	box-shadow: var(--shadow);
}
.scene__emoji { flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--soft); }
.scene__body { flex: 1 1 auto; min-width: 0; }
.scene__title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; }
.scene__sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.scene__count { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.scene.is-done .scene__emoji { background: var(--green); }

.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.section-h h2 { font-size: 26px; }

/* ---------------- Scene ---------------- */
.dlist { list-style: none; margin: 0; padding: 0; }
.dlist a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.dlist li:last-child a { border-bottom: 0; }
.dlist__dot { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid var(--line); color: var(--muted); }
.dlist__dot[data-s="1"] { border-color: var(--amber); color: var(--amber); }
.dlist__dot[data-s="2"] { background: var(--green); border-color: var(--green); color: #fff; }
.dlist__t { font-weight: 600; }
.dlist__s { font-size: 13px; color: var(--muted); }
.dlist__go { margin-left: auto; color: var(--muted); }

/* ---------------- Dialog ---------------- */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps button { flex: 1 1 0; border: 0; border-radius: 12px; padding: 10px 6px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; background: var(--soft); color: var(--muted); }
.steps button[aria-current="step"] { background: var(--purple); color: #fff; }
.steps button.is-done { color: var(--green); }
.steps button.is-done::before { content: "✓ "; }

.situation { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.situation b { font-family: 'Poppins', sans-serif; }

.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bubble {
	max-width: 86%; padding: 12px 14px; border-radius: 18px; position: relative;
	background: var(--them); border: 1px solid var(--line); align-self: flex-start;
	box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .2s ease, transform .2s ease;
}
.bubble--you { align-self: flex-end; background: var(--you); color: var(--you-ink); border-color: transparent; }
.bubble__who { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; font-family: 'Poppins', sans-serif; }
.bubble__en { font-size: 17px; font-weight: 600; }
.bubble__pl { font-size: 13px; opacity: .75; margin-top: 4px; }
.bubble.is-playing { box-shadow: 0 0 0 3px var(--lime); transform: scale(1.01); }
.bubble .key { background: var(--lime); color: var(--teal); padding: 0 4px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.bubble--you .key { background: var(--lime); color: var(--teal); }
.bubble__play { position: absolute; right: -8px; bottom: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--lime); color: var(--teal); font-size: 12px; box-shadow: var(--shadow); }
.bubble--you .bubble__play { right: auto; left: -8px; }
.hide-pl .bubble__pl { display: none; }

.extra { border-radius: 16px; padding: 14px; margin-bottom: 12px; font-size: 15px; }
.extra--alt { background: var(--soft); border: 1px dashed var(--line); }
.extra--tip { background: #FFF7D6; color: #5B4A00; border: 1px solid #F3E3A0; }
:root[data-theme="dark"] .extra--tip { background: #3A331A; color: #F3E3A0; border-color: #5C4F1F; }
.extra h4 { margin: 0 0 6px; font-family: 'Poppins', sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.alt-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.icon-btn { border: 0; background: var(--card); border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; font-size: 14px; }

/* Twoja kolej */
.turn { text-align: center; }
.turn__cue { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.turn__pl { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; margin: 0 0 14px; }
.turn__hint { font-size: 15px; color: var(--muted); min-height: 24px; margin-bottom: 12px; }
.mic {
	width: 96px; height: 96px; border-radius: 50%; border: 0; margin: 6px auto 12px; display: grid; place-items: center;
	background: var(--purple); color: #fff; font-size: 38px; box-shadow: 0 10px 30px rgba(72,69,182,.4);
}
.mic.is-listening { background: var(--red); animation: pulse 1.2s ease infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.5); } 70% { box-shadow: 0 0 0 22px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.result { border-radius: 16px; padding: 14px; margin: 12px 0; text-align: left; }
.result--ok { background: rgba(57,182,136,.12); border: 1px solid rgba(57,182,136,.4); }
.result--meh { background: rgba(245,165,36,.12); border: 1px solid rgba(245,165,36,.4); }
.result__en { font-size: 18px; font-weight: 700; }
.w-hit { color: var(--green); }
.w-miss { color: var(--red); text-decoration: underline wavy; text-underline-offset: 3px; }
.heard { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Quiz */
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.q-head .bar { flex: 1 1 auto; }
.q-type { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; color: var(--purple); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
:root[data-theme="dark"] .q-type { color: #A9A7FF; }
.q-prompt { font-size: 20px; font-weight: 700; margin-bottom: 6px; font-family: 'Poppins', sans-serif; }
.q-sub { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt {
	text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px 16px; font-size: 16px; font-weight: 600;
	transition: border-color .15s ease, background .15s ease;
}
.opt:hover { border-color: var(--purple-2); }
.opt.is-right { border-color: var(--green); background: rgba(57,182,136,.12); }
.opt.is-wrong { border-color: var(--red); background: rgba(229,72,77,.1); }
.opt:disabled { cursor: default; }
.blank { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--purple); margin: 0 4px; }
.tiles-ans { min-height: 56px; border: 2px dashed var(--line); border-radius: 16px; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tiles-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wtile { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; font-weight: 600; box-shadow: var(--shadow); }
.wtile[disabled] { opacity: .25; }
.order-item { display: flex; gap: 10px; align-items: center; width: 100%; }
.order-item .num { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.feedback { margin-top: 12px; border-radius: 16px; padding: 12px 14px; font-weight: 600; }
.feedback--ok { background: rgba(57,182,136,.14); color: var(--green); }
.feedback--bad { background: rgba(229,72,77,.12); color: var(--red); }
.feedback .fix { display: block; color: var(--ink); font-weight: 500; margin-top: 4px; }

/* Fiszki */
.fcard {
	min-height: 280px; border-radius: 24px; padding: 24px; display: flex; flex-direction: column; justify-content: center; text-align: center;
	background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 14px;
}
.fcard__situ { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.fcard__them { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.fcard__cue { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; }
.fcard__ans { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.fcard__en { font-size: 22px; font-weight: 800; color: var(--purple); }
:root[data-theme="dark"] .fcard__en { color: #A9A7FF; }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rate .btn { padding: 12px 6px; font-size: 14px; flex-direction: column; gap: 2px; }
.rate small { font-weight: 500; opacity: .8; font-size: 11px; }

/* Postępy */
.big { font-family: 'Poppins', sans-serif; font-size: 44px; font-weight: 800; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 620px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: 'Poppins', sans-serif; font-size: 24px; }
.stat span { font-size: 13px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.cal i { aspect-ratio: 1; border-radius: 6px; background: var(--line); }
.cal i[data-l="1"] { background: rgba(57,182,136,.45); }
.cal i[data-l="2"] { background: var(--green); }
.cal i.is-today { outline: 2px solid var(--purple); outline-offset: 1px; }

/* Trening */
.session-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.session-top .bar { flex: 1 1 auto; }
.done-hero { text-align: center; padding: 30px 10px; }
.done-hero .display { font-size: 42px; color: var(--purple); }
:root[data-theme="dark"] .done-hero .display { color: #A9A7FF; }
.done-hero .emoji { font-size: 60px; }

/* ---------------- Rytm tygodnia (bez serii, bez czerwieni) ---------------- */
:root { --c1: #4845B6; --c2: #23946A; }
:root[data-theme="dark"] { --c1: #8683F0; --c2: #2F9C73; }
.wdots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.wdot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); }
.wdot i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: transparent; }
.wdot[data-s="full"] i { background: var(--green); border-color: var(--green); }
.wdot[data-s="light"] i { background: linear-gradient(90deg, var(--green) 50%, transparent 50%); border-color: var(--green); }
.wdot[data-s="future"] i { border-style: dashed; opacity: .6; }
.wdot[data-today] { color: var(--ink); }
.wdot[data-today] i { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--purple); }
.hero__week { background: rgba(255,255,255,.1); border-radius: 16px; padding: 12px; margin: 0 0 14px; position: relative; z-index: 1; }
.hero__week .wdot { color: rgba(255,255,255,.75); }
.hero__week .wdot[data-today] { color: #fff; }
.hero__week .wdot i { border-color: rgba(255,255,255,.35); }
.hero__week .wdot[data-s="full"] i { background: var(--lime); border-color: var(--lime); }
.hero__week .wdot[data-s="light"] i { background: linear-gradient(90deg, var(--lime) 50%, transparent 50%); border-color: var(--lime); }
.hero__week .wdot[data-today] i { box-shadow: 0 0 0 2px var(--purple), 0 0 0 4px #fff; }
.hero .btn { position: relative; z-index: 1; }

.note { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 15px; }
.note > span { flex: 1 1 auto; }
.note .btn { flex: 0 0 auto; }
.note--done { border-color: rgba(57,182,136,.5); background: rgba(57,182,136,.08); }
.note--nudge, .note--back { border-color: rgba(72,69,182,.35); background: rgba(72,69,182,.06); }
:root[data-theme="dark"] .note--nudge, :root[data-theme="dark"] .note--back { background: rgba(134,131,240,.1); }

.report__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 8px; }
.report__grid > div { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.report__grid b { display: block; font-family: 'Poppins', sans-serif; font-size: 20px; }
.report__grid span { font-size: 12px; color: var(--muted); }
.done-hero .report__grid { text-align: left; }

.tile--react { background: var(--teal); color: #fff; border-color: transparent; }
.tile--react .muted { color: rgba(255,255,255,.75); }

/* Trening dnia: wybór energii */
.energy { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; text-decoration: none; background: var(--soft); }
.energy:hover, .energy:focus-visible { border-color: var(--purple); }
.energy__e { font-size: 28px; }
.energy > span:nth-child(2) { flex: 1 1 auto; }

/* Trening reakcji */
.rx__situ { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.rx__them { margin-bottom: 8px; }
.rx__themtext { font-weight: 600; }
.rx__themtext[data-hidden="1"] { filter: blur(6px); user-select: none; }
.rx__cue { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-weight: 600; margin-bottom: 18px; }
.rx__ring { --lvl: 0; width: 170px; height: 170px; margin: 6px auto 16px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 4px solid var(--line); transition: border-color .2s, box-shadow .08s; }
.rx__ring span { font-family: 'Poppins', sans-serif; font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rx__ring small { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.rx__ring[data-phase="speak"] { border-color: var(--purple); box-shadow: 0 0 0 calc(var(--lvl) * 18px) rgba(72,69,182,.18); }
.rx__ring[data-phase="rec"] { border-color: var(--green); box-shadow: 0 0 0 calc(var(--lvl) * 18px) rgba(57,182,136,.2); }
.rx__res { text-align: center; padding: 6px 0 12px; }
.rx__time { font-family: 'Poppins', sans-serif; font-size: 52px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rx__word { font-weight: 700; margin: 4px 0; }
.rx__en { font-size: 18px; margin-top: 10px; }

/* Mój trening */
.train-hero .hero-fig { font-family: 'Poppins', sans-serif; font-size: 52px; font-weight: 800; line-height: 1.05; margin: 6px 0 2px; }
.stat b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.milestone { margin-top: 14px; }
.milestone .bar { margin-top: 6px; }
.chart__t { font-family: 'Poppins', sans-serif; font-size: 16px; }
.chart__plot { position: relative; margin-top: 10px; }
.svgc { display: block; width: 100%; height: auto; overflow: visible; }
.svgc__grid { stroke: var(--line); stroke-width: 1; }
.svgc__tick { fill: var(--muted); font-size: 12px; font-family: 'Inter', sans-serif; }
.svgc__val { fill: var(--ink); font-size: 13px; font-weight: 700; font-family: 'Inter', sans-serif; }
.svgc__cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.svgc__hit { outline: none; cursor: default; }
.svgc__hit:focus-visible { stroke: var(--purple); stroke-width: 2; }
.chart__tip { position: absolute; top: -6px; width: 140px; pointer-events: none; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.chart__tip b { display: block; color: var(--ink); font-size: 15px; }
.ctable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.ctable th, .ctable td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ctable td:last-child, .ctable th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.selfrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.selfrow:last-child { border-bottom: 0; }
.selfrow > div:first-child { flex: 1 1 200px; min-width: 0; }

/* Tryb nauki (onboarding) */
.mode { display: flex; gap: 14px; width: 100%; text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: 16px; margin-bottom: 10px; background: var(--soft); cursor: pointer; }
.mode:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.mode[aria-pressed="true"] { border-color: var(--purple); background: var(--card); box-shadow: var(--shadow); }
:root[data-theme="dark"] .mode[aria-pressed="true"] { border-color: #8683F0; }
.mode__e { font-size: 28px; line-height: 1.2; }
.mode b { font-family: 'Poppins', sans-serif; font-size: 16px; }
.mode__days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mode__days .chip { cursor: pointer; font-size: 14px; padding: 6px 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }


/* =================================================================== MUSIC */

/* następny dzień w hero */
.nextday { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 0 0 12px; border-radius: 18px; background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.nextday:hover { background: rgba(255,255,255,.2); }
.nextday__n { flex: 0 0 56px; height: 56px; border-radius: 16px; background: var(--lime); color: var(--teal); display: grid; place-items: center; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 24px; line-height: 1; }
.nextday__n small { font-size: 11px; font-weight: 700; opacity: .7; margin-top: -8px; }
.nextday > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.nextday small { display: block; font-size: 12px; opacity: .8; }
.nextday b { display: block; font-family: 'Poppins', sans-serif; font-size: 17px; line-height: 1.25; }
.nextday__go { font-size: 18px; }

/* kropki 3 dni przy piosence */
.ddots { display: inline-flex; gap: 4px; }
.ddots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); }
.ddots i[data-s="1"] { border-color: var(--amber); }
.ddots i[data-s="2"] { background: var(--green); border-color: var(--green); }

/* odtwarzacz */
.player { display: flex; flex-direction: column; gap: 10px; }
.player__head { min-width: 0; }
.player__t { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; }
.player__s { font-size: 12px; color: var(--muted); }
.player__row { display: flex; align-items: center; gap: 10px; }
.player__spacer { flex: 1 1 auto; }
.player__play { flex: 0 0 56px; height: 56px; border-radius: 50%; border: 0; background: var(--purple); color: #fff; font-size: 20px; box-shadow: 0 8px 20px rgba(72,69,182,.3); }
.player__play:active { transform: scale(.96); }
.player__pl, .player__speed { flex: 0 0 auto; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: 13px; color: var(--ink); }
.player__pl.is-on { background: var(--purple); color: #fff; border-color: var(--purple); }
.player__barrow { display: flex; align-items: center; gap: 8px; }
.player__bar { flex: 1 1 auto; width: auto; margin: 0; accent-color: var(--purple); }
.pt-cur, .pt-dur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* tekst piosenki */
.lyrics { margin-top: 10px; }
.ly__h { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin: 16px 0 4px; }
.ly__l { margin: 0 0 6px; font-size: 17px; line-height: 1.7; }
.ly__pl { display: none; font-size: 13px; color: var(--muted); line-height: 1.4; }
.lyrics.show-pl .ly__pl { display: block; }
.tt { position: relative; font: inherit; color: var(--purple); font-weight: 600; background: rgba(72,69,182,.08); border: 0; border-bottom: 2px dotted rgba(72,69,182,.5); border-radius: 6px; padding: 0 4px; cursor: pointer; }
:root[data-theme="dark"] .tt { color: #A9A7FF; background: rgba(134,131,240,.14); }
.tt.is-open { background: var(--lime); color: var(--teal); border-bottom-color: transparent; }
/* tłumaczenie chunka: chmurka NAD słowem, nie przesuwa tekstu */
.tt__tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 20; width: max-content; max-width: min(240px, 80vw); background: #4845B6; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; padding: 7px 11px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.22); white-space: normal; text-align: center; pointer-events: none; }
.tt__tip::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #4845B6; }
.lydetails { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.lydetails summary { cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; padding: 6px 0; }
.tip { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; font-size: 15px; }

/* nagłówek dnia */
.dayhead { margin-bottom: 12px; }
.dayhead h1 { font-size: 30px; margin: 8px 0 0; }
.songhead { display: flex; align-items: center; gap: 14px; }
.songhead__e { flex: 0 0 60px; height: 60px; border-radius: 18px; background: var(--soft); display: grid; place-items: center; font-size: 32px; }
.stepdone { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(57,182,136,.1); color: var(--green); font-weight: 700; }

/* pary pytanie-odpowiedź */
.pairs { margin: 10px 0 0; padding-left: 22px; }
.pairs li { margin-bottom: 12px; }
.pairs__a { display: block; font-weight: 600; margin-top: 2px; }

/* quiz: kolejność */
.qtitle { font-family: 'Poppins', sans-serif; font-size: 18px; margin: 2px 0 6px; }
.ord { margin: 12px 0 0; padding-left: 26px; }
.ord li { margin-bottom: 8px; }
.ord__pool { display: grid; gap: 8px; }
.ord__it { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--soft); border-radius: 14px; padding: 10px 12px; font-size: 15px; font-weight: 500; }
.ord li .ord__it { background: var(--card); border-color: var(--purple); }
.ord li .ord__it[data-st="ok"], .ord__it[data-st="ok"] { border-color: var(--green); background: rgba(57,182,136,.1); }
.ord li .ord__it[data-st="bad"], .ord__it[data-st="bad"] { border-color: var(--amber); background: rgba(245,165,36,.1); }
.ord__e { font-size: 20px; }
.ord__fix { display: block; font-size: 13px; color: var(--green); margin: 4px 0 0 4px; }

/* quiz: przypomnij zdanie */
.recall { font-size: 20px; line-height: 1.9; margin: 8px 0 14px; }
.gap { min-width: 72px; border: 0; border-bottom: 3px solid var(--purple); background: rgba(72,69,182,.08); border-radius: 8px 8px 2px 2px; padding: 0 8px; font: inherit; font-weight: 700; color: var(--purple); }
.gap[data-st="ok"] { border-color: var(--green); color: var(--green); background: rgba(57,182,136,.1); }
.gap[data-st="bad"] { border-color: var(--amber); color: var(--amber); background: rgba(245,165,36,.1); }
.tiles2 { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tile2 { font-size: 15px; padding: 8px 14px; cursor: pointer; }
.tile2:disabled { opacity: .35; }
.ok { color: var(--green); font-weight: 700; }

/* fiszki */
.fcard__line { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* activation */
.am__q { text-align: center; min-height: 24px; margin-bottom: 10px; font-weight: 600; }

/* jak to działa */
.video { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 16px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose h3 { font-family: 'Poppins', sans-serif; font-size: 17px; margin: 18px 0 6px; }
.prose p { margin: 0 0 10px; }
.prose__li { padding-left: 10px; }

/* ---------------- Bottom tabs ---------------- */
.tabs {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
	display: flex; justify-content: center;
	height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: var(--card); border-top: 1px solid var(--line);
	box-shadow: 0 -4px 20px rgba(24, 70, 76, .08);
}
.tabs a {
	flex: 0 1 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative;
	text-decoration: none; font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; color: var(--muted);
}
.tab-badge { position: absolute; top: 0; right: 14px; background: var(--lime); color: var(--teal); font-size: 9px; font-weight: 800; line-height: 1.4; border-radius: 999px; padding: 1px 4px; min-width: 8px; height: 13px; text-align: center; box-sizing: border-box; }
.tabs a span { font-size: 20px; filter: grayscale(.6); }
.tabs a[aria-current="page"] { color: var(--purple); }
.tabs a[aria-current="page"] span { filter: none; }
:root[data-theme="dark"] .tabs a[aria-current="page"] { color: #A9A7FF; }

/* ---------------- Sheet (ustawienia) + toast ---------------- */
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(17,19,24,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__card { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 22px 22px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet__card { border-radius: 22px; } }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--purple); color: #fff; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 90; background: var(--teal); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 600; max-width: calc(100% - 24px); }
.toast[hidden] { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- Wydruk: workbook A4 ---------------- */
.print { display: none; }

@media print {
	@page { size: A4 portrait; margin: 14mm 14mm 16mm; }
	body { padding: 0; background: #fff; color: #18464C; font-size: 11pt; }
	.hd, .tabs, .main, .sheet, .toast { display: none !important; }
	.print { display: block; }
	.p-cover { height: 250mm; display: flex; flex-direction: column; justify-content: center; page-break-after: always; background: #4845B6; color: #fff; padding: 20mm; border-radius: 8mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.p-cover h1 { font-family: 'Englebert', sans-serif; font-weight: 400; font-size: 54pt; line-height: 1; margin: 0 0 8mm; }
	.p-cover h1 span { color: #DEFD36; }
	.p-cover p { font-size: 14pt; opacity: .92; margin: 0 0 4mm; }
	.p-scene { page-break-before: always; }
	.p-scene h2 { font-family: 'Englebert', sans-serif; font-weight: 400; font-size: 30pt; color: #4845B6; margin: 0 0 2mm; }
	.p-scene .p-sub { color: #6B7280; margin: 0 0 6mm; }
	.p-dlg { break-inside: avoid; page-break-inside: avoid; border: 1px solid #E5E7EB; border-left: 3mm solid #DEFD36; border-radius: 3mm; padding: 3.5mm 4.5mm; margin-bottom: 4mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.p-dlg h3 { font-family: 'Poppins', sans-serif; font-size: 11.5pt; margin: 0 0 1mm; }
	.p-situ { font-size: 9.5pt; color: #6B7280; margin: 0 0 2mm; font-style: italic; }
	.p-line { display: grid; grid-template-columns: 18mm 1fr; gap: 2mm; margin: 1mm 0; }
	.p-who { font-size: 8pt; font-weight: 700; text-transform: uppercase; color: #6B7280; padding-top: 1mm; }
	.p-line--you .p-who { color: #4845B6; }
	.p-en { font-weight: 600; }
	.p-line--you .p-en { color: #4845B6; }
	.p-en b { background: #DEFD36; color: #18464C; padding: 0 1mm; border-radius: 1mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.p-pl { font-size: 9pt; color: #6B7280; }
	.p-alt { font-size: 9pt; margin-top: 1.5mm; color: #18464C; }
}

.scene .bar { display: block; height: 6px; }

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

.hd__streak { cursor: pointer; padding: 6px 9px; }

/* tryb testera */
.tester { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0; padding: 6px 10px; border: 1px dashed var(--amber); border-radius: 12px; font-size: 13px; font-weight: 600; }

/* czas treningu: dymek pod ikoną ⏱ */
.hd-pop { position: fixed; z-index: 60; display: flex; gap: 14px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; }
.hd-pop div { display: grid; text-align: center; }
.hd-pop span { color: var(--muted); font-size: 11px; font-weight: 600; }
.hd-pop b { font-size: 16px; }
.hd-pop::before { content: ''; position: absolute; top: -7px; right: 48px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--card); }

/* ---- poprawki iPad / Safari (2026-10-06) ---- */
/* plakietka przy zakładce (np. Fiszki): malutka, na prawym górnym rogu ikony; ikona zostaje wyśrodkowana nad napisem.
   Wcześniej reguła ".tabs a span" (rozmiar 20px) łapała też samą plakietkę, stąd była za duża. */
.tabs a > span:first-child { position: relative; display: inline-block; }
.tabs a .tab-badge { position: absolute; top: -5px; right: -10px; left: auto; min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box; border-radius: 99px; background: var(--lime); color: var(--teal); font: 800 9px/15px 'Inter', sans-serif; text-align: center; filter: none; box-shadow: 0 0 0 2px var(--card); }
/* okrągłe przyciski: Safari dodaje przyciskom własne odstępy i ściska je w rzędzie, przez co robiły się owalne */
.hd__gear, .phr__play, .recbtn, .ul__mic { padding: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; display: inline-grid; place-items: center; line-height: 1; flex-shrink: 0; }
.hd__gear { flex: 0 0 36px; min-width: 36px; }
.phr__play { width: 38px; min-width: 38px; }
.recbtn { width: 56px; min-width: 56px; }
.ul__mic { width: 48px; min-width: 48px; }
.hd__streak { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; box-sizing: border-box; line-height: 1; }
.icon-btn { display: inline-grid; place-items: center; line-height: 1; -webkit-appearance: none; appearance: none; flex-shrink: 0; }
/* "Nagraj swoją historię": oddech między nagłówkiem a nagrywaniem */
#msRec { margin-top: 14px; }

/* okładki piosenek zamiast emoji */
.has-cover { position: relative; overflow: hidden; padding: 0; background: var(--soft); }
.has-cover .cover { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.scene__emoji.has-cover { flex: 0 0 56px; width: 56px; height: 56px; overflow: visible; }
.scene__emoji.has-cover .cover { border-radius: 14px; }
.cover__done { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 16px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.songhead__e.has-cover { flex: 0 0 84px; width: 84px; height: 84px; }
.dlist__cover.has-cover { display: inline-block; width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px; }

/* ------------------------------------------------------------ wersja demo (C.demo) */
.note--demo { border-color: var(--lime); border-left-width: 4px; }
.note--demo .btn { white-space: nowrap; }
.scene.is-locked { opacity: .6; }
.dlist li.is-locked { opacity: .6; }
.dlist li.is-locked .dlist__dot { border-style: dashed; font-size: 12px; }
.tabs a.tabs__cta { color: var(--teal); background: var(--lime); border-radius: 14px; margin: 4px 4px 4px 0; font-weight: 800; }
.tabs a.tabs__cta span { filter: none; }
.demoend { text-align: center; }
.demoend__e { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.demoend p { text-align: left; margin: 0 0 14px; }
@media (max-width: 420px) { .note--demo { flex-direction: column; align-items: stretch; } .note--demo .btn { text-align: center; } }
/* demo: bez znaczka zapisu (postęp i tak zostaje tylko w przeglądarce, mówi o tym notka na starcie) */
body.is-demo .hd__sync { display: none; }
