:root {
  color-scheme: dark;
  --teacher-tools-panel-width: 360px;
  --teacher-tools-offset-y: 18px;
  --materials-sidebar-width: 360px;
  --bg: #120d0f;
  --bg-elevated: rgba(23, 20, 26, 0.88);
  --panel: rgba(15, 13, 18, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5efe9;
  --muted: #b8aca2;
  --accent: #ff5b6e;
  --accent-strong: #ff3853;
  --accent-soft: rgba(255, 91, 110, 0.18);
  --success: #8ce0b8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  font-family: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 91, 110, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(221, 141, 72, 0.14), transparent 24%),
    linear-gradient(180deg, #191013 0%, #0d0b0f 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.route-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(163, 38, 68, 0.48), transparent 42%),
    radial-gradient(circle at 15% 85%, rgba(255, 91, 110, 0.12), transparent 32%),
    #090709;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.route-loading-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.route-loading-overlay.is-hidden {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.route-loading-card {
  position: relative;
  width: min(540px, 100%);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background: rgba(18, 13, 16, 0.88);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(24px);
}

.route-loading-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  color: #fff8f5;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-loading-mark {
  position: relative;
  width: 38px;
  height: 30px;
}

.route-loading-mark i {
  position: absolute;
  width: 27px;
  height: 20px;
  border-radius: 7px;
  background: #9b2f47;
  box-shadow: 0 8px 20px rgba(155, 47, 71, 0.28);
}

.route-loading-mark i:nth-child(1) {
  left: 0;
  top: 8px;
}

.route-loading-mark i:nth-child(2) {
  left: 6px;
  top: 4px;
  background: #bd3b59;
}

.route-loading-mark i:nth-child(3) {
  left: 11px;
  top: 0;
  background: #e34b68;
}

.route-loading-card > p {
  margin: 0;
}

#route-loading-kicker {
  color: #d46a80;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.route-loading-card h1 {
  margin: 10px 0 12px;
  color: #fff9f5;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.04;
}

#route-loading-message {
  min-height: 48px;
  color: #baadb0;
  line-height: 1.55;
}

.route-loading-track {
  height: 3px;
  margin-top: 34px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.route-loading-track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #e24b68 32%, #ff8497 72%, transparent);
  animation: route-loading-progress 1.35s ease-in-out infinite;
}

.route-loading-pages {
  position: absolute;
  right: 36px;
  bottom: 32px;
  width: 76px;
  height: 54px;
  opacity: 0.42;
}

.route-loading-pages i {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  transform-origin: bottom right;
  animation: route-loading-page 1.8s ease-in-out infinite;
}

.route-loading-pages i:nth-child(2) {
  animation-delay: -0.6s;
}

.route-loading-pages i:nth-child(3) {
  animation-delay: -1.2s;
}

@keyframes route-loading-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(340%); }
}

@keyframes route-loading-page {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.35; }
  45% { transform: translate(-18px, -8px) rotate(-4deg); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .route-loading-track span,
  .route-loading-pages i {
    animation-duration: 4s;
  }
}

@media (max-width: 600px) {
  .route-loading-card {
    padding: 30px 26px;
    border-radius: 22px;
  }

  .route-loading-brand {
    margin-bottom: 38px;
  }
}

body:not(.is-lesson) {
  overflow-x: hidden;
  background: #070709;
}

button,
a,
iframe,
code {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
}

body:not(.is-lesson) .app-shell {
  width: 100%;
  padding: 0;
}

body.is-lesson .app-shell {
  width: calc(100% - 12px);
  padding: 6px 0;
}

body.is-lesson .topbar {
  display: none;
}

body.is-lesson .brand-mark {
  width: 10px;
  height: 10px;
}

body.is-lesson .eyebrow {
  display: none;
}

body.is-lesson .brand-lockup h1 {
  font-size: 1rem;
}

body.is-lesson .primary-button,
body.is-lesson .ghost-button {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.board-focus-button {
  padding: 9px 12px;
  border: 1px solid rgba(140, 224, 184, 0.22);
  border-radius: 10px;
  color: #eafff6;
  background: rgba(140, 224, 184, 0.09);
  font-size: 0.88rem;
  font-weight: 900;
}

.board-focus-button[aria-pressed="true"] {
  border-color: rgba(255, 91, 110, 0.42);
  color: #fff6f7;
  background: linear-gradient(135deg, #9b2f47, #5d1c2b);
  box-shadow: 0 12px 30px rgba(155, 47, 71, 0.24);
}

.save-current-board-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #30282c, #090809 72%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  font: inherit;
  font-weight: 800;
}

.save-current-board-button:disabled {
  color: #a79da2;
  cursor: default;
  opacity: 0.72;
}

body.is-student .topbar-actions {
  display: none !important;
}

body.is-student .lesson-roster {
  display: none !important;
}

body.is-history .lesson-dock,
body.is-history .video-window,
body.is-history .teacher-tools-tab,
body.is-history .teacher-tools-panel,
body.is-homework-workspace .topbar-actions,
body.is-homework-workspace .lesson-dock,
body.is-homework-workspace .video-window,
body.is-homework-workspace .teacher-tools-tab,
body.is-homework-workspace .teacher-tools-panel {
  display: none !important;
}

.board-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.board-editor-actions > span {
  color: var(--muted);
  font-size: 0.84rem;
}

.board-editor-actions button {
  min-height: 42px;
  padding: 0 16px;
}

body.is-library-editor .topbar-actions,
body.is-library-editor .teacher-session-pill,
body.is-library-editor .lesson-dock,
body.is-library-editor .video-window,
body.is-library-editor .teacher-tools-tab,
body.is-library-editor .teacher-tools-panel {
  display: none !important;
}

body.is-library-editor .lesson-view {
  grid-template-columns: minmax(0, 1fr);
}

body.is-library-editor .topbar {
  display: flex;
}

body.is-library-editor .board-stage {
  min-height: calc(100vh - 72px);
}

body.is-library-editor .board-canvas {
  min-height: calc(100vh - 82px);
}

@media (max-width: 760px) {
  body.is-library-editor .brand-lockup {
    display: none;
  }

  body.is-library-editor .topbar {
    min-height: 70px;
    padding: 10px 16px;
  }

  body.is-library-editor .board-editor-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .board-editor-actions > span {
    display: none;
  }

  .board-editor-actions button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 0.78rem;
  }
}

body.is-history #copy-link-button {
  display: none !important;
}

body.is-history .lesson-view,
body.is-homework-workspace .lesson-view {
  grid-template-columns: minmax(0, 1fr);
}

body.is-history .board-stage,
body.is-homework-workspace .board-stage {
  min-height: calc(100vh - 72px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.topbar {
  position: relative;
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(13, 11, 15, 0.75);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7281, #ff3853);
  box-shadow: 0 0 24px rgba(255, 91, 110, 0.5);
}

.eyebrow,
.sidebar-label,
.panel-kicker,
.badge {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: #ff9eaa;
}

.brand-lockup h1,
.hero-copy h2,
.lesson-sidebar h2,
.panel-header h3 {
  margin: 0;
}

.brand-lockup h1 {
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.topbar-actions,
.landing-auth-actions,
.hero-actions,
.sidebar-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-auth-actions {
  width: 100%;
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

body.is-lesson .landing-auth-actions {
  display: none;
}

.teacher-session-pill {
  display: grid;
  gap: 2px;
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid rgba(140, 224, 184, 0.22);
  border-radius: 12px;
  color: var(--success);
  background: rgba(140, 224, 184, 0.07);
  text-align: left;
}

.teacher-session-pill span {
  color: var(--muted);
  font-size: 0.68rem;
}

.teacher-session-pill strong {
  max-width: 150px;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-roster {
  position: relative;
  min-width: 280px;
  flex: 1 1 420px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-left: 1px solid var(--border);
}

.lesson-roster-title {
  flex: 0 0 auto;
  margin: 0 4px 0 0;
  color: #ff9eaa;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lesson-plan-toggle {
  flex: 0 0 auto;
  min-height: 32px;
  max-width: 150px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-plan-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 92;
  width: min(420px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18, 16, 21, 0.98);
  box-shadow: var(--shadow);
}

.lesson-plan-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.lesson-plan-panel input,
.lesson-plan-panel textarea {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  resize: vertical;
}

.lesson-plan-panel textarea {
  min-height: 70px;
}

.lesson-roster-add {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 91, 110, 0.14);
  border: 1px dashed rgba(255, 91, 110, 0.38);
  font-size: 0.75rem;
  font-weight: 800;
}

.primary-button,
.ghost-button {
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.primary-button {
  color: #fff7f8;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(255, 56, 83, 0.28);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.primary-button:hover,
.ghost-button:hover,
.sidebar-links a:hover {
  transform: translateY(-1px);
}

.landing-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 310px 20px 52px;
  background:
    radial-gradient(ellipse 36% 24% at 0% 0%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 229, 225, 0.46) 10%, rgba(255, 172, 181, 0.18) 27%, transparent 50%),
    radial-gradient(ellipse 36% 24% at 100% 0%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 229, 225, 0.46) 10%, rgba(255, 172, 181, 0.18) 27%, transparent 50%),
    radial-gradient(ellipse 96% 106% at 50% 100%, #070709 0%, #090507 51%, rgba(37, 4, 9, 0.92) 62%, rgba(124, 6, 19, 0.82) 71%, rgba(197, 13, 38, 0.58) 82%, transparent 93%),
    linear-gradient(180deg, #e93d52 0%, #dc263e 42%, #c91c34 100%);
  isolation: isolate;
}

.landing-view::before {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: -1;
  width: min(500px, 58vw);
  height: 52px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 242, 239, 0.48) 20%, rgba(255, 178, 187, 0.16) 48%, transparent 80%);
  filter: saturate(1.04) blur(0.2px);
  content: "";
}

.landing-view::after {
  position: absolute;
  top: 182px;
  left: 50%;
  z-index: -1;
  width: max(1320px, 155vw);
  height: 300px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(205, 30, 50, 0.1), rgba(205, 30, 50, 0));
  content: "";
}

.hero-copy,
.preview-card,
.lesson-sidebar,
.materials-panel,
.lesson-dock,
.panel {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy {
  width: min(420px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 4.1rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.hero-copy .badge {
  margin: 0 0 14px;
  color: rgba(245, 239, 233, 0.72);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
}

.landing-subtitle {
  margin: 14px 0 0;
  color: rgba(245, 239, 233, 0.68);
  font-size: 0.92rem;
  line-height: 1.45;
}

.hero-text,
.sidebar-text {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: block;
  margin: 30px 0 0;
}

.hero-actions .primary-button,
.landing-login-button {
  width: 100%;
  min-height: 62px;
  border-radius: 999px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-actions .primary-button {
  background: linear-gradient(180deg, #ff6979 0%, #ff304a 100%);
  box-shadow:
    0 20px 44px rgba(255, 56, 83, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.landing-or {
  position: relative;
  height: 24px;
  display: grid;
  place-items: center;
  color: rgba(245, 239, 233, 0.56);
  font-size: 0.76rem;
  text-transform: lowercase;
}

.landing-or::before {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(245, 239, 233, 0.54);
  content: "";
}

.landing-or span {
  position: relative;
  padding: 0 16px;
  background: #1b0408;
}

.landing-login-button {
  color: #f5efe9;
  background: linear-gradient(180deg, rgba(82, 80, 84, 0.9), rgba(43, 42, 45, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.landing-register-prompt {
  margin: 0;
  color: rgba(245, 239, 233, 0.48);
  font-size: 0.8rem;
}

.landing-register-prompt button {
  margin-left: 5px;
  padding: 0;
  color: #ff5b6e;
  background: transparent;
  font-weight: 700;
}

.hero-points {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-points code {
  color: var(--text);
  font-size: 0.92em;
}

.preview-card {
  padding: 18px;
  overflow: hidden;
}

.preview-browser {
  display: flex;
  gap: 8px;
  padding: 6px 0 16px;
}

.preview-browser span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.preview-stage {
  min-height: 580px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(8, 8, 11, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.preview-video,
.preview-board {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.preview-video {
  height: 34%;
  min-height: 190px;
  margin-bottom: 16px;
  padding: 18px;
}

.preview-board {
  height: calc(66% - 16px);
  min-height: 300px;
  padding: 18px;
}

.preview-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: #ffb4bd;
}

.preview-participants {
  height: calc(100% - 30px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: end;
  padding-top: 18px;
}

.participant-card {
  min-height: 112px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 180, 129, 0.35), transparent 30%),
    linear-gradient(180deg, #36231f 0%, #171417 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.participant-card--wide {
  min-height: 144px;
}

.preview-board-surface {
  position: relative;
  height: calc(100% - 28px);
  margin-top: 16px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.02);
  background-size: 44px 44px;
}

.preview-equation,
.preview-shape {
  position: absolute;
}

.preview-equation {
  top: 20%;
  left: 12%;
  padding: 10px 12px;
  border-radius: 8px;
  color: #1d1518;
  background: #f7efe8;
  font-weight: 800;
}

.preview-shape--triangle {
  right: 14%;
  top: 26%;
  width: 120px;
  height: 90px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 3px solid #f7efe8;
  background: rgba(247, 239, 232, 0.08);
}

.preview-shape--note {
  left: 32%;
  bottom: 18%;
  padding: 12px 14px;
  border-radius: 8px;
  color: #1d1518;
  background: #ffd3a7;
  font-weight: 800;
}

.lesson-view {
  display: grid;
  grid-template-columns: var(--materials-sidebar-width) minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  transition: grid-template-columns 180ms ease;
}

body.is-materials-resizing,
body.is-materials-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

body.is-materials-resizing .lesson-view,
body.is-materials-resizing .video-window {
  transition: none;
}

body.materials-collapsed .lesson-view {
  grid-template-columns: 76px minmax(0, 1fr);
}

body.materials-collapsed .lesson-dock {
  display: grid;
  grid-template-columns: 76px;
}

body.materials-collapsed .materials-panel,
body.materials-collapsed .students-panel,
body.materials-collapsed .communications-panel {
  display: none;
}

body.is-student .lesson-view {
  grid-template-columns: 1fr;
}

body.is-student .lesson-dock,
body.is-student .teacher-tools-tab,
body.is-student .teacher-tools-panel {
  display: none;
}

.lesson-dock {
  position: relative;
  z-index: 300;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 0;
}

.lesson-dock.is-resizing {
  will-change: width;
}

.lesson-dock,
.board-stage {
  min-height: calc(100vh - 12px);
}

.lesson-sidebar {
  padding: 14px;
  border-radius: 18px;
}

.materials-panel {
  min-height: calc(100vh - 12px);
  height: calc(100vh - 12px);
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 18px;
  overflow: hidden;
}

.lesson-dock-tabs {
  min-height: calc(100vh - 12px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 14px 9px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 9, 12, 0.82);
}

.lesson-dock-tab {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff7f8;
  background: rgba(255, 91, 110, 0.08);
  border: 1px solid transparent;
}

.lesson-dock-tab.is-active {
  background: rgba(255, 56, 83, 0.18);
  border-color: rgba(255, 91, 110, 0.44);
  box-shadow: 0 10px 24px rgba(255, 56, 83, 0.18);
}

.lesson-dock-tab span {
  position: relative;
  display: block;
}

.lesson-dock-tab--materials span {
  width: 37px;
  height: 26px;
  border-radius: 5px 7px 7px 7px;
  background: linear-gradient(135deg, #ff6a7a, #d71935);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.lesson-dock-tab--materials span::before {
  position: absolute;
  top: -8px;
  left: 2px;
  width: 18px;
  height: 10px;
  border-radius: 5px 5px 0 0;
  background: #ff6a7a;
  content: "";
}

.lesson-dock-tab--schedule span {
  width: 42px;
  height: 42px;
  background: #ff3853;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h5'/%3E%3Cpath d='M17.5 17.5 16 16.3V14'/%3E%3Ccircle cx='16' cy='16' r='6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lesson-dock-tab--contacts span {
  width: 40px;
  height: 40px;
  background: #ff3853;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dock-panel {
  display: none;
}

.dock-panel.is-active {
  display: flex;
}

.students-panel {
  min-height: calc(100vh - 72px);
  height: calc(100vh - 72px);
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  overflow: auto;
  background: rgba(15, 13, 18, 0.92);
}

.communications-panel {
  min-height: calc(100vh - 72px);
  height: calc(100vh - 72px);
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  overflow: auto;
  background: rgba(15, 13, 18, 0.92);
}

.students-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.teacher-cabinet-link {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 91, 110, 0.34);
  border-radius: 11px;
  color: #fff7f8;
  background:
    linear-gradient(135deg, rgba(255, 56, 83, 0.26), rgba(122, 25, 43, 0.42)),
    rgba(255, 91, 110, 0.08);
  box-shadow: 0 10px 24px rgba(255, 56, 83, 0.12);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.teacher-cabinet-link:hover {
  background:
    linear-gradient(135deg, rgba(255, 56, 83, 0.46), rgba(122, 25, 43, 0.58)),
    rgba(255, 91, 110, 0.12);
  transform: translateY(-1px);
}

.students-panel-header h2 {
  margin: 0;
  font-size: 1.24rem;
}

.materials-panel .sidebar-text {
  display: none;
}

.materials-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.materials-panel h2 {
  margin: 0;
  font-size: 1.24rem;
}

.materials-root-button {
  min-width: 54px;
  min-height: 36px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-weight: 900;
}

.materials-breadcrumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.materials-breadcrumbs button {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  color: rgba(245, 239, 233, 0.86);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 900;
}

.materials-current-folder {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 91, 110, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 91, 110, 0.18);
}

.materials-current-folder span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.materials-current-folder strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.materials-folder-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.material-folder-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  align-items: stretch;
  overflow: hidden;
  min-height: 50px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
}

.material-folder-grip {
  display: grid;
  place-items: center;
  color: rgba(245, 239, 233, 0.38);
  background: rgba(255, 255, 255, 0.09);
  font-weight: 900;
  letter-spacing: -0.14em;
  cursor: grab;
}

.material-folder-row.is-folder-arriving {
  animation: folder-wave-in 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--folder-wave-index, 0) * 46ms);
}

.material-folder-row.is-folder-opening {
  animation: folder-slide-away 170ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

.material-folder-grip:active {
  cursor: grabbing;
}

.material-folder-row.is-folder-dragging {
  opacity: 0.32;
}

.material-folder-row.is-drop-before::before,
.material-folder-row.is-drop-after::after {
  position: absolute;
  z-index: 3;
  right: 8px;
  left: 8px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 91, 110, 0.55);
  content: "";
}

.material-folder-row.is-drop-before::before {
  top: 1px;
}

.material-folder-row.is-drop-after::after {
  bottom: 1px;
}

.materials-folder-list.is-folder-drop-tail::after {
  height: 3px;
  margin: -3px 8px 0;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 91, 110, 0.55);
  content: "";
}

.material-folder-drag-preview {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 280px;
  opacity: 0.94;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

@keyframes folder-slide-away {
  to {
    opacity: 0;
    transform: translateX(-34px);
  }
}

@keyframes folder-wave-in {
  from {
    opacity: 0;
    transform: translateX(26px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.material-folder-name,
.material-folder-open {
  color: var(--text);
  background: transparent;
}

.material-folder-name {
  display: flex;
  align-items: center;
  padding: 0 12px;
  text-align: left;
  font-weight: 900;
}

.material-folder-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.material-folder-open {
  border-left: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 900;
}

.material-folder-row.is-active {
  border-color: rgba(255, 91, 110, 0.38);
  background: rgba(255, 91, 110, 0.13);
}

.materials-new-folder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.materials-new-folder input {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 11px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  outline: none;
}

.materials-new-folder button {
  padding: 0 11px;
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-weight: 900;
}

.materials-template-button {
  width: 100%;
  min-height: 39px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 180, 189, 0.28);
  border-radius: 11px;
  color: #ffb4bd;
  text-align: left;
  background: rgba(255, 91, 110, 0.055);
  font-size: 0.74rem;
  font-weight: 900;
}

.lesson-meta--compact {
  margin-top: 0;
}

.materials-tree {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.materials-tree details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.materials-tree details details {
  margin: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.materials-tree summary {
  padding: 10px 11px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.material-topic {
  width: calc(100% - 16px);
  min-height: 34px;
  margin: 0 8px 8px;
  padding: 8px 10px;
  border-radius: 9px;
  color: rgba(245, 239, 233, 0.84);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 0.86rem;
  font-weight: 700;
}

.material-topic.is-active {
  color: #fff;
  background: rgba(255, 91, 110, 0.18);
  border-color: rgba(255, 91, 110, 0.32);
}

.materials-subhead {
  margin-top: 14px;
  color: #ffb4bd;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
}

.materials-board-hint {
  margin: 7px 0 0;
  padding: 9px 10px;
  border-radius: 11px;
  color: rgba(245, 239, 233, 0.72);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  line-height: 1.45;
}

.materials-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.materials-empty-grid {
  grid-column: 1 / -1;
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 22px 22px;
}

@media (prefers-reduced-motion: reduce) {
  .material-folder-row.is-folder-arriving,
  .material-folder-row.is-folder-opening {
    animation: none;
  }
}

.material-card {
  min-height: 112px;
  display: grid;
  grid-template-rows: minmax(62px, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: grab;
}

.material-card:hover {
  border-color: rgba(255, 91, 110, 0.36);
  transform: translateY(-1px);
}

.material-card:active {
  cursor: grabbing;
}

.material-thumb {
  display: grid;
  place-items: center;
  min-height: 62px;
  color: #2c1b1e;
  background: #f5efe9;
  font-size: 0.78rem;
  font-weight: 900;
}

.material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.material-card-body {
  padding: 8px;
}

.material-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.material-card small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
}

.material-open-button,
.material-copy-button,
.material-delete-button {
  width: 100%;
  min-height: 28px;
  margin-top: 7px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.material-open-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.material-copy-button {
  color: #211c1a;
  background: linear-gradient(135deg, #f5efe9, #d8d0c9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.material-copy-button:disabled {
  color: rgba(245, 239, 233, 0.45);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border);
  cursor: not-allowed;
}

.material-delete-button {
  color: #ffb4bd;
  background: rgba(255, 91, 110, 0.1);
  border: 1px solid rgba(255, 91, 110, 0.16);
}

.materials-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.84rem;
}

.explorer-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.explorer-title h2 {
  margin: 1px 0 0;
  font-size: 1.04rem;
}

.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
}

.explorer-toolbar button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: rgba(245, 239, 233, 0.8);
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
}

.explorer-toolbar button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.explorer-search {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  height: 34px;
  margin-top: 12px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
}

.explorer-search:focus-within {
  border-color: rgba(255, 91, 110, 0.58);
}

.explorer-search input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.78rem;
}

.materials-new-folder {
  flex: 0 0 auto;
  margin-top: 10px;
}

.explorer-section {
  flex: 0 0 auto;
  margin-top: 11px;
}

.teacher-homework-shortcut {
  width: 100%;
  appearance: none;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 12px 0 2px;
  padding: 10px 12px;
  border: 1px solid rgba(237, 190, 82, 0.28);
  border-radius: 13px;
  color: #f7e5ad;
  text-align: left;
  background: linear-gradient(145deg, rgba(105, 73, 22, 0.48), rgba(48, 31, 15, 0.68));
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
  cursor: pointer;
}

.teacher-homework-shortcut:hover {
  border-color: rgba(244, 202, 105, 0.56);
  background: linear-gradient(145deg, rgba(126, 87, 25, 0.58), rgba(55, 34, 16, 0.76));
  transform: translateY(-1px);
}

.teacher-homework-shortcut.is-drop-target,
.teacher-homework-panel.is-drop-target {
  border-color: rgba(241, 191, 78, 0.78);
  background:
    radial-gradient(circle at 12% 0%, rgba(241, 191, 78, 0.32), transparent 40%),
    rgba(47, 31, 16, 0.9);
  box-shadow:
    0 0 0 2px rgba(241, 191, 78, 0.14),
    0 18px 38px rgba(241, 191, 78, 0.1);
}

.teacher-homework-shortcut.is-disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.teacher-homework-shortcut.is-open .teacher-homework-shortcut-caret {
  transform: rotate(180deg);
}

.teacher-homework-shortcut-icon {
  position: relative;
  width: 32px;
  height: 25px;
  border-radius: 6px;
  background: linear-gradient(145deg, #f2c65b, #bf7b22);
  box-shadow: 0 6px 14px rgba(112, 69, 13, 0.28);
}

.teacher-homework-shortcut-icon::before {
  position: absolute;
  top: -5px;
  left: 3px;
  width: 14px;
  height: 7px;
  border-radius: 5px 5px 0 0;
  background: #e8b94d;
  content: "";
}

.teacher-homework-shortcut-icon::after {
  position: absolute;
  right: -7px;
  bottom: -7px;
  min-width: 21px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(35, 22, 12, 0.9);
  border-radius: 999px;
  color: #251409;
  background: #ffe8a8;
  content: "ДЗ";
  font-size: 0.48rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.teacher-homework-shortcut > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.teacher-homework-shortcut strong,
.teacher-homework-shortcut small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-homework-shortcut strong {
  font-size: 0.82rem;
}

.teacher-homework-shortcut small {
  color: rgba(247, 229, 173, 0.68);
  font-size: 0.68rem;
}

.teacher-homework-panel {
  display: grid;
  gap: 10px;
  margin: 8px 0 4px;
  padding: 12px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(237, 190, 82, 0.22);
  border-radius: 15px;
  background:
    radial-gradient(circle at 10% 0%, rgba(240, 183, 69, 0.16), transparent 36%),
    rgba(22, 17, 15, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  scrollbar-color: rgba(241, 191, 78, 0.46) rgba(255, 255, 255, 0.035);
}

.teacher-homework-panel.hidden,
.teacher-homework-upload.hidden {
  display: none;
}

.teacher-homework-students {
  display: grid;
}

.teacher-homework-student-select {
  width: 100%;
  min-height: 38px;
  padding: 0 38px 0 12px;
  border: 1px solid rgba(247, 229, 173, 0.14);
  border-radius: 11px;
  color: #f8edcf;
  background: rgba(9, 7, 8, 0.54);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  outline: none;
}

.teacher-homework-student-select:focus {
  border-color: rgba(243, 201, 93, 0.58);
  box-shadow: 0 0 0 3px rgba(243, 201, 93, 0.12);
}

.teacher-homework-status {
  display: grid;
  gap: 2px;
  padding: 0;
  color: rgba(247, 229, 173, 0.76);
  background: transparent;
  font-size: 0.82rem;
  line-height: 1.35;
}

.teacher-homework-status strong {
  color: #fff2c6;
}

.teacher-homework-status span {
  color: rgba(247, 229, 173, 0.64);
}

.teacher-homework-status .teacher-homework-sent-notice {
  color: #94e8b9;
  font-weight: 850;
}

.teacher-homework-status small {
  color: rgba(247, 229, 173, 0.52);
  font-size: 0.7rem;
}

.teacher-homework-files {
  display: grid;
  gap: 7px;
}

.teacher-homework-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
}

.teacher-homework-files button,
.teacher-homework-upload {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(247, 229, 173, 0.12);
  border-radius: 11px;
  color: #f8edcf;
  background: rgba(9, 7, 8, 0.44);
  text-align: left;
}

.teacher-homework-files .teacher-homework-file-remove {
  width: 30px;
  min-height: 38px;
  place-items: center;
  padding: 0;
  color: rgba(255, 226, 188, 0.76);
  background: rgba(130, 48, 45, 0.2);
  font-size: 1rem;
  font-weight: 900;
}

.teacher-homework-files .teacher-homework-file-remove:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 99, 105, 0.5);
  background: rgba(170, 48, 55, 0.34);
}

.teacher-homework-files .teacher-homework-file-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.teacher-homework-file-open {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.teacher-homework-file-open .file-type-icon,
.student-homework-files .file-type-icon {
  width: 20px;
  height: 24px;
  border-radius: 5px;
}

.homework-file-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.homework-file-label {
  color: rgba(247, 229, 173, 0.54);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.homework-file-copy strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-homework-file.is-draft .teacher-homework-file-open {
  border-color: rgba(243, 201, 93, 0.2);
  color: #ffe6a5;
  background: rgba(222, 154, 45, 0.12);
}

.teacher-homework-empty {
  margin: 0;
  color: rgba(247, 229, 173, 0.58);
  font-size: 0.74rem;
  line-height: 1.45;
}

.teacher-homework-upload {
  place-items: center;
  border-style: dashed;
  color: #ffe4a5;
  background: rgba(222, 154, 45, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.teacher-homework-upload.is-busy {
  opacity: 0.62;
  cursor: progress;
  pointer-events: none;
}

.teacher-homework-send {
  min-height: 38px;
  border: 1px solid rgba(255, 105, 125, 0.45);
  border-radius: 12px;
  color: #fff7f7;
  background: linear-gradient(135deg, #ff4b6d, #b62243);
  box-shadow: 0 14px 32px rgba(169, 36, 65, 0.22);
  font-size: 0.8rem;
  font-weight: 950;
  cursor: pointer;
}

.teacher-homework-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(169, 36, 65, 0.3);
}

.teacher-homework-send:disabled {
  opacity: 0.55;
  cursor: progress;
}

.teacher-homework-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.teacher-homework-actions button {
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid rgba(247, 229, 173, 0.14);
  border-radius: 11px;
  color: #fff1c4;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.74rem;
  font-weight: 900;
}

.teacher-homework-actions button:nth-last-child(-n + 2) {
  grid-column: span 2;
  color: #201015;
  background: linear-gradient(135deg, #f1bf4e, #d98c28);
}

.teacher-homework-actions button.hidden {
  display: none;
}

.teacher-homework-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.teacherdeck-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 172px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 76, 104, 0.18), transparent 40%),
    rgba(20, 13, 16, 0.94);
  box-shadow: 0 18px 50px rgba(6, 2, 4, 0.42);
}

.teacherdeck-context-menu button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: #fff5f6;
  background: transparent;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 900;
}

.teacherdeck-context-menu button:hover {
  background: rgba(255, 76, 104, 0.18);
}

.explorer-section--library {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.explorer-section-toggle,
.explorer-section-heading {
  width: 100%;
  min-height: 27px;
  padding: 4px 3px;
  color: rgba(245, 239, 233, 0.86);
  text-align: left;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explorer-section-heading:hover {
  color: #ffb4bd;
  background: rgba(255, 91, 110, 0.06);
}

.explorer-section-toggle span {
  display: inline-block;
  width: 17px;
  color: var(--muted);
}

.explorer-board-folder-toggle {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 7px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: #f5eff2;
  background: linear-gradient(145deg, #2a2226, #090809 72%);
}

.explorer-section-toggle .explorer-board-folder-icon {
  position: relative;
  width: 21px;
  height: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px 5px 5px 5px;
  background: #111;
}

.explorer-section-toggle .explorer-board-folder-icon::before {
  position: absolute;
  left: 1px;
  top: -5px;
  width: 10px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  background: #292326;
  content: "";
}

.explorer-board-folder-toggle > span:nth-child(2) {
  width: auto;
  color: inherit;
}

.explorer-board-folder-toggle .explorer-section-caret {
  width: 17px;
  text-align: center;
}

.explorer-board-list {
  margin-left: 0;
  padding: 3px 0 1px;
}

.explorer-board-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px 26px;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 5px 4px 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(8, 7, 8, 0.7);
  cursor: grab;
}

.explorer-board-row:hover {
  border-color: rgba(255, 91, 110, 0.28);
  background: rgba(255, 255, 255, 0.055);
}

.explorer-board-row .explorer-row-action {
  color: #a99ea3;
}

.explorer-board-row .explorer-row-action:hover {
  color: #fff4f6;
  background: rgba(255, 91, 110, 0.13);
}

.explorer-board-copy,
.explorer-board-copy strong,
.explorer-board-copy small {
  display: block;
  min-width: 0;
}

.explorer-board-title-input,
.explorer-board-title-text {
  width: 100%;
  min-width: 0;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  overflow: hidden;
  color: #f4edf0;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-board-title-text {
  user-select: none;
}

.explorer-board-title-input:not([readonly]) {
  border-color: rgba(255, 91, 110, 0.68);
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 2px rgba(255, 91, 110, 0.12);
}

.explorer-board-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
}

.explorer-special-list {
  display: grid;
  gap: 2px;
  margin: 2px 0 0 13px;
}

.materials-folder-list {
  min-height: 0;
  display: block;
  margin-top: 2px;
  overflow-y: auto;
  padding: 0 2px 16px 0;
}

.explorer-folder-node {
  display: block;
}

.explorer-folder-row {
  position: relative;
  display: grid;
  grid-template-columns: 15px 26px minmax(0, 1fr) 36px;
  align-items: center;
  min-height: 44px;
  margin: 2px 0;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.018);
}

.explorer-folder-row:hover,
.explorer-folder-row.is-selected {
  border-color: rgba(255, 91, 110, 0.14);
  background: rgba(255, 91, 110, 0.06);
}

.explorer-folder-row.is-selected {
  color: #fff;
  border-color: rgba(255, 91, 110, 0.32);
  background: linear-gradient(90deg, rgba(255, 91, 110, 0.2), rgba(255, 91, 110, 0.05));
}

.explorer-folder-row.is-material-target,
.explorer-empty-grid.is-material-target {
  border-color: rgba(255, 91, 110, 0.8);
  background: rgba(255, 91, 110, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 110, 0.3);
}

.explorer-folder-row.is-drop-before::before,
.explorer-folder-row.is-drop-after::after {
  position: absolute;
  right: 3px;
  left: 3px;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
  content: "";
}

.explorer-folder-row.is-drop-before::before {
  top: 0;
}

.explorer-folder-row.is-drop-after::after {
  bottom: 0;
}

.material-folder-grip {
  opacity: 0;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: grab;
}

.explorer-folder-row:hover .material-folder-grip {
  opacity: 0.8;
}

.explorer-folder-row.is-folder-dragging {
  opacity: 0.35;
}

.explorer-folder-toggle {
  width: 26px;
  height: 42px;
  color: var(--muted);
  background: transparent;
  font-size: 1.12rem;
}

.explorer-folder-name {
  min-width: 0;
  height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 5px 0 0;
  overflow: hidden;
  color: inherit;
  text-align: left;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 650;
}

.explorer-folder-name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-folder-icon {
  position: relative;
  flex: 0 0 auto;
  width: 21px;
  height: 15px;
  border-radius: 3px 4px 4px 4px;
  background: linear-gradient(135deg, #542a33, #2a1a20);
  box-shadow: inset 0 0 0 1px rgba(255, 180, 189, 0.2);
}

.explorer-folder-icon::before {
  position: absolute;
  top: -4px;
  left: 1px;
  width: 10px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  background: #713440;
  content: "";
}

.explorer-folder-row.is-selected .explorer-folder-icon {
  background: linear-gradient(135deg, #ff5b6e, #8e3040);
  box-shadow: 0 0 0 1px rgba(255, 180, 189, 0.35);
}

.explorer-folder-upload {
  height: 31px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(245, 239, 233, 0.48);
  background: transparent;
}

.explorer-folder-upload {
  width: 31px;
  margin-right: 3px;
  font-size: 1.22rem;
  font-weight: 500;
}

.explorer-folder-row:hover .explorer-folder-upload,
.explorer-folder-row.is-selected .explorer-folder-upload {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.explorer-folder-upload:hover {
  color: #fff;
  border-color: rgba(255, 91, 110, 0.35);
  background: rgba(255, 91, 110, 0.18);
}

.explorer-branch {
  margin-left: 17px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.explorer-branch > .explorer-folder-node,
.explorer-branch > .explorer-file-row,
.explorer-branch > .explorer-empty-grid {
  animation: explorer-tree-wave 190ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.explorer-branch > :nth-child(2) {
  animation-delay: 26ms;
}

.explorer-branch > :nth-child(3) {
  animation-delay: 52ms;
}

.explorer-branch > :nth-child(n + 4) {
  animation-delay: 72ms;
}

.explorer-empty-grid {
  min-height: 108px;
  margin: 4px 4px 7px 7px;
  border-radius: 8px;
  background-size: 18px 18px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

@keyframes explorer-tree-wave {
  from {
    opacity: 0;
    transform: translateX(9px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .explorer-branch > .explorer-folder-node,
  .explorer-branch > .explorer-file-row,
  .explorer-branch > .explorer-empty-grid {
    animation: none;
  }
}

.explorer-file-row {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 26px 26px;
  align-items: center;
  min-height: 29px;
  padding-left: 7px;
  border-radius: 6px;
}

.explorer-file-row.is-special {
  grid-template-columns: minmax(0, 1fr) 26px 26px;
}

.explorer-file-row.is-menu-open {
  margin-bottom: 145px;
}

.explorer-file-row:hover,
.explorer-file-row.is-menu-open {
  background: rgba(255, 255, 255, 0.055);
}

.explorer-file-grip {
  width: 12px;
  color: transparent;
  cursor: grab;
  font-size: 0.78rem;
  line-height: 1;
}

.explorer-file-row:hover .explorer-file-grip {
  color: rgba(184, 172, 162, 0.7);
}

.explorer-file-row.is-file-dragging {
  opacity: 0.42;
}

.explorer-file-row.is-drop-before::before,
.explorer-file-row.is-drop-after::after {
  position: absolute;
  right: 2px;
  left: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.explorer-file-row.is-drop-before::before {
  top: -1px;
}

.explorer-file-row.is-drop-after::after {
  bottom: -1px;
}

.explorer-file-main {
  width: auto;
  min-width: 0;
  min-height: 29px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0 4px 0 0;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  font-weight: 500;
}

.explorer-file-kind {
  flex: 0 0 auto;
  color: #78b7f1;
  font-size: 0.6rem;
  font-weight: 900;
}

.file-type-icon {
  position: relative;
  display: inline-grid;
  width: 22px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  color: #fff;
  background: #242025;
  font-size: 0;
}

.file-type-icon::after {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 5px;
  height: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  border-right: 1px solid rgba(255, 255, 255, 0.65);
  content: "";
}

.file-type-icon.is-image {
  color: #dff5ea;
  background: linear-gradient(155deg, #327860, #183a31);
}

.file-type-icon.is-image::before {
  width: 13px;
  height: 10px;
  border-radius: 2px;
  background:
    radial-gradient(circle at 75% 24%, #f6dc82 0 1px, transparent 2px),
    linear-gradient(145deg, transparent 42%, #dff5ea 43% 58%, transparent 59%),
    linear-gradient(35deg, transparent 38%, #8dd2b6 39% 62%, transparent 63%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  content: "";
}

.file-type-icon.is-pdf {
  background: linear-gradient(155deg, #c84b5e, #702839);
}

.file-type-icon.is-pdf::before {
  content: "PDF";
  font-size: 0.43rem;
  font-weight: 1000;
  letter-spacing: -0.03em;
}

.file-type-icon.is-presentation {
  background: linear-gradient(155deg, #d67a38, #833e20);
}

.file-type-icon.is-presentation::before {
  content: "P";
  font-size: 0.72rem;
  font-weight: 1000;
}

.file-type-icon.is-board {
  background: linear-gradient(155deg, #262126, #070607);
}

.file-type-icon.is-board::before {
  width: 13px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 91, 110, 0.8) 48% 54%, transparent 55%),
    linear-gradient(transparent 47%, rgba(255, 91, 110, 0.8) 48% 54%, transparent 55%);
  content: "";
}

.file-type-icon.is-file::before {
  width: 10px;
  height: 2px;
  background: #aaa2a7;
  box-shadow: 0 4px 0 #aaa2a7, 0 -4px 0 #aaa2a7;
  content: "";
}

.explorer-file-kind.file-type-icon {
  color: #fff;
  font-size: 0;
}

.explorer-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

.explorer-row-action,
.explorer-file-row .material-copy-button {
  width: 25px;
  min-height: 25px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  color: transparent;
  background: transparent;
  border: 0;
  font-size: 0.92rem;
  font-weight: 900;
}

.explorer-file-row:hover .explorer-row-action,
.explorer-file-row.is-menu-open .explorer-row-action {
  color: var(--muted);
}

.explorer-file-row .material-copy-button:hover,
.explorer-file-row .material-menu-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.explorer-file-row .material-copy-button:disabled {
  opacity: 0;
}

.material-row-menu {
  position: absolute;
  top: calc(100% + 3px);
  right: 2px;
  z-index: 10;
  width: 190px;
  display: grid;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #201c22;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
}

.material-row-menu button {
  width: 100%;
  min-height: 31px;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  text-align: left;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
}

.material-row-menu button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.material-row-menu .material-delete-button {
  color: #ff9eaa;
}

.explorer-empty {
  margin: 3px 4px 5px 23px;
  color: rgba(184, 172, 162, 0.72);
  font-size: 0.7rem;
  line-height: 1.45;
}

.materials-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 12;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.materials-resize-handle:hover::before,
.lesson-dock.is-resizing .materials-resize-handle::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: rgba(255, 91, 110, 0.7);
  content: "";
}

.lesson-dock.is-collapsed .materials-panel {
  padding: 9px;
}

.lesson-dock.is-collapsed .explorer-title,
.lesson-dock.is-collapsed .explorer-toolbar button:not(#materials-collapse-button),
.lesson-dock.is-collapsed .explorer-search,
.lesson-dock.is-collapsed .materials-new-folder,
.lesson-dock.is-collapsed .explorer-section {
  display: none;
}

.lesson-dock.is-collapsed .explorer-toolbar {
  margin: 0 auto;
}

.lesson-dock.is-collapsed .materials-resize-handle {
  display: none;
}

.board-stage.is-material-dragover::after {
  position: absolute;
  inset: 12px;
  z-index: 80;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(255, 91, 110, 0.78);
  border-radius: 14px;
  color: #fff;
  background: rgba(18, 13, 15, 0.32);
  content: "Отпустите: презентация откроет выбор слайдов, файл попадёт на доску";
  font-weight: 900;
  pointer-events: none;
}

.board-stage.is-board-document-dragover::after {
  position: absolute;
  inset: 12px;
  z-index: 80;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  color: #fff;
  background: rgba(8, 7, 8, 0.58);
  content: "Отпустите: копия сохранённой доски станет следующей страницей урока";
  font-weight: 900;
  pointer-events: none;
}

.material-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 6, 8, 0.68);
  backdrop-filter: blur(16px);
}

.material-preview-modal.is-submitting .material-page-card,
.material-preview-modal.is-submitting .material-page-selection-button {
  opacity: 0.58;
  pointer-events: none;
}

.material-preview-dialog {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 22px;
  color: var(--text);
  background: rgba(18, 15, 20, 0.98);
  border: 1px solid var(--border);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

.material-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.material-preview-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.material-preview-header button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 1.25rem;
}

.material-preview-body {
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #ebe7df;
}

.material-preview-direct-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.material-preview-direct-actions .material-page-insert-all {
  min-width: 148px;
}

.material-page-preview {
  width: 100%;
  height: min(640px, calc(100vh - 190px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  color: #211c1a;
}

.material-page-preview-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.material-page-preview-summary {
  display: grid;
  gap: 5px;
}

.material-page-preview-actions p {
  margin: 0;
  color: #625c59;
  font-size: 0.92rem;
  line-height: 1.4;
}

.material-page-preview-actions small {
  color: #211c1a;
  font-weight: 800;
}

.material-page-preview-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.material-page-selection-button {
  padding: 10px 11px;
  border-radius: 10px;
  color: #3c3634;
  background: #fff;
  border: 1px solid rgba(33, 28, 26, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
}

.material-page-insert-all {
  flex: 0 0 auto;
  padding: 11px 14px;
  border-radius: 11px;
  color: #fff;
  background: #211c1a;
  font-size: 0.83rem;
  font-weight: 900;
}

.material-page-insert-all:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.material-page-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.material-page-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(33, 28, 26, 0.14);
  border-radius: 12px;
  background: #fff;
}

.material-page-card.is-selected {
  border-color: #f05464;
  box-shadow: inset 0 0 0 1px #f05464;
}

.material-page-picker {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.material-page-picker input {
  position: absolute;
  opacity: 0;
}

.material-page-picker span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(33, 28, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.material-page-picker input:checked + span {
  background: #f05464;
}

.material-page-picker input:checked + span::after {
  color: #fff;
  content: "✓";
  font-size: 0.95rem;
  font-weight: 900;
}

.material-preview-body .material-page-card img {
  display: block;
  width: 100%;
  height: 126px;
  border-radius: 0;
  object-fit: contain;
  background: #f8f5ef;
}

.material-page-card div {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
}

.material-page-card strong {
  font-size: 0.78rem;
}

.material-page-card button {
  padding: 7px 9px;
  border-radius: 8px;
  color: #fff;
  background: #f05464;
  font-size: 0.72rem;
  font-weight: 900;
}

.material-preview-body img,
.material-preview-body iframe {
  max-width: 100%;
  width: 100%;
  height: min(640px, calc(100vh - 190px));
  border: 0;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
}

.material-preview-fallback {
  max-width: 520px;
  padding: 28px;
  border-radius: 18px;
  color: #211c1a;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 700px) {
  .material-page-preview-actions {
    display: grid;
  }

  .material-page-preview-controls {
    flex-wrap: wrap;
  }

  .material-page-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.material-preview-fallback strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.teacher-login-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 6, 8, 0.74);
  backdrop-filter: blur(18px);
}

.teacher-login-dialog {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 91, 110, 0.14), transparent 38%),
    rgba(19, 16, 21, 0.98);
  box-shadow: var(--shadow);
}

.teacher-login-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
}

.teacher-login-dialog > p:not(.badge):not(.teacher-login-error) {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.teacher-login-dialog label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.teacher-login-dialog input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.teacher-login-dialog input:focus {
  border-color: rgba(255, 91, 110, 0.58);
}

.teacher-login-error {
  margin: 12px 0 0;
  color: #ffb4bd;
  font-size: 0.82rem;
}

.teacher-login-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.lesson-sidebar h2 {
  font-size: 1.28rem;
}

.lesson-meta {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  border: 1px solid var(--border);
}

.lesson-meta span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.lesson-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
}

.sidebar-links {
  margin-top: 18px;
  flex-direction: column;
}

.sidebar-links a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

body.is-lesson .sidebar-text {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
}

.panel-header h3 {
  font-size: 1.05rem;
}

.embed-frame {
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  display: block;
  background: #0c0b0f;
}

.board-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8f8f8;
  box-shadow: var(--shadow);
}

.board-hover-actions-zone {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 980;
  display: block;
  padding: 12px;
  pointer-events: none;
}

.board-stage.is-actions-visible:not(.is-board-interacting) .board-hover-actions-zone,
.board-hover-actions-zone:focus-within {
  pointer-events: auto;
}

body.is-lesson .board-hover-actions-zone {
  display: block;
}

.board-hover-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(24, 18, 22, 0.92), rgba(10, 8, 10, 0.82));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  backdrop-filter: blur(18px);
}

.board-stage.is-actions-visible:not(.is-board-interacting) .board-hover-actions,
.board-hover-actions-zone:focus-within .board-hover-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.board-hover-actions button {
  min-height: 40px;
  white-space: nowrap;
}

.board-hover-actions .board-action-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 14px;
}

.board-action-icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: currentColor;
}

.board-action-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.board-action-icon-button::after {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 3;
  width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff8f8;
  background: rgba(16, 12, 14, 0.94);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.board-action-icon-button:hover::after,
.board-action-icon-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

body.is-board-focused .board-hover-actions .save-current-board-button {
  display: none !important;
}

.board-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.board-canvas iframe,
.owned-board-host {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.board-canvas iframe.hidden {
  display: none !important;
}

.owned-board-host {
  padding: 6px;
  background: #171316;
}

body.is-board-focused {
  overflow: hidden;
  background: #fffefa;
}

body.is-board-focused .app-shell {
  width: 100%;
  padding: 0;
}

body.is-board-focused .topbar {
  display: none;
}

body.is-board-focused .lesson-view {
  display: block;
}

body.is-board-focused .lesson-dock,
body.is-board-focused .teacher-tools-tab,
body.is-board-focused .teacher-tools-panel {
  display: none !important;
}

body.is-board-focused .video-window {
  display: block !important;
  z-index: 1100;
}

body.is-board-focused .board-stage {
  position: fixed;
  inset: 0;
  z-index: 500;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #fffefa;
  box-shadow: none;
}

body.is-board-focused .board-canvas,
body.is-board-focused .owned-board-host {
  inset: 0;
  padding: 0;
  background: #fffefa;
}

body.is-board-focused teacherdeck-board .td-board-shell {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fffefa !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

body.is-board-focused teacherdeck-board .td-board-statusbar {
  display: none !important;
}

body.is-board-focused teacherdeck-board .td-board-shell {
  grid-template-rows: minmax(0, 1fr) !important;
}

body.is-board-focused teacherdeck-board .td-board-canvas {
  background: #fffefa !important;
}

body.is-board-focused teacherdeck-board .layer-ui__wrapper__top-right {
  display: none !important;
}

body.is-board-focused teacherdeck-board .td-pencil-controls {
  top: 12px !important;
}

body.is-student .topbar {
  display: none;
}

body.is-student .app-shell {
  width: 100%;
  padding: 0;
}

body.is-student .board-stage {
  min-height: 100vh;
  border-radius: 0;
}

.video-window {
  position: fixed;
  left: min(calc(var(--materials-sidebar-width) + 24px), calc(100vw - var(--video-window-width, 380px) - 16px));
  top: 92px;
  z-index: 1100;
  width: min(var(--video-window-width, 380px), calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(13, 11, 15, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  overflow: visible;
  backdrop-filter: blur(16px);
  transition:
    left 180ms ease,
    top 180ms ease,
    width 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

body.materials-collapsed .video-window {
  left: 92px;
}

.video-window.is-dragging {
  transition: none;
}

.video-window.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.video-window.is-collapsed {
  width: auto;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.video-window.is-collapsed .video-window-bar,
.video-window.is-collapsed .meet-frame {
  display: none;
}

.video-window-bar {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  cursor: grab;
}

.video-window-bar h3 {
  margin: 0;
  font-size: 0.9rem;
}

.video-window-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-size-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 900;
}

.video-bookmark-toggle {
  position: absolute;
  top: -13px;
  right: 14px;
  z-index: 2;
  min-width: 38px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px 10px 4px 4px;
  color: #f7efff;
  background: linear-gradient(135deg, rgba(158, 120, 255, 0.96), rgba(86, 57, 176, 0.98));
  box-shadow: 0 10px 22px rgba(73, 50, 148, 0.38);
  font-weight: 900;
}

.video-bookmark-label {
  display: none;
  font-size: 0.8rem;
}

.video-window.is-collapsed .video-bookmark-toggle {
  position: static;
  height: 42px;
  min-width: 92px;
  padding: 0 14px;
  border-radius: 14px;
  cursor: grab;
}

.video-window.is-collapsed .video-bookmark-label {
  display: inline;
}

.video-window.is-collapsed .video-bookmark-icon {
  transform: rotate(90deg);
}

.video-open-link {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 800;
}

.meet-frame {
  position: relative;
  height: calc(var(--video-window-width, 380px) * 0.56);
  min-height: 150px;
  max-height: 380px;
  background: #050505;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.meet-frame > iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

.teacher-tools-tab {
  position: absolute;
  top: var(--teacher-tools-offset-y);
  right: 0;
  z-index: 50;
  width: 34px;
  height: 54px;
  border-radius: 18px 0 0 18px;
  background:
    radial-gradient(circle at 65% 24%, rgba(255, 255, 255, 0.95), transparent 26%),
    linear-gradient(135deg, rgba(230, 222, 255, 0.98), rgba(162, 140, 255, 0.88));
  box-shadow: -10px 12px 28px rgba(61, 45, 118, 0.22);
  transition:
    top 120ms ease,
    right 180ms ease,
    border-radius 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.board-stage.has-teacher-tools-open .teacher-tools-tab {
  right: min(calc(var(--teacher-tools-panel-width) + 18px), calc(100% - 52px));
  border-radius: 18px 0 0 18px;
  box-shadow: -14px 16px 34px rgba(61, 45, 118, 0.3);
}

.teacher-tools-tab span {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto;
  border-radius: 5px;
  background: rgba(23, 18, 40, 0.76);
  box-shadow:
    0 -8px 0 rgba(23, 18, 40, 0.45),
    0 8px 0 rgba(23, 18, 40, 0.45);
}

.teacher-tools-panel {
  position: absolute;
  top: var(--teacher-tools-offset-y);
  right: 18px;
  z-index: 45;
  width: min(var(--teacher-tools-panel-width), calc(100% - 36px));
  max-height: calc(100% - var(--teacher-tools-offset-y) - 18px);
  padding: 16px;
  border-radius: 18px;
  color: #f7f4ff;
  background:
    linear-gradient(180deg, rgba(25, 25, 31, 0.98), rgba(9, 10, 13, 0.98)),
    #101116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.teacher-tools-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.teacher-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.teacher-tools-header h2 {
  margin: 0;
  color: #aa8dff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.teacher-tools-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #d9d1ff;
  background: rgba(255, 255, 255, 0.07);
}

.teacher-tool-card {
  padding: 14px;
  margin-top: 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(18, 18, 23, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.teacher-tool-card--ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.teacher-tool-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.teacher-tool-card p {
  margin: 0;
  color: rgba(247, 244, 255, 0.66);
  line-height: 1.55;
}

.teacher-tool-primary {
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #9e78ff, #6f49de);
  box-shadow: 0 10px 24px rgba(111, 73, 222, 0.34);
  font-weight: 800;
}

.teacher-students-header {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.teacher-students-header p {
  margin-top: 5px;
  font-size: 0.75rem;
}

.students-panel .lesson-plan-panel {
  position: static;
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.schedule-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding-top: 2px;
}

.schedule-add-section {
  display: grid;
  gap: 6px;
}

.schedule-cabinet-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 91, 110, 0.18);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 91, 110, 0.045);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
}

.schedule-cabinet-hint a {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #fff7f8;
  background: linear-gradient(135deg, #ff3853, #ab1d34);
  font-size: 0.66rem;
  font-weight: 950;
  text-decoration: none;
}

.schedule-add-toggle {
  width: 100%;
}

.schedule-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.schedule-form select,
.schedule-form input {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.schedule-form button {
  grid-column: 1 / -1;
}

.schedule-section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.schedule-section-plus {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 7px;
  color: #fff7f8;
  background: rgba(255, 56, 83, 0.22);
  border: 1px solid rgba(255, 91, 110, 0.32);
  font-size: 1rem;
  font-weight: 950;
}

.schedule-section-plus:disabled {
  opacity: 0.42;
}

.schedule-week-toggle {
  width: 100%;
}

.schedule-week-toggle small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.schedule-search {
  min-height: 36px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.schedule-search span {
  color: var(--muted);
  text-align: center;
}

.schedule-search input {
  min-width: 0;
  height: 34px;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: none;
}

.schedule-special-section,
.schedule-week-section {
  display: grid;
  gap: 6px;
}

.schedule-special-list {
  display: block;
  min-height: 34px;
  padding: 6px;
  border: 1px solid rgba(255, 91, 110, 0.18);
  border-radius: 10px;
  background: rgba(255, 91, 110, 0.055);
}

.schedule-special-list.is-schedule-drop-target {
  border-color: rgba(255, 91, 110, 0.62);
  background: rgba(255, 91, 110, 0.12);
}

.communication-placeholder {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.026);
}

.communication-placeholder-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px 999px 999px 8px;
  background: linear-gradient(135deg, #ff6a7a, #d71935);
  transform: rotate(-26deg);
}

.communication-placeholder strong {
  color: var(--text);
  font-size: 0.82rem;
}

.communication-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.communication-chat-card {
  display: grid;
  gap: 10px;
  min-height: 360px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 73, 98, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.communication-chat-head {
  display: grid;
  gap: 8px;
}

.communication-search {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.44);
  background: rgba(0, 0, 0, 0.18);
}

.communication-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
}

.communication-search input::placeholder {
  color: rgba(231, 220, 221, 0.42);
}

.communication-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.communication-filter-row button {
  min-height: 30px;
  border-radius: 9px;
  color: rgba(239, 231, 231, 0.68);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  font-size: 0.68rem;
  font-weight: 900;
}

.communication-filter-row button.is-active {
  color: #fff7f8;
  background: linear-gradient(135deg, rgba(255, 73, 98, 0.28), rgba(153, 39, 63, 0.36));
  border-color: rgba(255, 91, 110, 0.28);
  box-shadow: 0 10px 22px rgba(169, 45, 71, 0.14);
}

.communication-layout {
  display: grid;
  gap: 9px;
  min-height: 0;
}

.communication-conversation-list {
  display: grid;
  gap: 7px;
  min-height: 76px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.communication-conversation-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

.communication-conversation-row.is-active,
.communication-conversation-row:hover {
  background: rgba(255, 73, 98, 0.12);
  border-color: rgba(255, 91, 110, 0.26);
}

.communication-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff7f8;
  background: linear-gradient(145deg, #ff4962, #8f243e);
  font-size: 0.78rem;
  font-weight: 950;
}

.communication-conversation-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.communication-conversation-copy strong,
.communication-conversation-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-conversation-copy strong {
  font-size: 0.76rem;
}

.communication-conversation-copy small {
  color: var(--muted);
  font-size: 0.66rem;
}

.communication-channel-badge {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  color: #bfeeff;
  background: rgba(42, 171, 238, 0.12);
  border: 1px solid rgba(42, 171, 238, 0.22);
  font-size: 0.62rem;
  font-weight: 950;
}

.communication-thread {
  min-height: 240px;
  display: grid;
}

.communication-thread-empty,
.communication-empty {
  margin: 0;
  padding: 11px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  border: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 0.72rem;
  line-height: 1.4;
}

.communication-thread-empty {
  align-content: center;
  gap: 6px;
}

.communication-thread-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 0.84rem;
}

.communication-thread-empty p {
  margin: 0;
}

.communication-thread-content {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto;
  gap: 8px;
}

.communication-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.communication-thread-header div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.communication-thread-header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.78rem;
}

.communication-thread-header span {
  color: var(--muted);
  font-size: 0.64rem;
}

.communication-thread-header button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.085);
}

.communication-message-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: auto;
  padding: 2px 2px 2px 0;
}

.communication-message {
  max-width: 88%;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.communication-message.is-outbound {
  align-self: end;
  color: #fff7f8;
  background: linear-gradient(135deg, rgba(255, 73, 98, 0.34), rgba(169, 45, 71, 0.58));
  border-color: rgba(255, 91, 110, 0.26);
}

.communication-message.is-inbound {
  align-self: start;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
}

.communication-message.is-failed {
  border-color: rgba(255, 185, 75, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 185, 75, 0.08);
}

.communication-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.74rem;
  line-height: 1.35;
}

.communication-message small {
  color: rgba(239, 231, 231, 0.58);
  font-size: 0.6rem;
}

.communication-message-form {
  display: grid;
  gap: 7px;
}

.communication-message-form textarea {
  min-height: 70px;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.19);
  outline: none;
  font: inherit;
  font-size: 0.74rem;
  line-height: 1.35;
}

.communication-message-form button {
  min-height: 34px;
  border-radius: 10px;
  color: #fff7f8;
  background: linear-gradient(135deg, #ff4962, #a92d47);
  border: 1px solid rgba(255, 111, 130, 0.36);
  font-size: 0.72rem;
  font-weight: 950;
}

.communication-message-form button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.student-links-section {
  display: grid;
  gap: 7px;
}

.telegram-connect-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(42, 171, 238, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 10%, rgba(42, 171, 238, 0.18), transparent 38%),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.telegram-connect-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #effaff;
  background: linear-gradient(145deg, #2aabee, #1779b8);
  box-shadow: 0 12px 26px rgba(42, 171, 238, 0.18);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.telegram-connect-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.telegram-connect-copy strong {
  color: var(--text);
  font-size: 0.82rem;
}

.telegram-connect-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.36;
}

.telegram-connect-button {
  grid-column: 1 / -1;
  min-height: 34px;
  border-radius: 10px;
  color: #fff7f8;
  background: linear-gradient(135deg, #ff4962, #a92d47);
  border: 1px solid rgba(255, 111, 130, 0.36);
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(169, 45, 71, 0.22);
}

.telegram-connect-button:disabled {
  cursor: not-allowed;
  color: rgba(255, 247, 248, 0.48);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.telegram-linked-badge {
  grid-column: 1 / -1;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #baf8d6;
  background: rgba(54, 211, 125, 0.105);
  border: 1px solid rgba(54, 211, 125, 0.28);
  font-size: 0.72rem;
  font-weight: 900;
}

.student-telegram-card {
  flex: 0 0 auto;
  width: max-content;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-end;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.student-telegram-card .telegram-connect-mark {
  display: none;
}

.student-telegram-card .telegram-connect-copy {
  display: none;
}

.student-telegram-card .telegram-connect-copy strong {
  font-size: 0.74rem;
}

.student-telegram-card .telegram-connect-copy p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.62rem;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-telegram-card .telegram-connect-button,
.student-telegram-card .telegram-linked-badge {
  position: relative;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 171, 238, 0.28);
  border-radius: 999px;
  color: transparent;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(145deg, #2aabee, #1779b8);
  font-size: 0;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(42, 171, 238, 0.18);
}

.student-social-placeholder {
  position: relative;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(10, 4, 7, 0.16);
  cursor: default;
}

.student-social-placeholder--vk {
  color: #f5f9ff;
  border-color: rgba(0, 119, 255, 0.28);
  background: linear-gradient(145deg, rgba(0, 119, 255, 0.78), rgba(16, 75, 156, 0.82));
}

.student-social-placeholder--max {
  color: #fff7fa;
  border-color: rgba(255, 91, 110, 0.26);
  background: linear-gradient(145deg, rgba(255, 91, 110, 0.72), rgba(108, 44, 78, 0.82));
  font-size: 0.48rem;
}

.student-telegram-card .telegram-connect-button::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background: #fff;
  clip-path: polygon(8% 45%, 92% 12%, 74% 88%, 50% 66%, 37% 79%, 37% 58%);
}

.student-telegram-card .telegram-connect-button.is-loading::before {
  width: auto;
  height: auto;
  color: #fff;
  background: none;
  clip-path: none;
  content: "...";
  font-size: 0.78rem;
  font-weight: 950;
}

.student-telegram-card .telegram-connect-button::after,
.student-social-placeholder::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 760;
  min-width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff5f7;
  background: rgba(28, 18, 22, 0.96);
  box-shadow: 0 14px 34px rgba(10, 4, 7, 0.28);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.student-telegram-card .telegram-connect-button:hover::after,
.student-telegram-card .telegram-connect-button:focus-visible::after,
.student-social-placeholder:hover::after,
.student-social-placeholder:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.student-links-list {
  display: grid;
  gap: 7px;
}

.student-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.student-link-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.student-link-row strong,
.student-link-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-link-row small,
.student-links-empty {
  color: var(--muted);
  font-size: 0.7rem;
}

.student-links-empty {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.student-link-copy {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  color: #ffb4bd;
  background: rgba(255, 91, 110, 0.08);
  border: 1px solid rgba(255, 91, 110, 0.22);
  font-size: 0.68rem;
  font-weight: 850;
}

.schedule-create-student-toggle {
  display: none !important;
}

.schedule-week-heading {
  display: block;
}

.schedule-week-heading .schedule-week-toggle {
  min-width: 0;
}

.schedule-preview {
  display: block;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.schedule-day {
  display: block;
}

.schedule-folder-row {
  grid-template-columns: 15px 26px minmax(0, 1fr) 24px;
}

.schedule-folder-add {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 91, 110, 0.34);
  border-radius: 7px;
  color: #ffb8c0;
  background: rgba(255, 91, 110, 0.08);
  font-size: 0.86rem;
  font-weight: 950;
}

.schedule-folder-add:hover {
  color: #fff;
  background: rgba(255, 91, 110, 0.22);
}

.schedule-folder-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 30px;
  gap: 6px;
  margin: 7px 0 8px 35px;
  padding: 8px;
  border: 1px solid rgba(255, 91, 110, 0.28);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(28, 19, 24, 0.96), rgba(13, 11, 14, 0.98)),
    rgba(255, 91, 110, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.schedule-folder-student-name {
  grid-column: 1 / -1;
}

.schedule-folder-student-class {
  grid-column: 1 / 2;
}

.schedule-folder-student-time {
  grid-column: 2 / 3;
}

.schedule-folder-picker p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.schedule-folder-student-select,
.schedule-folder-student-name,
.schedule-folder-student-class,
.schedule-folder-student-time {
  min-width: 0;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 91, 110, 0.24);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(20, 16, 20, 0.98), rgba(9, 8, 11, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  font-size: 0.7rem;
  font-weight: 850;
  outline: none;
}

.schedule-folder-student-time {
  font-variant-numeric: tabular-nums;
}

.schedule-folder-picker-submit,
.schedule-folder-picker-cancel {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 91, 110, 0.5);
  border-radius: 8px;
  color: #fff7f8;
  background:
    linear-gradient(135deg, #ff3853, #ab1d34),
    rgba(255, 91, 110, 0.24);
  box-shadow: 0 8px 18px rgba(255, 56, 83, 0.14);
  font-size: 0.66rem;
  font-weight: 950;
}

.schedule-folder-picker-submit {
  grid-column: 1 / 3;
}

.schedule-folder-picker-cancel {
  grid-column: 3 / 4;
  grid-row: 2 / 4;
  min-width: 30px;
  height: 100%;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.1);
  color: #d7cdd1;
  background:
    linear-gradient(135deg, rgba(42, 35, 41, 0.95), rgba(18, 16, 20, 0.96));
  box-shadow: none;
}

.schedule-folder-picker-submit:hover,
.schedule-folder-picker-cancel:hover {
  transform: translateY(-1px);
}

.schedule-calendar-icon {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 22px;
  border: 2px solid rgba(245, 239, 233, 0.75);
  border-radius: 5px;
  background: linear-gradient(#ff3853 0 8px, #f4edf1 8px 100%);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.16);
}

.schedule-calendar-icon::before {
  position: absolute;
  top: -6px;
  left: 5px;
  width: 3px;
  height: 8px;
  border-radius: 99px;
  background: #19161a;
  box-shadow: 9px 0 0 #19161a;
  content: "";
}

.schedule-calendar-icon::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  color: #2f73cc;
  content: attr(data-day);
  font-size: 0.46rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.schedule-folder-spacer {
  display: none;
}

.schedule-day-list {
  min-height: 0;
  margin-left: 19px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.schedule-day-list.is-schedule-drop-target {
  border-left-color: rgba(255, 91, 110, 0.65);
  background: rgba(255, 91, 110, 0.045);
}

.schedule-day.is-schedule-drop-target {
  position: relative;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 56, 83, 0.18), rgba(255, 56, 83, 0.06)),
    rgba(255, 91, 110, 0.08);
  box-shadow:
    inset 0 0 0 2px rgba(255, 56, 83, 0.42),
    0 0 0 4px rgba(255, 56, 83, 0.1),
    0 14px 30px rgba(255, 56, 83, 0.1);
}

.schedule-day.is-schedule-drop-target .schedule-folder-row {
  border-color: rgba(255, 91, 110, 0.72);
  background:
    linear-gradient(90deg, rgba(255, 91, 110, 0.24), rgba(255, 91, 110, 0.08)),
    rgba(255, 91, 110, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 110, 0.38);
}

.schedule-card {
  grid-template-columns: 12px minmax(0, 1fr) 26px 26px 26px;
  color: var(--text);
  background: transparent;
  cursor: grab;
}

.schedule-attendance-marker {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(184, 172, 162, 0.42);
  cursor: pointer;
}

.schedule-attendance-marker.is-present {
  background: #35b877;
  box-shadow: 0 0 11px rgba(53, 184, 119, 0.72);
}

.schedule-attendance-marker.is-online {
  background: #3f8cff;
  box-shadow: 0 0 12px rgba(63, 140, 255, 0.86);
}

.schedule-attendance-marker.is-active {
  background: #f6b94a;
  box-shadow: 0 0 11px rgba(246, 185, 74, 0.72);
}

.schedule-attendance-marker.is-missed,
.schedule-attendance-marker.is-absent,
.schedule-attendance-marker.is-excused {
  background: #e43b55;
  box-shadow: 0 0 11px rgba(228, 59, 85, 0.72);
}

.schedule-attendance-marker.is-planned {
  background: rgba(184, 172, 162, 0.36);
  box-shadow: none;
}

.schedule-card.is-dragging {
  opacity: 0.55;
}

.schedule-card-time {
  color: #ff9eaa;
  font-size: 0.62rem;
  min-width: 32px;
}

.schedule-card-name {
  min-width: 52px;
  font-size: 0.75rem;
}

.schedule-card-class {
  min-width: 44px;
  max-width: 76px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 800;
}

.schedule-empty {
  margin: 0;
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.018);
}

.schedule-folder-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
}

.schedule-folder-name > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-time-editor,
.schedule-name-editor,
.schedule-class-editor {
  width: 58px;
  min-height: 24px;
  padding: 0 3px;
  border: 1px solid rgba(255, 91, 110, 0.38);
  border-radius: 5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 850;
}

.schedule-name-editor {
  width: min(130px, 100%);
}

.schedule-class-editor {
  width: min(96px, 100%);
}

.schedule-card .schedule-add-to-lesson:hover,
.schedule-card .schedule-edit-button:hover,
.schedule-card .schedule-delete-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.students-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.students-section-title small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: none;
}

.students-roster-section {
  display: grid;
  gap: 8px;
}

.student-editor {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.lesson-roster .student-editor {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 90;
  width: 290px;
  margin-top: 0;
  padding: 12px;
  background: rgba(18, 16, 21, 0.98);
  box-shadow: var(--shadow);
}

.students-panel .student-editor {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.035);
}

.student-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.student-editor input,
.student-editor select {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.student-existing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.student-library-list {
  display: grid;
  gap: 7px;
}

.student-library-row {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid transparent;
}

.student-library-row:hover {
  border-color: rgba(255, 91, 110, 0.24);
  background: rgba(255, 91, 110, 0.08);
}

.student-library-row.is-dragging {
  opacity: 0.55;
}

.student-library-list.is-student-return-target {
  padding: 6px;
  border: 1px dashed rgba(255, 91, 110, 0.52);
  border-radius: 12px;
  background: rgba(255, 91, 110, 0.08);
}

.student-library-row small,
.student-library-empty {
  color: var(--muted);
  font-size: 0.7rem;
}

.student-library-empty {
  margin: 0;
  padding: 10px;
}

.student-action-button {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 91, 110, 0.18);
  border: 1px solid rgba(255, 91, 110, 0.3);
  font-size: 0.75rem;
  font-weight: 800;
}

.student-action-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lesson-participants-list {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  gap: 7px;
  margin-top: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.students-panel .lesson-participants-list {
  min-height: 86px;
  display: grid;
  gap: 7px;
  overflow: visible;
  padding: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.students-panel .lesson-participants-list.is-student-drop-target {
  border-color: rgba(255, 91, 110, 0.52);
  background: rgba(255, 91, 110, 0.08);
}

.lesson-participants-list::-webkit-scrollbar {
  display: none;
}

.lesson-participant-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.lesson-participant-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.045);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.students-panel .lesson-participant-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
}

.students-panel .lesson-participant-row.is-dragging {
  opacity: 0.55;
}

.students-panel .lesson-participant-row small {
  display: block;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
}

.lesson-participant-row.is-present {
  background: rgba(140, 224, 184, 0.08);
}

.lesson-participant-row.is-absent {
  background: rgba(255, 91, 110, 0.08);
}

.lesson-participant-row.is-excused {
  background: rgba(255, 205, 119, 0.08);
}

.lesson-participant-row.is-open {
  border-color: rgba(255, 91, 110, 0.26);
  background: rgba(255, 91, 110, 0.1);
}

.lesson-participant-meta {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lesson-participant-meta:is(button) {
  padding: 0;
  color: inherit;
  background: transparent;
}

.lesson-participant-row strong {
  font-size: 0.75rem;
}

.lesson-participant-status {
  color: var(--success);
  font-size: 0.67rem;
}

.lesson-participant-status.is-invited {
  color: var(--muted);
}

.lesson-participant-status.is-absent {
  color: #ffb4bd;
}

.lesson-participant-status.is-excused {
  color: #ffd18a;
}

.lesson-participant-row small {
  display: none;
}

.lesson-participant-actions {
  display: none;
  align-items: center;
  gap: 5px;
}

.students-panel .lesson-participant-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  padding-top: 4px;
}

.lesson-participant-row.is-open .lesson-participant-actions {
  display: flex;
}

.lesson-attendance-buttons {
  display: flex;
  gap: 4px;
  padding-right: 3px;
  border-right: 1px solid var(--border);
}

.attendance-status-button {
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.66rem;
  font-weight: 800;
}

.attendance-status-button.is-active {
  color: #101013;
  background: var(--text);
}

.lesson-link-button,
.lesson-remove-button {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.68rem;
  font-weight: 800;
}

.lesson-remove-button {
  color: #ffb4bd;
  border: 1px solid rgba(255, 91, 110, 0.2);
  background: rgba(255, 91, 110, 0.08);
}

.lesson-remove-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.teacher-tool-card textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: #f7f4ff;
  background: rgba(2, 3, 6, 0.72);
  outline: none;
}

.teacher-tool-card textarea::placeholder {
  color: rgba(247, 244, 255, 0.58);
}

.teacher-tool-row {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  color: rgba(247, 244, 255, 0.9);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(18, 20, 25, 0.92);
  border: 1px solid rgba(140, 224, 184, 0.24);
  color: var(--success);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden,
.lesson-only {
  display: none;
}

body.is-lesson .lesson-only,
body.is-lesson .lesson-view {
  display: flex;
}

body.is-lesson .lesson-view {
  display: grid;
}

body.is-lesson .landing-view {
  display: none;
}

.student-waiting-view {
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

body.is-waiting .landing-view {
  display: none;
}

body.is-waiting .student-waiting-view {
  display: grid;
}

.student-waiting-card {
  width: min(450px, 100%);
  padding: clamp(30px, 7vw, 46px);
  border: 1px solid var(--border);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(255, 91, 110, 0.12), transparent 48%),
    rgba(18, 16, 20, 0.92);
  box-shadow: var(--shadow);
}

.student-waiting-card h2 {
  margin: 14px 0 12px;
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.student-waiting-card p:not(.badge) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.student-waiting-details {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
}

.student-waiting-details.hidden {
  display: none;
}

.student-waiting-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.student-waiting-details strong {
  color: var(--text);
}

.student-waiting-pulse {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 26px;
}

.student-waiting-pulse span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: waiting-pulse 1s ease-in-out infinite;
}

.student-waiting-pulse span:nth-child(2) {
  animation-delay: 140ms;
}

.student-waiting-pulse span:nth-child(3) {
  animation-delay: 280ms;
}

.student-workspace-tabs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  padding: 7px 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #211217 0%, #110d10 100%);
  box-shadow: 0 14px 30px rgba(10, 4, 7, 0.2);
}

.student-workspace-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 8px 16px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  color: #bcaeb1;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.student-workspace-tab.is-active {
  color: #201316;
  background: #f8f8f8;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 -10px 22px rgba(255, 91, 110, 0.08);
}

.student-workspace-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #f8f8f8;
}

.student-workspace-tab.is-secondary {
  color: #ffe9ef;
  border-color: rgba(177, 62, 88, 0.42);
  background:
    linear-gradient(135deg, rgba(177, 62, 88, 0.24), rgba(139, 92, 246, 0.14)),
    rgba(255, 255, 255, 0.045);
}

.student-workspace-tab.is-secondary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ff5b6e;
  box-shadow: 0 0 14px rgba(255, 91, 110, 0.8);
}

body.is-board-focused .student-workspace-tab.is-active {
  background: #fffefa;
}

body.is-board-focused .student-workspace-tab.is-active::after {
  background: #fffefa;
}

#student-current-tab,
#student-lessons-tab,
#student-homework-tab {
  touch-action: none;
  cursor: grab;
}

#student-current-tab:active,
#student-lessons-tab:active,
#student-homework-tab:active {
  cursor: grabbing;
}

.student-workspace-tab.is-dragging {
  z-index: 725;
  color: #fff8f8;
  background: linear-gradient(135deg, #8b5cf6, #b33457);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 40px rgba(28, 10, 18, 0.36);
  transform:
    translate(
      var(--student-tab-drag-x, 0px),
      var(--student-tab-drag-y, 0px)
    )
    scale(1.04);
  transition: none;
}

.student-workspace-tab.is-dragging::after {
  display: none;
}

body.is-student-tab-dragging {
  user-select: none;
}

body.is-student-tab-dragging::before,
body.is-student-tab-dragging::after {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

body.is-student-tab-dragging::before {
  content: "Перетащи вкладку вправо";
  top: 62px;
  right: 22px;
  z-index: 718;
  padding: 10px 13px;
  border-radius: 999px;
  color: #f8ecef;
  background: rgba(28, 16, 21, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 32px rgba(13, 5, 8, 0.28);
  transform: translateY(-6px);
  font-size: 0.78rem;
  font-weight: 900;
}

body.is-student-tab-dragging::after {
  content: "Отпусти здесь — откроется второй экран";
  top: 44px;
  right: 0;
  bottom: 0;
  z-index: 715;
  width: min(50vw, 760px);
  display: grid;
  place-items: center;
  border-left: 2px dashed rgba(255, 91, 110, 0.42);
  color: rgba(255, 247, 248, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 91, 110, 0.18), rgba(139, 92, 246, 0.12)),
    rgba(18, 12, 16, 0.58);
  box-shadow: inset 18px 0 50px rgba(255, 91, 110, 0.08);
  transform: translateX(18px) scaleX(0.98);
  transform-origin: right center;
  font-size: 1rem;
  font-weight: 950;
}

body.is-student-tab-dragging::before,
body.is-student-tab-dragging::after {
  opacity: 1;
  transform: translate(0) scale(1);
}

body.is-student-tab-dock-ready::before {
  content: "Можно отпускать";
  color: #fff;
  background: linear-gradient(135deg, #b33457, #7c3aed);
  border-color: rgba(255, 255, 255, 0.24);
}

body.is-student-tab-dock-ready::after {
  border-left-color: rgba(255, 91, 110, 0.9);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 91, 110, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(255, 91, 110, 0.32), rgba(139, 92, 246, 0.2)),
    rgba(18, 12, 16, 0.72);
}

body.has-student-portal .student-workspace-tabs:not(.hidden) {
  display: flex;
}

body.has-student-portal.is-student .lesson-view {
  padding-top: 44px;
}

body.has-student-portal.is-student .board-stage {
  min-height: calc(100vh - 44px);
}

body.has-student-portal.is-student.is-board-focused .lesson-view {
  padding-top: 0;
}

body.has-student-portal.is-student.is-board-focused .board-stage {
  inset: 44px 0 0 0;
  min-height: calc(100vh - 44px);
}

.student-lessons-panel {
  position: fixed;
  inset: 44px 0 0 0;
  z-index: 680;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #f9f1f2;
  background:
    radial-gradient(circle at 90% 0%, rgba(153, 42, 67, 0.2), transparent 34%),
    #151114;
  box-shadow: 0 28px 80px rgba(12, 5, 8, 0.5);
}

.student-workspace-tabs.hidden,
.student-lessons-panel.hidden {
  display: none;
}

.student-lessons-panel.is-docked {
  top: 44px;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(46vw, 760px);
  border-radius: 0;
}

.student-lessons-panel.is-primary-split {
  right: min(46vw, 760px);
  width: auto;
}

.student-secondary-panel {
  position: fixed;
  top: 44px;
  right: 0;
  bottom: 0;
  z-index: 685;
  width: min(46vw, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: #f9f1f2;
  background:
    radial-gradient(circle at 8% 0%, rgba(177, 62, 88, 0.18), transparent 36%),
    #151114;
  box-shadow: -22px 0 70px rgba(10, 4, 7, 0.42);
}

.student-secondary-panel.hidden {
  display: none;
}

.student-secondary-panel-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.student-secondary-panel-header h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.student-secondary-panel-header button,
.student-secondary-back {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.student-secondary-content {
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 12px;
}

.student-secondary-content.has-board {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.student-secondary-content .is-secondary-list {
  padding: 0 0 16px;
}

.student-secondary-board-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.student-secondary-board-host {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #806e72;
  background: #fffefa;
}

.student-secondary-board-host teacherdeck-board {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

body.student-secondary-active .lesson-view,
body.student-secondary-active .student-waiting-view {
  width: calc(100% - min(46vw, 760px));
}

body.student-secondary-active .student-workspace-tabs {
  right: min(46vw, 760px);
}

body.student-archive-active .student-lessons-panel-header {
  padding-top: 18px;
}

body.student-archive-docked .lesson-view,
body.student-archive-docked .student-waiting-view {
  width: calc(100% - min(46vw, 760px));
}

body.student-archive-docked .student-workspace-tabs {
  right: min(46vw, 760px);
}

body.student-archive-docked .student-lesson-archive-list {
  grid-template-columns: 1fr;
}

body.student-archive-docked .student-homework-card {
  grid-template-columns: 1fr;
}

body.student-archive-docked .student-homework-workspace.has-classwork {
  grid-template-columns: 1fr;
}

body.student-archive-docked .student-homework-classwork-pane,
body.student-archive-docked .student-homework-workboard {
  min-height: 440px;
}

.student-lessons-panel-header,
.student-homework-intro {
  padding: 18px 20px;
}

.student-lessons-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.student-lessons-panel.is-detail-compact {
  grid-template-rows: minmax(0, 1fr);
}

.student-lessons-panel.is-detail-compact .student-lessons-panel-header {
  display: none;
}

.student-lessons-panel-header h2,
.student-homework-intro h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.student-lessons-panel-actions {
  display: flex;
  gap: 8px;
}

.student-lessons-panel-actions button,
.student-archive-detail-copy button,
.student-detail-compact-toggle {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.student-portal-view {
  display: none;
  min-height: 0;
  overflow: auto;
}

.student-portal-view.is-active {
  display: block;
}

.student-lesson-archive-list,
.student-homework-list {
  display: grid;
  gap: 14px;
  padding: 10px 18px 22px;
}

.student-lesson-archive-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.student-archive-card {
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr);
  gap: 10px;
  min-height: 205px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: inherit;
  text-align: left;
  background:
    radial-gradient(circle at 85% 0%, rgba(177, 62, 88, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.035);
  transition:
    border-color 180ms ease,
    grid-template-rows 180ms ease,
    min-height 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.student-archive-card:hover,
.student-archive-card:focus-visible {
  grid-template-rows: 152px minmax(0, 1fr);
  min-height: 270px;
  border-color: rgba(207, 73, 101, 0.46);
  background: rgba(153, 42, 67, 0.12);
  transform: translateY(-2px);
}

.student-board-card-preview,
.student-archive-card-preview {
  position: relative;
  min-height: 92px;
  display: grid;
  gap: 3px;
  place-content: center;
  border-radius: 14px;
  color: #4c202c;
  background:
    linear-gradient(rgba(156, 55, 77, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156, 55, 77, 0.08) 1px, transparent 1px),
    #f5eeee;
  background-size: 12px 12px;
}

.student-board-card-preview {
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.student-archive-card:hover .student-board-card-preview,
.student-archive-card:focus-visible .student-board-card-preview,
.student-homework-card:hover .student-board-card-preview,
.student-homework-card:focus-within .student-board-card-preview {
  border-color: rgba(255, 210, 218, 0.45);
  box-shadow:
    0 20px 42px rgba(14, 6, 10, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(1.015);
}

.student-board-card-preview-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
}

.student-board-card-preview-fallback img {
  width: 100%;
  height: 100%;
  padding: 5px;
  background: #efe8e8;
  object-fit: contain;
  object-position: center;
}

.student-board-card-preview-placeholder {
  display: grid;
  place-content: center;
  gap: 3px;
  padding: 10px;
}

.student-archive-card-preview strong,
.student-board-card-preview-fallback strong {
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.student-archive-preview-pages {
  position: relative;
  width: 62px;
  height: 42px;
  display: block;
  margin: 0 auto 4px;
}

.student-archive-preview-pages i {
  position: absolute;
  inset: 9px 10px 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(76, 32, 44, 0.1);
  box-shadow: 0 10px 20px rgba(76, 32, 44, 0.1);
}

.student-archive-preview-pages i:nth-child(1) {
  transform: translate(-9px, 2px) rotate(-5deg);
}

.student-archive-preview-pages i:nth-child(2) {
  transform: translate(8px, 0) rotate(4deg);
}

.student-archive-preview-pages i:nth-child(3) {
  transform: translate(0, -5px);
}

.student-archive-card-preview small,
.student-board-card-preview-fallback small {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.student-board-card-preview-placeholder em {
  color: rgba(76, 32, 44, 0.56);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.student-archive-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.student-archive-card-copy > span,
.student-archive-date,
.student-homework-card-heading span {
  color: #a9969b;
  font-size: 0.75rem;
}

.student-archive-card-copy strong,
.student-archive-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-archive-card-copy small {
  color: #cbbdc0;
}

.student-archive-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.student-archive-card-badges em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #ffdfe5;
  background: rgba(177, 62, 88, 0.16);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.student-archive-detail {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(560px, 1fr);
  padding: 8px 12px 12px;
}

.student-archive-detail-copy {
  display: grid;
  gap: 10px;
  padding: 6px 4px 14px;
}

.student-archive-detail-copy button {
  min-height: 34px;
  padding: 7px 10px;
}

.student-detail-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.student-detail-compact-toggle {
  white-space: nowrap;
}

.student-detail-copy-body {
  min-width: 0;
}

.student-archive-detail-copy h3 {
  margin: 10px 0 4px;
}

.student-archive-detail-copy p {
  margin-bottom: 0;
  color: #cbbdc0;
}

.student-archive-board-host {
  min-height: 560px;
  overflow: hidden;
  border-radius: 15px;
  color: #806e72;
  background: #fffefa;
}

.student-archive-board-host teacherdeck-board {
  display: block;
  width: 100%;
  height: 100%;
}

.student-archive-detail.is-compact {
  grid-template-rows: auto minmax(0, 1fr);
  padding-top: 4px;
}

.student-archive-detail.is-compact .student-archive-detail-copy {
  padding-bottom: 6px;
}

.student-archive-detail.is-compact .student-detail-copy-body {
  display: none;
}

.student-archive-detail.is-compact .student-archive-board-host {
  min-height: calc(100vh - 66px);
}

.student-homework-intro p {
  margin: 8px 0 0;
  color: #baa9ad;
}

.student-homework-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(177, 62, 88, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.035);
  transition:
    border-color 180ms ease,
    grid-template-columns 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

button.student-homework-card {
  width: 100%;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.student-homework-card:hover,
.student-homework-card:focus-within {
  grid-template-columns: 150px minmax(0, 1fr);
  border-color: rgba(207, 73, 101, 0.34);
  background:
    radial-gradient(circle at 12% 0%, rgba(177, 62, 88, 0.23), transparent 34%),
    rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.student-homework-preview {
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 14px;
  color: #ffe8ed;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(177, 62, 88, 0.42), rgba(50, 29, 37, 0.92)),
    #1b1217;
}

.student-homework-preview-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #3c1421;
  background: #ffe8ed;
  font-size: 1.1rem;
  font-weight: 950;
}

.student-homework-preview strong {
  font-size: 0.95rem;
}

.student-homework-preview small {
  color: #e7bdc6;
  font-size: 0.72rem;
  font-weight: 800;
}

.student-homework-card-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.student-homework-card-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.student-homework-status {
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #f0c5ce !important;
  background: rgba(177, 62, 88, 0.18);
  font-weight: 850;
}

.student-homework-status.is-submitted {
  color: #bee7ff !important;
  background: rgba(60, 130, 180, 0.18);
}

.student-homework-status.is-reviewing {
  color: #fff0b5 !important;
  background: rgba(183, 132, 33, 0.2);
}

.student-homework-status.is-reviewed {
  color: #b8e8cc !important;
  background: rgba(50, 148, 98, 0.18);
}

.student-homework-card p {
  color: #d4c7ca;
  line-height: 1.55;
}

.student-homework-files {
  display: grid;
  gap: 7px;
}

.student-homework-files button {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  color: #f8f0f2;
  background: #100d0f;
  text-align: left;
}

.student-homework-files .homework-file-label {
  color: #b55269;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.student-homework-files .homework-file-copy strong {
  color: #f8f0f2;
}

.student-homework-files-empty {
  display: block;
  padding: 10px 12px;
  border-radius: 11px;
  color: #a9969b;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  font-weight: 750;
}

.student-homework-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.student-homework-upload {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 12px;
  border: 1px dashed rgba(206, 78, 105, 0.42);
  border-radius: 12px;
  color: #ffdfe5;
  background: rgba(153, 42, 67, 0.12);
  font-weight: 850;
  cursor: pointer;
}

.student-homework-open-board,
.student-homework-submit {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(219, 92, 119, 0.42);
  border-radius: 12px;
  color: #fff6f7;
  background: linear-gradient(135deg, #a7314c, #6f2034);
  font-weight: 900;
}

.student-homework-board-detail {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px 12px 12px;
}

.student-archive-detail.hidden,
.student-homework-board-detail.hidden {
  display: none;
}

.student-homework-board-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
}

.student-homework-board-header h3,
.student-homework-board-header p {
  margin: 0;
}

.student-homework-board-header > button:first-child {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #f5e9eb;
  background: rgba(255, 255, 255, 0.07);
}

.student-homework-board-header .student-homework-submit {
  width: auto;
  min-height: 40px;
  margin: 0;
}

.student-homework-classwork-toggle {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #f5e9eb;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 900;
}

.student-homework-classwork-toggle.is-active {
  color: #fff6f7;
  background: linear-gradient(135deg, #8b5cf6, #a7314c);
  border-color: rgba(255, 255, 255, 0.18);
}

.student-homework-classwork-toggle:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.student-homework-board-detail.is-compact {
  gap: 6px;
  padding-top: 4px;
}

.student-homework-board-detail.is-compact .student-homework-board-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.student-homework-board-detail.is-compact .student-homework-board-header > div,
.student-homework-board-detail.is-compact .student-homework-classwork-toggle {
  display: none;
}

.student-homework-board-detail.is-compact .student-detail-compact-toggle {
  justify-self: end;
}

.student-homework-board-detail.is-compact .student-homework-submit {
  grid-column: 2;
  justify-self: end;
}

.student-homework-workspace {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.student-homework-workspace.has-classwork {
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
}

.student-homework-classwork-pane,
.student-homework-workboard {
  min-height: 620px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.student-homework-board-detail.is-compact .student-homework-workspace {
  min-height: calc(100vh - 84px);
}

.student-homework-board-detail.is-compact .student-homework-classwork-pane,
.student-homework-board-detail.is-compact .student-homework-workboard {
  min-height: calc(100vh - 84px);
}

.student-homework-classwork-pane.hidden {
  display: none;
}

.student-homework-pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  color: #cdbec1;
  font-size: 0.78rem;
  font-weight: 850;
}

.student-homework-pane-title strong {
  min-width: 0;
  overflow: hidden;
  color: #fff7f8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-homework-board-host,
.student-homework-classwork-host {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #806e72;
  background: #fffefa;
}

.student-homework-board-host teacherdeck-board,
.student-homework-classwork-host teacherdeck-board {
  display: block;
  width: 100%;
  height: 100%;
}

.student-portal-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  color: #b9a9ad;
  text-align: center;
}

.student-portal-empty strong {
  color: #fff7f8;
  font-size: 1.1rem;
}

@keyframes waiting-pulse {
  50% {
    transform: translateY(-5px);
    opacity: 0.45;
  }
}

@media (max-width: 1100px) {
  .landing-view,
  .lesson-view {
    grid-template-columns: 1fr;
  }

  .lesson-dock,
  .board-stage {
    min-height: auto;
  }

  .board-stage {
    order: -1;
  }

  .lesson-dock {
    display: block;
  }

  .lesson-sidebar {
    margin-top: 0;
  }

  .preview-stage {
    min-height: 500px;
  }
}

@media (max-width: 720px) {
  .student-homework-board-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-homework-card,
  .student-homework-workspace,
  .student-homework-workspace.has-classwork {
    grid-template-columns: 1fr;
  }

  .student-homework-classwork-pane,
  .student-homework-workboard {
    min-height: 420px;
  }

  .student-homework-classwork-toggle {
    grid-column: 1 / -1;
  }

  .student-homework-board-header .student-homework-submit {
    grid-column: 1 / -1;
    width: 100%;
  }

  .app-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .topbar,
  .hero-copy,
  .lesson-sidebar,
  .panel,
  .preview-card {
    border-radius: 22px;
  }

  .topbar {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-session-pill {
    margin-left: 0;
  }

  .lesson-roster {
    width: 100%;
    min-width: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
    flex-wrap: wrap;
  }

  .lesson-roster .student-editor,
  .lesson-plan-panel {
    position: static;
    width: 100%;
    flex-basis: 100%;
  }

  .lesson-participants-list {
    flex-basis: calc(100% - 92px);
  }

  .hero-copy {
    padding: 26px 22px;
  }

  .landing-view {
    padding: 250px 18px 42px;
  }

  .hero-copy h2 {
    font-size: 2.8rem;
  }

  .preview-stage {
    min-height: 420px;
    padding: 14px;
  }

  .preview-video {
    min-height: 150px;
  }

  .preview-board {
    min-height: 220px;
  }

  .embed-frame {
    min-height: 250px;
  }

  .video-window {
    left: 16px;
    top: 90px;
    width: min(var(--video-window-width, 340px), calc(100vw - 32px));
  }

  .meet-frame {
    height: calc(var(--video-window-width, 340px) * 0.56);
  }

  .topbar-actions,
  .hero-actions {
    width: 100%;
  }

  .topbar-actions button,
  .hero-actions button {
    flex: 1 1 100%;
  }

  .teacher-tools-panel {
    top: 10px;
    right: 10px;
    width: calc(100% - 20px);
    max-height: calc(100% - 20px);
  }

  .board-stage.has-teacher-tools-open .teacher-tools-tab {
    right: calc(100% - 44px);
  }

  .student-workspace-tabs {
    overflow-x: auto;
    padding-inline: 8px;
  }

  .student-lessons-panel,
  .student-lessons-panel.is-docked {
    inset: 44px 0 0 0;
    width: 100%;
    border-radius: 0;
  }

  body.student-archive-docked .lesson-view,
  body.student-archive-docked .student-waiting-view {
    width: 100%;
  }

  .student-archive-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}
