/* Style treści kursu: przeniesione z makiety (kurs-pary/makieta-modul-2/index.html). Powłoka aplikacji: app.css. */
/* Układ: kurs krok po kroku. Komputer: spis kroków z lewej, treść w kolumnie ~640 px. Telefon: pasek kroków u góry, przyciski na dole. */
:root {
  --bg: #F7F2E8;          /* krem */
  --surface: #FFFDF8;     /* papier */
  --surface-2: #FBF8F2;
  --fg: #252A28;          /* grafit */
  --muted: #5E625D;
  --line: #E3DACB;
  --mustard: #D6A51C;     /* pasek zakreślenia, wykresy */
  --mustard-ink: #8A6608; /* musztarda do tekstu na jasnym */
  --sage: #B8C9BC;
  --sage-soft: #E4ECE5;
  --coral: #EF8268;
  --strand-a: #252A28;
  --strand-b: #EF8268;
  --alert-bg: #FBEDE8;
  --font-display: "TON Fraunces", "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "TON Instrument Sans", "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E2321; --surface: #262C29; --surface-2: #2C3330; --fg: #F2ECE0; --muted: #B6B2A8;
    --line: #3A423E; --mustard: #D6A51C; --mustard-ink: #E2B73A; --sage: #8FA595; --sage-soft: #2F3B35;
    --coral: #EF8268; --strand-a: #F7F2E8; --strand-b: #EF8268; --alert-bg: #3A2B27; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1E2321; --surface: #262C29; --surface-2: #2C3330; --fg: #F2ECE0; --muted: #B6B2A8;
  --line: #3A423E; --mustard: #D6A51C; --mustard-ink: #E2B73A; --sage: #8FA595; --sage-soft: #2F3B35;
  --coral: #EF8268; --strand-a: #F7F2E8; --strand-b: #EF8268; --alert-bg: #3A2B27; color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 2px; border-radius: 4px; }

.page { max-width: 1120px; margin: 0 auto; padding-block: 20px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.note { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 20px; }
.note b { color: var(--fg); font-weight: 600; }
.note details { width: 100%; }
.note summary { cursor: pointer; color: var(--fg); }
.note ul { margin: 6px 0 0; padding-left: 18px; }

.top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; align-items: flex-end; margin-bottom: 24px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.course { font-family: var(--font-display); font-size: clamp(30px, 6vw, 44px); line-height: 1.1; font-weight: 400; margin: 6px 0 0; text-wrap: balance; }
.hl { font-style: italic; background: linear-gradient(transparent 70%, var(--mustard) 70%, var(--mustard) 90%, transparent 90%); padding: 0 .06em; }
.quick-exit { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; }

.layout { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .layout { grid-template-columns: 230px minmax(0, 1fr); align-items: start; } }

/* Spis kroków */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps-wrap { min-width: 0; }
@media (min-width: 900px) { .steps-wrap { position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); } .steps { flex-direction: column; overflow: visible; } }
.steps button { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; white-space: nowrap;
  background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--muted); font-size: 15px; }
.steps .n { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 14px; }
.steps button[aria-current="step"] { background: var(--surface); border-color: var(--line); color: var(--fg); font-weight: 600; }
.steps button.done { color: var(--fg); }
.steps button.done .n::after { content: " ✓"; color: var(--mustard-ink); }
/* na liście po lewej długie nazwy kroków przechodzą do drugiej linii */
@media (min-width: 900px) { .steps button { white-space: normal; line-height: 1.3; } .steps .n { flex: none; } }
.progress { height: 3px; background: var(--line); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--mustard); transition: width .3s; }
@media (min-width: 900px) { .progress { display: none; } }

/* Treść kroku */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(18px, 4vw, 40px); min-width: 0; }
.card h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 4px 0 14px; text-wrap: balance; }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 21px; line-height: 1.25; margin: 26px 0 8px; }
.card p { margin: 0 0 14px; max-width: 64ch; }
.lead { font-size: 19px; }
.small { font-size: 14px; color: var(--muted); }
.stack { display: grid; gap: 12px; }
.sep { display: flex; align-items: center; gap: 10px; margin: 28px 0; color: var(--line); }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sep span { width: 8px; height: 8px; border: 1px solid var(--mustard); transform: rotate(45deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--fg); background: var(--fg); color: var(--bg); font-weight: 600; cursor: pointer; text-align: center; max-width: 100%; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.link { background: none; border: none; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; min-height: 0; font-weight: 500; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

.choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.opt { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; }
.opt strong { font-family: var(--font-display); font-weight: 500; font-size: 19px; }
.opt span { font-size: 15px; color: var(--muted); }
.opt[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); background: var(--surface); }

.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.field textarea { min-height: 110px; resize: vertical; }
.names { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 14px; }

/* Bezpieczeństwo */
.yn { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.yn:last-of-type { border-bottom: 0; }
.yn .q { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; width: max-content; }
.seg button { border: 0; background: transparent; padding: 7px 18px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.alert { background: var(--alert-bg); border-radius: 12px; padding: 18px; }
.alert h3 { margin-top: 0; }
.phones { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.phones li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.phones .num { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; user-select: all; }

/* Wstawka wideo */
.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--fg); color: var(--bg);
  display: grid; place-items: center; text-align: center; padding: 16px; }
/* w ciemnym trybie miejsce na wideo zostaje ciemne (jak ekran filmu), a nie odwraca się na jasne */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .video { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); } }
:root[data-theme="dark"] .video { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.video canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.video div { position: relative; display: grid; gap: 6px; justify-items: center; }
.video .play { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; }
.video .play::after { content: ""; border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.video .t { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.script { border-left: 2px solid var(--mustard); padding: 4px 0 4px 16px; margin: 16px 0 0; }
.script summary { cursor: pointer; font-weight: 600; }
.script p { font-family: var(--font-display); font-size: 18px; line-height: 1.55; }

/* Dwie nitki */
.strands { width: 100%; height: 200px; display: block; border-radius: 12px; background: var(--surface-2); }
.slider { width: 100%; margin: 18px 0 4px; accent-color: var(--mustard); }
.scale { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.scale span.on { color: var(--fg); }
.voice { font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.45; min-height: 3em; margin: 16px 0 6px; max-width: 40ch; }
.compare-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-top: 8px; }
.compare-cols > div { background: var(--surface-2); border-radius: 12px; padding: 16px; }
.compare-cols h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.compare-cols ul { margin: 0; padding-left: 18px; }

/* Test */
.who { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; background: var(--sage-soft); border-radius: 999px; padding: 4px 12px; }
.who i { width: 18px; height: 3px; border-radius: 2px; background: var(--strand-a); }
.who.b i { background: var(--strand-b); }
.item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.item p { margin: 0 0 10px; }
.item .k { font-family: var(--font-display); color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.likert { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.likert button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 2px; cursor: pointer; font-size: 13px; line-height: 1.25; min-height: 44px; }
.likert button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.likert-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 420px) { .likert button { font-size: 0; } .likert button::after { content: attr(data-n); font-size: 15px; }
  /* M4: pod cyfrą krótki podpis skali */
  .likert button[data-l] { display: grid; align-content: center; gap: 1px; padding: 6px 1px; }
  .likert button[data-l]::after { content: attr(data-n); font-size: 15px; line-height: 1.1; }
  .likert button[data-l]::before { content: attr(data-l); order: 2; font-size: 10px; line-height: 1.1; opacity: .75; letter-spacing: -.01em; } }
@media (max-width: 300px) { .likert button[data-l]::before { font-size: 9px; letter-spacing: -.03em; } }
.scalekey { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--muted); margin: 4px 0 2px; }
.scalekey b { color: var(--fg); font-variant-numeric: tabular-nums; }
.handoff { text-align: center; padding: 40px 10px; display: grid; gap: 14px; justify-items: center; }
.handoff .big { font-family: var(--font-display); font-size: clamp(24px, 5vw, 32px); line-height: 1.2; }

.result { display: grid; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.result-head h4 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.tag { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--mustard-ink); }
.bar { display: grid; grid-template-columns: minmax(60px, 110px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden; }
.bar .track i { position: absolute; inset: 0 auto 0 0; background: var(--strand-a); border-radius: 6px; }
.bar.b .track i { background: var(--strand-b); }
.bar .v { font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
.ask { font-family: var(--font-display); font-style: italic; }
.codebox { display: grid; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 16px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; word-break: break-all; user-select: all; }
.err { color: #B23A1F; font-size: 14px; }
:root[data-theme="dark"] .err { color: var(--coral); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: var(--coral); } }

.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { counter-increment: r; position: relative; padding-left: 36px; min-width: 0; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 0; font-family: var(--font-display); color: var(--mustard-ink); font-size: 20px; line-height: 1.3; }
.qs { display: grid; gap: 10px; padding: 0; list-style: none; margin: 0; }
.qs li { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; font-family: var(--font-display); font-size: 18px; line-height: 1.4; }

/* Symulacja */
.scene { background: var(--sage-soft); border-radius: 12px; padding: 18px; }
.scene .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.scene .says { font-family: var(--font-display); font-size: 22px; line-height: 1.35; margin: 6px 0 0; }
.answers { display: grid; gap: 10px; margin-top: 16px; }
.answers .opt { grid-template-columns: 34px minmax(0, 1fr); align-items: start; }
.answers .opt .l { font-family: var(--font-display); font-size: 22px; line-height: 1.2; }
.feedback { margin-top: 14px; border-left: 2px solid var(--mustard); padding: 2px 0 2px 16px; }

/* Minutnik */
.timer { display: grid; gap: 22px; justify-items: center; text-align: center; padding: 10px 0; }
.ring { width: min(240px, 70vw); aspect-ratio: 1; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .time { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 46px; font-variant-numeric: tabular-nums; }
.prompt { font-family: var(--font-display); font-size: 21px; line-height: 1.45; max-width: 34ch; min-height: 4.4em; }

.disclaimer { margin-top: 24px; font-size: 14px; color: var(--muted); }
.disclaimer .phones .num { font-size: 16px; }
.credit { margin-top: 28px; font-size: 13px; color: var(--muted); }
/* Przełącznik widoków makiety */
.views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.views button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; color: var(--muted); }
.review { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: -12px 0 20px; cursor: pointer; }
.review input { accent-color: var(--mustard); width: 18px; height: 18px; flex: none; }
.views button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.layout.single { grid-template-columns: minmax(0, 1fr); }
.layout.single .steps-wrap { display: none; }
.layout.single .card { max-width: 880px; width: 100%; justify-self: center; }

/* Rozmowa w dymkach */
.chat { display: grid; gap: 10px; margin: 8px 0 4px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; min-width: 0; }
.bubble.them { background: var(--sage-soft); justify-self: start; border-bottom-left-radius: 4px; font-family: var(--font-display); font-size: 18px; }
.bubble.me { background: var(--fg); color: var(--bg); justify-self: end; border-bottom-right-radius: 4px; }
.bubble .ws { display: block; font-family: var(--font-body); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.bubble.stage { background: none; justify-self: center; text-align: center; font-style: italic; color: var(--muted); font-size: 16px; }

/* Etykiety do wyboru */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 15px; text-align: left; max-width: 100%; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.group { display: grid; gap: 8px; margin: 14px 0; }
.group > .lbl, .scene .lbl, .cnode .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
mark.flag { background: var(--alert-bg); color: inherit; border-bottom: 2px solid var(--coral); padding: 0 2px; border-radius: 3px; }
.echo { font-family: var(--font-display); font-size: 20px; line-height: 1.45; background: var(--surface-2); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.built { font-family: var(--font-display); font-size: 22px; line-height: 1.45; border-left: 3px solid var(--mustard); padding: 6px 0 6px 18px; margin: 14px 0; }
.guess-row { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hit { font-size: 14px; margin: 0; color: var(--muted); }
.hit b { color: var(--fg); font-weight: 600; }

/* Mapa cyklu */
.persons { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.person { background: var(--surface-2); border-radius: 12px; padding: 16px; min-width: 0; }
.person h3 { margin-top: 0; display: flex; gap: 8px; align-items: center; }
.person h3 i { width: 22px; height: 3px; border-radius: 2px; background: var(--strand-a); }
.person.b h3 i { background: var(--strand-b); }
.cycle { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.cnode { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; border-top: 3px solid var(--strand-a); min-width: 0; }
.cnode.b { border-top-color: var(--strand-b); }
.cnode p { margin: 4px 0 0; font-family: var(--font-display); font-size: 18px; line-height: 1.35; }
.carrow { text-align: center; color: var(--mustard-ink); font-size: 22px; line-height: 1; }
.carrow .d, .ccenter { display: none; }
@media (min-width: 680px) {
  .cycle { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); grid-template-areas: "n1 a1 n2" "a4 c a2" "n4 a3 n3"; align-items: center; gap: 10px; }
  .carrow .m { display: none; } .carrow .d { display: inline; }
  .ccenter { display: block; grid-area: c; text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
  .cycle > :nth-child(1) { grid-area: n1; } .cycle > :nth-child(2) { grid-area: a1; } .cycle > :nth-child(3) { grid-area: n2; }
  .cycle > :nth-child(4) { grid-area: a2; } .cycle > :nth-child(5) { grid-area: n3; } .cycle > :nth-child(6) { grid-area: a3; }
  .cycle > :nth-child(7) { grid-area: n4; } .cycle > :nth-child(8) { grid-area: a4; }
  .cnode { align-self: stretch; }
}

/* Przerwa */
.pause-time { font-family: var(--font-display); font-size: clamp(56px, 16vw, 96px); line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.say { font-family: var(--font-display); font-size: 24px; line-height: 1.4; text-align: center; background: var(--sage-soft); border-radius: 14px; padding: 20px; margin: 16px 0; text-wrap: balance; }
/* Karty do rozmowy */
.table-stage { display: grid; place-items: center; padding: 18px 0 6px; }
.tcard { width: min(100%, 340px); aspect-ratio: 63 / 88; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 0 var(--line), 0 14px 30px -18px rgba(37, 42, 40, .35); padding: 22px 22px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.tcard.lv0 { border-top: 6px solid var(--sage); }
.tcard.lv1 { border-top: 6px solid var(--mustard); }
.tcard.lv2 { border-top: 6px solid var(--coral); }
.tcard.back { background: var(--fg); color: var(--bg); border-color: var(--fg); justify-content: center; }
.tcard-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.tcard-top .dots { letter-spacing: .1em; color: var(--mustard-ink); }
.tcard-q { font-family: var(--font-display); font-size: clamp(22px, 6vw, 28px); line-height: 1.3; margin: 0; text-wrap: balance; }
.tcard-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.tcard-foot .dia { width: 7px; height: 7px; border: 1px solid var(--mustard); transform: rotate(45deg); flex: none; }
.tcard.enter { animation: deal .35s ease-out; }
@keyframes deal { from { opacity: 0; transform: translateY(10px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
/* Przytulenie */
.posebox { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: center; background: var(--surface-2); border-radius: 12px; padding: 16px; margin: 8px 0 4px; }
@media (min-width: 640px) { .posebox { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); } }
.fig { width: 100%; max-width: 240px; height: auto; justify-self: center; overflow: visible; }
.fig g { transition: transform .9s cubic-bezier(.5, 0, .3, 1); transform-box: view-box; }
.fig.pose-a .p1 { transform-origin: 72px 192px; } .fig.pose-a .p2 { transform-origin: 168px 192px; }
.fig.pose-a.apart .p2 { transform: translateX(40px) rotate(14deg); }
.fig.pose-a.apart .p1 { transform: rotate(52deg); }
.fig.pose-i.apart .p2 { transform: translateX(46px); }
.hugchart { display: flex; gap: 8px; align-items: flex-end; height: 176px; padding: 22px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.hc { flex: 1 0 34px; max-width: 64px; height: 100%; display: grid; grid-template-rows: 1fr auto auto; gap: 2px; text-align: center; }
.hc-bar { align-self: end; background: var(--sage); border-radius: 6px 6px 0 0; position: relative; min-height: 6px; }
.hc-bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-r { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-d { font-size: 11px; color: var(--muted); }
/* Dylematy */
.dil { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dil .opt strong { font-size: 18px; line-height: 1.35; }
.dil .gain, .dil .cost { font-size: 15px; color: var(--fg); padding-left: 12px; border-left: 2px solid var(--sage); }
.dil .cost { border-left-color: var(--coral); }
/* Ścieżka i pytanie dnia */
.path { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.path li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 14px; }
.path li.hot { box-shadow: inset 0 0 0 1px var(--mustard); }
.path-n { font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--mustard-ink); }
.path-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 14px 0 6px; max-width: 420px; }
.day { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 14px; font-variant-numeric: tabular-nums; padding: 0; min-width: 0; }
.day.done { background: var(--sage); border-color: var(--sage); color: #252A28; }
.day[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--fg); }
.dcard { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--mustard); border-radius: 14px; padding: 18px 20px; display: grid; gap: 12px; margin-top: 12px; }
.veiled { filter: blur(5px); user-select: none; }
.sel { width: 100%; max-width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font: inherit; color: inherit; }
/* Lęk */
/* Lekcja */
.lesson-head { margin-bottom: 6px; }
.howto { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 6px 0 4px; }
.howto > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 17px; }
.howto[open] > summary { margin-bottom: 12px; }
.letter { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--mustard); border-radius: 12px; padding: 16px 18px; margin-top: 14px; font-family: var(--font-display); font-size: 18px; line-height: 1.5; }
.letter .lbl { font-family: var(--font-body); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.letter p { margin: 0 0 10px; }
.linkcard { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-top: 10px; }
.linkcard > div { min-width: 0; flex: 1 1 240px; }
.linkcard .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.pathline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pnode { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 6px 10px; font-size: 14px; cursor: pointer; }
.pnode.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.parrow { color: var(--mustard-ink); }
.lsteps { list-style: none; margin: 0 0 6px; padding: 0 0 4px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lsteps::-webkit-scrollbar { display: none; }
.lsteps button { white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--muted); cursor: pointer; }
.lsteps button[aria-current="step"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.lsteps button.done { color: var(--fg); border-color: var(--sage); }
.curve { width: 100%; max-width: 560px; height: auto; display: block; background: var(--surface-2); border-radius: 12px; }
.fact { display: grid; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; border-left: 3px solid transparent; }
.fact.ok { border-left-color: var(--sage); } .fact.no { border-left-color: var(--coral); } .fact.faded { opacity: .6; }
.gdot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--mustard); background: transparent; cursor: pointer; padding: 0; }
.gdot.on { background: var(--mustard); }
.reflect { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.newtag { display: inline-block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #252A28; background: var(--mustard); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.day.isnew::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--mustard); transform: translate(12px, -12px); }
.day { position: relative; }
.amb { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; font-size: 15px; }
.amb .slider { margin: 0; }
.center { text-align: center; display: grid; gap: 14px; justify-items: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.qs.explained li { font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
.qs.explained li b { font-family: var(--font-display); font-weight: 500; font-size: 18px; }
.cats { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 6px 0 4px; }
.cats div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.cats dt { font-weight: 600; } .cats dd { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.pathlist { display: grid; gap: 8px; padding-left: 22px; margin: 8px 0 10px; }
.pathlist li { padding-left: 4px; }
.pathlist li .small { display: block; }
.pathlist .pex { display: block; margin-top: 2px; font-style: italic; color: var(--fg); border-left: 2px solid var(--mustard); padding-left: 8px; font-size: 15px; }
.pairex { display: grid; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; }
.pairex p { margin: 0; font-size: 15px; }
.tag.no { background: var(--alert-bg); }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
.stepshint { font-size: 14px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px; }
.card .rules { margin-bottom: 16px; }
.nextbox { margin-top: 24px; background: var(--sage-soft); border-radius: 14px; padding: 18px; display: grid; gap: 8px; }
.nextbox p { margin: 0; }

/* Poprawki po audycie 21.10.2026 */
.navgo { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: flex-end; margin-left: auto; }
.navhint { margin: 8px 0 0; text-align: right; }
.solo { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 4px 0 16px; display: grid; gap: 10px; justify-items: start; }
.solo p { margin: 0; font-size: 15px; }
.nextbox.pending { background: var(--surface-2); border: 1px dashed var(--line); }
.nextbox .btn { white-space: normal; text-align: center; }
/* K1: tydzień w lekcji o lęku ma zawsze 7 słupków, które mieszczą się także na 280 px */
.hugchart.week { gap: 4px; overflow: visible; }
.hugchart.week .hc { flex: 1 1 0; min-width: 0; }
@media (max-width: 340px) { .chips .chip { padding-left: 10px; padding-right: 10px; font-size: 14px; } }
/* zdanie do powiedzenia na głos (Przerwa) na Foldzie: mniejszy krój, żeby nie łamało się po jednym słowie */
@media (max-width: 340px) { .say { font-size: 20px; padding: 16px 12px; } }
/* M12: zwijane przykłady i dłuższe objaśnienia („Pokaż przykład”) */
details.more { margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
details.more > summary { cursor: pointer; list-style: none; display: block; position: relative; padding: 11px 14px 11px 38px; font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--fg); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; position: absolute; left: 14px; top: 11px; width: 16px; text-align: center; font-weight: 700; color: var(--mustard-ink); }
details.more[open] > summary::before { content: "−"; }
details.more > summary .small { font-weight: 400; }
details.more > .in { padding: 0 14px 14px; display: grid; gap: 10px; }
details.more > .in > * { margin: 0; }
details.more .scene { background: var(--sage-soft); }
/* M7: karta z modułu 1 pokazana w późniejszych krokach */
.fromu { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--mustard); border-radius: 12px; padding: 14px 16px; margin: 12px 0; display: grid; gap: 8px; }
.fromu > * { margin: 0; }
.fromu .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
/* M12: Mapa cyklu na telefonie pokazuje jedną kolumnę naraz */
.cyctabs { display: none; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
@media (max-width: 679px) {
  .cyctabs { display: flex; }
  .persons .person:not(.on) { display: none; }
}
.person .cycnext { margin-top: 14px; }
@media (min-width: 680px) { .person .cycnext { display: none; } }

/* Dyplom ukończenia kursu: podgląd canvas skaluje się do szerokości */
.dyp { display: grid; gap: 12px; margin-top: 8px; min-width: 0; }
.dyp > * { margin: 0; }
.dyp-cv { display: block; width: 100%; max-width: 820px; height: auto; aspect-ratio: 3508 / 2480; background: #FBF8F2; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 22px rgba(37, 42, 40, .10); }
/* Fold złożony (280 px): w przykładach zagnieżdżonych w ramce zostaje więcej miejsca na tekst */
@media (max-width: 329px) { details.more > .in { padding: 0 8px 10px; } .in .fact { padding: 10px; } }
/* D3: na telefonie (także poziomo) od drugiego kroku lub części chowamy duży tytuł modułu i „Cały moduł ok. X min”; nazwa modułu jest w pasku „gdzie jestem” */
@media (max-width: 600px), (max-height: 480px) and (pointer: coarse) {
  .page.deep { padding-top: 10px; }
  .page.deep > .top { display: none; }
  /* linijka „krok 3 z 6 · ok. 8 min · Cały moduł…” i pasek postępu powtarzają pasek „gdzie jestem”; zostają przyciski kroków */
  .page.deep .lesson-head > .row, .page.deep .lesson-head > .progress { display: none !important; }
  /* w pasku „gdzie jestem” zostaje sama linijka „Moduł N · krok…”; kółka modułów wracają na pierwszym kroku i na ekranie głównym */
  body:has(.page.deep) .where .wmap { display: none; }
  body:has(.page.deep) .where { margin-top: 6px; padding-top: 5px; }
  .page.deep .card { padding-top: 14px; }
  .page.deep .layout { gap: 12px; }
  .page.deep .steps-wrap .progress { margin-top: 6px; }
}
/* Lekcje i moduły z paskiem kroków w karcie: na komputerze i tablecie poziomo lista po lewej (jak w module 2), na telefonie pasek w karcie */
@media (max-width: 899.98px) { .layout.mirror .steps-wrap { display: none; } }
@media (min-width: 900px) { .layout.mirror .lesson-head .lsteps { display: none; } }
@media (max-width: 899.98px) { .on-wide { display: none; } }
@media (min-width: 900px) { .on-phone { display: none; } }
