:root {
  --bg: #0C0C0F;
  --surface: #15151A;
  --surface-2: #1D1D24;
  --surface-3: #26262F;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #F3F2EE;
  --muted: #8C8B95;
  --faint: #5A5963;
  --accent: #D7FF3A;
  --accent-ink: #0C0C0F;
  --accent-text: #D7FF3A;
  --coral: #FF6A4D;
  --coral-soft: rgba(255, 106, 77, .14);
  --k-lk: #A799FF;
  --k-pz: #6FD3FF;
  --k-lr: #D7FF3A;
  --k-fiz: #FFB547;
  --k-kp: #FF7AC6;
  --k-kch: #B8B7C2;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 22px;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-top: max(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px), env(safe-area-inset-top));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom));
}

:root[data-theme="light"] {
  --bg: #F1F0EA;
  --surface: #FFFFFF;
  --surface-2: #F6F5F0;
  --surface-3: #E8E7E0;
  --line: rgba(18, 18, 20, .08);
  --line-strong: rgba(18, 18, 20, .16);
  --text: #121214;
  --muted: #6C6B73;
  --faint: #A3A2A9;
  --accent-text: #4F6E00;
  --coral: #E5482A;
  --coral-soft: rgba(229, 72, 42, .1);
  --k-lk: #6F5BFF;
  --k-pz: #0B9AD6;
  --k-lr: #5E8A00;
  --k-fiz: #D98200;
  --k-kp: #D23C93;
  --k-kch: #7D7C86;
  --shadow: 0 18px 50px rgba(30, 30, 20, .14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent-text); }
.hidden { display: none !important; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark, .logo {
  font-family: var(--display); font-weight: 800; letter-spacing: -.04em; display: inline-flex; align-items: center; gap: 4px;
}
.boot-mark { font-size: 44px; animation: pulse 1.2s ease-in-out infinite; }
.boot-mark span, .logo span {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; display: inline-grid; place-items: center;
}
.boot-mark span { width: 50px; height: 50px; font-size: 28px; }
@keyframes pulse { 50% { opacity: .55; } }

.shell { padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 110px); max-width: 560px; margin: 0 auto; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.logo { font-size: 19px; }
.logo span { width: 24px; height: 24px; font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.week-badge {
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.week-badge b { color: var(--text); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; overflow: hidden;
  font-family: var(--display); font-weight: 700; font-size: 13px; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .dot { position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); border: 2px solid var(--bg); }

.hero-date { margin: 4px 0 18px; }
.hero-date .dow { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.hero-date .sub { color: var(--muted); margin-top: 6px; font-size: 14px; }

.strip { display: grid; grid-template-columns: 28px repeat(6, 1fr) 28px; gap: 6px; align-items: stretch; margin-bottom: 18px; }
.strip-nav { display: grid; place-items: center; color: var(--muted); border-radius: 12px; }
.strip-nav:active { background: var(--surface-2); }
.day-pill {
  border-radius: 16px; padding: 9px 0 8px; text-align: center; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s ease, background .2s;
}
.day-pill:active { transform: scale(.94); }
.day-pill .d { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-pill .n { font-family: var(--display); font-weight: 700; font-size: 17px; }
.day-pill .dots { display: flex; gap: 3px; height: 5px; margin-top: 2px; }
.day-pill .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.day-pill.today .n { color: var(--accent-text); }
.day-pill.active { background: var(--text); border-color: var(--text); }
.day-pill.active .d, .day-pill.active .n { color: var(--bg); }
.day-pill.active .dots i { background: var(--bg); opacity: .5; }

.now-card {
  background: var(--accent); color: var(--accent-ink); border-radius: 26px; padding: 18px 18px 16px; margin-bottom: 22px;
  position: relative; overflow: hidden;
}
.now-card::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  border: 26px solid rgba(12, 12, 15, .06);
}
.now-card.calm { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.now-card.calm::after { border-color: var(--line); }
.now-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.now-top .live { display: inline-flex; align-items: center; gap: 7px; }
.now-top .live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.now-card.calm .now-top .live::before { display: none; }
@keyframes blink { 50% { opacity: .2; } }
.now-subject { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 12px 0 6px; max-width: 92%; }
.now-meta { font-size: 14px; opacity: .72; }
.now-count { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.progress { height: 6px; border-radius: 99px; background: rgba(12, 12, 15, .14); margin-top: 16px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent-ink); border-radius: 99px; }
.now-actions { display: flex; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.btn-ink { background: var(--accent-ink); color: var(--accent); border-radius: 14px; padding: 11px 14px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.btn-ink.done { background: rgba(12, 12, 15, .12); color: var(--accent-ink); }

.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px 12px; }
.section-h h3 { margin: 0; font-family: var(--display); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.section-h .link { font-size: 13px; color: var(--muted); font-weight: 500; }
.section-h .link.on { color: var(--accent-text); }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.lesson { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: stretch; }
.lesson .time { padding-top: 15px; text-align: right; }
.lesson .time b { display: block; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.lesson .time span { font-size: 12px; color: var(--faint); }
.lesson .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 13px 14px 14px; text-align: left;
  position: relative; overflow: hidden; transition: transform .15s ease;
}
.lesson .card:active { transform: scale(.985); }
.lesson .card::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--kc, var(--faint)); }
.lesson.now .card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.lesson.past .card { opacity: .55; }
.lesson.other { opacity: .38; }
.lesson.cancelled .subj { text-decoration: line-through; text-decoration-color: var(--coral); }
.lesson.cancelled .card { background: transparent; border-style: dashed; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.chip {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted);
  letter-spacing: .01em; display: inline-flex; align-items: center; gap: 4px;
}
.chip.kind { color: var(--kc); background: color-mix(in srgb, var(--kc) 14%, transparent); }
.chip.warn { color: var(--coral); background: var(--coral-soft); }
.chip.ok { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.chip.solid { background: var(--text); color: var(--bg); }
.subj { font-weight: 600; font-size: 15.5px; line-height: 1.25; letter-spacing: -.005em; }
.meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.was { font-size: 12px; color: var(--coral); margin-top: 5px; }

.k-лк { --kc: var(--k-lk); } .k-пз { --kc: var(--k-pz); } .k-лр { --kc: var(--k-lr); }
.k-физ { --kc: var(--k-fiz); } .k-кп { --kc: var(--k-kp); } .k-кч { --kc: var(--k-kch); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-family: var(--display); font-size: 56px; font-weight: 800; color: var(--text); letter-spacing: -.05em; line-height: 1; margin-bottom: 10px; }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + 14px); z-index: 20;
  display: flex; gap: 4px; padding: 6px; border-radius: 26px; width: min(420px, calc(100% - 32px));
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 20px; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; }
.tab svg { width: 22px; height: 22px; }
.tab.active { background: var(--text); color: var(--bg); }
.tab .badge { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 10px; display: grid; place-items: center; }

.page-title { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.035em; margin: 2px 0 16px; line-height: 1.05; }

.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface-3); color: var(--text); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.panel.tight { padding: 6px; }

.ring-wrap { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .center b { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.04em; display: block; line-height: 1; }
.ring .center span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 1px; }
.legend b { font-family: var(--display); font-weight: 600; }

.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.bar-row:last-child { border-bottom: 0; }
.bar-row .name { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { font-family: var(--display); font-weight: 600; font-size: 14px; }
.bar-row .val.zero { color: var(--faint); }
.bar { grid-column: 1 / -1; height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .a { background: var(--coral); }
.bar .e { background: var(--faint); }

.hist { display: flex; justify-content: space-between; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); gap: 10px; }
.hist:last-child { border-bottom: 0; }
.hist .when { font-size: 12px; color: var(--muted); }

.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 13px 16px; border-radius: 16px;
  font-weight: 600; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line);
}
.btn:active, .btn-accent:active, .btn-ink:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border: 0; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 16px; font-weight: 700; font-size: 15px; width: 100%; }
.btn-accent[disabled] { opacity: .5; }
.btn-danger { color: var(--coral); }
.btn.full { width: 100%; }

.mark-list .who { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 4px 10px 8px; border-bottom: 1px solid var(--line); }
.mark-list .who:last-child { border-bottom: 0; }
.who .nm { font-weight: 500; font-size: 14.5px; line-height: 1.2; }
.who .nm small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.who .nm small.ci { color: var(--accent-text); }
.st { display: flex; gap: 4px; }
.st button {
  width: 38px; height: 34px; border-radius: 11px; background: var(--surface-2); font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--faint);
}
.st button.on.p { background: var(--accent); color: var(--accent-ink); }
.st button.on.a { background: var(--coral); color: #fff; }
.st button.on.e { background: var(--text); color: var(--bg); }
.st button.on.l { background: var(--k-fiz); color: #111; }
.reason { grid-column: 1 / -1; }
.reason input { width: 100%; }

.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.counter { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.counter b { font-family: var(--display); font-size: 24px; font-weight: 700; display: block; letter-spacing: -.03em; }
.counter span { font-size: 12px; color: var(--muted); }
.counter.a b { color: var(--coral); }
.counter.p b { color: var(--accent-text); }

.post { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 15px; margin-bottom: 10px; }
.post.pinned { background: var(--text); color: var(--bg); border-color: var(--text); }
.post.pinned .meta { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.post .txt { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.post .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

.hw { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 8px; text-align: left; width: 100%; }
.hw.done .hw-text, .hw.done .subj { opacity: .45; text-decoration: line-through; }
.check { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line-strong); display: grid; place-items: center; margin-top: 1px; }
.check svg { width: 16px; height: 16px; opacity: 0; }
.hw.done .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hw.done .check svg { opacity: 1; }
.hw-text { font-size: 14px; color: var(--muted); margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.due { font-size: 12px; font-weight: 600; }
.due.late { color: var(--coral); }
.due.soon { color: var(--accent-text); }
.group-h { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 18px 4px 8px; }

.queue { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 16px; margin-bottom: 12px; }
.queue-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.queue-title { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.pos { text-align: right; flex-shrink: 0; }
.pos b { font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -.05em; line-height: .9; color: var(--accent-text); display: block; }
.pos span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.q-list { margin: 12px 0; counter-reset: q; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.q-item .num { width: 26px; height: 26px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--display); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.q-item.me .num { background: var(--accent); color: var(--accent-ink); }
.q-item.done { opacity: .4; text-decoration: line-through; }
.q-item .x { margin-left: auto; color: var(--muted); padding: 4px 6px; }

.fab {
  position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(var(--safe-bottom) + 96px); z-index: 19; width: 56px; height: 56px; border-radius: 20px;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow);
}
.fab svg { width: 26px; height: 26px; }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 16px calc(var(--safe-bottom) + 20px);
  animation: up .28s cubic-bezier(.2, .9, .25, 1); max-width: 600px; margin: 0 auto; border-top: 1px solid var(--line-strong);
}
.sheet.full { height: 92vh; }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line-strong); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.03em; margin: 0 0 4px; line-height: 1.15; }
.sheet .lead { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.sheet-sticky { position: sticky; bottom: calc(-1 * var(--safe-bottom) - 20px); padding: 12px 0 calc(var(--safe-bottom) + 20px); margin-bottom: calc(-1 * var(--safe-bottom) - 20px); background: linear-gradient(transparent, var(--bg) 30%); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.menu { display: flex; flex-direction: column; gap: 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; font-weight: 500; }
.menu-item svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.menu-item .grow { flex: 1; }
.menu-item small { color: var(--muted); display: block; font-size: 12.5px; font-weight: 400; }
.menu-item.danger { color: var(--coral); }
.menu-item.danger svg { color: var(--coral); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-left: 4px; }
.input, .field input, .field textarea, .field select {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; outline: none; width: 100%; font-size: 15px;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent-text); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; gap: 12px; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); position: relative; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); background: var(--accent-ink); }

.onb { min-height: calc(100vh - var(--safe-top) - 40px); display: flex; flex-direction: column; }
.onb-hero { padding: 24px 0 22px; }
.onb-mark { font-family: var(--display); font-weight: 800; font-size: 78px; letter-spacing: -.06em; line-height: .85; display: flex; align-items: flex-end; gap: 8px; }
.onb-mark span { background: var(--accent); color: var(--accent-ink); width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; }
.onb-hero p { color: var(--muted); font-size: 16px; margin: 18px 0 0; max-width: 300px; }
.pick { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.pick button { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; font-weight: 500; }
.pick button[disabled] { opacity: .35; }
.pick button small { color: var(--muted); font-weight: 400; }

.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head .avatar { width: 60px; height: 60px; font-size: 20px; }
.profile-head .nm { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.role-tag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.role-tag.student { background: var(--surface-3); color: var(--muted); }

.lesson-edit-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.lesson-edit-row:last-child { border-bottom: 0; }
.lesson-edit-row b { font-family: var(--display); font-size: 13px; font-weight: 600; }

#toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); transform: translate(-50%, -150%); z-index: 60; transition: transform .3s cubic-bezier(.2, .9, .25, 1);
  background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 16px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); box-shadow: var(--shadow);
}
#toast.show { transform: translate(-50%, 0); }
#toast.err { background: var(--coral); color: #fff; }

.fade-in { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.muted { color: var(--muted); }
.mt { margin-top: 12px; }
.center { text-align: center; }
.spacer { height: 10px; }
pre.rap { white-space: pre-wrap; font-family: var(--body); font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 12px; }
