/* Layout: شريط علوي + تبويبات (الرئيسية، مساري، الحصص المباشرة، الثقافات، المشرف) ← شريط زليج ← محتوى القسم المختار */
:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #eaf1ee;
  --ink: #12302b;
  --muted: #56706a;
  --line: #d5e2dd;
  --green: #0e6b57;
  --green-ink: #ffffff;
  --blue: #1f4f8f;
  --ochre: #c38a1c;
  --ochre-soft: #fbf1dc;
  --hero: #0b4a3d;
  --hero-ink: #f1f7f4;
  --danger: #b42318;
  --tile-bg: #fbfcfb;
  --display: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --body: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1613; --surface: #11211d; --surface-2: #172c27; --ink: #e5eeeb; --muted: #94aba4;
    --line: #25403a; --green: #3aae8b; --green-ink: #06231c; --blue: #79a4e3; --ochre: #e2ae48;
    --ochre-soft: #2e2511; --hero: #082f27; --hero-ink: #eaf4f0; --danger: #f97066; --tile-bg: #0f1d1a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1613; --surface: #11211d; --surface-2: #172c27; --ink: #e5eeeb; --muted: #94aba4;
  --line: #25403a; --green: #3aae8b; --green-ink: #06231c; --blue: #79a4e3; --ochre: #e2ae48;
  --ochre-soft: #2e2511; --hero: #082f27; --hero-ink: #eaf4f0; --danger: #f97066; --tile-bg: #0f1d1a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.65; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.3; margin: 0; text-wrap: balance; font-weight: 800; }
html[lang="ar"] body { font-weight: 600; }
html[lang="ar"] .hint, html[lang="ar"] .note { font-weight: 500; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: 1160px; margin-inline: auto; }

/* zellige tile classes */
.z-bg { fill: var(--tile-bg); }
.z-star { fill: var(--green); }
.z-core { fill: var(--tile-bg); }
.z-dot { fill: var(--ochre); }
.z-corner { fill: var(--blue); }
.z-gem { fill: var(--ochre); }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.lang-switch button {
  border: 0; background: transparent; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--muted); letter-spacing: 0.03em;
}
.lang-switch button[aria-pressed="true"] { background: var(--green); color: var(--green-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s;
}
.btn:hover { border-color: var(--green); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ochre { background: var(--ochre); border-color: var(--ochre); color: #1d1405; }
.btn-ghost-light { background: transparent; color: var(--hero-ink); border-color: rgba(255,255,255,.35); }
.btn-sm { padding: 6px 12px; font-size: .9rem; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

/* hero */
.hero { background: var(--hero); color: var(--hero-ink); position: relative; overflow: hidden; }
.hero .inner { position: relative; z-index: 1; padding-block: 52px 48px; display: grid; gap: 14px; max-width: 1160px; }
.hero-copy { max-width: 620px; display: grid; gap: 14px; }
.kicker { color: var(--ochre); font-weight: 700; letter-spacing: .06em; font-size: .9rem; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); }
.hero p { font-size: 1.08rem; opacity: .9; max-width: 56ch; }
.badge {
  justify-self: start; display: inline-flex; gap: 6px; align-items: center;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08);
  padding: 5px 14px; border-radius: 999px; font-size: .92rem;
}
.badge strong { font-weight: 700; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hero-art {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: min(46%, 520px); z-index: 0; opacity: .5;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent);
          mask-image: linear-gradient(to left, #000 35%, transparent);
}
[dir="rtl"] .hero-art { -webkit-mask-image: linear-gradient(to right, #000 35%, transparent); mask-image: linear-gradient(to right, #000 35%, transparent); }
.hero-art svg { width: 100%; height: 100%; display: block; }
.zband { height: 34px; border-block: 3px solid var(--ochre); background: var(--tile-bg); }
.zband svg { width: 100%; height: 100%; display: block; }

main { padding-block: 40px 20px; }
.section { margin-bottom: 48px; }
.sec-head { display: grid; gap: 4px; margin-bottom: 20px; }
.sec-head h2 { font-size: 1.7rem; display: flex; align-items: center; gap: 10px; }
.sec-head h2::before {
  content: ""; width: 14px; height: 14px; flex: none; background: var(--ochre);
  transform: rotate(45deg); border-radius: 2px;
}
.sec-head p { color: var(--muted); }

/* language cards */
.langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.lang-card {
  text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; cursor: pointer; display: grid; gap: 6px; align-content: start;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.lang-card:hover, .lang-card[aria-pressed="true"] { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 10px 24px -14px rgba(14,107,87,.5); }
.lang-card[aria-pressed="true"] { background: var(--surface-2); }
.lang-mark {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 6px;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--green-ink); position: relative;
}
.lang-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lang-mark span { position: relative; }
.lang-card h3 { font-size: 1.25rem; }
.native { color: var(--green); font-weight: 600; font-size: .95rem; }
.lang-card p { color: var(--muted); font-size: .93rem; }
.chip { justify-self: start; margin-top: 6px; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--ochre-soft); color: var(--ochre); }

/* registration */
.reg-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  transition: border-color .2s;
}
.field input:focus, .field select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.field input[aria-invalid="true"] , .field select[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: .82rem; color: var(--muted); }
.err { font-size: .85rem; color: var(--danger); min-height: 0; }
.note { font-size: .85rem; color: var(--muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.features { display: grid; gap: 18px; }
.feature { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.feature svg { width: 26px; height: 26px; margin-top: 3px; }
.feature h4 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .93rem; }

/* student dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-head h2 { font-size: 1.6rem; }
.dash-head p { color: var(--muted); }
.store-note { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.store-note i { width: 8px; height: 8px; border-radius: 50%; background: var(--ochre); display: inline-block; }
.store-note.cloud i { background: var(--green); }

.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 26px 0 22px; position: relative; }
.path::before { content: ""; position: absolute; inset-inline: 12.5%; top: 26px; height: 3px; background: var(--line); }
.step { background: none; border: 0; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 0 4px; position: relative; color: var(--ink); }
.node { width: 54px; height: 54px; display: grid; place-items: center; position: relative; }
.node svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.node svg polygon { fill: var(--surface); stroke: var(--line); stroke-width: 3; transition: fill .2s, stroke .2s; }
.node b { position: relative; font-family: var(--display); font-size: 1.05rem; }
.step.done .node svg polygon { fill: var(--green); stroke: var(--green); }
.step.done .node b { color: var(--green-ink); }
.step.current .node svg polygon { stroke: var(--ochre); }
.step[aria-selected="true"] .node svg polygon { stroke: var(--ochre); fill: var(--ochre-soft); }
.step.done[aria-selected="true"] .node svg polygon { fill: var(--green); }
.step small { font-size: .82rem; color: var(--muted); text-align: center; }
.step .tag { font-size: .72rem; font-weight: 700; color: var(--ochre); }

.level-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; }
.level-info { display: grid; gap: 12px; align-content: start; }
.level-info h3 { font-size: 1.4rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { background: var(--surface-2); border-radius: 8px; padding: 4px 10px; font-size: .88rem; font-weight: 600; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lesson {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg);
}
.lesson.is-done { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; color: var(--muted); width: 26px; text-align: center; }
.lesson-title { font-weight: 600; }
.lesson .kind { font-size: .78rem; color: var(--blue); font-weight: 600; }
.check {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px;
  font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lesson.is-done .check { background: var(--green); border-color: var(--green); color: var(--green-ink); }

/* logo */
.brand { gap: 10px; }
.brand svg { width: 40px; height: 40px; }
.logo-a { fill: none; stroke: var(--green-ink); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.wordmark { display: grid; line-height: 1.05; }
.wordmark b { font-family: var(--display); font-size: 1.32rem; font-weight: 700; letter-spacing: .01em; }
.wordmark small { font-family: var(--body); font-size: .64rem; font-weight: 600; letter-spacing: .32em; color: var(--ochre); text-transform: uppercase; }
footer .wordmark small { color: var(--ochre); }
footer .brand { color: var(--hero-ink); }

/* lesson viewer */
.lesson-open { background: none; border: 0; padding: 0; text-align: start; cursor: pointer; min-width: 0; display: grid; color: inherit; }
.lesson-open:hover .lesson-title { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.level-panel.is-lesson { grid-template-columns: minmax(0, 1fr); }
.lv { display: grid; gap: 16px; min-width: 0; }
.lv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-head { display: grid; gap: 4px; }
.lv-head h3 { font-size: 1.45rem; }
.voice-note { font-size: .86rem; color: var(--ochre); font-weight: 600; }
.group-h { font-family: var(--display); font-size: 1.08rem; color: var(--green); margin-top: 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tiles.letters { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.tile {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 8px;
  display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer; min-width: 0;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.tile:hover { border-color: var(--green); }
.tile.playing, .prow.playing { border-color: var(--ochre); box-shadow: 0 0 0 3px var(--ochre-soft); }
.tile .big { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.tile .t { font-weight: 700; overflow-wrap: anywhere; }
.tile .m, .prow .m { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.swatch { width: 30px; height: 30px; transform: rotate(45deg); border-radius: 5px; border: 1px solid var(--line); margin: 6px 0 4px; }
.digit { font-family: var(--display); font-size: 1.5rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.rows { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.prow {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.prow:hover { border-color: var(--green); }
.prow .t { font-weight: 600; font-size: 1.05rem; }
.say {
  width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--green); cursor: pointer;
}
.who { display: inline-block; font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--ochre-soft); color: var(--ochre); margin-inline-end: 6px; }
.reading-text {
  font-size: 1.1rem; line-height: 1.95; padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--ochre); border-radius: 12px;
}
.quiz { border: 1px dashed var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 12px; background: var(--surface-2); }
.quiz h4 { font-size: 1.1rem; }
.quiz-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hint-box { font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.opt {
  border: 1px solid var(--line); background: var(--surface); padding: 11px 13px; border-radius: 10px;
  cursor: pointer; text-align: start; font-weight: 600; min-width: 0; overflow-wrap: anywhere;
}
.opt:hover:not(:disabled) { border-color: var(--green); }
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--green); background: color-mix(in srgb, var(--green) 16%, var(--surface)); }
.opt.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.fb-ok { color: var(--green); font-weight: 700; }
.fb-bad { color: var(--danger); font-weight: 700; }
.score { font-family: var(--display); font-size: 1.4rem; }

/* navigation tabs */
.tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs .inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs .inner::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 14px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--green); border-bottom-color: var(--ochre); }
a.brand { text-decoration: none; }
.view { animation: fadeIn .3s ease-out; }
.view:not(#view-home) { padding-block: 32px 10px; }
.empty-card { display: grid; gap: 12px; justify-items: start; }

/* lesson steps */
.step-h { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.step-n {
  width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--green-ink);
  display: grid; place-items: center; font-weight: 800; flex: none; font-variant-numeric: tabular-nums;
}
.step-h h4 { font-size: 1.15rem; }
.lesson-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }

/* media */
.media { display: grid; gap: 14px; }
.media-item { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); min-width: 0; }
.media-item video { width: 100%; max-width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.media-item audio { width: 100%; }
.media-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.media-label { font-size: .8rem; font-weight: 800; color: var(--ochre); }
.admin-box { border: 2px dashed var(--ochre); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: var(--ochre-soft); }
.admin-box input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); min-width: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

.voice-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.voice-bar label { font-size: .88rem; font-weight: 700; }
.voice-bar select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); max-width: 100%; min-width: 0; }
#voiceSel { flex: 1 1 200px; }
.rec-mode .tile, .rec-mode .prow { border-style: dashed; border-color: var(--ochre); }
.tile, .prow { position: relative; }
.tile.has-rec::after, .prow.has-rec::after {
  content: ""; position: absolute; top: 7px; inset-inline-end: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}

/* live sessions */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 14px; font-weight: 700; cursor: pointer; color: var(--muted); }
.chip-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.sessions { display: grid; gap: 12px; }
.session {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.s-date { border-radius: 12px; background: var(--hero); color: var(--hero-ink); text-align: center; padding: 8px 4px; display: grid; line-height: 1.15; }
.s-date b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.s-date small { font-size: .78rem; opacity: .85; }
.s-body { display: grid; gap: 8px; min-width: 0; }
.s-body h3 { font-size: 1.15rem; }
.s-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; }
.pill { background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 700; }
.pill.ok { background: var(--green); color: var(--green-ink); }
.join { display: grid; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.join code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere; user-select: all; }

/* culture */
.teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.teaser {
  display: grid; gap: 8px; text-decoration: none; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; text-align: start; padding: 0;
  transition: transform .2s, border-color .2s;
}
.teaser:hover { transform: translateY(-3px); border-color: var(--green); }
.teaser svg { width: 100%; height: 54px; display: block; }
.teaser b { padding: 0 14px 14px; font-size: 1.1rem; }
.cult { display: grid; gap: 24px; }
.cult-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; scroll-margin-top: 16px; }
.cult-band svg { width: 100%; height: 40px; display: block; }
.cult-body { padding: 20px; display: grid; gap: 16px; }
.cult-body h3 { font-size: 1.6rem; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.fact-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); display: grid; gap: 4px; align-content: start; }
.fact-card .cat { font-size: .78rem; font-weight: 800; color: var(--ochre); letter-spacing: .03em; }
.fact-card p { font-size: .96rem; }
.expr { display: flex; gap: 12px; align-items: center; background: var(--ochre-soft); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.expr .t { font-size: 1.25rem; font-weight: 800; }
.expr .m { color: var(--muted); }
.c-dz .z-star { fill: var(--green); } .c-fr .z-star { fill: var(--blue); }
.c-tr .z-star { fill: #c0392b; } .c-uk .z-star { fill: var(--blue); } .c-uk .z-corner { fill: #c0392b; }

@media (max-width: 520px) {
  .session { grid-template-columns: 1fr; }
  .s-date { display: flex; gap: 8px; justify-content: center; align-items: baseline; }
}

/* admin */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .93rem; }
th, td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); }
th { font-size: .82rem; color: var(--muted); letter-spacing: .03em; background: var(--surface-2); }
td { font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.count { font-family: var(--display); color: var(--green); }

footer { background: var(--hero); color: color-mix(in srgb, var(--hero-ink) 75%, transparent); margin-top: 40px; font-size: .9rem; }
footer .inner { padding-block: 26px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.toast {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600;
  max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.fade { animation: fadeIn .35s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 820px) {
  .reg-grid, .level-panel { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .hero .inner { padding-block: 36px 34px; }
  .hero-art { width: 70%; opacity: .25; }
  .card { padding: 18px; }
  .node { width: 44px; height: 44px; }
  .path::before { top: 21px; }
  .step small { font-size: .75rem; }
  .lesson { grid-template-columns: minmax(0, 1fr) auto; }
  .lesson .num { display: none; }
}

/* official logo */
.logo-img { width: 44px; height: 44px; flex: none; display: block; border-radius: 10px; }
footer .logo-img { width: 38px; height: 38px; }

/* email verification */
.verify-box { display: grid; gap: 12px; padding: 20px; border: 2px dashed var(--ochre); border-radius: 14px; background: var(--ochre-soft); }
.verify-box h3 { font-size: 1.3rem; }
[hidden] { display: none !important; }
.path:empty { display: none; }

/* contact */
footer .contact a { color: var(--ochre); text-decoration: none; font-weight: 700; }
footer .contact a:hover { text-decoration: underline; }

/* email action (reset password) */
.action-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.action-card { width: min(100%, 420px); display: grid; gap: 14px; }
.action-card h3 { font-size: 1.3rem; }

/* letter names: wrap between words only */
.tiles.letters { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.tiles.letters .m { overflow-wrap: normal; word-break: normal; font-size: .76rem; line-height: 1.25; }

/* languages: fold-out list */
.lang-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; font-weight: 700; font-size: 1.05rem; cursor: pointer; text-align: start; color: var(--ink);
}
.lang-toggle:hover { border-color: var(--green); }
.lang-toggle .chev { transition: transform .2s; color: var(--green); font-size: 1.2rem; }
.lang-toggle[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-color: var(--green); }
.lang-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-list {
  display: grid; border: 1px solid var(--green); border-top: 0;
  border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r); background: var(--surface); overflow: hidden;
}
.lang-list[hidden] { display: none; }
.lang-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 16px; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; text-align: start; color: var(--ink);
}
.lang-row:first-child { border-top: 0; }
.lang-row:hover, .lang-row[aria-pressed="true"] { background: var(--surface-2); }
.lang-row .lang-mark { width: 44px; height: 44px; margin: 0; font-size: 1rem; }
.lang-info { display: grid; gap: 1px; min-width: 0; }
.lang-info b { font-size: 1.05rem; }
.lang-info .native { font-size: .88rem; }
.lang-info small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.lang-row .chip { margin: 0; white-space: nowrap; }
@media (max-width: 520px) { .lang-row .chip { display: none; } .lang-info small { display: none; } }

/* sign in / sign up switch */
.switch-line { font-size: .93rem; color: var(--muted); margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* interface language drop-down */
.ui-select { position: relative; display: inline-flex; align-items: center; }
.ui-select .globe { position: absolute; inset-inline-start: 10px; font-size: .95rem; pointer-events: none; }
.ui-select select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink);
  padding: 6px 30px 6px 32px; font-weight: 700; font-size: .9rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
[dir="rtl"] .ui-select select { padding: 6px 32px 6px 30px; background-position: 10px 55%, 15px 55%; }
.ui-select select:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.badge { font-weight: 600; }

/* phone with country code */
.phone-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; }
.phone-row select { width: 100%; padding: 11px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); min-width: 0; }
.phone-row select[aria-invalid="true"] { border-color: var(--danger); }
.phone-row select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }

/* culture: country flags */
.teasers { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.teaser .flag { width: 100%; height: auto; aspect-ratio: 3 / 2; display: block; border-bottom: 1px solid var(--line); }
.teaser b { padding: 0 12px 12px; font-size: 1rem; }
.cult-band .flag { width: 100%; height: 120px; display: block; border-bottom: 1px solid var(--line); }
.cult-card { border-top: 4px solid var(--ochre); }
.cult-head { display: flex; align-items: center; gap: 14px; }
.cult-head .flag { width: 72px; height: 48px; flex: none; border-radius: 6px; border: 1px solid var(--line); display: block; }

/* ---------- units (A1) ---------- */
.sec { display: grid; gap: 10px; }
.unit-note { background: var(--surface-2); border-inline-start: 4px solid var(--green); border-radius: 10px; padding: 10px 14px; font-size: .95rem; }
.gtable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gtable { width: 100%; border-collapse: collapse; min-width: 0; font-size: .98rem; }
.gtable th { background: var(--surface-2); color: var(--muted); font-size: .8rem; padding: 8px 12px; text-align: start; }
.gtable td { padding: 9px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.gtable tr:hover td { background: color-mix(in srgb, var(--green) 8%, transparent); }
.gtable td:first-child { font-weight: 700; color: var(--green); white-space: nowrap; }
.gtable tr.playing td { background: var(--ochre-soft); }
.fill-s { font-size: 1.15rem; font-weight: 700; }
.blank { display: inline-block; min-width: 70px; border-bottom: 3px dashed var(--ochre); text-align: center; padding: 0 6px; color: var(--ochre); }
.blank.ok { color: var(--green); border-color: var(--green); }
.blank.bad { color: var(--danger); border-color: var(--danger); }
.unit-status { font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.unit-status.ok { color: var(--green); }
.step.locked { opacity: .75; }
.step.locked .node b { font-size: .95rem; }
.lock-box { border: 2px dashed var(--ochre); background: var(--ochre-soft); border-radius: 14px; padding: 16px; display: grid; gap: 8px; margin-bottom: 14px; }
.lessons.locked .lesson { opacity: .7; }
.continue-btn { width: 100%; text-align: start; border: 0; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; cursor: pointer;
  background: var(--green); color: var(--green-ink); font-weight: 700; font-size: 1rem; }
.review-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 16px; display: grid; gap: 8px; background: var(--surface); }
.prow.rev { grid-template-columns: auto minmax(0, 1fr) auto; cursor: default; }
.rev-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 8px; }

/* ---------- phone side menu ---------- */
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 0; }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.drawer-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(80vw, 300px); background: var(--surface); z-index: 41;
  box-shadow: 0 0 30px rgba(0,0,0,.25); padding: 70px 12px 20px; overflow-y: auto; animation: drawerIn .2s ease-out; }
[dir="rtl"] .drawer { animation-name: drawerInRtl; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawerInRtl { from { transform: translateX(-100%); } to { transform: none; } }
.drawer nav { display: grid; gap: 2px; }
.drawer a { display: block; padding: 13px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.drawer a:hover { background: var(--surface-2); }
.drawer a[aria-current="page"] { background: var(--surface-2); color: var(--green); border-inline-start: 4px solid var(--ochre); }
body.no-scroll { overflow: hidden; }
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .tabs { display: none; }
  .bar-actions { gap: 6px; }
  .topbar .inner { flex-wrap: nowrap; }
  #accountBtn { padding: 6px 10px; font-size: .85rem; }
  .ui-select select { padding-top: 6px; padding-bottom: 6px; font-size: .82rem; }
}

/* ---------- learning choice ---------- */
.choice-back { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.choice-back[hidden] { display: none; }
.choice-card { width: min(100%, 620px); position: relative; display: grid; gap: 16px; }
.choice-card h3 { font-size: 1.3rem; padding-inline-end: 34px; }
.choice-x { position: absolute; top: 14px; inset-inline-end: 14px; border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--ink); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-opt { display: grid; gap: 8px; align-content: start; text-align: start; border: 2px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); color: var(--ink); }
button.choice-opt { cursor: pointer; }
button.choice-opt:hover { border-color: var(--green); background: var(--surface-2); }
.choice-opt b { font-size: 1.08rem; }
.choice-opt span { color: var(--muted); font-size: .92rem; }
.choice-opt em { font-style: normal; justify-self: start; font-size: .8rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--green); color: var(--green-ink); }
.choice-opt.is-soon { border-style: dashed; background: var(--bg); }
.choice-opt.is-soon .btn { justify-self: start; }
.soon-badge { font-style: normal; justify-self: start; font-size: .8rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--ochre-soft) !important; color: var(--ochre) !important; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }

/* ---------- courses & about ---------- */
.soon-card { display: grid; gap: 12px; justify-items: start; border: 2px dashed var(--ochre); border-radius: var(--r); padding: 22px; background: var(--surface); }
.soon-card h3 { font-size: 1.35rem; }
.soon-card p { color: var(--muted); }
.soon-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.about-card { display: grid; gap: 14px; max-width: 760px; font-size: 1.05rem; line-height: 1.9; }
.about-lead { font-size: 1.35rem; font-weight: 800; color: var(--green); line-height: 1.5; }
.about-credit { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: .95rem; }
.drawer-lang { display: flex; margin: 0 4px 14px; }
.drawer-lang select { width: 100%; }
@media (max-width: 720px) {
  .bar-actions > .ui-select { display: none; }
  .bar-actions { flex-wrap: nowrap; }
}
.drawer-x { position: absolute; top: 16px; inset-inline-end: 16px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); font-size: 1.05rem; cursor: pointer; }

/* ---------- admin ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { display: grid; gap: 2px; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; background: var(--surface); color: var(--ink); }
button.stat { cursor: pointer; }
.stat.on { border-color: var(--green); background: var(--surface-2); }
.stat b { font-size: 1.6rem; color: var(--green); font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }
.admin-wait { border: 1px dashed var(--ochre); background: var(--ochre-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 8px; }
.wait-list { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-filters select, .admin-filters input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.admin-filters input { flex: 1 1 220px; }
.units-bar { display: flex; gap: 2px; margin-bottom: 2px; }
.units-bar i { width: 9px; height: 14px; border-radius: 2px; background: var(--line); display: block; }
.units-bar i.ok { background: var(--green); }
.units-bar i.try { background: var(--ochre); }

/* ================= Phase 2: images, news, social, word of the day ================= */
/* hero photo */
.hero .inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 28px; }
.hero-photo { margin: 0; border-radius: 22px; overflow: hidden; border: 3px solid color-mix(in srgb, var(--ochre) 70%, transparent);
  box-shadow: 0 18px 40px rgba(0,0,0,.28); aspect-ratio: 16 / 10; animation: photoIn .8s ease-out both .1s; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes photoIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: copyIn .6s ease-out both; }
.hero-copy > *:nth-child(2) { animation-delay: .08s; } .hero-copy > *:nth-child(3) { animation-delay: .16s; }
.hero-copy > *:nth-child(4) { animation-delay: .24s; } .hero-copy > *:nth-child(5) { animation-delay: .32s; }
@keyframes copyIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) { .hero .inner { grid-template-columns: 1fr; } .hero-photo { aspect-ratio: 16 / 9; } }

/* reveal on scroll */
.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* cards lift */
.news-card, .follow-card, .teasers > *, .choice-opt { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.news-card:hover, .follow-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }

/* auth images */
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.auth-img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r); display: block; }
.features-col { display: grid; gap: 20px; }
.auth-img.wide { aspect-ratio: 16 / 10; height: auto; object-position: center 30%; }
@media (max-width: 820px) { .auth-grid { grid-template-columns: 1fr; } .auth-grid .auth-img { display: none; } .auth-img.wide { aspect-ratio: 16 / 8; } }

/* choice dialog images */
.choice-img { width: calc(100% + 32px); margin: -16px -16px 4px; height: 120px; object-fit: cover; border-radius: 12px 12px 0 0; display: block; }
.choice-opt { overflow: hidden; }
.choice-opt.is-soon .choice-img { filter: saturate(.8); }
@media (max-width: 560px) { .choice-img { height: 90px; } }

/* unit banner, locked, win */
.unit-banner { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; display: block; }
.lock-img { width: 100%; max-height: 190px; object-fit: cover; object-position: center 70%; border-radius: 10px; display: block; }
.quiz-win { text-align: center; justify-items: center; }
.win-img { width: 100%; max-width: 420px; max-height: 220px; object-fit: cover; object-position: center 25%; border-radius: 12px; display: block; margin-inline: auto; animation: photoIn .6s ease-out both; }
.win-h { color: var(--ochre); font-size: 1.5rem; }

/* courses + about */
.course-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.course-pics img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); display: block; }
.about-img { width: calc(100% + 0px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; display: block; }
@media (max-width: 520px) { .course-pics { grid-template-columns: 1fr; } .course-pics img { aspect-ratio: 16 / 9; } }

/* word of the day */
.wotd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); padding: 0; overflow: hidden; align-items: stretch; }
.wotd-img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; }
.wotd-body { padding: 22px; display: grid; gap: 6px; align-content: center; justify-items: start; }
.wotd-k { color: var(--ochre); font-weight: 800; font-size: .9rem; }
.wotd-word { all: unset; cursor: pointer; font-family: var(--display); font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 800; color: var(--green);
  display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; }
.wotd-word:focus-visible { outline: 3px solid var(--ochre); outline-offset: 4px; }
.wotd-spk { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--green); }
.wotd-word.playing .wotd-spk { background: var(--green); color: var(--green-ink); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.wotd-m { font-size: 1.1rem; }
@media (max-width: 620px) { .wotd { grid-template-columns: 1fr; } .wotd-img { min-height: 0; height: 130px; } }

/* news */
.row-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.news-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 18px; }
.news-head img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); display: block; }
.news-head .sec-head { margin-bottom: 0; }
@media (max-width: 720px) { .news-head { grid-template-columns: 1fr; } .news-head img { aspect-ratio: 16 / 7; } }
.news-list { display: grid; gap: 16px; }
.news-list.compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; border-top: 4px solid var(--green); }
.news-card.tag-ann { border-top-color: var(--ochre); } .news-card.tag-lang { border-top-color: var(--blue); }
.news-card.tag-course { border-top-color: #b45f2a; } .news-card.tag-tip { border-top-color: var(--muted); }
.news-list:not(.compact) .news-card.has-img { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
.news-img { width: 100%; height: 100%; min-height: 160px; max-height: 260px; object-fit: cover; display: block; }
.news-list.compact .news-img { min-height: 0; height: 140px; }
.news-body { padding: 16px 18px; display: grid; gap: 8px; align-content: start; justify-items: start; }
.news-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); }
.ntag { font-weight: 800; color: var(--ink); }
.news-card h3 { font-size: 1.15rem; }
.news-text { white-space: pre-line; color: var(--muted); }
.news-list.compact .news-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 620px) { .news-list:not(.compact) .news-card.has-img { grid-template-columns: 1fr; } .news-img { max-height: 190px; } }
textarea { font: inherit; color: inherit; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); resize: vertical; }
.check-line { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; font-weight: 700; cursor: pointer; }

/* pinned banner */
.pin-bar { background: var(--ochre-soft); border-bottom: 1px solid color-mix(in srgb, var(--ochre) 40%, transparent); }
.pin-bar .inner { display: flex; align-items: center; gap: 10px; padding-block: 9px; }
.pin-link { flex: 1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--ink); text-decoration: none; min-width: 0; }
.pin-link:hover b { text-decoration: underline; }
.pin-tag { font-size: .8rem; font-weight: 800; color: var(--ochre); white-space: nowrap; }
.pin-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 8px; }

/* unread dot */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d92d20; margin-inline-start: 6px; vertical-align: middle; }
.menu-btn { position: relative; }
.menu-btn.has-dot::after { content: ""; position: absolute; top: 5px; inset-inline-end: 5px; width: 9px; height: 9px; border-radius: 50%; background: #d92d20; border: 2px solid var(--surface); }

/* social */
.social { display: flex; gap: 8px; align-items: center; }
.soc { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: inherit; text-decoration: none;
  background: color-mix(in srgb, currentColor 10%, transparent); transition: transform .2s, background .2s, color .2s; }
.soc:hover { transform: translateY(-2px); color: #fff; }
.soc-ig:hover { background: #c13584; } .soc-fb:hover { background: #1877f2; } .soc-li:hover { background: #0a66c2; }
footer .social { color: var(--hero-ink); width: 100%; }
.drawer .drawer-social { margin-top: 18px; padding: 14px 6px 0; border-top: 1px solid var(--line); justify-content: center; color: var(--green); }
.drawer .drawer-social a.soc { display: inline-grid; padding: 0; border-radius: 50%; font-size: 1rem; }
.follow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.follow-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; }
.follow-card span:last-child { display: grid; gap: 2px; }
.follow-card small { color: var(--muted); font-size: .82rem; }
.follow-card em { font-style: normal; color: var(--muted); font-size: .9rem; }
.follow-ic { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; color: #fff; }
.follow-card.soc-ig .follow-ic { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.follow-card.soc-fb .follow-ic { background: #1877f2; }
.follow-card.soc-li .follow-ic { background: #0a66c2; }
.news-head img, .course-pics img, .about-img, .win-img, .lock-img, .unit-banner, .choice-img { height: auto; }
.unit-banner { height: 150px; } .choice-img { height: 120px; }
@media (max-width: 560px) { .choice-img { height: 90px; } }

/* ================= Phase 3: streak, certificate, reviews, visits ================= */
.streak-box { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin-bottom: 12px; }
.streak-box b { font-family: var(--display); font-size: 1.1rem; }
.streak-box.on { border-color: color-mix(in srgb, #e8590c 45%, var(--line)); background: color-mix(in srgb, #e8590c 7%, var(--surface)); }
.streak-box small { color: var(--muted); }
.streak-box .week { display: flex; gap: 6px; }
.streak-box .week i { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); }
.streak-box .week i.on { background: #e8590c; border-color: #e8590c; }
.streak-box .week i.now { outline: 2px dashed var(--ochre); outline-offset: 2px; }
.streak-box.today .week i.now.on { animation: pulse 1.6s ease-in-out 2; }

.cert-box { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin-bottom: 12px; }
.cert-box > div { display: grid; gap: 6px; flex: 1; min-width: 0; }
.cert-box b { font-family: var(--display); }
.cert-box small { color: var(--muted); }
.cert-box .bar { margin: 2px 0 0; }
.cert-ic { font-size: 2rem; line-height: 1; flex: none; }
.cert-box.locked .cert-ic { filter: grayscale(1); opacity: .6; }
.cert-box.ready { border-color: var(--ochre); background: linear-gradient(135deg, var(--ochre-soft), var(--surface)); }
.cert-box .form-actions { margin: 4px 0 0; }

.card-ish { padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; margin-top: 16px; }
.stars { display: flex; gap: 4px; direction: ltr; justify-content: flex-start; }
.stars button { border: 0; background: none; font-size: 1.9rem; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; transition: transform .15s, color .15s; }
.stars button.on { color: var(--ochre); }
.stars button:hover { transform: scale(1.15); }
.stars.static { color: var(--ochre); font-size: 1.15rem; letter-spacing: 2px; }
.lbl { font-weight: 700; display: block; margin-bottom: 4px; }
.rev-status { font-weight: 700; color: var(--ochre); }
.rev-status.ok { color: var(--green); }

.said-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.said-card { margin: 0; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: start; position: relative; }
.said-card::before { content: "“"; position: absolute; top: -6px; inset-inline-end: 14px; font: 800 4rem/1 Georgia, serif; color: color-mix(in srgb, var(--ochre) 30%, transparent); }
.said-card blockquote { margin: 0; font-size: 1.02rem; }
.said-card figcaption { display: grid; }
.said-card figcaption small { color: var(--muted); }
.said-card.pending { border-style: dashed; border-color: var(--ochre); }
.said-card .form-actions { margin: 0; }

.admin-box { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); display: grid; gap: 12px; }
.admin-box .admin-stats { margin: 0; }
.vbars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 120px; }
.vbar { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; gap: 4px; }
.vbar span { align-self: end; display: block; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--ochre), var(--green)); }
.vbar small { font-size: .7rem; color: var(--muted); }

/* ================= Phase 4: placement test, flashcards, invite, privacy, delete ================= */
.pt-card { display: grid; gap: 14px; max-width: 760px; }
.pt-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pt-lang { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); padding: 0; cursor: pointer; display: grid; text-align: center; font: inherit; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.pt-lang:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.08); }
.pt-lang img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.pt-lang b { padding: 10px; font-family: var(--display); font-size: 1.1rem; }
.pt-head { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; }
.pt-q { font-size: clamp(1.25rem, 4vw, 1.6rem); font-weight: 700; margin: 4px 0; }
.pt-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .pt-opts { grid-template-columns: 1fr; } }
.pt-result { display: grid; gap: 10px; justify-items: start; }
.pt-res-img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; }
.kicker-dark { color: var(--ochre); font-weight: 800; }
.pt-meter { display: flex; gap: 6px; width: 100%; direction: ltr; }
.pt-meter span { flex: 1; text-align: center; padding: 8px 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-weight: 800; }
.pt-meter span.on { background: color-mix(in srgb, var(--green) 25%, var(--surface)); color: var(--green); }
.pt-meter span.me { background: var(--green); color: var(--green-ink); }

.flash-cta { display: grid; gap: 6px; justify-items: start; margin-bottom: 12px; }
.flash { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); border: 2px solid var(--green); background: var(--surface); margin-bottom: 12px; justify-items: center; text-align: center; }
.flash.done { border-color: var(--ochre); }
.flash-top { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.flash-card { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 26px 18px; width: 100%; box-sizing: border-box; border-radius: 14px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.flash-card:focus-visible { outline: 3px solid var(--ochre); }
.flash-t { font-family: var(--display); font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; color: var(--green); }
.flash-m { font-size: 1.15rem; font-weight: 700; }
.flash-btns { justify-content: center; }
.btn-know { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.btn-again { border-color: var(--danger, #d92d20); color: var(--danger, #d92d20); }

.invite-box { margin-top: 16px; padding: 16px; border-radius: var(--r); border: 1px dashed var(--ochre); background: var(--ochre-soft); display: grid; gap: 8px; }
.invite-box code { display: block; padding: 8px 10px; border-radius: 8px; background: var(--surface); font-size: .85rem; overflow-wrap: anywhere; user-select: all; }
.invite-box .form-actions { margin: 0; }

.privacy { display: grid; gap: 6px; max-width: 820px; }
.privacy h3 { font-size: 1.15rem; color: var(--green); margin-top: 10px; }
.foot-link { color: inherit; opacity: .85; font-size: .9rem; }

.btn-quiet { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; }
.del-box { margin: 10px 0 16px; padding: 16px; border-radius: var(--r); border: 1px solid var(--danger, #d92d20); background: color-mix(in srgb, var(--danger, #d92d20) 6%, var(--surface)); display: grid; gap: 8px; max-width: 520px; }
.del-box h4 { color: var(--danger, #d92d20); }
.btn-danger-fill { background: var(--danger, #d92d20); color: #fff; border-color: var(--danger, #d92d20); }

/* ================= Phase 5: conversation club + teacher space ================= */
.club-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 18px; }
@media (max-width: 760px) { .club-hero { grid-template-columns: 1fr; } }
.club-kicker { color: var(--ochre); font-weight: 800; font-size: .9rem; }
.club-points { list-style: none; margin: 0; padding: 16px; display: grid; gap: 8px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.club-points li { font-weight: 700; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.club-lang { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.club-lang-head { position: relative; }
.club-lang-head img { width: 100%; height: 110px; object-fit: cover; display: block; }
.club-lang-head h3 { position: absolute; inset-inline-start: 14px; bottom: 10px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); font-size: 1.4rem; }
.club-levels { display: grid; gap: 10px; padding: 12px; }
.club-lv { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.lv-chip { display: inline-grid; place-items: center; min-width: 42px; height: 34px; border-radius: 10px; background: var(--green); color: var(--green-ink); font-weight: 800; }
.sess { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: .93rem; }
.sess.soon { grid-template-columns: auto auto; justify-content: space-between; align-items: center; background: none; border-style: dashed; }
.sess.regd { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.sess .form-actions { margin: 4px 0 0; flex-wrap: wrap; align-items: center; }
.sess-when { font-size: .95rem; }
.sess-lang { color: var(--ochre); font-weight: 800; }
.sess-words i { font-style: normal; display: inline-block; margin: 2px 3px; padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.muted { color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--green) 15%, var(--surface)); color: var(--green); }
.club-mine { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px; border-radius: var(--r); border: 2px solid var(--green); background: var(--surface); }
.club-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.club-info ul { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.club-info details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.club-info summary { cursor: pointer; font-weight: 700; }
.club-info details p { margin: 6px 0 0; color: var(--muted); }

.t-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 820px) { .t-grid { grid-template-columns: 1fr; } }
.t-grid .card { display: grid; gap: 6px; }
.t-h { margin: 22px 0 10px; }
.t-sess { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); display: grid; gap: 8px; }
.t-sess.past { opacity: .75; }
.t-sess-main { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.t-sess .form-actions { margin: 0; flex-wrap: wrap; }
.t-regs { display: grid; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.t-reg { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-reg .form-actions { margin: 0; }
.t-pass { max-width: 460px; display: grid; gap: 8px; }
.t-list { display: grid; gap: 8px; }
.t-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.t-item.off { opacity: .6; }
.t-item small { display: block; color: var(--muted); }
.t-item .form-actions { margin: 0; }
.chk-row { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ================= Phase 6: classes (VIP & groups) ================= */
.cls-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.cls-info .card { display: grid; gap: 6px; }
.cls-contact { margin-top: 10px; }
.pill.vip { background: linear-gradient(135deg, var(--ochre), #e2b04a); color: #fff; }
.cls-card .sess-words { display: flex; flex-wrap: wrap; }
.att-wrap { overflow-x: auto; }
.att-table { border-collapse: collapse; font-size: .85rem; min-width: 100%; }
.att-table th, .att-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; white-space: nowrap; }
.att-table td:first-child { text-align: start; font-weight: 700; }
.att-p { color: var(--green); font-weight: 800; background: color-mix(in srgb, var(--green) 10%, transparent); }
.att-a { color: var(--danger, #d92d20); background: color-mix(in srgb, var(--danger, #d92d20) 8%, transparent); }
.pick-row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.pick-row select { flex: 1; min-width: 0; }
