/* englishzmb, platform styles. Colours come from CSS variables injected by build.mjs
   (driven by content.json: color_accent, color_accent_text, color_bg, fonts). */
:root {
  --bg: #f5f1e9;
  --surface: #fdfbf6;
  --sunken: #ece6da;
  --line: #e0d9ca;
  --line-strong: #ccc6b8;
  --ink: #211e18;
  --ink-2: #4a4639;
  --muted: #5c574a;
  --faint: #7a7567;
  --sand: #d8cdb6;
  --plum: #86254f;
  --plum-dark: #5f1a38;
  --pink: #f0c4d6;
  --pink-soft: #f8e4ec;
  --pink-line: #dcb5c5;
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --radius: 24px;
  --shadow: 0 30px 60px -30px rgba(33, 30, 24, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--plum); }
a:hover { color: var(--plum-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 1921px) { .wrap { max-width: 1600px; padding: 0 40px; } } /* wider layout on QHD / 4K screens */
.section { padding: 104px 0; }
.section--sunken { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--pink { background: var(--pink-soft); border-top: 1px solid var(--pink-line); border-bottom: 1px solid var(--pink-line); }
.section--plum { background: var(--plum); color: var(--surface); }
.section--dark { background: var(--ink); color: var(--surface); }
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--plum); font-weight: 700; }
.h2 { font-size: clamp(34px, 4.4vw, 48px); line-height: 1.05; letter-spacing: -0.025em; margin-top: 12px; }
.lead { font-size: 18px; color: var(--muted); margin-top: 16px; }
.muted { color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head > div { max-width: 660px; }
.center { text-align: center; max-width: 720px; margin: 0 auto 56px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15.5px; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
  line-height: 1.2; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 54px; padding: 15px 28px; font-size: 16px; }
.btn--sm { min-height: 44px; padding: 9px 16px; font-size: 14px; }
.btn--primary { background: var(--plum); color: var(--surface); }
.btn--primary:hover { background: var(--plum-dark); color: var(--surface); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--surface); }
.btn--pink { background: var(--pink); color: var(--ink); }
.btn--pink:hover { background: var(--surface); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--surface); }
.btn--dark:hover { background: var(--ink-2); color: var(--surface); }
.btn--on-dark { background: transparent; color: var(--surface); border-color: var(--pink-soft); }
.btn--on-dark:hover { background: var(--surface); color: var(--plum); }
.btn[disabled] { background: var(--line); color: var(--faint); cursor: not-allowed; border-color: var(--line); }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--sunken); color: var(--ink); white-space: nowrap; }
.chip--pink { background: var(--pink-soft); color: var(--plum); }
.chip--dark { background: var(--ink); color: var(--surface); }
.chip--pinkfill { background: var(--pink); color: var(--ink); }
.chip--glass { background: rgba(253, 251, 246, 0.16); color: var(--surface); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card--dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.card--plum { background: var(--plum); color: var(--surface); border-color: var(--plum); }
.card--pink { background: var(--pink-soft); border-color: var(--pink-line); }
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.progress { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--plum); border-radius: 999px; transition: width .35s ease; }
.on-dark .progress { background: rgba(253, 251, 246, 0.16); }
.on-dark .progress > span { background: var(--pink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 13px 13px 13px 4px; background: var(--plum); display: flex; align-items: center; justify-content: center; color: var(--pink-soft); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--plum); font-weight: 700; margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 600; padding: 10px 12px; border-radius: 999px; }
.nav-links a:hover { background: var(--sunken); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--plum); background: var(--pink-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
.mobile-menu { display: none; }
@media (max-width: 1040px) {
  .nav-links, .nav-actions .hide-mobile { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu { display: block; border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-menu[hidden] { display: none !important; }
  .mobile-menu nav { display: flex; flex-direction: column; padding: 12px 24px 20px; gap: 2px; }
  .mobile-menu a { padding: 12px 4px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 17px; border-bottom: 1px solid var(--sunken); }
  .mobile-menu .btn { margin-top: 12px; color: var(--surface); border-bottom: none; }
}

/* Hero */
.hero { position: relative; padding: 64px 0 88px; overflow: hidden; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: center; }
.hero-copy { flex: 1 1 520px; min-width: 0; position: relative; z-index: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--pink-soft); color: var(--plum); border: 1px solid var(--pink-line); padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--plum); }
.hero h1 { font-size: clamp(44px, 5.6vw, 78px); line-height: 1; letter-spacing: -0.035em; margin-top: 22px; }
.hero h1 .accent { color: var(--plum); }
.hero h1 .scribbled { position: relative; display: inline-block; white-space: nowrap; }
.hero h1 .scribble { position: absolute; left: -4%; bottom: -0.16em; width: 108%; height: 0.3em; color: var(--pink); z-index: -1; }
.hero .lead { font-size: 19px; max-width: 560px; margin-top: 24px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-quiz { margin-top: 28px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; box-shadow: 0 18px 40px -28px rgba(33, 30, 24, .35); }
.hero-quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero-quiz-q { font-family: var(--font-head); font-size: 22px; font-weight: 600; margin-top: 8px; line-height: 1.3; }
.hero-quiz-q .gap { min-width: 90px; font-size: inherit; }
.hero-quiz-opts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hero-quiz-opts button { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.hero-quiz-opts button:hover:not([disabled]) { border-color: var(--plum); color: var(--plum); }
.hero-quiz-opts button.is-correct { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.hero-quiz-opts button.is-wrong { border-style: dashed; border-color: var(--plum); color: var(--plum); text-decoration: line-through; }
.hero-quiz-opts button[disabled] { cursor: default; }
.hero-quiz-fb { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.hero-quiz-fb a { font-weight: 700; white-space: nowrap; }
.hero-trust { list-style: none; margin: 32px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; gap: 14px 32px; flex-wrap: wrap; }
.hero-trust strong { display: block; font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.hero-trust span { font-size: 14px; color: var(--muted); }

.hero-stage { flex: 1 1 440px; min-width: 0; position: relative; min-height: 560px; display: flex; align-items: center; justify-content: center; }
.hero-blob { position: absolute; width: 88%; aspect-ratio: 1; max-width: 520px; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; background: var(--pink); opacity: .55; right: 2%; top: 50%; transform: translateY(-50%); }
.hero-dots { position: absolute; width: 180px; height: 140px; left: 0; bottom: 30px; background-image: radial-gradient(var(--pink-line) 2px, transparent 2.5px); background-size: 18px 18px; opacity: .9; }
.lesson-chat { position: relative; width: min(100%, 400px); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 18px; box-shadow: 0 40px 80px -40px rgba(33, 30, 24, .45); display: flex; flex-direction: column; gap: 10px; }
.lesson-chat-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--sunken); }
.lesson-chat-head b { display: block; font-size: 15px; }
.lesson-chat-head small { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.avatar--plum { background: var(--plum); color: var(--pink-soft); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3f8f5c; box-shadow: 0 0 0 3px rgba(63, 143, 92, .18); }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: 15.5px; line-height: 1.4; }
.bubble--t { align-self: flex-start; background: var(--sunken); border-bottom-left-radius: 6px; }
.bubble--s { align-self: flex-end; background: var(--plum); color: var(--surface); border-bottom-right-radius: 6px; }
.bubble--s s { opacity: .65; text-decoration-thickness: 2px; }
.bubble-fix { align-self: flex-end; display: flex; gap: 8px; align-items: flex-start; max-width: 92%; background: var(--pink-soft); border: 1px solid var(--pink-line); color: var(--ink); border-radius: 14px; padding: 9px 12px; font-size: 13.5px; }
.bubble-fix svg { color: var(--plum); flex: none; margin-top: 2px; }
.bubble--typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.bubble--typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-soft); animation: blink 1.2s infinite; }
.bubble--typing span:nth-child(2) { animation-delay: .2s; }
.bubble--typing span:nth-child(3) { animation-delay: .4s; }
.hero-float { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: 0 24px 50px -30px rgba(33, 30, 24, .5); }
.hero-float small { display: block; font-size: 12px; color: var(--muted); }
.hero-float b { display: block; font-family: var(--font-head); font-size: 19px; font-weight: 600; line-height: 1.2; }
.hero-float--lesson { top: 18px; left: -6px; display: flex; gap: 10px; align-items: center; }
.hero-float--lesson .icon-box { width: 40px; height: 40px; }
.hero-float--card { bottom: 22px; right: -4px; background: var(--ink); border-color: var(--ink); color: var(--surface); transform: rotate(3deg); }
.hero-float--card small { color: var(--sand); }
.hero-float--card small:first-child { color: var(--pink); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 11px; }
.hero-float--streak { top: 46px; right: -10px; min-width: 138px; }
.hero-float--streak .week { display: flex; gap: 3px; margin-top: 8px; }
.hero-float--streak .week i { flex: 1; height: 6px; border-radius: 3px; background: var(--pink-line); }
.hero-float--streak .week i.on { background: var(--plum); }
.hero-anim { opacity: 0; animation: heroIn .55s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) forwards; }
.hero-float.hero-anim { animation: heroIn .55s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) forwards, bob 7s ease-in-out calc(var(--d, 0s) + .6s) infinite; }
@keyframes heroIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -8px; } }
@media (max-width: 1040px) { .hero-stage { min-height: 520px; } }
@media (max-width: 640px) {
  .hero { padding: 40px 0 56px; }
  .hero-stage { min-height: 0; padding: 70px 0 90px; }
  .hero-blob { width: 110%; right: -15%; }
  .hero-float--streak { display: none; }
  .hero-float--lesson { top: 0; left: 0; }
  .hero-float--card { bottom: 0; right: 4px; }
  .hero-quiz-q { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .hero-anim, .hero-float.hero-anim { opacity: 1; animation: none; } }

/* Phrase ticker */
.ticker { background: var(--ink); color: var(--surface); overflow: hidden; padding: 18px 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { list-style: none; margin: 0; padding: 0; display: flex; }
.ticker li { display: flex; align-items: baseline; gap: 10px; padding: 0 28px; white-space: nowrap; border-right: 1px solid var(--ink-2); }
.ticker li b { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.ticker li span { color: var(--pink); font-size: 14.5px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker { overflow-x: auto; } }

/* Path / service cards */
.icon-box { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--pink-soft); color: var(--plum); }
.icon-box--dark { background: var(--ink); color: var(--pink); }
.icon-box--lg { width: 52px; height: 52px; border-radius: 16px; }
.paths-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.path-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 36px 40px; position: relative; transition: border-color .2s, transform .2s, box-shadow .2s; }
.path-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.path-top { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; }
.path-num { font-family: var(--font-head); font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--faint); font-variant-numeric: tabular-nums; }
.path-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; }
.path-card h3 { font-size: clamp(24px, 2.2vw, 30px); }
.path-lead { margin: 16px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink); font-weight: 500; max-width: 60ch; text-wrap: pretty; }
.path-more { margin: 12px 0 0; font-size: 15.5px; line-height: 1.65; color: var(--muted); max-width: 64ch; text-wrap: pretty; }
.path-cta { margin-top: auto; padding-top: 28px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--plum); }
.path-cta svg { transition: transform .2s; }
.path-cta:hover svg { transform: translateX(3px); }
.card--plum.path-card .path-lead { color: var(--surface); }
.card--plum.path-card .path-more { color: var(--pink-soft); }
.card--plum.path-card .path-num { color: var(--pink); }
.card--plum.path-card .path-cta { color: var(--pink); }
.card--plum .icon-box { background: var(--pink); color: var(--plum); }
@media (max-width: 900px) {
  .paths-grid { grid-template-columns: minmax(0, 1fr); }
  .path-card { padding: 28px 24px; }
  .path-head { margin-top: 20px; }
  .path-lead { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .path-card, .path-card:hover { transition: none; transform: none; } }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.step-num { font-family: var(--font-head); font-size: 56px; font-weight: 600; color: var(--pink); line-height: 1; }
.step h3 { font-size: 23px; margin: 16px 0 8px; }
.step p { color: var(--muted); }
.feature-band { margin-top: 20px; border-radius: 28px; padding: 40px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.feature-band > div { flex: 1 1 380px; min-width: 0; }
.feature-band h3 { font-size: 32px; }
.feature-band p { color: var(--sand); margin: 12px 0 24px; }
.feature-list { flex: 1 1 380px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.feature-list li { border: 1px solid var(--ink-2); border-radius: 16px; padding: 16px; font-weight: 600; }

/* About */
.about-grid { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about-photo { flex: 1 1 380px; min-width: 0; position: relative; }
.about-photo img, .about-photo .ph { width: 100%; aspect-ratio: 4 / 5; max-height: 600px; object-fit: cover; border-radius: 28px; background: var(--pink); }
.about-badge { position: absolute; right: -12px; bottom: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow); }
.about-badge small { display: block; font-size: 13px; color: var(--muted); }
.about-copy { flex: 1 1 520px; min-width: 0; }
.prose { font-size: 17px; color: var(--muted); margin-top: 20px; }
.prose h2, .prose h3 { font-size: 22px; color: var(--ink); margin: 0 0 12px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--ink); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.badges > * { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); }
.badges a { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (max-width: 640px) { .about-badge { right: 12px; } }

/* Translations */
.tr-grid { display: flex; flex-wrap: wrap; gap: 48px; }
.tr-grid > div:first-child { flex: 1 1 420px; min-width: 0; }
.tr-grid .grid { flex: 1 1 520px; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tr-item { background: var(--surface); border-radius: 20px; padding: 22px; }
.tr-item b { display: block; font-family: var(--font-head); font-size: 20px; margin: 4px 0 6px; }
.tr-item p { color: var(--muted); font-size: 15px; }
.tr-item .n { font-size: 13px; color: var(--plum); font-weight: 700; }

/* Library cards */
.res-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.res-card .res-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.res-card h3 { font-size: 21px; margin-top: 6px; }
.res-card p { color: var(--muted); font-size: 15px; flex: 1; }
.card--dark.res-card p { color: var(--sand); }
.card--dark .link-arrow { color: var(--pink); }
.res-level { font-size: 12px; font-weight: 700; color: var(--muted); }
.card--dark .res-level { color: var(--sand); }
.res-cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; margin-bottom: 4px; }

/* Pricing */
.price-card { display: flex; flex-direction: column; padding: 32px; border-radius: 28px; position: relative; }
.price-card .price { margin-top: 16px; }
.price-card .price b { font-family: var(--font-head); font-size: 46px; font-weight: 600; letter-spacing: -0.02em; }
.price-card .price span { color: var(--muted); }
.price-card .desc { color: var(--muted); margin: 8px 0 24px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-card li { display: flex; gap: 10px; }
.price-card li::before { content: "✓"; color: var(--plum); font-weight: 700; }
.price-card.card--plum .price span, .price-card.card--plum .desc { color: var(--pink-soft); }
.price-card.card--plum li::before { color: var(--pink); }
.price-card.card--plum { box-shadow: 0 30px 60px -30px rgba(134, 37, 79, 0.6); }
.price-badge { position: absolute; top: -14px; left: 32px; background: var(--pink); color: var(--ink); font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }

/* FAQ */
.faq-grid { display: flex; flex-wrap: wrap; gap: 48px; }
.faq-grid > div:first-child { flex: 1 1 320px; min-width: 0; }
.faq-list { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq-list details { background: var(--surface); border-radius: 20px; padding: 0 24px; }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 700; font-size: 17px; padding: 20px 0; min-height: 44px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 26px; color: var(--plum); transition: transform .2s; line-height: 1; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { color: var(--muted); padding-bottom: 20px; }

/* Contact / CTA / footer */
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; padding-top: 96px; padding-bottom: 96px; }
.cta-band h2 { font-size: clamp(38px, 5vw, 56px); letter-spacing: -0.03em; }
.cta-band p { color: var(--pink-soft); font-size: 18px; margin-top: 16px; max-width: 540px; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.contact-list small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.contact-list a, .contact-list b { font-weight: 700; font-size: 16px; text-decoration: none; word-break: break-word; }
.site-footer { background: var(--ink); color: var(--sand); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer .cols { display: flex; gap: 56px; flex-wrap: wrap; font-size: 15px; }
.site-footer .cols div { display: flex; flex-direction: column; gap: 8px; }
.site-footer .cols b { color: var(--surface); }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.site-footer .legal { width: 100%; border-top: 1px solid var(--ink-2); padding-top: 20px; font-size: 13px; }

/* ---------- App pages ---------- */
.app-hero { padding: 48px 0 40px; }
.app-hero--plum { background: var(--plum); color: var(--surface); padding: 56px 0 60px; }
.app-hero--plum .lead { color: var(--pink-soft); }
.app-hero h1 { font-size: clamp(36px, 4.6vw, 52px); letter-spacing: -0.025em; }
.app-main { padding-top: 32px; padding-bottom: 96px; }
.filters { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg-label { font-size: 14px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.seg button { min-height: 44px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button.sq { width: 44px; padding: 0; border-radius: 12px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.seg button.sq[aria-pressed="true"] { background: var(--pink-soft); color: var(--plum); border: 2px solid var(--plum); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 0 20px; min-height: 54px; color: var(--muted); max-width: 640px; margin-top: 28px; }
.search input { flex: 1; border: none; background: none; font-size: 16px; color: var(--ink); outline: none; min-width: 0; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }
.result-badge { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--surface); }

/* Quiz player (level test + exercises) */
.player { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.player-top { position: sticky; top: 65px; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.player-top .player { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.player-top .meta { flex: 1; min-width: 0; }
.player-top .meta div:first-child { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; gap: 12px; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: var(--surface); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.q-body { padding: 48px 0 40px; display: flex; flex-direction: column; gap: 28px; min-height: 60vh; }
.q-text { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; }
.gap { display: inline-block; min-width: 120px; border-bottom: 3px solid var(--plum); color: var(--plum); text-align: center; padding: 0 6px; }
.q-pl { color: var(--muted); font-size: 17px; margin-top: 12px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.option { display: flex; align-items: center; gap: 14px; text-align: left; font-size: 18px; font-weight: 600; padding: 16px 18px; border-radius: 18px; cursor: pointer; min-height: 64px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: background .15s, border-color .15s; }
.option:hover:not([disabled]) { border-color: var(--plum); }
.option .key { width: 32px; height: 32px; flex: none; border-radius: 10px; border: 1px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.option[aria-pressed="true"] { background: var(--pink-soft); border: 2px solid var(--plum); color: var(--plum); }
.option.is-correct { background: var(--ink); border: 2px solid var(--ink); color: var(--surface); }
.option.is-wrong { background: var(--surface); border: 2px dashed var(--plum); color: var(--plum); text-decoration: line-through; }
.option[disabled] { cursor: default; }
.feedback { border-radius: 18px; padding: 18px 20px; }
.feedback b { display: block; font-size: 17px; }
.feedback.ok { background: var(--ink); color: var(--surface); }
.feedback.bad { background: var(--pink-soft); border: 1px solid var(--pink-line); }
.q-actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.btn-text { background: none; border: none; color: var(--muted); font-weight: 700; font-size: 15px; cursor: pointer; min-height: 44px; padding: 0 4px; }
.btn-text:hover { color: var(--ink); }
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 0 80px; }
.result .trophy { width: 88px; height: 88px; border-radius: 28px; background: var(--pink); color: var(--plum); display: flex; align-items: center; justify-content: center; }
.result h1 { font-size: clamp(36px, 4.4vw, 48px); }
.result .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.big-level { font-family: var(--font-head); font-size: 96px; font-weight: 600; color: var(--plum); line-height: 1; letter-spacing: -0.04em; }
.review { width: 100%; max-width: 640px; text-align: left; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.review li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.review ul { padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* Flashcards */
.fc-wrap { max-width: 560px; margin: 0 auto; padding: 32px 24px 80px; display: flex; flex-direction: column; gap: 20px; }
.flashcard { position: relative; min-height: 380px; border-radius: 28px; padding: 40px 28px 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line); width: 100%; transition: background .2s, color .2s; }
.flashcard.is-flipped { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.flashcard .side { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--pink-soft); color: var(--plum); }
.flashcard.is-flipped .side { background: var(--pink); color: var(--ink); }
.flashcard .main { font-family: var(--font-head); font-size: clamp(30px, 6vw, 40px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.flashcard .sub { font-size: 16px; opacity: .8; max-width: 380px; }
.flashcard .hint { position: absolute; bottom: 18px; left: 0; right: 0; font-size: 13px; font-weight: 600; opacity: .7; }
.fc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fc-actions .btn { min-height: 60px; border-radius: 18px; font-size: 16px; }
.kbd { font-size: 12px; opacity: .7; font-weight: 600; }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 40px 0 24px; }
.dash-head h1 { font-size: clamp(30px, 3.6vw, 40px); }
.row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.row > .w2 { flex: 2 1 560px; min-width: 0; }
.row > .w1 { flex: 1 1 300px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.lesson-card { background: var(--plum); color: var(--surface); border-radius: var(--radius); padding: 28px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.lesson-card .mini-label { color: var(--pink); }
.lesson-card h2 { font-size: 30px; margin: 8px 0 4px; }
.lesson-card p { color: var(--pink-soft); }
.lesson-card .stack { display: flex; flex-direction: column; gap: 10px; }
.streak-num { font-family: var(--font-head); font-size: 44px; font-weight: 600; letter-spacing: -0.02em; margin-top: 8px; }
.streak-num small { font-size: 20px; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.days i { display: block; height: 36px; border-radius: 10px; background: var(--sunken); margin-bottom: 4px; }
.days i.on { background: var(--plum); }
.days i.today { outline: 2px solid var(--plum); outline-offset: 1px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--sunken); }
.todo li:last-child { border-bottom: none; }
.todo .grow { flex: 1; min-width: 0; }
.todo .grow b { display: block; }
.todo .grow small { font-size: 14px; color: var(--muted); }
.todo li.done b { text-decoration: line-through; color: var(--faint); }
.skill { margin-top: 16px; }
.skill div:first-child { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, .field input, .field select, .field textarea { min-height: 46px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); padding: 10px 14px; font-size: 15px; width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.on-plum .field label { color: var(--pink-soft); }
.list-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.note-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.note-item .grow { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.note-item small { display: block; color: var(--faint); font-size: 12.5px; margin-bottom: 2px; }
.x-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--faint); cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.x-btn:hover { background: var(--sunken); color: var(--ink); }
.word-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.word-chips span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.word-chips span em { font-style: normal; color: var(--muted); font-weight: 500; }
.onboard { background: var(--ink); color: var(--surface); border-radius: var(--radius); padding: 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.onboard p { color: var(--sand); margin-top: 8px; max-width: 560px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 80; box-shadow: var(--shadow); }

/* Chat widget */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px; border: none; background: var(--plum); color: var(--surface); font-weight: 700; cursor: pointer; box-shadow: 0 16px 32px -14px rgba(134, 37, 79, 0.7); }
.chat-fab:hover { background: var(--plum-dark); }
.chat-panel { position: fixed; right: 20px; bottom: 84px; z-index: 60; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 70px -20px rgba(33, 30, 24, 0.4); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { background: var(--plum); color: var(--surface); padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.chat-head .grow { flex: 1; }
.chat-head small { display: block; color: var(--pink-soft); font-size: 12.5px; }
.chat-head .icon-btn { background: transparent; border-color: rgba(253, 251, 246, .3); color: var(--surface); width: 38px; height: 38px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.msg.assistant { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--plum); color: var(--surface); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); margin: 0 2px; animation: blink 1.2s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .2s; }
.msg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; background: var(--surface); }
.chat-foot { padding: 0 12px 12px; }
.chat-foot button { width: 100%; }
@media (max-width: 640px) { .chat-fab span { display: none; } .chat-fab { padding: 0 16px; } }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
  .card, .panel { padding: 22px; }
  .feature-band, .onboard { padding: 26px; }
  .player, .fc-wrap { padding-left: 16px; padding-right: 16px; }
  .player-top { top: 65px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Panel variants (declared after .panel so they win) */
.panel.card--dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.panel.card--pink { background: var(--pink-soft); border-color: var(--pink-line); }

/* ---------- Auth, accounts, admin ---------- */
.demo-banner { margin: 20px 0 0; background: var(--pink-soft); border: 1px solid var(--pink-line); color: var(--ink); border-radius: 16px; padding: 12px 16px; font-size: 14.5px; }
.auth-wrap { display: flex; justify-content: center; align-items: center; min-height: 62vh; padding: 48px 0; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 40px 32px; max-width: 520px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(30px, 4vw, 38px); }
.btn-google { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); gap: 12px; }
.btn-google:hover { border-color: var(--ink); color: var(--ink); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--plum); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--pink); }
.avatar--lg { width: 72px; height: 72px; }
.avatar--initials { display: inline-flex; align-items: center; justify-content: center; color: var(--plum); font-weight: 700; font-size: 15px; }
.user-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; border-radius: 50%; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary .avatar { width: 44px; height: 44px; }
.user-menu-pop { position: absolute; right: 0; top: 54px; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-width: 240px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.user-menu-pop small { color: var(--muted); margin-bottom: 10px; word-break: break-all; }
.sync-chip { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sync-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3f8f5c; }
.sync-chip.is-busy::before { background: var(--faint); animation: blink 1s infinite; }
.sync-chip.is-error::before { background: var(--plum); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 44px; }
.switch input { width: 18px; height: 18px; accent-color: var(--plum); }
.tabs { display: flex; gap: 4px; background: var(--sunken); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.tabs button { flex: 1; border: none; background: transparent; border-radius: 999px; padding: 9px 12px; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 40px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(33, 30, 24, .12); }
.task-list, .lesson-list, .user-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.task { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; background: var(--surface); }
.task .grow { flex: 1; min-width: 0; }
.task .grow b { display: block; }
.task .grow p { color: var(--muted); font-size: 14.5px; margin-top: 4px; white-space: pre-wrap; }
.task .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.task.is-done { background: var(--bg); }
.task.is-done b { text-decoration: line-through; color: var(--faint); }
.task.is-late .due { color: var(--plum); font-weight: 700; }
.check { width: 30px; height: 30px; flex: none; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: transparent; margin-top: 1px; }
.check:hover { border-color: var(--plum); }
.check[aria-checked="true"] { background: var(--plum); border-color: var(--plum); color: var(--surface); }
.lesson-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; background: var(--surface); }
.lesson-item .date { width: 52px; flex: none; text-align: center; border-radius: 12px; background: var(--pink-soft); color: var(--plum); padding: 6px 0; line-height: 1.1; }
.lesson-item .date b { display: block; font-family: var(--font-head); font-size: 20px; }
.lesson-item .date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.lesson-item .grow { flex: 1; min-width: 0; }
.lesson-item .grow b { display: block; }
.lesson-item .grow small { color: var(--muted); font-size: 13.5px; }
.lesson-item details { margin-top: 6px; font-size: 14px; }
.lesson-item details summary { cursor: pointer; color: var(--plum); font-weight: 700; }
.lesson-item details p { white-space: pre-wrap; color: var(--ink-2); margin-top: 6px; }
.lesson-item.is-cancelled { opacity: .6; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.stat b { display: block; font-family: var(--font-head); font-size: 34px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat--alert { background: var(--pink-soft); border-color: var(--pink-line); }
.stat--alert b { color: var(--plum); }
.mini-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px; min-height: 44px; color: var(--muted); background: var(--surface); flex: 0 1 260px; }
.mini-search input { border: none; outline: none; background: none; min-width: 0; flex: 1; font-size: 15px; color: var(--ink); }
.seg button span { opacity: .7; }
.user-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; flex-wrap: wrap; background: var(--surface); }
.user-row .grow { flex: 1 1 200px; min-width: 0; }
.user-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .grow small { color: var(--muted); font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.user-row.is-pending { border-color: var(--pink-line); background: var(--pink-soft); }
.role-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--sunken); }
.role-badge.pending { background: var(--pink); color: var(--ink); }
.role-badge.admin { background: var(--ink); color: var(--surface); }
.role-badge.tutor { background: var(--plum); color: var(--surface); }
.tutor-pick { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 10px 14px 12px; margin: 14px 0 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tutor-pick legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.tutor-pick .switch { color: var(--ink); }
.tutor-pick small { font-size: 13px; margin-top: 4px; }
.select { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); padding: 6px 10px; font-weight: 600; font-size: 14px; }
dialog.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(640px, 100%); max-width: 100%; border: none; padding: 0; background: var(--bg); color: var(--ink); box-shadow: -30px 0 60px -30px rgba(33, 30, 24, .4); }
dialog.drawer::backdrop { background: rgba(33, 30, 24, .45); }
.drawer-inner { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 16px; min-height: 100%; }
.drawer-head { display: flex; gap: 14px; align-items: center; position: sticky; top: 0; background: var(--bg); padding: 16px 0 12px; z-index: 2; border-bottom: 1px solid var(--line); }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 26px; }
.drawer .panel h3 { font-size: 19px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kv div { background: var(--sunken); border-radius: 14px; padding: 12px; }
.kv b { display: block; font-family: var(--font-head); font-size: 22px; }
.kv span { font-size: 13px; color: var(--muted); font-weight: 600; }
.inline-form { border-top: 1px dashed var(--line-strong); margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.btn-danger { color: var(--plum); }
.lesson-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .auth-card { padding: 32px 20px; } .drawer-inner { padding: 0 16px 16px; } .drawer-head { top: 0; } }
.inline-form > .field, .lesson-edit > .field { flex: none; }
dialog.drawer .toast { left: auto; right: 24px; transform: none; max-width: calc(100% - 48px); }
.turnstile { display: flex; justify-content: center; }
.cal-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 20px; padding: 16px 18px; margin-bottom: 16px; }
.cal-card.is-on { border-style: solid; border-color: var(--line); }
.cal-card .grow { flex: 1 1 280px; min-width: 0; }
.cal-card .grow b { display: block; }
.cal-card .grow small { color: var(--muted); font-size: 14px; }
.cal-card.is-on .icon-box { background: var(--ink); color: var(--pink); }
.mail-card .mail-bad { color: #b3261e; font-weight: 700; }
.mail-log { flex: 1 1 100%; margin-top: 2px; font-size: 14px; }
.mail-log[open] ul { max-height: 340px; overflow-y: auto; padding-right: 6px; }
.mail-log summary { cursor: pointer; color: var(--muted); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.mail-log ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.mail-log li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.mail-row { min-width: 0; overflow-wrap: anywhere; }
.mail-log small { display: block; color: var(--muted); font-size: 13px; }
.mail-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--line-strong); }
.mail-dot.is-sent { background: #2f7d4f; }
.mail-dot.is-failed { background: #b3261e; }
.meet-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.meet-row .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }

/* admin: tabs, content editor (assets/admin-cms.js), image library */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; padding: 6px; background: var(--sunken); border-radius: 999px; width: fit-content; max-width: 100%; }
.admin-tabs button { border: none; background: transparent; border-radius: 999px; min-height: 40px; padding: 8px 16px; font-weight: 700; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.admin-tabs button:hover { color: var(--ink); }
.admin-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(33, 30, 24, .12); }
.cms-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 16px; }
.cms-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 4px; }
.cms-nav button { text-align: left; border: none; background: transparent; border-radius: 12px; min-height: 42px; padding: 8px 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cms-nav button:hover { background: var(--sunken); color: var(--ink); }
.cms-nav button[aria-current="true"] { background: var(--ink); color: var(--surface); }
.cms-form { display: flex; flex-direction: column; gap: 16px; }
.cms-form > h2 { margin-bottom: 4px; }
.cms-field { flex: none; }
.cms-field small { font-size: 13px; }
.cms-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.cms-color { display: flex; gap: 10px; align-items: center; }
.cms-color input[type="color"] { width: 52px; height: 46px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; flex: none; }
.cms-image { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cms-image-prev { width: 120px; height: 120px; border-radius: 16px; background: var(--sunken); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; font-size: 13px; text-align: center; }
.cms-image-prev img { width: 100%; height: 100%; object-fit: cover; }
.cms-image-ctl { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cms-answer { display: flex; flex-direction: column; gap: 6px; }
.cms-radio { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-size: 15px; }
.field .cms-radio { font-size: 15px; font-weight: 500; color: var(--ink); }
.field .cms-radio input { accent-color: var(--plum); width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; }
.cms-radio.is-on { border-color: var(--plum); background: var(--pink-soft); font-weight: 600; }
.cms-warn { color: var(--plum); font-weight: 600; }
.cms-group { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cms-group legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.cms-list { display: flex; flex-direction: column; gap: 8px; }
.cms-list-head { display: flex; gap: 6px; align-items: baseline; }
.cms-count { font-size: 13px; }
.cms-items { display: flex; flex-direction: column; gap: 8px; }
.cms-row { display: flex; gap: 4px; align-items: center; }
.cms-row input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); padding: 8px 12px; }
.cms-entry { position: relative; }
.cms-item { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cms-item[open] { border-color: var(--line-strong); }
.cms-item > summary { list-style: none; display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 8px 160px 8px 12px; cursor: pointer; font-weight: 600; }
.cms-item > summary::-webkit-details-marker { display: none; }
.cms-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cms-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.cms-item-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--sunken); padding-top: 14px; }
.cms-entry > .cms-tools { position: absolute; top: 8px; right: 8px; }
.cms-tools { display: flex; gap: 2px; flex: none; }
.cms-add { align-self: flex-start; }
.cms-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 20px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.cms-bar.is-dirty { border-color: var(--plum); }
.cms-bar.is-dirty > span { color: var(--plum); font-weight: 600; }
.cms-bar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cms-bar-actions .btn-text { text-decoration: none; display: inline-flex; align-items: center; }
body[data-page="admin"] .chat-fab, body[data-page="admin"] .chat-panel { display: none; } /* would cover the save bar */
.cms-warnings { margin-top: 16px; background: var(--pink-soft); border: 1px solid var(--pink-line); border-radius: 16px; padding: 12px 16px; font-size: 14.5px; }
.cms-warnings ul { margin: 6px 0 0; padding-left: 20px; }
dialog.cms-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px); border: none; border-radius: var(--radius); padding: 0 24px 24px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
dialog.cms-dialog::backdrop { background: rgba(33, 30, 24, .45); }
.cms-dialog-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; background: var(--bg); padding: 20px 0 12px; z-index: 2; }
.cms-dialog-head h2 { flex: 1 1 200px; font-size: 24px; }
.media-drop { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 32px 20px; cursor: pointer; background: var(--surface); margin: 16px 0 20px; }
.media-drop:hover, .media-drop.is-over { border-color: var(--plum); background: var(--pink-soft); }
.media-drop:focus-within { outline: 2px solid var(--plum); outline-offset: 2px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-tile { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 8px; text-align: left; font-size: 12.5px; color: var(--muted); min-width: 0; }
button.media-tile { cursor: pointer; }
button.media-tile:hover { border-color: var(--plum); }
.media-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--sunken); }
.media-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; border-radius: 16px; width: 100%; scrollbar-width: none; }
  .admin-tabs button { white-space: nowrap; flex: none; }
  .cms-bar { padding: 10px 12px; gap: 6px; border-radius: 16px; }
  .cms-bar > span { font-size: 13px; width: 100%; }
  .cms-bar-actions { width: 100%; gap: 4px 10px; }
  .cms-bar-actions .btn { min-height: 44px; padding: 8px 14px; font-size: 14px; }
  .cms-bar-actions .btn--primary { margin-left: auto; }
  .cms-bar-actions .btn-text { font-size: 14px; }
  .cms-layout { grid-template-columns: 1fr; }
  .cms-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .cms-nav button { white-space: nowrap; }
  .cms-item > summary { padding-right: 12px; }
  .cms-entry { display: flex; flex-direction: column-reverse; }
  .cms-entry > .cms-tools { position: static; justify-content: flex-end; }
}

/* Illustrations (src/illustrations.mjs): theme-driven colours, so CMS colour changes apply */
.ill { display: block; width: 100%; height: auto; overflow: visible; }
.ill .p { fill: var(--plum); }
.ill .k { fill: var(--pink); }
.ill .s { fill: var(--pink-soft); }
.ill .w { fill: var(--surface); }
.ill .n { fill: var(--sunken); }
.ill .d { fill: var(--sand); }
.ill .i { fill: var(--ink); }
.ill .o, .ill .op, .ill .ow { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ill .o { stroke: var(--ink); }
.ill .op { stroke: var(--plum); }
.ill .ow { stroke: var(--surface); }
.ill .t { fill: var(--ink); font-family: var(--font-head); font-weight: 600; }
.ill .t--light { fill: var(--surface); }
.ill .t--small { font-family: var(--font-body); font-weight: 700; fill: var(--muted); }

.path-art { width: 210px; max-width: 70%; margin: -14px 0 -10px -16px; }
.step-art { margin: -8px -8px 6px; }
.step .step-num { font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--plum); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 6px; }
.about-photo .ill { width: 100%; aspect-ratio: 4 / 5; max-height: 600px; border-radius: 28px; overflow: hidden; }
.app-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px); gap: 24px 56px; align-items: center; }
.app-hero-art { margin: -24px 0; }
.app-hero--plum .ill .o { stroke: var(--ink); }
@media (max-width: 760px) {
  .app-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .app-hero-art { display: none; }
  .path-art { width: 170px; }
  .step { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 20px; }
  .step-art { grid-row: span 3; margin: -4px 0 0 -6px; }
  .step .step-num { margin-top: 4px; }
  .step h3 { font-size: 20px; margin: 2px 0 6px; }
}

/* Students export / import (admin) */
.io-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.io-actions .btn svg { margin-right: 2px; }
dialog.io-dialog { width: min(880px, calc(100% - 32px)); }
.io-dialog > p, .io-dialog fieldset, .io-dialog .io-steps { margin-top: 12px; }
.io-choice { border: 1px solid var(--line); border-radius: 16px; padding: 8px 16px 10px; display: flex; flex-wrap: wrap; gap: 0 20px; }
.io-choice legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.io-choice .switch { color: var(--ink); }
.io-dialog [data-io-go] { margin-top: 18px; }
.io-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.io-steps .btn-text { min-height: 0; padding: 0; font-size: 14.5px; color: var(--plum); text-decoration: underline; }
.io-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.io-chip-err { background: #f7d9d4; color: #8a1f11; }
.io-table-wrap { overflow: auto; max-height: 46vh; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--surface); }
.io-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.io-table th { position: sticky; top: 0; background: var(--sunken); text-align: left; font-weight: 700; padding: 8px 10px; white-space: nowrap; }
.io-table td { padding: 7px 10px; border-top: 1px solid var(--sunken); vertical-align: top; overflow-wrap: anywhere; }
.io-table tr.is-new td:last-child { color: var(--plum); font-weight: 700; }
.io-table tr.is-dup td:last-child { color: var(--muted); }
.io-table tr.is-err td { background: #fbefec; }
.io-table tr.is-err td:last-child { color: #8a1f11; font-weight: 700; }
.io-go { position: sticky; bottom: -24px; z-index: 1; background: var(--bg); margin: 0 -24px; padding: 14px 24px 22px; border-top: 1px solid var(--line); }
.io-go .btn { margin: 0; }
.io-result { margin-top: 12px; background: var(--pink-soft); border: 1px solid var(--pink-line); border-radius: 14px; padding: 12px 16px; }
.io-result--err { background: #fbefec; border-color: #eec2ba; color: #8a1f11; }
.io-table td:nth-child(2), .io-table td:nth-child(5) { white-space: nowrap; overflow-wrap: normal; }

/* Quick "Zaplanuj lekcję" */
.dash-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.dash-actions .btn svg { margin-right: 2px; }
.dash-actions kbd { font: 700 11px/1 var(--font-body); padding: 3px 6px; margin-left: 4px; border-radius: 6px; background: rgba(253, 251, 246, .18); border: 1px solid rgba(253, 251, 246, .35); }
dialog.quick-lesson { width: min(640px, calc(100% - 32px)); }
.quick-lesson .lesson-edit { margin-top: 4px; }
@media (max-width: 640px) { .dash-actions kbd { display: none; } }

/* Admin statistics dashboard (assets/admin-stats.js) */
.st-filters { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 18px; }
.st-updated { margin-left: auto; font-size: 13px; color: var(--muted); }
.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.st-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-kpi-label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.st-kpi-value { font-family: var(--font-body); font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.st-kpi-note { font-size: 13px; color: var(--muted); }
.st-delta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.st-delta b { font-weight: 700; }
.st-delta-vs { flex-basis: 100%; color: var(--muted); font-weight: 500; }
.st-delta.is-good { color: #2f7a4f; }
.st-delta.is-bad { color: #a63a2b; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.st-wide { grid-column: 1 / -1; }
.st-card { min-width: 0; }
.st-card h3 { font-size: 19px; }
.st-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.st-sub { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
.st-toggle { min-height: 32px; font-size: 13.5px; }
.st-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.st-chart { margin-top: 12px; }
.st-chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.st-axis { font: 500 11px var(--font-body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.st-val { font: 700 12px var(--font-body); fill: var(--ink); }
.st-mark { cursor: default; outline: none; }
.st-mark:hover path, .st-mark:focus path { filter: brightness(1.12); }
.st-mark:focus-visible rect { stroke: var(--ink); stroke-width: 1; }
.st-mark.is-partial path { opacity: .55; }
.st-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 12px; padding: 8px 12px; font-size: 13px; box-shadow: var(--shadow); max-width: 260px; }
.st-tip-title { font-size: 12px; color: var(--sand); margin-bottom: 4px; }
.st-tip-row { display: flex; align-items: center; gap: 8px; }
.st-tip-row i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.st-tip-row b { font-size: 14px; }
.st-tip-row span { color: var(--sand); }
.st-hbars { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.st-hbar { outline: none; border-radius: 8px; }
.st-hbar:focus-visible { box-shadow: 0 0 0 2px var(--plum); }
.st-hbar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 4px; }
.st-hbar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-hbar-label b { white-space: nowrap; font-weight: 700; color: var(--ink); }
.st-hbar-track { height: 12px; }
.st-hbar-track i { display: block; height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.st-hbar:hover i, .st-hbar:focus i { filter: brightness(1.12); }
.st-table-wrap { overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.st-table th { text-align: left; background: var(--sunken); padding: 8px 10px; font-weight: 700; white-space: nowrap; }
.st-table td { padding: 7px 10px; border-top: 1px solid var(--sunken); }
.st-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-empty { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.st-attention { display: flex; flex-direction: column; gap: 14px; grid-row: span 2; }
.st-grid > .st-card:not(.st-attention) { align-self: start; }
.st-att { border-top: 1px solid var(--sunken); padding-top: 12px; }
.st-att:first-of-type { border-top: 0; padding-top: 0; }
.st-att-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.st-att-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n b" "s b"; column-gap: 10px; align-items: center; padding: 6px 0; }
.st-att-item > span { grid-area: n; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.st-att-item > small { grid-area: s; font-size: 13px; overflow-wrap: anywhere; }
.st-att-item > .btn { grid-area: b; }
.st-pending { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--pink-soft); font-size: 14px; }
@media (max-width: 900px) { .st-grid { grid-template-columns: minmax(0, 1fr); } .st-attention { grid-row: auto; } .st-updated { margin-left: 0; width: 100%; } }
[data-stats-root] { transition: opacity .2s; } [data-stats-root].is-refreshing { opacity: .55; pointer-events: none; }

/* Close button (X) for dialogs: always top right, 44px target */
.dlg-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; }
.dlg-x:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dlg-x:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
/* Calendly popup (only when a Calendly link is set in the CMS): its own close button made visible */
.calendly-overlay .calendly-popup-close { top: 18px !important; right: 18px !important; width: 44px !important; height: 44px !important; border-radius: 50%; background-color: var(--ink) !important; background-size: 16px !important; background-position: center !important; box-shadow: var(--shadow); opacity: 1 !important; }

/* "Umów lekcję" request dialog (assets/booking.js) */
dialog.book-dialog { position: fixed; width: min(620px, calc(100% - 24px)); max-height: calc(100% - 32px); border: none; border-radius: var(--radius); padding: 28px 28px 24px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
dialog.book-dialog::backdrop { background: rgba(33, 30, 24, .5); }
.book-dialog > .dlg-x { position: sticky; top: 0; float: right; margin: -12px -12px 0 12px; }
.book-head { display: flex; flex-direction: column; gap: 8px; }
.book-head h2 { font-size: 28px; }
.book-head p { font-size: 15px; margin: 0; }
.book-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--pink-soft); color: var(--plum); display: inline-flex; align-items: center; justify-content: center; }
.book-body { margin-top: 18px; }
.book-form { display: flex; flex-direction: column; gap: 16px; }
.book-form .form-row > .field { flex: 1 1 200px; }
.book-form .field { flex: none; }
.book-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.book-fs legend { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; padding: 0; }
.book-chip { position: relative; display: inline-flex; }
.book-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.book-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 14px; }
.book-chip input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.book-chip input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }
.book-slots { display: flex; flex-direction: column; gap: 8px; }
.book-slot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.book-slot input { min-height: 46px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); padding: 8px 12px; width: 100%; }
.book-add { align-self: flex-start; color: var(--plum); min-height: 40px; }
.book-consent { align-items: flex-start; font-weight: 500; color: var(--ink-2); line-height: 1.45; }
.book-consent input { margin-top: 2px; flex: none; }
.book-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.book-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fbefec; color: #8a1f11; font-weight: 600; font-size: 14px; }
.book-info { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--pink-soft); font-size: 14px; }
.book-actions { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 4px; }
.book-summary { margin: 0 0 18px; padding-left: 20px; font-weight: 600; }
@media (max-width: 520px) { dialog.book-dialog { padding: 22px 16px 18px; } .book-head h2 { font-size: 24px; } }
/* student panel: open requests under the lesson card */
.lesson-requests { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.req-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.req-item small { flex-basis: 100%; opacity: .85; }
.on-plum .req-item .btn-text { color: var(--pink-soft); min-height: 32px; }

.cms-dialog-head .dlg-x { position: static; flex: none; }

/* Lesson requests inbox (admin / tutor panel) */
.requests-panel { margin-bottom: 20px; border-color: var(--pink-line); }
.requests-panel h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.req-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.req-card.is-done { opacity: .7; }
.req-who b { font-size: 16px; }
.req-who small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.req-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.req-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.req-slot { border: 1px solid var(--line-strong); background: var(--bg); border-radius: 10px; padding: 7px 10px; font-weight: 700; font-size: 13.5px; color: var(--ink); min-height: 36px; }
button.req-slot { cursor: pointer; }
button.req-slot:hover, button.req-slot:focus-visible { border-color: var(--plum); color: var(--plum); background: var(--pink-soft); }
.req-msg { margin: 0; font-size: 14px; color: var(--ink-2); border-left: 3px solid var(--pink); padding-left: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.req-note { margin: 0; font-size: 13px; color: var(--muted); }
.req-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.st-att--hot { background: var(--pink-soft); border-radius: 14px; padding: 12px 14px !important; border-top: 0 !important; }
.st-att--hot .btn { margin-top: 4px; }
@media (max-width: 520px) { .req-list { grid-template-columns: minmax(0, 1fr); } }
