:root {
  --brand: #93c6c9;
  --brand-dark: #467a7e;
  --brand-deep: #26484c;
  --ink: #111111;
  --muted: #3a4c4e;
  --paper: #eef7f8;
  --card: #badcde;
  --inner: #f8fcfc;
  --white: #ffffff;
  --line: rgba(38, 72, 76, 0.12);
  --shadow: 0 18px 50px rgba(38, 72, 76, 0.12);
  --shadow-hover: 0 22px 44px rgba(38, 72, 76, 0.16);
  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 200ms;
  --dur-med: 280ms;
  --page-bg: linear-gradient(180deg, #ecf7f8 0%, #dceef0 100%);
  --grid: rgba(38, 72, 76, 0.045);
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.78);
  --btn-bg: #111111;
  --btn-fg: #ffffff;
}

html.theme-dark {
  color-scheme: dark;
  --brand: #6aaeb2;
  --brand-dark: #8ec4c7;
  --brand-deep: #d2ecee;
  --ink: #e8f2f2;
  --muted: #9bb3b5;
  --paper: #101618;
  --card: #1d2c2e;
  --inner: #162022;
  --white: #1a2426;
  --line: rgba(210, 236, 238, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 22px 44px rgba(0, 0, 0, 0.42);
  --page-bg: linear-gradient(180deg, #101618 0%, #0c1213 100%);
  --grid: rgba(210, 236, 238, 0.07);
  --surface: #1a2426;
  --surface-soft: rgba(26, 36, 38, 0.88);
  --btn-bg: #e8f2f2;
  --btn-fg: #101618;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
html { scrollbar-gutter: stable; overflow-y: scroll; }
body {
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

h1, h2, h3, .serif { font-family: "Playfair Display", Georgia, serif; }

a { color: var(--brand-deep); transition: color var(--dur) ease; }
:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
button, input, textarea, select { font: inherit; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  flex-wrap: nowrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand);
  transition: transform var(--dur) var(--ease);
}
.brand:hover img { transform: scale(1.04); }
.brand strong { letter-spacing: 0.18em; font-size: 13px; }
.brand span { display: block; font-style: italic; color: var(--muted); font-size: 13px; letter-spacing: 0; }

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
  margin-left: auto;
  min-width: 0;
  flex: 0 1 auto;
}
.account-link { display: inline-flex; line-height: 0; text-decoration: none; }
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  line-height: 1.2;
  font-weight: 600;
  min-width: 0;
  flex: 0 1 auto;
  transition: background-color var(--dur) ease;
}
.account-chip .chip-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.account-chip .avatar {
  overflow: hidden;
}
.account-chip:hover { background: var(--surface-soft); }
.theme-toggle {
  flex: 0 0 auto;
}
.theme-toggle .theme-ico {
  width: 20px;
  height: 20px;
  display: block;
}
.theme-toggle .theme-ico svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform var(--dur) var(--ease);
}
.avatar-lg { width: 48px; height: 48px; }
.avatar-xl { width: 120px; height: 120px; font-size: 36px; }
.avatar-fallback {
  background: var(--brand);
  color: var(--brand-deep);
  font-weight: 700;
  font-family: Manrope, system-ui, sans-serif;
  overflow: hidden;
  white-space: nowrap;
}
.profile-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.avatar-edit { display: grid; justify-items: center; gap: 10px; cursor: pointer; }
.avatar-edit input[type=file] { display: none; }
.profile-card .row { margin-top: 8px; }
.btn {
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: background-color var(--dur) ease, color var(--dur) ease, transform var(--dur) var(--ease), box-shadow var(--dur) ease, opacity var(--dur) ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(38, 72, 76, 0.16);
}
.btn:active {
  transform: translateY(0);
  opacity: 0.92;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn.ghost:hover { background: rgba(147, 198, 201, 0.22); }
.btn.teal { background: var(--brand-deep); }
.btn.teal:hover { background: #1d3c40; }
.btn.warn { background: #8a2f2f; }
.btn.warn:hover { background: #732626; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.big {
  padding: 16px 28px;
  font-size: 18px;
}

.hero, .wrap, .auth-card, .dash { padding: 0 28px 48px; }
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 24px;
}
.hero h1 {
  font-size: clamp(34px, 8vw, 78px);
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.hero p.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 560px;
  overflow-wrap: break-word;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero p.lead::first-letter,
.offer-list li::first-letter {
  background: none;
  color: inherit;
  float: none;
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  -webkit-initial-letter: normal;
  initial-letter: normal;
}
.hero p.lead mark,
.offer-list mark,
.hero p.lead b,
.hero p.lead strong {
  background: none;
  color: inherit;
  box-shadow: none;
}
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.pill {
  background: var(--surface);
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(38, 72, 76, 0.08);
  transition: background-color var(--dur) ease, transform var(--dur) var(--ease);
}
.pill:hover {
  background: var(--white);
  transform: translateY(-1px);
}
.hero-card {
  background: var(--card);
  border-radius: 36px;
  padding: 28px;
  box-shadow: var(--shadow);
  min-height: 340px;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) ease;
}
.hero-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.hero-card h3 { margin: 0 0 8px; font-size: 28px; }
.feature-grid, .stats-grid, .cards {
  display: grid;
  gap: 16px;
}
.feature-grid { grid-template-columns: repeat(3, 1fr); max-width: 1180px; margin: 12px auto 0; }
.site-footer {
  margin-top: auto;
  padding: 28px 28px 36px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.site-footer p { margin: 0; }
.site-footer-copy {
  color: var(--brand-deep);
  font-weight: 600;
  margin-bottom: 6px;
}
.site-footer-contacts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0;
}
.site-footer a {
  color: var(--brand-deep);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.price-list,
.offer-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.price-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.price-list b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.offer-list li {
  padding-left: 1em;
  position: relative;
  font-size: 15px;
  line-height: 1.45;
  text-wrap: pretty;
}
.nowrap { white-space: nowrap; }
.offer-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a7c82;
}
.card {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.card h3 { margin: 0 0 8px; }

.reviews {
  max-width: 820px;
  width: 100%;
  margin: 4px auto 0;
}
.reviews h2 {
  text-align: center;
  font-size: clamp(32px, 4.4vw, 46px);
  margin: 0 0 22px;
  letter-spacing: 0.02em;
}
.reviews-carousel {
  outline: none;
}
.reviews-viewport {
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  border-radius: var(--radius);
}
.reviews-viewport:active { cursor: grabbing; }
.reviews-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.45s var(--ease);
  will-change: transform;
}
.review-card {
  flex: 0 0 100%;
  min-height: 280px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 28px 30px 32px;
  box-shadow: var(--shadow);
}
.review-card h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 30px);
  color: var(--brand-deep);
}
.review-card blockquote {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  font-style: normal;
}
.reviews-meta {
  display: grid;
  grid-template-columns: 44px 1fr auto 44px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.reviews-nav {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--brand-deep);
  box-shadow: 0 8px 18px rgba(38, 72, 76, 0.12);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color var(--dur) ease, transform var(--dur) var(--ease), box-shadow var(--dur) ease;
}
.reviews-nav:hover {
  background: #f4fbfb;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(38, 72, 76, 0.16);
}
.reviews-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.reviews-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(38, 72, 76, 0.22);
  cursor: pointer;
  transition: background-color var(--dur) ease, transform var(--dur) var(--ease);
}
.reviews-dot.is-on {
  background: var(--brand-deep);
  transform: scale(1.18);
}
.reviews-counter {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.auth-wrap {
  max-width: 460px;
  margin: 24px auto 64px;
}
.auth-card {
  background: var(--surface-soft);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-title {
  margin: 0 0 8px;
  text-align: center;
}
.auth-submit {
  display: flex;
  justify-content: center;
  margin: 22px auto 0;
  width: auto;
  min-width: min(100%, 280px);
}
.pw-meter { margin: 8px 0 4px; }
.pw-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--inner);
  overflow: hidden;
}
.pw-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #b45555;
  transition: width var(--dur) ease, background-color var(--dur) ease;
}
.pw-meter[data-score="1"] .pw-bar-fill { background: #b45555; }
.pw-meter[data-score="2"] .pw-bar-fill { background: #c4893a; }
.pw-meter[data-score="3"] .pw-bar-fill { background: #6b9a4a; }
.pw-meter[data-score="4"] .pw-bar-fill { background: #2f7a4a; }
.pw-label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #b45555;
}
.pw-meter[data-score="2"] .pw-label { color: #c4893a; }
.pw-meter[data-score="3"] .pw-label,
.pw-meter[data-score="4"] .pw-label { color: #2f7a4a; }
.pw-reqs {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted, #6b6b6b);
}
.pw-reqs li { padding: 2px 0 2px 18px; position: relative; }
.pw-reqs li::before { content: "•"; position: absolute; left: 4px; }
.pw-reqs li.ok { color: #2f7a4a; }
.pw-reqs li.ok::before { content: "✓"; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(147, 198, 201, 0.45);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint, .error, .ok { font-size: 14px; margin-top: 12px; }
.error { color: #8a2f2f; }
.ok { color: var(--brand-deep); }
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-toggle button {
  background: var(--inner);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: background-color var(--dur) ease, border-color var(--dur) ease, transform var(--dur) var(--ease);
}
.role-toggle button:hover { border-color: var(--brand-dark); }
.role-toggle button.active {
  border-color: var(--ink);
  background: var(--card);
}

.dash {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  padding-bottom: 64px;
  align-items: start;
}
.side {
  background: var(--surface-soft);
  border-radius: 28px;
  padding: 18px;
  width: 240px;
  max-width: 100%;
  height: fit-content;
  position: sticky;
  top: 16px;
  align-self: start;
  overflow-anchor: none;
}
.panel { min-width: 0; }

html.is-dash,
html.is-dash body {
  height: 100%;
  overflow: hidden;
}
html.is-dash {
  height: 100dvh;
  overflow-y: hidden;
}
html.is-dash body,
html.is-dash #app {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
html.is-dash .topbar {
  flex: 0 0 auto;
}
html.is-dash .dash {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  padding-bottom: 16px;
  align-items: stretch;
}
html.is-dash .side {
  position: static;
  top: auto;
  height: auto;
  max-height: 100%;
  overflow: auto;
  align-self: start;
}
html.is-dash .panel {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
html.is-dash .panel::-webkit-scrollbar { width: 0; height: 0; }
.panel.is-profile h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.panel.is-profile .hint { margin-top: 0; }
.panel.is-profile .profile-card { padding: 18px; }

html.is-call,
html.is-call body,
html.is-call #app {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overflow-y: hidden;
  scrollbar-gutter: auto;
}
html.is-call .call-page {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
html.is-call .topbar {
  flex: 0 0 auto;
  padding-top: 8px;
  padding-bottom: 8px;
}
html.is-call .board-wrap,
html.is-call .screen-wrap,
html.is-call .workspace-stage {
  min-height: 0;
}
.side-profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 10px;
  margin-bottom: 14px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: var(--inner);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur) var(--ease);
}
.side-profile .avatar {
  flex: 0 0 auto;
}
.side-profile span {
  flex: 1 1 auto;
  min-width: 0;
}
.side-profile b { display: block; font-size: 14px; line-height: 1.2; }
.side-profile small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; margin-top: 2px; }
.side-profile:hover { background: var(--surface); }
.side-profile.active {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--brand-dark);
}
.side-nav {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.side-nav a, .side button.link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font-weight: 600;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}
.side-nav a:hover { background: rgba(147, 198, 201, 0.28); }
.side-nav a.active { background: var(--card); }
.who { font-size: 13px; color: var(--muted); margin: 0 0 14px; padding: 0 12px; }
.avatar-sm { width: 40px; height: 40px; font-size: 14px; }
.student-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.student-head h3 { margin: 0; }
.student-head .meta { margin: 4px 0 0; }

.panel h1 { margin: 6px 0 18px; font-size: 36px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.student-card .meta { color: var(--muted); font-size: 14px; }
.bars { display: grid; gap: 10px; margin-top: 14px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 42px; gap: 8px; align-items: center; font-size: 14px; }
.stats-edit .bar-row.skill-row { grid-template-columns: 140px 1fr 72px; }
.bar-row input[type=number].skill-num {
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.track {
  height: 10px;
  background: #e3f0f1;
  border-radius: 999px;
  overflow: hidden;
}
.fill { height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  background: var(--brand);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 2px;
  color: inherit;
}
.chip-add { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.chip-add input { flex: 1; margin: 0; }
.meta-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; }
.meta-edit input, .stats-edit .meta input {
  border: 0;
  background: transparent;
  border-bottom: 1px dashed var(--line);
  padding: 4px 0;
  min-width: 90px;
  font: inherit;
  color: var(--muted);
}
.stats-edit .meta { display: flex; gap: 8px; align-items: center; }
.stats-edit .meta input { flex: 1; min-width: 160px; }
.bar-row input[type=range] {
  width: 100%;
  accent-color: var(--brand-dark);
  height: 18px;
}
.wait { color: var(--muted); font-weight: 600; margin: 4px 0; }
.list { display: grid; gap: 12px; }
.item {
  background: var(--surface-soft);
  border-radius: 22px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) ease;
}
.item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.item .grow { flex: 1; }
.live { color: #0b6b3a; font-weight: 700; font-size: 13px; }

.code-box {
  font-family: ui-monospace, Consolas, monospace;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 10px 14px;
  border-radius: 12px;
  letter-spacing: 0.12em;
  display: inline-block;
}
input.code-input {
  font-size: 28px;
  letter-spacing: 0.42em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-family: ui-monospace, Consolas, monospace;
}

.call-page {
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.call-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 12px;
  padding: 0 16px 8px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}
.call-layout.has-workspace {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 240px;
}
.call-layout:not(.has-workspace) .lesson-workspace {
  display: none !important;
}
.call-layout.is-cameras-only .videos,
.call-layout:not(.has-workspace) .videos {
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: stretch;
  height: 100%;
}
.call-layout.is-cameras-only .videos .tile,
.call-layout:not(.has-workspace) .videos .tile {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
}
.videos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.tile {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  background: #132224;
  border-radius: 20px;
  overflow: hidden;
}
.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #111;
  display: block;
  transform: scaleX(-1);
}
.tile.screen video,
.tile#tile-local-screen video {
  transform: none;
}
.tile.screen { aspect-ratio: 16 / 9; }
.board-wrap {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 320px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--inner);
  border-bottom: 1px solid var(--line);
}
#board-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#board-tools.is-locked,
#overlay-tools.is-locked {
  opacity: 0.4;
  pointer-events: none;
}
.size-ctl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.size-ctl input {
  width: 90px;
}
.board-field {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
}
.board-stage {
  position: relative;
  min-height: 0;
  height: 100%;
}
.board-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: #345;
  font-size: 14px;
  pointer-events: none;
  background: linear-gradient(transparent 70%, rgba(255,255,255,0.82));
}
.board-lock.hidden { display: none; }
#remote-mix { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--dur) ease, transform var(--dur) var(--ease);
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { border-color: var(--ink); }
.swatch[data-color="#1b1b1b"] { background: #1b1b1b; }
.swatch[data-color="#ffffff"] { background: #fff; border-color: #c9d4d4; }
.swatch[data-color="#c0392b"] { background: #c0392b; }
.swatch[data-color="#2471a3"] { background: #2471a3; }
.swatch[data-color="#1e8449"] { background: #1e8449; }
.swatch[data-color="#d4a017"] { background: #d4a017; }
.swatch[data-overlay-color="#c0392b"] { background: #c0392b; }
.swatch[data-overlay-color="#2471a3"] { background: #2471a3; }
.swatch[data-overlay-color="#d4a017"] { background: #d4a017; }
.swatch[data-overlay-color="#ffffff"] { background: #fff; border-color: #c9d4d4; }
.btn.on-tool { border-color: var(--ink); background: #fff; }
#board {
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: none;
  cursor: crosshair;
  background: #fffef6;
  display: block;
}
.roster {
  background: var(--surface-soft);
  border-radius: 24px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#roster-list {
  overflow: auto;
  min-height: 0;
  flex: 0 1 auto;
  scrollbar-width: none;
}
#roster-list::-webkit-scrollbar { width: 0; height: 0; }
.person {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: 0; }
.person .avatar {
  flex: 0 0 auto;
  align-self: center;
}
.person-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.person-copy b {
  display: block;
  line-height: 1.2;
  font-size: 14px;
}
.person-copy .meta {
  margin: 0;
  line-height: 1.2;
  font-size: 12px;
  color: var(--muted);
}
.person .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.person.in .dot { background: #0b6b3a; box-shadow: 0 0 0 4px rgba(11,107,58,0.15); }
.person.out .dot { background: #9aa8aa; }
.person.out .avatar { opacity: 0.55; }
.person.out b { color: var(--muted); }
.tile .name {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}
.media-flags {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}
.media-flag {
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.media-flag img {
  width: 16px;
  height: 16px;
  display: block;
  filter: invert(1);
}
.btn.icon-btn {
  min-width: 48px;
  min-height: 44px;
  font-size: 20px;
  line-height: 1;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.icon-btn .av-ico {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}
.btn.icon-btn.is-off {
  opacity: 1;
  filter: none;
}
.tile.screen .media-flags,
.tile#tile-local-screen .media-flags { display: none; }
.hidden { display: none !important; }
.checks { display: grid; gap: 8px; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--inner);
  border-radius: 14px;
  font-weight: 500;
}
.check input { width: auto; margin: 0; }
.month-grid {
  display: grid;
  gap: 10px;
}
.month-day {
  background: var(--surface-soft);
  border-radius: 18px;
  padding: 12px;
}
.month-day.has { box-shadow: var(--shadow); }
.month-item {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.month-hw {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.month-hw strong { font-size: 14px; }
.month-hw.is-late .meta { color: #8a2f2f; font-weight: 700; }
.month-hw .btn { width: fit-content; }
.month-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-form { display: grid; gap: 8px; margin-top: 8px; }
.lesson-workspace {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  min-width: 0;
}
.lesson-workspace.hidden {
  display: none !important;
  min-height: 0;
  height: 0;
  overflow: hidden;
}
.workspace-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.workspace-hint { margin: 0; }
.workspace-stage {
  position: relative;
  min-height: 460px;
  height: min(68vh, 740px);
}
.float-panel {
  position: absolute;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-width: 240px;
  min-height: 260px;
  resize: both;
  overflow: hidden;
  z-index: 2;
}
.float-panel.is-front { z-index: 5; }
.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  cursor: grab;
  user-select: none;
  background: var(--inner);
  border-bottom: 1px solid var(--line);
}
.window-bar:active { cursor: grabbing; }
.window-actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.stage-tabs {
  display: none;
}
.screen-wrap {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 320px;
  background: #111;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.screen-wrap .window-bar,
.screen-wrap .board-toolbar {
  background: #1d1d1d;
  color: #f2f2f2;
  border-bottom-color: #333;
}
.screen-wrap .size-ctl { color: #cfcfcf; }
.screen-wrap:fullscreen,
.screen-wrap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  min-height: 100%;
}
.screen-stage {
  position: relative;
  min-height: 240px;
  background: #111;
  overflow: hidden;
}
.screen-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d0d0d0;
  font-size: 16px;
  text-align: center;
  padding: 24px;
  pointer-events: none;
}
.screen-empty.hidden { display: none; }
#screen-host:not(.is-empty) ~ #screen-empty { display: none !important; }
#screen-host, #screen-host .tile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  z-index: 2;
}
#screen-host.is-empty { pointer-events: none; }
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  touch-action: none;
  cursor: crosshair;
  background: transparent;
}
#overlay-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#overlay-lock {
  z-index: 4;
  color: #f4f4f4;
  background: linear-gradient(transparent 55%, rgba(0,0,0,0.6));
}

@media (max-width: 1100px) {
  .hero, .feature-grid, .dash, .row { grid-template-columns: 1fr; }
  .call-layout,
  .call-layout.is-cameras-only,
  .call-layout.has-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .call-layout.is-cameras-only,
  .call-layout:not(.has-workspace) {
    grid-template-rows: minmax(0, 1fr) minmax(150px, 34vh);
  }
  .call-layout.has-workspace {
    grid-template-rows: minmax(80px, 22vh) minmax(0, 1fr) minmax(120px, 28vh);
  }
  html.is-call .workspace-stage { min-height: 0; height: 100%; }
  .board-wrap, .stage-wrap, .screen-wrap, .lesson-workspace, .workspace-stage { min-height: 220px; }
  .workspace-stage { height: auto; min-height: 240px; }
  .float-panel { min-width: 0; }
  .dash .side { position: static; width: auto; }
  html.is-dash .dash {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  html.is-dash .side {
    max-height: none;
    overflow: visible;
    width: auto;
  }
  .item { flex-direction: column; }
}

@media (max-width: 720px) {
  .topbar, .hero, .wrap, .auth-card, .dash, .site-footer {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .site-footer { padding-top: 22px; padding-bottom: max(28px, env(safe-area-inset-bottom)); font-size: 12px; }
  .topbar {
    flex-wrap: nowrap;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: 10px;
    gap: 8px;
  }
  .nav-links { gap: 6px; }
  .nav-register { display: none; }
  .nav-links .btn, .nav-links .btn.ghost {
    padding: 8px 12px;
    min-height: 40px;
    font-size: 14px;
  }
  .theme-toggle { width: 40px; height: 40px; }
  .account-chip .chip-name { max-width: 96px; }
  .brand { gap: 8px; min-width: 0; }
  .brand div { min-width: 0; }
  .brand strong {
    font-size: 11px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand img { width: 36px; height: 36px; }
  .hero { padding-top: 12px; padding-bottom: 28px; gap: 18px; }
  .hero h1 { font-size: clamp(28px, 9vw, 36px); line-height: 1.15; }
  .hero p.lead { font-size: 16px; line-height: 1.45; max-width: none; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: 18px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-card { padding: 20px 18px; }
  .hero-card h3 { font-size: 24px; }
  .pills { gap: 6px; }
  .pill { font-size: 12px; padding: 6px 10px; }
  input, textarea, select { font-size: 16px; }
  .review-card { min-height: 240px; padding: 22px 18px 24px; }
  .review-card blockquote { font-size: 16px; }
  .reviews-meta { gap: 8px; }
  .reviews-nav { width: 40px; height: 40px; }
  .dash { gap: 12px; padding-bottom: 28px; }
  .side {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-radius: 18px;
    position: static;
    width: auto;
  }
  .side-profile {
    margin-bottom: 0;
    flex: 0 0 auto;
    padding: 6px 10px 6px 6px;
  }
  .side-nav {
    display: flex;
    gap: 8px;
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-left: 10px;
    align-items: center;
  }
  .side-nav a {
    white-space: nowrap;
    flex: 0 0 auto;
    width: auto;
  }
  .who { display: none; }
  html.is-dash .side {
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
  }
  .btn, .btn.small { min-height: 44px; }
  .brand span { display: none; }
  .account-chip .chip-name { max-width: 72px; }
  .avatar-xl { width: 72px; height: 72px; font-size: 22px; }
  .profile-hero { gap: 12px; margin-bottom: 10px; }
  .panel h1 { font-size: 28px; }
  .card { padding: 16px; }
  .call-page { grid-template-rows: auto minmax(0, 1fr) auto; }
  .call-layout,
  .call-layout.is-cameras-only,
  .call-layout.has-workspace {
    grid-template-columns: 1fr;
    padding: 0 10px 4px;
    min-height: 0;
  }
  .call-layout.is-cameras-only,
  .call-layout:not(.has-workspace) {
    grid-template-rows: minmax(0, 1fr) minmax(130px, 32vh);
  }
  .call-layout.has-workspace {
    grid-template-rows: minmax(70px, 20vh) minmax(0, 1fr) minmax(110px, 26vh);
  }
  .videos {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;
    min-height: 0;
  }
  .videos .tile,
  .call-layout.is-cameras-only .videos .tile,
  .call-layout:not(.has-workspace) .videos .tile {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    height: 100%;
    aspect-ratio: auto;
  }
  .roster { padding: 10px; max-height: none; }
  #roster-list { max-height: none; }
  .board-toolbar { gap: 6px; }
  .controls { padding: 6px 10px 10px; }
  .fx-bar { margin-top: 4px; }
  .fx-bar select { min-width: 110px; }
  input, textarea, select { font-size: 16px; }
}

.account-link:hover .avatar,
.account-chip:hover .avatar,
.avatar-edit:hover .avatar { transform: scale(1.06); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-soft {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero.fade-in h1 { animation: fade-up var(--dur-med) 70ms var(--ease) backwards; }
.hero.fade-in .lead { animation: fade-up var(--dur-med) 110ms var(--ease) backwards; }
.hero.fade-in .pills .pill { animation: fade-up 240ms var(--ease) backwards; }
.hero.fade-in .pills .pill:nth-child(1) { animation-delay: 20ms; }
.hero.fade-in .pills .pill:nth-child(2) { animation-delay: 70ms; }
.hero.fade-in .pills .pill:nth-child(3) { animation-delay: 120ms; }
.hero.fade-in > div > div:last-of-type { animation: fade-up var(--dur-med) 160ms var(--ease) backwards; }
.hero.fade-in .hero-card { animation: fade-up 320ms 80ms var(--ease) backwards; }

.feature-grid.stagger-in .card { animation: fade-up 300ms var(--ease) backwards; }
.feature-grid.stagger-in .card:nth-child(1) { animation-delay: 100ms; }
.feature-grid.stagger-in .card:nth-child(2) { animation-delay: 160ms; }
.feature-grid.stagger-in .card:nth-child(3) { animation-delay: 220ms; }

.panel.fade-in,
.auth-card.fade-in { animation: fade-up var(--dur-med) var(--ease) backwards; }

.call-page.fade-in-soft { animation: fade-soft 220ms ease backwards; }
.call-page .tile,
.call-page .tile video { transition: none; }

.progress-page { max-width: 720px; }
.progress-page > h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 4px 0 18px;
  letter-spacing: -0.02em;
}
.progress-sheet { display: grid; gap: 16px; }
.progress-sheet .sheet-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 6px 18px rgba(38, 72, 76, 0.08);
}
.progress-sheet .sheet-card:hover { transform: none; box-shadow: 0 6px 18px rgba(38, 72, 76, 0.08); }
.progress-sheet h2 { font-size: 34px; font-weight: 700; margin: 0 0 8px; }
.progress-sheet h3.serif { font-size: 24px; font-weight: 700; }
.progress-sheet .sheet-kicker,
.progress-sheet .meta { color: #5a6e70; font-size: 13px; letter-spacing: 0.01em; }
.progress-sheet .bars { margin-top: 18px; gap: 12px; }
.progress-sheet .bar-row {
  grid-template-columns: 148px 1fr 36px;
  font-size: 14px;
  color: #2a3c3e;
}
.progress-sheet .bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.progress-sheet .chip {
  background: #76a0a6;
  color: #fff;
  padding: 6px 14px;
  font-size: 13px;
}
.progress-sheet .fill { background: #4a7c82; }
.progress-sheet .track { background: #e6eef0; height: 10px; }
.progress-sheet .sheet-split.cards {
  grid-template-columns: 1fr 1fr;
  margin: 0;
}
.sheet-en { font-style: italic; margin-top: 10px; color: #2a3c3e; }
.sheet-list { margin: 8px 0 0; padding-left: 18px; color: #2a3c3e; }
.sheet-list li { margin: 8px 0; }

.hw-stats-nums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 14px;
}
.hw-stat { text-align: center; }
.hw-stat b {
  display: block;
  font-size: 22px;
  color: #4a7c82;
  font-variant-numeric: tabular-nums;
}
.hw-stat span { font-size: 12px; color: #5a6e70; }
.hw-check {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.hw-check + .hw-check { margin-top: 16px; }
.hw-grade-row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hw-grade-row select { width: auto; min-width: 88px; margin: 0; }
.hw-errors { margin-top: 8px; }
.hw-error-row { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.hw-error-row input { flex: 1; margin: 0; }
.hw-marked ul { margin: 6px 0 0; padding-left: 18px; }
.hw-grade-badge {
  display: inline-block;
  background: #4a7c82;
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
}

.hw-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.hw-tab {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--brand-deep);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hw-tab b {
  font-variant-numeric: tabular-nums;
  min-width: 1.2em;
}
.hw-tab.is-on {
  background: var(--brand-deep);
  color: #fff;
  border-color: var(--brand-deep);
}
.item.hw-overdue {
  background: #f8eaea;
  box-shadow: 0 0 0 1px rgba(138, 47, 47, 0.28);
}
.item[hidden],
[data-hw-empty][hidden] { display: none !important; }
.hw-due.is-late {
  color: #8a2f2f;
  font-weight: 700;
}
.hw-photos,
.hw-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.hw-photos a { line-height: 0; }
.hw-photos img,
.hw-thumb img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
  display: block;
}
.hw-thumb { position: relative; }
.hw-thumb-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #8a2f2f;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 14px;
}
.hw-attach { margin-top: 8px; }
.hw-file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.hw-file-btn input[type=file] { display: none; }
.hw-redo { margin-top: 10px; }
.hw-retry-note {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff4e5;
  color: #6a4b12;
}
.hw-check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: end;
}
.hw-return-note {
  flex: 1 1 180px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.hw-return-note input { margin: 4px 0 0; }

.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.react-hand, .react-clap {
  position: absolute;
  font-size: 42px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}
.react-hand { right: 12px; top: 12px; animation: hand-wave 0.8s var(--ease) infinite alternate; }
.react-clap { left: 50%; top: 40%; transform: translate(-50%, -50%); animation: clap-pop 1.5s var(--ease) forwards; }
@keyframes hand-wave {
  from { transform: rotate(-18deg) translateY(0); }
  to { transform: rotate(18deg) translateY(-6px); }
}
@keyframes clap-pop {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  25% { transform: translate(-50%, -60%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(1); opacity: 0; }
}
.fx-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.fx-bar label { margin: 0; font-size: 12px; }
.fx-bar select { width: auto; min-width: 160px; padding: 8px 10px; }
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 10px;
  flex: 0 0 auto;
}
.controls-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
#call-hint {
  margin: 0;
  max-width: 720px;
  text-align: center;
  font-size: 13px;
}
.call-chat {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 10px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: var(--surface);
}
.call-chat h3 { margin: 0 0 8px; font-size: 16px; }
.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  color: var(--ink);
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: local;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
}
.chat-line { margin: 0 0 8px; }
.chat-line.mine { color: var(--brand-deep); }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { margin: 0; flex: 1; }
#hand.is-on { background: #4a7c82; }
#hand.is-on::after { content: " ✋"; }
#clap.is-pop { animation: clap-btn 0.5s var(--ease); }
@keyframes clap-btn {
  0% { transform: scale(1); }
  35% { transform: scale(1.12) rotate(-6deg); }
  70% { transform: scale(1.06) rotate(6deg); }
  100% { transform: scale(1); }
}
@media (max-width: 380px) {
  .brand strong { display: none; }
}
@media (max-width: 820px) {
  .progress-sheet .sheet-split.cards { grid-template-columns: 1fr; }
  .progress-sheet .bar-row { grid-template-columns: 110px 1fr 32px; }
  .stats-edit .bar-row.skill-row { grid-template-columns: 110px 1fr 64px; }
  .hw-stats-nums { grid-template-columns: repeat(2, 1fr); }
}

html.theme-dark .av-ico { filter: invert(1); }
html.theme-dark .error { color: #f0a8a8; }
html.theme-dark .pw-reqs { color: #b9b3a8; }
html.theme-dark .pw-reqs li.ok,
html.theme-dark .pw-meter[data-score="3"] .pw-label,
html.theme-dark .pw-meter[data-score="4"] .pw-label { color: #9bd4a8; }
html.theme-dark .hw-retry-note { background: #3a2e18; color: #f0d9a8; }
html.theme-dark .hw-overdue { background: rgba(138, 47, 47, 0.28); }
html.theme-dark .brand img,
html.theme-dark .avatar {
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--brand);
}
html.theme-dark .btn.on-tool { background: var(--inner); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .pill:hover,
  .card:hover,
  .hero-card:hover,
  .item:hover,
  .brand:hover img,
  .account-link:hover .avatar,
  .account-chip:hover .avatar,
  .avatar-edit:hover .avatar,
  .swatch:hover,
  .reviews-nav:hover {
    transform: none;
  }
}
