:root {
  color-scheme: dark;
  --ink: #f6f1e7;
  --muted: #aeb9b2;
  --line: rgba(255, 255, 255, 0.13);
  --panel: rgba(17, 23, 22, 0.82);
  --panel-solid: #111716;
  --soft: rgba(255, 255, 255, 0.07);
  --brand: #16c6a4;
  --brand-dark: #0f8f78;
  --gold: #d6a756;
  --rose: #d66d5c;
  --paper: #f7f1e5;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --font-sans: "Avenir Next", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-ui: "DIN Alternate", "Avenir Next Condensed", "Arial Narrow", var(--font-sans);
  --line-gold: rgba(214, 167, 86, 0.34);
  --line-mint: rgba(27, 226, 187, 0.32);
  --panel-glass: rgba(8, 18, 15, 0.78);
  --panel-ivory: rgba(250, 253, 248, 0.94);
  --shadow-soft: 0 18px 54px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(22, 198, 164, 0.18), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(214, 167, 86, 0.16), transparent 26%),
    linear-gradient(180deg, #08100f 0%, #101615 46%, #edf1eb 46%, #edf1eb 100%);
  color: var(--ink);
  font-family: var(--font-sans);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(27, 226, 187, 0.78);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 10px clamp(16px, 3vw, 38px);
  color: #f8f3ea;
  background:
    linear-gradient(90deg, rgba(4, 12, 10, 0.98), rgba(9, 26, 21, 0.96)),
    radial-gradient(circle at 20% 50%, rgba(22, 198, 164, 0.16), transparent 32%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(9, 18, 16, 0.08);
}

.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.logo-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 118px;
  height: 36px;
  padding: 0 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(8, 16, 15, 0.08);
}

.logo-xp,
.logo-art {
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
}

.logo-xp {
  font-size: 18px;
}

.logo-divider {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 900;
}

.logo-art {
  font-size: 15px;
}

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

.logo-copy strong {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.logo-copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-account {
  position: relative;
  margin-left: auto;
}

.account-trigger {
  min-height: 42px;
  padding: 4px 8px 4px 5px;
  color: #f8f3ea;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #07110f;
  background: linear-gradient(135deg, #24ddb8, #efd079);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.account-avatar.large {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.account-name {
  max-width: 180px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-caret {
  color: rgba(255, 255, 255, 0.66);
  font-size: 16px;
  font-weight: 900;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: 260px;
  padding: 14px;
  color: #17211e;
  background: #fff;
  border: 1px solid rgba(20, 31, 28, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(8, 16, 15, 0.18);
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(20, 31, 28, 0.1);
}

.account-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-summary strong,
.account-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary strong {
  font-size: 15px;
}

.account-summary span {
  color: #68746f;
  font-size: 12px;
  font-weight: 700;
}

.account-dropdown button {
  justify-content: flex-start;
  width: 100%;
  color: #17211e;
  background: transparent;
  border: 1px solid transparent;
}

.account-dropdown button:hover {
  background: #f3f6f4;
  border-color: rgba(20, 31, 28, 0.08);
}

.profile-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  color: #17211e;
  background: transparent;
  border: 0;
}

.profile-dialog::backdrop {
  background: rgba(3, 8, 7, 0.62);
  backdrop-filter: blur(8px);
}

.profile-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #fbfcfa;
  border: 1px solid rgba(20, 31, 28, 0.12);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

body.is-lesson-mode .topbar {
  position: fixed;
  left: 50%;
  top: 0;
  width: min(calc(100% - clamp(24px, 4vw, 72px)), 1720px);
  margin-top: 0;
  transform: translate(-50%, calc(-100% + 12px));
  opacity: 0.24;
  transition: transform 240ms ease, opacity 240ms ease, box-shadow 240ms ease;
}

body.is-lesson-mode .topbar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 86px;
  height: 7px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(22, 198, 164, 0.22);
}

body.is-lesson-mode .topbar:hover,
body.is-lesson-mode .topbar:focus-within {
  transform: translate(-50%, 10px);
  opacity: 1;
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.36);
}

body.is-lesson-mode main {
  padding-top: 24px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tabs {
  display: inline-flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab {
  gap: 7px;
  color: #dce4df;
  background: transparent;
}

.tab.is-active {
  color: #07110f;
  background: linear-gradient(135deg, var(--gold), #f3d79a);
}

.primary {
  color: #06100e;
  background: linear-gradient(135deg, #1be2bb, #d8b567);
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 34px rgba(22, 198, 164, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.primary:hover {
  box-shadow: 0 18px 44px rgba(22, 198, 164, 0.28), 0 0 0 1px rgba(214, 167, 86, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.primary.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(27, 226, 187, 0.8), rgba(216, 181, 103, 0.72));
  filter: blur(14px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.primary.glow:hover::after {
  opacity: 0.72;
}

.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.secondary:hover {
  border-color: rgba(214, 167, 86, 0.28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.course-list .secondary,
.upload-panel .secondary,
.admin-courses .secondary,
.player-shell .secondary {
  color: #16211d;
  border-color: rgba(22, 33, 29, 0.16);
  background: #ffffff;
}

.secondary.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.tab::before,
.icon-button::before {
  content: "";
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  background: currentColor;
  transform-origin: center;
  transition: transform 190ms ease, opacity 190ms ease, filter 190ms ease;
}

.tab::before {
  width: 15px;
  height: 15px;
  opacity: 0.82;
}

.icon-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.28) 42%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 520ms ease;
  pointer-events: none;
}

.icon-button:hover::after {
  transform: translateX(120%);
}

.tab:hover::before,
.icon-button:hover::before {
  filter: drop-shadow(0 0 8px rgba(22, 198, 164, 0.48));
}

[data-icon="home"]::before {
  clip-path: polygon(50% 6%, 96% 42%, 84% 42%, 84% 94%, 58% 94%, 58% 65%, 42% 65%, 42% 94%, 16% 94%, 16% 42%, 4% 42%);
}

[data-icon="play"]::before,
[data-icon="login"]::before {
  clip-path: polygon(20% 10%, 88% 50%, 20% 90%);
}

[data-icon="arrow"]::before {
  clip-path: polygon(8% 42%, 68% 42%, 45% 18%, 58% 6%, 96% 50%, 58% 94%, 45% 82%, 68% 58%, 8% 58%);
}

[data-icon="settings"]::before {
  clip-path: polygon(44% 0%, 56% 0%, 61% 18%, 75% 8%, 84% 16%, 76% 32%, 96% 39%, 96% 51%, 77% 57%, 86% 74%, 76% 84%, 60% 75%, 55% 100%, 43% 100%, 38% 76%, 22% 86%, 13% 77%, 22% 59%, 4% 53%, 4% 41%, 22% 35%, 13% 18%, 22% 9%, 38% 18%);
}

[data-icon="upload"]::before {
  clip-path: polygon(42% 0%, 58% 0%, 58% 48%, 78% 30%, 89% 42%, 50% 80%, 11% 42%, 22% 30%, 42% 48%);
}

[data-icon="refresh"]::before {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  background: transparent;
}

[data-icon="save"]::before {
  clip-path: polygon(10% 0%, 78% 0%, 90% 12%, 90% 100%, 10% 100%);
}

[data-icon="pause"]::before {
  clip-path: polygon(18% 8%, 39% 8%, 39% 92%, 18% 92%, 18% 8%, 61% 8%, 82% 8%, 82% 92%, 61% 92%);
}

[data-icon="speed"]::before {
  clip-path: polygon(50% 6%, 63% 10%, 55% 29%, 70% 36%, 88% 22%, 96% 34%, 81% 48%, 88% 67%, 69% 73%, 50% 94%, 31% 73%, 12% 67%, 19% 48%, 4% 34%, 12% 22%, 30% 36%, 45% 29%);
}

[data-icon="caption"]::before {
  clip-path: polygon(7% 18%, 93% 18%, 93% 82%, 7% 82%);
}

[data-icon="fullscreen"]::before {
  clip-path: polygon(4% 4%, 38% 4%, 38% 18%, 18% 18%, 18% 38%, 4% 38%, 4% 4%, 62% 4%, 96% 4%, 96% 38%, 82% 38%, 82% 18%, 62% 18%, 62% 4%, 4% 62%, 18% 62%, 18% 82%, 38% 82%, 38% 96%, 4% 96%, 4% 62%, 62% 82%, 82% 82%, 82% 62%, 96% 62%, 96% 96%, 62% 96%);
}

[data-icon="live"]::before {
  border: 2px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0 28%, transparent 30%);
}

[data-icon="logout"]::before {
  clip-path: polygon(9% 12%, 55% 12%, 55% 28%, 27% 28%, 27% 72%, 55% 72%, 55% 88%, 9% 88%, 9% 12%, 61% 32%, 72% 21%, 98% 50%, 72% 79%, 61% 68%, 74% 57%, 43% 57%, 43% 43%, 74% 43%);
}

.icon-button[data-icon="arrow"]:hover::before {
  transform: translateX(4px);
}

.icon-button[data-icon="play"]:hover::before,
.icon-button[data-icon="login"]:hover::before {
  animation: iconPulse 760ms ease;
}

.icon-button[data-icon="upload"]:hover::before {
  transform: translateY(-3px);
}

.icon-button[data-icon="refresh"]:hover::before {
  transform: rotate(180deg);
}

.icon-button[data-icon="save"]:hover::before {
  transform: translateY(2px) scale(0.94);
}

.icon-button[data-icon="fullscreen"]:hover::before {
  transform: scale(1.12);
}

.icon-button[data-icon="live"]:hover::before {
  animation: iconPulse 760ms ease infinite;
}

.tab[data-icon="logout"]:hover::before {
  transform: translateX(3px);
}

.tab[data-icon="settings"]:hover::before,
.icon-button[data-icon="settings"]:hover::before {
  transform: rotate(36deg);
}

@keyframes iconPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

main {
  padding: 24px clamp(20px, 4vw, 56px) 56px;
}

.view {
  display: none;
}

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

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  min-height: min(760px, calc(100vh - 130px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 58px);
  box-shadow: var(--shadow);
}

.hero-art,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(4, 11, 10, 0.96) 0%, rgba(4, 11, 10, 0.78) 39%, rgba(4, 11, 10, 0.2) 72%, rgba(4, 11, 10, 0.72) 100%),
    linear-gradient(180deg, rgba(4, 11, 10, 0.12), rgba(4, 11, 10, 0.7));
}

.hero-copy,
.login-panel {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 20px;
  max-width: 760px;
}

.hero-copy h2 {
  font-family: var(--font-display);
  max-width: 760px;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 620px;
  color: #d5ddd7;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe8e2;
  backdrop-filter: blur(14px);
}

.hero-metrics strong {
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  color: var(--gold);
}

.login-panel {
  align-self: stretch;
  min-height: 430px;
  padding: 24px;
  border: 1px solid rgba(214, 167, 86, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(27, 226, 187, 0.08), rgba(214, 167, 86, 0.08)),
    rgba(10, 16, 15, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 167, 86, 0.72), transparent);
  pointer-events: none;
}

.subscribe-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  min-height: min(720px, calc(100vh - 130px));
}

.subscribe-hero,
.subscribe-form {
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.subscribe-hero {
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 520px;
  padding: clamp(26px, 5vw, 62px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4, 11, 10, 0.92), rgba(4, 11, 10, 0.38)),
    url("/media/digital-painting-hero.webp") center / cover;
  color: #fff;
}

.subscribe-hero h2 {
  max-width: 760px;
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.subscribe-hero p:not(.eyebrow) {
  max-width: 620px;
  color: #d5ddd7;
  font-size: 18px;
  line-height: 1.7;
}

.subscribe-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: #fff;
}

.subscribe-form .mini-list {
  margin-top: 4px;
}

.avatar-field {
  display: grid;
  gap: 10px;
}

.avatar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.avatar-options label {
  cursor: pointer;
}

.avatar-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-preview {
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 50%;
  color: #07110f;
  font-weight: 900;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
}

.avatar-options input:checked + .avatar-preview {
  border-color: #07110f;
  box-shadow: 0 0 0 3px rgba(22, 198, 164, 0.22);
}

.avatar-mint {
  background: linear-gradient(135deg, #1be2bb, #b6f3df);
}

.avatar-gold {
  background: linear-gradient(135deg, #d8b567, #fff1b6);
}

.avatar-coral {
  background: linear-gradient(135deg, #ff8f7f, #ffd2c8);
}

.avatar-violet {
  background: linear-gradient(135deg, #a99cff, #dfd9ff);
}

.avatar-assistant,
.avatar-custom {
  background: linear-gradient(135deg, #e7f3ef, #cfe3d9);
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed rgba(22, 33, 29, 0.18);
  border-radius: 8px;
  color: #53645d;
  cursor: pointer;
}

.avatar-upload .avatar-preview {
  flex-shrink: 0;
}

.avatar-upload input {
  display: none;
}

.avatar-upload em {
  font-style: normal;
}

.profile-avatar-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.profile-avatar-upload input[type="file"] {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.profile-avatar-upload em {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(22, 33, 29, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #17211e;
  font-weight: 800;
}

.home-band {
  padding: 54px 0 0;
  color: #101716;
}

.band-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.band-title h2 {
  font-family: var(--font-display);
  max-width: 720px;
  color: #101716;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  min-height: 420px;
  padding: 16px;
  border: 1px solid rgba(16, 23, 22, 0.12);
  border-radius: 8px;
  background: #101716;
  box-shadow: 0 18px 40px rgba(25, 39, 35, 0.13);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(25, 39, 35, 0.22);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 360ms ease;
}

.feature-card:hover img {
  transform: scale(1.04);
}

.feature-index {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.feature-card h3 {
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 24px;
}

.feature-card p {
  color: #b8c4bd;
  line-height: 1.65;
}

.learning-layout,
.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 22px;
  align-items: start;
}

.admin-layout {
  grid-template-columns: minmax(340px, 520px) 1fr;
}

.asset-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.admin-console {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: -24px calc(clamp(20px, 4vw, 56px) * -1) -56px;
  padding: 34px clamp(20px, 4vw, 56px) 70px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4, 11, 10, 0.96), rgba(4, 11, 10, 0.78) 44%, rgba(4, 11, 10, 0.94)),
    url("/media/digital-painting-hero.webp");
  background-size: cover;
  background-position: center;
}

.admin-console::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(22, 198, 164, 0.18), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(214, 167, 86, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(8, 16, 15, 0.32), rgba(8, 16, 15, 0.9));
  pointer-events: none;
}

.admin-sidebar,
.admin-main {
  position: relative;
  z-index: 1;
}

.admin-toast {
  position: fixed;
  right: clamp(20px, 4vw, 56px);
  top: 92px;
  z-index: 40;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 198, 164, 0.35);
  border-radius: 8px;
  background: rgba(8, 18, 16, 0.92);
  color: var(--paper);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.admin-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(22, 198, 164, 0.08), transparent 180px),
    rgba(9, 16, 15, 0.9);
  box-shadow: var(--shadow);
}

.admin-brand {
  margin-bottom: 8px;
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-brand h2 {
  color: var(--paper);
  font-size: 26px;
}

.admin-nav {
  justify-content: flex-start;
  width: 100%;
  color: #dce4df;
  background: transparent;
}

.admin-nav::before {
  content: "";
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  background: currentColor;
  transition: transform 180ms ease, filter 180ms ease;
}

.admin-nav:hover::before {
  filter: drop-shadow(0 0 8px rgba(22, 198, 164, 0.5));
}

.admin-nav.is-active {
  color: #07110f;
  background: linear-gradient(135deg, #1be2bb, #d8b567);
  font-weight: 900;
}

.admin-main {
  min-width: 0;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.12), rgba(214, 167, 86, 0.1)),
    rgba(9, 16, 15, 0.76);
  color: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.admin-hero h2 {
  color: var(--paper);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.admin-hero p:not(.eyebrow) {
  max-width: 620px;
  color: #b8c4bd;
  line-height: 1.7;
}

.admin-hero-art {
  display: grid;
  gap: 9px;
  min-width: 190px;
}

.admin-hero-art span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-family: var(--font-ui);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.admin-section {
  display: none;
}

.admin-section.is-active {
  display: block;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.asset-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.ops-card,
.module-card {
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 249, 0.94)),
    #ffffff;
  color: #16211d;
  box-shadow: 0 18px 45px rgba(38, 55, 47, 0.1);
}

.stat-card,
.ops-card,
.module-card,
.upload-panel,
.admin-courses {
  position: relative;
  overflow: hidden;
}

.stat-card::before,
.ops-card::before,
.module-card::before,
.upload-panel::before,
.admin-courses::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(214, 167, 86, 0.08), transparent 28%),
    linear-gradient(90deg, rgba(214, 167, 86, 0.16), transparent 22%, transparent 78%, rgba(22, 198, 164, 0.12));
  pointer-events: none;
}

.stat-card > *,
.ops-card > *,
.module-card > *,
.upload-panel > *,
.admin-courses > * {
  position: relative;
  z-index: 1;
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
}

.stat-card span {
  color: #63716b;
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  color: var(--brand-dark);
  font-family: var(--font-ui);
  font-size: 38px;
  line-height: 1;
}

.ops-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.ops-card,
.module-card {
  padding: 20px;
}

.ops-card h3,
.module-card h2 {
  color: #111716;
  margin-bottom: 8px;
  font-size: 26px;
}

.collection-type-grid {
  align-items: stretch;
}

.collection-type-card {
  position: relative;
  min-height: 260px;
  padding: 38px 42px;
  border: 1px solid rgba(214, 167, 86, 0.32);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  color: #f8f1df;
  background:
    linear-gradient(115deg, rgba(5, 19, 16, 0.9), rgba(11, 36, 29, 0.78) 48%, rgba(78, 61, 31, 0.62)),
    url("/media/open-class-waiting-room-bg.webp") center / cover no-repeat;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.collection-type-card::before,
.collection-type-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.collection-type-card::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent 68%),
    radial-gradient(circle at 18% 24%, rgba(45, 220, 183, 0.26), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(214, 167, 86, 0.22), transparent 24%);
}

.collection-type-card::after {
  inset: 14px;
  border: 1px solid rgba(248, 241, 223, 0.1);
  border-radius: 8px;
}

.collection-type-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 167, 86, 0.62);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(45, 220, 183, 0.12);
}

.collection-type-card > * {
  position: relative;
  z-index: 1;
}

.collection-type-card em {
  display: inline-flex;
  margin-bottom: 26px;
  color: #d9aa55;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.collection-type-card strong {
  display: block;
  max-width: 520px;
  color: #fffaf0;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.08;
}

.collection-type-card span {
  display: block;
  max-width: 620px;
  margin-top: 20px;
  color: rgba(242, 249, 245, 0.82);
  font-size: 18px;
  line-height: 1.65;
}

.collection-type-card b {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 24px;
  padding: 0 18px;
  border-radius: 999px;
  color: #072019;
  background: linear-gradient(90deg, #2ee1b7, #ddc46d);
  font-size: 18px;
  font-weight: 900;
}

.collection-type-card.is-open {
  background:
    linear-gradient(115deg, rgba(6, 20, 17, 0.9), rgba(5, 37, 32, 0.72) 48%, rgba(72, 65, 36, 0.58)),
    url("/media/open-class-waiting-room-bg.webp") center right / cover no-repeat;
}

.ai-workbench-card {
  display: grid;
  align-content: center;
  min-height: 260px;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 30%, rgba(68, 122, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #ffffff, #f5f8ff);
}

.ai-workbench-card h3 {
  font-size: clamp(28px, 3vw, 44px);
}

.ai-workbench-card h3::first-letter {
  color: #377dff;
}

.ai-query-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  margin-top: 16px;
  padding: 10px 12px 10px 18px;
  border: 2px solid #377dff;
  border-radius: 8px;
  color: #9aa5a0;
  background: #fff;
  font-size: 18px;
}

.ai-query-box textarea {
  width: 100%;
  min-height: 46px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  color: #111716;
  background: transparent;
  font: inherit;
}

.ai-query-box button {
  flex: 0 0 auto;
}

.ai-answer-box {
  min-height: 52px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(55, 125, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #33413c;
  line-height: 1.6;
}

.ai-answer-box strong {
  color: #111716;
}

.ai-answer-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.ai-answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.recent-course-card {
  min-height: 260px;
}

.recent-course-list span {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
}

.mini-list,
.workflow-list,
.tool-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.mini-list span,
.workflow-list li,
.tool-list span {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 143, 120, 0.08);
  color: #33413c;
  line-height: 1.45;
}

.mini-list strong {
  color: var(--brand-dark);
  margin-right: 6px;
}

.mini-list button {
  justify-content: flex-start;
  width: 100%;
  color: #16211d;
  border-color: rgba(22, 33, 29, 0.1);
  background: linear-gradient(180deg, #ffffff, #f7faf8);
}

.admin-program-detail {
  margin-top: 16px;
}

.detail-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 143, 120, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.08), rgba(214, 167, 86, 0.07)),
    #f8faf8;
}

.detail-panel h4 {
  margin: 0;
  color: #111716;
  font-family: var(--font-display);
  font-size: 24px;
}

.detail-panel p {
  color: #52615b;
  line-height: 1.6;
}

.detail-panel .tool-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2px;
}

.detail-panel .tool-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-panel .table-card {
  margin-top: 0;
}

.workflow-list {
  padding-left: 18px;
}

.tool-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: rgba(15, 143, 120, 0.07);
}

.control-row,
.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.control-row input,
.control-row select {
  flex: 1 1 180px;
}

.module-actions {
  align-items: center;
}

.table-card,
.check-list,
.permission-list,
.metric-bars,
.data-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.table-card div,
.permission-list span,
.permission-list label,
.data-grid span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #f8faf8;
}

.table-card span {
  color: #63716b;
  font-size: 13px;
}

.table-card em {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(214, 167, 86, 0.16);
  color: #7a5a1c;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.collection-table {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 16px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.collection-table-head,
.collection-row {
  display: grid;
  grid-template-columns: 34px minmax(320px, 1.65fr) 96px 112px 112px 120px minmax(280px, 340px);
  align-items: center;
  gap: 16px;
  min-width: 1220px;
  padding: 0 18px;
}

.collection-table-head {
  min-height: 54px;
  background: #f4f7f5;
  color: #2c3834;
  font-weight: 900;
}

.collection-row {
  min-height: 116px;
  border-top: 1px solid rgba(22, 33, 29, 0.08);
  background: #fff;
}

.collection-name-cell {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.collection-cover {
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(22, 33, 29, 0.1);
}

.collection-name-cell strong {
  display: block;
  color: #17211d;
  font-size: 18px;
  line-height: 1.35;
}

.collection-name-cell span {
  display: block;
  margin-top: 6px;
  color: #64726d;
  font-size: 13px;
}

.collection-name-cell em {
  display: block;
  margin-top: 5px;
  color: #e95555;
  font-style: normal;
  font-weight: 800;
}

.collection-number {
  color: #2d3835;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 800;
}

.collection-number.linklike {
  color: #1f7aff;
}

.collection-status {
  color: #4a5551;
  font-weight: 800;
}

.collection-status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #d0d8d3;
}

.collection-status.is-online::before {
  background: #59c34a;
}

.collection-actions {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  justify-items: stretch;
}

.collection-table-head > :last-child,
.collection-row > :last-child {
  position: sticky;
  right: 0;
  padding-left: 12px;
  background: inherit;
  z-index: 1;
}

.collection-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 12px;
  min-width: 0;
}

.collection-actions-row.is-secondary {
  gap: 8px 12px;
}

.collection-actions .text-action {
  white-space: nowrap;
  font-size: 13px;
}

.collection-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.collection-type-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 260px;
  padding: 38px 42px;
  color: #f8f1df;
  text-align: left;
  background:
    linear-gradient(115deg, rgba(5, 19, 16, 0.9), rgba(11, 36, 29, 0.78) 48%, rgba(78, 61, 31, 0.62)),
    url("/media/open-class-waiting-room-bg.webp") center / cover no-repeat;
  border: 1px solid rgba(214, 167, 86, 0.32);
  border-radius: 8px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.collection-type-card.is-open {
  background:
    linear-gradient(115deg, rgba(6, 20, 17, 0.9), rgba(5, 37, 32, 0.72) 48%, rgba(72, 65, 36, 0.58)),
    url("/media/open-class-waiting-room-bg.webp") center right / cover no-repeat;
}

.collection-type-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent 68%),
    radial-gradient(circle at 18% 24%, rgba(45, 220, 183, 0.26), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(214, 167, 86, 0.22), transparent 24%);
  pointer-events: none;
}

.collection-type-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(248, 241, 223, 0.1);
  border-radius: 8px;
  pointer-events: none;
}

.collection-type-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 167, 86, 0.62);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(45, 220, 183, 0.12);
}

.collection-type-card > * {
  position: relative;
  z-index: 1;
}

.collection-type-card em {
  display: inline-flex;
  margin-bottom: 26px;
  color: #d9aa55;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.collection-type-card strong {
  display: block;
  max-width: 520px;
  color: #fffaf0;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.08;
}

.collection-type-card span {
  display: block;
  max-width: 620px;
  margin-top: 20px;
  color: rgba(242, 249, 245, 0.82);
  font-size: 18px;
  line-height: 1.65;
}

.collection-type-card b {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 24px;
  padding: 0 18px;
  border-radius: 999px;
  color: #072019;
  background: linear-gradient(90deg, #2ee1b7, #ddc46d);
  font-size: 18px;
  font-weight: 900;
}

.paid-create-cover-picker {
  display: grid;
  gap: 8px;
}

.paid-create-cover-preview {
  min-height: 112px;
}

@media (max-width: 960px) {
  .collection-type-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-type-card {
    min-height: auto;
  }
}

.collection-edit-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.collection-edit-form {
  display: grid;
  gap: 14px;
}

.text-action {
  min-height: auto;
  padding: 0;
  color: #1f7aff;
  background: transparent;
  border-radius: 0;
  font-weight: 800;
}

.text-action:hover {
  transform: none;
  text-decoration: underline;
}

.text-action.danger {
  color: #c24b3d;
}

.collection-create-split.single-mode {
  grid-template-columns: minmax(0, 1fr);
}

.lesson-admin-table {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.lesson-admin-head,
.lesson-admin-row {
  display: grid;
  grid-template-columns: minmax(340px, 1.6fr) minmax(180px, 0.85fr) 170px 170px 170px 150px 170px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.lesson-admin-head {
  min-height: 52px;
  background: #f4f7f5;
  color: #2c3834;
  font-weight: 900;
}

.lesson-admin-row {
  min-height: 112px;
  border-top: 1px solid rgba(22, 33, 29, 0.08);
}

.lesson-admin-title {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.lesson-admin-title img {
  width: 112px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 6px;
  object-fit: cover;
}

.lesson-admin-title strong {
  display: block;
  color: #17211d;
  font-size: 16px;
  line-height: 1.35;
}

.lesson-admin-title span {
  display: block;
  margin-top: 5px;
  color: #64726d;
  font-size: 13px;
}

.lesson-resource-stack {
  display: grid;
  gap: 6px;
}

.resource-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #eef7f3;
  color: #52615b;
  font-size: 12px;
}

.resource-chip strong {
  color: #0f8f78;
}

.resource-chip.is-missing {
  background: rgba(214, 109, 92, 0.12);
}

.resource-chip.is-missing strong {
  color: #c24b3d;
}

.lesson-admin-row input,
.lesson-admin-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(22, 33, 29, 0.14);
  border-radius: 8px;
  padding: 0 9px;
  color: #17211d;
  background: #fff;
}

.lesson-status {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  color: #c24b3d;
  font-size: 12px;
  font-weight: 900;
}

.lesson-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lesson-status.is-online {
  color: #3cae3f;
}

.lesson-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.paid-collection-settings,
.paid-student-binding,
.paid-course-workbench {
  margin-bottom: 16px;
}

.paid-collection-shell {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.paid-collection-shell > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  object-fit: cover;
  background: #eef4f1;
}

.paid-course-workbench,
.student-binding-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fbfdfb;
}

.paid-lesson-list {
  display: grid;
  gap: 12px;
}

.paid-lesson-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(150px, 0.35fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.paid-lesson-card > img {
  width: 150px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 6px;
  object-fit: cover;
}

.paid-lesson-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.paid-lesson-main strong {
  color: #17211d;
  font-size: 16px;
  line-height: 1.35;
}

.paid-lesson-main span,
.paid-lesson-meta span {
  color: #64726d;
  font-size: 13px;
}

.paid-lesson-meta {
  display: grid;
  gap: 6px;
}

.student-binding-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(22, 33, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.student-binding-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-binding-row small {
  color: #64726d;
}

.student-binding-row input[type="number"] {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(22, 33, 29, 0.14);
  border-radius: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #52615b;
  font-weight: 800;
}

.paid-editor-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #64726d;
  font-size: 14px;
}

.paid-editor-breadcrumb strong {
  color: #17211d;
}

.paid-lesson-editor-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.paid-lesson-preview-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 96px;
}

.paid-lesson-preview-panel > img,
.paid-video-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #eef4f1;
}

.paid-video-preview {
  display: grid;
  place-items: center;
  color: #64726d;
  font-weight: 900;
}

.paid-video-preview img,
.paid-lesson-preview-panel > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-picker-field {
  gap: 8px;
}

.resource-picker-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 56px;
  overflow: hidden;
}

.resource-picker-button span {
  display: -webkit-box;
  overflow: hidden;
  color: #17211d;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
  text-align: left;
}

.resource-picker-inline {
  display: grid;
  gap: 8px;
}

.resource-picker-fallback-select {
  width: 100%;
  min-height: 42px;
  color: #17211d;
  border: 1px solid rgba(22, 33, 29, 0.16);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.resource-picker-fallback-select.is-attention {
  border-color: #16c6a4;
  box-shadow: 0 0 0 4px rgba(22, 198, 164, 0.18);
}

.resource-picker-fallback-empty {
  color: #7b6750;
  line-height: 1.45;
}

.resource-picker-inline-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 132px);
  gap: 8px;
  max-width: 100%;
  padding: 4px 2px 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.resource-picker-inline-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(22, 33, 29, 0.14);
  border-radius: 8px;
  color: #17211d;
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  cursor: pointer;
}

.resource-picker-inline-card:hover,
.resource-picker-inline-card.is-selected {
  border-color: #16c6a4;
  box-shadow: 0 0 0 3px rgba(22, 198, 164, 0.15);
}

.resource-picker-inline-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #e9f0ec;
}

.resource-picker-inline-card span {
  overflow: hidden;
  color: #52615b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.resource-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 14, 0.58);
}

.resource-picker-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(1180px, 96vw);
  height: min(780px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  color: #17211d;
  box-shadow: 0 24px 80px rgba(9, 16, 14, 0.28);
}

.resource-picker-dialog:empty::before {
  content: "素材库选择器加载失败，请刷新后台后重试";
  display: block;
  padding: 24px;
  color: #17211d;
  font-weight: 800;
}

.resource-picker-safe-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #074036;
  background: rgba(22, 198, 164, 0.14);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.resource-picker-head,
.resource-picker-tools,
.resource-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.resource-picker-head h3,
.resource-picker-head p,
.resource-picker-dialog .eyebrow {
  color: #17211d;
}

.resource-picker-dialog .eyebrow {
  color: #a27325;
}

.resource-picker-dialog .secondary {
  color: #17211d;
  border-color: rgba(22, 33, 29, 0.18);
  background: #fff;
}

.resource-picker-dialog .primary {
  color: #06100e;
}

.resource-picker-tools input {
  max-width: 520px;
  color: #17211d;
  border-color: rgba(22, 33, 29, 0.18);
  background: #f8fbf9;
}

.resource-picker-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #168a74 #e7eeea;
  display: grid;
  gap: 16px;
  padding-right: 10px;
}

.resource-picker-body::-webkit-scrollbar {
  width: 12px;
}

.resource-picker-body::-webkit-scrollbar-track {
  border-radius: 6px;
  background: #e7eeea;
}

.resource-picker-body::-webkit-scrollbar-thumb {
  border: 2px solid #e7eeea;
  border-radius: 6px;
  background: #168a74;
}

body.is-resource-picker-open {
  overflow: hidden;
}

.resource-picker-group {
  display: grid;
  gap: 10px;
}

.resource-picker-group h4 {
  margin: 0;
  color: #17211d;
  font-size: 15px;
}

.resource-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.resource-picker-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fbfdfb;
  cursor: pointer;
}

.resource-picker-item:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(22, 198, 164, 0.12);
}

.resource-picker-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.resource-picker-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #e9f0ec;
  color: #64726d;
  font-weight: 900;
}

.resource-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-picker-thumb.is-file {
  aspect-ratio: 4 / 3;
}

.resource-picker-item strong {
  overflow: hidden;
  color: #17211d;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-picker-item span {
  min-height: 18px;
  color: #64726d;
  font-size: 12px;
}

.resource-picker-status {
  display: grid;
  gap: 8px;
  color: #17211d;
}

.resource-picker-status strong {
  font-size: 16px;
}

.resource-picker-status small {
  color: #64726d;
  line-height: 1.45;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(250, 253, 251, 0), #fbfdfb 32%);
}

.student-admin-table {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.student-admin-head,
.student-admin-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.4fr) 130px minmax(220px, 1fr) 100px 190px;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}

.student-admin-head {
  min-height: 52px;
  background: #f4f7f5;
  color: #2c3834;
  font-weight: 900;
}

.student-admin-row {
  min-height: 84px;
  border-top: 1px solid rgba(22, 33, 29, 0.08);
}

.student-admin-row strong {
  display: block;
  color: #17211d;
  font-size: 15px;
  line-height: 1.35;
}

.student-admin-row span {
  display: block;
  margin-top: 5px;
  color: #64726d;
  font-size: 13px;
}

.student-status {
  display: inline-flex;
  align-items: center;
  color: #c24b3d;
  font-weight: 900;
}

.student-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

.student-status.is-active {
  color: #3cae3f;
}

.student-admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.refund-audit-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.refund-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.refund-metrics span {
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: #f4f7f5;
  color: #64726d;
  font-size: 12px;
}

.refund-metrics strong {
  display: block;
  margin-bottom: 6px;
  color: #17211d;
  font-size: 18px;
  line-height: 1.25;
}

.staff-account-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.staff-account-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px 100px 70px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.staff-account-row strong,
.staff-account-row span {
  display: block;
}

.staff-account-row span {
  margin-top: 4px;
  color: #64726d;
  font-size: 13px;
}

.staff-account-row em {
  color: #17211d;
  font-style: normal;
  font-weight: 900;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 143, 120, 0.07);
  color: #33413c;
}

.check-list input {
  width: auto;
  accent-color: var(--brand-dark);
}

.metric-bars span {
  display: grid;
  grid-template-columns: 92px 1fr 44px;
  align-items: center;
  gap: 10px;
  color: #33413c;
}

.metric-bars i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-dark) var(--v), rgba(22, 33, 29, 0.1) var(--v));
}

.metric-bars em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
}

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

.data-grid strong {
  color: var(--brand-dark);
  font-family: var(--font-ui);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.05;
}

.analytics-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.analytics-detail-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.detail-table {
  margin-top: 14px;
  overflow-x: auto;
}

.detail-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.detail-table th,
.detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.1);
  text-align: left;
  vertical-align: top;
}

.detail-table th {
  color: #63716b;
  font-size: 12px;
  font-weight: 900;
}

.detail-table td {
  color: #24312d;
}

.report-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.report-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #f8faf8;
}

.report-row strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.report-row .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #63716b;
  font-size: 12px;
}

.report-row .mini-bar {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-dark) var(--v), rgba(22, 33, 29, 0.1) var(--v));
}

.peak-trend {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 92px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #f8faf8;
}

.peak-trend span {
  position: relative;
  flex: 1 1 0;
  min-width: 8px;
  height: var(--v);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--brand-dark), #16c6a4);
}

.peak-trend em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  color: #63716b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.permission-list span {
  grid-template-columns: 90px 1fr;
  align-items: center;
}

.permission-list label {
  grid-template-columns: 90px 1fr auto;
  align-items: center;
}

.permission-list strong {
  color: var(--brand-dark);
}

.permission-list input {
  width: auto;
  accent-color: var(--brand-dark);
}

.course-list,
.player-shell,
.upload-panel,
.admin-courses {
  background: #ffffff;
  color: #16211d;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(38, 55, 47, 0.12);
}

.course-list,
.admin-courses,
.upload-panel {
  padding: 18px;
}

.player-shell {
  overflow: hidden;
}

.video-stage {
  position: relative;
  aspect-ratio: var(--lesson-video-aspect, 16 / 9);
}

.video-stage::before,
.video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.video-stage::before {
  border: 1px solid rgba(214, 167, 86, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(22, 198, 164, 0.08),
    0 0 0 rgba(22, 198, 164, 0);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.video-stage::after {
  opacity: 0;
  background:
    linear-gradient(90deg, transparent, rgba(214, 167, 86, 0.76), transparent) top left / 38% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(22, 198, 164, 0.68), transparent) top right / 1px 42% no-repeat,
    linear-gradient(90deg, transparent, rgba(22, 198, 164, 0.68), transparent) bottom right / 42% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(214, 167, 86, 0.76), transparent) bottom left / 1px 38% no-repeat;
  transition: opacity 220ms ease;
}

.video-stage:hover::before,
.video-stage.is-playing::before {
  border-color: rgba(214, 167, 86, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(22, 198, 164, 0.2),
    0 0 34px rgba(22, 198, 164, 0.16),
    0 0 48px rgba(214, 167, 86, 0.1);
}

.video-stage:hover::after {
  opacity: 1;
  animation: videoBorderSweep 2.6s linear infinite;
}

.video-stage.is-playing::after {
  opacity: 1;
  animation: videoBorderSweep 3.8s linear infinite;
}

.pseudo-live-tap-overlay {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  gap: 6px;
  max-width: min(360px, calc(100% - 48px));
  padding: 16px 18px;
  color: #f6f1e7;
  text-align: left;
  border: 1px solid rgba(22, 198, 164, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 18, 16, 0.92), rgba(33, 38, 31, 0.82)),
    rgba(8, 16, 14, 0.92);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(246, 241, 231, 0.06);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.pseudo-live-tap-overlay[hidden] {
  display: none;
}

.pseudo-live-tap-overlay strong {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.05;
}

.pseudo-live-tap-overlay span:last-child {
  color: rgba(246, 241, 231, 0.74);
  font-size: 14px;
  line-height: 1.45;
}

.video-stage.is-awaiting-live-tap .lesson-video {
  filter: brightness(0.78);
}

.video-stage.is-awaiting-live-tap .stream-frame {
  filter: brightness(0.78);
}

/* Do not reveal the provider UI while the SDK is sealing pseudo-live
   controls. This prevents duration/seek controls from flashing on load. */
.video-stage.is-live .stream-frame:not([data-controls-sealed="1"]) {
  opacity: 0;
}

.video-stage.is-live::before {
  border-color: rgba(214, 109, 92, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(214, 109, 92, 0.26),
    0 0 42px rgba(214, 109, 92, 0.2);
}

.video-stage.is-live::after {
  opacity: 1;
  background:
    linear-gradient(90deg, transparent, rgba(214, 109, 92, 0.9), transparent) top left / 40% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(214, 167, 86, 0.76), transparent) top right / 1px 46% no-repeat,
    linear-gradient(90deg, transparent, rgba(214, 109, 92, 0.9), transparent) bottom right / 44% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(214, 167, 86, 0.76), transparent) bottom left / 1px 42% no-repeat;
  animation: videoLivePulse 1.8s ease-in-out infinite alternate, videoBorderSweep 3s linear infinite;
}

@keyframes videoBorderSweep {
  0% {
    background-position: top left, top right, bottom right, bottom left;
  }
  50% {
    background-position: top right, bottom right, bottom left, top left;
  }
  100% {
    background-position: top left, top right, bottom right, bottom left;
  }
}

@keyframes videoLivePulse {
  from {
    filter: drop-shadow(0 0 4px rgba(214, 109, 92, 0.3));
  }
  to {
    filter: drop-shadow(0 0 14px rgba(214, 109, 92, 0.7));
  }
}

.live-chip {
  position: absolute;
  left: 18px;
  top: 18px;
  display: none;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(214, 109, 92, 0.92);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(214, 109, 92, 0.32);
}

.live-chip.is-visible {
  display: inline-flex;
}

.section-head,
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.player-toolbar {
  padding: 18px 18px 0;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px 0;
  background: #ffffff;
}

.player-controls .secondary {
  min-height: 38px;
  color: #16211d;
  border-color: rgba(22, 33, 29, 0.12);
  background: linear-gradient(180deg, #ffffff, #f5f8f6);
}

.player-controls .secondary.is-muted {
  color: #8b9791;
  background: #edf1ef;
}

.stack {
  display: grid;
  gap: 12px;
}

.course-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 8px;
  background: #fbfdfb;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.course-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.course-card-body {
  display: grid;
  gap: 10px;
}

.course-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 143, 120, 0.35);
  box-shadow: 0 18px 35px rgba(38, 55, 47, 0.12);
}

.course-card.selected {
  border-color: var(--brand-dark);
  box-shadow: inset 3px 0 0 var(--brand-dark);
}

.course-card h3 {
  font-size: 16px;
  line-height: 1.3;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #63716b;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(15, 143, 120, 0.1);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.badge.warn {
  color: #bd4b28;
}

.badge.subtle {
  color: #6d5a2d;
  background: rgba(214, 167, 86, 0.13);
}

.lesson-video {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--lesson-video-aspect, 16 / 9);
  object-fit: contain;
  background: #111b18;
}

.stream-frame {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--lesson-video-aspect, 16 / 9);
  border: 0;
  background: #111b18;
}

.video-stage.is-stream-warming .stream-frame {
  opacity: 0;
}

.video-stage.is-stream-warming::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #101716;
  pointer-events: none;
}

.video-stage.is-open-live .stream-frame {
  pointer-events: none;
}

.stream-subtitle-overlay {
  position: absolute;
  left: clamp(28px, 11vw, 220px);
  right: clamp(28px, 11vw, 220px);
  bottom: clamp(16px, 3.4vh, 40px);
  z-index: 6;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.stream-subtitle-overlay span {
  max-width: min(980px, 92%);
  padding: 6px 15px 7px;
  border-radius: 8px;
  color: #fffaf0;
  background: rgba(3, 5, 5, 0.58);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: var(--font-body);
  font-size: clamp(18px, 1.38vw, 27px);
  font-weight: 720;
  line-height: 1.24;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}

.video-stage.is-open-live .lesson-video::cue,
.video-stage.is-live .lesson-video::cue {
  color: transparent;
  background: transparent;
  text-shadow: none;
}

.stream-subtitle-overlay[hidden],
.stream-subtitle-overlay:empty {
  display: none;
}

#studentView .player-shell:fullscreen .stream-subtitle-overlay,
#studentView .player-shell.is-inline-fullscreen .stream-subtitle-overlay {
  bottom: clamp(18px, 6vh, 72px);
  z-index: 60;
}

#studentView .player-shell:fullscreen .stream-subtitle-overlay span,
#studentView .player-shell.is-inline-fullscreen .stream-subtitle-overlay span {
  max-width: min(1120px, 86vw);
  font-size: clamp(20px, 2vw, 34px);
}

body:not(.is-open-live-room) #studentView .player-shell:fullscreen,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen {
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0 !important;
  overflow: hidden !important;
}

body:not(.is-open-live-room) #studentView .player-shell:fullscreen .player-toolbar,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen .player-toolbar,
body:not(.is-open-live-room) #studentView .player-shell:fullscreen > .muted,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen > .muted,
body:not(.is-open-live-room) #studentView .player-shell:fullscreen .lesson-service-grid,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen .lesson-service-grid {
  display: none !important;
}

body:not(.is-open-live-room) #studentView .player-shell:fullscreen .video-stage,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen .video-stage {
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0;
}

body:not(.is-open-live-room) #studentView .player-shell:fullscreen .player-controls,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen .player-controls {
  position: relative;
  z-index: 70;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    linear-gradient(180deg, rgba(3, 8, 7, 0.92), rgba(3, 8, 7, 0.98));
}

body:not(.is-open-live-room) #studentView .player-shell:fullscreen .player-progress,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen .player-progress {
  flex: 1 1 auto;
  width: auto;
  min-width: min(420px, 42vw);
}

body:not(.is-open-live-room) #studentView .player-shell:fullscreen .stream-subtitle-overlay,
body:not(.is-open-live-room) #studentView .player-shell.is-inline-fullscreen .stream-subtitle-overlay {
  bottom: clamp(86px, 12vh, 148px);
  z-index: 65;
}

.stream-live-lock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 18px 18px;
  pointer-events: none;
  background: transparent;
}

.stream-live-lock span {
  padding: 9px 14px;
  border: 1px solid rgba(27, 226, 187, 0.28);
  border-radius: 999px;
  color: #f6f1e7;
  background: rgba(4, 10, 8, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.stream-live-lock[hidden] {
  display: none;
}

.muted {
  color: #63716b;
  font-size: 14px;
  line-height: 1.6;
}

.login-panel .muted {
  color: #aeb9b2;
}

.player-shell > .muted {
  padding: 14px 18px 18px;
}

#studentView {
  position: relative;
  min-height: calc(100vh - 138px);
  margin: -24px calc(clamp(20px, 4vw, 56px) * -1) -56px;
  padding: 28px clamp(20px, 4vw, 56px) 56px;
  overflow: clip;
  background:
    linear-gradient(90deg, rgba(4, 11, 10, 0.96), rgba(4, 11, 10, 0.72) 42%, rgba(4, 11, 10, 0.92)),
    linear-gradient(180deg, rgba(8, 16, 15, 0.3), rgba(8, 16, 15, 0.92)),
    url("/media/digital-painting-hero.webp");
  background-size: cover;
  background-position: center;
}

#studentView::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 20%, rgba(22, 198, 164, 0.22), transparent 28%),
    radial-gradient(circle at 78% 12%, rgba(214, 167, 86, 0.2), transparent 22%),
    linear-gradient(180deg, transparent, rgba(8, 16, 15, 0.85));
  pointer-events: none;
}

.student-course-home {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 388px));
  gap: 18px;
  align-items: stretch;
}

.program-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  overflow: hidden;
  min-height: 0;
  max-width: 388px;
  padding: 14px;
  border: 1px solid rgba(214, 167, 86, 0.18);
  border-radius: 8px;
  color: var(--paper);
  background:
    linear-gradient(145deg, rgba(22, 198, 164, 0.15), rgba(214, 167, 86, 0.09)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel-glass);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.program-card::before,
.program-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.program-card::before {
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent) -80% 0 / 44% 100% no-repeat,
    radial-gradient(circle at 80% 18%, rgba(214, 167, 86, 0.18), transparent 28%);
  transition: background-position 520ms ease;
}

.program-card::after {
  inset: 9px;
  border: 1px solid rgba(214, 167, 86, 0.16);
  border-radius: 6px;
}

.program-card:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 198, 164, 0.42);
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.34), 0 0 42px rgba(22, 198, 164, 0.12);
}

.program-card:hover::before {
  background-position: 140% 0, center;
}

.program-card img,
.program-card > div {
  position: relative;
  z-index: 1;
}

.program-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 204px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  align-self: center;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(214, 167, 86, 0.08)),
    rgba(2, 7, 6, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.program-card > div {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 190px;
  padding: 0 2px 2px;
}

.program-card h3 {
  display: -webkit-box;
  min-height: 0;
  max-height: calc(3 * 1.12em);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: break-word;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.program-card p {
  display: -webkit-box;
  max-width: 560px;
  color: #b8c4bd;
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.program-card .meta {
  align-self: end;
  padding-top: 8px;
  color: #d7ded9;
  font-size: 13px;
}

.back-button {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 0 18px;
}

#studentView .learning-layout {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 0;
}

body.is-open-live-room #studentView .learning-layout {
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

body.is-open-live-room #lessonWorkspace {
  min-height: calc(100vh - 84px);
}

body.is-open-live-room #studentView .back-button {
  display: none;
}

body.is-paid-classroom-room #studentView .learning-layout,
#lessonWorkspace.is-paid-classroom .learning-layout {
  --classroom-chat-width: 360px;
  grid-template-columns: minmax(280px, var(--classroom-chat-width)) 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.classroom-resize-handle {
  display: none;
}

body.is-paid-classroom-room #studentView .classroom-resize-handle,
#lessonWorkspace.is-paid-classroom .classroom-resize-handle {
  position: sticky;
  top: 18px;
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: 12px;
  height: calc(100vh - 148px);
  min-height: 420px;
  cursor: col-resize;
  touch-action: none;
}

body.is-paid-classroom-room #studentView .classroom-resize-handle::before,
#lessonWorkspace.is-paid-classroom .classroom-resize-handle::before {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-radius: 4px;
  background: rgba(90, 118, 107, 0.42);
  transition: background 160ms ease, box-shadow 160ms ease;
}

body.is-paid-classroom-room #studentView .classroom-resize-handle:hover::before,
body.is-paid-classroom-room #studentView .classroom-resize-handle:focus-visible::before,
#lessonWorkspace.is-paid-classroom .classroom-resize-handle:hover::before,
#lessonWorkspace.is-paid-classroom .classroom-resize-handle:focus-visible::before,
.classroom-resize-handle.is-dragging::before {
  background: #2adbb5;
  box-shadow: 0 0 0 3px rgba(42, 219, 181, 0.18);
}

body.is-resizing-classroom {
  cursor: col-resize;
  user-select: none;
}

body.is-paid-classroom-room #lessonWorkspace,
#lessonWorkspace.is-paid-classroom {
  min-height: calc(100vh - 84px);
  min-height: calc(100dvh - 84px);
}

body.is-paid-classroom-room #studentView .course-list,
#lessonWorkspace.is-paid-classroom .course-list {
  display: none;
}

body.is-paid-classroom-room #studentView .player-shell,
#lessonWorkspace.is-paid-classroom .player-shell {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  top: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

body.is-paid-classroom-room #studentView .open-class-chat-aside,
#lessonWorkspace.is-paid-classroom .open-class-chat-aside {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 118px);
  min-height: calc(100dvh - 118px);
  max-height: calc(100vh - 118px);
  max-height: calc(100dvh - 118px);
}

body.is-paid-classroom-room #studentView .open-class-chat-aside .classroom-comments,
#lessonWorkspace.is-paid-classroom .open-class-chat-aside .classroom-comments {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(8, 16, 15, 0.72), rgba(8, 16, 15, 0.92)),
    radial-gradient(circle at 18% 8%, rgba(27, 226, 187, 0.12), transparent 30%),
    rgba(8, 16, 15, 0.92);
}

body.is-paid-classroom-room #studentView .player-toolbar,
#lessonWorkspace.is-paid-classroom .player-toolbar {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(214, 167, 86, 0.2);
  background:
    linear-gradient(90deg, rgba(7, 12, 10, 0.88), rgba(17, 25, 21, 0.66), rgba(45, 36, 21, 0.38)),
    url("/media/open-class-waiting-room-bg.webp") center right / cover no-repeat,
    rgba(10, 17, 15, 0.92);
}

body.is-paid-classroom-room #studentView .video-stage,
#lessonWorkspace.is-paid-classroom .video-stage {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: none;
}

body.is-paid-classroom-room #studentView .stream-frame,
body.is-paid-classroom-room #studentView .lesson-video,
#lessonWorkspace.is-paid-classroom .stream-frame,
#lessonWorkspace.is-paid-classroom .lesson-video {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}

@media (min-width: 1181px) {
  body.is-paid-classroom-room #studentView .video-stage,
  #lessonWorkspace.is-paid-classroom .video-stage {
    height: clamp(640px, calc(100vh - 245px), 960px);
    height: clamp(640px, calc(100dvh - 245px), 960px);
    min-height: 620px;
    aspect-ratio: auto;
  }

  body.is-paid-classroom-room #studentView .lesson-video,
  #lessonWorkspace.is-paid-classroom .lesson-video,
  body.is-paid-classroom-room #studentView .stream-frame,
  #lessonWorkspace.is-paid-classroom .stream-frame {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: none;
    transform-origin: center center;
  }
}

body.is-paid-classroom-room #studentView #playerDescription,
#lessonWorkspace.is-paid-classroom #playerDescription {
  display: none;
}

body.is-paid-classroom-room #studentView .open-live-tools,
#lessonWorkspace.is-paid-classroom .open-live-tools {
  justify-content: flex-start;
  padding: 12px 18px;
}

body.is-paid-classroom-room #studentView .open-live-tools .live-note,
#lessonWorkspace.is-paid-classroom .open-live-tools .live-note {
  display: none !important;
}

@media (max-width: 700px) {
  .open-live-tools .live-note {
    display: none;
  }
}

body.is-paid-classroom-room #studentView .open-live-tools .subtitle-control,
#lessonWorkspace.is-paid-classroom .open-live-tools .subtitle-control {
  width: min(360px, 100%);
}

body.is-paid-live-room #studentView .player-controls,
body.is-paid-live-room #studentView .lesson-service-grid,
#lessonWorkspace.is-paid-live-classroom .player-controls,
#lessonWorkspace.is-paid-live-classroom .lesson-service-grid {
  display: none;
}

body.is-open-live-room.is-paid-live-room #studentView .learning-layout,
#lessonWorkspace.is-paid-live-classroom .learning-layout {
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

body.is-open-live-room.is-paid-live-room #studentView .classroom-resize-handle,
#lessonWorkspace.is-paid-live-classroom .classroom-resize-handle {
  display: none !important;
}

body.is-open-live-room.is-paid-live-room #studentView .open-class-chat-aside,
#lessonWorkspace.is-paid-live-classroom .open-class-chat-aside {
  grid-column: 1;
  position: relative;
  top: auto;
  min-height: calc(100vh - 108px);
  min-height: calc(100dvh - 108px);
  max-height: calc(100vh - 108px);
  max-height: calc(100dvh - 108px);
}

body.is-open-live-room.is-paid-live-room #studentView .player-shell,
#lessonWorkspace.is-paid-live-classroom .player-shell {
  grid-column: 2;
  position: relative;
  top: auto;
  min-height: calc(100vh - 108px);
  min-height: calc(100dvh - 108px);
  max-height: none;
  overflow: visible;
}

body.is-open-live-room.is-paid-live-room #studentView .video-stage,
#lessonWorkspace.is-paid-live-classroom .video-stage {
  height: auto;
  min-height: min(72vh, 760px);
  max-height: none;
  aspect-ratio: auto;
}

body.is-open-live-room.is-paid-live-room #studentView .stream-frame,
body.is-open-live-room.is-paid-live-room #studentView .lesson-video,
#lessonWorkspace.is-paid-live-classroom .stream-frame,
#lessonWorkspace.is-paid-live-classroom .lesson-video {
  width: 100%;
  height: 100%;
  min-height: min(72vh, 760px);
  max-height: none;
  object-fit: contain;
  transform: none;
}

body.is-open-live-room.is-paid-live-room #studentView .open-live-tools .live-note,
#lessonWorkspace.is-paid-live-classroom .open-live-tools .live-note {
  display: inline !important;
}

.learning-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 156px;
  overflow: hidden;
  padding: 26px 28px;
  border: 1px solid rgba(214, 167, 86, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.12), rgba(214, 167, 86, 0.1)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(9, 16, 15, 0.74);
  color: var(--paper);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.learning-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(214, 167, 86, 0.18), transparent 18%, transparent 82%, rgba(27, 226, 187, 0.13)),
    url("/media/course-scene.webp") right center / auto 128% no-repeat;
  opacity: 0.16;
  pointer-events: none;
}

.learning-hero > * {
  position: relative;
  z-index: 1;
}

.learning-hero h2 {
  color: var(--paper);
  max-width: 760px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 0.98;
  text-wrap: balance;
}

.learning-hero p:not(.eyebrow) {
  max-width: 720px;
  color: #b8c4bd;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.55;
}

.learning-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.learning-stats span {
  display: grid;
  gap: 4px;
  min-width: 110px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce4df;
  font-size: 13px;
}

.learning-stats strong {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 24px;
}

#studentView .course-list,
#studentView .player-shell,
#studentView .open-class-chat-aside {
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)),
    rgba(9, 16, 15, 0.78);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

#studentView .course-list {
  position: sticky;
  top: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 178px);
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(9, 16, 15, 0.5), rgba(9, 16, 15, 0.82)),
    url("/media/student-course-panel.webp"),
    rgba(9, 16, 15, 0.78);
  background-size: cover;
  background-position: center bottom;
}

#studentView .course-list[hidden] {
  display: none;
}

#studentView .open-class-chat-aside {
  position: sticky;
  top: 18px;
  display: grid;
  min-height: calc(100vh - 178px);
  max-height: calc(100vh - 178px);
  overflow: hidden;
}

body.is-open-live-room #studentView .open-class-chat-aside {
  position: relative;
  top: auto;
  min-height: calc(100vh - 108px);
  max-height: calc(100vh - 108px);
}

#studentView .open-class-chat-aside[hidden] {
  display: none;
}

#studentView .open-class-chat-aside .classroom-comments {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  margin: 0;
  border: 0;
  background:
    linear-gradient(180deg, rgba(9, 16, 15, 0.58), rgba(9, 16, 15, 0.86)),
    url("/media/student-course-panel.webp") center bottom / cover;
}

body.is-open-live-room #studentView .open-class-chat-aside .classroom-comments {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(8, 16, 15, 0.72), rgba(8, 16, 15, 0.92)),
    radial-gradient(circle at 18% 8%, rgba(27, 226, 187, 0.12), transparent 30%),
    rgba(8, 16, 15, 0.92);
}

#studentView .open-class-chat-aside .comment-list {
  max-height: none;
  min-height: 0;
  padding-right: 4px;
  overscroll-behavior: contain;
}

body.is-open-live-room #studentView .player-shell {
  position: relative;
  top: auto;
  max-height: none;
  min-height: calc(100vh - 108px);
  overflow: visible;
}

body.is-open-live-room #studentView .player-toolbar {
  padding: 18px 24px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(214, 167, 86, 0.2);
  background:
    linear-gradient(90deg, rgba(7, 12, 10, 0.84), rgba(17, 25, 21, 0.62), rgba(45, 36, 21, 0.38)),
    url("/media/open-class-waiting-room-bg.webp") center right / cover no-repeat,
    rgba(10, 17, 15, 0.92);
}

body.is-open-live-room #studentView .player-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 72% 18%, rgba(214, 167, 86, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 56%);
  opacity: 0.58;
  pointer-events: none;
}

body.is-open-live-room #studentView .video-stage {
  min-height: min(72vh, 760px);
}

body.is-open-live-room #studentView .stream-frame,
body.is-open-live-room #studentView .lesson-video {
  min-height: min(72vh, 760px);
  max-height: none;
}

body.is-open-live-room #studentView .video-stage.is-live-syncing {
  background:
    radial-gradient(circle at 50% 48%, rgba(44, 213, 182, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(5, 12, 10, 0.98), rgba(14, 18, 15, 0.98));
}

body.is-open-live-room #studentView .video-stage.is-live-syncing::after {
  opacity: 1;
  z-index: 8;
  animation: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(44, 213, 182, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(5, 12, 10, 0.98), rgba(14, 18, 15, 0.98));
}

body.is-open-live-room #studentView .video-stage.is-live-syncing .lesson-video {
  opacity: 0 !important;
}

body.is-open-live-room #studentView .player-controls,
body.is-open-live-room #studentView .lesson-service-grid {
  display: none;
}

#studentView .player-shell.is-pseudo-live .player-controls,
#studentView .player-shell.is-pseudo-live .lesson-service-grid {
  display: none !important;
}

#studentView .player-shell.is-pseudo-live #playerProgress {
  display: none !important;
}

#studentView .player-shell.is-pseudo-live .open-live-tools:not([hidden]) {
  display: flex !important;
}

#studentView .player-shell.is-waiting-room .video-stage,
#studentView .player-shell.is-replay-processing .video-stage,
#studentView .player-shell.is-waiting-room .player-controls,
#studentView .player-shell.is-replay-processing .player-controls,
#studentView .player-shell.is-waiting-room .lesson-service-grid,
#studentView .player-shell.is-replay-processing .lesson-service-grid {
  display: none !important;
}

#studentView .player-shell.is-waiting-room,
#studentView .player-shell.is-replay-processing {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(11, 18, 15, 0.62), rgba(9, 16, 14, 0.82)),
    url("/media/open-class-waiting-room-bg.webp") center right / cover no-repeat,
    linear-gradient(135deg, rgba(11, 22, 18, 0.98), rgba(22, 30, 26, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -140px 220px rgba(3, 8, 7, 0.48);
}

#studentView .player-shell.is-waiting-room::before,
#studentView .player-shell.is-replay-processing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 74% 20%, rgba(214, 167, 86, 0.16), transparent 28%),
    linear-gradient(90deg, rgba(3, 10, 8, 0.44), rgba(6, 14, 12, 0.7));
  opacity: 0.42;
  pointer-events: none;
}

.open-live-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 11, 0.72);
}

.open-live-tools .live-fullscreen {
  margin-left: auto;
  min-height: 42px;
}

.open-live-tools[hidden] {
  display: none;
}

.open-live-tools .subtitle-control {
  min-height: 42px;
  margin: 0;
}

.open-live-tools select {
  min-width: 180px;
}

.open-live-tools select:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

.open-live-tools select:disabled {
  opacity: 0.46;
}

.open-live-tools .live-note {
  color: rgba(246, 241, 231, 0.64);
  font-size: 13px;
}

#studentView .player-shell:fullscreen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100vw;
  height: 100vh;
  max-height: none;
  background: #050907;
}

#studentView .player-shell:fullscreen .video-stage,
#studentView .player-shell:fullscreen .stream-frame,
#studentView .player-shell:fullscreen .lesson-video {
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

body.is-inline-player-fullscreen {
  overflow: hidden;
}

#studentView .player-shell.is-inline-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100vw;
  height: 100dvh;
  height: 100svh;
  min-height: 100dvh;
  min-height: 100svh;
  max-height: none;
  overflow: hidden;
  border-radius: 0;
  background: #050907;
}

#studentView .player-shell.is-inline-fullscreen .video-stage,
#studentView .player-shell.is-inline-fullscreen .stream-frame,
#studentView .player-shell.is-inline-fullscreen .lesson-video {
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

#studentView .player-shell.is-inline-fullscreen > .muted,
#studentView .player-shell.is-inline-fullscreen .lesson-service-grid {
  display: none;
}

body.is-open-live-room #studentView .player-shell:fullscreen,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.is-open-live-room #studentView .player-shell:fullscreen .player-toolbar,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .player-toolbar {
  display: none !important;
}

body.is-open-live-room #studentView .player-shell:fullscreen .video-stage,
body.is-open-live-room #studentView .player-shell:fullscreen .stream-frame,
body.is-open-live-room #studentView .player-shell:fullscreen .lesson-video,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .video-stage,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .stream-frame,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .lesson-video {
  width: 100% !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
}

body.is-open-live-room #studentView .player-shell:fullscreen .lesson-video,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .lesson-video {
  object-fit: contain;
}

body.is-open-live-room #studentView .player-shell:fullscreen .open-live-tools,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .open-live-tools {
  align-items: center !important;
  flex-direction: row !important;
  gap: 10px;
  padding: 10px 12px;
}

body.is-open-live-room #studentView .player-shell:fullscreen .open-live-tools .live-note,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .open-live-tools .live-note {
  display: none;
}

body.is-open-live-room #studentView .player-shell:fullscreen .open-live-tools .live-fullscreen,
body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .open-live-tools .live-fullscreen {
  width: auto !important;
  margin-left: auto !important;
}

#studentView .course-list::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(180deg, transparent, rgba(9, 16, 15, 0.92));
  pointer-events: none;
}

#studentView .course-list .section-head {
  margin-bottom: 12px;
}

#studentView #studentCourses {
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-color: rgba(214, 167, 86, 0.48) rgba(255, 255, 255, 0.08);
}

#studentView .section-head h2,
#studentView .player-toolbar h2 {
  color: var(--paper);
}

#studentView #courseCount {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(214, 167, 86, 0.36);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(214, 167, 86, 0.12);
  font-family: var(--font-ui);
  font-weight: 900;
}

#studentView .course-card {
  position: relative;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 10px;
  overflow: hidden;
  cursor: pointer;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.1), rgba(214, 167, 86, 0.08)),
    rgba(255, 255, 255, 0.055);
}

#studentView .course-card:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 167, 86, 0.45);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

#studentView .course-card.selected {
  border-color: rgba(22, 198, 164, 0.62);
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.22), rgba(214, 167, 86, 0.13)),
    rgba(255, 255, 255, 0.085);
  box-shadow: inset 3px 0 0 var(--brand), 0 24px 54px rgba(0, 0, 0, 0.24);
}

#studentView .course-card.is-next-preview {
  border-color: rgba(214, 167, 86, 0.38);
  background:
    linear-gradient(135deg, rgba(214, 167, 86, 0.13), rgba(22, 198, 164, 0.08)),
    rgba(255, 255, 255, 0.045);
}

#studentView .course-card.is-next-preview .course-cover {
  filter: saturate(0.78) brightness(0.82);
}

#studentView .unlock-badge {
  border-color: rgba(214, 167, 86, 0.5);
  color: var(--gold);
  background: rgba(214, 167, 86, 0.14);
}

#studentView .course-card.selected::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -46px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(27, 226, 187, 0.28), transparent 64%);
  pointer-events: none;
}

#studentView .course-card .course-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: 76px;
  background: rgba(255, 255, 255, 0.06);
  object-fit: cover;
  object-position: center;
}

#studentView .course-card.selected .course-cover {
  border-color: rgba(22, 198, 164, 0.42);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

#studentView .course-card h3 {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#studentView .course-card.selected h3 {
  font-size: 16px;
}

#studentView .course-card .meta {
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
}

#studentView .course-card-body {
  min-width: 0;
}

#studentView .course-card-body > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#studentView .course-card-body h3 {
  flex: 1 0 100%;
}

#studentView .course-card .lesson-action {
  justify-self: start;
  min-height: 30px;
  margin-top: 6px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

#studentView .course-card .lesson-action::before {
  width: 13px;
  height: 13px;
}

#studentView .course-card.selected .lesson-action {
  display: none;
}

.lesson-playing {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 24px;
  margin-top: 6px;
  padding: 0 9px;
  border: 1px solid rgba(214, 167, 86, 0.35);
  border-radius: 999px;
  color: #06100e;
  background: linear-gradient(135deg, #1be2bb, #d8b567);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#studentView .course-card:not(.selected) .badge,
#studentView .course-card:not(.selected) .meta span:last-child,
#studentView .course-card:not(.selected) .icon-button {
  display: none;
}

#studentView .course-card:not(.selected) .meta span:nth-child(n + 3) {
  display: none;
}

.lesson-number {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  border: 1px solid rgba(214, 167, 86, 0.3);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(214, 167, 86, 0.11);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
}

#studentView .meta,
#studentView .muted,
#studentView .field span {
  color: #b8c4bd;
}

#studentView .badge {
  color: #0b1715;
  background: linear-gradient(135deg, #1be2bb, #d8b567);
}

#studentView .badge.subtle {
  color: #f4dfad;
  border: 1px solid rgba(214, 167, 86, 0.28);
  background: rgba(214, 167, 86, 0.12);
}

#studentView .empty {
  border-color: rgba(255, 255, 255, 0.16);
  color: #b8c4bd;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.08), rgba(214, 167, 86, 0.08)),
    rgba(255, 255, 255, 0.04);
}

#studentView .player-toolbar {
  margin-bottom: 0;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#studentView .player-shell {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 154px);
  overflow: auto;
  scrollbar-color: rgba(214, 167, 86, 0.48) rgba(255, 255, 255, 0.08);
}

#studentView .video-stage {
  background:
    radial-gradient(circle at 32% 46%, rgba(22, 198, 164, 0.18), transparent 34%),
    radial-gradient(circle at 78% 30%, rgba(214, 167, 86, 0.14), transparent 30%),
    #050907;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.video-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08);
  opacity: 0.52;
  transform: scale(1.02);
}

.video-placeholder::before,
.video-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.video-placeholder::before {
  background:
    linear-gradient(115deg, rgba(5, 9, 7, 0.92) 0%, rgba(5, 9, 7, 0.46) 42%, rgba(5, 9, 7, 0.82) 100%),
    radial-gradient(circle at 62% 40%, rgba(22, 198, 164, 0.2), transparent 28%),
    radial-gradient(circle at 86% 72%, rgba(214, 167, 86, 0.28), transparent 30%);
  mix-blend-mode: normal;
}

.video-placeholder::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 9, 7, 0.08), rgba(5, 9, 7, 0.58));
  background-size: 18px 18px, 18px 18px, 100% 100%;
  opacity: 0.72;
}

.video-placeholder div {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-width: min(560px, calc(100% - 56px));
  padding: clamp(20px, 3vw, 34px) clamp(24px, 4vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7, 18, 15, 0.68), rgba(7, 10, 9, 0.56)),
    url("/media/student-player-poster.webp") center / cover,
    rgba(5, 9, 7, 0.62);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.video-placeholder div::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(4, 10, 9, 0.78), rgba(4, 10, 9, 0.42)),
    radial-gradient(circle at 72% 34%, rgba(214, 167, 86, 0.18), transparent 32%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 16px 16px, 16px 16px;
}

.video-placeholder div::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(22, 198, 164, 0.12);
}

.video-placeholder h3 {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.04;
}

.video-placeholder .eyebrow {
  margin-bottom: 12px;
  color: var(--gold);
}

.video-placeholder-note {
  max-width: 680px;
  margin: 14px auto 0;
  color: rgba(246, 241, 231, 0.82);
  font-size: 15px;
  line-height: 1.7;
}

#studentView .lesson-video {
  min-height: auto;
  max-height: min(64vh, 720px);
  background:
    linear-gradient(135deg, rgba(12, 20, 18, 0.96), rgba(42, 42, 42, 0.96)),
    #111b18;
}

#studentView .stream-frame {
  min-height: auto;
  max-height: min(64vh, 720px);
}

body:not(.is-open-live-room) #studentView .video-stage {
  width: 100%;
  height: clamp(620px, calc(100vh - 250px), 860px);
  height: clamp(620px, calc(100dvh - 250px), 860px);
  max-width: none;
  max-height: none;
  min-height: 560px;
  aspect-ratio: auto;
  margin-inline: auto;
  overflow: hidden;
}

body:not(.is-open-live-room) #studentView .video-stage .lesson-video,
body:not(.is-open-live-room) #studentView .video-stage .stream-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}

#studentView .player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(90deg, rgba(8, 16, 15, 0.82), rgba(8, 16, 15, 0.64)),
    url("/media/student-controls-strip.webp");
  background-size: cover;
  background-position: center;
}

#studentView .player-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex: 0 0 100%;
}

#studentView .player-progress[hidden] {
  display: none !important;
}

#studentView .player-progress input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
}

#studentView .player-progress span {
  min-width: 116px;
  color: rgba(246, 241, 231, 0.72);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

#studentView .video-stage[hidden],
#studentView .player-controls[hidden],
#studentView .lesson-service-grid[hidden] {
  display: none !important;
}

body.is-open-live-room #studentView #playerDescription {
  display: none;
}

/* Paid pseudo-live should visually reuse the public open-class live room.
   It intentionally keeps paid-course data/comments, but avoids the paid replay
   resize layout and normal player controls. */
body.is-open-live-room.is-paid-live-room #studentView .learning-layout,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .learning-layout {
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

body.is-open-live-room.is-paid-live-room #studentView .classroom-resize-handle,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .classroom-resize-handle {
  display: none !important;
}

body.is-open-live-room.is-paid-live-room #studentView .open-class-chat-aside,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .open-class-chat-aside {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: relative !important;
  top: auto !important;
  min-height: calc(100vh - 108px) !important;
  min-height: calc(100dvh - 108px) !important;
  max-height: calc(100vh - 108px) !important;
  max-height: calc(100dvh - 108px) !important;
  overflow: hidden !important;
}

body.is-open-live-room.is-paid-live-room #studentView .player-shell,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .player-shell {
  grid-column: 2 !important;
  grid-row: 1 !important;
  position: relative !important;
  top: auto !important;
  min-height: calc(100vh - 108px) !important;
  min-height: calc(100dvh - 108px) !important;
  max-height: none !important;
  overflow: visible !important;
}

body.is-open-live-room.is-paid-live-room #studentView .video-stage,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .video-stage,
body.is-open-live-room.is-paid-live-room #studentView .stream-frame,
body.is-open-live-room.is-paid-live-room #studentView .lesson-video,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .stream-frame,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .lesson-video {
  min-height: min(72vh, 760px) !important;
  max-height: none !important;
}

body.is-open-live-room.is-paid-live-room #studentView .lesson-video,
body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .lesson-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transform: none !important;
  transform-origin: center center !important;
}

@media (max-width: 1180px) {
  body.is-open-live-room.is-paid-live-room #studentView .learning-layout,
  body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .learning-layout {
    grid-template-columns: 1fr !important;
  }

  body.is-open-live-room.is-paid-live-room #studentView .player-shell,
  body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .player-shell {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-height: auto !important;
  }

  body.is-open-live-room.is-paid-live-room #studentView .open-class-chat-aside,
  body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .open-class-chat-aside {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-height: 560px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.is-open-live-room.is-paid-live-room #studentView .video-stage,
  body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .video-stage,
  body.is-open-live-room.is-paid-live-room #studentView .stream-frame,
  body.is-open-live-room.is-paid-live-room #studentView .lesson-video,
  body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .stream-frame,
  body.is-open-live-room #lessonWorkspace.is-paid-live-classroom .lesson-video {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }
}

#studentView .video-stage.is-stream + .player-controls #playToggle,
#studentView .video-stage.is-stream + .player-controls #speedToggle,
#studentView .video-stage.is-stream + .player-controls #captionToggle {
  display: none;
}

#studentView .video-stage.is-stream + .player-controls {
  justify-content: flex-end;
}

body:not(.is-open-live-room) #studentView .player-shell,
body:not(.is-open-live-room) #lessonWorkspace.is-paid-classroom .player-shell {
  max-height: none;
  overflow: visible;
}

body:not(.is-open-live-room) #studentView .lesson-service-grid,
body:not(.is-open-live-room) #lessonWorkspace.is-paid-classroom .lesson-service-grid {
  margin-top: clamp(36px, 8vh, 96px);
}

@media (min-width: 1181px) {
  body:not(.is-open-live-room) #studentView .player-shell,
  body:not(.is-open-live-room) #lessonWorkspace.is-paid-classroom .player-shell {
    min-height: calc(100vh - 108px);
    min-height: calc(100dvh - 108px);
  }

  body:not(.is-open-live-room) #studentView .video-stage,
  body:not(.is-open-live-room) #lessonWorkspace.is-paid-classroom .video-stage {
    height: clamp(660px, calc(100vh - 230px), 920px);
    height: clamp(660px, calc(100dvh - 230px), 920px);
    min-height: 640px;
    max-height: none;
    aspect-ratio: auto;
  }

  body:not(.is-open-live-room) #studentView .stream-frame,
  body:not(.is-open-live-room) #studentView .lesson-video,
  body:not(.is-open-live-room) #lessonWorkspace.is-paid-classroom .stream-frame,
  body:not(.is-open-live-room) #lessonWorkspace.is-paid-classroom .lesson-video {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }
}

#studentView .video-stage.is-stream + .player-controls .subtitle-control {
  margin-right: auto;
}

#studentView .video-stage.is-stream.is-stream-ready + .player-controls .subtitle-control {
  display: none;
}

#studentView .subtitle-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

#studentView .subtitle-control:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 167, 86, 0.42);
  background: rgba(214, 167, 86, 0.13);
}

#studentView .subtitle-control span {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#studentView .subtitle-control select {
  width: min(220px, 34vw);
  min-height: 34px;
  padding: 0 34px 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.28);
}

#studentView .subtitle-control select:disabled {
  color: rgba(244, 240, 231, 0.48);
}

#studentView .player-controls .secondary,
#studentView .course-list .secondary,
#studentView .player-shell .secondary {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

#studentView .player-controls .secondary:hover,
#studentView .course-list .secondary:hover {
  border-color: rgba(214, 167, 86, 0.42);
  background: rgba(214, 167, 86, 0.13);
}

#studentView .subtitle-field select {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

#studentView .player-shell > .muted {
  padding: 0 18px 14px;
}

.lesson-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.lesson-service-grid article {
  min-height: 112px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.08), rgba(214, 167, 86, 0.06)),
    rgba(255, 255, 255, 0.045);
}

.lesson-service-grid span {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-service-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.35;
}

.lesson-service-grid p {
  margin-top: 7px;
  color: #b8c4bd;
  font-size: 12px;
  line-height: 1.55;
}

.courseware-card {
  display: flex;
  flex-direction: column;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid rgba(214, 167, 86, 0.28);
  border-radius: 8px;
  color: #06100e;
  background: linear-gradient(135deg, #1be2bb, #d8b567);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.resource-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(22, 198, 164, 0.18);
}

.resource-link.is-disabled {
  color: #9ca8a2;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.waiting-room {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 4px 18px 18px;
  padding: 20px;
  border: 1px solid rgba(27, 226, 187, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(5, 12, 10, 0.86), rgba(8, 24, 20, 0.72) 48%, rgba(10, 23, 18, 0.9)),
    url("/media/open-class-waiting-room-bg.webp") center right / cover no-repeat,
    radial-gradient(circle at top right, rgba(27, 226, 187, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(8, 24, 20, 0.96), rgba(20, 43, 34, 0.94));
  color: #f2fff9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -80px 120px rgba(2, 7, 6, 0.34);
}

.waiting-room::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(214, 167, 86, 0.18) 43%, transparent 47%),
    radial-gradient(circle at 82% 32%, rgba(214, 167, 86, 0.22), transparent 30%);
  opacity: 0.72;
  pointer-events: none;
}

.waiting-room h3 {
  margin-top: 4px;
  color: #ffffff;
  font-size: 26px;
}

.waiting-room p:not(.eyebrow) {
  margin-top: 8px;
  color: rgba(242, 255, 249, 0.78);
}

.waiting-countdown {
  display: grid;
  place-items: center;
  min-width: 150px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.waiting-countdown strong {
  color: #1be2bb;
  font-family: var(--font-ui);
  font-size: 26px;
  line-height: 1.18;
  text-align: center;
}

.waiting-countdown span {
  color: rgba(242, 255, 249, 0.68);
  font-size: 13px;
}

.classroom-comments {
  margin: 0 18px 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.comment-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}

.comment-compose {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-compose.is-disabled {
  opacity: 0.56;
}

.comment-compose.is-disabled input,
.comment-compose.is-disabled button {
  cursor: not-allowed;
}

.comment-compose label {
  display: block;
}

.comment-compose input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
}

.comment-reply-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(27, 226, 187, 0.24);
  border-left: 3px solid #1be2bb;
  border-radius: 8px;
  background: rgba(27, 226, 187, 0.08);
}

.comment-reply-preview[hidden] {
  display: none;
}

.comment-reply-preview div {
  min-width: 0;
}

.comment-reply-preview span {
  display: block;
  color: #9df3df;
  font-size: 12px;
  font-weight: 800;
}

.comment-reply-preview p {
  overflow: hidden;
  margin-top: 3px;
  color: #dbe7e1;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-reply-preview button,
.comment-reply-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #dbe7e1;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 94px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: rgba(27, 226, 187, 0.36) rgba(255, 255, 255, 0.06);
}

.emoji-row button {
  flex: 0 0 40px;
  width: 40px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
}

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

.comment-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  background: rgba(244, 247, 245, 0.08);
}

.comment-item:hover .comment-reply-button,
.comment-item:focus-within .comment-reply-button {
  opacity: 1;
}

.comment-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #07110f;
  font-size: 13px;
  font-weight: 900;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-avatar.has-image {
  background: rgba(255, 255, 255, 0.08);
}

.comment-item strong {
  display: block;
  color: #1be2bb;
  font-size: 13px;
}

.comment-item p {
  margin-top: 4px;
  color: #dbe7e1;
}

.comment-reply-button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 28px;
  opacity: 0;
}

.comment-reply-quote {
  display: grid;
  gap: 3px;
  margin: 7px 0 6px;
  padding: 7px 9px;
  border-left: 3px solid rgba(27, 226, 187, 0.56);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}

.comment-reply-quote span {
  color: #9df3df;
  font-size: 12px;
  font-weight: 800;
}

.comment-reply-quote em {
  overflow: hidden;
  color: rgba(219, 231, 225, 0.86);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (hover: none) {
  .comment-reply-button {
    opacity: 1;
  }
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: #63716b;
  font-size: 13px;
  font-weight: 800;
}

.login-panel .field span {
  color: #d3ddd7;
}

.field.compact {
  min-width: 150px;
  margin-bottom: 0;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(22, 33, 29, 0.14);
  border-radius: 8px;
  padding: 12px 13px;
  color: #16211d;
  background: #fff;
  color-scheme: light;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-panel input {
  color: #f8f4ea;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(22, 198, 164, 0.13);
}

textarea {
  resize: vertical;
}

.grid {
  display: grid;
  gap: 12px;
}

[hidden],
.is-hidden,
.collection-type-fields[hidden] {
  display: none !important;
}

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

.collection-flow {
  display: grid;
  gap: 14px;
}

.flow-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 143, 120, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(22, 198, 164, 0.08), rgba(220, 184, 82, 0.08));
}

.flow-step > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #09211b;
  background: linear-gradient(135deg, var(--brand), var(--gold));
  font-weight: 900;
}

.flow-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.flow-step p {
  margin: 0;
  color: rgba(22, 33, 29, 0.68);
  line-height: 1.5;
}

.inline-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-shortcuts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed rgba(15, 143, 120, 0.26);
  border-radius: 8px;
  background: rgba(15, 143, 120, 0.05);
  color: rgba(22, 33, 29, 0.68);
}

.recorded-live-schedule {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fbfdfb;
}

.recorded-live-schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recorded-live-schedule-head strong {
  color: #111716;
  font-size: 18px;
}

.recorded-live-grid {
  display: grid;
  grid-template-columns: 76px 1.2fr 160px 150px 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.schedule-grid-head {
  padding: 10px 12px;
  color: #63716b;
  border-radius: 8px;
  background: rgba(22, 33, 29, 0.06);
  font-size: 13px;
  font-weight: 900;
}

.schedule-grid-row {
  padding: 10px 12px;
  border: 1px solid rgba(22, 33, 29, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.schedule-grid-row strong {
  color: #111716;
}

.schedule-grid-row span {
  color: #63716b;
  font-size: 13px;
  line-height: 1.45;
}

.schedule-grid-row input,
.schedule-grid-row select {
  min-height: 42px;
  padding: 9px 10px;
}

.open-class-schedule-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.open-class-schedule-preview span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed rgba(15, 143, 120, 0.24);
  border-radius: 8px;
  color: #63716b;
  background: rgba(15, 143, 120, 0.05);
  font-size: 13px;
}

.open-class-schedule-preview strong {
  color: #111716;
}

.open-class-schedule-preview em {
  color: #0f8f78;
  font-style: normal;
  font-size: 12px;
}

.open-class-collection-settings {
  margin-bottom: 16px;
}

.open-class-cover-editor {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.open-class-cover-editor > img,
.open-class-session-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  object-fit: cover;
  background: #eef4f1;
}

.open-class-session-list {
  display: grid;
  gap: 12px;
}

.open-class-session-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.open-class-session-cover {
  display: grid;
  gap: 8px;
  align-self: start;
}

.open-class-session-cover strong {
  color: #111716;
  font-size: 18px;
}

.open-class-session-fields {
  min-width: 0;
}

.subtitle-binding-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dropzone {
  display: grid;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 18px;
  border: 1px dashed rgba(15, 143, 120, 0.42);
  border-radius: 8px;
  background: rgba(15, 143, 120, 0.07);
  cursor: pointer;
}

.compact-dropzone {
  margin-top: -6px;
  border-color: rgba(214, 167, 86, 0.38);
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.05), rgba(214, 167, 86, 0.09)),
    #fbfdfb;
}

.asset-library-panel {
  min-height: 620px;
  padding: 0;
  overflow: hidden;
}

.asset-upload-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
}

.asset-upload-modal[hidden] {
  display: none;
}

.asset-upload-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 8, 0.58);
}

.asset-upload-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 48px));
  margin: 8vh auto 0;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.asset-upload-head,
.asset-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.08);
}

.asset-upload-actions {
  justify-content: center;
  border-top: 1px solid rgba(22, 33, 29, 0.08);
  border-bottom: 0;
}

.asset-upload-head h2 {
  font-size: 22px;
  color: #1d2723;
}

.asset-upload-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.asset-dropzone {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed rgba(22, 33, 29, 0.28);
  border-radius: 8px;
  background: #fbfcfb;
  color: #7a8580;
  text-align: center;
  cursor: pointer;
}

.asset-dropzone input {
  max-width: 280px;
}

.asset-dropzone strong {
  margin-top: 10px;
  color: #2d3733;
  font-size: 17px;
}

.asset-list {
  display: block;
}

.asset-center {
  display: grid;
  background: #fff;
}

.asset-center-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.08);
}

.asset-center-tab {
  position: relative;
  min-height: 58px;
  padding: 0 0;
  border: 0;
  border-radius: 0;
  color: #3f4945;
  background: transparent;
  font-size: 16px;
}

.asset-center-tab.is-active {
  color: #1769ff;
  font-weight: 900;
}

.asset-center-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #1769ff;
}

.asset-center-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 620px;
}

.asset-group-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 16px;
  border-right: 1px solid rgba(22, 33, 29, 0.08);
  background: #fbfcfb;
}

.asset-group-search input,
.asset-search-input,
.asset-date-filter input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 6px;
  background: #fff;
}

.asset-group-count,
.asset-total-line {
  margin: 0;
  color: #67736e;
  font-weight: 800;
}

.asset-group-list {
  display: grid;
  max-height: 520px;
  overflow: auto;
  border-top: 1px solid rgba(22, 33, 29, 0.06);
  padding-top: 8px;
}

.asset-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  color: #39443f;
  background: transparent;
  text-align: left;
}

.asset-group-item.is-active,
.asset-group-item:hover {
  color: #1e293b;
  background: #edf6ff;
}

.asset-group-item strong {
  color: #9aa3a0;
}

.asset-table-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  min-width: 0;
}

.asset-storage-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(214, 167, 86, 0.5);
  border-radius: 6px;
  color: #5d5040;
  background: #fff8ec;
}

.asset-storage-notice span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: #d6a756;
  font-weight: 900;
}

.asset-storage-notice p {
  margin: 0;
}

.asset-toolbar,
.asset-toolbar-left,
.asset-toolbar-right,
.asset-status-tabs,
.asset-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.asset-toolbar {
  justify-content: space-between;
}

.asset-toolbar-right {
  justify-content: flex-end;
}

.asset-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #47534e;
  font-weight: 800;
}

.asset-date-filter input {
  width: 220px;
}

.asset-search-input {
  width: min(300px, 100%);
}

.asset-status-tabs {
  justify-content: flex-end;
}

.asset-status-tabs button {
  min-height: 36px;
  padding: 0 18px;
  border-color: rgba(22, 33, 29, 0.1);
  border-radius: 0;
  background: #fff;
}

.asset-status-tabs button.is-active {
  color: #1769ff;
  border-color: #1769ff;
  font-weight: 900;
}

.asset-sort-select {
  min-height: 36px;
  border: 0;
  color: #26302c;
  font-weight: 800;
  background: transparent;
}

.asset-table-wrap {
  overflow: auto;
  border: 1px solid rgba(22, 33, 29, 0.08);
  border-radius: 6px;
}

.asset-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.asset-table th,
.asset-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.08);
  color: #3e4945;
  text-align: left;
  vertical-align: middle;
}

.asset-table th {
  color: #1f2925;
  background: #f5f7f6;
  font-weight: 900;
}

.asset-file-cell {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.asset-file-cell strong,
.asset-file-cell span,
.asset-file-cell em {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-file-cell strong {
  color: #2c3632;
  font-size: 15px;
}

.asset-file-cell span,
.asset-file-cell em {
  color: #8a9490;
  font-size: 12px;
  font-style: normal;
}

.asset-thumb {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  color: #06100e;
  background: linear-gradient(135deg, rgba(22, 198, 164, 0.22), rgba(214, 167, 86, 0.2));
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 900;
}

.asset-thumb.subtitle {
  background: linear-gradient(135deg, rgba(214, 167, 86, 0.24), rgba(255, 255, 255, 0.76));
}

.asset-thumb.courseware {
  background: linear-gradient(135deg, rgba(214, 109, 92, 0.18), rgba(214, 167, 86, 0.22));
}

.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #18b66b;
}

.asset-status-dot.is-missing {
  background: #d6a756;
}

.asset-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.asset-row-actions button,
.asset-row-actions a {
  min-height: 0;
  padding: 0;
  border: 0;
  color: #1769ff;
  background: transparent;
  font-weight: 900;
  text-decoration: none;
}

.asset-row-actions button:disabled {
  color: #9aa3a0;
}

.asset-pagination {
  justify-content: flex-end;
  padding-top: 4px;
}

.asset-pagination button,
.asset-pagination select {
  min-height: 36px;
  border-radius: 6px;
  background: #fff;
}

.asset-pagination button.is-active {
  color: #fff;
  border-color: #1769ff;
  background: #1769ff;
}

.asset-preview-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
}

.asset-preview-body {
  margin-top: 14px;
}

.asset-preview-image {
  display: block;
  width: min(760px, 100%);
  max-height: 430px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  object-fit: contain;
  background: #f4f7f5;
}

.asset-preview-text {
  max-height: 430px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: #0f1714;
  color: #f3fff9;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.admin-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.1);
}

.admin-panel-head h2 {
  color: #111716;
  font-size: 28px;
}

.mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mode-picker label {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 8px;
  background: #f8faf8;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mode-picker label:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 143, 120, 0.28);
  box-shadow: 0 12px 26px rgba(38, 55, 47, 0.1);
}

.mode-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-picker label:has(input:checked) {
  border-color: rgba(15, 143, 120, 0.5);
  background: linear-gradient(135deg, rgba(22, 198, 164, 0.12), rgba(214, 167, 86, 0.12));
  box-shadow: inset 0 0 0 1px rgba(15, 143, 120, 0.16);
}

.mode-picker span {
  color: #111716;
  font-weight: 900;
}

.mode-picker small {
  color: #63716b;
  line-height: 1.45;
}

.open-course-fields {
  transition: opacity 180ms ease, filter 180ms ease;
}

.open-course-fields.is-disabled {
  opacity: 0.52;
  filter: grayscale(0.7);
}

.admin-courses {
  background:
    linear-gradient(180deg, rgba(22, 198, 164, 0.06), transparent 220px),
    #ffffff;
}

.admin-course-card {
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(22, 198, 164, 0.06), rgba(214, 167, 86, 0.05)),
    #ffffff;
}

.admin-course-cover {
  width: 118px;
  aspect-ratio: 16 / 10;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(22, 33, 29, 0.12);
  box-shadow: 0 12px 24px rgba(21, 35, 30, 0.12);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.timeline-grid span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: #36443f;
  font-size: 13px;
}

.timeline-grid strong {
  color: var(--brand-dark);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.dropzone span {
  color: #63716b;
  font-size: 13px;
}

.subtitle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field.file input {
  padding: 9px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.admin-schedule-row {
  grid-template-columns: minmax(120px, 0.8fr) repeat(3, minmax(150px, 1fr)) auto;
}

.wizard-step,
.schedule-preset-preview,
.access-preview {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 8px;
  background: #f7faf8;
}

.wizard-step {
  grid-template-columns: 32px 1fr;
  align-items: start;
}

.wizard-step > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2fd8b6, #d7bf62);
  color: #10201b;
  font-weight: 900;
}

.wizard-step strong,
.schedule-preset-preview strong,
.access-preview strong {
  color: #16211d;
  font-weight: 900;
}

.wizard-step p,
.schedule-preset-preview span,
.access-preview span {
  margin: 0;
  color: #63716b;
  line-height: 1.45;
}

.student-access-wizard {
  gap: 14px;
}

[hidden] {
  display: none !important;
}

.empty {
  padding: 24px;
  border: 1px dashed rgba(22, 33, 29, 0.16);
  border-radius: 8px;
  color: #63716b;
  text-align: center;
}

.wide {
  width: 100%;
}

@media (max-width: 1180px) {
  .program-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 420px));
  }

  .recorded-live-grid {
    grid-template-columns: 70px 1fr 150px 140px;
  }

  .recorded-live-grid > :nth-child(5),
  .recorded-live-grid > :nth-child(6) {
    display: none;
  }

  #studentView .learning-layout {
    grid-template-columns: 1fr;
  }

  body.is-open-live-room #studentView .learning-layout {
    grid-template-columns: 1fr;
  }

  body.is-paid-classroom-room #studentView .learning-layout,
  #lessonWorkspace.is-paid-classroom .learning-layout {
    grid-template-columns: 1fr;
  }

  body.is-paid-classroom-room #studentView .classroom-resize-handle,
  #lessonWorkspace.is-paid-classroom .classroom-resize-handle {
    display: none;
  }

  body.is-paid-classroom-room #studentView .player-shell,
  #lessonWorkspace.is-paid-classroom .player-shell {
    grid-column: 1;
    grid-row: 1;
    min-height: auto;
  }

  body.is-paid-classroom-room #studentView .open-class-chat-aside,
  #lessonWorkspace.is-paid-classroom .open-class-chat-aside {
    grid-column: 1;
    grid-row: 2;
    min-height: 560px;
    max-height: none;
  }

  body.is-open-live-room #studentView .player-shell {
    order: 1;
    min-height: auto;
  }

  body.is-open-live-room #studentView .video-stage {
    min-height: 0;
  }

  body.is-open-live-room #studentView .stream-frame,
  body.is-open-live-room #studentView .lesson-video {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  body.is-open-live-room #studentView .open-class-chat-aside {
    order: 2;
    min-height: 560px;
    max-height: none;
  }

  #studentView .course-list,
  #studentView .player-shell {
    position: relative;
    top: auto;
    max-height: none;
  }

  #studentView #studentCourses {
    max-height: 420px;
  }
}

@media (max-width: 1040px) {
  .home-hero,
  .feature-grid,
  .admin-console,
  .admin-dashboard,
	  .asset-dashboard,
	  .ops-grid,
	  .module-grid,
	  .analytics-report-grid,
	  .analytics-detail-grid,
	  .program-card,
  .learning-hero,
  .learning-layout,
  .admin-layout,
  .asset-layout {
    grid-template-columns: 1fr;
  }

  .learning-hero,
  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-stats {
    justify-content: flex-start;
  }

  .lesson-service-grid {
    grid-template-columns: 1fr;
  }

  .recorded-live-grid,
  .open-class-schedule-preview,
  .open-class-cover-editor,
  .open-class-session-card {
    grid-template-columns: 1fr;
  }

  .schedule-grid-head {
    display: none;
  }

  .schedule-grid-row {
    align-items: stretch;
  }

  .admin-sidebar {
    position: static;
  }

  .asset-center-body {
    grid-template-columns: 1fr;
  }

  .asset-group-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(22, 33, 29, 0.08);
  }

  .asset-group-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-height: 220px;
  }

  .program-card img {
    height: auto;
    min-height: 0;
  }

  .program-card > div {
    padding: 0;
  }

  .login-panel {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .topbar {
    top: 0;
    width: 100%;
    margin: 0;
    border-inline: 0;
    border-top: 0;
    border-radius: 0;
  }

  .topbar,
  .section-head,
  .player-toolbar,
  .band-title {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    padding: 0 10px;
  }

  .home-hero {
    min-height: auto;
    padding: 24px;
  }

  .hero-copy h2 {
    font-size: 44px;
  }

  .program-card {
    max-width: none;
    min-height: 0;
    padding: 12px;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .program-card h3 {
    font-size: 24px;
  }

  .program-card > div {
    min-height: 204px;
  }

  .learning-hero {
    min-height: auto;
    padding: 22px;
  }

  .learning-hero h2 {
    font-size: 42px;
  }

  #studentView .subtitle-control {
    width: 100%;
    justify-content: space-between;
  }

  #studentView .subtitle-control select {
    width: min(100%, 220px);
  }

  .detail-panel .tool-list {
    grid-template-columns: 1fr;
  }

  .grid.two,
  .subtitle-grid,
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .mode-picker,
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  #studentView {
    margin: -24px -20px -56px;
    padding: 28px 20px 52px;
  }

  #studentView .lesson-video {
    max-height: none;
  }

  #studentView .stream-frame {
    max-height: none;
  }

  body:not(.is-open-live-room) #studentView .video-stage {
    width: 100%;
    max-width: none;
  }

  body.is-open-live-room #studentView .video-stage,
  body.is-paid-classroom-room #studentView .video-stage,
  #lessonWorkspace.is-paid-classroom .video-stage,
  body.is-open-live-room #studentView .stream-frame,
  body.is-paid-classroom-room #studentView .stream-frame,
  #lessonWorkspace.is-paid-classroom .stream-frame,
  body.is-open-live-room #studentView .lesson-video,
  body.is-paid-classroom-room #studentView .lesson-video,
  #lessonWorkspace.is-paid-classroom .lesson-video {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  body.is-open-live-room #studentView .open-live-tools {
    align-items: stretch;
    flex-direction: column;
  }

  body.is-paid-classroom-room #studentView .open-live-tools,
  #lessonWorkspace.is-paid-classroom .open-live-tools {
    align-items: stretch;
    flex-direction: column;
  }

  body.is-open-live-room #studentView .open-live-tools .live-fullscreen {
    width: 100%;
    margin-left: 0;
  }

  body.is-paid-classroom-room #studentView .open-live-tools .live-fullscreen,
  #lessonWorkspace.is-paid-classroom .open-live-tools .live-fullscreen {
    width: 100%;
    margin-left: 0;
  }

  body.is-paid-classroom-room #lessonWorkspace,
  #lessonWorkspace.is-paid-classroom {
    min-height: auto;
  }

  body.is-paid-classroom-room #studentView .back-button,
  #lessonWorkspace.is-paid-classroom .back-button {
    width: fit-content;
  }

  body.is-paid-classroom-room #studentView .learning-layout,
  #lessonWorkspace.is-paid-classroom .learning-layout {
    gap: 14px;
  }

  body.is-paid-classroom-room #studentView .player-shell,
  #lessonWorkspace.is-paid-classroom .player-shell {
    border-radius: 0;
    width: 100%;
    min-width: 0;
  }

  body.is-paid-classroom-room #studentView .player-toolbar,
  #lessonWorkspace.is-paid-classroom .player-toolbar {
    padding: 14px 16px;
    min-width: 0;
  }

  body.is-paid-classroom-room #studentView .player-toolbar h2,
  #lessonWorkspace.is-paid-classroom .player-toolbar h2 {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.12;
  }

  body.is-paid-classroom-room #studentView .open-live-tools,
  #lessonWorkspace.is-paid-classroom .open-live-tools {
    padding: 10px 14px 12px;
    min-width: 0;
  }

  body.is-paid-classroom-room #studentView .open-live-tools .subtitle-control,
  #lessonWorkspace.is-paid-classroom .open-live-tools .subtitle-control {
    width: 100%;
    min-width: 0;
  }

  body.is-paid-classroom-room #studentView .open-live-tools select,
  #lessonWorkspace.is-paid-classroom .open-live-tools select {
    width: 100%;
    min-width: 0;
  }

  body.is-paid-classroom-room #studentView .video-stage,
  #lessonWorkspace.is-paid-classroom .video-stage {
    overflow: hidden;
  }

  body.is-paid-classroom-room #studentView .open-class-chat-aside,
  #lessonWorkspace.is-paid-classroom .open-class-chat-aside,
  body.is-paid-classroom-room #studentView .comment-item,
  #lessonWorkspace.is-paid-classroom .comment-item {
    min-width: 0;
  }

  body.is-paid-classroom-room #studentView .comment-item p,
  #lessonWorkspace.is-paid-classroom .comment-item p {
    overflow-wrap: anywhere;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room .player-toolbar {
    padding: 18px 20px;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room .player-toolbar h2 {
    font-size: clamp(28px, 7vw, 38px);
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room #openClassWaitingRoom {
    padding: 0;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room #openClassWaitingRoom.waiting-room,
  body.is-open-live-room #studentView .player-shell.is-replay-processing #openClassWaitingRoom.waiting-room {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 18px;
    padding: 24px 22px;
    align-content: start;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room h3,
  body.is-open-live-room #studentView .player-shell.is-replay-processing h3 {
    max-width: none;
    font-size: clamp(28px, 8.5vw, 40px);
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room p:not(.eyebrow),
  body.is-open-live-room #studentView .player-shell.is-replay-processing p:not(.eyebrow) {
    max-width: none;
    font-size: 16px;
    line-height: 1.5;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room .waiting-countdown,
  body.is-open-live-room #studentView .player-shell.is-replay-processing .waiting-countdown {
    position: static;
    min-width: 0;
    width: 100%;
    padding: 16px 18px;
  }

  body.is-open-live-room #studentView .player-shell.is-waiting-room .waiting-countdown strong,
  body.is-open-live-room #studentView .player-shell.is-replay-processing .waiting-countdown strong {
    font-size: clamp(32px, 10vw, 46px);
    white-space: normal;
  }

  body.is-open-live-room #studentView .player-shell:fullscreen .video-stage,
  body.is-open-live-room #studentView .player-shell:fullscreen .stream-frame,
  body.is-open-live-room #studentView .player-shell:fullscreen .lesson-video,
  body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .video-stage,
  body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .stream-frame,
  body.is-open-live-room #studentView .player-shell.is-inline-fullscreen .lesson-video {
    height: 100% !important;
    aspect-ratio: auto !important;
  }

  body.is-open-live-room #studentView .open-class-chat-aside {
    min-height: 620px;
    overflow: visible;
  }

  body.is-paid-classroom-room #studentView .open-class-chat-aside,
  #lessonWorkspace.is-paid-classroom .open-class-chat-aside {
    min-height: 620px;
    overflow: visible;
  }

  body.is-open-live-room #studentView .open-class-chat-aside .classroom-comments {
    display: block;
  }

  body.is-paid-classroom-room #studentView .open-class-chat-aside .classroom-comments,
  #lessonWorkspace.is-paid-classroom .open-class-chat-aside .classroom-comments {
    display: block;
  }

  body.is-open-live-room #studentView .open-class-chat-aside .comment-list {
    overflow: visible;
    overscroll-behavior: auto;
  }

  body.is-paid-classroom-room #studentView .open-class-chat-aside .comment-list,
  #lessonWorkspace.is-paid-classroom .open-class-chat-aside .comment-list {
    overflow: visible;
    overscroll-behavior: auto;
  }

  #studentView .course-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 92px;
  }

  #studentView .course-card:not(.selected) .badge {
    display: inline-flex;
  }

  #studentView .player-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
