/* 00-fonts.css */
/* PT Sans & PT Serif — ParaType, SIL Open Font License 1.1 (see /fonts/OFL.txt) */
@font-face{font-family:'PT Sans';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/PTSans-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'PT Sans';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/PTSans-400-latin.woff2) format('woff2');}
@font-face{font-family:'PT Sans';font-style:italic;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/PTSans-400i-cyrillic.woff2) format('woff2');}
@font-face{font-family:'PT Sans';font-style:italic;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/PTSans-400i-latin.woff2) format('woff2');}
@font-face{font-family:'PT Sans';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/PTSans-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'PT Sans';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/PTSans-700-latin.woff2) format('woff2');}
@font-face{font-family:'PT Serif';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/PTSerif-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'PT Serif';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/PTSerif-400-latin.woff2) format('woff2');}
@font-face{font-family:'PT Serif';font-style:italic;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/PTSerif-400i-cyrillic.woff2) format('woff2');}
@font-face{font-family:'PT Serif';font-style:italic;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/PTSerif-400i-latin.woff2) format('woff2');}
@font-face{font-family:'PT Serif';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/PTSerif-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'PT Serif';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/PTSerif-700-latin.woff2) format('woff2');}

/* 01-base.css */
/* ============================================================
   LINGVESSA вЂ” DESIGN SYSTEM
   A committed, single-theme brand system (not viewer-theme reactive):
   this artifact presents fixed product mockups, like comps in a
   deck вЂ” its colors are the product's brand decisions, not a UI
   that should invert for a dark-mode reader. Background and every
   color below are painted explicitly so the page holds regardless
   of host theme.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root{
  /* ---- Brand: ink & greens ---- */
  --ink:            #172620;
  --ink-soft:       #4C5B53;
  --ink-faint:      #7C8A81;

  --emerald-900:    #0A2A22;
  --emerald-800:    #0D372C;
  --emerald-700:    #11543F;
  --emerald-600:    #166B51;
  --emerald-500:    #1D8264;
  --emerald-100:    #E3EEE7;
  --emerald-50:     #F1F6F2;

  /* ---- Brand: gold (spend sparingly) ---- */
  --gold-700:       #7E5C2C;
  --gold-600:       #9C733A;
  --gold-500:       #B6894A;
  --gold-300:       #D8B67C;
  --gold-100:       #F1E6D2;

  /* ---- Neutrals: warm, not grey ---- */
  --parchment:      #F7F4EB;
  --parchment-dim:  #F0ECDF;
  --paper:          #FFFFFF;
  --line:           #E2DAC7;
  --line-strong:    #CDBF9E;
  --field-border:   #958560;  /* form control outlines: ≥3:1 against paper (WCAG 1.4.11) */

  /* ---- Semantic status (distinct from brand + gold accent) ---- */
  --good:           #2F7D52;
  --good-bg:        #E4F1E9;
  --good-line:      #BFDCC9;
  --warn:           #A9701F;
  --warn-bg:        #F8EDD8;
  --warn-line:      #E7CE9C;
  --bad:            #B23B34;
  --bad-bg:         #F7E5E2;
  --bad-line:       #E9BFB8;
  --info:           #3E6E8E;
  --info-bg:        #E6EEF3;
  --info-line:      #BFD6E3;

  --focus-ring:     #2D6E8E;

  /* ---- Type ---- */
  --font-display: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-body:    'PT Sans', 'Segoe UI', Tahoma, sans-serif;

  /* ---- Scale ---- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;
  --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px;

  --radius-s: 6px; --radius-m: 10px; --radius-l: 18px; --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(23,38,32,.06), 0 6px 20px -8px rgba(23,38,32,.18);
  --shadow-pop:  0 12px 40px -12px rgba(10,42,34,.35);

  --header-h: 64px;
  --rail-w: 236px;
}

/* ============================================================
   FONTS вЂ” PT Serif (display) + PT Sans (UI), ParaType's Cyrillic
   system pair вЂ” chosen because the interface is genuinely
   RU/UK/EN, and both faces share the same underlying proportions.
   ============================================================ */


/* ============================================================
   TYPE SCALE
   ============================================================ */
body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.display-1{ font-family: var(--font-display); font-weight:700; font-size: clamp(2.4rem, 1.9rem + 2vw, 3.4rem); line-height:1.08; letter-spacing:-.01em; text-wrap: balance; margin:0; }
.display-2{ font-family: var(--font-display); font-weight:700; font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.5rem); line-height:1.12; letter-spacing:-.005em; text-wrap: balance; margin:0; }
.h1{ font-family: var(--font-display); font-weight:700; font-size:1.75rem; line-height:1.2; text-wrap:balance; margin:0; }
.h2{ font-family: var(--font-display); font-weight:700; font-size:1.4rem; line-height:1.25; text-wrap:balance; margin:0; }
.h3{ font-family: var(--font-display); font-weight:700; font-size:1.15rem; line-height:1.3; margin:0; }
.h4{ font-family: var(--font-body); font-weight:700; font-size:.95rem; line-height:1.35; margin:0; }
.lead{ font-size:1.125rem; line-height:1.6; color: var(--ink-soft); max-width:62ch; }
.body-text{ font-size:1rem; line-height:1.65; color: var(--ink); max-width:65ch; }
p{ margin:0 0 var(--space-3); }
.small{ font-size:.875rem; line-height:1.5; color: var(--ink-soft); }
.caption{ font-size:.75rem; line-height:1.4; color: var(--ink-faint); }
.eyebrow{ font-family: var(--font-body); font-weight:700; font-size:.72rem; letter-spacing:.11em; text-transform:uppercase; color: var(--gold-600); }
.eyebrow.on-dark{ color: var(--gold-300); }
.tabular{ font-variant-numeric: tabular-nums; }
a{ color: var(--emerald-700); }
a.gold{ color: var(--gold-600); }
.on-dark a.gold{ color: var(--gold-300); }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.stack{ display:flex; flex-direction:column; }
.row{ display:flex; align-items:center; }
.wrap{ flex-wrap:wrap; }
.g1{gap:var(--space-1)} .g2{gap:var(--space-2)} .g3{gap:var(--space-3)} .g4{gap:var(--space-4)}
.g5{gap:var(--space-5)} .g6{gap:var(--space-6)} .g8{gap:var(--space-8)}
.grow{ flex:1 1 auto; min-width:0; }
.between{ justify-content:space-between; }
.center{ align-items:center; justify-content:center; }
.container{ max-width:1180px; margin:0 auto; padding-inline:var(--space-8); }
@media (max-width:900px){ .container{ padding-inline:var(--space-5);} }

.grid{ display:grid; gap: var(--space-5); }
.grid-2{ grid-template-columns: repeat(2,1fr); }
.grid-3{ grid-template-columns: repeat(3,1fr); }
.grid-4{ grid-template-columns: repeat(4,1fr); }
.grid > *{ min-width:0; }   /* grid items may shrink below their content (tables, long words) instead of widening the page */
@media (max-width:860px){ .grid-2,.grid-3,.grid-4{ grid-template-columns: 1fr; } }

.hr{ border:0; border-top:1px solid var(--line); margin: var(--space-6) 0; }
.scroll-x{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.skip-link{ position:absolute; left:-999px; top:0; background:var(--emerald-900); color:#fff; padding:10px 16px; border-radius:0 0 8px 0; z-index:999; }
.skip-link:focus{ left:0; }

:focus-visible{ outline: 2.5px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
button, [role="button"], a, input, select, textarea{ font-family:inherit; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}


/* 02-components.css */
/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  appearance:none; border:1px solid transparent; cursor:pointer;
  font-family: var(--font-body); font-weight:700; font-size:.9rem;
  padding: 11px 20px; border-radius: var(--radius-m);
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  line-height:1.2; white-space:nowrap; text-decoration:none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"]{ opacity:.5; cursor:not-allowed; pointer-events:none; }
.btn-lg{ padding:14px 26px; font-size:1rem; border-radius: var(--radius-m); }
.btn-sm{ padding:7px 13px; font-size:.8125rem; border-radius: var(--radius-s); }
.btn-icon{ padding:9px; width:38px; height:38px; }

.btn-primary{ background: var(--emerald-700); color:#fff; }
.btn-primary:hover{ background: var(--emerald-600); }
.btn-gold{ background: var(--gold-600); color:#fff; }
.btn-gold:hover{ background: var(--gold-700); }
.btn-secondary{ background: transparent; border-color: var(--emerald-700); color: var(--emerald-700); }
.btn-secondary:hover{ background: var(--emerald-50); }
.btn-secondary.selected{ background: var(--emerald-700); border-color: var(--emerald-700); color:#fff; }
.btn-ghost{ background: transparent; color: var(--ink-soft); }
.btn-ghost:hover{ background: rgba(23,38,32,.06); color:var(--ink); }
.btn-danger{ background: transparent; border-color: var(--bad-line); color: var(--bad); }
.btn-danger:hover{ background: var(--bad-bg); }
.btn-on-dark{ background: var(--gold-500); color: var(--emerald-900); }
.btn-on-dark:hover{ background: var(--gold-300); }
.btn-on-dark-ghost{ background: transparent; border-color: rgba(247,244,235,.4); color:#F7F4EB; }
.btn-on-dark-ghost:hover{ background: rgba(247,244,235,.1); }
.btn-block{ width:100%; }

.btn .spinner{ display:none; }
.btn.is-loading .btn-label{ visibility:hidden; }
.btn.is-loading .spinner{ display:inline-block; position:absolute; }
.btn{ position:relative; }
.spinner{ width:16px; height:16px; border-radius:50%; border:2px solid currentColor; border-right-color:transparent; animation: spin .7s linear infinite; opacity:.85;}
@keyframes spin{ to{ transform:rotate(360deg); } }

.icon-link{ display:inline-flex; align-items:center; gap:6px; font-weight:700; font-size:.875rem; color:var(--emerald-700); text-decoration:none; }
.icon-link:hover{ text-decoration:underline; }
.icon-link svg{ width:16px; height:16px; }

/* ============================================================
   FORMS
   ============================================================ */
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom: var(--space-4); }
.field label, .field-label{ font-size:.8125rem; font-weight:700; color: var(--ink); }
.field .hint{ font-size:.78rem; color: var(--ink-faint); }
.field .error-text{ font-size:.78rem; color: var(--bad); font-weight:700; display:flex; gap:5px; align-items:center; }

.input, select.input, textarea.input{
  width:100%; font-family:var(--font-body); font-size:.95rem; color:var(--ink);
  background: var(--paper); border:1.5px solid var(--field-border); border-radius: var(--radius-s);
  padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder{ color: var(--ink-faint); }
.input:hover{ border-color: var(--gold-500); }
.input:focus{ outline:none; border-color: var(--emerald-600); box-shadow: 0 0 0 3px var(--emerald-100); }
.field.has-error .input{ border-color: var(--bad); }
.field.has-error .input:focus{ box-shadow: 0 0 0 3px var(--bad-bg); }
textarea.input{ resize:vertical; min-height:88px; }
select.input{ appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234C5B53' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:36px; }

.input-group{ display:flex; align-items:stretch; }
.input-group .input{ border-radius:0; }
.input-group > :first-child .input, .input-group > :first-child{ border-top-left-radius: var(--radius-s); border-bottom-left-radius: var(--radius-s); }
.input-group > :last-child .input, .input-group > :last-child{ border-top-right-radius: var(--radius-s); border-bottom-right-radius: var(--radius-s); }

.check-row{ display:flex; align-items:flex-start; gap:10px; cursor:pointer; font-size:.875rem; color:var(--ink); }
.check-row input[type="checkbox"], .check-row input[type="radio"]{
  appearance:none; width:19px; height:19px; flex:none; margin-top:1px;
  border:1.5px solid var(--line-strong); background:var(--paper); cursor:pointer; position:relative;
}
.check-row input[type="checkbox"]{ border-radius:5px; }
.check-row input[type="radio"]{ border-radius:50%; }
.check-row input:checked{ background: var(--emerald-700); border-color:var(--emerald-700); }
.check-row input[type="checkbox"]:checked::after{ content:""; position:absolute; left:5px; top:1px; width:5px; height:9px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(40deg); }
.check-row input[type="radio"]:checked::after{ content:""; position:absolute; inset:4px; border-radius:50%; background:#fff; }

.switch{ position:relative; width:42px; height:24px; flex:none; }
.switch input{ opacity:0; position:absolute; inset:0; margin:0; cursor:pointer; }
.switch .track{ position:absolute; inset:0; background: var(--line-strong); border-radius: 999px; transition:.15s; }
.switch .thumb{ position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:.15s; }
.switch input:checked + .track{ background: var(--emerald-600); }
.switch input:checked + .track .thumb{ transform: translateX(18px); }
.switch input:focus-visible + .track{ outline:2.5px solid var(--focus-ring); outline-offset:2px; }

.tz-note{ display:inline-flex; align-items:center; gap:6px; font-size:.8rem; color:var(--ink-soft); background:var(--emerald-50); border:1px solid var(--emerald-100); padding:6px 10px; border-radius:var(--radius-pill); }

/* ============================================================
   CARDS
   ============================================================ */
.card{ background: var(--paper); border:1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-card); }
.card-pad{ padding: var(--space-6); }
.card-pad-sm{ padding: var(--space-4) var(--space-5); }
.card-flat{ background: var(--paper); border:1px solid var(--line); border-radius: var(--radius-m); }

.card-next-lesson{ border-left:4px solid var(--gold-500); }
.card-title-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-3); }

.stat-tile{ background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-m); padding:var(--space-4) var(--space-5); }
.stat-tile .num{ font-family:var(--font-display); font-weight:700; font-size:1.9rem; color:var(--emerald-800); }
.stat-tile .label{ font-size:.8rem; color:var(--ink-soft); }

/* ============================================================
   BADGES / PILLS / STATUS
   ============================================================ */
.pill{ display:inline-flex; align-items:center; gap:6px; font-size:.75rem; font-weight:700; padding:4px 10px 4px 8px; border-radius:var(--radius-pill); border:1px solid transparent; white-space:nowrap; }
.pill .dot{ width:7px; height:7px; border-radius:50%; flex:none; }
.pill-good{ background:var(--good-bg); color:var(--good); border-color:var(--good-line); }
.pill-good .dot{ background:var(--good); }
.pill-warn{ background:var(--warn-bg); color:var(--warn); border-color:var(--warn-line); }
.pill-warn .dot{ background:var(--warn); }
.pill-bad{ background:var(--bad-bg); color:var(--bad); border-color:var(--bad-line); }
.pill-bad .dot{ background:var(--bad); }
.pill-info{ background:var(--info-bg); color:var(--info); border-color:var(--info-line); }
.pill-info .dot{ background:var(--info); }
.pill-neutral{ background:var(--parchment-dim); color:var(--ink-soft); border-color:var(--line); }
.pill-neutral .dot{ background:var(--ink-faint); }
.pill-gold{ background:var(--gold-100); color:var(--gold-700); border-color:var(--gold-300); }
.pill-gold .dot{ background:var(--gold-600); }

.avatar{ width:40px; height:40px; border-radius:50%; background:var(--emerald-100); color:var(--emerald-800); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; flex:none; font-family:var(--font-display); }
.avatar-lg{ width:56px; height:56px; font-size:1.05rem; }
.avatar-sm{ width:28px; height:28px; font-size:.7rem; }

/* ============================================================
   TABLE
   ============================================================ */
table.table{ width:100%; border-collapse:collapse; font-size:.875rem; min-width:640px; }
.table th{ text-align:left; font-size:.72rem; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); font-weight:700; padding:10px 14px; border-bottom:1.5px solid var(--line-strong); background:var(--parchment-dim); position:sticky; top:0; }
.table td{ padding:13px 14px; border-bottom:1px solid var(--line); color:var(--ink); vertical-align:middle; }
.table tbody tr:hover{ background: var(--emerald-50); }
.table tr.is-selected{ background: var(--emerald-100); }

/* ============================================================
   TABS
   ============================================================ */
/* The base line is an inset shadow, so the active underline needs no negative margin; a negative margin made the
   tabs overflow vertically and, with overflow-x:auto, Windows showed a pointless scrollbar. Narrow screens still
   scroll the tabs sideways, without a visible bar. */
.tabs{ display:flex; gap: var(--space-5); box-shadow: inset 0 -1.5px 0 var(--line); overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.tabs::-webkit-scrollbar{ display:none; }
.tab{ background:none; border:none; cursor:pointer; padding:12px 2px; font-family:var(--font-body); font-weight:700; font-size:.875rem; color:var(--ink-faint); border-bottom:2.5px solid transparent; white-space:nowrap; flex:none; }
.tab:hover{ color:var(--ink); }
.tab[aria-selected="true"]{ color:var(--emerald-800); border-bottom-color:var(--gold-500); }

/* ============================================================
   MODAL / OVERLAY / TOAST
   ============================================================ */
.overlay{ position:fixed; inset:0; background:rgba(10,26,20,.55); backdrop-filter: blur(1px); display:flex; align-items:center; justify-content:center; padding:20px; z-index:200; opacity:0; pointer-events:none; transition:opacity .15s ease; }
.overlay.is-open{ opacity:1; pointer-events:auto; }
.modal{ background:var(--paper); border-radius:var(--radius-l); max-width:480px; width:100%; box-shadow:var(--shadow-pop); transform:translateY(8px) scale(.98); transition:transform .15s ease; max-height:88vh; display:flex; flex-direction:column; }
.overlay.is-open .modal{ transform:translateY(0) scale(1); }
.modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-3); padding:var(--space-5) var(--space-6) 0; }
.modal-body{ padding: var(--space-4) var(--space-6); overflow-y:auto; }
.modal-foot{ padding: var(--space-5) var(--space-6); display:flex; justify-content:flex-end; gap:var(--space-3); border-top:1px solid var(--line); }
.modal-close{ background:none; border:none; cursor:pointer; color:var(--ink-faint); padding:4px; border-radius:6px; }
.modal-close:hover{ background:rgba(23,38,32,.08); color:var(--ink); }
.modal-wide{ max-width:640px; }
/* A dialog opened from inside a card or another dialog must still cover the screen. An ancestor with a transform or a
   backdrop-filter (the open dialog itself, Aurora's glass cards and bars) becomes the box of its fixed overlay: the dialog was
   squeezed into the card and its buttons were cut off (lesson card in the teacher's schedule → "Перенести" on a phone). */
.overlay.is-open:has(.overlay.is-open), .overlay.is-open .modal:has(.overlay.is-open),
:root .card:has(.overlay.is-open), :root .stat-tile:has(.overlay.is-open), :root .corner-card:has(.overlay.is-open),
:root .app-topbar:has(.overlay.is-open), :root .pub-header:has(.overlay.is-open), :root .room-topbar:has(.overlay.is-open), :root .room-controls:has(.overlay.is-open){
  transform:none; transition:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
/* fits the visible screen while the phone browser shows its bars (88vh counts the screen without them) */
.modal{ max-height:min(88vh, calc(100dvh - 40px)); }

.toast-stack{ position:fixed; right:20px; bottom:20px; display:flex; flex-direction:column; gap:10px; z-index:300; width:min(360px,90vw); }
.toast{ background:var(--emerald-900); color:#F7F4EB; padding:13px 16px; border-radius:var(--radius-m); box-shadow:var(--shadow-pop); display:flex; gap:10px; align-items:flex-start; font-size:.875rem; animation: toast-in .18s ease; }
.toast.good{ background:#1E4433; } .toast.bad{ background:#5B2323; } .toast.info{ background:var(--emerald-900); }
@keyframes toast-in{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:translateY(0);} }
.toast svg{ flex:none; margin-top:1px; }

/* ============================================================
   EMPTY / ERROR / LOADING states
   ============================================================ */
.state-block{ text-align:center; padding: var(--space-10) var(--space-6); color:var(--ink-soft); }
.state-block svg{ opacity:.5; margin-bottom:var(--space-3); }
.state-block .h4{ color:var(--ink); margin-bottom:4px; }
.skeleton{ background: linear-gradient(90deg, var(--parchment-dim) 25%, var(--line) 37%, var(--parchment-dim) 63%); background-size:400% 100%; animation: sk 1.4s ease infinite; border-radius:var(--radius-s); }
@keyframes sk{ 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }

/* ============================================================
   LOGO MARKS
   ============================================================ */
.lv-mark{ display:inline-flex; flex:none; }
.lv-word{ font-family:var(--font-display); font-weight:700; letter-spacing:.01em; }
.lv-lockup{ display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
.lv-lockup .lv-word{ font-size:1.15rem; color:var(--emerald-900); line-height:1; }
.lv-lockup.on-dark .lv-word{ color:#F7F4EB; }

/* 07-room.css */
/* ============================================================
   EXERCISE COMPONENTS (shared: room + homework)
   ============================================================ */
.mc-list{ display:flex; flex-direction:column; gap:8px; }
.mc-opt{ display:flex; align-items:center; gap:10px; text-align:left; width:100%; background:var(--paper); border:1.5px solid var(--line-strong); border-radius:var(--radius-s); padding:11px 14px; cursor:pointer; font-size:.9rem; color:var(--ink); font-family:var(--font-body); }
.mc-opt:hover{ border-color:var(--emerald-500); }
.mc-opt .opt-letter{ width:24px; height:24px; border-radius:50%; border:1.5px solid var(--line-strong); display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; color:var(--ink-soft); flex:none; }
.mc-opt.selected{ border-color:var(--emerald-600); background:var(--emerald-50); }
.mc-opt.selected .opt-letter{ background:var(--emerald-600); border-color:var(--emerald-600); color:#fff; }
.mc-opt.is-correct{ border-color:var(--good); background:var(--good-bg); }
.mc-opt.is-correct .opt-letter{ background:var(--good); border-color:var(--good); color:#fff; }
.mc-opt.is-wrong{ border-color:var(--bad); background:var(--bad-bg); }
.mc-opt.is-wrong .opt-letter{ background:var(--bad); border-color:var(--bad); color:#fff; }

.mc-feedback{ display:none; align-items:flex-start; gap:9px; margin-top:10px; padding:11px 13px; border-radius:var(--radius-s); font-size:.85rem; border:1px solid transparent; }
.mc-feedback.fb-good{ background:var(--good-bg); border-color:var(--good-line); color:#1E5B3D; }
.mc-feedback.fb-bad{ background:var(--bad-bg); border-color:var(--bad-line); color:#7E2B26; }
.mc-feedback .fb-text{ flex:1; }
.mc-feedback [data-mc-retry], .mc-feedback [data-word-reset]{ display:none; flex:none; }

.match-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-6); }
@media (max-width:640px){ .match-grid{ grid-template-columns:1fr; } }
.match-col{ display:flex; flex-direction:column; gap:8px; }
.match-btn{ text-align:left; background:var(--paper); border:1.5px solid var(--line-strong); border-radius:var(--radius-s); padding:10px 13px; font-size:.875rem; cursor:pointer; color:var(--ink); }
.match-btn.selected{ border-color:var(--gold-600); background:var(--gold-100); }
.match-btn.paired{ border-color:var(--good); background:var(--good-bg); color:var(--good); cursor:default; }
.match-btn.mismatch{ border-color:var(--bad); background:var(--bad-bg); }

.word-pool{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:var(--space-3); }
.word-chip{ background:var(--paper); border:1.5px solid var(--line-strong); border-radius:999px; padding:8px 15px; font-size:.875rem; font-weight:700; color:var(--emerald-800); cursor:pointer; font-family:var(--font-body); }
.word-chip:disabled{ opacity:.3; cursor:default; }
.word-answer{ min-height:48px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px; background:var(--parchment-dim); border:1.5px dashed var(--line-strong); border-radius:var(--radius-s); margin-bottom:var(--space-3); }
.word-chip.placed{ background:var(--emerald-700); border-color:var(--emerald-700); color:#fff; }

.recorder{ display:flex; align-items:center; gap:14px; background:var(--parchment-dim); border:1px solid var(--line); border-radius:var(--radius-m); padding:14px 16px; flex-wrap:wrap; }
.rec-btn{ display:flex; align-items:center; gap:8px; background:var(--bad); color:#fff; border:none; border-radius:999px; padding:10px 18px; font-weight:700; font-size:.85rem; cursor:pointer; }
.rec-btn .rec-dot{ width:9px; height:9px; border-radius:50%; background:#fff; }
[data-recorder][data-recording-state="on"] .rec-btn .rec-dot{ animation: rec-pulse 1s ease infinite; }
@keyframes rec-pulse{ 50%{ opacity:.25; } }
.rec-timer{ font-variant-numeric:tabular-nums; font-weight:700; color:var(--ink-soft); min-width:36px; }
.rec-wave{ display:flex; align-items:center; gap:2px; height:26px; flex:1; min-width:120px; }
.rec-wave span{ width:3px; background:var(--emerald-500); border-radius:2px; }
.rec-status{ display:none; align-items:center; gap:6px; font-size:.8rem; color:var(--good); font-weight:700; width:100%; }

.player{ display:flex; align-items:center; gap:12px; background:var(--parchment-dim); border:1px solid var(--line); border-radius:var(--radius-m); padding:12px 16px; }
.player-btn{ width:38px; height:38px; border-radius:50%; background:var(--emerald-700); color:#fff; border:none; display:flex; align-items:center; justify-content:center; flex:none; cursor:pointer; }
.player-track{ flex:1; height:5px; background:var(--line-strong); border-radius:999px; position:relative; }
.player-track::after{ content:""; position:absolute; left:0; top:0; bottom:0; width:34%; background:var(--emerald-600); border-radius:999px; }
.video-plate{ position:relative; aspect-ratio:16/9; background:var(--emerald-900); border-radius:var(--radius-m); display:flex; align-items:center; justify-content:center; color:#fff; overflow:hidden; }
.video-plate .play-btn{ width:52px; height:52px; border-radius:50%; background:rgba(255,255,255,.14); border:1.5px solid rgba(255,255,255,.5); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.video-plate .dur{ position:absolute; right:10px; bottom:8px; font-size:.72rem; background:rgba(0,0,0,.45); padding:2px 7px; border-radius:5px; }

/* ============================================================
   LEARNING ROOM
   ============================================================ */
.room-shell{ min-height:100vh; display:flex; flex-direction:column; background:var(--parchment); }
.room-topbar{ height:58px; flex:none; background:var(--emerald-900); color:#EFEAD9; display:flex; align-items:center; gap:var(--space-4); padding-inline:var(--space-5); }
.room-topbar .rt-title{ font-weight:700; font-size:.9rem; }
.room-topbar .rt-sub{ font-size:.75rem; color:#B9C6BD; }
.room-topbar .rt-actions{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.rec-indicator{ display:none; align-items:center; gap:6px; background:rgba(178,59,52,.2); border:1px solid #B23B34; color:#F3B7B2; padding:4px 10px; border-radius:999px; font-size:.72rem; font-weight:700; }
.room-app[data-recording="on"] .rec-indicator{ display:flex; }
.rec-indicator .dot{ width:7px; height:7px; border-radius:50%; background:#E4544B; animation: rec-pulse 1.1s ease infinite; }

.room-body{ flex:1; display:grid; grid-template-columns: 1fr 300px; gap:1px; background:var(--line); min-height:0; }
.room-app.material-expanded .room-body{ grid-template-columns: 1fr 0px; }
.room-app.material-expanded .room-video-col{ display:none; }
.room-app.in-person .room-video-col{ display:none; }
.room-app.in-person .room-body{ grid-template-columns: 1fr; }

.room-material{ background:var(--parchment); padding:var(--space-5) var(--space-6) var(--space-10); overflow-y:auto; }
.room-material-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:12px;margin-bottom:12px;}
.room-material-tabs .stage-chip{flex-shrink:0;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* the video column in the colours of the design: green only in Classic (Alina, 18.10: "where the video call is, green to purple") */
:root{ --room-video-bg:#0F231C; --room-tile-bg:#123329; --room-overlay:rgba(10,26,20,.85); }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="studio"],[data-theme="terra"]){ --room-video-bg:var(--emerald-900); --room-tile-bg:var(--emerald-800); --room-overlay:rgba(18,16,40,.86); }
:root[data-theme="aurora"]{ --room-video-bg:linear-gradient(180deg,#1C1A47,#17153C); --room-tile-bg:linear-gradient(160deg,#3A2F9E,#2A2770); }
:root[data-theme="velvet"]{ --room-video-bg:#0F0B1F; --room-tile-bg:#2A2340; --room-overlay:rgba(15,11,31,.88); }
.room-video-col{ background:var(--room-video-bg); display:flex; flex-direction:column; gap:10px; padding:10px; overflow-y:auto; }
.video-tile{ position:relative; aspect-ratio:4/3; background:var(--room-tile-bg); border-radius:12px; display:flex; align-items:center; justify-content:center; flex:none; }
.video-tile .vt-name{ position:absolute; left:8px; bottom:8px; font-size:.7rem; color:#fff; background:rgba(0,0,0,.4); padding:2px 8px; border-radius:6px; }
.video-tile .vt-mic{ position:absolute; right:8px; bottom:8px; width:22px; height:22px; border-radius:50%; background:rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; }
.video-tile .vt-avatar{ width:56px; height:56px; border-radius:50%; background:var(--gold-500); color:var(--emerald-900); font-family:var(--font-display); font-weight:700; display:flex; align-items:center; justify-content:center; font-size:1.2rem; }

.room-controls{ flex:none; background:var(--emerald-900); padding:12px 16px; display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; }
.ctrl-btn{ width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); color:#EFEAD9; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.ctrl-btn:hover{ background:rgba(255,255,255,.16); }
.ctrl-btn.is-off{ background:#B23B34; border-color:#B23B34; color:#fff; }
.ctrl-btn.end-call{ background:#B23B34; border-color:#B23B34; }
.ctrl-btn.end-call:hover{ background:#961F1F; }
.ctrl-label-btn{ display:flex; align-items:center; gap:7px; height:42px; padding:0 14px; border-radius:999px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); color:#EFEAD9; cursor:pointer; font-size:.8rem; font-weight:700; }
.ctrl-label-btn.is-active{ background:var(--gold-500); border-color:var(--gold-500); color:var(--emerald-900); }

.room-panel{ display:none; flex-direction:column; background:var(--paper); border-radius:12px; overflow:hidden; max-height:280px; }
.room-panel.is-open{ display:flex; }
.room-panel .rp-head{ padding:9px 12px; font-size:.75rem; font-weight:700; background:var(--parchment-dim); border-bottom:1px solid var(--line); }
.room-panel .rp-body{ padding:10px 12px; overflow-y:auto; font-size:.8rem; }
.chat-msg{ margin-bottom:8px; }
.chat-msg b{ color:var(--emerald-800); }
.room-panel .rp-input{ border-top:1px solid var(--line); padding:8px; display:flex; gap:6px; }
.room-panel .rp-input input{ flex:1; border:1px solid var(--line-strong); border-radius:999px; padding:7px 12px; font-size:.8rem; }

.room-stages{ display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:var(--space-5); }
/* next lesson by plan: where a continued material was left off (teacher), the end-of-lesson choice */
.room-resume{ margin:0 0 var(--space-3); }
.next-material{ margin:var(--space-4) 0; padding:var(--space-3) var(--space-4); border:1px solid var(--line); border-radius:var(--radius-m); }
.stage-chip{ flex:none; background:var(--paper); border:1.5px solid var(--line-strong); border-radius:999px; padding:8px 15px; font-size:.8rem; font-weight:700; color:var(--ink-soft); cursor:pointer; white-space:nowrap; }
.stage-chip.active{ background:var(--emerald-700); border-color:var(--emerald-700); color:#fff; }
.stage-chip .n{ opacity:.7; margin-right:4px; }

.room-app.independent-mode .independent-note{ display:flex !important; }
.teacher-only{ display:none; }
.room-app.role-teacher .teacher-only{ display:block; }
.room-app.role-teacher .student-only-note{ display:none; }
.teacher-note{ background:var(--gold-100); border:1.5px dashed var(--gold-500); border-radius:var(--radius-s); padding:12px 14px; margin-top:var(--space-3); font-size:.82rem; color:var(--gold-700); }
.teacher-note .lbl{ font-weight:700; text-transform:uppercase; letter-spacing:.05em; font-size:.68rem; display:block; margin-bottom:4px; }

.save-pill{ display:inline-flex; }

.reconnect-overlay{ position:absolute; inset:0; background:var(--room-overlay); color:#fff; display:none; align-items:center; justify-content:center; flex-direction:column; gap:10px; z-index:50; text-align:center; padding:20px; }
.room-app[data-connection="lost"] .reconnect-overlay{ display:flex; }
.room-app{ position:relative; }

.device-toggle-row{ display:flex; gap:8px; }

@media (max-width: 900px){
  .room-body{ grid-template-columns:1fr; }
  .room-video-col{ flex-direction:row; overflow-x:auto; }
  .video-tile{ width:130px; aspect-ratio:4/3; }
  .room-panel{ max-height:none; }
}
.room-mobile-switch{ display:none; }
@media (max-width: 900px){
  .room-mobile-switch{ display:flex; gap:6px; padding:8px 12px; background:var(--paper); border-bottom:1px solid var(--line); }
  .room-mobile-switch button{ flex:1; border:1px solid var(--line-strong); background:var(--paper); border-radius:8px; padding:8px; font-size:.78rem; font-weight:700; color:var(--ink-soft); cursor:pointer; }
  .room-mobile-switch button.active{ background:var(--emerald-100); border-color:var(--emerald-600); color:var(--emerald-800); }
  .room-app:not([data-mobile-view="material"]) .room-material{ display:none; }
  .room-app[data-mobile-view="material"] .room-video-col{ display:none !important; }
  /* the chat view: the chat panel lives in the video column (pages/room.js), so the column stays and shows only it */
  .room-app[data-mobile-view="chat"] .room-material{ display:none; }
  .room-app[data-mobile-view="chat"] .room-video-col{ flex-direction:column; overflow:visible; }
  .room-app[data-mobile-view="chat"] .room-video-col > :not([data-panel="chat"]):not(audio){ display:none !important; }
  .room-app[data-mobile-view="chat"] [data-panel="chat"]{ display:flex !important; flex:1; min-height:60vh; }
}

/* ============================================================
   DEVICE CHECK
   ============================================================ */
.device-check{ max-width:620px; margin:0 auto; padding: var(--space-10) var(--space-5); }
.device-preview{ aspect-ratio:16/10; background:var(--emerald-900); border-radius:var(--radius-l); display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; margin-bottom:var(--space-5); }
.device-preview .dp-avatar{ width:88px; height:88px; border-radius:50%; background:var(--gold-500); color:var(--emerald-900); font-family:var(--font-display); font-size:2rem; font-weight:700; display:flex; align-items:center; justify-content:center; }
.device-check[data-state="checking"] .dc-denied, .device-check[data-state="checking"] .dc-waiting, .device-check[data-state="checking"] .dc-ready{ display:none; }
.device-check[data-state="denied"] .dc-ok{ display:none; }
.device-check[data-state="denied"] .device-preview{ background:var(--bad-bg); }
.device-check:not([data-state="denied"]) .dc-denied{ display:none; }
.device-check[data-state="waiting"] .dc-cta{ display:none; }
.device-check:not([data-state="waiting"]) .dc-waiting{ display:none; }
.device-check[data-state="ready"] .dc-waiting{ display:none; }
.device-check:not([data-state="ready"]) .dc-ready{ display:none; }
.mic-meter{ display:flex; gap:3px; align-items:flex-end; height:18px; }
.mic-meter span{ width:4px; background:var(--good); border-radius:2px; }

/* Shared explanation under a block (S3) */
.block-note { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--gold-500); background: var(--gold-100); border-radius: 8px; }
.block-note.is-deleted { opacity: .75; }
.block-note-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3, #6b6b6b); }
.block-note textarea { width: 100%; resize: vertical; min-height: 72px; }
.block-note-body { margin-top: 6px; }
.block-note-body mark { background: var(--gold-300); padding: 0 2px; border-radius: 3px; }
.block-note-body blockquote { margin: 4px 0; padding-left: 10px; border-left: 2px solid var(--line, #ddd); font-style: italic; }
@media (max-width: 640px) { .block-note { padding: var(--space-2) var(--space-3); } }

/* Floating chat / notes windows over the lesson (desktop) */
.float-panel{ position:fixed; z-index:60; display:flex; flex-direction:column; background:var(--paper); border:1px solid var(--line-strong); border-radius:12px; box-shadow:0 12px 32px rgba(10,26,20,.28); overflow:hidden; }
.float-panel-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px 8px 14px; background:var(--emerald-800,#16382c); color:#fff; font-size:.85rem; font-weight:700; cursor:move; user-select:none; touch-action:none; }
.float-panel-head button{ background:none; border:0; color:#fff; width:26px; height:26px; border-radius:6px; cursor:pointer; font-size:1rem; line-height:1; display:inline-flex; align-items:center; justify-content:center; }
.float-panel-head button:hover{ background:rgba(255,255,255,.15); }
.float-panel-body{ flex:1; min-height:0; display:flex; flex-direction:column; }
.float-panel-body .rp-body{ flex:1; min-height:0; padding:10px 12px; overflow-y:auto; font-size:.9rem; }
.float-panel-body .rp-input{ border-top:1px solid var(--line); padding:8px; display:flex; gap:6px; }
.float-panel-body .rp-input input{ flex:1; border:1px solid var(--line-strong); border-radius:999px; padding:8px 12px; font-size:.9rem; }
.float-panel-body .notes-body{ display:flex; }
.float-panel-body .notes-body textarea{ flex:1; min-height:0 !important; resize:none; }
.float-panel-resize{ position:absolute; right:0; bottom:0; width:18px; height:18px; cursor:nwse-resize; touch-action:none; background:linear-gradient(135deg,transparent 50%,var(--line-strong) 50%,var(--line-strong) 60%,transparent 60%,transparent 70%,var(--line-strong) 70%,var(--line-strong) 80%,transparent 80%); }
.float-panel-min{ position:fixed; z-index:60; display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; border:0; background:var(--emerald-800,#16382c); color:#fff; font-weight:700; cursor:pointer; box-shadow:0 6px 18px rgba(10,26,20,.25); }
.chat-msg{ margin-bottom:6px; overflow-wrap:anywhere; }

/* The other participant's pointer over the material */
.remote-cursor{ position:fixed; z-index:55; pointer-events:none; transform:translate(-2px,-2px); transition:left .07s linear, top .07s linear; display:flex; align-items:flex-start; gap:2px; }
.remote-cursor svg path{ fill:#d9534f; stroke:#fff; stroke-width:1.2; }
.remote-cursor.role-teacher svg path{ fill:var(--emerald-700); }
.remote-cursor span{ margin-top:12px; background:#d9534f; color:#fff; font-size:11px; font-weight:700; padding:1px 6px; border-radius:6px; white-space:nowrap; }
.remote-cursor.role-teacher span{ background:var(--emerald-700); }
/* phones: the lesson panel and the task cards give their side padding to the text, so sentences with gaps get ~24 px more */
@media (max-width: 560px){
  .room-material{ padding:var(--space-3) var(--space-3) var(--space-10); }
  .room-material .ex-card{ padding:12px; }
  .room-material .ex-top{ margin:-12px -12px 12px; padding:10px 12px; }
}

/* mandatory lesson recording (lib/lesson-video.js): the room says the lesson is recorded */
.rec-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--bad); margin-right:6px; vertical-align:middle; flex:none; }
.rec-pill{ display:inline-flex; align-items:center; font-size:12px; font-weight:600; padding:3px 9px; border-radius:999px;
  border:1px solid rgba(255,255,255,.16); color:#EFEAD9; white-space:nowrap; }
.rec-pill .rec-dot{ background:#F08A80; animation:rec-blink 2s ease-in-out infinite; }
@keyframes rec-blink{ 50%{ opacity:.35; } }
@media (prefers-reduced-motion: reduce){ .rec-pill .rec-dot{ animation:none; } }
.room-rec-notice{ text-align:center; margin:0 0 12px; }

/* 08-exercises.css */
/* ============================================================
   EXERCISES — drag & drop, new exercise types, editor helpers
   ============================================================ */
.ex-prompt{ margin-bottom:6px; }
.ex-hint{ margin:0 0 12px; }
.ex-actions{ margin-top:12px; }

/* beta testing: "Report a problem" button (test environment only) */
.feedback-fab{ position:fixed; right:16px; bottom:16px; z-index:70; display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:8px 14px;
  border:0; border-radius:999px; background:var(--gold-600); color:#fff; font:inherit; font-size:.82rem; font-weight:700; cursor:pointer;
  box-shadow:0 8px 20px -8px rgba(10,42,34,.55); }
.feedback-fab:hover{ background:var(--gold-700); }
@media (max-width:900px){
  /* phones: a slim tab on the right edge instead of a round button over the content */
  .feedback-fab{ right:0; bottom:auto; top:58%; min-height:0; width:26px; height:56px; padding:0; justify-content:center; border-radius:10px 0 0 10px; opacity:.9; box-shadow:0 4px 12px -6px rgba(10,42,34,.6); }
  .feedback-fab span{ display:none; }
}

/* drag & drop */
.dnd-item{ touch-action:none; user-select:none; -webkit-user-select:none; }
.dnd-ghost{ position:fixed; left:0; top:0; z-index:1000; pointer-events:none; margin:0; opacity:.95;
  box-shadow:0 12px 28px -8px rgba(10,42,34,.45); transform-origin:0 0; }
.dnd-src{ opacity:.35; }
body.dnd-active, body.dnd-active *{ cursor:grabbing !important; user-select:none; }
.dnd-over{ outline:2.5px dashed var(--gold-500); outline-offset:3px; background-color:var(--gold-100) !important; }

/* chips (draggable / tappable words) */
.chip{ display:inline-flex; align-items:center; min-height:40px; padding:7px 15px; background:var(--paper); border:1.5px solid var(--line-strong);
  border-radius:999px; font:inherit; font-size:.9rem; font-weight:700; color:var(--emerald-800); cursor:grab; line-height:1.25; text-align:left; }
.chip:hover:not(:disabled){ border-color:var(--emerald-600); }
.chip.selected{ border-color:var(--gold-600); background:var(--gold-100); box-shadow:0 0 0 2px var(--gold-300); }
.chip.placed{ background:var(--emerald-700); border-color:var(--emerald-700); color:#fff; }
.chip.used{ opacity:.4; }
.chip:disabled{ cursor:default; }
.chip.is-ok{ border-color:var(--good); background:var(--good-bg); color:#1E5B3D; }
.chip.is-bad{ border-color:var(--bad); background:var(--bad-bg); color:#7E2B26; }
.word-pool{ min-height:52px; padding:8px; border-radius:var(--radius-m); background:var(--parchment-dim); align-items:center; }
.word-answer{ min-height:56px; }
.drop-wrap{ display:inline-flex; }

/* choice with pictures */
.mc-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); }
.mc-opt.has-img{ flex-direction:column; align-items:stretch; padding:8px; }
.mc-opt img{ width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:6px; background:#fff; }

/* true / false */
.tf-row{ display:grid; grid-template-columns:1fr auto; gap:8px 14px; align-items:center; padding:10px 12px; border:1.5px solid var(--line); border-radius:var(--radius-s); background:var(--paper); }
.tf-row.is-ok{ border-color:var(--good); background:var(--good-bg); }
.tf-row.is-bad{ border-color:var(--bad); background:var(--bad-bg); }
.tf-explain{ grid-column:1 / -1; }
@media (max-width:600px){ .tf-row{ grid-template-columns:1fr; } }
.seg{ display:inline-flex; border:1.5px solid var(--line-strong); border-radius:999px; overflow:hidden; background:var(--paper); flex-wrap:wrap; }
.seg button{ border:0; background:none; font:inherit; font-size:.82rem; font-weight:700; color:var(--ink-soft); padding:8px 14px; min-height:38px; cursor:pointer; }
.seg button + button{ border-left:1px solid var(--line); }
.seg button.on{ background:var(--emerald-700); color:#fff; }
.seg button:disabled{ cursor:default; }
.seg-wide{ border-radius:var(--radius-s); }

/* gaps: bank & dropdown */
.gap-slot{ display:inline-flex; align-items:center; justify-content:center; min-width:7ch; min-height:34px; margin:0 3px; padding:2px 10px; vertical-align:middle;
  border:1.5px dashed var(--line-strong); border-radius:8px; background:var(--paper); font:inherit; font-weight:700; color:var(--emerald-800); cursor:pointer; }
.gap-slot.filled{ border-style:solid; border-color:var(--emerald-600); background:var(--emerald-50); }
.gap-slot.ok{ border-color:var(--good); background:var(--good-bg); }
.gap-slot.bad{ border-color:var(--bad); background:var(--bad-bg); }
select.input.gap-select{ display:inline-block; width:auto; min-width:7ch; padding:4px 28px 4px 8px; background-position:right 8px center; margin:0 3px; font-size:.95rem; }
.gap-select.ok{ border-color:var(--good); background:var(--good-bg); }
.gap-select.bad{ border-color:var(--bad); background:var(--bad-bg); }

/* matching */
.match-rows{ display:flex; flex-direction:column; gap:8px; margin-bottom:var(--space-3); }
.match-row{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; align-items:stretch; }
.match-left{ display:flex; align-items:center; gap:10px; text-align:left; background:var(--paper); border:1.5px solid var(--line-strong); border-radius:var(--radius-s);
  padding:8px 12px; font:inherit; font-size:.9rem; cursor:pointer; min-height:48px; }
.match-left img{ width:64px; height:64px; object-fit:cover; border-radius:6px; flex:none; }
.match-left.selected{ border-color:var(--gold-600); background:var(--gold-100); }
.match-slot{ display:flex; align-items:center; min-height:48px; padding:4px; border:1.5px dashed var(--line-strong); border-radius:var(--radius-s); background:var(--parchment-dim); }
.match-slot.filled{ border-style:solid; background:var(--paper); }
.match-row.is-ok .match-slot{ border-color:var(--good); background:var(--good-bg); }
.match-row.is-bad .match-slot{ border-color:var(--bad); background:var(--bad-bg); }
.slot-empty{ flex:1; align-self:stretch; border:0; background:none; cursor:pointer; min-height:38px; }
.slot-empty:disabled{ cursor:default; }
@media (max-width:520px){ .match-row{ grid-template-columns:1fr; gap:4px; } }

/* sequence */
.seq-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.seq-item{ display:flex; align-items:center; gap:10px; padding:8px 10px; border:1.5px solid var(--line-strong); border-radius:var(--radius-s); background:var(--paper); }
.seq-item.is-ok{ border-color:var(--good); background:var(--good-bg); }
.seq-item.is-bad{ border-color:var(--bad); background:var(--bad-bg); }
.seq-handle, .drag-handle{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:0; border-radius:8px; background:var(--parchment-dim);
  color:var(--ink-soft); cursor:grab; flex:none; }
.seq-num{ font-weight:700; color:var(--gold-700); min-width:1.4em; }
.seq-text{ flex:1; }

/* categorize */
.cat-groups{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; }
.cat-group{ border:1.5px dashed var(--line-strong); border-radius:var(--radius-m); background:var(--paper); min-height:130px; display:flex; flex-direction:column; }
.cat-title{ border:0; border-bottom:1px solid var(--line); background:var(--emerald-50); font:inherit; font-weight:700; color:var(--emerald-800); padding:10px 12px;
  border-radius:var(--radius-m) var(--radius-m) 0 0; text-align:left; cursor:pointer; }
.cat-title:disabled{ cursor:default; }
.cat-items{ display:flex; flex-wrap:wrap; gap:6px; padding:10px; }
.cat-edit{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px; }

/* unscramble */
.unscr{ padding:10px 12px; border:1.5px solid var(--line); border-radius:var(--radius-s); background:var(--paper); }
.unscr.is-ok{ border-color:var(--good); background:var(--good-bg); }
.unscr.is-bad{ border-color:var(--bad); background:var(--bad-bg); }
.unscr-answer, .unscr-pool{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; min-height:42px; align-items:center; }
.unscr-answer{ padding:4px 6px; border-bottom:2px solid var(--line-strong); }
.letter{ width:38px; height:42px; border:1.5px solid var(--line-strong); border-radius:8px; background:var(--paper); font:inherit; font-size:1.05rem; font-weight:700;
  text-transform:uppercase; color:var(--emerald-800); cursor:pointer; }
.letter.placed{ background:var(--emerald-700); border-color:var(--emerald-700); color:#fff; }
.letter:disabled:not(.placed){ opacity:.25; cursor:default; }

/* highlight / errors */
.tok-text{ line-height:2.2; font-size:1rem; }
.tok{ display:inline; border:0; background:none; font:inherit; color:inherit; padding:2px 1px; margin:0; border-radius:4px; cursor:pointer; line-height:1.6; }
.tok:hover:not(:disabled){ background:var(--gold-100); }
.tok.on{ background:var(--gold-300); color:var(--emerald-900); }
.tok.edited{ background:var(--emerald-50); }
.tok.edited s{ color:var(--ink-faint); }
.tok-fix{ font-weight:700; color:var(--emerald-700); }
.tok.is-ok{ background:var(--good-bg); box-shadow:inset 0 -2px 0 var(--good); }
.tok.is-bad{ background:var(--bad-bg); box-shadow:inset 0 -2px 0 var(--bad); }
.tok-input{ display:inline-block; width:auto; padding:2px 6px; font-size:.95rem; }

/* labels on a picture */
.labels-wrap{ position:relative; display:inline-block; width:fit-content; max-width:100%; align-self:flex-start; margin-bottom:var(--space-3); }
.labels-img{ display:block; max-width:100%; max-height:520px; border-radius:var(--radius-m); border:1px solid var(--line); }
.labels-wrap.editing{ cursor:crosshair; }
.spot{ position:absolute; transform:translate(-14px, -14px); display:flex; align-items:center; gap:4px; }
.spot.left{ flex-direction:row-reverse; transform:translate(calc(-100% + 14px), -14px); }
.spot-dot{ width:28px; height:28px; border-radius:50%; background:var(--emerald-700); color:#fff; font-weight:700; font-size:.8rem; display:inline-flex; align-items:center;
  justify-content:center; border:2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.35); flex:none; touch-action:none; }
.labels-wrap.editing .spot-dot{ cursor:move; }
.spot-dot.static{ position:static; }
.spot-empty{ min-width:44px; min-height:34px; border:1.5px dashed var(--emerald-600); border-radius:8px; background:rgba(255,255,255,.92); font:inherit; font-weight:700; color:var(--emerald-700); cursor:pointer; }
.spot-empty:disabled{ cursor:default; }
.spot .chip{ min-height:34px; padding:4px 10px; font-size:.82rem; }
.spot.is-ok .chip{ border-color:var(--good); background:var(--good-bg); color:#1E5B3D; }
.spot.is-bad .chip{ border-color:var(--bad); background:var(--bad-bg); color:#7E2B26; }

/* crossword */
.cw-wrap{ display:flex; flex-wrap:wrap; gap:var(--space-6); align-items:flex-start; --cw-cell:34px; }
@media (max-width:520px){ .cw-wrap{ --cw-cell:28px; } }
.cw-grid{ display:grid; gap:2px; max-width:100%; overflow-x:auto; padding:2px; }
.cw-cell{ position:relative; display:block; background:var(--paper); border:1.5px solid var(--emerald-800); border-radius:3px; }
.cw-cell input{ width:100%; height:100%; border:0; background:transparent; text-align:center; font:inherit; font-weight:700; font-size:1rem; text-transform:uppercase;
  padding:0; color:var(--emerald-900); caret-color:var(--gold-600); }
.cw-cell input:focus{ outline:none; background:var(--gold-300); }
.cw-cell.active{ background:var(--gold-100); }
.cw-cell.is-ok{ background:var(--good-bg); border-color:var(--good); }
.cw-cell.is-bad{ background:var(--bad-bg); border-color:var(--bad); }
.cw-num{ position:absolute; top:0; left:2px; font-size:.55rem; font-weight:700; color:var(--ink-soft); pointer-events:none; }
.cw-clues{ flex:1; min-width:240px; display:flex; flex-direction:column; gap:var(--space-4); }
.cw-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.cw-list button{ border:0; background:none; font:inherit; font-size:.875rem; text-align:left; padding:4px 6px; border-radius:6px; cursor:pointer; color:var(--ink); }
.cw-list li.active button{ background:var(--gold-100); }
.cw-list li.is-ok button{ color:var(--good); }
.cw-list li.is-bad button{ color:var(--bad); }

/* word search */
.ws-wrap{ display:flex; flex-wrap:wrap; gap:var(--space-6); align-items:flex-start; --ws-cell:32px; }
@media (max-width:520px){ .ws-wrap{ --ws-cell:min(26px, calc((100vw - 64px) / 14)); } }
.ws-grid{ display:grid; gap:2px; touch-action:none; user-select:none; -webkit-user-select:none; }
.ws-grid.flash{ animation:ws-shake .35s; }
@keyframes ws-shake{ 25%{ transform:translateX(-4px); } 75%{ transform:translateX(4px); } }
.ws-cell{ width:var(--ws-cell); height:var(--ws-cell); border:0; border-radius:5px; background:var(--paper); font:inherit; font-weight:700; font-size:.9rem;
  color:var(--emerald-900); cursor:pointer; padding:0; }
.ws-cell.found{ background:var(--good-bg); color:#1E5B3D; }
.ws-cell.sel{ background:var(--gold-300); }
.ws-cell.is-bad{ background:var(--bad-bg); color:var(--bad); box-shadow:inset 0 0 0 1px var(--bad); }
.ex-dictation .input.is-bad{ border-color:var(--bad); background:var(--bad-bg); }
.ex-dictation .input.is-ok{ border-color:var(--good); background:var(--good-bg); }
.ws-words{ margin:0; padding-left:18px; columns:2; font-size:.9rem; }

/* flashcards */
.fc-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:12px; }
.fc{ display:flex; flex-direction:column; gap:4px; align-items:center; }
.fc-card{ position:relative; width:100%; aspect-ratio:4/3; border:0; padding:0; background:none; cursor:pointer; perspective:800px; }
.fc-face{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:10px; text-align:center;
  border-radius:var(--radius-m); border:1.5px solid var(--line-strong); backface-visibility:hidden; transition:transform .45s; font-size:1rem; }
.fc-front{ background:var(--paper); }
.fc-front img{ max-height:55%; max-width:100%; object-fit:contain; border-radius:6px; }
/* illustrated card: the picture fills the whole face, the word sits on a shaded strip at the bottom */
.fc-card.has-img{ aspect-ratio:1/1; }
.fc-front.has-img{ padding:0; overflow:hidden; justify-content:flex-end; }
.fc-front.has-img img{ position:absolute; inset:0; width:100%; height:100%; max-height:none; object-fit:cover; border-radius:0; }
.fc-front.has-img b{ position:relative; width:100%; padding:22px 10px 10px; color:#fff; font-size:1.05rem;
  background:linear-gradient(to top, rgba(0,0,0,.66), rgba(0,0,0,0)); text-shadow:0 1px 2px rgba(0,0,0,.5); }
.fc-back{ background:var(--emerald-700); color:#fff; transform:rotateY(180deg); border-color:var(--emerald-700); }
.fc-back .caption{ color:#D7E6DD; }
.fc-card.flipped .fc-front{ transform:rotateY(180deg); }
.fc-card.flipped .fc-back{ transform:rotateY(360deg); }
@media (prefers-reduced-motion:reduce){ .fc-face{ transition:none; } }

/* embeds, tables, callouts */
.embed-frame{ position:relative; width:100%; max-width:820px; aspect-ratio:16/9; border-radius:var(--radius-m); overflow:hidden; background:var(--parchment-dim); border:1px solid var(--line); }
.embed-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.lesson-table{ min-width:320px; }
.lesson-table th{ background:var(--emerald-50); }
.callout{ border-radius:var(--radius-m); padding:12px 16px; border:1px solid var(--line); background:var(--paper); }
.callout-label{ display:flex; align-items:center; gap:6px; font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-bottom:6px; }
.callout-rule{ background:var(--emerald-50); border-color:var(--emerald-100); border-left:4px solid var(--emerald-600); }
.callout-rule .callout-label{ color:var(--emerald-700); }
.callout-tip{ background:var(--info-bg); border-color:var(--info-line); border-left:4px solid var(--info); }
.callout-tip .callout-label{ color:var(--info); }
.callout-example{ background:var(--gold-100); border-color:var(--gold-300); border-left:4px solid var(--gold-500); }
.callout-example .callout-label{ color:var(--gold-700); }
.callout-warning{ background:var(--warn-bg); border-color:var(--warn-line); border-left:4px solid #B7791F; }
.callout-warning .callout-label{ color:#7A4F12; }

/* editor */
.type-menu-groups{ display:flex; flex-direction:column; gap:12px; }
.type-group{ font-weight:700; letter-spacing:.06em; text-transform:uppercase; margin-bottom:6px; }
.block-card.has-problem{ border-left-color:var(--bad); box-shadow:0 0 0 2px var(--bad-bg); }
.block-card.dnd-over{ background-color:var(--gold-100) !important; }
.thumb{ width:40px; height:40px; object-fit:cover; border-radius:6px; border:1px solid var(--line); }
.table-edit td{ padding:3px; }
.table-edit .input{ min-width:110px; padding:6px 8px; }
.table-edit .input.th{ font-weight:700; background:var(--emerald-50); }
.copy-list{ max-height:50vh; overflow:auto; }

/* an answer made only of emoji, without a picture, is shown large (shared/emoji.js) */
.emoji-big{ display:inline-block; font-size:2.8em; line-height:1.15; vertical-align:middle; font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; }
.chip .emoji-big{ font-size:2.4em; }

/* 09-editor.css */
.editor-language-toolbar { position:relative; margin-bottom:12px; box-shadow:0 3px 12px #082a2012; }
.editor-language-toolbar .seg button { display:flex; flex-direction:column; gap:3px; align-items:flex-start; min-height:48px; }
.lang-status { font-size:11px; font-weight:400; }
.editor-language-toolbar .input-sm { width:auto; max-width:160px; min-height:34px; }
.editor-command-bar { margin:12px 0; }
.block-card { scroll-margin-top:170px; }
.block-collapse { text-align:left; white-space:normal; }
.example-hint { display:block; margin-top:5px; }
.editor-outline nav { max-height:48vh; overflow:auto; margin-top:10px; }
.outline-row { display:flex; align-items:center; gap:2px; border-bottom:1px solid #e7e0d2; }
.outline-link { flex:1; min-width:0; padding:9px 4px; text-align:left; font:inherit; font-size:13px; background:none; border:0; cursor:pointer; overflow-wrap:anywhere; }
.outline-section { font-weight:700; color:#135943; }
.readiness-issue { font:inherit; font-size:13px; text-align:left; padding:8px; border:1px solid #cf9b65; border-radius:6px; background:#fff7ec; cursor:pointer; }
.marker-list { padding:10px; background:#f4f2e9; border-radius:8px; }
.marker-list .row { border-bottom:1px solid #e3dfd4; }
.marker-editor details textarea { margin-top:8px; }
.type-menu-groups .type-menu { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:12px; }
.rte-bar { flex-wrap:wrap; }
.type-menu .type-btn { display:flex; flex-direction:column; align-items:stretch; gap:8px; min-width:0; text-align:left; white-space:normal; padding:16px; border-radius:12px; border-width:1px; font-size:14px; line-height:1.45; font-weight:400; }
.type-btn .type-title { align-items:flex-start; min-width:0; font-size:15px; }
.type-title svg { flex:none; margin-top:2px; }
.type-title b { min-width:0; overflow-wrap:anywhere; }
.type-btn .caption { font-size:13px; line-height:1.45; }
.type-menu .type-btn:focus-visible { outline:3px solid var(--emerald-600); outline-offset:3px; }
.type-example { margin-top:auto; min-width:0; overflow-wrap:anywhere; padding:8px 10px; border-radius:6px; background:#f5f3eb; font-size:12px; color:#344f46; }
.template-options { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.template-option { display:flex; align-items:flex-start; gap:8px; border:1px solid #b9c9bf; border-radius:8px; padding:12px; cursor:pointer; }
.template-option.selected { border:2px solid #155b45; padding:11px; background:#edf5ef; }
.template-option small { display:block; margin-top:5px; }
.media-library { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.media-library img,.media-library video { width:100%; height:140px; object-fit:contain; }
.media-library audio { width:100%; }
.media-library .small { overflow-wrap:anywhere; }
.dictionary-pick { text-align:left; font:inherit; cursor:pointer; }
.history-row { padding:12px 0; border-bottom:1px solid #e7e0d2; }
.modal-fullscreen { width:calc(100vw - 32px)!important; max-width:none!important; height:calc(100dvh - 32px); max-height:none!important; display:flex; flex-direction:column; }
.modal-fullscreen .modal-body { overflow:auto; flex:1; }
.lesson-preview-content { max-width:1000px; margin:0 auto; }
.mobile-preview { max-width:390px; border:1px solid #b9c9bf; border-radius:14px; padding:14px; }
@media(max-width:700px) {
  .editor-language-toolbar { position:relative; z-index:auto; }
  .editor-language-toolbar .seg { width:100%; flex-wrap:wrap; }
  .editor-language-toolbar .seg button { flex:1; min-width:80px; }
  .editor-language-toolbar .row { align-items:flex-start; }
  .template-options,.media-library { grid-template-columns:1fr; }
  .modal-fullscreen { width:100vw!important; height:100dvh; border-radius:0; }
  .block-card { scroll-margin-top:90px; }
  .editor-outline nav { max-height:280px; }
  .history-row { flex-wrap:wrap; }
  .block-card > .row.between { flex-wrap:wrap; }
  .block-card > .row.between > .row { flex-wrap:wrap; }
}

/* 10-calendar.css */
/* Calendar colours follow the design (owner, 19.10: the pale green grid of Aurora's day view becomes purple like the rest);
   Classic keeps its greens. Lesson statuses (waiting, under way, cancelled) keep their own colours in every design. */
:root{ --cal-today:#e8f2ec; --cal-today-col:#f1f7f2; --cal-grid:#e4e9e5; --cal-event:#dcecdf; --cal-event-line:#9ebdb0; --cal-event-mark:#27674d; --cal-event-ink:#163c2b;
  --cal-done:#e8ece9; --cal-done-line:#a3b2a7; --cal-done-ink:#163c2b; }
:root:not([data-theme="classic"]){ --cal-today:var(--emerald-100); --cal-today-col:var(--emerald-50); --cal-grid:var(--line); --cal-event:var(--emerald-100);
  --cal-event-line:var(--line-strong); --cal-event-mark:var(--emerald-700); --cal-event-ink:var(--emerald-800); --cal-done:#F0F0F3; --cal-done-line:#C3C1CF; --cal-done-ink:var(--ink-soft); }
:root[data-theme="velvet"]{ --cal-done:#241E3D; --cal-done-line:#463C72; }
.calendar-toolbar { margin-bottom:16px; }
.calendar-wrap { border:1px solid var(--line-strong); border-radius:14px; overflow:hidden; background:var(--paper); }
.calendar-scroll { overflow:auto; max-height:70vh; }
.calendar-grid { display:grid; grid-template-columns:60px repeat(var(--calendar-days),minmax(110px,1fr)); min-width:840px; }
.calendar-day .calendar-grid { min-width:0; grid-template-columns:54px minmax(0,1fr); }
.calendar-heading,.calendar-corner { position:sticky; top:0; z-index:4; padding:12px 6px; background:var(--paper); border-bottom:1px solid var(--line-strong); text-align:center; }
.calendar-heading { display:flex; flex-direction:column; gap:3px; font-size:13px; }
.calendar-heading.is-today { color:var(--emerald-800); background:var(--cal-today); }
.calendar-corner { left:0; z-index:5; }
.calendar-hours { position:sticky; left:0; height:var(--calendar-height); z-index:3; background:var(--paper); font-size:11px; color:var(--muted); }
.calendar-hours span { position:absolute; right:8px; transform:translateY(3px); }
.calendar-day-column { height:var(--calendar-height); position:relative; border-left:1px solid var(--line); background:repeating-linear-gradient(to bottom,transparent 0,transparent 31px,var(--cal-grid) 31px,var(--cal-grid) 32px); }
.calendar-day-column.is-today { background-color:var(--cal-today-col); }
.calendar-event { position:absolute; z-index:1; display:flex; flex-direction:column; gap:3px; padding:4px 6px; overflow:hidden; text-align:left; border:1px solid var(--cal-event-line); border-left:3px solid var(--cal-event-mark); border-radius:6px; background:var(--cal-event); color:var(--cal-event-ink); font:inherit; font-size:12px; line-height:1.25; cursor:pointer; min-width:0; }
.calendar-event b,.calendar-event span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; flex-shrink:0; }
.calendar-event-time { font-size:10px; font-variant-numeric:tabular-nums; }
.calendar-initials {display:inline-flex;justify-content:center;align-items:center;width:18px;height:18px;margin-right:4px;border-radius:4px;background:#ffffff80;font-size:9px;font-style:normal;}
.calendar-pending summary{cursor:pointer;font-weight:700;}
.calendar-pending[open] summary{margin-bottom:12px;}
.calendar-legend { display:flex; flex-wrap:wrap; gap:8px; padding:12px; border-top:1px solid var(--line-strong); }
.legend-item { padding:4px 8px; border:1px solid var(--cal-event-line); border-radius:6px; background:var(--cal-event); color:var(--cal-event-ink); font-size:11px; }
.event-pending { background:#fff0cc; border-color:#d8b75d; color:#684a0c; }
.event-in_progress { background:#d3e9f7; border-color:#548aaa; color:#163e58; }
.event-completed { background:var(--cal-done); border-color:var(--cal-done-line); color:var(--cal-done-ink); }
.event-cancelled,.event-declined,.event-no_show { background:#f8e9e5; border-color:#be8e82; color:#713c30; }
.calendar-event:hover { filter:brightness(.97); z-index:2; }
.calendar-event:focus-visible { outline:3px solid var(--emerald-600); outline-offset:2px; z-index:2; }
.calendar-now { position:absolute; left:0; right:0; height:2px; background:#be4961; z-index:2; pointer-events:none; }
.calendar-now::before { content:''; position:absolute; top:-3px; left:-4px; width:8px; height:8px; border-radius:50%; background:#be4961; }
.calendar-day-picker { display:flex; gap:4px; padding:8px; overflow:auto; }
.calendar-day-picker button { flex:1; min-width:44px; padding:9px 4px; border:1px solid var(--line-strong); border-radius:8px; background:var(--paper); color:var(--ink); font:inherit; font-size:12px; cursor:pointer; }
.calendar-day-picker .selected { background:var(--emerald-800); color:white; }
.schedule-detail .booking-row { align-items:flex-start; }
.schedule-detail .booking-when { min-width:0; }
@media(max-width:700px) { .calendar-toolbar > .row { flex-wrap:wrap; } .calendar-scroll { max-height:65vh; } }
/* Teacher personal items (S6): hatched when the time is closed, dashed outline for a plain note */
.event-personal { background:repeating-linear-gradient(135deg,#eceae4 0 6px,#e2dfd6 6px 12px); border-color:#8f8a7c; color:#3f3b33; }
.event-note { background:#fffdf5; border:1px dashed var(--gold-500); color:var(--gold-700); }
.calendar-day-column { cursor:cell; }

/* personal items can be moved and resized on the grid (S6.1); touch: hold first, a swipe still scrolls */
.calendar-event.is-draggable{ cursor:grab; touch-action:none; }
.calendar-wrap.is-dragging, .calendar-wrap.is-dragging *{ cursor:grabbing !important; user-select:none; -webkit-user-select:none; }
.calendar-event.is-drag-source{ opacity:.45; outline:2px dashed var(--emerald-700); outline-offset:1px; }
.calendar-ghost{ pointer-events:none; z-index:5; box-shadow:0 12px 26px -10px rgba(0,0,0,.45); outline:2px solid var(--emerald-700); }
.calendar-resize{ position:absolute; left:0; right:0; bottom:0; height:10px; cursor:ns-resize; touch-action:none; }
.calendar-resize::after{ content:''; position:absolute; left:50%; bottom:3px; width:22px; height:3px; margin-left:-11px; border-radius:2px; background:currentColor; opacity:.45; }
.calendar-drag-hint{ margin-top:6px; }
/* open time from the teacher's availability (owner 12.11), under the lessons and transparent to clicks */
.calendar-open { position:absolute; left:0; right:0; z-index:0; pointer-events:none; background:color-mix(in srgb, var(--good) 9%, transparent); border-left:3px solid color-mix(in srgb, var(--good) 45%, transparent); }
.legend-item.legend-open { background:color-mix(in srgb, var(--good) 12%, transparent); border-color:color-mix(in srgb, var(--good) 45%, transparent); color:var(--good); }

/* 11-dictionary-images.css */
.dictionary-word{display:flex;align-items:center;gap:12px;min-width:0;}
.dictionary-word>span:last-child{min-width:0;overflow-wrap:anywhere;}
.dictionary-image{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex:none;background:var(--parchment-dim);color:var(--ink-soft);border-radius:10px;}
.dictionary-image img{display:block;width:100%;height:100%;object-fit:cover;}
.dictionary-image-thumb{width:64px;height:64px;}
.dictionary-image-card{width:min(100%,360px);aspect-ratio:1;align-self:center;}
.dictionary-image-card img{width:100%;height:100%;}
.flashcard.has-img>.dictionary-image-card{width:100%;max-height:340px;padding:0;border-radius:0;margin-bottom:14px;}
@media(max-width:500px){.dictionary-word{gap:8px;}.dictionary-image-thumb{width:48px;height:48px;}}

/* 12-platform.css */
/* School designs (Classic, Aurora, Clay) share the same accessible component system. */
:root{--action:var(--emerald-700);--surface:var(--paper);--page-bg:var(--parchment);--text-primary:var(--ink);--control-radius:8px;}
.btn{min-height:38px;border-radius:var(--control-radius);white-space:normal;line-height:1.35;max-width:100%;text-wrap:balance;}
.btn-sm{min-height:32px}.btn-lg{min-height:48px}.input{border-radius:var(--control-radius)}
.body-text,.lesson-content{line-height:1.65}.pronunciation{letter-spacing:.02em;overflow-wrap:anywhere}
.editor-add .btn,.add-blocks .btn{justify-content:flex-start;text-align:left;border-radius:8px;min-height:44px}
[data-sync-block] .ex-block{margin:0}.teacher-view details summary{cursor:pointer;font-size:.85rem;color:var(--ink-soft)}
@media(max-width:700px){.btn{min-height:44px}.grid.grid-3{grid-template-columns:1fr}.teacher-view .card-pad-sm{padding:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Legal documents (migration 040): public pages and the admin editor */
.legal-text{line-height:1.65}
.legal-text h2{font-family:var(--font-display);font-size:1.25rem;line-height:1.3;margin:var(--space-8) 0 var(--space-3)}
.legal-text h3{font-size:1.05rem;line-height:1.35;margin:var(--space-5) 0 var(--space-2)}
.legal-text p{margin:0 0 var(--space-3)}
.legal-text ul{margin:0 0 var(--space-4);padding-left:1.3em}
.legal-text li{margin-bottom:6px}
.legal-text a{text-decoration:underline}
.legal-source{width:100%;min-height:360px;font-family:ui-monospace,Consolas,"Courier New",monospace;font-size:13px;line-height:1.5;resize:vertical}
.legal-preview{max-height:520px;overflow:auto}
.legal-contacts{list-style:none;padding:0;margin:0}
.legal-contacts li{margin-bottom:4px;overflow-wrap:anywhere}

/* 13-themes-fonts.css */
/* New school designs: fonts from Google Fonts, SIL Open Font License 1.1 (self-hosted, font-src self): Manrope, Nunito, Sofia Sans, Rubik, Cormorant Garamond, Jost, IBM Plex Sans/Mono, Lora, Mulish */
@font-face{font-family:'Manrope';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Manrope-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Manrope';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Manrope-400-latin.woff2) format('woff2');}
@font-face{font-family:'Manrope';font-style:normal;font-weight:600;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Manrope-600-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Manrope';font-style:normal;font-weight:600;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Manrope-600-latin.woff2) format('woff2');}
@font-face{font-family:'Manrope';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Manrope-800-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Manrope';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Manrope-800-latin.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Nunito-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Nunito-400-latin.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Nunito-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Nunito-700-latin.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:900;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Nunito-900-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:900;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Nunito-900-latin.woff2) format('woff2');}
@font-face{font-family:'Sofia Sans';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/SofiaSans-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Sofia Sans';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/SofiaSans-400-latin.woff2) format('woff2');}
@font-face{font-family:'Sofia Sans';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/SofiaSans-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Sofia Sans';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/SofiaSans-700-latin.woff2) format('woff2');}
@font-face{font-family:'Sofia Sans';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/SofiaSans-800-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Sofia Sans';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/SofiaSans-800-latin.woff2) format('woff2');}
@font-face{font-family:'Rubik';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Rubik-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Rubik';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Rubik-400-latin.woff2) format('woff2');}
@font-face{font-family:'Rubik';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Rubik-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Rubik';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Rubik-700-latin.woff2) format('woff2');}
@font-face{font-family:'Rubik';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Rubik-800-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Rubik';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Rubik-800-latin.woff2) format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:500;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/CormorantGaramond-500i-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:500;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/CormorantGaramond-500i-latin.woff2) format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:500;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/CormorantGaramond-500-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:500;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/CormorantGaramond-500-latin.woff2) format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/CormorantGaramond-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/CormorantGaramond-700-latin.woff2) format('woff2');}
@font-face{font-family:'Jost';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Jost-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Jost';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Jost-400-latin.woff2) format('woff2');}
@font-face{font-family:'Jost';font-style:normal;font-weight:600;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Jost-600-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Jost';font-style:normal;font-weight:600;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Jost-600-latin.woff2) format('woff2');}
@font-face{font-family:'Jost';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Jost-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Jost';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Jost-700-latin.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/IBMPlexSans-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/IBMPlexSans-400-latin.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/IBMPlexSans-600-cyrillic.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/IBMPlexSans-600-latin.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/IBMPlexSans-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/IBMPlexSans-700-latin.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/IBMPlexMono-500-cyrillic.woff2) format('woff2');}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/IBMPlexMono-500-latin.woff2) format('woff2');}
@font-face{font-family:'Lora';font-style:italic;font-weight:500;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Lora-500i-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Lora';font-style:italic;font-weight:500;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Lora-500i-latin.woff2) format('woff2');}
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Lora-500-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Lora-500-latin.woff2) format('woff2');}
@font-face{font-family:'Lora';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Lora-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Lora';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Lora-700-latin.woff2) format('woff2');}
@font-face{font-family:'Mulish';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Mulish-400-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Mulish';font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Mulish-400-latin.woff2) format('woff2');}
@font-face{font-family:'Mulish';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Mulish-700-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Mulish';font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Mulish-700-latin.woff2) format('woff2');}
@font-face{font-family:'Mulish';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;src:url(/fonts/Mulish-800-cyrillic.woff2) format('woff2');}
@font-face{font-family:'Mulish';font-style:normal;font-weight:800;font-display:swap;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;src:url(/fonts/Mulish-800-latin.woff2) format('woff2');}

/* 14-themes-v2.css */
/* ============================================================
   NEW SCHOOL DESIGNS (2026-10): seven complete visual systems on top of the same markup.
   aurora · clay (pop, editorial, midnight removed 2026-10-08 by the owner) and, from 2026-10-08, ocean · sunrise · velvet ·
   studio · terra — each sets its own type, colour, shape, depth, navigation and hero. Classic is the base design.
   Selected by the admin (settings.design.theme) or previewed per browser (?design=<id>).
   ============================================================ */

/* ---------- theme logos (inline SVG marks rendered next to the original emblem crop) ---------- */
.lv-mark-set{ display:inline-flex; flex:none; line-height:0; }
.lv-mark-alt, .lv-emblem-alt{ display:none; }
.lv-mark-alt svg, .lv-emblem-alt svg{ width:100%; height:100%; display:block; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .lv-mark{ display:none; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) picture.lv-emblem{ display:none; }
:root[data-theme="aurora"] .lv-mark-alt-aurora,
:root[data-theme="clay"] .lv-mark-alt-clay,
:root[data-theme="ocean"] .lv-mark-alt-ocean,
:root[data-theme="sunrise"] .lv-mark-alt-sunrise,
:root[data-theme="velvet"] .lv-mark-alt-velvet,
:root[data-theme="studio"] .lv-mark-alt-studio,
:root[data-theme="terra"] .lv-mark-alt-terra{ display:inline-block; }
:root[data-theme="aurora"] .lv-emblem-alt-aurora,
:root[data-theme="clay"] .lv-emblem-alt-clay,
:root[data-theme="ocean"] .lv-emblem-alt-ocean,
:root[data-theme="sunrise"] .lv-emblem-alt-sunrise,
:root[data-theme="velvet"] .lv-emblem-alt-velvet,
:root[data-theme="studio"] .lv-emblem-alt-studio,
:root[data-theme="terra"] .lv-emblem-alt-terra{ display:block; width:100%; aspect-ratio:1; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .hero-halo{ display:none; }

/* =====================================================================
   1. AURORA — glass & light: soft mesh gradients, frosted surfaces, floating rail
   ===================================================================== */
:root[data-theme="aurora"]{
  --font-display:'Manrope','Segoe UI',sans-serif; --font-body:'Manrope','Segoe UI',sans-serif;
  --ink:#1D1A3A; --ink-soft:#4D4870; --ink-faint:#5E5985;
  --emerald-900:#1C1A47; --emerald-800:#2A2770; --emerald-700:#6D3BEA; --emerald-600:#7C4DF2; --emerald-500:#8F66F7; --emerald-100:#ECE6FE; --emerald-50:#F5F2FF;
  --gold-700:#0B6E8A; --gold-600:#0891B2; --gold-500:#14B8D6; --gold-300:#7DE6F5; --gold-100:#D5F8FD;
  --parchment:#F4F3FD; --parchment-dim:#ECEAFB; --paper:#FFFFFF; --line:#E3E0F6; --line-strong:#C8C1EE; --field-border:#8A82BE;
  --focus-ring:#6D3BEA;
  --radius-s:12px; --radius-m:16px; --radius-l:24px;
  --shadow-card:0 1px 1px rgba(40,30,110,.04), 0 18px 40px -22px rgba(80,50,200,.35);
  --shadow-pop:0 30px 60px -20px rgba(40,25,130,.45);
}
:root[data-theme="aurora"] body{ background:
  radial-gradient(60vw 50vh at 8% 0%, rgba(143,102,247,.20), transparent 60%),
  radial-gradient(50vw 50vh at 100% 10%, rgba(20,184,214,.18), transparent 60%),
  radial-gradient(60vw 60vh at 60% 110%, rgba(244,114,182,.14), transparent 60%), var(--parchment); background-attachment:fixed; }
:root[data-theme="aurora"] .h1, :root[data-theme="aurora"] .h2, :root[data-theme="aurora"] .display-1, :root[data-theme="aurora"] .display-2, :root[data-theme="aurora"] .hero-title{ font-weight:800; letter-spacing:-.03em; }
:root[data-theme="aurora"] .card{ background:rgba(255,255,255,.72); backdrop-filter:blur(16px) saturate(1.3); -webkit-backdrop-filter:blur(16px) saturate(1.3); border:1px solid rgba(255,255,255,.85); }
/* lesson blocks: the same frosted card without a blur per block (a lesson scrolls dozens of them, the room over a plain background) */
:root[data-theme="aurora"] .ex-card{ background:rgba(255,255,255,.86); backdrop-filter:none; -webkit-backdrop-filter:none; }
:root[data-theme="aurora"] .btn{ border-radius:999px; font-weight:700; }
:root[data-theme="aurora"] .btn-primary{ background:linear-gradient(135deg,#7C4DF2 0%,#4F46E5 55%,#0891B2 120%); box-shadow:0 10px 24px -10px rgba(109,59,234,.75); }
:root[data-theme="aurora"] .btn-primary:hover{ filter:brightness(1.08); background:linear-gradient(135deg,#7C4DF2 0%,#4F46E5 55%,#0891B2 120%); }
:root[data-theme="aurora"] .btn-on-dark{ background:#fff; color:#2A2770; }
:root[data-theme="aurora"] .input{ border-width:1px; background:rgba(255,255,255,.9); }
:root[data-theme="aurora"] .input:focus{ box-shadow:0 0 0 4px rgba(109,59,234,.15); border-color:#7C4DF2; }
:root[data-theme="aurora"] .app-rail{ margin:12px 0 12px 12px; height:calc(100vh - 24px); top:12px; border-radius:28px; background:linear-gradient(180deg,#24206A 0%,#1C1A47 60%,#16143A 100%); box-shadow:0 20px 50px -20px rgba(28,26,71,.6); }
:root[data-theme="aurora"] .rail-link{ border-left:0; border-radius:14px; }
:root[data-theme="aurora"] .rail-link.active{ background:linear-gradient(135deg,rgba(143,102,247,.55),rgba(20,184,214,.35)); color:#fff; }
:root[data-theme="aurora"] .app-rail .rail-section-label{ color:#A39CE0; }
:root[data-theme="aurora"] .badge-n{ background:#7DE6F5; color:#1C1A47; }
:root[data-theme="aurora"] .app-topbar{ background:rgba(255,255,255,.62); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border-bottom-color:rgba(200,193,238,.5); }
:root[data-theme="aurora"] .pub-header{ background:rgba(28,26,71,.78); }
:root[data-theme="aurora"] .hero.section-dark{ background:
  radial-gradient(700px 480px at 85% 40%, rgba(143,102,247,.55), transparent 65%),
  radial-gradient(520px 420px at 65% 95%, rgba(20,184,214,.45), transparent 65%),
  radial-gradient(500px 400px at 10% 10%, rgba(244,114,182,.25), transparent 65%), #1C1A47; }
:root[data-theme="aurora"] .hero-title .accent{ background:linear-gradient(90deg,#B9A2FF,#7DE6F5); -webkit-background-clip:text; background-clip:text; color:transparent; }
:root[data-theme="aurora"] .hero-art{ filter:drop-shadow(0 30px 60px rgba(124,77,242,.55)); }
:root[data-theme="aurora"] .section-dark{ background:linear-gradient(160deg,#24206A,#1C1A47); }
:root[data-theme="aurora"] .pill{ border-radius:999px; }
:root[data-theme="aurora"] .room-topbar, :root[data-theme="aurora"] .room-controls{ background:rgba(28,26,71,.92); backdrop-filter:blur(12px); }
:root[data-theme="aurora"] .modal{ border:1px solid rgba(255,255,255,.8); }
:root[data-theme="aurora"] .float-panel-head{ background:linear-gradient(135deg,#6D3BEA,#4F46E5); }
/* the "how lessons go" room mock stays a dark glass panel (its text is light); cards on dark sections are solid, not grey glass */
:root[data-theme="aurora"] .room-mock{ background:linear-gradient(160deg,rgba(255,255,255,.13),rgba(255,255,255,.05)); border-color:rgba(255,255,255,.16); box-shadow:0 30px 60px -30px rgba(0,0,0,.6); }
:root[data-theme="aurora"] .mock-panel{ background:rgba(28,26,71,.6); }
:root[data-theme="aurora"] .mock-chip, :root[data-theme="aurora"] .mock-tile{ background:rgba(255,255,255,.1); color:#EDEBFF; }
:root[data-theme="aurora"] .mock-chip.gold{ background:#7DE6F5; color:#1C1A47; }
:root[data-theme="aurora"] .mock-title{ color:#fff; }
:root[data-theme="aurora"] .mock-caption{ color:#B9B4E5; }
:root[data-theme="aurora"] .section-dark .card:not(.room-mock){ background:rgba(255,255,255,.97); }

/* =====================================================================
   2. CLAY — soft & friendly: pastel cream, chunky rounded shapes, tactile clay shadows
   ===================================================================== */
:root[data-theme="clay"]{
  --font-display:'Nunito','Segoe UI',sans-serif; --font-body:'Nunito','Segoe UI',sans-serif;
  --ink:#2D2440; --ink-soft:#5A5070; --ink-faint:#6C627E;
  --emerald-900:#3A2D5C; --emerald-800:#4A3A72; --emerald-700:#6E4FD0; --emerald-600:#5F42BD; --emerald-500:#8C70E2; --emerald-100:#EEE8FB; --emerald-50:#F7F4FD;
  --gold-700:#A64B22; --gold-600:#E2702F; --gold-500:#FF9F68; --gold-300:#FFC9A6; --gold-100:#FFE9DA;
  --parchment:#FFF3EA; --parchment-dim:#FCE9DC; --paper:#FFFFFF; --line:#F1E1D5; --line-strong:#E4CBB9; --field-border:#A88F7F;
  --focus-ring:#6E4FD0;
  --radius-s:14px; --radius-m:20px; --radius-l:30px;
  --shadow-card:10px 12px 28px -12px rgba(170,120,95,.35), -6px -6px 18px rgba(255,255,255,.9), inset 0 -2px 0 rgba(170,120,95,.06);
  --shadow-pop:0 30px 60px -18px rgba(90,60,140,.4);
}
:root[data-theme="clay"] body{ background:radial-gradient(40vw 40vh at 0% 20%, rgba(255,201,166,.55), transparent 70%), radial-gradient(40vw 40vh at 100% 0%, rgba(140,112,226,.20), transparent 70%), radial-gradient(40vw 40vh at 80% 100%, rgba(120,220,190,.25), transparent 70%), var(--parchment); background-attachment:fixed; }
:root[data-theme="clay"] .h1, :root[data-theme="clay"] .h2, :root[data-theme="clay"] .display-1, :root[data-theme="clay"] .display-2, :root[data-theme="clay"] .hero-title, :root[data-theme="clay"] .h3, :root[data-theme="clay"] .tb-title{ font-weight:900; letter-spacing:-.01em; }
:root[data-theme="clay"] .card{ border:0; }
:root[data-theme="clay"] .btn{ border-radius:999px; font-weight:800; }
:root[data-theme="clay"] .btn-primary{ background:linear-gradient(180deg,#8C70E2,#6E4FD0); box-shadow:inset 0 -4px 0 rgba(0,0,0,.18), 0 10px 18px -8px rgba(110,79,208,.65); }
:root[data-theme="clay"] .btn-primary:hover{ background:linear-gradient(180deg,#9A80EA,#7A5BDA); }
:root[data-theme="clay"] .btn-primary:active{ box-shadow:inset 0 2px 0 rgba(0,0,0,.2); }
:root[data-theme="clay"] .btn-secondary{ background:#fff; border:2px solid #E4D8FA; color:#5F42BD; box-shadow:inset 0 -3px 0 rgba(110,79,208,.12); }
:root[data-theme="clay"] .btn-gold, :root[data-theme="clay"] .btn-on-dark{ background:linear-gradient(180deg,#FFB283,#FF8F52); color:#3A2D5C; box-shadow:inset 0 -4px 0 rgba(0,0,0,.14); }
:root[data-theme="clay"] .input{ border:2px solid #F1E1D5; background:#FFFDFB; }
:root[data-theme="clay"] .input:focus{ border-color:#8C70E2; box-shadow:0 0 0 4px rgba(140,112,226,.18); }
:root[data-theme="clay"] .pill{ border-width:0; padding:5px 12px; }
:root[data-theme="clay"] .notice{ border:0; box-shadow:inset 0 0 0 2px rgba(0,0,0,.04); border-radius:20px; }
:root[data-theme="clay"] .app-rail{ margin:14px 0 14px 14px; height:calc(100vh - 28px); top:14px; border-radius:34px; background:#3A2D5C; box-shadow:12px 14px 30px -14px rgba(58,45,92,.55); }
:root[data-theme="clay"] .rail-link{ border-left:0; border-radius:20px; }
:root[data-theme="clay"] .rail-link.active{ background:#FFF3EA; color:#3A2D5C; box-shadow:inset 0 -3px 0 rgba(170,120,95,.18); }
:root[data-theme="clay"] .badge-n{ background:#FF9F68; color:#3A2D5C; }
:root[data-theme="clay"] .app-topbar{ background:transparent; border-bottom:0; }
:root[data-theme="clay"] .pub-header{ background:rgba(58,45,92,.94); }
:root[data-theme="clay"] .hero.section-dark{ background:radial-gradient(420px 360px at 85% 25%, rgba(255,159,104,.55), transparent 70%), radial-gradient(420px 360px at 70% 95%, rgba(120,220,190,.40), transparent 70%), radial-gradient(500px 420px at 10% 0%, rgba(140,112,226,.55), transparent 70%), #3A2D5C; }
:root[data-theme="clay"] .hero-title .accent{ color:#FFC9A6; }
:root[data-theme="clay"] .hero-art{ background:#FFF3EA; border-radius:42% 58% 55% 45% / 50% 45% 55% 50%; padding:12%; box-shadow:20px 24px 50px -20px rgba(0,0,0,.45), inset -10px -12px 30px rgba(170,120,95,.18); }
:root[data-theme="clay"] .section-dark{ background:#3A2D5C; }
:root[data-theme="clay"] .room-topbar, :root[data-theme="clay"] .room-controls{ background:#3A2D5C; }
:root[data-theme="clay"] .ctrl-btn{ background:rgba(255,255,255,.12); }
:root[data-theme="clay"] .video-tile{ border-radius:22px; }
:root[data-theme="clay"] .stage-chip{ border-radius:999px; }
:root[data-theme="clay"] .float-panel{ border:0; border-radius:26px; }
:root[data-theme="clay"] .float-panel-head{ background:#3A2D5C; }
:root[data-theme="clay"] .modal{ border-radius:30px; }

/* phones and tablets: the floating rail of Aurora and Clay becomes the ordinary top bar (03-app.css). With the side margin
   and the full-height box it filled the whole first screen and the page scrolled sideways. */
@media (max-width:900px){
  :root:is([data-theme="aurora"],[data-theme="clay"]) .app-rail{ margin:0; top:0; height:auto; border-radius:0; }
  :root:is([data-theme="aurora"],[data-theme="clay"]) .app-rail.is-open{ height:100vh; height:100dvh; }
}
/* with the burger menu the header sits on the light page: near-solid, like the open menu under it */
@media (max-width:1080px){ :root[data-theme="aurora"] .pub-header{ background:rgba(28,26,71,.95); } }

/* shared: logo word in each theme */
:root[data-theme="aurora"] .lv-word{ font-family:'Manrope',sans-serif; font-weight:800; letter-spacing:-.02em; }
:root[data-theme="clay"] .lv-word{ font-family:'Nunito',sans-serif; font-weight:900; }

/* design preview bar (any theme) */
.design-preview-bar{ position:fixed; left:16px; bottom:16px; z-index:90; display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 10px 8px 14px; border-radius:14px; background:#111; color:#fff; font:600 13px/1.3 'Segoe UI',sans-serif; box-shadow:0 10px 30px rgba(0,0,0,.35); }
.design-preview-bar select{ font:inherit; border-radius:8px; border:0; padding:4px 6px; background:#fff; color:#111; }
.design-preview-bar button{ font:inherit; border:0; border-radius:8px; padding:5px 10px; background:#FFD23F; color:#111; cursor:pointer; }
/* stat tiles follow each design */
:root[data-theme="aurora"] .stat-tile{ background:rgba(255,255,255,.72); backdrop-filter:blur(14px); border-color:rgba(255,255,255,.85); box-shadow:var(--shadow-card); }
:root[data-theme="clay"] .stat-tile{ border:0; box-shadow:var(--shadow-card); }

/* =====================================================================
   3. OCEAN — sea & sand: deep-water navigation, cyan light, a scalloped wave under the hero. Sofia Sans
   ===================================================================== */
:root[data-theme="ocean"]{
  --font-display:'Sofia Sans','Segoe UI',sans-serif; --font-body:'Sofia Sans','Segoe UI',sans-serif;
  --ink:#0E2230; --ink-soft:#3C5566; --ink-faint:#55707F;
  --emerald-900:#07243A; --emerald-800:#0B3553; --emerald-700:#0C7CA6; --emerald-600:#0B8FBE; --emerald-500:#0EA5C8; --emerald-100:#D9F0F8; --emerald-50:#EDF8FC;
  --gold-700:#9A6A2E; --gold-600:#C98A3E; --gold-500:#F0B35A; --gold-300:#F6D59A; --gold-100:#FBEFD8;
  --parchment:#F1F7FA; --parchment-dim:#E4EFF5; --paper:#FFFFFF; --line:#D7E6EE; --line-strong:#B5D0DE; --field-border:#6E8EA0;
  --focus-ring:#0EA5C8;
  --radius-s:10px; --radius-m:14px; --radius-l:22px;
  --shadow-card:0 1px 2px rgba(7,36,58,.05), 0 16px 36px -20px rgba(7,36,58,.30);
  --shadow-pop:0 30px 60px -20px rgba(7,36,58,.45);
}
:root[data-theme="ocean"] body{ background:linear-gradient(180deg,#E3F2F8 0,rgba(227,242,248,0) 420px), radial-gradient(50vw 40vh at 100% 100%, rgba(240,179,90,.14), transparent 60%), var(--parchment); }
:root[data-theme="ocean"] .h1, :root[data-theme="ocean"] .h2, :root[data-theme="ocean"] .display-1, :root[data-theme="ocean"] .display-2, :root[data-theme="ocean"] .hero-title, :root[data-theme="ocean"] .tb-title{ font-weight:800; letter-spacing:-.025em; }
:root[data-theme="ocean"] .btn{ font-weight:700; border-radius:12px; }
:root[data-theme="ocean"] .btn-primary{ background:linear-gradient(135deg,#0C7CA6,#0EA5C8); box-shadow:0 10px 22px -10px rgba(12,124,166,.7); }
:root[data-theme="ocean"] .btn-primary:hover{ background:linear-gradient(135deg,#0B8FBE,#22B8D8); }
:root[data-theme="ocean"] .btn-on-dark{ background:#F0B35A; color:#07243A; }
:root[data-theme="ocean"] .btn-on-dark:hover{ background:#F6D59A; }
:root[data-theme="ocean"] .input:focus{ border-color:#0EA5C8; box-shadow:0 0 0 4px rgba(14,165,200,.16); }
:root[data-theme="ocean"] .app-rail{ background:linear-gradient(180deg,#0B3553 0%,#07243A 45%,#051A2B 100%); }
:root[data-theme="ocean"] .app-rail .rail-section-label{ color:#7FB6CF; }
:root[data-theme="ocean"] .rail-link{ color:#CFE3EC; border-left:0; border-radius:12px; }
:root[data-theme="ocean"] .rail-link:hover{ background:rgba(14,165,200,.14); }
:root[data-theme="ocean"] .rail-link.active{ background:#0EA5C8; color:#06202E; }
:root[data-theme="ocean"] .rail-link.active svg{ opacity:1; }
:root[data-theme="ocean"] .badge-n{ background:#F0B35A; color:#07243A; }
:root[data-theme="ocean"] .rail-link.active .badge-n{ background:#07243A; color:#7FE0F2; }
:root[data-theme="ocean"] .app-topbar{ background:rgba(241,247,250,.85); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom-color:#D7E6EE; }
:root[data-theme="ocean"] .pub-header{ background:rgba(7,36,58,.86); }
:root[data-theme="ocean"] .hero.section-dark{ background:radial-gradient(720px 520px at 82% 30%, rgba(14,165,200,.50), transparent 65%), radial-gradient(560px 420px at 18% 100%, rgba(240,179,90,.28), transparent 65%), #07243A; }
:root[data-theme="ocean"] .hero::after{ content:''; position:absolute; left:0; right:0; bottom:-1px; height:40px; z-index:1; pointer-events:none; background:radial-gradient(60px 40px at 50% 100%, var(--parchment) 98%, transparent 100%) 0 0/120px 40px repeat-x; }
:root[data-theme="ocean"] .hero-title .accent{ color:#7FE0F2; }
:root[data-theme="ocean"] .hero-lead{ color:#C9E3EE; }
:root[data-theme="ocean"] .hero-art{ filter:drop-shadow(0 30px 60px rgba(14,165,200,.55)); }
:root[data-theme="ocean"] .section-dark{ background:linear-gradient(160deg,#0B3553,#07243A); }
:root[data-theme="ocean"] .pub-footer{ background:#051A2B; }
:root[data-theme="ocean"] .tab[aria-selected="true"]{ color:#0B3553; border-bottom-color:#0EA5C8; }
:root[data-theme="ocean"] .room-topbar, :root[data-theme="ocean"] .room-controls{ background:#07243A; }
:root[data-theme="ocean"] .video-tile{ background:#0B3553; }
:root[data-theme="ocean"] .stage-chip.active{ background:#0EA5C8; color:#06202E; }
:root[data-theme="ocean"] .float-panel-head{ background:linear-gradient(135deg,#0B3553,#0C7CA6); }
:root[data-theme="ocean"] .stat-tile{ border-color:#D7E6EE; box-shadow:var(--shadow-card); }

/* =====================================================================
   4. SUNRISE — energy & warmth: coral-to-amber light, pill buttons, a sunset gradient rail. Rubik
   ===================================================================== */
:root[data-theme="sunrise"]{
  --font-display:'Rubik','Segoe UI',sans-serif; --font-body:'Rubik','Segoe UI',sans-serif;
  --ink:#2A1F1C; --ink-soft:#5C4C46; --ink-faint:#6F5F59;
  --emerald-900:#3B1F1A; --emerald-800:#5A2A20; --emerald-700:#E8532E; --emerald-600:#D4472A; --emerald-500:#FF6B4A; --emerald-100:#FFE4DC; --emerald-50:#FFF3EF;
  --gold-700:#A86A00; --gold-600:#D99A0B; --gold-500:#FFB830; --gold-300:#FFD77A; --gold-100:#FFF1CC;
  --parchment:#FFFBF5; --parchment-dim:#FFF2E3; --paper:#FFFFFF; --line:#F3E2D6; --line-strong:#E7C8B5; --field-border:#A8877A;
  --focus-ring:#E8532E;
  --radius-s:12px; --radius-m:18px; --radius-l:26px;
  --shadow-card:0 1px 2px rgba(58,31,26,.04), 0 18px 40px -22px rgba(232,83,46,.35);
  --shadow-pop:0 30px 60px -20px rgba(58,31,26,.45);
}
:root[data-theme="sunrise"] body{ background:radial-gradient(55vw 45vh at 100% 0%, rgba(255,184,48,.28), transparent 60%), radial-gradient(45vw 45vh at 0% 100%, rgba(255,107,74,.18), transparent 60%), var(--parchment); background-attachment:fixed; }
:root[data-theme="sunrise"] .h1, :root[data-theme="sunrise"] .h2, :root[data-theme="sunrise"] .display-1, :root[data-theme="sunrise"] .display-2, :root[data-theme="sunrise"] .hero-title, :root[data-theme="sunrise"] .tb-title{ font-weight:800; letter-spacing:-.02em; }
:root[data-theme="sunrise"] .btn{ border-radius:999px; font-weight:700; }
:root[data-theme="sunrise"] .btn-primary, :root[data-theme="sunrise"] a.btn-primary{ background:linear-gradient(135deg,#FFB830,#FF6B4A 70%); color:#3B1F1A; box-shadow:0 10px 24px -10px rgba(255,107,74,.75); }
:root[data-theme="sunrise"] .btn-primary:hover{ background:linear-gradient(135deg,#FFC857,#FF7E5F 70%); }
:root[data-theme="sunrise"] .btn-secondary{ border-color:#FF6B4A; color:#D4472A; }
:root[data-theme="sunrise"] .btn-secondary:hover{ background:#FFF3EF; }
:root[data-theme="sunrise"] .btn-secondary.selected{ background:#E8532E; border-color:#E8532E; color:#fff; }
:root[data-theme="sunrise"] .btn-gold{ background:#E8532E; }
:root[data-theme="sunrise"] .btn-gold:hover{ background:#D4472A; }
:root[data-theme="sunrise"] .btn-on-dark{ background:linear-gradient(135deg,#FFB830,#FF6B4A 70%); color:#3B1F1A; }
:root[data-theme="sunrise"] .btn-on-dark:hover{ background:linear-gradient(135deg,#FFC857,#FF7E5F 70%); }
:root[data-theme="sunrise"] .card{ border:0; }
:root[data-theme="sunrise"] .input{ border:2px solid #F3E2D6; background:#fff; }
:root[data-theme="sunrise"] .input:focus{ border-color:#FF6B4A; box-shadow:0 0 0 4px rgba(255,107,74,.16); }
:root[data-theme="sunrise"] .notice{ border-radius:18px; }
:root[data-theme="sunrise"] .app-rail{ background:linear-gradient(180deg,#FF7A50 0%,#E8532E 48%,#8E2D5B 100%); }
:root[data-theme="sunrise"] .app-rail .rail-brand{ border-bottom-color:rgba(255,255,255,.18); }
:root[data-theme="sunrise"] .app-rail .rail-section-label{ color:#FFD9CC; }
:root[data-theme="sunrise"] .rail-link{ color:#fff; border-left:0; border-radius:999px; }
:root[data-theme="sunrise"] .rail-link:hover{ background:rgba(255,255,255,.14); }
:root[data-theme="sunrise"] .rail-link.active{ background:#FFFBF5; color:#C2381E; }
:root[data-theme="sunrise"] .rail-link.active svg{ opacity:1; }
:root[data-theme="sunrise"] .app-rail .rail-foot{ border-top-color:rgba(255,255,255,.18); }
:root[data-theme="sunrise"] .badge-n{ background:#FFB830; color:#3B1F1A; }
:root[data-theme="sunrise"] .app-topbar{ background:rgba(255,251,245,.85); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom:0; }
:root[data-theme="sunrise"] .pub-header{ background:rgba(59,31,26,.9); }
:root[data-theme="sunrise"] .hero.section-dark{ background:radial-gradient(520px 520px at 78% 112%, #FFD77A 0%, #FFB830 22%, rgba(255,107,74,.85) 42%, rgba(255,107,74,0) 64%), linear-gradient(160deg,#4A1E2E 0%,#3B1F1A 60%,#2E1A17 100%); }
:root[data-theme="sunrise"] .hero-title .accent{ color:#FFB830; }
:root[data-theme="sunrise"] .hero-lead{ color:#F3D9CF; }
:root[data-theme="sunrise"] .hero-art{ filter:drop-shadow(0 30px 60px rgba(255,184,48,.55)); }
:root[data-theme="sunrise"] .section-dark{ background:linear-gradient(160deg,#4A1E2E,#3B1F1A); }
:root[data-theme="sunrise"] .pub-footer{ background:#2E1A17; }
:root[data-theme="sunrise"] .eyebrow{ color:#D4472A; }
:root[data-theme="sunrise"] .tab[aria-selected="true"]{ color:#C2381E; border-bottom-color:#FF6B4A; }
:root[data-theme="sunrise"] .stat-tile{ border:0; box-shadow:var(--shadow-card); }
:root[data-theme="sunrise"] .stat-tile .num{ color:#E8532E; }
:root[data-theme="sunrise"] .room-topbar, :root[data-theme="sunrise"] .room-controls{ background:#3B1F1A; }
:root[data-theme="sunrise"] .video-tile{ background:#5A2A20; border-radius:20px; }
:root[data-theme="sunrise"] .stage-chip{ border-radius:999px; }
:root[data-theme="sunrise"] .stage-chip.active{ background:#FFB830; color:#3B1F1A; }
:root[data-theme="sunrise"] .float-panel{ border:0; border-radius:22px; }
:root[data-theme="sunrise"] .float-panel-head{ background:linear-gradient(135deg,#E8532E,#8E2D5B); }
:root[data-theme="sunrise"] .modal{ border-radius:26px; }

/* =====================================================================
   5. VELVET — evening luxury (dark): deep plum, champagne gold, rose light. Cormorant Garamond + Jost
   ===================================================================== */
:root[data-theme="velvet"]{
  color-scheme:dark;
  --font-display:'Cormorant Garamond',Georgia,serif; --font-body:'Jost','Segoe UI',sans-serif;
  --ink:#F2EDE4; --ink-soft:#CDC4B8; --ink-faint:#AFA698;
  --emerald-900:#0F0B1F; --emerald-800:#F3E3BF; --emerald-700:#E3C27A; --emerald-600:#D4B264; --emerald-500:#EDD092; --emerald-100:#2A2340; --emerald-50:#1E1836;
  --gold-700:#F0A3B5; --gold-600:#C98A9B; --gold-500:#E3C27A; --gold-300:#F6C9D4; --gold-100:#3A1F2E;
  --good:#7BD8A0; --good-bg:#15301F; --good-line:#245A38; --warn:#F2C66B; --warn-bg:#332A12; --warn-line:#5C4A1C; --bad:#F07D7D; --bad-bg:#3A1A1F; --bad-line:#6B2A33; --info:#86B7F0; --info-bg:#15223A; --info-line:#284466;
  --parchment:#120D24; --parchment-dim:#1A1433; --paper:#1C1636; --line:#2E2650; --line-strong:#463C72; --field-border:#7B6FA8;
  --focus-ring:#E3C27A;
  --radius-s:8px; --radius-m:12px; --radius-l:18px;
  --shadow-card:inset 0 1px 0 rgba(227,194,122,.14), 0 24px 48px -28px rgba(0,0,0,.85);
  --shadow-pop:0 0 0 1px rgba(227,194,122,.25), 0 40px 80px -24px rgba(0,0,0,.9);
}
:root[data-theme="velvet"] body{ background:radial-gradient(60vw 50vh at 15% 0%, rgba(227,194,122,.10), transparent 60%), radial-gradient(50vw 50vh at 100% 100%, rgba(240,163,181,.10), transparent 60%), var(--parchment); background-attachment:fixed; }
:root[data-theme="velvet"] .h1, :root[data-theme="velvet"] .h2, :root[data-theme="velvet"] .h3, :root[data-theme="velvet"] .display-1, :root[data-theme="velvet"] .display-2, :root[data-theme="velvet"] .tb-title, :root[data-theme="velvet"] .price{ font-weight:700; letter-spacing:0; }
:root[data-theme="velvet"] .hero-title{ font-weight:600; letter-spacing:-.005em; line-height:1.02; font-size:clamp(2.5rem, 1.2rem + 4.2vw, 4.6rem); }
:root[data-theme="velvet"] .btn{ font-weight:600; letter-spacing:.02em; }
:root[data-theme="velvet"] .btn-primary, :root[data-theme="velvet"] a.btn-primary{ background:linear-gradient(180deg,#EDD092,#D9B766); color:#1A1230; box-shadow:0 10px 24px -12px rgba(227,194,122,.6); }
:root[data-theme="velvet"] .btn-primary:hover{ background:linear-gradient(180deg,#F6E0A8,#E3C27A); }
:root[data-theme="velvet"] .btn-secondary{ border-color:rgba(227,194,122,.6); color:#F3E3BF; }
:root[data-theme="velvet"] .btn-secondary:hover{ background:rgba(227,194,122,.12); }
:root[data-theme="velvet"] .btn-secondary.selected{ background:#E3C27A; border-color:#E3C27A; color:#1A1230; }
:root[data-theme="velvet"] .btn-ghost{ color:#CDC4B8; }
:root[data-theme="velvet"] .btn-ghost:hover{ background:rgba(255,255,255,.07); color:#F2EDE4; }
:root[data-theme="velvet"] .btn-gold{ background:#F0A3B5; color:#1A1230; }
:root[data-theme="velvet"] .btn-gold:hover{ background:#F6C9D4; }
:root[data-theme="velvet"] .btn-on-dark{ background:#E3C27A; color:#1A1230; }
:root[data-theme="velvet"] .btn-on-dark:hover{ background:#EDD092; }
:root[data-theme="velvet"] .btn-danger:hover{ background:#3A1A1F; }
:root[data-theme="velvet"] .card{ background:linear-gradient(180deg,#1F1839,#1A1433); border-color:#2E2650; }
:root[data-theme="velvet"] .input{ background:#15102B; border-color:#463C72; color:var(--ink); }
:root[data-theme="velvet"] .input:hover{ border-color:#7B6FA8; }
:root[data-theme="velvet"] .input:focus{ border-color:#E3C27A; box-shadow:0 0 0 3px rgba(227,194,122,.2); }
:root[data-theme="velvet"] .app-rail{ background:linear-gradient(180deg,#0F0B1F,#140E2A); border-right:1px solid #2E2650; }
:root[data-theme="velvet"] .app-rail .rail-brand .lv-word{ color:#F3E3BF; }
:root[data-theme="velvet"] .app-rail .rail-section-label{ color:#8F84B8; }
:root[data-theme="velvet"] .rail-link{ color:#CFC6E6; }
:root[data-theme="velvet"] .rail-link.active{ background:rgba(227,194,122,.14); color:#F6E7C2; border-left-color:#E3C27A; }
:root[data-theme="velvet"] .badge-n{ background:#E3C27A; color:#1A1230; }
:root[data-theme="velvet"] .app-topbar{ background:rgba(18,13,36,.82); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom-color:#2E2650; }
:root[data-theme="velvet"] .pub-header{ background:rgba(15,11,31,.86); border-bottom-color:rgba(227,194,122,.16); }
:root[data-theme="velvet"] .hero.section-dark{ background:radial-gradient(700px 520px at 82% 35%, rgba(227,194,122,.26), transparent 65%), radial-gradient(520px 420px at 12% 100%, rgba(240,163,181,.22), transparent 65%), #0F0B1F; }
:root[data-theme="velvet"] .hero-title .accent{ color:#E3C27A; font-style:italic; font-weight:500; }
:root[data-theme="velvet"] .hero-lead{ color:#CDC4B8; }
:root[data-theme="velvet"] .hero-art{ filter:drop-shadow(0 30px 60px rgba(227,194,122,.35)); }
:root[data-theme="velvet"] .section-dark{ background:#0F0B1F; }
:root[data-theme="velvet"] .pub-footer{ background:#0A0716; }
:root[data-theme="velvet"] .eyebrow{ color:#F0A3B5; }
:root[data-theme="velvet"] .tab[aria-selected="true"]{ color:#F6E7C2; border-bottom-color:#E3C27A; }
:root[data-theme="velvet"] .avatar{ background:#2A2340; color:#F3E3BF; }
:root[data-theme="velvet"] .calendar-day-picker .selected{ background:#E3C27A; color:#1A1230; }
:root[data-theme="velvet"] .calendar-event{ filter:saturate(.85) brightness(.92); }
:root[data-theme="velvet"] .cw-cell{ border-color:#7B6FA8; }
:root[data-theme="velvet"] .block-img, :root[data-theme="velvet"] .mc-opt img{ background:#F2EDE4; }
:root[data-theme="velvet"] img.lv-emblem{ filter:none; }
:root[data-theme="velvet"] .modal-close:hover{ background:rgba(255,255,255,.08); }
:root[data-theme="velvet"] .room-shell{ background:#120D24; }
:root[data-theme="velvet"] .room-topbar, :root[data-theme="velvet"] .room-controls{ background:#0F0B1F; border-color:#2E2650; }
:root[data-theme="velvet"] .video-tile{ background:#1C1636; }
:root[data-theme="velvet"] .stage-chip.active{ background:#E3C27A; color:#1A1230; }
:root[data-theme="velvet"] .float-panel{ border-color:#463C72; }
:root[data-theme="velvet"] .float-panel-head{ background:#0F0B1F; border-bottom:1px solid #2E2650; }
:root[data-theme="velvet"] .block-note{ background:#2A2340; border-left-color:#E3C27A; }
:root[data-theme="velvet"] .test-banner{ background:#3A1F2E; color:#F6C9D4; border-color:#5C3047; }
:root[data-theme="velvet"] .stat-tile{ background:#1C1636; border-color:#2E2650; }

/* =====================================================================
   6. STUDIO — workspace: zinc grid paper, ink-black primary, electric blue, marker-yellow highlights, light navigation. IBM Plex Sans + Mono
   ===================================================================== */
:root[data-theme="studio"]{
  --font-display:'IBM Plex Sans','Segoe UI',sans-serif; --font-body:'IBM Plex Sans','Segoe UI',sans-serif; --font-mono:'IBM Plex Mono',Consolas,monospace;
  --ink:#18181B; --ink-soft:#3F3F46; --ink-faint:#52525B;
  --emerald-900:#111113; --emerald-800:#1F1F23; --emerald-700:#2563EB; --emerald-600:#1D4ED8; --emerald-500:#3B82F6; --emerald-100:#DBEAFE; --emerald-50:#EFF6FF;
  --gold-700:#854D0E; --gold-600:#CA8A04; --gold-500:#FACC15; --gold-300:#FDE68A; --gold-100:#FEF9C3;
  --parchment:#F4F4F5; --parchment-dim:#E4E4E7; --paper:#FFFFFF; --line:#E4E4E7; --line-strong:#D4D4D8; --field-border:#71717A;
  --focus-ring:#2563EB;
  --radius-s:8px; --radius-m:10px; --radius-l:14px;
  --shadow-card:0 1px 2px rgba(24,24,27,.05), 0 0 0 1px rgba(24,24,27,.03);
  --shadow-pop:0 24px 60px -20px rgba(24,24,27,.35), 0 0 0 1px rgba(24,24,27,.06);
}
:root[data-theme="studio"] body{ background-color:var(--parchment); background-image:linear-gradient(rgba(24,24,27,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(24,24,27,.045) 1px, transparent 1px); background-size:32px 32px; }
:root[data-theme="studio"] .h1, :root[data-theme="studio"] .h2, :root[data-theme="studio"] .h3, :root[data-theme="studio"] .display-1, :root[data-theme="studio"] .display-2, :root[data-theme="studio"] .tb-title{ font-weight:600; letter-spacing:-.025em; }
:root[data-theme="studio"] .eyebrow, :root[data-theme="studio"] .app-rail .rail-section-label, :root[data-theme="studio"] .pill, :root[data-theme="studio"] .badge-n, :root[data-theme="studio"] .table th, :root[data-theme="studio"] .stat-tile .label{ font-family:var(--font-mono); letter-spacing:.02em; }
:root[data-theme="studio"] .eyebrow{ text-transform:uppercase; letter-spacing:.12em; font-size:.7rem; font-weight:500; color:#2563EB; }
:root[data-theme="studio"] .btn{ border-radius:8px; font-weight:600; }
:root[data-theme="studio"] .btn-primary{ background:#18181B; }
:root[data-theme="studio"] .btn-primary:hover{ background:#2563EB; }
:root[data-theme="studio"] .btn-secondary{ border-color:#D4D4D8; color:#18181B; background:#fff; }
:root[data-theme="studio"] .btn-secondary:hover{ border-color:#18181B; background:#fff; }
:root[data-theme="studio"] .btn-secondary.selected{ background:#18181B; border-color:#18181B; color:#fff; }
:root[data-theme="studio"] .btn-gold{ background:#2563EB; }
:root[data-theme="studio"] .btn-gold:hover{ background:#1D4ED8; }
:root[data-theme="studio"] .btn-on-dark{ background:#FACC15; color:#18181B; }
:root[data-theme="studio"] .btn-on-dark:hover{ background:#FDE68A; }
:root[data-theme="studio"] .input{ border:1px solid #D4D4D8; background:#fff; }
:root[data-theme="studio"] .input:hover{ border-color:#A1A1AA; }
:root[data-theme="studio"] .input:focus{ border-color:#2563EB; box-shadow:0 0 0 3px rgba(37,99,235,.18); }
:root[data-theme="studio"] .pill{ border-radius:6px; font-weight:500; }
:root[data-theme="studio"] .notice{ border-radius:10px; }
:root[data-theme="studio"] .app-rail{ background:#FAFAFA; color:#18181B; border-right:1px solid #E4E4E7; }
:root[data-theme="studio"] .app-rail .rail-brand{ border-bottom-color:#E4E4E7; }
:root[data-theme="studio"] .app-rail .rail-brand .lv-word{ color:#18181B; }
:root[data-theme="studio"] .app-rail .rail-section-label{ color:#71717A; }
:root[data-theme="studio"] .rail-link{ color:#3F3F46; border-left:0; border-radius:8px; font-weight:600; }
:root[data-theme="studio"] .rail-link:hover{ background:#EFEFF1; color:#18181B; }
:root[data-theme="studio"] .rail-link.active{ background:#18181B; color:#fff; }
:root[data-theme="studio"] .rail-link.active svg{ opacity:1; }
:root[data-theme="studio"] .app-rail .rail-foot{ border-top-color:#E4E4E7; }
:root[data-theme="studio"] .app-rail .rail-foot, :root[data-theme="studio"] .app-rail .rail-foot *{ color:#18181B !important; }
:root[data-theme="studio"] .app-rail .rail-burger{ color:#18181B; }
:root[data-theme="studio"] .app-rail :focus-visible, :root[data-theme="studio"] .pub-header :focus-visible{ outline-color:#2563EB; }
:root[data-theme="studio"] .badge-n{ background:#FACC15; color:#18181B; }
:root[data-theme="studio"] .app-topbar{ background:rgba(250,250,250,.86); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-bottom-color:#E4E4E7; }
:root[data-theme="studio"] .pub-header{ background:rgba(250,250,250,.9); border-bottom:1px solid #E4E4E7; }
:root[data-theme="studio"] .pub-header .lv-word, :root[data-theme="studio"] .pub-nav a:not(.btn), :root[data-theme="studio"] .pub-burger{ color:#18181B; }
:root[data-theme="studio"] .pub-nav a:not(.btn):hover{ color:#2563EB; }
@media (max-width:1080px){ :root[data-theme="studio"] .pub-nav{ background:#FAFAFA; border-bottom-color:#E4E4E7; } :root[data-theme="studio"] .pub-nav a:not(.btn){ border-bottom-color:#E4E4E7; } }
:root[data-theme="studio"] .pub-header .lang-select.on-dark{ color:#3F3F46; }
:root[data-theme="studio"] .pub-header .lang-select.on-dark select{ background:#fff; border-color:#D4D4D8; }
:root[data-theme="studio"] .pub-header .lang-select.on-dark select:hover{ border-color:#18181B; }
:root[data-theme="studio"] .pub-header .btn-on-dark{ background:#18181B; color:#fff; }
:root[data-theme="studio"] .pub-header .btn-on-dark-ghost{ color:#18181B; border-color:#D4D4D8; }
:root[data-theme="studio"] .pub-header .btn-on-dark-ghost:hover{ background:#F4F4F5; }
:root[data-theme="studio"] .hero.section-dark{ background:#F4F4F5; color:#18181B; border-bottom:1px solid #E4E4E7; }
:root[data-theme="studio"] .hero::before{ content:''; position:absolute; inset:0; z-index:-1; pointer-events:none; background-image:linear-gradient(rgba(24,24,27,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(24,24,27,.07) 1px, transparent 1px); background-size:32px 32px; -webkit-mask-image:linear-gradient(180deg,#000 30%,transparent); mask-image:linear-gradient(180deg,#000 30%,transparent); }
:root[data-theme="studio"] .hero-title{ color:#18181B; font-weight:600; letter-spacing:-.035em; }
:root[data-theme="studio"] .hero-title .accent{ width:max-content; max-width:100%; color:#18181B; background:linear-gradient(180deg,transparent 60%,#FDE68A 60%,#FDE68A 92%,transparent 92%); }
:root[data-theme="studio"] .hero-lead{ color:#3F3F46; }
:root[data-theme="studio"] .hero .eyebrow{ color:#2563EB; }
:root[data-theme="studio"] .hero .btn-on-dark{ background:#18181B; color:#fff; }
:root[data-theme="studio"] .hero .btn-on-dark:hover{ background:#2563EB; }
:root[data-theme="studio"] .hero .btn-on-dark-ghost{ color:#18181B; border-color:#D4D4D8; background:#fff; }
:root[data-theme="studio"] .hero-art{ filter:drop-shadow(0 30px 50px rgba(24,24,27,.2)); }
:root[data-theme="studio"] .section-dark{ background:#18181B; }
:root[data-theme="studio"] .pub-footer{ background:#18181B; }
:root[data-theme="studio"] .tab[aria-selected="true"]{ color:#18181B; border-bottom-color:#18181B; }
:root[data-theme="studio"] .stat-tile{ border-color:#E4E4E7; }
:root[data-theme="studio"] .stat-tile .num{ color:#18181B; font-weight:600; }
:root[data-theme="studio"] .room-topbar, :root[data-theme="studio"] .room-controls{ background:#18181B; }
:root[data-theme="studio"] .video-tile{ background:#27272A; border-radius:10px; }
:root[data-theme="studio"] .stage-chip{ border-radius:6px; }
:root[data-theme="studio"] .stage-chip.active{ background:#FACC15; color:#18181B; }
:root[data-theme="studio"] .float-panel{ border:1px solid #E4E4E7; border-radius:12px; box-shadow:var(--shadow-pop); }
:root[data-theme="studio"] .float-panel-head{ background:#18181B; }
:root[data-theme="studio"] .modal{ border-radius:14px; border:1px solid #E4E4E7; }

/* =====================================================================
   7. TERRA — earth & craft: parchment grain, olive and terracotta, arch shapes. Lora + Mulish
   ===================================================================== */
:root[data-theme="terra"]{
  --font-display:'Lora',Georgia,serif; --font-body:'Mulish','Segoe UI',sans-serif;
  --ink:#2B2118; --ink-soft:#5B4D42; --ink-faint:#6F6156;
  --emerald-900:#26301B; --emerald-800:#3B4A2A; --emerald-700:#5B6B3A; --emerald-600:#4F5F31; --emerald-500:#7A8C4C; --emerald-100:#E8ECDC; --emerald-50:#F3F5EC;
  --gold-700:#8C3F25; --gold-600:#B5502F; --gold-500:#C7613F; --gold-300:#E3A086; --gold-100:#F6E3D9;
  --parchment:#F6F1E7; --parchment-dim:#EEE6D8; --paper:#FFFCF7; --line:#E6DCCB; --line-strong:#CDBFA6; --field-border:#8E7E6A;
  --focus-ring:#C7613F;
  --radius-s:10px; --radius-m:16px; --radius-l:24px;
  --shadow-card:0 1px 2px rgba(43,33,24,.05), 0 16px 32px -20px rgba(43,33,24,.28);
  --shadow-pop:0 30px 60px -20px rgba(43,33,24,.4);
}
:root[data-theme="terra"] body{ background:radial-gradient(45vw 40vh at 100% 0%, rgba(199,97,63,.12), transparent 60%), radial-gradient(40vw 40vh at 0% 100%, rgba(122,140,76,.14), transparent 60%), radial-gradient(rgba(43,33,24,.06) 1px, transparent 1.4px) 0 0/8px 8px, var(--parchment); }
:root[data-theme="terra"] .h1, :root[data-theme="terra"] .h2, :root[data-theme="terra"] .h3, :root[data-theme="terra"] .display-1, :root[data-theme="terra"] .display-2, :root[data-theme="terra"] .hero-title, :root[data-theme="terra"] .tb-title{ font-weight:700; letter-spacing:-.012em; }
:root[data-theme="terra"] .btn{ border-radius:12px; font-weight:700; }
:root[data-theme="terra"] .btn-primary{ background:#5B6B3A; }
:root[data-theme="terra"] .btn-primary:hover{ background:#4F5F31; }
:root[data-theme="terra"] .btn-gold{ background:#C7613F; }
:root[data-theme="terra"] .btn-gold:hover{ background:#B5502F; }
:root[data-theme="terra"] .btn-on-dark{ background:#E3A086; color:#26301B; }
:root[data-theme="terra"] .btn-on-dark:hover{ background:#F0BBA6; }
:root[data-theme="terra"] .btn-secondary{ border-color:#5B6B3A; color:#4F5F31; }
:root[data-theme="terra"] .btn-secondary:hover{ background:#F3F5EC; }
:root[data-theme="terra"] .card{ background:#FFFCF7; border-color:#E6DCCB; }
:root[data-theme="terra"] .card-next-lesson{ border-left-color:#C7613F; }
:root[data-theme="terra"] .input{ background:#FFFCF7; border-color:#CDBFA6; }
:root[data-theme="terra"] .input:focus{ border-color:#C7613F; box-shadow:0 0 0 4px rgba(199,97,63,.16); }
:root[data-theme="terra"] .notice{ border-radius:16px; }
:root[data-theme="terra"] .app-rail{ background:#26301B; }
:root[data-theme="terra"] .app-rail .rail-section-label{ color:#A9B58C; }
:root[data-theme="terra"] .rail-link{ color:#DDE2CF; border-left:0; border-radius:14px; }
:root[data-theme="terra"] .rail-link:hover{ background:rgba(255,255,255,.07); }
:root[data-theme="terra"] .rail-link.active{ background:#C7613F; color:#FFF4EC; }
:root[data-theme="terra"] .rail-link.active svg{ opacity:1; }
:root[data-theme="terra"] .badge-n{ background:#E3A086; color:#26301B; }
:root[data-theme="terra"] .rail-link.active .badge-n{ background:#FFF4EC; color:#8C3F25; }
:root[data-theme="terra"] .app-topbar{ background:rgba(246,241,231,.86); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-bottom-color:#E6DCCB; }
:root[data-theme="terra"] .pub-header{ background:rgba(38,48,27,.92); }
:root[data-theme="terra"] .hero.section-dark{ background:radial-gradient(640px 480px at 84% 40%, rgba(199,97,63,.42), transparent 65%), radial-gradient(540px 440px at 8% 100%, rgba(122,140,76,.45), transparent 65%), #26301B; }
:root[data-theme="terra"] .hero::before{ content:''; position:absolute; z-index:-1; right:-4%; top:-12%; width:34%; max-width:420px; aspect-ratio:1/1.35; border-radius:999px 999px 0 0; background:rgba(199,97,63,.16); border:1px solid rgba(227,160,134,.25); pointer-events:none; }
:root[data-theme="terra"] .hero-title .accent{ color:#E3A086; font-style:italic; font-weight:500; }
:root[data-theme="terra"] .hero-lead{ color:#DDE2CF; }
:root[data-theme="terra"] .hero-art{ background:#F6F1E7; border-radius:999px 999px 28px 28px; padding:10%; box-shadow:0 30px 60px -24px rgba(0,0,0,.55), inset 0 -10px 30px rgba(199,97,63,.12); }
:root[data-theme="terra"] .section-dark{ background:#26301B; }
:root[data-theme="terra"] .pub-footer{ background:#1D2514; }
:root[data-theme="terra"] .tab[aria-selected="true"]{ color:#3B4A2A; border-bottom-color:#C7613F; }
:root[data-theme="terra"] .stat-tile{ border-color:#E6DCCB; box-shadow:var(--shadow-card); }
:root[data-theme="terra"] .room-topbar, :root[data-theme="terra"] .room-controls{ background:#26301B; }
:root[data-theme="terra"] .video-tile{ background:#3B4A2A; border-radius:18px; }
:root[data-theme="terra"] .stage-chip.active{ background:#C7613F; color:#fff; }
:root[data-theme="terra"] .float-panel{ border-radius:20px; }
:root[data-theme="terra"] .float-panel-head{ background:#26301B; }
:root[data-theme="terra"] .modal{ border-radius:24px; }

/* shared: logo word in the 2026-10 designs */
:root[data-theme="ocean"] .lv-word{ font-family:'Sofia Sans',sans-serif; font-weight:800; letter-spacing:-.02em; }
:root[data-theme="sunrise"] .lv-word{ font-family:'Rubik',sans-serif; font-weight:800; letter-spacing:-.01em; }
:root[data-theme="velvet"] .lv-word{ font-family:'Cormorant Garamond',Georgia,serif; font-weight:700; font-size:1.25em; letter-spacing:.01em; }
:root[data-theme="studio"] .lv-word{ font-family:'IBM Plex Sans',sans-serif; font-weight:600; letter-spacing:-.03em; }
:root[data-theme="terra"] .lv-word{ font-family:'Lora',Georgia,serif; font-weight:700; letter-spacing:0; }

/* toasts and corner pop-ups follow the design (Classic keeps its green and red toasts): the design's dark surface with the
   status in a round chip, errors tinted red. Aurora: dark glass toasts with a soft glow, light glass pop-ups. */
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]){ --toast-bg:var(--emerald-900); }
:root[data-theme="velvet"]{ --toast-bg:#2A2340; } /* on the dark page a raised surface, not the page colour */
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast{ background:var(--toast-bg); color:#fff; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast.bad{ background:linear-gradient(rgba(194,38,58,.38),rgba(194,38,58,.38)) var(--toast-bg); }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast > span:first-child{ flex:none; width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:800; line-height:1; background:var(--gold-300); color:#1D1A2E; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast.good > span:first-child{ background:#A7F3D0; color:#064E3B; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast.bad > span:first-child{ background:#FECACA; color:#7F1D1D; }
/* "ℹ" can turn into a blue emoji square on phones: a plain letter in the chip */
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast.info > span:first-child{ font-size:0; }
:root:is([data-theme="aurora"],[data-theme="clay"],[data-theme="ocean"],[data-theme="sunrise"],[data-theme="velvet"],[data-theme="studio"],[data-theme="terra"]) .toast.info > span:first-child::before{ content:'i'; font-size:.8rem; }
:root[data-theme="aurora"] .toast{ background:radial-gradient(120% 180% at 0% 0%, rgba(143,102,247,.45), transparent 62%), linear-gradient(135deg,rgba(36,32,106,.96),rgba(22,20,58,.96)); border:1px solid rgba(255,255,255,.14); backdrop-filter:blur(16px) saturate(1.4); -webkit-backdrop-filter:blur(16px) saturate(1.4); }
:root[data-theme="aurora"] .toast.good{ background:radial-gradient(120% 180% at 0% 0%, rgba(45,212,191,.34), transparent 62%), linear-gradient(135deg,rgba(36,32,106,.96),rgba(22,20,58,.96)); }
:root[data-theme="aurora"] .toast.bad{ background:radial-gradient(120% 180% at 0% 0%, rgba(244,63,94,.5), transparent 65%), linear-gradient(135deg,rgba(62,24,82,.96),rgba(40,18,60,.96)); border-color:rgba(251,113,133,.45); }
:root[data-theme="aurora"] .toast.good > span:first-child{ background:linear-gradient(135deg,#6EE7B7,#7DE6F5); color:#0B3B3F; }
:root[data-theme="aurora"] .toast.info > span:first-child{ background:linear-gradient(135deg,#C4B5FD,#7DE6F5); color:#1C1A47; }
:root[data-theme="aurora"] .toast.bad > span:first-child{ background:linear-gradient(135deg,#FDA4AF,#FB7185); color:#4C0519; }
:root[data-theme="aurora"] .corner-card{ background:rgba(255,255,255,.9); border-color:rgba(255,255,255,.9); backdrop-filter:blur(18px) saturate(1.4); -webkit-backdrop-filter:blur(18px) saturate(1.4); }
:root[data-theme="aurora"] .corner-telegram{ border-left-color:#2AABEE; }
:root[data-theme="aurora"] .corner-icon{ background:linear-gradient(135deg,#8F66F7,#14B8D6); color:#fff; box-shadow:0 8px 16px -8px rgba(109,59,234,.8); }

/* 15-podcast.css */
/* The school's podcast (web/src/pages/podcast.js): the show in a hero like the home page, then its rubrics ("how to
   listen" beside the episodes), a page per episode, the way to a trial lesson; the admin screen of the publication
   schedule (web/src/pages/admin-podcast.js). Only theme tokens are used, so the pages follow the school's design. */
.podcast-hero-grid{ display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,.65fr); align-items:center; gap:var(--space-10); padding-block:var(--space-16); }
.podcast-hero .hero-title{ margin-bottom:var(--space-4); }
.podcast-hero .hero-lead{ margin-bottom:var(--space-6); }
.podcast-hero-art{ justify-self:center; width:min(100%, 300px); aspect-ratio:1; }
.podcast-hero-art img{ display:block; width:100%; height:100%; border-radius:var(--radius-l); box-shadow:0 30px 60px -24px rgba(0,0,0,.6); }
.podcast-listen{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:var(--space-6); }
.podcast-listen-label{ font-size:.82rem; font-weight:700; color:var(--ink-soft); margin-right:4px; }
.podcast-app{ display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:6px 14px; border-radius:var(--radius-pill); border:1px solid var(--line-strong); background:var(--paper);
  color:var(--ink); font:inherit; font-size:.85rem; font-weight:700; text-decoration:none; cursor:pointer; }
.podcast-app:hover{ border-color:var(--emerald-700); color:var(--emerald-700); }
.podcast-listen.on-dark .podcast-listen-label{ color:#C9CBE6; }
.podcast-listen.on-dark .podcast-app{ border-color:rgba(255,255,255,.28); background:rgba(255,255,255,.08); color:#fff; }
.podcast-listen.on-dark .podcast-app:hover{ background:rgba(255,255,255,.16); }
.podcast-facts{ display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; }
.podcast-facts li{ font-size:.82rem; font-weight:600; padding:5px 12px; border-radius:var(--radius-pill); border:1px solid var(--line); color:var(--ink-soft); background:var(--paper); }
.podcast-section{ background:var(--parchment); padding-block:var(--space-12) var(--space-16); }
.podcast-rubrics{ display:grid; gap:var(--space-16); }
.podcast-nav{ display:flex; flex-wrap:wrap; gap:8px; }
.podcast-nav a{ font-size:.9rem; font-weight:700; padding:7px 14px; border-radius:var(--radius-pill); border:1px solid var(--line); color:var(--ink); background:var(--paper); text-decoration:none; }
.podcast-nav a:hover{ border-color:var(--line-strong); color:var(--emerald-700); }
.podcast-rubric-head{ display:grid; gap:var(--space-3); max-width:72ch; margin-bottom:var(--space-8); }
.podcast-rubric-head > *{ margin:0; }
.podcast-layout{ display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr); gap:var(--space-8); align-items:start; }
.podcast-layout.wide{ grid-template-columns:minmax(0,1fr); }
.podcast-how{ position:sticky; top:96px; }
.podcast-how ol{ margin:var(--space-3) 0 0; padding-left:1.2rem; display:grid; gap:var(--space-2); font-size:.92rem; line-height:1.55; color:var(--ink-soft); }
.podcast-episodes{ display:grid; gap:var(--space-6); min-width:0; }
.podcast-ep{ display:grid; gap:var(--space-4); padding:var(--space-6); min-width:0; }
.podcast-ep > *{ min-width:0; margin:0; }
.podcast-ep-head{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.podcast-dur{ margin-left:auto; display:inline-flex; align-items:center; gap:6px; font-size:.85rem; color:var(--ink-faint); }
.podcast-dot{ margin-inline:2px; }
.podcast-ep-title a{ color:inherit; text-decoration:none; }
.podcast-ep-title a:hover{ color:var(--emerald-700); text-decoration:underline; text-underline-offset:4px; }
.podcast-about{ max-width:65ch; }
.podcast-ep audio{ display:block; width:100%; }
.podcast-controls{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.podcast-resume{ margin-left:auto; }
.podcast-open{ justify-self:start; }
.podcast-more{ justify-self:center; }
.podcast-label{ margin:0 0 var(--space-2); }
.podcast-chapters{ list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.podcast-chapters li{ border-bottom:1px solid var(--line); }
.podcast-chapters button{ display:grid; grid-template-columns:3.6rem 1fr; gap:12px; width:100%; padding:9px 8px; border:0; border-radius:8px; background:none; color:var(--ink); font:inherit; font-size:.95rem; text-align:left; cursor:pointer; }
.podcast-chapters button:hover{ background:var(--parchment-dim); }
.podcast-chapters button[aria-current="true"]{ background:var(--emerald-50); box-shadow:inset 3px 0 0 var(--emerald-700); font-weight:700; }
.podcast-chapters time, .podcast-line time{ color:var(--ink-faint); font-size:.85rem; }
.podcast-chapters button[aria-current="true"] time{ color:var(--emerald-700); }
.podcast-script{ border-top:1px solid var(--line); padding-top:var(--space-4); }
.podcast-script h2{ margin:0; }
.podcast-lines{ margin-top:var(--space-3); display:grid; gap:2px; max-height:65vh; overflow-y:auto; padding-right:4px; }
.podcast-script-chapter{ margin:var(--space-4) 0 var(--space-1); font-family:var(--font-display); font-size:1rem; }
.podcast-line{ display:grid; grid-template-columns:3.2rem 1fr; gap:10px; padding:6px 8px; border:0; border-radius:8px; background:none; color:var(--ink); font:inherit; font-size:.95rem; line-height:1.55; text-align:left; cursor:pointer; }
.podcast-line:hover{ background:var(--parchment-dim); }
.podcast-line.now{ background:var(--emerald-50); box-shadow:inset 3px 0 0 var(--emerald-700); }
.podcast-line.replay{ color:var(--ink-soft); }
.podcast-notes{ display:grid; gap:6px; max-width:70ch; }
.podcast-notes p{ margin:0; }
.podcast-cta{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:var(--space-6); margin-top:var(--space-12); }
.podcast-cta p{ margin:0; }
.podcast-cta .h2{ margin:var(--space-1) 0 var(--space-2); }
.podcast-cta .body-text{ max-width:62ch; }
.podcast-intro{ display:grid; gap:var(--space-3); margin-bottom:var(--space-6); }
.podcast-intro > *{ margin:0; }
.podcast-intro .podcast-listen{ margin-top:var(--space-1); }
/* one episode */
.podcast-episode{ display:grid; gap:var(--space-6); max-width:880px; margin-inline:auto; }
.podcast-episode .podcast-cta{ margin-top:0; }
.podcast-episode .podcast-listen{ margin-top:0; }
.podcast-crumbs{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--ink-faint); }
.podcast-crumbs a{ color:var(--emerald-700); font-weight:700; text-decoration:none; }
.podcast-crumbs a:hover{ text-decoration:underline; }
.podcast-ep-full .h1{ overflow-wrap:anywhere; }
.podcast-pager{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); }
.podcast-pager-link{ display:grid; gap:4px; text-decoration:none; color:var(--ink); }
.podcast-pager-link:hover b{ color:var(--emerald-700); }
.podcast-pager-link.next{ text-align:right; grid-column:2; }
/* admin */
.podcast-admin-notices{ margin-bottom:var(--space-5); }
.podcast-admin-notices:empty{ display:none; }
.podcast-admin-rubric{ display:grid; gap:var(--space-5); margin-bottom:var(--space-6); }
.podcast-admin-rubric .h2, .podcast-admin-rubric .eyebrow, .podcast-admin-rubric .caption{ margin:0; }
.podcast-schedule{ display:grid; gap:var(--space-3); padding:var(--space-4); border:1px solid var(--line); border-radius:var(--radius-m); background:var(--parchment); }
.podcast-schedule .h4{ margin:0; }
.podcast-schedule .seg{ justify-self:start; }
.podcast-presets{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.podcast-every{ display:inline-flex; align-items:center; gap:8px; margin-left:var(--space-2); }
.podcast-every .input{ width:5.5rem; }
.podcast-days{ display:flex; flex-wrap:wrap; gap:6px 16px; }
.podcast-schedule-fields{ gap:0 var(--space-4); }
.podcast-schedule-foot p{ margin:0; max-width:60ch; }
.podcast-queue td{ vertical-align:top; }
.podcast-queue-actions{ white-space:nowrap; text-align:right; }
.podcast-warn{ display:flex; align-items:center; gap:4px; color:var(--bad); font-weight:700; margin-top:2px; }
.podcast-admin-grid{ align-items:start; gap:var(--space-6); }
.podcast-feed-card, .podcast-show-card{ display:grid; gap:var(--space-3); }
.podcast-feed-card > *, .podcast-show-card > *{ margin:0; }
.podcast-feed-card .btn, .podcast-show-card .btn{ justify-self:start; }
.podcast-feed-url{ display:flex; gap:8px; align-items:center; }
.podcast-feed-url .input{ flex:1; min-width:0; font-family:ui-monospace, SFMono-Regular, Consolas, monospace; font-size:.85rem; }
.podcast-feed-url .btn{ flex:none; }
.podcast-checks{ list-style:none; margin:0; padding:0; display:grid; gap:6px; font-size:.9rem; }
.podcast-checks li{ display:flex; align-items:flex-start; gap:8px; }
.podcast-checks li.ok svg{ color:var(--emerald-700); flex:none; margin-top:2px; }
.podcast-checks li.warn svg{ color:var(--bad); flex:none; margin-top:2px; }
.podcast-directories{ margin:0; padding-left:1.2rem; display:grid; gap:var(--space-2); line-height:1.5; }
.podcast-cover-row{ display:flex; align-items:center; gap:var(--space-4); }
.podcast-cover-row img{ border-radius:var(--radius-m); flex:none; }
.podcast-cover-row p{ margin:0; }
@media (max-width:900px){
  .podcast-hero-grid{ grid-template-columns:1fr; padding-block:var(--space-10) var(--space-12); }
  .podcast-hero-art{ display:none; }
  .podcast-layout{ grid-template-columns:1fr; }
  .podcast-how{ position:static; }
  .podcast-cta{ grid-template-columns:1fr; }
  .podcast-cta .btn{ justify-self:start; }
  .podcast-admin-grid{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  .podcast-ep{ padding:var(--space-4); }
  .podcast-section{ padding-block:var(--space-8) var(--space-12); }
  .podcast-rubrics{ gap:var(--space-12); }
  .podcast-pager{ grid-template-columns:1fr; }
  .podcast-pager-link.next{ grid-column:auto; text-align:left; }
  .podcast-cta .btn{ justify-self:stretch; }
  .podcast-feed-url{ flex-wrap:wrap; }
  .podcast-schedule-fields{ grid-template-columns:1fr; }
  /* the three schedule modes stacked instead of a pill that wraps */
  .podcast-schedule .seg{ display:grid; justify-self:stretch; border-radius:var(--radius-m); }
  .podcast-schedule .seg button + button{ border-left:0; border-top:1px solid var(--line); }
}

/* 16-teachers.css */
/* ============================================================
   Independent teachers (2026-10-14): the page for teachers /teach (pages/teach.js), its teaser on the home page, and the
   teacher's own practice in the cabinet (pages/practice.js: start checklist, invitations, balances).
   Built on the public sections and the cabinet components, so every school design applies.
   ============================================================ */

/* ---------- /teach ---------- */
.room-mock.teach-mock{ justify-self:center; width:min(100%, 380px); padding:18px; }
.teach-mock-row{ padding:8px 10px; border-radius:10px; background:rgba(255,255,255,.06); }
.mock-avatar{ display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%;
  background:var(--gold-300); color:var(--emerald-900); font-weight:800; font-size:.78rem; }
.teach-mock-row .small{ color:#EFEAD9; }
.mock-balance{ color:#EFEAD9; min-width:1.6em; text-align:right; }
.mock-balance.is-low{ color:var(--gold-300); }
.mock-balance.is-out{ color:#FF9C8A; }
.teach-mock-next{ display:flex; align-items:center; gap:8px; margin-top:12px; padding:10px 12px; border-radius:10px;
  background:var(--gold-500); color:var(--emerald-900); font-weight:700; }
.teach-mock-next .small{ color:inherit; }
:root[data-theme="aurora"] .teach-mock-row .small, :root[data-theme="aurora"] .mock-balance{ color:#EDEBFF; }
:root[data-theme="aurora"] .mock-balance.is-low{ color:#7DE6F5; }
:root[data-theme="aurora"] .teach-mock-next{ background:#7DE6F5; color:#1C1A47; }
@media (max-width:860px){ .teach-hero .room-mock.teach-mock{ order:2; } }

.teach-numbers{ max-width:44em; margin:calc(-1 * var(--space-4)) 0 var(--space-8); }
/* two classes: web/build.mjs puts 03-app.css (with .benefits) after this file */
.benefits.teach-features{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
@media (max-width:1000px){ .benefits.teach-features{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:560px){ .benefits.teach-features{ grid-template-columns:1fr; } }
/* the sixth header item only in the phone menu (pages/public.js NAV) */
@media (min-width:1081px){ .pub-nav .pub-nav-menu-only{ display:none; } }
.teach-steps{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:var(--space-5); }
.teach-steps li{ display:flex; flex-direction:column; gap:8px; }
.teach-steps .step-n{ border-color:var(--emerald-700); color:var(--emerald-700); }
.teach-steps h3, .teach-steps p{ margin:0; }
.teach-promises{ list-style:none; margin:0 0 var(--space-5); padding:0; display:flex; flex-direction:column; gap:12px; }
.teach-promises li{ display:flex; gap:10px; align-items:flex-start; color:#D3DED7; }
.teach-promises li svg{ flex:none; margin-top:2px; color:var(--gold-300); }
:root[data-theme="aurora"] .teach-promises li{ color:#DCD8FF; }

/* teaser on the home page */
.teach-teaser{ background:var(--parchment); }
.teach-teaser-grid{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--space-8); align-items:center; }
.teach-teaser-grid .body-text{ max-width:40em; margin:0; }
.teach-teaser-cta{ display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.teach-teaser-cta .btn{ white-space:nowrap; }
@media (max-width:860px){ .teach-teaser-grid{ grid-template-columns:1fr; gap:var(--space-5); } .teach-teaser-cta .btn{ white-space:normal; } }

/* ---------- the practice in the cabinet ---------- */
.start-steps{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:var(--space-3) var(--space-5); }
.start-steps li{ display:flex; gap:12px; align-items:flex-start; }
.start-steps .h4{ margin:0 0 2px; }
.start-steps p{ margin:0; }
.start-mark{ flex:none; width:24px; height:24px; margin-top:2px; border-radius:50%; border:2px solid var(--line-strong);
  display:inline-flex; align-items:center; justify-content:center; color:#fff; }
.start-steps li.is-done .start-mark{ background:var(--good, #1F8A5B); border-color:var(--good, #1F8A5B); }
.start-steps li.is-done .h4, .start-steps li.is-done p{ color:var(--ink-faint); }
.invite-link .input{ font-size:.85rem; }
.bulk-bad{ margin:4px 0 0; padding-left:18px; color:var(--bad, #B42318); }
.teacher-about{ margin-top:4px; max-width:34em; white-space:pre-wrap; }
.teachers-table td{ vertical-align:top; }
.teachers-table .nowrap{ white-space:nowrap; }
.students-actions{ margin-left:auto; }
.reason-chips{ margin-top:8px; }
.chip-btn{ border:1px solid var(--line-strong); background:var(--paper); color:var(--ink-soft); border-radius:999px; padding:4px 12px;
  font:inherit; font-size:.8rem; cursor:pointer; }
.chip-btn:hover{ border-color:var(--emerald-600); color:var(--ink); }
.chip-btn:focus-visible{ outline:2.5px solid var(--focus-ring); outline-offset:2px; }
.link-btn{ border:0; background:none; padding:0; font:inherit; color:var(--emerald-700); text-decoration:underline; cursor:pointer; }
.text-bad{ color:var(--bad, #B42318); }

/* paid access of a practice (components/practice-access.js) */
.practice-access-banner{ padding:var(--space-3) var(--space-6) 0; }
@media (max-width:760px){ .practice-access-banner{ padding:var(--space-3) var(--space-4) 0; } }
.practice-access-line{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:0 0 var(--space-4); color:var(--ink-soft); }

/* platform news and quick tickets (pages/platform.js) */
.news-card{ margin-top:var(--space-6); }
.news-row{ display:flex; flex-direction:column; gap:2px; }
.news-row:hover b{ text-decoration:underline; }
.news-item .news-title{ margin:4px 0 var(--space-3); }
.news-item .legal-text p:last-child{ margin-bottom:0; }
.news-preview{ margin-top:var(--space-3); background:var(--parchment); }
.ticket{ display:flex; flex-direction:column; gap:6px; }
.ticket-title{ overflow-wrap:anywhere; }
.ticket-body{ margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.ticket-reply{ border-left:3px solid var(--emerald-600); background:var(--parchment); border-radius:0 8px 8px 0; padding:8px 12px; }
.ticket-answer{ display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:8px; align-items:start; margin-top:4px; }
@media (max-width:640px){ .ticket-answer{ grid-template-columns:1fr; } }

/* moving a teacher's materials to the platform (pages/transfer.js, pages/teach.js) */
.transfer-where{ margin:0 0 var(--space-4); padding-left:1.2em; display:grid; gap:4px; }
.transfer-drop{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center;
  padding:var(--space-5) var(--space-4); border:2px dashed var(--line-strong); border-radius:12px; cursor:pointer; color:var(--ink-soft); }
.transfer-drop:hover, .transfer-drop.is-over{ border-color:var(--emerald-600); background:var(--parchment); color:var(--ink); }
.transfer-drop:focus-within{ outline:2px solid var(--emerald-600); outline-offset:2px; }
.transfer-files{ list-style:none; margin:var(--space-3) 0; padding:0; display:grid; gap:8px; }
.transfer-file{ display:grid; grid-template-columns:auto minmax(0, 1fr) auto auto; gap:4px 8px; align-items:center; }
.transfer-file-name{ overflow-wrap:anywhere; }
.transfer-file .error-text{ grid-column:2 / -1; }
.transfer-bar{ grid-column:2 / -1; height:4px; border-radius:2px; background:var(--line); overflow:hidden; }
.transfer-bar span{ display:block; height:100%; background:var(--emerald-600); transition:width .2s; }
.teach-transfer{ display:grid; grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr); gap:var(--space-6); align-items:start; }
.teach-transfer .transfer-where{ margin:0; }
@media (max-width:860px){ .teach-transfer{ grid-template-columns:1fr; } }

/* 17-home.css */
/* Home page, livelier (Alina, 18.10: "the icons more voluminous and colourful, the advantages as separate blocks with a
   fill, the hero has no effect, add holiday atmosphere"). Pictures: web/public/art (3D icons of Microsoft Fluent Emoji,
   MIT). 03-app.css comes after this file in the bundle, so these rules are one step more specific. */

/* section heads: the eyebrow as a coloured badge, a short gradient bar under the title */
.public .pub-section .eyebrow:not(.on-dark){ display:inline-flex; align-items:center; padding:6px 13px; border-radius:999px; color:#fff;
  background:linear-gradient(135deg,var(--emerald-700),var(--gold-600)); box-shadow:0 10px 22px -12px var(--emerald-700); letter-spacing:.1em; }
.public .section-title{ position:relative; border-bottom:0; padding-bottom:16px; }
.public .section-title::after{ content:''; position:absolute; left:0; bottom:0; width:104px; height:5px; border-radius:99px;
  background:linear-gradient(90deg,var(--emerald-700),var(--gold-500)); }

/* the advantages: separate cards, each with its own soft colour, a 3D icon on a white tile */
#pub-benefits .benefits{ grid-template-columns:repeat(auto-fit, minmax(205px, 1fr)); gap:var(--space-5); }
#pub-benefits .benefit{ --tint:#ECE5FF; --tint2:#F8F5FF; position:relative; padding:22px 20px 24px; border-radius:var(--radius-l);
  background:linear-gradient(160deg,var(--tint),var(--tint2)); border:1px solid rgba(255,255,255,.9);
  box-shadow:0 1px 1px rgba(40,30,110,.05), 0 18px 36px -24px rgba(60,40,160,.5); transition:transform .25s ease, box-shadow .25s ease; }
#pub-benefits .benefit:nth-child(2){ --tint:#D9F6EE; --tint2:#F1FCF8; }
#pub-benefits .benefit:nth-child(3){ --tint:#FFEFCC; --tint2:#FFF9EA; }
#pub-benefits .benefit:nth-child(4){ --tint:#D9ECFF; --tint2:#F0F7FF; }
#pub-benefits .benefit:nth-child(5){ --tint:#FFDDEE; --tint2:#FFF2F8; }
#pub-benefits .benefit:hover{ transform:translateY(-5px); box-shadow:0 1px 1px rgba(40,30,110,.05), 0 26px 44px -24px rgba(60,40,160,.6); }
#pub-benefits .benefit-icon{ width:78px; height:78px; border-radius:24px; background:#fff; box-shadow:0 12px 22px -14px rgba(40,30,110,.55); }
#pub-benefits .benefit-icon img, #pub-directions .dir-icon img{ width:60px; height:60px; transition:transform .35s cubic-bezier(.3,1.6,.5,1); }
#pub-benefits .benefit:hover .benefit-icon img, #pub-directions .dir-card:hover .dir-icon img{ transform:scale(1.1) rotate(-6deg); }
#pub-benefits .benefit h3{ margin:16px 0 6px; font-weight:800; }
#pub-benefits .benefit p{ color:var(--ink-soft); }
:root[data-theme="velvet"] #pub-benefits .benefit{ --tint:rgba(255,255,255,.07); --tint2:rgba(255,255,255,.02); border-color:#2E2650; }
:root[data-theme="velvet"] #pub-benefits .benefit-icon{ background:#2A2340; }

/* the directions: a colour accent per card, the icon on a soft round spot */
#pub-directions .dir-card{ --accent:#8F66F7; position:relative; overflow:hidden; border-top:4px solid var(--accent); transition:transform .25s ease, box-shadow .25s ease; }
#pub-directions .dir-card:nth-child(2){ --accent:#F59E0B; }
#pub-directions .dir-card:nth-child(3){ --accent:#14B8D6; }
#pub-directions .dir-card:nth-child(4){ --accent:#EC4899; }
#pub-directions .dir-card:hover{ transform:translateY(-5px); }
#pub-directions .dir-icon{ display:inline-flex; align-items:center; justify-content:center; width:76px; height:76px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--accent) 22%, #fff)); background-color:#F3EEFF; }

/* how lessons go: numbered steps as glowing badges, a livelier room sketch */
.public .step-n{ width:36px; height:36px; border:0; color:#fff; font-size:.95rem;
  background:linear-gradient(135deg,var(--emerald-700),var(--gold-500)); box-shadow:0 0 0 4px rgba(255,255,255,.08), 0 10px 20px -8px var(--emerald-700); }
:root[data-theme="aurora"] .public .mock-chip:nth-child(1){ background:rgba(185,162,255,.28); }
:root[data-theme="aurora"] .public .mock-chip:nth-child(2){ background:rgba(244,114,182,.26); }
.public .room-mock{ position:relative; }
.public .room-mock .mock-spark{ position:absolute; right:-18px; top:-22px; width:56px; height:56px; filter:drop-shadow(0 10px 14px rgba(0,0,0,.35)); }

/* hero: 3D things around the emblem that float and follow the cursor at their own depth */
.hero-floats{ position:absolute; inset:0; pointer-events:none; }
.hero-float{ position:absolute; width:clamp(54px, 6.6vw, 92px); height:auto; filter:drop-shadow(0 14px 18px rgba(0,0,0,.35));
  translate:calc(var(--mx, 0) * var(--depth, 16px)) calc(var(--my, 0) * var(--depth, 16px)); transition:translate .6s ease-out; }
.hero-float.hf1{ left:-14%; top:8%; --depth:24px; }
.hero-float.hf2{ right:-10%; top:-4%; --depth:-18px; }
.hero-float.hf3{ right:-16%; bottom:34%; --depth:28px; }
.hero-float.hf4{ right:2%; bottom:-12%; --depth:-14px; }
@media (prefers-reduced-motion:no-preference){
  .hero-float{ animation:hero-bob 6.5s ease-in-out infinite; }
  .hero-float.hf2{ animation-duration:7.5s; animation-delay:-2s; }
  .hero-float.hf3{ animation-duration:8s; animation-delay:-4s; }
  .hero-float.hf4{ animation-duration:7s; animation-delay:-1s; }
  .hero-emblem{ animation:hero-breathe 7s ease-in-out infinite; }
}
@keyframes hero-bob{ 0%,100%{ transform:translateY(0) rotate(-5deg); } 50%{ transform:translateY(-16px) rotate(5deg); } }
@keyframes hero-breathe{ 0%,100%{ scale:1; } 50%{ scale:1.025; } }
/* the hero's colours drift slowly */
.hero > .container{ position:relative; z-index:1; }
:root[data-theme="aurora"] .hero::before{ content:''; position:absolute; inset:-20%; z-index:0; pointer-events:none;
  background:radial-gradient(38% 42% at 30% 40%, rgba(143,102,247,.38), transparent 70%), radial-gradient(30% 36% at 75% 70%, rgba(20,184,214,.3), transparent 70%); }
@media (prefers-reduced-motion:no-preference){ :root[data-theme="aurora"] .hero::before{ animation:hero-drift 18s ease-in-out infinite alternate; } }
@keyframes hero-drift{ from{ transform:translate(-4%, -3%) rotate(0deg); } to{ transform:translate(5%, 4%) rotate(8deg); } }

/* the holiday greeting above the title */
.season-badge{ display:inline-flex; align-items:center; gap:8px; margin:0 0 var(--space-3); padding:6px 14px 6px 8px; border-radius:999px;
  font-weight:800; font-size:.9rem; color:#fff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); backdrop-filter:blur(6px); }
.season-badge-icon{ width:28px; height:28px; }
.hero.is-halloween .season-badge{ background:linear-gradient(135deg,rgba(255,140,40,.45),rgba(143,102,247,.35)); }
.hero.is-winter .season-badge{ background:linear-gradient(135deg,rgba(239,68,68,.4),rgba(20,184,214,.35)); }

/* the holiday layer: behind the content, never catches the pointer */
.season-sky{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.hero.is-halloween::after{ content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(420px 360px at 76% 56%, rgba(255,140,40,.32), transparent 70%), radial-gradient(260px 200px at 12% 90%, rgba(255,110,30,.2), transparent 70%); }
.sky-web{ position:absolute; right:-8px; top:-8px; width:clamp(110px, 13vw, 190px); height:auto; opacity:.5; transform-origin:top right; }
.sky-bat{ position:absolute; left:-70px; width:52px; height:auto; opacity:.92; filter:drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.sky-bat.b1{ top:12%; }
.sky-bat.b2{ top:30%; width:38px; }
.sky-bat.b3{ top:6%; width:30px; }
.sky-leaf{ position:absolute; top:-50px; width:30px; height:auto; opacity:.85; }
.sky-leaf.l1{ left:2%; } .sky-leaf.l2{ left:52%; } .sky-leaf.l3{ left:60%; } .sky-leaf.l4{ left:70%; } .sky-leaf.l5{ left:84%; } .sky-leaf.l6{ left:95%; }
@media (prefers-reduced-motion:no-preference){
  .sky-web{ animation:web-sway 6s ease-in-out infinite; }
  .sky-bat{ animation:bat-fly 17s linear infinite; }
  .sky-bat.b2{ animation-duration:23s; animation-delay:-9s; }
  .sky-bat.b3{ animation-duration:20s; animation-delay:-15s; }
  .sky-leaf{ animation:leaf-fall 14s linear infinite; }
  .sky-leaf.l2{ animation-duration:17s; animation-delay:-6s; } .sky-leaf.l3{ animation-duration:12s; animation-delay:-3s; }
  .sky-leaf.l4{ animation-duration:16s; animation-delay:-10s; } .sky-leaf.l5{ animation-duration:13s; animation-delay:-8s; }
  .sky-leaf.l6{ animation-duration:18s; animation-delay:-12s; }
}
@keyframes web-sway{ 0%,100%{ transform:rotate(0deg); } 50%{ transform:rotate(-4deg); } }
@keyframes bat-fly{ 0%{ transform:translate(0, 0) rotate(-8deg); } 25%{ transform:translate(32vw, -26px) rotate(8deg); }
  50%{ transform:translate(62vw, 14px) rotate(-8deg); } 75%{ transform:translate(92vw, -18px) rotate(8deg); } 100%{ transform:translate(118vw, 0) rotate(-8deg); } }
@keyframes leaf-fall{ 0%{ transform:translate(0, 0) rotate(0deg); } 50%{ transform:translate(46px, 380px) rotate(170deg); } 100%{ transform:translate(-24px, 820px) rotate(340deg); } }
/* winter: a garland and snow */
.sky-lights{ position:absolute; left:0; right:0; top:0; height:34px; display:flex; justify-content:space-around; align-items:flex-start; }
.sky-lights::before{ content:''; position:absolute; left:0; right:0; top:4px; height:14px; border-bottom:2px solid rgba(255,255,255,.25); border-radius:0 0 50% 50% / 0 0 100% 100%; }
.sky-lights i{ position:relative; top:12px; width:10px; height:15px; border-radius:50% 50% 45% 45%; color:hsl(calc(var(--i) * 53) 95% 64%);
  background:currentColor; box-shadow:0 0 14px 2px currentColor; }
.sky-snow{ position:absolute; top:-14px; width:var(--size); height:var(--size); border-radius:50%; background:#fff; opacity:.85; box-shadow:0 0 8px rgba(255,255,255,.8); }
.sky-flake{ position:absolute; width:52px; height:auto; opacity:.8; }
.sky-flake.f1{ left:46%; top:12%; } .sky-flake.f2{ left:8%; top:62%; width:40px; }
@media (prefers-reduced-motion:no-preference){
  .sky-lights i{ animation:twinkle 1.8s ease-in-out infinite; animation-delay:calc(var(--i) * -.29s); }
  .sky-snow{ animation:snow-fall var(--d) linear infinite; animation-delay:var(--delay); }
  .sky-flake{ animation:flake-spin 14s linear infinite; }
}
@keyframes twinkle{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }
@keyframes snow-fall{ to{ transform:translate(34px, 820px); } }
@keyframes flake-spin{ to{ transform:rotate(360deg); } }
@media (max-width:860px){
  .hero-float{ width:clamp(44px, 13vw, 64px); }
  .sky-bat.b3, .sky-leaf.l2, .sky-leaf.l5, .sky-flake.f2{ display:none; }
}

/* Black Friday (2–28 November): a black-and-gold hero, gold confetti and price tags, the offers strip under it */
:root .hero.is-blackfriday, :root[data-theme] .hero.is-blackfriday{ background:radial-gradient(520px 380px at 74% 52%, rgba(250,204,21,.22), transparent 70%), linear-gradient(160deg,#0b0b12 0%,#17131f 55%,#241a08 100%); }
.hero.is-blackfriday .season-badge{ color:#1a1300; background:linear-gradient(135deg,#fde68a,#f59e0b); border-color:rgba(253,230,138,.8); letter-spacing:.04em; text-transform:uppercase; }
:root .hero.is-blackfriday .hero-title .accent, :root[data-theme] .hero.is-blackfriday .hero-title .accent{ color:#fbbf24; background:none; -webkit-background-clip:border-box; background-clip:border-box; font-style:normal; }
.sky-confetti{ position:absolute; top:-16px; width:7px; height:13px; border-radius:2px; background:linear-gradient(#fde68a,#d97706); opacity:.75; transform:rotate(var(--r)); }
.sky-tag{ position:absolute; font-weight:900; color:rgba(251,191,36,.18); font-size:clamp(28px, 4vw, 54px); letter-spacing:-.02em; }
.sky-tag.t1{ left:4%; top:14%; } .sky-tag.t2{ left:38%; top:6%; font-size:clamp(20px, 2.6vw, 34px); }
.sky-tag.t3{ right:6%; top:70%; } .sky-tag.t4{ left:12%; bottom:8%; font-size:clamp(20px, 2.6vw, 34px); }
@media (prefers-reduced-motion:no-preference){
  .sky-confetti{ animation:confetti-fall var(--d) linear infinite; animation-delay:var(--delay); }
}
@keyframes confetti-fall{ to{ transform:translate(-30px, 820px) rotate(calc(var(--r) + 540deg)); } }
.bf-strip{ background:linear-gradient(180deg,#17131f,#0f0d16); color:#fff; padding-block:var(--space-8); }
.bf-card{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) auto; gap:var(--space-6); align-items:center; }
.bf-card .eyebrow{ color:#fbbf24; }
.bf-card .h2{ color:#fff; margin:0 0 var(--space-2); }
.bf-card .small{ color:rgba(255,255,255,.75); margin:0; }
.bf-offers{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3); }
.bf-offers li{ display:flex; flex-direction:column; gap:2px; padding:12px 14px; border-radius:14px; background:rgba(255,255,255,.06); border:1px solid rgba(251,191,36,.3); }
.bf-offers b{ font-size:1.35rem; color:#fbbf24; line-height:1.1; }
.bf-offers span{ font-size:.9rem; color:rgba(255,255,255,.85); }
@media (max-width:960px){ .bf-card{ grid-template-columns:1fr; } }
@media (max-width:520px){ .bf-offers{ grid-template-columns:1fr; } }

/* the Lingvessa cat (web/public/art/cat, drawn by ChatGPT): it waves in front of the emblem, points at the advantages,
   sits at a desk by the directions, peeks over the room sketch and sits with a laptop by the trial form */
.lv-cat{ height:auto; pointer-events:none; }
.hero-cat{ position:absolute; left:-26%; bottom:-18%; width:66%; z-index:2; filter:drop-shadow(0 18px 26px rgba(0,0,0,.38));
  translate:calc(var(--mx, 0) * 18px) calc(var(--my, 0) * 18px); transition:translate .6s ease-out; transform-origin:50% 92%; }
.hero-season-art{ position:absolute; right:-24px; bottom:-26px; width:clamp(170px, 17vw, 270px); height:auto; z-index:0; pointer-events:none;
  filter:drop-shadow(0 16px 24px rgba(0,0,0,.4)); }
.hero-season-art.is-winter{ width:clamp(130px, 13vw, 210px); bottom:-14px; }
.pub-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-6); }
.head-cat{ flex:none; width:clamp(118px, 13vw, 184px); margin-bottom:6px; filter:drop-shadow(0 14px 18px rgba(40,30,110,.25)); transform-origin:50% 100%; }
.mock-wrap{ position:relative; }
.mock-cat{ position:absolute; left:22px; top:0; width:clamp(108px, 10vw, 144px); z-index:2; translate:0 -93%; }
.trial-cat{ display:block; width:clamp(150px, 15vw, 206px); margin-top:var(--space-6); filter:drop-shadow(0 18px 24px rgba(0,0,0,.35)); transform-origin:50% 100%; }
@media (prefers-reduced-motion:no-preference){
  .hero-cat{ animation:cat-pop .9s cubic-bezier(.2,1.5,.4,1) .25s both, cat-sway 5s ease-in-out 1.2s infinite; }
  .head-cat, .trial-cat{ animation:cat-bob 4.8s ease-in-out infinite; }
  .mock-cat{ animation:cat-peek 6s ease-in-out infinite; }
}
@keyframes cat-pop{ from{ opacity:0; transform:translateY(34px) scale(.82); } to{ opacity:1; transform:none; } }
@keyframes cat-sway{ 0%,100%{ transform:rotate(-2deg); } 50%{ transform:rotate(2.5deg) translateY(-5px); } }
@keyframes cat-bob{ 0%,100%{ transform:translateY(0) rotate(-1.5deg); } 50%{ transform:translateY(-6px) rotate(1.5deg); } }
@keyframes cat-peek{ 0%,70%,100%{ transform:translateY(0); } 80%{ transform:translateY(10px); } 88%{ transform:translateY(-4px); } }
@media (max-width:860px){
  .hero-season-art{ width:120px; right:-14px; bottom:-14px; }
  .hero-season-art.is-winter{ width:96px; }
  .trial-cat{ width:128px; }
}
@media (max-width:520px){ .hero-season-art{ display:none; } .head-cat{ width:92px; } }

/* 18-journey.css */
/* My English Journey (components/journey.js, pages/journey.js): level, XP bar, badges, the celebration */
.jr-level{ display:flex; align-items:center; gap:var(--space-4); }
.jr-level img{ width:64px; height:64px; flex:none; filter:drop-shadow(0 6px 10px rgba(30,20,60,.18)); }
.jr-level .jr-name{ font-family:var(--font-display); font-weight:700; font-size:1.15rem; line-height:1.2; color:var(--ink); }
.jr-level .jr-xp{ font-variant-numeric:tabular-nums; font-weight:700; font-size:1.6rem; color:var(--emerald-700); line-height:1.1; }
.jr-bar{ height:10px; background:var(--line); border-radius:99px; overflow:hidden; margin:var(--space-3) 0 var(--space-2); }
.jr-bar > div{ height:100%; border-radius:99px; background:linear-gradient(90deg, var(--emerald-500), var(--emerald-700)); transition:width .6s ease; }
.jr-badges-row{ display:flex; flex-wrap:wrap; gap:var(--space-2); align-items:center; }
.jr-badges-row img{ width:40px; height:40px; }
.jr-milestone{ display:flex; gap:var(--space-3); align-items:center; padding:var(--space-3); border-radius:var(--radius-m);
  background:var(--emerald-50); border:1px dashed var(--line-strong); }
.jr-milestone img{ width:44px; height:44px; filter:grayscale(.15); }

.jr-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:var(--space-3); }
.jr-badge{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; padding:var(--space-4) var(--space-3);
  border-radius:var(--radius-l); background:var(--paper); border:1px solid var(--line); }
.jr-badge img{ width:72px; height:72px; }
.jr-badge .jr-bname{ font-weight:700; font-size:.95rem; color:var(--ink); }
.jr-badge .jr-babout{ font-size:.8rem; color:var(--ink-soft); line-height:1.3; }
.jr-badge.locked img{ filter:grayscale(1) opacity(.45); }
.jr-badge.locked .jr-bname{ color:var(--ink-soft); }
.jr-badge .progress-bar{ width:80%; }

.jr-levels{ display:flex; gap:var(--space-2); overflow-x:auto; padding-bottom:4px; }
.jr-step{ flex:1 0 110px; display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; padding:var(--space-3) var(--space-2);
  border-radius:var(--radius-m); border:1px solid var(--line); background:var(--paper); font-size:.8rem; color:var(--ink-soft); }
.jr-step img{ width:40px; height:40px; }
.jr-step.done{ border-color:var(--emerald-500); }
.jr-step.now{ border-color:var(--emerald-700); box-shadow:0 0 0 2px var(--emerald-100); color:var(--ink); font-weight:600; }
.jr-step.later img{ filter:grayscale(1) opacity(.5); }

.jr-xp-list{ display:flex; flex-direction:column; gap:var(--space-2); }
.jr-xp-list .row{ font-size:.9rem; }
.jr-xp-list b{ color:var(--emerald-700); font-variant-numeric:tabular-nums; }

/* the celebration of a new badge or level */
.jr-celebrate{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--space-3); padding:var(--space-2) 0; }
.jr-celebrate .jr-burst{ position:relative; width:150px; height:150px; display:grid; place-items:center; }
.jr-celebrate .jr-burst::before{ content:''; position:absolute; inset:0; border-radius:50%;
  background:radial-gradient(circle, var(--gold-100) 0%, rgba(255,255,255,0) 70%); animation:jr-glow 2.4s ease-in-out infinite; }
.jr-celebrate .jr-burst img{ position:relative; width:120px; height:120px; animation:jr-pop .9s cubic-bezier(.2,1.6,.4,1) both; }
.jr-celebrate .jr-spark{ position:absolute; width:8px; height:8px; border-radius:50%; background:var(--gold-500); opacity:0;
  animation:jr-spark 1.4s ease-out .3s both; }
.jr-celebrate .jr-spark:nth-child(3){ background:var(--emerald-500); --dx:-70px; --dy:-40px; }
.jr-celebrate .jr-spark:nth-child(4){ --dx:68px; --dy:-46px; }
.jr-celebrate .jr-spark:nth-child(5){ background:var(--emerald-700); --dx:-56px; --dy:52px; }
.jr-celebrate .jr-spark:nth-child(6){ --dx:60px; --dy:48px; }
.jr-celebrate .jr-spark:nth-child(7){ background:var(--emerald-500); --dx:0px; --dy:-78px; }
@keyframes jr-pop{ 0%{ transform:scale(.2) rotate(-18deg); opacity:0 } 60%{ opacity:1 } 100%{ transform:scale(1) rotate(0) } }
@keyframes jr-glow{ 0%,100%{ transform:scale(.9); opacity:.7 } 50%{ transform:scale(1.08); opacity:1 } }
@keyframes jr-spark{ 0%{ transform:translate(0,0) scale(.4); opacity:0 } 25%{ opacity:1 } 100%{ transform:translate(var(--dx,40px), var(--dy,-40px)) scale(1); opacity:0 } }
@media (prefers-reduced-motion: reduce){ .jr-celebrate .jr-burst img, .jr-celebrate .jr-burst::before, .jr-celebrate .jr-spark{ animation:none; opacity:1 } }

/* the way to the next free lesson (students of the school): 1000 XP each */
.jr-reward{ display:flex; gap:var(--space-3); align-items:center; padding:var(--space-3); border-radius:var(--radius-m);
  background:var(--gold-100); border:1px solid var(--line); }
.jr-reward img{ width:44px; height:44px; flex:none; }
.jr-reward .jr-bar{ height:8px; margin:var(--space-2) 0 4px; background:var(--paper); }
.jr-reward .jr-bar > div{ background:linear-gradient(90deg, var(--gold-300), var(--gold-500)); }

/* Phase 2 (components/real-life.js, pages/certificate.js): Real-Life Wins, Share Your Win, certificates */
.rl-kinds{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:var(--space-3); }
.rl-kind{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; padding:var(--space-3); cursor:pointer;
  border-radius:var(--radius-l); background:var(--paper); border:1px solid var(--line); color:var(--ink); font:inherit; }
.rl-kind:hover:not(:disabled){ border-color:var(--emerald-500); box-shadow:0 0 0 2px var(--emerald-100); }
.rl-kind:disabled{ cursor:default; opacity:.7; }
.rl-kind img{ width:48px; height:48px; }
.rl-en{ font-weight:700; font-size:.9rem; }
.rl-list{ display:flex; flex-direction:column; gap:var(--space-2); margin-top:var(--space-4); }
.rl-item{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2) var(--space-3); border-radius:var(--radius-m);
  border:1px solid var(--line); background:var(--paper); color:var(--ink); text-decoration:none; flex-wrap:wrap; }
.rl-item img{ flex:none; }
.rl-story{ color:var(--ink-soft); white-space:pre-wrap; overflow-wrap:anywhere; }
a.rl-cert:hover{ border-color:var(--emerald-500); }

/* the certificate: A4 landscape on paper, a framed sheet on the screen */
.cert{ background:#fffdf8; color:#1d1b33; border-radius:14px; padding:18px; box-shadow:0 10px 30px rgba(30,20,60,.12); max-width:1000px; margin:0 auto; }
.cert-inner{ border:3px double #b8963e; border-radius:8px; padding:36px 48px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:8px; }
.cert-emblem{ width:84px; height:84px; }
.cert-kicker{ font-family:var(--font-display); font-style:italic; font-weight:700; font-size:1.5rem; color:#6D3BEA; }
.cert-small{ font-size:.95rem; color:#55526e; }
.cert-name{ font-family:var(--font-display); font-weight:800; font-size:2.4rem; line-height:1.15; border-bottom:1px solid #d9cfae; padding:0 24px 6px; }
.cert-course{ font-family:var(--font-display); font-weight:700; font-size:1.4rem; }
.cert-covers{ width:100%; text-align:left; margin-top:8px; }
.cert-label{ font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8a7a45; margin-bottom:4px; text-align:center; }
.cert-covers ol{ columns:2; column-gap:32px; margin:0; padding-left:22px; font-size:.82rem; line-height:1.45; color:#3a3755; }
.cert-facts{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px 36px; margin-top:12px; }
.cert-facts div{ display:flex; flex-direction:column; align-items:center; }
.cert-facts b{ font-size:1.05rem; }
.cert-facts span{ font-size:.75rem; color:#6b6886; }
.cert-code{ font-size:.75rem; color:#6b6886; margin-top:10px; font-variant-numeric:tabular-nums; }
.cert-note{ font-size:.68rem; color:#8a879e; max-width:680px; line-height:1.4; }
.cert-hint{ text-align:center; margin-bottom:var(--space-3); }
@media (max-width:640px){ .cert-inner{ padding:20px 14px; } .cert-name{ font-size:1.7rem; padding:0 6px 4px; } .cert-covers ol{ columns:1; } }
@media print{
  @page{ size:A4 landscape; margin:10mm; }
  body *{ visibility:hidden; }
  .cert, .cert *{ visibility:visible; }
  .cert{ position:absolute; left:0; top:0; width:100%; box-shadow:none; padding:0; border-radius:0; max-width:none;
    -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* 19-dashboard.css */
/* The student's dashboard on the overview (components/dashboard.js; Alina's reference «Fluen AI», 18.10): greeting with
   the XP, the week strip, the task of the day with the cat, lesson cards, accuracy rings. On a phone everything is one
   column ordered by the o1…o8 classes; from 1024px two columns (the left one: greeting, week, task, accuracy). */
.dash{ display:flex; flex-direction:column; gap:var(--space-5); margin-bottom:var(--space-6); }
.dash-col{ display:contents; }
.dash .o1{ order:1 } .dash .o2{ order:2 } .dash .o3{ order:3 } .dash .o4{ order:4 }
.dash .o5{ order:5 } .dash .o6{ order:6 } .dash .o7{ order:7 } .dash .o8{ order:8 }
@media (min-width:1024px){
  .dash{ display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr); align-items:start; }
  .dash-col{ display:flex; flex-direction:column; gap:var(--space-5); min-width:0; }
}

.dash-hello{ display:flex; flex-direction:column; gap:var(--space-4); }
.dash-hello-row{ display:flex; align-items:center; gap:var(--space-3); }
/* the quote of the visit (lib/quotes.js): a quiet card with a gold edge */
.dash-quote{ margin:0; padding:12px 16px 12px 18px; background:var(--paper); border:1px solid var(--line); border-left:3px solid var(--gold-500);
  border-radius:var(--radius-m); box-shadow:var(--shadow-card); }
.dash-quote blockquote{ margin:0; font-family:var(--font-display); font-style:italic; font-size:1.02rem; line-height:1.45; color:var(--ink); }
.dash-quote blockquote::before{ content:'\201C'; } .dash-quote blockquote::after{ content:'\201D'; }
.dash-quote-tr{ margin:6px 0 0; font-size:.86rem; line-height:1.4; color:var(--ink-soft); }
.dash-quote figcaption{ margin-top:6px; font-size:.78rem; font-weight:600; color:var(--ink-soft); }
.dash-hi{ font-size:.85rem; color:var(--ink-soft); line-height:1.1; }
.dash-name{ font-family:var(--font-display); font-weight:700; font-size:1.3rem; color:var(--ink); line-height:1.2;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-xp{ margin-left:auto; flex:none; display:inline-flex; align-items:center; gap:6px; padding:6px 14px 6px 8px; border-radius:var(--radius-pill);
  background:var(--paper); border:1px solid var(--line); box-shadow:var(--shadow-card); font-weight:700; color:var(--ink);
  text-decoration:none; font-variant-numeric:tabular-nums; }
.dash-xp:hover{ border-color:var(--emerald-500); }
.dash-xp img{ width:22px; height:22px; }

.dash-nav{ width:36px; height:36px; display:grid; place-items:center; border-radius:50%; border:1px solid var(--line);
  background:var(--paper); color:var(--ink); cursor:pointer; }
.dash-nav:hover:not(:disabled){ border-color:var(--emerald-500); }
.dash-nav:disabled{ opacity:.35; cursor:default; }

.dash-week{ padding:var(--space-4); }
.dash-week-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-3); }
.dash-month{ font-weight:600; color:var(--ink); }
.dash-days{ display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:2px; }
.dash-day{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:4px 0 2px; border:0; background:none;
  border-radius:var(--radius-m); cursor:pointer; color:var(--ink); font:inherit; min-width:0; }
.dash-wd{ font-size:.72rem; color:var(--ink-soft); text-transform:capitalize; }
.dash-dn{ width:38px; height:38px; display:grid; place-items:center; border-radius:50%; font-weight:600; font-variant-numeric:tabular-nums;
  transition:background .2s, box-shadow .2s; }
.dash-day.weekend .dash-dn{ color:var(--ink-soft); }
.dash-day.xp .dash-dn{ background:var(--emerald-50); }
.dash-day.today .dash-dn{ background:linear-gradient(135deg, #ffd9c2, #ffb999); color:#5b2a12; }
.dash-day.selected .dash-dn{ box-shadow:0 0 0 2px var(--paper), 0 0 0 4px var(--emerald-500); }
.dash-day:focus-visible{ outline:2px solid var(--emerald-500); outline-offset:2px; }
.dash-dot{ width:6px; height:6px; border-radius:50%; background:var(--emerald-500); }
.dash-dot.none{ visibility:hidden; }

/* the task of the day: a lavender card with the cat */
.dash-today{ position:relative; overflow:hidden; border-radius:var(--radius-l); padding:var(--space-5) 128px var(--space-5) var(--space-5);
  background:linear-gradient(135deg, #efe9ff 0%, #ddd0ff 55%, #cbd6ff 100%); color:#2a2152; min-height:168px; }
.dash-today-title{ font-family:var(--font-display); font-weight:700; font-size:1.15rem; line-height:1.25; }
.dash-today-line{ margin-top:4px; color:#3c3268; }
.dash-today-meta{ margin-top:var(--space-3); font-size:.82rem; font-weight:600; color:#4a3f7a; }
.dash-today-bar{ height:6px; max-width:220px; margin:6px 0 0; background:rgba(255,255,255,.75); border-radius:99px; overflow:hidden; }
.dash-today-bar > div{ height:100%; border-radius:99px; background:linear-gradient(90deg, #9b7cf4, #5b3fd6); transition:width .6s ease; }
.dash-today-btn{ position:relative; z-index:1; display:inline-flex; align-items:center; gap:6px; margin-top:var(--space-4); padding:10px 18px;
  border-radius:var(--radius-pill); background:#fff; color:#2a2152; font-weight:600; text-decoration:none;
  box-shadow:0 8px 18px -10px rgba(60,40,140,.55); }
.dash-today-btn:hover{ background:#f6f2ff; }
.dash-today-cat{ position:absolute; right:-4px; bottom:-6px; width:140px; height:140px; object-fit:contain; pointer-events:none;
  filter:drop-shadow(0 8px 12px rgba(60,40,140,.25)); }

/* lesson cards: the next one peach with a brush stroke, the others plain */
.dash-sec-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.dash-lessons{ display:flex; flex-direction:column; gap:var(--space-3); }
.dash-lesson{ position:relative; overflow:hidden; border-radius:var(--radius-l); padding:var(--space-4) var(--space-5);
  background:var(--paper); border:1px solid var(--line); }
.dash-lesson.first{ background:linear-gradient(135deg, #ffe7d9 0%, #ffcdb4 100%); border-color:transparent; color:#40200f; }
.dash-lesson.first::after{ content:''; position:absolute; right:-50px; top:18px; width:240px; height:110px; border-radius:60px;
  background:rgba(255,138,96,.22); transform:rotate(-24deg); pointer-events:none; }
.dash-lesson > *{ position:relative; z-index:1; }
.dash-lesson-title{ font-family:var(--font-display); font-weight:700; font-size:1.1rem; line-height:1.25; }
.dash-lesson-time{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:.9rem; margin:6px 0 var(--space-3); }
.dash-lesson.first .dash-lesson-time, .dash-lesson.first .caption{ color:#5b3420; }
.dash-lesson-teacher{ display:flex; align-items:center; gap:8px; margin-bottom:var(--space-3); font-size:.95rem; }

/* accuracy by skill: concentric arcs */
.dash-acc{ padding:var(--space-4) var(--space-5); --c-grammar:#5aa9e6; --c-vocabulary:#ec6fae; --c-reading:#9b7be8; --c-listening:#f0b429; }
.dash-acc-month{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin:var(--space-3) 0 var(--space-2);
  font-size:.9rem; font-weight:600; color:var(--ink); }
.dash-acc-empty{ padding:var(--space-5) 0; }
.dash-rings{ position:relative; display:flex; justify-content:center; }
.dash-rings svg{ width:220px; height:220px; max-width:100%; }
.dash-track{ fill:none; stroke:var(--line); stroke-width:11; stroke-linecap:round; opacity:.6; }
.dash-arc{ fill:none; stroke-width:11; stroke-linecap:round; transition:stroke-dasharray .8s ease; }
.dash-arc.grammar{ stroke:var(--c-grammar); } .dash-arc.vocabulary{ stroke:var(--c-vocabulary); }
.dash-arc.reading{ stroke:var(--c-reading); } .dash-arc.listening{ stroke:var(--c-listening); }
.dash-ring-num{ text-anchor:middle; font-weight:700; font-size:22px; fill:var(--ink); font-variant-numeric:tabular-nums; }
.dash-ring-cap{ text-anchor:middle; font-size:11px; fill:var(--ink-soft); }
.dash-growth{ position:absolute; top:4px; right:0; max-width:132px; display:flex; flex-direction:column; gap:2px; padding:6px 10px;
  border-radius:var(--radius-m); background:var(--paper); border:1px solid var(--line); box-shadow:var(--shadow-card); font-size:.75rem; color:var(--ink-soft); }
.dash-growth b{ font-size:.95rem; color:var(--ink); }
.dash-legend{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px var(--space-4); margin-top:var(--space-2); font-size:.85rem; color:var(--ink); }
.dash-legend > div{ display:flex; align-items:center; gap:6px; min-width:0; }
.dash-legend b{ margin-left:auto; }
.dash-key{ width:10px; height:10px; border-radius:3px; flex:none; }
.dash-key.grammar{ background:var(--c-grammar); } .dash-key.vocabulary{ background:var(--c-vocabulary); }
.dash-key.reading{ background:var(--c-reading); } .dash-key.listening{ background:var(--c-listening); }
@media (prefers-reduced-motion: reduce){ .dash-arc, .dash-today-bar > div, .dash-dn{ transition:none } }

/* «Пригласить друга» (pages/referrals.js) and its card on the overview: the two gifts to choose from */
.ref-card{ position:relative; }
.ref-gift-art{ float:right; width:72px; height:72px; margin:0 0 var(--space-3) var(--space-3); }
.ref-gifts{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--space-3); margin:var(--space-3) 0; clear:both; }
.ref-gift{ display:flex; flex-direction:column; gap:2px; padding:var(--space-3) var(--space-4); border-radius:var(--radius-m);
  background:var(--emerald-50); border:1px solid var(--line); }
.ref-gift b{ font-family:var(--font-display); font-size:1.35rem; color:var(--emerald-700); }
.ref-gift span{ font-size:.85rem; color:var(--ink-soft); line-height:1.3; }
.ref-reward{ display:flex; flex-direction:column; gap:var(--space-2); padding-bottom:var(--space-3); border-bottom:1px solid var(--line); }
.ref-reward:last-child{ border-bottom:0; padding-bottom:0; }
.dash-invite{ display:flex; align-items:center; gap:var(--space-4); padding:var(--space-4) var(--space-5); }
.dash-invite img{ width:56px; height:56px; flex:none; }
.dash-invite.ready{ background:linear-gradient(135deg, #fff4e3, #ffe2c4); border-color:transparent; color:#40200f; }

/* «A Little Note From Your Teacher» (components/teacher-letters.js): a letter in the design's light tint with the cat
   (the colours come from the theme: Aurora violet, Classic emerald) */
.note-card{ position:relative; overflow:hidden; padding:var(--space-5) var(--space-5) var(--space-5); padding-right:120px; }
:root .card.note-card{ background:linear-gradient(160deg, var(--paper) 0%, var(--emerald-50) 100%); border:1px solid var(--line-strong); }
.note-card-cat{ position:absolute; right:6px; bottom:6px; width:104px; height:104px; object-fit:contain; pointer-events:none;
  filter:drop-shadow(0 6px 10px rgba(120,80,20,.22)); }
.note-letter{ display:flex; flex-direction:column; gap:var(--space-3); }
.note-kicker{ font-family:var(--font-display); font-style:italic; font-weight:800; font-size:1.08rem; color:var(--emerald-700); }
.note-from{ align-items:center; }
.note-part p{ margin:2px 0 0; line-height:1.5; color:var(--ink); white-space:pre-wrap; }
.note-label{ font-size:.78rem; font-weight:700; letter-spacing:.02em; color:var(--emerald-700); }
.note-letter .btn{ align-self:flex-start; }
.note-due{ position:relative; padding-right:120px; }
.note-due-cat{ position:absolute; right:12px; top:12px; width:96px; height:96px; object-fit:contain; }
.note-due-lead{ margin:4px 0 var(--space-4); max-width:640px; }
.note-due-row{ padding:8px 0; border-top:1px dashed var(--line); }
@media (max-width:600px){
  .note-card{ padding-right:var(--space-5); padding-bottom:110px; }
  .note-due{ padding-right:var(--space-5); }
  .note-due-cat{ position:static; width:72px; height:72px; margin-bottom:4px; }
}

/* «Your English Anniversary» (components/anniversary.js): a dark card in the design's colours (Aurora: indigo to violet
   with a cyan glow; Classic: emerald and gold), the cat with the milestone */
.anv-card{ position:relative; overflow:hidden; padding:var(--space-5); padding-right:150px; color:#fff; }
:root .card.anv-card{ border:2px solid var(--gold-500); backdrop-filter:none; -webkit-backdrop-filter:none;
  background:radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--gold-500) 35%, transparent), transparent 45%),
    radial-gradient(circle at 5% 100%, rgba(244,114,182,.22), transparent 40%),
    linear-gradient(150deg, var(--emerald-900) 0%, var(--emerald-800) 55%, var(--emerald-700) 120%); }
.anv-cat{ position:absolute; right:10px; top:14px; width:128px; height:128px; object-fit:contain; pointer-events:none;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.3)); }
.anv-kicker{ font-family:var(--font-display); font-style:italic; font-weight:800; color:var(--gold-300); font-size:1.02rem; }
.anv-title{ font-family:var(--font-display); font-weight:700; font-size:1.45rem; line-height:1.2; margin:2px 0 var(--space-4); }
.anv-name{ font-weight:600; color:var(--gold-100); }
.anv-stats{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px 14px; margin-bottom:var(--space-4); }
.anv-stat{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.anv-stat b{ font-family:var(--font-display); font-size:1.6rem; line-height:1.1; }
.anv-stat span{ font-size:.76rem; color:var(--gold-300); line-height:1.25; }
.anv-start{ display:flex; flex-direction:column; gap:3px; padding:10px 12px; border-radius:var(--radius-m); background:rgba(255,255,255,.08);
  font-size:.86rem; line-height:1.4; margin-bottom:var(--space-4); }
.anv-start-head{ font-weight:700; color:var(--gold-300); }
.anv-card .btn-ghost{ color:#fff; }
@media (max-width:600px){
  .anv-card{ padding-right:var(--space-5); padding-top:120px; }
  .anv-cat{ width:104px; height:104px; }
}

/* 20-grammar.css */
/* The grammar trainer (pages/grammar.js): topics, the rule, a set of tasks with the result after each answer */
.gr-intro{ max-width:760px; margin-bottom:var(--space-4); }
.gr-review{ margin-bottom:var(--space-4); border-color:var(--line-strong); }
.gr-topics{ display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:var(--space-3); margin-top:var(--space-4); }
.gr-topic{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) var(--space-4); color:inherit; text-decoration:none; }
.gr-topic:hover{ border-color:var(--emerald-500); }
.gr-topic-n{ flex:none; width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-weight:700; font-size:.9rem;
  background:var(--emerald-50); color:var(--emerald-700); font-variant-numeric:tabular-nums; }
.gr-topic-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.gr-topic-title{ font-weight:700; color:var(--ink); line-height:1.3; }
.gr-topic .pill{ flex:none; }

.gr-topic-grid{ display:grid; grid-template-columns:minmax(0, 2fr) minmax(260px, 1fr); gap:var(--space-5); align-items:start; }
.gr-rule .rich{ margin-top:var(--space-3); }
.gr-rule table{ border-collapse:collapse; margin:var(--space-3) 0; font-size:.95rem; }
.gr-rule th, .gr-rule td{ border:1px solid var(--line); padding:6px 10px; text-align:left; vertical-align:top; }
.gr-rule th{ background:var(--emerald-50); }
.gr-keys{ margin:var(--space-3) 0 0; padding-left:1.4em; display:flex; flex-direction:column; gap:var(--space-3); }

.gr-set{ max-width:760px; }
.gr-set-head{ display:flex; justify-content:space-between; align-items:center; gap:var(--space-3); flex-wrap:wrap; margin-bottom:var(--space-3); }
.gr-dots{ display:flex; gap:5px; }
.gr-dot{ width:10px; height:10px; border-radius:50%; background:var(--line); }
.gr-dot.now{ background:var(--emerald-600); box-shadow:0 0 0 3px var(--emerald-100); }
.gr-dot.ok{ background:var(--good); }
.gr-dot.bad{ background:var(--bad); }
.gr-hint{ margin-bottom:var(--space-2); }
.gr-result{ margin-top:var(--space-4); padding:var(--space-4); border-radius:var(--radius-l); border:1px solid var(--good-line); background:var(--good-bg); }
.gr-result.bad{ border-color:var(--bad-line); background:var(--bad-bg); }
.gr-verdict{ display:flex; align-items:center; gap:8px; font-weight:700; color:var(--good); }
.gr-result.bad .gr-verdict{ color:var(--bad); }
.gr-solution{ margin:var(--space-2) 0 0; font-size:1.1rem; font-weight:600; color:var(--ink); }
.gr-fix{ background:var(--gold-100); color:inherit; padding:0 3px; border-radius:4px; }
.gr-explain{ margin:var(--space-3) 0 0; color:var(--ink); }

.gr-summary{ max-width:520px; margin:0 auto; text-align:center; display:flex; flex-direction:column; align-items:center; gap:var(--space-3); }
.gr-summary img{ width:120px; height:120px; object-fit:contain; }
.gr-xp{ font-weight:700; font-size:1.4rem; color:var(--emerald-700); margin:0; }
.gr-summary-progress{ width:100%; max-width:360px; text-align:left; }

@media (max-width: 760px){
  .gr-topic-grid{ grid-template-columns:1fr; }
  .gr-topics{ grid-template-columns:1fr; }
}

/* 21-survival.css */
/* Survival Kit (pages/survival.js): topics, phrases with sound, the dialogue trainer */
.sk-hero{ padding:72px 0 56px; }
.sk-hero .hero-lead{ max-width:720px; }
.sk-lead{ max-width:760px; margin-bottom:var(--space-4); }
.sk-groups{ display:flex; flex-direction:column; gap:var(--space-6); }
.sk-group .h3{ margin-bottom:var(--space-3); }
.sk-topics{ display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:var(--space-3); }
.sk-topic{ display:flex; flex-direction:column; gap:6px; padding:var(--space-4); color:inherit; text-decoration:none; }
.sk-topic:hover{ border-color:var(--emerald-500); }
.sk-topic-title{ font-weight:700; font-size:1.05rem; color:var(--ink); line-height:1.3; }
.sk-topic-intro{ color:var(--ink-soft); }
.sk-cta{ margin-top:var(--space-7, 48px); }

.sk-head{ margin-bottom:var(--space-5); max-width:820px; }
.sk-head .lead{ margin-top:var(--space-2); }
.sk-layout{ display:grid; grid-template-columns:minmax(0, 2fr) minmax(260px, 1fr); gap:var(--space-5); align-items:start; }
.sk-side{ position:sticky; top:var(--space-4); }
.sk-section .h4{ margin-bottom:var(--space-3); }
.sk-phrases{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.sk-phrase{ display:flex; align-items:flex-start; gap:var(--space-3); padding:10px 0; border-top:1px solid var(--line); }
.sk-phrase:first-child{ border-top:0; padding-top:0; }
.sk-phrase-text{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.sk-en{ font-weight:600; color:var(--ink); }
.sk-note{ display:flex; gap:6px; align-items:flex-start; color:var(--ink-soft); margin-top:2px; }
.sk-note svg{ flex:none; margin-top:3px; }
.sk-save{ flex:none; color:var(--ink-soft); }
.sk-save.is-on{ color:var(--gold-600); }
.sk-dialogue-card{ display:flex; flex-direction:column; gap:var(--space-2); align-items:flex-start; }

.sk-run{ max-width:760px; display:flex; flex-direction:column; gap:var(--space-4); }
.sk-run > .icon-link{ align-self:flex-start; background:none; border:0; padding:0; cursor:pointer; }
.sk-chat{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--space-3); }
.sk-line{ display:grid; grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"who who" "bubble play"; gap:4px 6px; max-width:88%; }
.sk-line.me{ align-self:flex-end; }
.sk-who{ grid-area:who; font-size:.78rem; color:var(--ink-soft); font-weight:600; }
.sk-line.me .sk-who{ text-align:right; }
.sk-bubble{ grid-area:bubble; display:flex; flex-direction:column; gap:2px; padding:10px 14px; border-radius:16px 16px 16px 4px;
  background:var(--paper); border:1px solid var(--line); color:var(--ink); }
.sk-line.me .sk-bubble{ border-radius:16px 16px 4px 16px; background:var(--emerald-50); border-color:var(--emerald-100); }
.sk-line .sound-btn{ grid-area:play; align-self:center; }
.sk-hint{ padding:var(--space-3) var(--space-4); border-radius:var(--radius-m); background:var(--good-bg); border:1px solid var(--good-line); color:var(--ink); }
.sk-hint.bad{ background:var(--bad-bg); border-color:var(--bad-line); }
.sk-replies{ display:flex; flex-direction:column; gap:var(--space-2); }
.sk-reply{ display:flex; flex-direction:column; gap:2px; text-align:left; padding:12px 16px; border-radius:var(--radius-m); border:1px solid var(--line-strong);
  background:var(--paper); color:var(--ink); font:inherit; font-weight:600; cursor:pointer; }
.sk-reply:hover:not(:disabled){ border-color:var(--emerald-500); }
.sk-reply .caption{ font-weight:400; }
.sk-reply.tried{ opacity:.55; text-decoration:line-through; }
.sk-reply:disabled{ cursor:default; }
.sk-done{ display:flex; flex-direction:column; gap:var(--space-2); }

@media (max-width: 760px){
  .sk-layout{ grid-template-columns:1fr; }
  .sk-side{ position:static; }
  .sk-topics{ grid-template-columns:1fr; }
  .sk-line{ max-width:100%; }
}

/* 22-quiz.css */
/* The learner-profile quiz (pages/quiz.js): the questions one at a time, the result, the home page band */
.quiz-teaser{ background:var(--emerald-50); }
.quiz-page{ min-height:60vh; }
.quiz-card{ display:flex; flex-direction:column; gap:var(--space-3); }
.quiz-card > .eyebrow, .quiz-card > .btn{ align-self:flex-start; }
.quiz-card .progress-bar{ margin:0 0 var(--space-2); }
.quiz-q{ margin:var(--space-2) 0; line-height:1.3; }
.quiz-options{ display:flex; flex-direction:column; gap:var(--space-2); }
.quiz-option{ text-align:left; padding:14px 18px; border-radius:var(--radius-m); border:1px solid var(--line-strong); background:var(--paper);
  color:var(--ink); font:inherit; font-size:1rem; cursor:pointer; line-height:1.4; }
.quiz-option:hover:not(:disabled){ border-color:var(--emerald-500); }
.quiz-option.is-on{ border-color:var(--emerald-600); box-shadow:0 0 0 2px var(--emerald-100); }
.quiz-option:disabled{ cursor:wait; }
.quiz-tips{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--space-2); }
.quiz-tips li{ display:flex; gap:10px; align-items:flex-start; }
.quiz-tips svg{ flex:none; margin-top:3px; color:var(--good); }
.quiz-second{ padding-top:var(--space-3); border-top:1px solid var(--line); }
.quiz-next{ display:flex; flex-direction:column; gap:var(--space-3); }
.quiz-teacher .h4{ margin-top:2px; }
/* the cabinet (owner, 20.10): the quiz page, the invitation on the overview (the theme's light tint and the cat pointing
   at the text, like the teacher's note) and the type on the progress page */
.quiz-in-app{ max-width:760px; }
.quiz-invite-card{ position:relative; overflow:hidden; display:flex; flex-direction:column; align-items:flex-start; gap:6px;
  padding:var(--space-5) 136px var(--space-5) var(--space-5); }
:root .card.quiz-invite-card{ background:linear-gradient(160deg, var(--paper) 0%, var(--emerald-50) 100%); border:1px solid var(--line-strong); }
.quiz-invite-card p{ margin:0; }
.quiz-invite-card .btn{ margin-top:6px; }
.quiz-invite-cat{ position:absolute; right:8px; bottom:6px; width:116px; height:116px; object-fit:contain; pointer-events:none;
  filter:drop-shadow(0 6px 10px rgba(120,80,20,.22)); }
@media (max-width:600px){
  .quiz-invite-card{ padding-right:104px; }
  .quiz-invite-cat{ width:92px; height:92px; right:4px; }
}
.quiz-progress{ margin-top:var(--space-6); display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.quiz-progress p{ margin:0; }
/* the type in the lesson card of the schedule (pages/quiz.js QuizLine), under the balance */
.quiz-line{ margin:4px 0 12px; }
.quiz-line summary{ cursor:pointer; margin-top:2px; }
/* the type at the student's name in the teacher's calendar and lesson list (components/quiz-badge.js): an own drawing
   in the type's colour, white on the colour so it reads on every lesson colour and theme */
.quiz-badge{ display:inline-flex; align-items:center; justify-content:center; flex:none; width:16px; height:16px; border-radius:50%; color:#fff; background:var(--quiz-type,#64748b); vertical-align:-3px; }
.quiz-talker{ --quiz-type:#7c3aed; }
.quiz-planner{ --quiz-type:#2563eb; }
.quiz-explorer{ --quiz-type:#0f766e; }
.quiz-observer{ --quiz-type:#b45309; }
.quiz-achiever{ --quiz-type:#be185d; }
.calendar-who{ display:flex; align-items:center; min-width:0; }
.calendar-who .calendar-initials{ flex:none; }
.calendar-event .calendar-who-name{ flex-shrink:1; min-width:0; }
.calendar-who .quiz-badge{ margin-left:4px; }

/* 23-lite.css */
/* The «Лайт» subscription (components/lite.js): the student's card, the AI review of written answers, the home page offer */
.lite-card{ display:flex; flex-direction:column; }
.lite-lesson{ padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-m); background:var(--paper); }
.lite-lesson:hover{ border-color:var(--emerald-500); }
.lite-teacher{ margin-top:var(--space-4); padding-top:var(--space-3); border-top:1px solid var(--line); }
.answer-reviews .ar-item + .ar-item{ padding-top:var(--space-4); border-top:1px solid var(--line); }
.ar-task{ color:var(--ink-soft); margin-bottom:6px; }
.ar-list{ list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.ar-list li{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
.ar-wrong{ text-decoration:line-through; text-decoration-color:var(--bad); color:var(--ink-soft); }
.ar-right{ color:var(--good); }
.ar-why{ flex-basis:100%; }
.ar-corrected{ margin-top:10px; }
.ar-corrected summary{ cursor:pointer; }
.lite-price .btn{ align-self:flex-start; }
.interest-switch{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:var(--space-4); }

/* 24-mail.css */
/* School mailboxes (pages/mail.js): mailboxes and folders, the list of letters, the letter */
.mail-layout{ display:grid; grid-template-columns:220px 320px 1fr; gap:var(--space-4); height:calc(100vh - 64px - 48px); min-height:480px; }
.mail-boxes, .mail-list{ overflow-y:auto; padding:6px; }
.mail-box{ border-radius:10px; }
.mail-box + .mail-box{ margin-top:4px; }
.mail-box-name{ display:grid; grid-template-columns:1fr auto; column-gap:6px; padding:8px 10px; border-radius:10px; text-decoration:none; color:inherit; }
.mail-box-name .caption{ grid-column:1; }
.mail-box-name .badge-n{ grid-column:2; grid-row:1 / span 2; align-self:center; }
.mail-box-name:hover{ background:var(--emerald-50); }
.mail-box.active .mail-box-name{ background:var(--emerald-100); }
.mail-folders{ display:flex; flex-direction:column; padding:4px 0 6px 10px; }
.mail-folder{ text-align:left; background:none; border:0; padding:6px 10px; border-radius:8px; color:var(--ink-soft); font:inherit; font-size:.88rem; cursor:pointer; }
.mail-folder:hover{ background:var(--emerald-50); color:var(--ink); }
.mail-folder.on{ color:var(--emerald-700); font-weight:600; }
.mail-search{ padding:4px 4px 8px; }
.mail-search .input{ width:100%; }
.mail-item{ display:block; padding:9px 10px; border-radius:10px; text-decoration:none; color:inherit; }
.mail-item + .mail-item{ margin-top:2px; }
.mail-item:hover{ background:var(--emerald-50); }
.mail-item.active{ background:var(--emerald-100); }
.mail-item.unread b, .mail-item.unread .small{ font-weight:700; }
.mail-item.unread{ box-shadow:inset 3px 0 0 var(--emerald-600); }
.mail-none{ padding:24px 10px; text-align:center; }
.mail-reader{ overflow-y:auto; padding:var(--space-5); display:flex; flex-direction:column; gap:var(--space-3); }
.mail-head{ display:flex; flex-direction:column; gap:3px; }
.mail-subject{ margin:0 0 4px; overflow-wrap:anywhere; }
.mail-actions{ margin-top:8px; }
.mail-back{ display:none; align-self:flex-start; }
.mail-images{ display:flex; flex-wrap:wrap; gap:6px; align-items:baseline; padding:8px 10px; border-radius:var(--radius-m); background:var(--paper); }
.mail-frame{ width:100%; min-height:200px; border:0; background:#fff; border-radius:var(--radius-m); }
.mail-text{ white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; margin:0; }
.mail-files{ display:flex; flex-wrap:wrap; gap:6px 14px; padding-top:var(--space-3); border-top:1px solid var(--line); }
.mail-compose{ font-family:inherit; min-height:220px; }
.mail-admin-box + .mail-admin-box{ margin-top:var(--space-4); }
.mail-access{ padding:8px 0; border-top:1px solid var(--line); }
@media (max-width:1100px){
  .mail-layout{ grid-template-columns:200px 1fr; }
  .mail-layout .mail-reader{ grid-column:1 / -1; }
  .mail-layout:not(.has-letter) .mail-empty{ display:none; }
  .mail-layout.has-letter .mail-list{ display:none; }
  .mail-layout{ height:auto; }
  .mail-reader{ overflow:visible; }
  .mail-back{ display:inline-flex; }
}
@media (max-width:700px){
  .mail-layout{ grid-template-columns:1fr; }
  .mail-boxes{ max-height:none; }
  .mail-layout.has-letter .mail-boxes{ display:none; }
  .mail-list{ max-height:none; }
  .mail-reader{ padding:var(--space-4); }
}

/* 25-recordings.css */
/* Lesson recordings (components/recording.js, pages/admin-recordings.js) */
.rec-dot{ width:9px; height:9px; border-radius:50%; background:#D9483B; flex:none; display:inline-block; }
.rec-btn{ display:inline-flex; align-items:center; gap:6px; }
.rec-status{ display:inline-flex; align-items:center; gap:6px; font-size:.78rem; font-weight:700; color:#F3E9E2; padding:4px 10px; border-radius:var(--radius-pill);
  background:rgba(217,72,59,.18); border:1px solid rgba(217,72,59,.45); max-width:44ch; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rec-status.is-on .rec-dot{ animation:rec-pulse 1.4s ease-in-out infinite; }
@keyframes rec-pulse{ 50%{ opacity:.25; } }
@media (prefers-reduced-motion: reduce){ .rec-status.is-on .rec-dot{ animation:none; } }
.rec-short{ display:none; }
@media (max-width: 720px){ .rec-status{ max-width:22ch; } .rec-long{ display:none; } .rec-short{ display:inline; } }

/* the administrators' page */
.recs-table td{ vertical-align:top; }
.recs-player video{ width:100%; max-height:70vh; background:#000; border-radius:var(--radius-md, 10px); }
.recs-replay{ position:relative; overflow:auto; background:#E8E4DA; border-radius:var(--radius-md, 10px); padding:8px; max-height:78vh; }
.recs-replay .replayer-wrapper{ position:relative; transform-origin:0 0; }
.recs-replay iframe{ border:0; background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.15); }

/* rrweb's replayer (node_modules/rrweb/dist/style.css, MIT): the pointer and its click */
.replayer-wrapper{ position:relative; }
.replayer-mouse{ position:absolute; width:20px; height:20px; transition:left .05s linear, top .05s linear; background-size:contain; background-position:center; background-repeat:no-repeat;
  background-image:url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzMwMHB4JyB3aWR0aD0nMzAwcHgnICBmaWxsPSIjMDAwMDAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iTGF5ZXIgMSIgdmlld0JveD0iMCAwIDUwIDUwIiB4PSIwcHgiIHk9IjBweCI+PHRpdGxlPkRlc2lnbl90bnA8L3RpdGxlPjxwYXRoIGQ9Ik00OC43MSw0Mi45MUwzNC4wOCwyOC4yOSw0NC4zMywxOEExLDEsMCwwLDAsNDQsMTYuMzlMMi4zNSwxLjA2QTEsMSwwLDAsMCwxLjA2LDIuMzVMMTYuMzksNDRhMSwxLDAsMCwwLDEuNjUuMzZMMjguMjksMzQuMDgsNDIuOTEsNDguNzFhMSwxLDAsMCwwLDEuNDEsMGw0LjM4LTQuMzhBMSwxLDAsMCwwLDQ4LjcxLDQyLjkxWm0tNS4wOSwzLjY3TDI5LDMyYTEsMSwwLDAsMC0xLjQxLDBsLTkuODUsOS44NUwzLjY5LDMuNjlsMzguMTIsMTRMMzIsMjcuNThBMSwxLDAsMCwwLDMyLDI5TDQ2LjU5LDQzLjYyWiI+PC9wYXRoPjwvc3ZnPg==');
  border-color:transparent; }
.replayer-mouse::after{ content:''; display:inline-block; width:20px; height:20px; background:rgb(73,80,246); border-radius:100%; transform:translate(-50%,-50%); opacity:.3; }
.replayer-mouse.active::after{ animation:rr-click .2s ease-in-out 1; }
.replayer-mouse.touch-device{ background-image:none; width:70px; height:70px; border-width:4px; border-style:solid; border-radius:100%; margin-left:-37px; margin-top:-37px;
  border-color:rgba(73,80,246,0); transition:left 0s linear, top 0s linear, border-color .2s ease-in-out; }
.replayer-mouse.touch-device.touch-active{ border-color:rgba(73,80,246,1); transition:left .25s linear, top .25s linear, border-color .2s ease-in-out; }
.replayer-mouse.touch-device::after{ opacity:0; }
.replayer-mouse.touch-device.active::after{ animation:rr-touch .2s ease-in-out 1; }
.replayer-mouse-tail{ position:absolute; pointer-events:none; }
@keyframes rr-click{ 0%{ opacity:.3; width:20px; height:20px; } 50%{ opacity:.5; width:10px; height:10px; } }
@keyframes rr-touch{ 0%{ opacity:0; width:20px; height:20px; } 50%{ opacity:.5; width:10px; height:10px; } }

/* 26-analytics.css */
/* The teacher's month in numbers (pages/analytics.js): tiles and six months of held lessons */
.kpi-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:var(--space-3); }
.kpi-tile{ display:flex; flex-direction:column; gap:2px; }
.kpi-value{ overflow-wrap:anywhere; font-size:1.9rem; font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; }
.kpi-label{ font-weight:700; }
.kpi-bars{ display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:var(--space-3); height:180px; align-items:end; }
.kpi-bar{ height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:4px; }
.kpi-bar-fill{ width:min(44px, 70%); border-radius:4px 4px 0 0; background:var(--emerald-700); opacity:.45; }
.kpi-bar.is-current .kpi-bar-fill{ opacity:1; }
.kpi-bar:hover .kpi-bar-fill{ opacity:.85; }
.kpi-bar-value{ font-size:.85rem; font-weight:700; font-variant-numeric:tabular-nums; }
.kpi-bar-label{ white-space:nowrap; }
/* site visits (pages/admin-visits.js): visitors per day */
.visit-bars{ display:flex; align-items:flex-end; gap:2px; height:140px; }
.visit-bar{ flex:1; height:100%; display:flex; align-items:flex-end; min-width:0; }
.visit-bar-fill{ width:100%; border-radius:3px 3px 0 0; background:var(--emerald-700); opacity:.8; }
.visit-bar:hover .visit-bar-fill{ opacity:1; }
/* «Установить приложение» (components/install-app.js) */
.install-icon{ border-radius:12px; flex:none; }

/* a mock exam's clock (components/exam.js) */
.exam-clock{ display:flex; align-items:baseline; gap:var(--space-3); }
.exam-clock-time{ font-size:1.35rem; font-weight:800; }
.exam-clock.is-low .exam-clock-time{ color:var(--bad); }

/* 03-app.css */
/* ============================================================
   APP SHELL — adapted from the design prototype (03-shell.css)
   without the prototype chrome; container queries → media queries.
   ============================================================ */
html{ -webkit-text-size-adjust:100%; }
body{ min-height:100vh; }
#app{ min-height:100vh; }
img, video{ max-width:100%; }
.ellipsis{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hide-xs{ }
@media (max-width:520px){ .hide-xs{ display:none !important; } }
@media (max-width:900px){ .hide-sm{ display:none !important; } }
.plain-link{ color:inherit; text-decoration:none; }
.plain-link:hover{ color:var(--emerald-700); }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.85em; background:var(--parchment-dim); padding:1px 5px; border-radius:4px; word-break:break-all; }
.btn.disabled, a.btn[aria-disabled="true"]{ opacity:.5; pointer-events:none; }
.hp{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

.app-shell{ display:flex; min-height:100vh; align-items:stretch; }
.app-rail{ width:var(--rail-w); flex:none; background:var(--emerald-900); color:#E7E2D1; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.app-rail .rail-brand{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:20px 18px; border-bottom:1px solid rgba(255,255,255,.08); }
.app-rail .rail-brand .lv-word{ color:#fff; font-size:1.05rem; }
.rail-burger{ display:none; background:none; border:0; color:#EFEAD9; cursor:pointer; padding:6px; border-radius:8px; }
.app-rail nav{ padding:14px 10px; flex:1; overflow-y:auto; }
.app-rail .rail-section-label{ font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8AA093; padding:14px 10px 6px; }
.rail-link{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:9px; color:#D7DFD5; text-decoration:none; font-size:.875rem; font-weight:700; cursor:pointer; border-left:3px solid transparent; margin-bottom:2px; font-family:var(--font-body); text-align:left; }
.rail-link svg{ width:18px; height:18px; flex:none; opacity:.85; }
.rail-link:hover{ background:rgba(255,255,255,.06); color:#fff; }
.rail-link.active{ background:rgba(214,182,124,.14); color:#fff; border-left-color:var(--gold-500); }
.rail-link .badge-n, .badge-n{ margin-left:auto; background:var(--gold-500); color:var(--emerald-900); font-size:.68rem; font-weight:700; padding:1px 7px; border-radius:999px; }
.app-rail .rail-foot{ padding:14px; border-top:1px solid rgba(255,255,255,.08); }

.app-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.app-topbar{ min-height:64px; flex:none; display:flex; align-items:center; gap:var(--space-4); padding-inline:var(--space-6); border-bottom:1px solid var(--line); background:var(--paper); position:sticky; top:0; z-index:30; }
.app-topbar .tb-title{ font-family:var(--font-display); font-weight:700; font-size:1.2rem; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.app-content{ flex:1; padding: var(--space-6); width:100%; max-width:1280px; }
.app-content.narrow{ max-width:980px; }
.tb-bell{ position:relative; }
.bell-dot{ position:absolute; top:7px; right:8px; width:8px; height:8px; border-radius:50%; background:var(--gold-500); border:2px solid var(--paper); }
.user-menu-wrap{ position:relative; }
.user-menu{ position:absolute; right:0; top:calc(100% + 6px); min-width:220px; padding:6px; z-index:60; display:flex; flex-direction:column; }
.user-menu a, .user-menu button{ display:block; text-align:left; padding:9px 12px; border-radius:8px; background:none; border:0; font:inherit; font-size:.875rem; color:var(--ink); text-decoration:none; cursor:pointer; }
.user-menu a:hover, .user-menu button:hover{ background:var(--emerald-50); }
.test-banner{ background:var(--gold-100); color:var(--gold-700); border-bottom:1px solid var(--gold-300); font-size:.8rem; font-weight:700; padding:7px var(--space-6); }
.test-banner-report{ display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:4px 12px; border:1px solid var(--gold-500); border-radius:999px; background:var(--paper); color:var(--gold-700); font:inherit; font-weight:700; cursor:pointer; }
.test-banner-report:hover{ background:var(--gold-100); }
/* inside the app the banner button replaces the floating one */
body:has(.app-rail) .feedback-fab{ display:none; }
.verify-banner{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:9px var(--space-6); background:var(--info-bg); color:var(--info); border-bottom:1px solid var(--info-line); font-size:.85rem; }

/* Language picker: native select dressed as a compact pill (keeps the platform's own menu and keyboard support) */
.lang-select{ position:relative; display:inline-flex; align-items:center; flex:none; color:var(--ink-soft); }
.lang-select svg{ position:absolute; pointer-events:none; }
.lang-select svg:first-of-type{ left:11px; }
.lang-select svg:last-of-type{ right:10px; }
.lang-select select{ appearance:none; -webkit-appearance:none; font:inherit; font-size:.8125rem; font-weight:700; color:inherit; background:var(--paper);
  border:1px solid var(--line-strong); border-radius:999px; padding:0 30px 0 32px; min-height:36px; cursor:pointer; }
.lang-select select:hover{ border-color:var(--gold-500); }
.lang-select select:focus-visible{ outline:2.5px solid var(--focus-ring); outline-offset:2px; }
.lang-select.on-dark{ color:#E7EEE9; }
.lang-select.on-dark select{ background:transparent; border-color:rgba(247,244,235,.35); }
.lang-select.on-dark select:hover{ border-color:var(--gold-300); }
.lang-select.on-dark select:focus-visible{ outline-color:var(--gold-300); }
.lang-select option{ color:var(--ink); background:var(--paper); }
.user-chip{ display:flex; align-items:center; gap:9px; cursor:pointer; padding:5px 8px 5px 5px; border-radius:999px; border:1px solid transparent; background:none; }
.user-chip:hover{ background:var(--parchment-dim); }

.mobile-tabbar{ display:none; }
.tab-badge{ position:absolute; top:2px; margin-left:18px; background:var(--gold-500); color:var(--emerald-900); font-size:.6rem; padding:0 5px; border-radius:99px; }

@media (max-width: 900px){
  .app-shell{ flex-direction:column; }
  .app-rail{ width:100%; height:auto; position:sticky; top:0; z-index:40; }
  .app-rail .rail-brand{ border:0; padding:10px 14px; }
  .rail-burger{ display:inline-flex; }
  .app-rail nav, .app-rail .rail-foot{ display:none; }
  .app-rail.is-open{ height:100vh; height:100dvh; overflow-y:auto; padding-bottom:calc(72px + env(safe-area-inset-bottom)); } /* last items stay above the tab bar */
  .app-rail.is-open nav, .app-rail.is-open .rail-foot{ display:block; }
  .app-rail.is-open nav{ flex:none; overflow:visible; } /* the whole open menu scrolls, no hidden inner list */
  .app-topbar{ position:static; padding-inline:var(--space-4); min-height:56px; flex-wrap:wrap; gap:var(--space-2); }
  .tb-lang{ display:none; }
  .tb-actions{ flex-wrap:wrap; justify-content:flex-end; gap:var(--space-2); min-width:0; max-width:100%; }
  .app-content{ padding: var(--space-4); padding-bottom:84px; }
  .mobile-tabbar{ display:flex; position:fixed; left:0; right:0; bottom:0; background:var(--paper); border-top:1px solid var(--line); padding:6px 4px calc(6px + env(safe-area-inset-bottom)); gap:2px; z-index:45; }
  .mobile-tabbar a, .mobile-tabbar button{ background:none; border:0; font-family:inherit; cursor:pointer; }
  .mobile-tabbar a, .mobile-tabbar button{ flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 2px; border-radius:10px; color:var(--ink-faint); text-decoration:none; font-size:.62rem; font-weight:700; position:relative; }
  .mobile-tabbar a svg, .mobile-tabbar button svg{ width:19px; height:19px; }
  .mobile-tabbar a.active, .mobile-tabbar button.active{ color:var(--emerald-700); }
}

/* ============================================================
   PUBLIC SITE
   ============================================================ */
/* Contrast: small gold text and captions on light surfaces need the darker tones (WCAG AA 4.5:1) */
:root{ --ink-faint:#5F6D64; }
.eyebrow{ color:var(--gold-700); margin:0; }
a.gold{ color:var(--gold-700); }
.section-dark a.gold, .on-dark a.gold{ color:var(--gold-300); }
.section-dark :focus-visible, .pub-header :focus-visible, .pub-footer :focus-visible, .app-rail :focus-visible{ outline-color:var(--gold-300); }
.optional{ font-weight:400; color:var(--ink-faint); font-size:.78rem; }

/* Brand lockup: original emblem crop + the name set in text */
.lv-mark{ border-radius:50%; }
.lv-lockup.stacked{ flex-direction:column; gap:10px; }
.lv-lockup.stacked .lv-word{ font-size:1.4rem; }
.pub-header .lv-word{ font-size:1.3rem; }

.public [id]{ scroll-margin-top:92px; }
.pub-section{ padding-block:var(--space-20); }
.section-title{ margin:var(--space-3) 0 var(--space-8); max-width:640px; }

/* Header */
.pub-header{ position:sticky; top:0; z-index:50; background:rgba(10,42,34,.96); backdrop-filter:blur(8px); border-bottom:1px solid rgba(255,255,255,.08); }
.pub-bar{ min-height:76px; display:flex; align-items:center; gap:var(--space-6); }
.pub-nav{ display:flex; align-items:center; gap:var(--space-6); margin-left:var(--space-2); }
.pub-nav a:not(.btn){ color:#DCE6DF; text-decoration:none; font-size:.9rem; font-weight:700; padding:10px 0; }
.pub-nav a:not(.btn):hover{ color:#fff; }
.pub-nav-cta{ display:none; }
.pub-header-actions{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.pub-header-actions .btn-sm{ min-height:36px; }
.pub-burger{ display:none; align-items:center; justify-content:center; width:44px; height:44px; margin-right:-8px; background:none; border:0; color:#EFEAD9; cursor:pointer; border-radius:10px; }
/* just above the burger the menu with "Подкаст" would wrap "Как мы учим" and "Пробный урок" to two lines */
@media (min-width:1081px) and (max-width:1200px){ .pub-bar, .pub-nav{ gap:var(--space-4); } }
@media (max-width:1080px){
  .pub-burger{ display:inline-flex; }
  .pub-nav{ display:none; position:absolute; top:100%; left:0; right:0; margin:0; flex-direction:column; align-items:stretch; gap:0;
    background:var(--emerald-900); padding:8px var(--space-5) 20px; border-bottom:1px solid rgba(255,255,255,.1); box-shadow:0 18px 30px -18px rgba(0,0,0,.5); }
  .pub-nav.is-open{ display:flex; }
  .pub-nav a:not(.btn){ padding:13px 0; font-size:1rem; border-bottom:1px solid rgba(255,255,255,.07); }
  .pub-nav-cta{ display:inline-flex; margin-top:16px; }
  .pub-bar{ gap:var(--space-3); min-height:68px; }
  .pub-header-actions{ gap:8px; }
  .public [id]{ scroll-margin-top:80px; }
}
@media (max-width:560px){
  .pub-cta{ display:none; }
  .pub-header .lv-word{ display:none; }
  .pub-header .lang-select svg:first-of-type{ display:none; }
  .pub-header .lang-select select{ padding-left:12px; }
}

/* Hero: typography + the original emblem as the visual accent */
.hero{ position:relative; overflow:hidden; isolation:isolate;
  background: radial-gradient(900px 560px at 80% 50%, #134534 0%, rgba(19,69,52,0) 62%), var(--emerald-900); }
.hero-grid{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); align-items:center; gap:var(--space-12);
  min-height:min(680px, calc(100svh - 76px)); padding-block:var(--space-16); }
.hero-title{ font-family:var(--font-display); font-weight:700; font-size:clamp(2.1rem, 1rem + 3.6vw, 3.9rem); line-height:1.06; letter-spacing:-.018em; color:#fff; margin:var(--space-4) 0 var(--space-6); }
.hero-title span{ display:block; }
@media (min-width:861px){ .hero-title span{ white-space:nowrap; } }
@media (max-width:860px){ .hero-title{ font-size:clamp(2.1rem, 1.2rem + 3.6vw, 2.9rem); } }
.hero-title .accent{ color:var(--gold-300); }
.hero-lead{ font-size:clamp(1.06rem, .98rem + .35vw, 1.25rem); line-height:1.6; color:#D3DED7; max-width:30em; margin:0 0 var(--space-8); text-wrap:pretty; }
.hero-cta{ gap:10px; }
.hero-art{ position:relative; justify-self:center; width:min(100%, 400px); aspect-ratio:1; }
.hero-halo{ position:absolute; inset:-16%; border-radius:50%; pointer-events:none;
  background: radial-gradient(closest-side, rgba(216,182,124,.30), rgba(216,182,124,.10) 58%, rgba(216,182,124,0) 76%);
  transform:translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -12px)); transition:transform .6s ease-out; }
.hero-halo::after{ content:''; position:absolute; inset:10%; border-radius:50%; border:1px solid rgba(216,182,124,.26); }
.hero-emblem{ position:relative; transform:translate(calc(var(--mx, 0) * 10px), calc(var(--my, 0) * 10px)); transition:transform .6s ease-out; }
.lv-emblem, .lv-emblem img{ display:block; width:100%; height:auto; }
.lv-emblem img{ border-radius:50%; filter:drop-shadow(0 26px 44px rgba(0,0,0,.45)) drop-shadow(0 0 26px rgba(216,182,124,.22)); }
@media (prefers-reduced-motion:no-preference){
  .hero-emblem .lv-emblem{ animation:emblem-in .9s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes emblem-in{ from{ opacity:0; transform:scale(.95); } to{ opacity:1; transform:none; } }
@media (max-width:860px){
  .hero-grid{ grid-template-columns:1fr; gap:var(--space-6); min-height:0; padding-block:var(--space-8) var(--space-12); }
  .hero-art{ order:-1; width:min(52vw, 230px); }
  .hero-title{ margin-top:var(--space-3); }
}
@media (max-width:520px){ .hero-cta{ width:100%; } }

/* Benefits, directions, how it works */
.benefits{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:var(--space-8) var(--space-6); }
.benefit h3{ margin:14px 0 6px; }
.benefit p{ margin:0; }
.benefit-icon{ display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; border-radius:50%; background:var(--gold-100); }
@media (min-width:600px) and (max-width:860px){ #pub-directions .grid-4{ grid-template-columns:repeat(2, 1fr); } }
.dir-card h3{ margin:14px 0 6px; }
.dir-card p{ margin:0; }
.section-dark{ background:var(--emerald-900); color:#EFEAD9; }
.section-dark .h1, .section-dark .h2, .section-dark .h3, .section-dark .display-1, .section-dark .display-2{ color:#fff; }
.section-dark .lead, .section-dark .body-text{ color:#C9D6CE; }
.section-dark .card{ color:var(--ink); }
.section-dark .card .h3{ color:var(--ink); }
.on-dark-soft{ color:#C9D6CE; }
.how-grid{ grid-template-columns:1fr 1fr; align-items:center; gap:var(--space-12); }
@media (max-width:860px){ .how-grid{ grid-template-columns:1fr; gap:var(--space-8); } }
.steps{ list-style:none; margin:0 0 var(--space-8); padding:0; display:flex; flex-direction:column; gap:14px; }
.steps li{ display:flex; gap:14px; align-items:flex-start; }
.steps b{ display:block; color:#fff; }
.steps span:not(.step-n){ color:#C9D6CE; font-size:.9rem; }
.step-n{ flex:none; width:30px; height:30px; border-radius:50%; border:1.5px solid var(--gold-300); color:var(--gold-300); display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; }
.room-mock{ background:#0F231C; border-color:rgba(255,255,255,.08); padding:14px; border-radius:var(--radius-l); }
.mock-chip{ background:#1B3A2F; border-radius:6px; padding:7px 10px; font-size:.78rem; color:#EFEAD9; }
.mock-chip.gold{ background:var(--gold-500); color:var(--emerald-900); font-weight:700; }
.mock-tile{ background:#1B3A2F; border-radius:8px; aspect-ratio:1; display:flex; align-items:center; justify-content:center; color:#EFEAD9; }
.mock-title{ font-weight:700; color:#EFEAD9; }
.mock-caption{ color:#A9BCB1; }
.mock-panel{ background:#152F26; border-radius:10px; padding:14px; }

/* Teacher: only confirmed, filled-in fields are rendered */
.teacher{ display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:var(--space-6) var(--space-12); align-items:start; }
.teacher.has-photo{ grid-template-columns:minmax(200px, 300px) minmax(0,1fr); }
.teacher.has-photo .teacher-photo{ grid-row:span 2; }
.teacher.compact{ display:block; }
.teacher-photo{ width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; border-radius:var(--radius-l); box-shadow:0 20px 40px -24px rgba(10,42,34,.55); }
.teacher-head{ border-left:3px solid var(--gold-500); padding-left:var(--space-5); }
.teacher-head > .btn{ margin-top:var(--space-4); } /* the button no longer touches the line of free times */
.teacher-name{ font-family:var(--font-display); font-weight:700; font-size:clamp(1.8rem, 1.5rem + 1vw, 2.4rem); line-height:1.1; margin:0; }
.teacher-headline{ font-weight:700; color:var(--gold-700); margin:10px 0 0; }
.teacher-body p{ margin-bottom:var(--space-4); }
.teacher-approach{ margin-top:var(--space-4); padding-top:var(--space-5); border-top:1px solid var(--line); }
.teacher-approach .h4{ margin-bottom:8px; }
.chips{ list-style:none; margin:var(--space-4) 0 0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.chips li{ font-size:.8rem; font-weight:700; color:var(--emerald-700); background:var(--emerald-50); border:1px solid var(--emerald-100); border-radius:999px; padding:5px 11px; }
@media (max-width:760px){ .teacher, .teacher.has-photo{ grid-template-columns:1fr; } .teacher.has-photo .teacher-photo{ grid-row:auto; max-width:280px; } }

/* Pricing */
.pricing-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,420px); gap:var(--space-8) var(--space-12); align-items:center; }
.pricing-grid .body-text{ margin:0; }
.price-card .h4{ margin-bottom:6px; }
.price-card .btn{ margin-top:var(--space-4); }
.price{ font-family:var(--font-display); font-weight:700; font-size:2.2rem; line-height:1.1; margin-bottom:4px; }
.pack-list{ list-style:none; margin:8px 0 0; padding:0; }
.pack-list li{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:.9rem; }
@media (max-width:760px){ .pricing-grid{ grid-template-columns:1fr; } }

/* Trial request */
.trial-grid{ align-items:start; }
.trial-grid .lead{ margin-bottom:var(--space-5); }
.trial-terms{ display:flex; flex-wrap:wrap; gap:var(--space-3) var(--space-8); margin:0 0 var(--space-4); }
.trial-terms dt{ font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--gold-300); }
.trial-terms dd{ margin:2px 0 0; font-family:var(--font-display); font-size:1.4rem; color:#fff; }
.trial-login{ margin-top:var(--space-6); color:#C9D6CE; }
.trial-login a{ font-weight:700; }
.goal-set{ border:0; margin:0 0 var(--space-3); padding:0; min-width:0; }
.goal-set legend{ padding:0; margin-bottom:8px; }
.goal-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.goal-chip{ position:relative; display:inline-flex; align-items:center; min-height:40px; padding:8px 14px; border:1.5px solid var(--line-strong); border-radius:999px; font-size:.85rem; font-weight:700; color:var(--ink-soft); cursor:pointer; background:var(--paper); }
.goal-chip:hover{ border-color:var(--gold-500); }
.goal-chip input{ position:absolute; opacity:0; width:1px; height:1px; }
.goal-chip:focus-within{ outline:2.5px solid var(--focus-ring); outline-offset:2px; }
.goal-chip.is-on{ background:var(--emerald-700); border-color:var(--emerald-700); color:#fff; }
.more-toggle{ display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0; margin-bottom:var(--space-2); border:0; background:none; font:inherit; font-size:.875rem; font-weight:700; color:var(--emerald-700); cursor:pointer; }
.more-toggle svg{ transform:rotate(-90deg); transition:transform .15s; }
.more-toggle[aria-expanded="true"] svg{ transform:none; }
.consent{ margin-bottom:var(--space-4); }
.trial-hint{ text-align:center; margin:10px 0 0; }
.trial-done .h3{ outline:none; }

/* FAQ */
.faq summary{ display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:28px; cursor:pointer; font-weight:700; list-style:none; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary svg{ flex:none; color:var(--emerald-700); transition:transform .15s; }
.faq[open] summary svg{ transform:rotate(180deg); }
.faq p{ margin:10px 0 0; }

/* Footer */
.pub-footer{ background:var(--emerald-900); color:#C9D6CE; padding:var(--space-16) 0 var(--space-8); }
.pub-footer a{ color:#C9D6CE; text-decoration:none; }
.pub-footer a:hover{ color:#fff; text-decoration:underline; }
.pub-footer .stack a{ padding:3px 0; }
.foot-h{ color:#fff; margin:0 0 var(--space-3); font-family:var(--font-body); font-size:.95rem; }
.foot-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:var(--space-8); margin-bottom:var(--space-10); }
.foot-about{ max-width:300px; color:#C9D6CE; margin-top:14px; }
.foot-bottom{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-top:var(--space-6); border-top:1px solid rgba(255,255,255,.1); }
.foot-bottom .caption{ color:#A9BCB1; }
@media (max-width:760px){ .foot-grid{ grid-template-columns:1fr 1fr; } .foot-grid > :first-child{ grid-column:1 / -1; } .pub-section{ padding-block:var(--space-12); } }

.auth-page{ min-height:100vh; background:var(--parchment); }
.auth-top{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 20px; }
.auth-brand{ display:flex; justify-content:center; margin-bottom:var(--space-6); }
.otp-input{ font-size:1.4rem; letter-spacing:.3em; text-align:center; font-variant-numeric:tabular-nums; }
.secret-code{ font-size:.95rem; letter-spacing:.06em; padding:6px 10px; }
.progress-bar{ height:5px; background:var(--line); border-radius:99px; overflow:hidden; }
.progress-bar > div{ height:100%; background:var(--emerald-600); border-radius:99px; transition:width .3s; }
.progress-bar.thin{ height:4px; margin-top:4px; }

/* ============================================================
   COMMON BLOCKS
   ============================================================ */
.notice{ display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border-radius:var(--radius-m); border:1px solid transparent; font-size:.875rem; }
.notice svg{ flex:none; margin-top:1px; }
.notice-info{ background:var(--info-bg); border-color:var(--info-line); color:#2B536D; }
.notice-good{ background:var(--good-bg); border-color:var(--good-line); color:#1E5B3D; }
.notice-warn{ background:var(--warn-bg); border-color:var(--warn-line); color:#7A4F12; }
.notice-bad{ background:var(--bad-bg); border-color:var(--bad-line); color:#7E2B26; }
.notice a{ color:inherit; font-weight:700; }
.page-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:var(--space-5); }
.list-card{ display:block; text-decoration:none; color:inherit; transition:border-color .15s, box-shadow .15s; }
.list-card:hover{ border-color:var(--gold-300); box-shadow:0 1px 2px rgba(23,38,32,.06), 0 10px 26px -12px rgba(23,38,32,.3); }
.overview-grid{ grid-template-columns:1.6fr 1fr; align-items:start; }
@media (max-width:860px){ .overview-grid{ grid-template-columns:1fr; } }
.todo-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; font-size:.875rem; }
.todo-list li{ display:flex; gap:8px; align-items:center; }
.todo-list svg{ color:var(--emerald-600); flex:none; }
.slot-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(92px, 1fr)); gap:8px; }
.booking-row{ display:flex; align-items:center; gap:var(--space-5); flex-wrap:wrap; }
.booking-when{ min-width:150px; }
.agenda-row{ padding-bottom:10px; border-bottom:1px solid var(--line); }
.avail-row, .ledger-row, .pay-row{ padding:6px 0; border-bottom:1px solid var(--line); }
.feature-row{ padding-bottom:8px; border-bottom:1px dashed var(--line); }
.note-item{ padding:10px 12px; background:var(--gold-100); border:1px dashed var(--gold-300); border-radius:var(--radius-s); }
.bar-chart{ display:flex; align-items:flex-end; gap:12px; height:160px; }
.bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; }
.bar{ width:100%; max-width:46px; background:var(--emerald-600); border-radius:6px 6px 0 0; margin-top:auto; min-height:4px; position:relative; }
.bar span{ position:absolute; top:-18px; left:0; right:0; text-align:center; font-size:.72rem; color:var(--ink-soft); font-weight:700; }
.notif{ text-align:left; width:100%; cursor:pointer; font:inherit; color:inherit; }
.notif.unread{ border-left:4px solid var(--gold-500); background:color-mix(in srgb, var(--gold-100) 55%, var(--paper)); }
.notif:not(.unread){ color:var(--ink-soft); }
.notif:not(.unread) b{ font-weight:600; }
.pill-x{ background:none; border:0; cursor:pointer; margin-left:4px; font-size:1rem; line-height:1; color:inherit; }
.sticky-status{ position:sticky; top:64px; z-index:5; background:var(--parchment); padding:8px 0; margin-bottom:var(--space-4); }
@media (max-width:900px){ .sticky-status{ top:56px; } }
.audit-diff{ max-width:420px; word-break:break-word; font-family:ui-monospace, monospace; font-size:.72rem; }

/* flashcards */
.flashcard-wrap{ max-width:520px; margin:0 auto; text-align:center; }
.flashcard{ width:100%; min-height:220px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:30px; cursor:pointer; border:1px solid var(--line); font:inherit; color:inherit; }
/* illustrated word: the picture fills the top of the card */
.flashcard.has-img{ padding:0 0 24px; overflow:hidden; justify-content:flex-start; gap:4px; }
.flashcard-img{ width:100%; aspect-ratio:1/1; max-height:340px; object-fit:cover; margin-bottom:14px; }
.flashcard.has-img > :not(img){ padding:0 20px; }

/* messages */
.msg-layout{ display:grid; grid-template-columns:300px 1fr; gap:var(--space-5); height:calc(100vh - 64px - 48px); min-height:480px; }
.msg-list{ overflow-y:auto; padding:6px; }
.msg-item{ display:flex; gap:10px; align-items:center; padding:10px; border-radius:10px; text-decoration:none; color:inherit; }
.msg-item:hover{ background:var(--emerald-50); }
.msg-item.active{ background:var(--emerald-100); }
.msg-conv{ display:flex; flex-direction:column; overflow:hidden; }
.msg-head{ display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--line); }
.msg-back{ display:none; }
.msg-body{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:8px; background:var(--parchment); }
.msg{ max-width:75%; padding:9px 12px; border-radius:14px; font-size:.9rem; line-height:1.45; }
.msg.mine{ align-self:flex-end; background:var(--emerald-700); color:#fff; border-bottom-right-radius:4px; }
.msg.theirs{ align-self:flex-start; background:var(--paper); border:1px solid var(--line); border-bottom-left-radius:4px; }
.msg-text{ white-space:pre-wrap; word-break:break-word; }
.msg-time{ font-size:.66rem; opacity:.7; margin-top:3px; text-align:right; }
.msg-day{ align-self:center; font-size:.72rem; color:var(--ink-faint); padding:4px 10px; }
.msg-img{ max-width:240px; border-radius:8px; display:block; margin-top:4px; }
.msg-file{ display:inline-flex; gap:4px; align-items:center; color:inherit; font-size:.82rem; margin-top:4px; }
.msg-input{ display:flex; gap:8px; align-items:flex-end; padding:10px; border-top:1px solid var(--line); flex-wrap:wrap; }
.msg-input textarea{ min-height:42px; resize:none; flex:1 1 140px; min-width:0; width:auto; }
.msg-input > .btn, .msg-input > label.btn{ flex:0 0 auto; }
@media (max-width:900px){
  .msg-layout{ grid-template-columns:1fr; height:auto; }
  .msg-layout.has-conv .msg-list{ display:none; }
  .msg-layout:not(.has-conv) .msg-conv, .msg-layout:not(.has-conv) .msg-empty{ display:none; }
  .msg-back{ display:inline-flex; }
  /* phones: the conversation grows with its content and the composer sticks above the bottom tab bar */
  .msg-conv{ height:auto; min-height:60dvh; overflow:visible; }
  .msg-conv .msg-body{ flex:1; }
  .msg-input{ position:sticky; bottom:calc(76px + env(safe-area-inset-bottom)); background:var(--paper); z-index:5; border-radius:0 0 var(--radius-m, 14px) var(--radius-m, 14px); }
}

/* editor */
.editor-layout{ display:grid; grid-template-columns:1fr 280px; gap:var(--space-5); align-items:start; }
.editor-layout > *{ min-width:0; }
.editor-side{ position:sticky; top:80px; }
@media (max-width:1000px){ .editor-layout{ grid-template-columns:1fr; } .editor-side{ position:static; } }
.block-card{ border-left:3px solid var(--line-strong); }
.opt-edit{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.opt-edit > .input:not(select){ flex:1 1 170px; min-width:0; }
.opt-edit > .opt-tools{ margin-left:auto; }
.type-menu{ display:flex; flex-wrap:wrap; gap:8px; }
.type-btn{ display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border:1.5px solid var(--line-strong); background:var(--paper); border-radius:999px; font:inherit; font-size:.8rem; font-weight:700; color:var(--emerald-800); cursor:pointer; }
.type-btn:hover{ border-color:var(--emerald-600); background:var(--emerald-50); }
.insert-after{ margin-top:10px; padding-top:8px; border-top:1px dashed var(--line); }
.note-edit{ margin-top:10px; }
.note-edit summary{ cursor:pointer; color:var(--gold-700); font-weight:700; }
.note-edit textarea{ margin-top:6px; background:var(--gold-100); }
.rte-bar{ display:flex; gap:4px; margin-bottom:6px; }
.rte-bar button{ border:1px solid var(--line-strong); background:var(--paper); border-radius:6px; padding:4px 10px; cursor:pointer; font:inherit; font-size:.8rem; }
.rte-body{ min-height:110px; line-height:1.6; }
.rich p{ margin:0 0 .6em; }
.rich ul, .rich ol{ margin:0 0 .6em; padding-left:1.3em; }

/* exercises */
.ex-block{ scroll-margin-top:90px; }
/* Every lesson block is a card of the design (room, homework, previews). A task is a framed card whose header carries its
   number in the lesson and its instruction as the title (Alina, 17.10: tasks as separate blocks, the title larger).
   The frame beats the borderless cards of some designs (same specificity, this file comes last). */
.ex-list{ gap:var(--space-8); }
.ex-list .section-title{ margin-bottom:0; }
:root .card.ex-card{ border:1px solid var(--line-strong); }
.ex-card{ padding:16px 18px; }
/* The header is a dark fill in the colours of the home page's dark sections with a bold white title (Alina, 18.10:
   "dark purple like on the main page, a little brighter so it stands out, the font bolder"). */
:root{ --task-head-bg:linear-gradient(135deg,var(--emerald-900),var(--emerald-800)); --task-head-ink:#fff; --task-head-kicker:rgba(255,255,255,.74); }
:root[data-theme="aurora"]{ --task-head-bg:linear-gradient(120deg,#2A2770 0%,#3A2DA6 58%,#5536D8 100%); --task-head-kicker:#7DE6F5; }
:root[data-theme="velvet"]{ --task-head-bg:linear-gradient(135deg,#2A2340,#3B2F5E); --task-head-kicker:#E3C27A; }
.ex-top{ display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:6px 12px;
  margin:-16px -18px 14px; padding:14px 18px; background:var(--task-head-bg); color:var(--task-head-ink);
  border-radius:calc(var(--radius-l) - 1px) calc(var(--radius-l) - 1px) 0 0; }
.ex-top-main{ flex:1 1 260px; min-width:0; }
.ex-top-side{ flex:none; }
.ex-top .ex-num{ margin:0 0 4px; color:var(--task-head-kicker); }
.ex-title{ margin:0; font-family:var(--font-body); font-size:1.28rem; font-weight:800; line-height:1.3; letter-spacing:-.01em; color:inherit; overflow-wrap:anywhere; text-shadow:0 1px 2px rgba(0,0,0,.3); }
.ex-title.is-long{ font-size:1.08rem; }
/* Aurora tasks in contrast: black text, purple frames, white fields (Alina, 18.10: "black, purple and white, so that it
   plays on contrast; now it all merges") */
:root[data-theme="aurora"] .ex-card{ --ink:#0E0B1F; --ink-soft:#1E1A36; --ink-faint:#3B3560; --line:#C6BCF3; --line-strong:#8E7EE0;
  --field-border:#8E7EE0; --parchment-dim:#F7F5FF; background:#fff; }
:root[data-theme="aurora"] .card.ex-card{ border-color:#8E7EE0; }
:root[data-theme="aurora"] .ex-card .word-chip, :root[data-theme="aurora"] .ex-card .chip:not(.placed):not(.is-ok):not(.is-bad){ color:var(--ink); }
.ex-tools{ margin-bottom:10px; }
.ex-head{ margin-bottom:8px; }
.ex-head .ex-tools{ margin:0 0 0 auto; }
/* a card inside a task card (the text with gaps, the teacher's shared copy) is a quiet inset, not a second card */
:root .ex-card .card{ box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; border:1px solid var(--line); }
:root .ex-card .card.gap-text, :root .ex-card .card.tok-text{ background:var(--parchment); }
.ex-shared > .caption{ margin-bottom:6px; }
/* A task with several examples (exercises.js taskGroups; Alina, 19.10: one task, several examples inside): one card,
   the examples numbered like the sentences of a gap text */
.ex-items{ list-style:none; margin:0; padding:0; counter-reset:ex-item; }
.ex-items > li{ counter-increment:ex-item; position:relative; padding:14px 0 14px 40px; scroll-margin-top:90px; }
.ex-items > li:first-child{ padding-top:2px; }
.ex-items > li + li{ border-top:1px dashed var(--line); }
.ex-items > li::before{ content:counter(ex-item); position:absolute; left:0; top:14px; display:inline-flex; align-items:center; justify-content:center;
  min-width:1.9em; height:1.9em; padding:0 5px; border-radius:999px; background:var(--emerald-100); color:var(--emerald-700); font-size:.82rem; font-weight:800; line-height:1; }
.ex-items > li:first-child::before{ top:2px; }
.ex-item .ex-hint{ margin-bottom:8px; }
.ex-item-tools{ margin-top:6px; }
.ex-item-answer > div + div{ margin-top:3px; }
.ex-item-q{ margin-bottom:4px; }
.ex-item-mark{ font-weight:800; }
.ex-item-mark.is-ok{ color:var(--good); }
.ex-item-mark.is-bad{ color:var(--bad); }
/* the student's answer on the teacher's page: mistakes in red, right parts in green (Alina, 18.11) */
.ans-bad{ color:var(--bad); background:var(--bad-bg); border-radius:4px; padding:0 3px; font-weight:600; text-decoration:underline wavy var(--bad); text-underline-offset:3px; }
.ans-ok{ color:var(--good); }
.ex-group .key-list > li + li{ margin-top:6px; }
.ex-group-shared{ margin:0 0 8px; }
@media (max-width:700px){
  .ex-items > li{ padding-left:34px; }
}
.stage-homework{ justify-content:flex-end; margin:calc(-1 * var(--space-2)) 0 var(--space-4); }
@media (max-width:700px){
  .ex-card{ padding:14px; }
  .ex-top{ margin:-14px -14px 12px; padding:11px 14px; }
  .ex-title{ font-size:1.12rem; }
  :root .ex-card .card.gap-text, :root .ex-card .card.tok-text{ padding:8px 10px; }
  .gap-lines{ padding-left:1.7em; }
}
.section-title{ padding-bottom:6px; border-bottom:2px solid var(--gold-300); }
.gap-text{ line-height:2.3; }
/* a list of sentences is numbered by sentence; in other texts each gap carries its number (as in the answer key) */
.gap-lines{ margin:0; padding-left:2.1em; }
.gap-lines > li{ padding:2px 0; }
.gap-lines > li + li{ border-top:1px dashed var(--line); }
.gap-lines > li::marker{ font-weight:800; color:var(--emerald-700); }
.gap-numbered{ display:inline-flex; align-items:center; max-width:100%; vertical-align:middle; }
.gap-n{ display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:1.7em; height:1.7em; padding:0 5px; margin-left:3px;
  border-radius:999px; background:var(--emerald-100); color:var(--emerald-700); font-size:.78rem; font-weight:800; line-height:1; }
.gap-input{ display:inline-block; width:auto; max-width:100%; padding:5px 9px; margin:0 3px; font-size:.95rem; }
.gap-input.ok{ border-color:var(--good); background:var(--good-bg); }
.gap-input.bad{ border-color:var(--bad); background:var(--bad-bg); }
.match-btn:disabled{ cursor:default; }
.match-btn.linked{ border-color:var(--emerald-600); background:var(--emerald-50); }
.match-btn.used{ opacity:.55; }
.match-link{ display:block; font-size:.78rem; color:var(--ink-soft); margin-top:3px; }
.rec-dot.pulsing{ animation: rec-pulse 1s ease infinite; }
.block-img{ border-radius:var(--radius-m); border:1px solid var(--line); max-height:420px; object-fit:contain; background:#fff; }
.block-video{ width:100%; max-width:640px; border-radius:var(--radius-m); background:#000; }
.doc-link{ display:inline-flex; align-items:center; text-decoration:none; color:inherit; }
.teacher-comment{ background:var(--info-bg); border:1px solid var(--info-line); border-radius:var(--radius-s); padding:10px 12px; margin-top:10px; font-size:.85rem; color:#2B536D; white-space:pre-wrap; }
.teacher-comment .lbl, .answer-box .lbl{ display:block; font-weight:700; text-transform:uppercase; letter-spacing:.05em; font-size:.66rem; margin-bottom:4px; }
.teacher-view.is-focus{ outline:2px solid var(--gold-500); outline-offset:2px; }
.answer-box{ background:var(--emerald-50); border:1px solid var(--emerald-100); border-radius:var(--radius-s); padding:10px 12px; margin-top:8px; font-size:.88rem; }
.key-list{ margin:0 0 6px; padding-left:18px; }
.key-list .is-key{ color:var(--good); font-weight:700; }
.key-list .key-explain{ font-weight:400; color:var(--ink-soft); margin-top:2px; }
.review-grid{ grid-template-columns:1fr 140px; gap:8px; }
@media (max-width:600px){ .review-grid{ grid-template-columns:1fr; } }
.teacher-note{ display:block; }
.stripe-mount{ min-height:120px; }

/* room (overrides for the live product) */
.room-page{ min-height:100vh; background:var(--parchment); }
.room-shell{ height:100vh; height:100dvh; min-height:0; }
.room-body{ min-height:0; overflow:hidden; }
.room-material{ position:relative; }
.room-video-col .vt-video{ position:absolute; inset:0; width:100%; height:100%; border-radius:12px; background:var(--room-tile-bg); }
.video-tile{ overflow:hidden; }
.video-tile.small-tile{ aspect-ratio:16/9; }
.vt-name{ z-index:2; } .vt-mic{ z-index:2; }
.ctrl-btn.light{ background:var(--emerald-100); color:var(--emerald-800); border-color:var(--emerald-100); }
.ctrl-btn.light.is-off{ background:#B23B34; color:#fff; border-color:#B23B34; }
.pb-btn{ appearance:none; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.04); color:#EFEAD9; border-radius:8px; padding:7px 11px; font-size:.78rem; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; gap:6px; font-family:var(--font-body); }
.pb-btn:hover{ background:rgba(255,255,255,.1); }
.pb-btn.is-active{ background:var(--gold-500); border-color:var(--gold-500); color:var(--emerald-900); }
.pb-btn.light{ color:var(--ink); border-color:var(--line-strong); background:var(--paper); }
.pb-btn.light.is-active{ background:var(--gold-100); border-color:var(--gold-500); }
.online-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:#4ADE80; margin-left:4px; vertical-align:middle; }
.dp-video{ width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
.dp-overlay{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(10,26,20,.4); }
.room-toast{ position:fixed; bottom:90px; left:50%; transform:translateX(-50%); background:var(--bad); color:#fff; padding:10px 16px; border-radius:10px; z-index:80; }
.stage-chip:disabled{ opacity:.55; cursor:default; }
@media (max-width: 900px){
  .room-body{ grid-template-columns:1fr; }
  .room-video-col{ flex-direction:column; overflow-y:auto; }
  .video-tile{ width:100%; aspect-ratio:16/10; }
  .room-panel{ max-height:none; }
  .room-mobile-switch{ display:flex; gap:6px; padding:8px 12px; background:var(--paper); border-bottom:1px solid var(--line); }
  .room-mobile-switch button{ flex:1; border:1px solid var(--line-strong); background:var(--paper); border-radius:8px; padding:8px; font-size:.78rem; font-weight:700; color:var(--ink-soft); cursor:pointer; }
  .room-mobile-switch button.active{ background:var(--emerald-100); border-color:var(--emerald-600); color:var(--emerald-800); }
  .room-app:not([data-mobile-view="material"]) .room-material{ display:none; }
  .room-app[data-mobile-view="material"] .room-video-col{ display:none !important; }
  .room-app[data-mobile-view="chat"] .video-tile{ display:none; }
  .room-app.in-person .room-video-col{ display:flex !important; }
  .room-controls{ padding:8px; gap:6px; }
  .ctrl-label-btn{ padding:0 10px; font-size:.72rem; }
  .room-topbar{ padding-inline:var(--space-3); }
}
@media (min-width: 901px){ .room-mobile-switch{ display:none; } }
.room-app.in-person .room-body{ grid-template-columns: 1fr 300px; }
.room-app.in-person .room-video-col{ display:flex; }
@media (max-width:900px){ .room-app.in-person .room-body{ grid-template-columns:1fr; } }

@media print{ .app-rail, .app-topbar, .mobile-tabbar{ display:none !important; } }

/* Touch screens: text links in forms and lists get a taller hit area (≥40px) without moving the text */
@media (pointer: coarse){
  .auth-page a:not(.btn), .todo-list a, a.plain-link, .stack > a.row, .caption a, .small a{ padding-block:10px; margin-block:-10px; }
  .btn-sm{ min-height:36px; }
  .todo-list{ gap:14px; }
}

/* lesson library */
.lib-filters{ margin:var(--space-4) 0 var(--space-3); }
.lib-filters .input{ width:auto; max-width:100%; }
.lib-filters .lib-search{ flex:1 1 260px; min-width:0; }
.lib-card{ display:flex; flex-direction:column; position:relative; }
.lib-card.is-selected{ outline:2px solid var(--good); outline-offset:-2px; }
.lib-select input{ width:20px; height:20px; }
.lib-card-more{ margin-top:6px; padding-top:6px; border-top:1px dashed var(--line); }

/* lesson classification */
.cls-chips{ display:flex; flex-wrap:wrap; gap:4px; margin-bottom:10px; }
.cls-chip{ font-size:.72rem; font-weight:700; padding:2px 8px; border-radius:999px; background:var(--parchment-dim); color:var(--ink-soft); }
.cls-chip.cls-skill{ background:var(--info-bg); color:var(--info); }
.cls-chip.cls-auto{ background:var(--warn-bg); color:var(--warn); }
.cls-picker{ margin-top:4px; }
.cls-options{ display:flex; flex-wrap:wrap; gap:6px; }
.cls-option{ font:inherit; font-size:.8rem; font-weight:600; padding:5px 11px; border-radius:999px; border:1.5px solid var(--field-border); background:var(--paper); color:var(--ink-soft); cursor:pointer; }
.cls-option.on{ background:var(--emerald-700); border-color:var(--emerald-700); color:#fff; }
.cls-option:disabled{ cursor:default; opacity:.7; }
.muted-row td{ opacity:.55; }

/* courses */
.course-card{ display:flex; flex-direction:column; }
.course-cover{ width:100%; aspect-ratio:16/7; object-fit:cover; border-radius:10px; background:var(--parchment-dim); }
.course-cover-empty{ display:flex; align-items:center; justify-content:center; color:var(--ink-faint); }
.course-layout{ max-width:900px; }
.module-lessons{ list-style:none; padding:0; margin:0 0 10px; display:flex; flex-direction:column; gap:6px; }
.module-lesson{ display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:var(--paper); flex-wrap:wrap; }
.module-lesson-title{ flex:1 1 220px; min-width:0; display:flex; flex-direction:column; }
.module-lesson-title a{ font-weight:700; color:var(--ink); }
.picker-list{ max-height:55vh; overflow-y:auto; }
.picker-row{ display:flex; align-items:center; gap:10px; padding:6px 4px; border-bottom:1px solid var(--line); }

/* dictionary & lesson vocabulary */
.vocab-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.vocab-item{ padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.vocab-context{ gap:6px 10px !important; margin-top:8px; }
.entry-line b{ color:var(--ink); }
.import-row{ display:flex; align-items:center; gap:10px; padding:6px 4px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.import-word{ flex:1 1 220px; min-width:0; }
.input.input-sm{ padding:6px 10px; font-size:.85rem; }
tr.row-link{ cursor:pointer; }
tr.row-link:hover td, tr.row-link:focus-visible td{ background:var(--parchment-dim); }
.vocab-stats{ grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); }

/* upcoming vocabulary */
.upcoming-card .upcoming-count{ font-size:.82rem; padding:4px 10px; border-radius:999px; background:var(--parchment-dim); }
.upcoming-words{ list-style:none; padding:0; margin:10px 0 0; display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:6px 16px; }
.upcoming-words li{ font-size:.9rem; display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; }
.upcoming-words li .caption{ flex-basis:100%; }

/* AI copilot */
.ai-panel{ border-style:dashed; }
.ai-review-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; }
.ai-review-item{ border:1px solid var(--line); border-radius:var(--radius-sm, 8px); padding:8px 10px; }
.ai-review-item.on{ border-color:var(--accent-line, var(--line)); background:var(--surface-2, transparent); }
.ai-review-item .pill{ margin-left:6px; vertical-align:middle; }
.ai-review-edit{ display:flex; flex-direction:column; gap:6px; margin:8px 0 2px 26px; }
.cls-option.ai-new{ box-shadow:inset 0 0 0 2px var(--good, #2f7d4f); }
.cls-option.ai-cur-only{ text-decoration:underline dotted; }
.ai-legend{ display:inline-block; padding:1px 8px; border-radius:999px; font-size:.78rem; margin-right:8px; }
.ai-legend.ai-new{ box-shadow:inset 0 0 0 2px var(--good, #2f7d4f); }
.ai-legend.ai-cur-only{ text-decoration:underline dotted; }
dl.kv{ display:grid; grid-template-columns:max-content 1fr; gap:4px 16px; margin:0; }
dl.kv dt{ color:var(--muted, inherit); }
dl.kv dd{ margin:0; font-weight:600; }
.lib-select{ position:absolute; top:10px; right:10px; padding:4px; cursor:pointer; }

/* ===== listening & speaking practice ===== */
.player-bar{ margin-top:6px; }
.seg-mini{ display:inline-flex; border:1px solid var(--line); border-radius:999px; overflow:hidden; }
.seg-mini button{ border:0; background:transparent; font:inherit; font-size:.78rem; font-weight:700; padding:4px 9px; cursor:pointer; color:var(--ink-soft, inherit); min-height:30px; }
.seg-mini button.on{ background:var(--emerald-700, #1f5c45); color:#fff; }
.btn.is-on{ background:var(--parchment-dim, #f3efe4); }
.transcript{ margin-top:10px; padding:12px 14px; border-left:3px solid var(--line-strong, #cdbf9e); background:var(--paper, #fff); max-height:360px; overflow:auto; }
.transcript p{ margin:0 0 8px; }
.clip{ align-items:center; margin-bottom:8px; padding:6px 10px; border-radius:12px; background:var(--parchment-dim, #f3efe4); }
.clip audio{ height:34px; max-width:100%; flex:1 1 220px; }
.sound-btn{ min-width:34px; padding-inline:8px; }
.sound-btn.is-on{ color:var(--emerald-700, #1f5c45); }
.dialogue-bar{ margin:6px 0 10px; align-items:center; }
.dlg-lines{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.dlg-line{ display:flex; align-items:flex-start; gap:6px; }
.dlg-line.right{ flex-direction:row-reverse; }
.dlg-line.right .dlg-turn{ align-items:flex-end; }
.dlg-bubble{ max-width:min(560px, 82%); padding:8px 12px; border-radius:14px; background:var(--paper, #fff); border:1px solid var(--line); display:flex; flex-direction:column; gap:2px; cursor:default; }
.dlg-bubble[role=button]{ cursor:pointer; }
.dlg-line.right .dlg-bubble{ background:var(--parchment-dim, #f3efe4); }
.dlg-line.active .dlg-bubble{ border-color:var(--emerald-700, #1f5c45); box-shadow:0 0 0 2px rgba(31,92,69,.15); }
.dlg-line.mine .dlg-bubble{ border-style:dashed; }
.dlg-line.future{ opacity:.45; }
.dlg-speaker{ font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-faint, #777); }
.dlg-text{ font-size:1rem; }
.dlg-turn{ margin-top:4px; }
.say-it{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:6px; }
.say-result{ display:inline-flex; flex-wrap:wrap; gap:2px 6px; align-items:center; }
.say-w{ padding:1px 4px; border-radius:6px; }
.say-w.ok{ background:var(--good-bg, #e3f2e9); color:var(--good, #2f7d52); }
.say-w.bad{ background:var(--bad-bg, #fbe9e7); color:var(--bad, #b3261e); text-decoration:underline wavy; }
.say-score{ font-size:.8rem; font-weight:700; padding:2px 8px; border-radius:999px; }
.say-score.good{ background:var(--good-bg, #e3f2e9); color:var(--good, #2f7d52); }
.say-score.mid{ background:var(--warn-bg, #fff4e0); color:var(--warn, #8a5a00); }
.say-score.low{ background:var(--bad-bg, #fbe9e7); color:var(--bad, #b3261e); }
.pron-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.pron-item{ padding:10px 12px; border:1px solid var(--line); border-radius:12px; }
.pron-text{ font-size:1.05rem; font-weight:600; }
@media (max-width:600px){ .dlg-bubble{ max-width:88%; } }
.media-player{ display:flex; flex-direction:column; align-items:stretch; min-width:0; max-width:100%; }
.media-player .player-bar{ align-items:center; }
.media-player video, .media-player audio{ max-width:100%; }
.view-as-banner{ position:sticky; top:0; z-index:50; background:var(--emerald-700); color:#fff; font-size:.85rem; padding:8px var(--space-6); }
.tg-qr{ width:180px; height:180px; padding:8px; background:#fff; border-radius:12px; border:1px solid var(--gold-300); flex:none; }
.tg-qr svg{ width:100%; height:100%; display:block; }
.my-teacher-photo{ width:72px; height:72px; border-radius:50%; object-fit:cover; flex:none; }
.update-banner{ position:fixed; left:50%; transform:translateX(-50%); bottom:16px; z-index:80; display:flex; align-items:center; gap:10px; padding:8px 10px 8px 16px; background:var(--emerald-800); color:#fff; border-radius:999px; box-shadow:0 8px 24px rgba(10,26,20,.3); font-size:.85rem; }
/* Lesson picker (material for a lesson / booking) */
.lesson-picker-list{ max-height:min(52vh,520px); overflow-y:auto; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.lp-group-title{ position:sticky; top:0; z-index:1; padding:6px 12px; font-size:.75rem; font-weight:700; color:var(--ink-soft); background:var(--parchment-dim,#f3efe4); border-bottom:1px solid var(--line); }
.lp-item{ display:flex; flex-direction:column; gap:2px; width:100%; text-align:left; padding:8px 12px; background:none; border:0; border-bottom:1px solid var(--line); cursor:pointer; }
.lp-item:hover{ background:var(--emerald-50,#eef6f1); }
.lp-item.is-selected{ background:var(--emerald-100,#dcecdf); box-shadow:inset 3px 0 0 var(--emerald-700); }
.lp-item.is-done .lp-title{ color:var(--ink-soft); }
.lp-course .lp-title::after{ content:" ›"; color:var(--ink-soft); }
.lp-title{ font-weight:600; font-size:.9rem; }
.seg-wrap{ flex-wrap:wrap; }
/* Corner pop-ups: unread notifications on entering the site, Telegram invitation */
.corner-popups{ position:fixed; right:16px; bottom:16px; z-index:85; display:flex; flex-direction:column; gap:10px; width:min(360px, calc(100vw - 32px)); pointer-events:none; }
.corner-card{ position:relative; pointer-events:auto; background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:var(--radius-l); box-shadow:var(--shadow-pop); padding:12px 34px 12px 14px; animation:corner-in .25s ease-out both; }
.corner-body{ display:flex; gap:10px; align-items:flex-start; width:100%; text-align:left; background:none; border:0; padding:0; color:inherit; cursor:pointer; font:inherit; }
.corner-icon{ flex:none; display:inline-flex; width:30px; height:30px; border-radius:50%; align-items:center; justify-content:center; background:var(--emerald-100); color:var(--emerald-700); }
.corner-close{ position:absolute; top:8px; right:8px; width:24px; height:24px; border:0; background:none; color:var(--ink-faint); cursor:pointer; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; }
.corner-close:hover{ background:var(--parchment-dim); color:var(--ink); }
.corner-telegram{ border-left:4px solid #2AABEE; }
@keyframes corner-in{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .corner-card{ animation:none; } }
@media (max-width:900px){ .corner-popups, .toast-stack{ bottom:calc(76px + env(safe-area-inset-bottom)); } } /* above the phone tab bar */
