/*
 * "7 ימים של רגיעה" course player (/7-days, /7-days/thank-you).
 *
 * Ported 1:1 from the owner-approved mock architecture/mocks/course-7-days-mock.html,
 * which itself ports the Tichr student player (Dripwise public/css/student-player.css).
 * Approved exception to the site's component/token rules: standalone stylesheet,
 * hex colours allowed here only, no Vite. Differences from the mock are only the
 * ones a real page needs: the player fills the viewport (100svh, position: fixed)
 * instead of the mock's framed boxes, theme / font size live on <html>, iPhone
 * safe areas and a real YouTube iframe. Push pieces (question sheet, settings
 * switch) arrived in Phase 3, from mock screen 2b.
 */

/* Heebo: the same @fontsource files the site self-hosts (resources/fonts), plus
   the 300/500/600/800 weights the player and form pages use. */
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 300; src: url('/fonts/heebo/heebo-hebrew-300-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 300; src: url('/fonts/heebo/heebo-latin-300-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 400; src: url('/fonts/heebo/heebo-hebrew-400-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 400; src: url('/fonts/heebo/heebo-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 500; src: url('/fonts/heebo/heebo-hebrew-500-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 500; src: url('/fonts/heebo/heebo-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 600; src: url('/fonts/heebo/heebo-hebrew-600-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 600; src: url('/fonts/heebo/heebo-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 700; src: url('/fonts/heebo/heebo-hebrew-700-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 700; src: url('/fonts/heebo/heebo-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 800; src: url('/fonts/heebo/heebo-hebrew-800-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 800; src: url('/fonts/heebo/heebo-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 900; src: url('/fonts/heebo/heebo-hebrew-900-normal.woff2') format('woff2'); unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 900; src: url('/fonts/heebo/heebo-latin-900-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: light;
  /* design-v2.css .page-v2 values, as in the mock (form pages) */
  --cream: #F5F0E8;
  --cream-deep: #EDE8DF;
  --ink: #1A1714;
  --mid: rgba(26,23,20,.72);
  --ghost: rgba(26, 32, 39, .55);
  --brd: rgba(26, 32, 39, .10);
  --brd-strong: rgba(26, 32, 39, .18);
  --accent: #4E7A6A;
  --accent-deep: #39524b;
  --accent-darker: #2b3f39;
  --card-radius: 4px;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Heebo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: "Heebo", sans-serif; font-weight: 900; color: var(--ink); margin: 0; }
a { color: var(--accent-deep); }
p { margin: 0; }

/* ───────── Course player (Tichr port) ───────── */
.player {
  --cp: #39524b;                       /* course_brandings.primary_color for 7-days */
  --cp-light: color-mix(in srgb, var(--cp) 12%, white);
  --cp-mid: color-mix(in srgb, var(--cp) 25%, white);
  --bg: #F5F0E8; --surf-1: #FFFFFF; --surf-2: #EDE8DF; --surf-3: #E4DDD3;
  --p-ink: #1A1714; --i60: rgba(26,23,20,.60); --i55: rgba(26,23,20,.55); --i45: rgba(26,23,20,.45);
  --i30: rgba(26,23,20,.30); --i12: rgba(26,23,20,.12); --i06: rgba(26,23,20,.06);
  --sw: 280px; --topbar-h: 56px; --mob-bar-h: 52px;
  --r1: 6px; --r2: 10px; --r3: 16px;
  --eout: cubic-bezier(.16,1,.3,1); --tf: 150ms; --tm: 250ms; --ts: 400ms;
  --ph: 100vh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  position: fixed; inset: 0; height: 100vh; overflow: hidden;
  background: var(--bg); color: var(--p-ink); line-height: 1.6;
  display: flex; flex-direction: column;
}
@supports (height: 100svh) { .player { --ph: 100svh; height: 100svh; } }
[data-theme="dark"] .player {
  --cp-light: rgba(61,107,107,.22); --cp-mid: rgba(61,107,107,.36);
  --bg: #1E1A14; --surf-1: #171411; --surf-2: #272219; --surf-3: #322C20;
  --p-ink: #EDE8DF; --i60: rgba(237,232,223,.62); --i55: rgba(237,232,223,.55); --i45: rgba(237,232,223,.45);
  --i30: rgba(237,232,223,.30); --i12: rgba(237,232,223,.12); --i06: rgba(237,232,223,.06);
}
[data-theme="dark"] .player { color-scheme: dark; }
[data-theme="dark"] body:not(.course-page) { background: #1E1A14; }
.player button { font-family: inherit; }
.player a { text-decoration: none; }
.player :focus-visible { outline: 2px solid var(--cp); outline-offset: 2px; }
[data-theme="dark"] .player :focus-visible { outline-color: #A9C7BE; }

/* mobile bar */
.mob-bar { height: calc(var(--mob-bar-h) + var(--safe-top)); padding-top: var(--safe-top); flex-shrink: 0; background: var(--surf-1); border-bottom: 1px solid var(--i12); padding-inline: 16px; display: flex; align-items: center; justify-content: space-between; }
.mob-title { font-size: 17px; font-weight: 500; color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.mob-btns { display: flex; gap: 4px; align-items: center; }
.icon-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--r1); color: var(--i60); border: 1px solid var(--i12); background: var(--surf-1); cursor: pointer; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-sun { display: none; } .icon-moon { display: block; }
[data-theme="dark"] .player .icon-sun { display: block; } [data-theme="dark"] .player .icon-moon { display: none; }

.p-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mob-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: var(--surf-1); border-bottom: 1px solid var(--i06); }
.mob-lesson-name { font-size: 16px; font-weight: 500; color: var(--p-ink); text-align: center; flex: 1; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mob-nav-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--i12); display: flex; align-items: center; justify-content: center; color: var(--i60); background: var(--surf-1); flex-shrink: 0; padding: 0; cursor: pointer; }
.mob-nav-btn svg { width: 13px; height: 13px; transform: scaleX(-1); }
.mob-nav-btn[disabled] { opacity: .3; cursor: not-allowed; }

/* lesson */
.lesson-wrap { max-width: 680px; margin: 0 auto; padding: 20px 20px 40px; }
.l-header { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--i12); }
.l-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--cp-light); color: var(--cp); border-radius: 99px; font-size: 12px; font-weight: 600; letter-spacing: .05em; }
[data-theme="dark"] .player .l-tag { color: #A9C7BE; }
.l-tag-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.l-title { font-size: 30px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--p-ink); margin: 16px 0 16px; }
.l-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.l-meta-item { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--i60); }
.l-meta-item svg { width: 14px; height: 14px; }
.l-meta-item.is-done { color: var(--cp); } [data-theme="dark"] .player .l-meta-item.is-done { color: #A9C7BE; }
.l-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--i45); }
.l-body p { font-size: 16px; line-height: 1.8; color: var(--p-ink); margin: 0 0 22px; font-weight: 300; text-wrap: pretty; }
.l-body b { font-weight: 500; }
.l-body i { font-style: normal; font-weight: 500; }   /* Tichr slants these; Heebo has no italic */
.l-body a { color: var(--cp); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
[data-theme="dark"] .player .l-body a { color: #A9C7BE; }
/* Tichr: .video-container iframe { height: 66vh } at every width */
.video-container { width: 100%; height: calc(var(--ph) * .66); border-radius: var(--r2); overflow: hidden; margin: 0 0 32px; background: #000; position: relative; }
.video-container iframe { width: 100%; height: 100%; border: 0; display: block; }

/* complete bar (fixed to the bottom of the screen) */
.complete-bar { flex-shrink: 0; background: var(--surf-1); border-top: 1px solid var(--i12); padding: 12px 20px calc(12px + var(--safe-bottom)); display: flex; align-items: center; justify-content: center; }
.complete-bar form { margin: 0; }
.btn-complete { padding: 12px 28px; background: var(--p-ink); color: var(--bg); border-radius: var(--r1); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; border: 1.5px solid transparent; cursor: pointer; min-height: 46px; }
.btn-complete svg { width: 16px; height: 16px; }
.btn-complete.done { background: var(--cp-light); color: var(--cp); border-color: var(--cp); }
[data-theme="dark"] .player .btn-complete.done { color: #A9C7BE; border-color: #A9C7BE; }
.btn-complete[aria-busy="true"] { opacity: .7; }

/* locked */
.lesson-locked { text-align: center; padding: 56px 16px; }
.lesson-locked .lock-icon { width: 64px; height: 64px; margin: 0 auto 24px; color: var(--i45); display: block; }
.lesson-locked h2 { font-size: 28px; font-weight: 700; color: var(--p-ink); margin: 0 0 12px; }
.lesson-locked p { font-size: 16px; color: var(--i60); max-width: 480px; margin: 0 auto 20px; }
.unlock-date-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--cp-light); border-radius: var(--r2); color: var(--cp); font-weight: 600; font-size: 14px; }
[data-theme="dark"] .player .unlock-date-badge { color: #A9C7BE; }
.unlock-date-badge svg { width: 18px; height: 18px; }

/* lesson list (sidebar + sheet) */
.prog-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.prog-label { font-size: 12px; font-weight: 500; color: var(--i60); }
.prog-pct { font-size: 12px; font-weight: 600; color: var(--cp); } [data-theme="dark"] .player .prog-pct { color: #A9C7BE; }
.prog-track { height: 4px; background: var(--surf-2); border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--cp); border-radius: 99px; transition: width var(--ts) var(--eout); }
[data-theme="dark"] .player .prog-fill { background: #8FB3A9; }
.lesson-count { font-size: 12px; color: var(--i60); margin-top: 5px; }
.search-wrap { display: flex; align-items: center; gap: 8px; background: var(--surf-2); border: 1px solid var(--i12); border-radius: var(--r1); padding: 7px 12px; }
.search-wrap:focus-within { border-color: var(--cp); }
.search-wrap svg { width: 14px; height: 14px; color: var(--i55); flex-shrink: 0; }
.search-inp { border: none; background: transparent; font-size: 16px; color: var(--p-ink); width: 100%; outline: none; font-family: inherit; padding: 0; }
.search-inp::placeholder { color: var(--i55); font-size: 13px; }
.player .search-inp:focus-visible { outline: none; }
.sec-btn { width: 100%; display: flex; align-items: center; gap: 6px; padding: 9px 20px; background: none; border: none; text-align: start; cursor: pointer; }
.sec-name { font-size: 11px; font-weight: 700; letter-spacing: .07em; color: var(--i60); flex: 1; }
.sec-chev { width: 13px; height: 13px; color: var(--i45); transform: rotate(180deg); transition: transform var(--tm) var(--eout); }
.sec-btn[aria-expanded="false"] .sec-chev { transform: none; }
.sec-lessons { list-style: none; padding: 0; margin: 0; }
.lesson-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 20px; position: relative; color: inherit; min-height: 44px; }
.lesson-item::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--cp); opacity: 0; }
.lesson-item.active { background: var(--cp-light); }
.lesson-item.active::before { opacity: 1; }
.lesson-item.active .l-name { color: var(--cp); font-weight: 500; }
[data-theme="dark"] .player .lesson-item.active .l-name { color: #A9C7BE; }
.lesson-item.locked .l-name { color: var(--i55); }
.l-check { width: 16px; height: 16px; border: 1.5px solid var(--i45); border-radius: 4px; flex-shrink: 0; margin-top: 3px; display: flex; align-items: center; justify-content: center; }
.l-check svg { display: none; width: 9px; height: 9px; color: #fff; }
.lesson-item.done .l-check { background: var(--cp); border-color: var(--cp); }
.lesson-item.done .l-check svg { display: block; }
.lesson-item.locked .l-check { border-style: dashed; }
.l-info { flex: 1; min-width: 0; }
.l-name { font-size: 14px; color: var(--i60); line-height: 1.4; }
.l-dur { font-size: 12px; color: var(--i55); margin-top: 1px; }

/* overlay + bottom sheets */
.overlay { position: fixed; inset: 0; background: rgba(26,23,20,.5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 300; opacity: 0; transition: opacity var(--tm); pointer-events: none; }
.overlay.show { opacity: 1; pointer-events: auto; }
[data-theme="dark"] .player .overlay { background: rgba(0,0,0,.65); }
.sheet { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surf-1); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 40px rgba(0,0,0,.14); z-index: 400; transform: translateY(110%); transition: transform var(--ts) var(--eout); display: flex; flex-direction: column; overflow: hidden; max-height: calc(var(--ph) * .88); padding-bottom: var(--safe-bottom); visibility: hidden; }
.sheet.show { transform: translateY(0); visibility: visible; }
.sheet:not(.show) { transition: transform var(--ts) var(--eout), visibility 0s linear var(--ts); }
.sheet-handle { width: 36px; height: 4px; background: var(--i12); border-radius: 99px; margin: 12px auto 0; flex-shrink: 0; }
.sheet-head { padding: 12px 20px; border-bottom: 1px solid var(--i06); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.sheet-title { font-size: 17px; font-weight: 500; color: var(--p-ink); flex: 1; }
.sheet-close { width: 32px; height: 32px; border-radius: 50%; background: var(--surf-2); display: flex; align-items: center; justify-content: center; color: var(--i60); cursor: pointer; border: none; padding: 0; }
.sheet-close svg { width: 13px; height: 13px; }
.sheet-progress { padding: 10px 20px 12px; border-bottom: 1px solid var(--i06); flex-shrink: 0; }
.sheet-search { padding: 8px 16px 10px; border-bottom: 1px solid var(--i06); flex-shrink: 0; }
.sheet-scroll { flex: 1; overflow-y: auto; padding: 6px 0 16px; min-height: 0; overscroll-behavior: contain; }
.settings-body { padding: 20px 20px 28px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.settings-sec-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; color: var(--i55); margin-bottom: 2px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surf-2); border-radius: var(--r2); gap: 12px; }
.settings-row-label { font-size: 14px; font-weight: 500; color: var(--p-ink); }
.settings-row-sub { font-size: 12px; color: var(--i60); margin-top: 1px; }
.lang-toggle { display: flex; background: var(--surf-3); border-radius: 99px; padding: 2px; gap: 2px; flex-shrink: 0; }
.lang-btn { padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--i60); border: none; background: none; cursor: pointer; }
.lang-btn.active { background: var(--surf-1); color: var(--p-ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.fs-scale { display: flex; align-items: center; gap: 0; background: var(--surf-3); border-radius: 99px; padding: 3px; flex-shrink: 0; direction: ltr; }
.fs-btn { border: none; background: transparent; cursor: pointer; border-radius: 99px; width: 24px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--i60); line-height: 1; padding: 0; }
.fs-btn.active { background: var(--surf-1); color: var(--cp); box-shadow: 0 1px 4px rgba(0,0,0,.12); width: 30px; }
[data-theme="dark"] .player .fs-btn.active { color: #A9C7BE; }
[data-fs="-2"] .player .l-body p { font-size: 14px; } [data-fs="-1"] .player .l-body p { font-size: 15px; }
[data-fs="1"] .player .l-body p { font-size: 19px; } [data-fs="2"] .player .l-body p { font-size: 21px; }

/* desktop pieces hidden on mobile */
.sidebar, .topbar { display: none; }

@media (min-width: 769px) {
  .player { display: grid; grid-template-columns: var(--sw) 1fr; grid-template-rows: var(--topbar-h) 1fr auto; }
  .mob-bar, .mob-nav { display: none; }
  .sidebar { display: flex; flex-direction: column; grid-column: 1; grid-row: 1 / -1; background: var(--surf-1); border-inline-end: 1px solid var(--i12); overflow: hidden; min-height: 0; }
  .sb-head { padding: 22px 20px 14px; border-bottom: 1px solid var(--i12); }
  .sb-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--i60); margin-bottom: 5px; }
  .sb-title { font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--p-ink); margin: 0 0 14px; }
  .sb-search { padding: 10px 16px; border-bottom: 1px solid var(--i06); }
  .sb-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 0 20px; }
  .topbar { grid-column: 2; grid-row: 1; background: var(--surf-1); border-bottom: 1px solid var(--i12); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; }
  .tb-nav { display: flex; gap: 4px; }
  .tb-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r1); font-size: 13px; font-weight: 500; color: var(--i60); border: 1px solid var(--i12); background: var(--surf-1); cursor: pointer; }
  .tb-btn svg { width: 13px; height: 13px; }
  .tb-nav .tb-btn svg { transform: scaleX(-1); }
  .tb-btn:disabled { opacity: .35; cursor: not-allowed; }
  .tb-center { display: flex; flex-direction: column; align-items: center; gap: 1px; }
  .tb-num { font-size: 12px; color: var(--i55); }
  .tb-name { font-size: 16px; font-weight: 500; color: var(--p-ink); }
  .tb-actions { display: flex; gap: 6px; align-items: center; }
  .theme-toggle { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r1); color: var(--i60); border: 1px solid var(--i12); background: var(--surf-1); cursor: pointer; padding: 0; }
  .theme-toggle svg { width: 16px; height: 16px; }
  .p-scroll { grid-column: 2; grid-row: 2; }
  .lesson-wrap { padding: 52px 40px 60px; }
  .l-header { margin-bottom: 40px; padding-bottom: 28px; }
  .l-title { font-size: 40px; }
  .l-body p { font-size: 17px; }
  .lesson-locked { padding: 80px 32px; }
  .complete-bar { grid-column: 2; grid-row: 3; padding: 14px 40px calc(14px + var(--safe-bottom)); }
  .sheet.lessons { display: none; }
  .overlay.for-lessons { display: none; }
  .sheet.settings { bottom: auto; left: 20px; right: auto; top: calc(var(--topbar-h) + 8px); width: 320px; border-radius: var(--r3); max-height: 480px; padding-bottom: 0; transform: scale(.95) translateY(-10px); opacity: 0; pointer-events: none; transition: transform var(--tm) var(--eout), opacity var(--tm), visibility 0s linear var(--tm); box-shadow: 0 8px 32px rgba(0,0,0,.18); }
  .sheet.settings.show { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; transition: transform var(--tm) var(--eout), opacity var(--tm); }
  .sheet.settings .sheet-handle { display: none; }
  .player .overlay.settings-open, [data-theme="dark"] .player .overlay.settings-open { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* Home Screen install hint (phones only, shown once after lesson 1) */
.sheet.push { text-align: center; }
.push-body { padding: 22px 24px 34px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.push-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--cp-light); color: var(--cp); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
[data-theme="dark"] .player .push-icon { color: #A9C7BE; }
.push-icon svg { width: 26px; height: 26px; }
.push-title { font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--p-ink); margin: 0; text-wrap: balance; }
.push-text { font-size: 15px; line-height: 1.6; color: var(--i60); margin: 0 0 8px; max-width: 30ch; text-wrap: balance; }
.push-yes { width: 100%; min-height: 48px; padding: 12px 20px; background: var(--p-ink); color: var(--bg); border: none; border-radius: var(--r1); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.push-no { width: 100%; min-height: 44px; padding: 10px 20px; background: none; border: none; color: var(--p-ink); opacity: .75; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.install-steps { list-style: none; margin: 0 0 8px; padding: 12px 14px; width: 100%; background: var(--surf-2); border-radius: var(--r2); text-align: start; display: flex; flex-direction: column; gap: 10px; }
.install-steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.4; color: var(--p-ink); }
.install-steps .n { width: 24px; height: 24px; border-radius: 50%; background: var(--cp-light); color: var(--cp); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .player .install-steps .n { color: #A9C7BE; }
.install-steps svg { width: 18px; height: 18px; vertical-align: -3px; margin-inline-start: 4px; color: #007AFF; }
.install-steps[hidden], .push-yes[hidden], .push-no[hidden] { display: none; }
@media (min-width: 769px) { .sheet.push { display: none; } }
@media (prefers-reduced-motion: reduce) { .player *, .player *::before { transition-duration: .01ms !important; } }

/* ───────── Form pages: bar = the player's mob-bar without buttons ───────── */
.app-bar { height: 52px; background: #fff; border-bottom: 1px solid rgba(26,23,20,.12); padding: 0 16px; display: flex; align-items: center; }
.app-bar span { font-size: 17px; font-weight: 500; color: #1A1714; max-width: 1080px; width: 100%; margin: 0 auto; }

.narrow { max-width: 560px; margin: 0 auto; padding: 40px 16px 64px; }
.page-h1 { font-size: clamp(30px, 7.6vw, 44px); line-height: 1.06; letter-spacing: -.022em; margin-top: 6px; text-wrap: balance; }
.lead { color: var(--mid); font-size: 1.08rem; line-height: 1.8; margin-top: 14px; text-wrap: pretty; }

.form { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; font-weight: 700; letter-spacing: .08em; color: var(--mid); }
.field input {
  width: 100%; background: #fff; border: 1px solid var(--brd-strong); border-radius: 6px;
  padding: 13px 16px; font-family: inherit; font-size: 1rem; color: var(--ink); min-height: 50px;
}
.field input::placeholder { color: var(--ghost); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(78,122,106,.2); }
.field input[aria-invalid="true"] { border-color: #9B2C2C; }
.field-error { color: #9B2C2C; font-size: .9rem; line-height: 1.5; margin-top: 6px; }

.btn {
  display: block; width: 100%; text-align: center;
  background: var(--accent-deep); color: #fff; border: none; border-radius: 6px;
  padding: 18px 36px; font-family: inherit; font-size: .96rem; font-weight: 700; letter-spacing: .03em; line-height: 1;
  box-shadow: 0 10px 24px -16px rgba(78, 122, 106, .55); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-darker); }
.btn-ghost {
  display: block; width: 100%; text-align: center;
  background: transparent; color: var(--ink); border: 1.5px solid rgba(26,23,20,.45); border-radius: 6px;
  padding: 14px 28px; font-family: inherit; font-size: .95rem; font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none;
}
.btn:disabled, .btn-ghost:disabled { opacity: .7; cursor: wait; }
.btn:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
@media (min-width: 640px) { .btn, .btn-ghost { display: inline-block; width: auto; } .form .btn, .form .btn-ghost { display: block; width: 100%; } }

.sent {
  margin-top: 26px; padding: 18px; border-radius: var(--card-radius);
  background: var(--cream-deep); border: 1px solid var(--brd-strong);
  display: flex; gap: 12px; align-items: flex-start;
}
.sent svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; color: #3A4047; }
.sent p { color: var(--ink); font-size: 1rem; line-height: 1.7; text-wrap: pretty; }
.sent p + p { color: var(--mid); margin-top: 4px; font-size: .95rem; }
.aside-link { margin-top: 28px; color: var(--mid); font-size: .95rem; }
.aside-link a { font-weight: 700; }

.again { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--brd-strong); }
.again h2 { font-size: 1.1rem; font-weight: 800; }
.again p { color: var(--mid); font-size: .98rem; margin-top: 6px; line-height: 1.7; text-wrap: pretty; }
.again .form { margin-top: 14px; }
.again .sent p { color: var(--ink); margin-top: 0; }
.again .sent p + p { color: var(--mid); margin-top: 4px; }

@media (min-width: 900px) { .narrow { padding-top: 64px; } }

/* Push notifications (Phase 3, mock screen 2b + the settings switch) */
.settings-push[hidden] { display: none; }
.settings-sec-gap { margin-top: 10px; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--surf-3); border: none; padding: 3px; cursor: pointer; flex-shrink: 0; display: flex; justify-content: flex-start; transition: background var(--tm); box-shadow: inset 0 0 0 1.5px rgba(128,128,128,.55); }
.switch::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--surf-1); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
[data-theme="dark"] .player .switch::after { background: #D8D3CA; }
.switch.on { background: var(--cp); justify-content: flex-end; box-shadow: none; }
[data-theme="dark"] .player .switch.on { background: #6E9A8D; }
.switch[aria-busy="true"] { opacity: .6; cursor: progress; }
