:root {
  --bg: #071a2f;
  --panel: rgba(255, 255, 255, 0.055);
  --panel2: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.11);
  --gold: #f2c14e;
  --gold2: #ffd77a;
  --text: #edf5ff;
  --muted: rgba(237, 245, 255, 0.68);
  --green: #67d7a1;
  --red: #ff8b8b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      900px 450px at 80% -10%,
      rgba(242, 193, 78, 0.17),
      transparent 60%
    ),
    radial-gradient(
      800px 500px at 10% 10%,
      rgba(0, 157, 255, 0.11),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
  font-family: "Tajawal", system-ui, sans-serif;
}
.shell {
  width: min(1220px, calc(100% - 28px));
  margin: auto;
  padding: 22px 0 80px;
}
.topbar,
.section-head,
.builder-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.topbar {
  margin-bottom: 16px;
}
.topbar h1 {
  margin: 2px 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.topbar p,
.section-head p,
.builder-head p,
.dialog-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.eyebrow {
  color: var(--gold);
  font-weight: 900;
  font-size: 0.78rem;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}
.scope-panel {
  margin-bottom: 14px;
}
.section-head h2,
.builder-head h3,
.dialog-head h2 {
  margin: 0;
  color: var(--gold2);
}
.section-head.compact {
  margin-bottom: 16px;
}
.step {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(242, 193, 78, 0.13);
  border: 1px solid rgba(242, 193, 78, 0.3);
  color: var(--gold2);
  font-weight: 900;
  margin-left: 8px;
}
.scope-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.span-2 {
  grid-column: 1/-1;
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(242, 193, 78, 0.55);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.08);
}
select option {
  color: #111;
}
.scope-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(242, 193, 78, 0.08);
  border: 1px solid rgba(242, 193, 78, 0.2);
  color: var(--gold2);
  font-weight: 800;
}
.ghost-btn,
.secondary-btn,
.primary-btn,
.text-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}
.ghost-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--text);
}
.primary-btn {
  width: 100%;
  padding: 13px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #102239;
  margin-top: 14px;
}
.text-btn {
  background: none;
  color: var(--gold);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.metrics article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel2);
  padding: 14px;
}
.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.metrics strong {
  display: block;
  color: var(--gold2);
  font-size: 1.55rem;
  margin-top: 5px;
}
.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-bottom: 12px;
}
.tab {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.tab.is-active {
  background: rgba(242, 193, 78, 0.12);
  border-color: rgba(242, 193, 78, 0.34);
  color: var(--gold2);
}
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 14px;
}
.creator-panel,
.tasks-panel {
  min-width: 0;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 16px 0 0;
  padding: 12px;
}
legend {
  padding: 0 8px;
  color: var(--gold2);
  font-weight: 900;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.choice input {
  width: auto;
  margin-top: 4px;
}
.choice b,
.choice small,
.switch-row b,
.switch-row small {
  display: block;
}
.choice b,
.switch-row b {
  color: var(--text);
}
.choice small,
.switch-row small {
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}
.questions-builder {
  margin-top: 16px;
  border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 18px;
  padding: 13px;
  background: rgba(242, 193, 78, 0.045);
}
.question-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.13);
}
.question-top {
  display: grid;
  grid-template-columns: 1fr 130px 90px auto;
  gap: 8px;
}
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.remove-question {
  border: 0;
  background: rgba(255, 80, 80, 0.12);
  color: #ffb1b1;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
}
.points-summary {
  margin-top: 10px;
  color: var(--gold2);
  font-weight: 900;
}
.points-summary.is-wrong {
  color: var(--red);
}
.switch-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
}
.switch-row input {
  width: auto;
  margin-top: 4px;
}
.message {
  min-height: 22px;
  margin-top: 10px;
  font-weight: 800;
}
.message.error {
  color: #ffb1b1;
}
.message.success {
  color: var(--green);
}
.small-select {
  width: auto;
  min-width: 140px;
}
.tasks-list {
  display: grid;
  gap: 10px;
}
.task-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.13);
}
.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.task-card h3 {
  margin: 0;
  color: var(--text);
}
.task-card p {
  color: var(--muted);
  line-height: 1.6;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.chip {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(242, 193, 78, 0.19);
  background: rgba(242, 193, 78, 0.07);
  color: var(--gold2);
}
.status {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(103, 215, 161, 0.1);
  color: var(--green);
  border: 1px solid rgba(103, 215, 161, 0.24);
}
.status.draft {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.status.closed {
  color: #ffb1b1;
  background: rgba(255, 80, 80, 0.08);
  border-color: rgba(255, 80, 80, 0.2);
}
.task-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  border: 1px dashed var(--line);
  border-radius: 18px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}
th,
td {
  text-align: right;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--gold2);
}
td {
  color: var(--muted);
}
.analytics-bars {
  display: grid;
  gap: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 70px;
  gap: 10px;
  align-items: center;
}
.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
}
dialog {
  width: min(950px, calc(100% - 24px));
  max-height: 88vh;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0a2038;
  color: var(--text);
  padding: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.5rem;
}
.roster-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.student-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 130px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
}
.student-name strong,
.student-name small {
  display: block;
}
.student-name small {
  color: var(--muted);
  margin-top: 3px;
}
.save-grade {
  padding: 10px 13px;
  border: 0;
  border-radius: 13px;
  background: rgba(242, 193, 78, 0.13);
  border: 1px solid rgba(242, 193, 78, 0.3);
  color: var(--gold2);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(7, 26, 47, 0.92);
}
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(242, 193, 78, 0.2);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 900px) {
  .task-layout {
    grid-template-columns: 1fr;
  }
  .scope-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .shell {
    width: min(100% - 18px, 1220px);
    padding-top: 12px;
  }
  .topbar,
  .section-head,
  .builder-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .scope-grid,
  .form-grid,
  .choice-grid,
  .choice-grid.two,
  .options-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .question-top {
    grid-template-columns: 1fr;
  }
  .student-row {
    grid-template-columns: 1fr;
  }
  .small-select {
    width: 100%;
  }
}

/* Participation bank */
.bank-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.bank-tools input {
  min-width: 220px;
  flex: 1;
}
.bank-card {
  border-color: rgba(242, 193, 78, 0.2);
}
.bank-card .task-actions {
  justify-content: flex-start;
}
.bank-card .primary-btn {
  width: auto;
  margin: 0;
}
.bank-card .text-btn {
  color: #ffb4b4;
}
@media (max-width: 680px) {
  .bank-tools {
    width: 100%;
  }
  .bank-tools input,
  .bank-tools select {
    width: 100%;
  }
  .bank-card .task-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .bank-card .primary-btn,
  .bank-card .text-btn {
    width: 100%;
  }
}

/* Automatic grading question builder layout fix */
.questions-builder,
.question-card,
.question-card * {
  min-width: 0;
}
.question-card {
  overflow: hidden;
  padding: 14px;
}
.question-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.question-number {
  color: var(--gold2);
  font-weight: 900;
}
.question-text-field {
  display: grid;
  gap: 7px;
}
.question-text-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 110px;
  resize: vertical;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.question-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  gap: 10px;
  margin-top: 10px;
}
.question-options-title {
  margin-top: 14px;
  color: var(--gold2);
  font-weight: 900;
  font-size: 0.84rem;
}
.options-grid {
  align-items: start;
}
.option-field {
  min-width: 0;
}
.option-input-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.option-input-row .correct-option {
  width: 18px;
  min-width: 18px;
  margin: 0;
}
.option-input-row .q-option {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.option-input-row .q-option[readonly] {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.055);
  cursor: default;
}
.remove-question {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
@media (max-width: 620px) {
  .question-settings {
    grid-template-columns: 1fr;
  }
  .question-text-field textarea {
    min-height: 130px;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .option-input-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.period-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 6px;
  border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.14);
}
.period-tabs[hidden] {
  display: none !important;
}
.period-tab {
  flex: 1;
  min-width: 140px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 14px;
  background: transparent;
  color: var(--muted);
  font:
    800 14px "Tajawal",
    sans-serif;
  cursor: pointer;
}
.period-tab.is-active {
  color: var(--gold2);
  border-color: rgba(242, 193, 78, 0.35);
  background: rgba(242, 193, 78, 0.1);
}

/* Dual progress indicators */
.progress-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.progress-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.16);
  min-width: 0;
}
.progress-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.progress-card-head span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}
.progress-card-head strong {
  display: block;
  color: var(--gold2);
  font-size: 1.45rem;
  margin-top: 4px;
}
.progress-card-head b {
  max-width: 48%;
  color: var(--text);
  font-size: 0.82rem;
  text-align: left;
}
.dual-progress {
  --pass: 50%;
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin: 14px 0 9px;
}
.danger-zone {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pass);
  background: rgba(239, 83, 80, 0.38);
}
.success-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #3eaa72, #65d7a1);
  border-radius: inherit;
  z-index: 2;
  transition: width 0.35s ease;
}
.pass-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--pass);
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  z-index: 3;
}
.progress-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.analytics-subtitle {
  color: var(--gold2);
  margin: 18px 0 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.grade-scale-rows {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}
.grade-scale-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
}
@media (max-width: 700px) {
  .progress-cards,
  .settings-grid,
  .grade-scale-row {
    grid-template-columns: 1fr;
  }
  .progress-card-head {
    flex-direction: column;
  }
  .progress-card-head b {
    max-width: none;
    text-align: right;
  }
}
.progress-card.is-interactive {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}
.progress-card.is-interactive:hover,
.progress-card.is-interactive:focus-visible,
.progress-card.is-interactive.is-open {
  border-color: rgba(242, 193, 78, 0.42);
  background: rgba(242, 193, 78, 0.07);
  transform: translateY(-1px);
  outline: none;
}
.progress-card-hint {
  display: block;
  margin-top: 9px;
  color: var(--gold2);
  font-weight: 800;
}
.student-grade-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 20px;
  background: rgba(242, 193, 78, 0.035);
}
.student-grade-details[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .student-grade-details {
    grid-template-columns: 1fr;
  }
}

.course-chart-section {
  margin-top: 16px;
  border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.14);
  padding: 16px;
  overflow: hidden;
}
.course-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.course-chart-head h2,
.course-chart-head h3 {
  margin: 0 0 4px;
  color: var(--gold, #f2c14e);
}
.course-chart-head p {
  margin: 0;
  color: var(--muted, rgba(233, 241, 255, 0.7));
  font-size: 0.86rem;
}
.progress-line-chart {
  width: 100%;
  min-height: 310px;
  overflow: hidden;
}
.progress-line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
}
.chart-grid {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}
.chart-axis-text {
  fill: rgba(233, 241, 255, 0.66);
  font-size: 11px;
  font-family: Tajawal, sans-serif;
}
.chart-pass-line {
  stroke: #f2c14e;
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}
.chart-series {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-point {
  stroke: rgba(7, 26, 47, 0.9);
  stroke-width: 2;
}
.chart-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.chart-legend button,
.chart-legend span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.8rem;
}
.chart-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.chart-insight {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.chart-insight span {
  display: block;
  color: var(--muted, rgba(233, 241, 255, 0.7));
  font-size: 0.76rem;
}
.chart-insight strong {
  display: block;
  color: var(--gold, #f2c14e);
  margin-top: 4px;
}
.chart-course-select {
  min-width: 200px;
}
.chart-course-select span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted, rgba(233, 241, 255, 0.7));
  font-size: 0.78rem;
}
.chart-course-select select {
  width: 100%;
}
@media (max-width: 650px) {
  .chart-insights {
    grid-template-columns: 1fr;
  }
  .progress-line-chart {
    min-height: 260px;
  }
  .progress-line-chart svg {
    min-height: 250px;
  }
  .course-chart-head {
    display: block;
  }
  .chart-course-select {
    margin-top: 10px;
  }
}
.chart-series {
  transition: opacity 0.2s ease;
}
.chart-point {
  transition: opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .chart-series,
  .chart-point {
    transition: none !important;
  }
}

.course-enrollment-notice {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 139, 139, 0.28);
  background: rgba(255, 80, 80, 0.075);
  color: #ffd0d0;
  line-height: 1.75;
  font-weight: 800;
}
.course-enrollment-notice strong {
  color: #fff;
}
.course-enrollment-notice small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}
.course-enrollment-notice[hidden] {
  display: none !important;
}

.course-enrollment-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.course-enrollment-notice__content {
  min-width: 0;
  flex: 1;
}
.course-enrollment-notice__action {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.course-enrollment-notice__action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.19);
}
.course-enrollment-notice__action:disabled {
  cursor: wait;
  opacity: 0.65;
}
@media (max-width: 680px) {
  .course-enrollment-notice {
    align-items: stretch;
    flex-direction: column;
  }
  .course-enrollment-notice__action {
    width: 100%;
  }
}

/* Indicator information popovers */
.metric-title-line,
.metric-heading-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.metric-heading-row h3 {
  margin: 0;
}
.analytics-subtitle.metric-heading-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}
.metric-info-btn {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 1px solid rgba(242, 193, 78, 0.38);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: rgba(242, 193, 78, 0.1);
  color: var(--gold2);
  font:
    900 13px/1 Georgia,
    serif;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}
.metric-info-btn:hover,
.metric-info-btn:focus-visible,
.metric-info-btn[aria-expanded="true"] {
  background: rgba(242, 193, 78, 0.22);
  border-color: rgba(242, 193, 78, 0.7);
  transform: translateY(-1px);
  outline: none;
}
.metric-info-popover {
  position: absolute;
  z-index: 10000;
  width: min(330px, calc(100vw - 20px));
  padding: 13px 14px;
  border: 1px solid rgba(242, 193, 78, 0.32);
  border-radius: 16px;
  background: #0b223b;
  color: var(--text);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  direction: rtl;
  animation: metricInfoIn 0.16s ease;
}
.metric-info-popover strong {
  display: block;
  color: var(--gold2);
  margin-bottom: 6px;
}
.metric-info-popover p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.75;
}
.metric-info-popover small {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.65;
}
@keyframes metricInfoIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 620px) {
  .metric-info-popover {
    width: calc(100vw - 20px);
  }
  .metric-heading-row {
    align-items: flex-start;
  }
}

/* Printable follow-up export */
.followup-actions,
.export-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.export-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid rgba(242, 193, 78, 0.3);
  border-radius: 24px;
  background: #0a2038;
  color: var(--text);
  padding: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}
.export-dialog::backdrop {
  background: rgba(1, 10, 20, 0.78);
  backdrop-filter: blur(6px);
}
.export-dialog .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.35rem;
}
.export-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.export-scope-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.export-scope-preview span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 13px;
  background: rgba(242, 193, 78, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.export-scope-preview b {
  color: var(--gold2);
}
.export-print-btn {
  width: auto;
  margin: 0;
}
@media (max-width: 680px) {
  .followup-actions,
  .export-dialog-actions {
    width: 100%;
  }
  .followup-actions > *,
  .export-dialog-actions > * {
    width: 100%;
  }
  .export-form-grid,
  .export-scope-preview {
    grid-template-columns: 1fr;
  }
}

/* Direct participation system task */
.tasks-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.direct-participation-btn {
  border: 1px solid rgba(185, 156, 255, 0.55);
  background: linear-gradient(
    135deg,
    rgba(122, 80, 210, 0.28),
    rgba(185, 156, 255, 0.12)
  );
  color: #e6dcff;
  border-radius: 12px;
  padding: 9px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.direct-participation-card {
  border-color: rgba(185, 156, 255, 0.48) !important;
  background: linear-gradient(
    145deg,
    rgba(80, 48, 140, 0.22),
    rgba(10, 32, 56, 0.92)
  ) !important;
  box-shadow:
    inset 3px 0 0 #b99cff,
    0 14px 35px rgba(36, 15, 75, 0.2);
}
.direct-participation-card.is-hidden-task {
  opacity: 0.68;
  filter: saturate(0.65);
}
.system-task-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.system-task-title h3 {
  margin: 0;
}
.system-task-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(185, 156, 255, 0.16);
  border: 1px solid rgba(185, 156, 255, 0.4);
  color: #ded1ff;
  font-size: 0.7rem;
  font-weight: 800;
}
.direct-participation-dialog {
  width: min(520px, calc(100% - 24px));
  border: 1px solid rgba(185, 156, 255, 0.38);
  border-radius: 22px;
  background: #0a2038;
  color: var(--text);
  padding: 20px;
}
.direct-participation-dialog::backdrop {
  background: rgba(1, 10, 20, 0.78);
  backdrop-filter: blur(6px);
}
.direct-participation-help {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.88rem;
}
.direct-participation-roster .direct-student-row {
  grid-template-columns:
    minmax(160px, 1.2fr) minmax(190px, 0.8fr) minmax(180px, 1fr)
    auto;
}
.direct-score-control {
  display: flex;
  align-items: center;
  gap: 7px;
  direction: ltr;
}
.direct-score-control .grade-input {
  width: 72px;
  text-align: center;
}
.score-step {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(185, 156, 255, 0.4);
  background: rgba(185, 156, 255, 0.12);
  color: #e8deff;
  font-size: 1.25rem;
  cursor: pointer;
}
.score-limit {
  color: var(--muted);
  font-weight: 800;
  direction: rtl;
}
@media (max-width: 760px) {
  .tasks-head-actions {
    width: 100%;
  }
  .tasks-head-actions > * {
    flex: 1;
  }
  .direct-participation-roster .direct-student-row {
    grid-template-columns: 1fr;
  }
  .direct-score-control {
    justify-content: flex-start;
  }
}

/* Student transfer - step 1 */
.student-transfers-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}
.transfer-column {
  border: 1px solid rgba(242, 193, 78, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.transfer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.transfer-heading h3 {
  margin: 0;
  font-size: 1rem;
}
.transfer-heading span {
  font-size: 0.75rem;
  color: var(--muted, #9ca3af);
}
.transfer-list {
  display: grid;
  gap: 8px;
}
.transfer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.transfer-card div {
  display: grid;
  gap: 3px;
}
.transfer-card small {
  color: var(--muted, #9ca3af);
}
.transfer-card.incoming {
  border-color: rgba(103, 215, 161, 0.25);
}
.transfer-card.outgoing {
  border-color: rgba(242, 193, 78, 0.2);
}
.compact-empty {
  padding: 12px !important;
  min-height: 0 !important;
}
.student-transfer-dialog {
  max-width: 520px;
  width: min(92vw, 520px);
}
.student-transfer-dialog label {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.transfer-student-summary {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(185, 156, 255, 0.1);
  border: 1px solid rgba(185, 156, 255, 0.25);
}
@media (max-width: 760px) {
  .student-transfers-panel {
    grid-template-columns: 1fr;
  }
  .transfer-heading {
    display: block;
  }
  .transfer-heading span {
    display: block;
    margin-top: 3px;
  }
  .transfer-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .transfer-card .primary-btn {
    width: 100%;
  }
}

.transfer-card.imported {
  border-color: rgba(185, 156, 255, 0.3);
}
.import-actions {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.import-actions .primary-btn,
.import-actions .text-btn {
  white-space: nowrap;
}
.imported-column {
  grid-column: span 1;
}

/* Imported tasks grouped by transferred student */
.imported-column {
  grid-column: 1/-1;
}
.imported-students-list {
  gap: 12px;
}
.import-student-group {
  border: 1px solid rgba(185, 156, 255, 0.3);
  border-radius: 15px;
  background: rgba(92, 62, 150, 0.08);
  overflow: hidden;
}
.import-student-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.import-student-group > summary::-webkit-details-marker {
  display: none;
}
.import-student-group > summary:after {
  content: "⌄";
  color: #cdbdff;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
.import-student-group[open] > summary:after {
  transform: rotate(180deg);
}
.import-student-group > summary > div:first-child {
  display: grid;
  gap: 4px;
}
.import-student-group > summary strong {
  color: #efeaff;
}
.import-student-group > summary small {
  color: var(--muted);
}
.import-group-counts {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-inline-start: auto;
}
.import-group-counts span,
.import-state {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 800;
}
.import-group-counts .pending,
.import-state.pending {
  color: #f3cf75;
  border-color: rgba(242, 193, 78, 0.3);
  background: rgba(242, 193, 78, 0.08);
}
.import-group-counts .approved,
.import-state.approved {
  color: #8ce4b7;
  border-color: rgba(103, 215, 161, 0.32);
  background: rgba(103, 215, 161, 0.08);
}
.import-group-counts .excluded,
.import-state.excluded {
  color: #c7cbd3;
  border-color: rgba(180, 185, 195, 0.24);
  background: rgba(180, 185, 195, 0.07);
}
.import-student-tasks {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}
.import-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.import-task-row > div:first-child {
  display: grid;
  gap: 4px;
}
.import-task-row small {
  color: var(--muted);
}
@media (max-width: 760px) {
  .import-student-group > summary,
  .import-task-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .import-group-counts {
    margin-inline-start: 0;
  }
  .import-actions {
    width: 100%;
  }
  .import-actions > * {
    flex: 1;
  }
}

.direct-roster-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid rgba(185, 156, 255, 0.28);
  border-radius: 14px;
  background: rgba(185, 156, 255, 0.07);
}
.direct-roster-counts,
.direct-roster-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.direct-roster-counts span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}
.direct-roster-counts .participated {
  color: #8ce4b7;
}
.direct-roster-counts .not-participated {
  color: #d7d9df;
}
.direct-roster-filters button {
  border: 1px solid rgba(185, 156, 255, 0.28);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.direct-roster-filters button.active {
  background: rgba(185, 156, 255, 0.18);
  color: #efeaff;
  border-color: rgba(185, 156, 255, 0.55);
}
@media (max-width: 760px) {
  .direct-roster-summary {
    align-items: stretch;
  }
  .direct-roster-counts,
  .direct-roster-filters {
    width: 100%;
  }
  .direct-roster-filters button {
    flex: 1;
  }
}

/* Student Performance AI fields */
.field-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}
.analytics-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .analytics-head-actions {
    width: 100%;
  }
  .analytics-head-actions button {
    flex: 1 1 100%;
  }
}

/* Student AI performance reports */
.student-ai-dialog {
  width: min(1120px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel, #0a2038);
  color: var(--text);
  padding: 20px;
}
.student-ai-dialog::backdrop {
  background: rgba(1, 10, 20, 0.78);
  backdrop-filter: blur(5px);
}
.student-ai-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}
.student-ai-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.student-ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.student-ai-panel-head h3 {
  margin: 0;
}
.observation-form {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}
.observation-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.observation-form .span-2 {
  grid-column: 1/-1;
}
.observation-checks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.student-observation,
.student-ai-report-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px;
  margin-top: 10px;
}
.student-observation-head,
.student-ai-report-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.student-observation p,
.student-ai-report-card p {
  margin: 8px 0;
  color: var(--muted);
}
.student-ai-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.student-ai-badge {
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}
.student-ai-report-card.is-selected {
  border-color: var(--gold, #e6bd5a);
}
#studentAiEditor {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
#studentAiEditor label {
  display: block;
  margin-top: 10px;
}
#studentAiEditor input,
#studentAiEditor textarea {
  width: 100%;
  margin-top: 6px;
}
.student-ai-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.teacher-report-details {
  margin-top: 15px;
}
.teacher-report-details summary {
  cursor: pointer;
}
.teacher-report-preview-section {
  margin-top: 12px;
}
.teacher-report-preview-section ul {
  margin: 8px 0;
}
.student-observations-list,
.student-ai-reports-list {
  max-height: 420px;
  overflow: auto;
  padding-inline-end: 3px;
}
@media (max-width: 850px) {
  .student-ai-grid {
    grid-template-columns: 1fr;
  }
  .observation-form .form-grid {
    grid-template-columns: 1fr;
  }
  .observation-form .span-2 {
    grid-column: auto;
  }
}

/* Integrated live challenge task */
.live-challenge-settings {
  border: 1px solid rgba(242, 193, 78, 0.3);
  border-radius: 18px;
  padding: 16px;
  background: rgba(242, 193, 78, 0.055);
}
.live-challenge-settings code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--gold);
}
.challenge-groups-preview {
  margin-top: 12px;
}
.question-settings {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.challenge-groups-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.challenge-groups-actions small {
  color: var(--muted);
}
.challenge-review-head,
.challenge-unassigned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.challenge-review-head small,
.challenge-unassigned small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.challenge-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.challenge-group-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.challenge-group-editor {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
}
.challenge-group-editor input {
  width: 100%;
}
.challenge-avatar-input {
  text-align: center;
  font-size: 1.25rem;
}
.challenge-group-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  margin: 9px 0;
}
.challenge-dropzone {
  min-height: 82px;
  border: 1px dashed rgba(242, 193, 78, 0.28);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: 0.18s ease;
}
.challenge-dropzone.is-over {
  border-color: var(--gold);
  background: rgba(242, 193, 78, 0.08);
}
.challenge-drop-hint {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 20px 8px;
}
.challenge-student {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  cursor: grab;
}
.challenge-student.is-dragging {
  opacity: 0.45;
}
.challenge-remove-student {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}
.challenge-unassigned {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.challenge-unassigned-list {
  flex: 1 1 500px;
  min-height: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
@media (max-width: 650px) {
  .challenge-groups-grid {
    grid-template-columns: 1fr;
  }
  .challenge-review-head > span {
    width: 100%;
  }
  .challenge-unassigned {
    display: block;
  }
  .challenge-unassigned-list {
    margin-top: 10px;
  }
}

.challenge-leader-field {
  display: block;
  margin: 0 0 10px;
}
.challenge-leader-field > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 5px;
}
.challenge-leader-field select {
  width: 100%;
  border-color: rgba(242, 193, 78, 0.32);
}

/* Live challenge room and presenter */
.live-room-shell,
.live-presenter-shell {
  max-width: 1280px;
  margin: auto;
  padding: 24px;
}
.teacher-live-room-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.teacher-live-room-actions p {
  margin: 5px 0 0;
}
.live-room-avatar {
  font-size: 2rem;
}
.live-presenter-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.1rem;
  font-weight: 800;
}
.live-presenter-shell h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  margin: 70px auto;
  max-width: 1100px;
}
.live-presenter-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.live-presenter-option {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  gap: 15px;
  font-size: 1.25rem;
}
.live-presenter-option b {
  font-size: 1.5rem;
}
@media (max-width: 700px) {
  .teacher-live-room-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .live-presenter-options {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   NTF Live Challenge — cinematic show layer
   Uses the existing task and room APIs; presentation only.
   ========================================================= */
.lc-show-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #04111f;
  color: #fff;
  font-family: "Tajawal", sans-serif;
}
.lc-stage {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(18px, 3vw, 42px);
  background:
    radial-gradient(
      circle at 50% -15%,
      rgba(242, 193, 78, 0.17),
      transparent 38%
    ),
    linear-gradient(145deg, #04111f 0%, #071a2e 48%, #03101c 100%);
}
.lc-stage:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.lc-stage:after {
  content: "";
  position: absolute;
  z-index: -3;
  inset: auto -10% -35% -10%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(242, 193, 78, 0.13),
    transparent 65%
  );
  filter: blur(30px);
}
.lc-orb {
  position: absolute;
  z-index: -2;
  width: 38vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
  pointer-events: none;
  animation: lcFloat 10s ease-in-out infinite alternate;
}
.lc-orb-a {
  top: 15%;
  right: -22%;
  background: #f2c14e;
}
.lc-orb-b {
  bottom: -25%;
  left: -18%;
  background: #2675ff;
  animation-delay: -4s;
}
@keyframes lcFloat {
  to {
    transform: translate3d(3vw, -3vh, 0) scale(1.08);
  }
}
.lc-show-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto 28px;
}
.lc-title-stack {
  text-align: center;
}
.lc-title-stack h1 {
  margin: 5px 0 4px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.045em;
}
.lc-title-stack p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 600;
}
.lc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f2c14e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lc-ghost-link {
  justify-self: start;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  transition: 0.25s ease;
}
.lc-ghost-link:hover {
  border-color: rgba(242, 193, 78, 0.5);
  transform: translateY(-2px);
}
.lc-live-chip {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(3, 13, 24, 0.55);
  font-size: 0.82rem;
  font-weight: 800;
}
.lc-live-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43e38b;
  box-shadow: 0 0 0 0 rgba(67, 227, 139, 0.6);
  animation: lcPulse 1.7s infinite;
}
@keyframes lcPulse {
  70% {
    box-shadow: 0 0 0 10px rgba(67, 227, 139, 0);
  }
}
.lc-loading-state {
  min-height: 55vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
.lc-loading-state span {
  color: rgba(255, 255, 255, 0.65);
}
.lc-loader-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #f2c14e;
  animation: lcSpin 0.8s linear infinite;
}
@keyframes lcSpin {
  to {
    transform: rotate(360deg);
  }
}
.lc-room-scene {
  max-width: 1500px;
  margin: auto;
}
.lc-readiness-line {
  text-align: center;
  margin: 12px auto 28px;
}
.lc-readiness-line > div {
  direction: ltr;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 3px;
}
.lc-big-number {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.9;
  font-weight: 900;
  color: #f2c14e;
  text-shadow: 0 0 34px rgba(242, 193, 78, 0.3);
}
.lc-readiness-line p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}
.lc-team-arena {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: clamp(16px, 2.4vw, 34px);
  perspective: 1200px;
}
.lc-team {
  --team-size: clamp(230px, 20vw, 310px);
  position: relative;
  width: var(--team-size);
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 36% 36% 24px 24px/22% 22% 24px 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.018)
  );
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  animation: lcTeamIn 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--team-index) * 90ms);
  transition: 0.35s ease;
}
.lc-team:hover {
  transform: translateY(-7px);
  border-color: rgba(242, 193, 78, 0.32);
}
@keyframes lcTeamIn {
  from {
    opacity: 0;
    transform: translateY(34px) rotateX(8deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.lc-team.just-ready {
  animation: lcReadyImpact 0.8s cubic-bezier(0.2, 0.9, 0.2, 1);
}
@keyframes lcReadyImpact {
  40% {
    transform: scale(1.07);
  }
  70% {
    transform: scale(0.98);
  }
}
.lc-team-aura {
  position: absolute;
  inset: 14% 12% auto;
  height: 45%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(242, 193, 78, 0.17),
    transparent 70%
  );
  filter: blur(12px);
  opacity: 0.7;
}
.lc-team.is-waiting {
  filter: saturate(0.5);
  opacity: 0.72;
}
.lc-team.is-ready .lc-team-aura,
.lc-team.is-my-team .lc-team-aura {
  opacity: 1;
  animation: lcAura 2.6s ease-in-out infinite;
}
@keyframes lcAura {
  50% {
    transform: scale(1.12);
    opacity: 0.55;
  }
}
.lc-team.is-my-team {
  border-color: rgba(242, 193, 78, 0.62);
  box-shadow:
    0 0 0 1px rgba(242, 193, 78, 0.16),
    0 28px 80px rgba(0, 0, 0, 0.3);
}
.lc-team-emblem {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: -2px auto 14px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.2),
    rgba(242, 193, 78, 0.08) 36%,
    rgba(0, 0, 0, 0.18) 72%
  );
  border: 1px solid rgba(242, 193, 78, 0.38);
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.06),
    0 16px 35px rgba(0, 0, 0, 0.28);
}
.lc-team-emblem:before,
.lc-team-emblem:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(242, 193, 78, 0.18);
}
.lc-team-emblem:before {
  inset: -8px;
}
.lc-team-emblem:after {
  inset: -16px;
  border-style: dashed;
  animation: lcOrbit 18s linear infinite;
}
@keyframes lcOrbit {
  to {
    transform: rotate(360deg);
  }
}
.lc-team-emblem span {
  font-size: 3.2rem;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}
.lc-team-copy {
  position: relative;
}
.lc-team-copy h2 {
  margin: 8px 0 2px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 900;
}
.lc-team-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.82rem;
}
.lc-team-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.7rem;
  font-weight: 900;
}
.lc-team-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43e38b;
}
.lc-team.is-waiting .lc-team-status i {
  background: #f2c14e;
}
.lc-members-cloud {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}
.lc-member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.lc-member b {
  font-size: 0.6rem;
  color: #f2c14e;
}
.lc-member.is-leader {
  background: rgba(242, 193, 78, 0.1);
  color: #fff;
}
.lc-teacher-console {
  position: sticky;
  bottom: 20px;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: 920px;
  margin: 38px auto 0;
  padding: 14px 14px 14px 24px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: rgba(3, 13, 24, 0.78);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}
.lc-console-copy {
  display: grid;
  gap: 3px;
}
.lc-console-copy span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}
.lc-start-button {
  border: 0;
  border-radius: 18px;
  padding: 17px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: #f2c14e;
  color: #092036;
  font:
    900 1rem "Tajawal",
    sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(242, 193, 78, 0.22);
  transition: 0.25s ease;
}
.lc-start-button:hover {
  transform: translateY(-3px) scale(1.015);
}
.lc-start-button b {
  font-size: 1.35rem;
}
.lc-start-button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.lc-room-scene.is-launching {
  animation: lcSceneLeave 0.8s ease forwards;
}
@keyframes lcSceneLeave {
  to {
    opacity: 0.08;
    transform: scale(0.86);
    filter: blur(8px);
  }
}
.lc-countdown {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  background: radial-gradient(
    circle,
    rgba(242, 193, 78, 0.12),
    rgba(2, 9, 16, 0.9) 58%
  );
  backdrop-filter: blur(10px);
}
.lc-countdown[hidden] {
  display: none;
}
.lc-countdown span {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #f2c14e;
}
.lc-countdown strong {
  font-size: clamp(7rem, 24vw, 19rem);
  line-height: 0.9;
  font-weight: 900;
  text-shadow: 0 0 70px rgba(242, 193, 78, 0.35);
}
.lc-countdown strong.pop {
  animation: lcCountPop 0.65s cubic-bezier(0.15, 0.85, 0.2, 1);
}
@keyframes lcCountPop {
  0% {
    opacity: 0;
    transform: scale(1.6);
  }
  55% {
    opacity: 1;
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
.lc-student-waiting-copy {
  text-align: center;
  margin: 12px auto 32px;
}
.lc-student-waiting-copy span {
  color: #f2c14e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.lc-student-waiting-copy strong {
  display: block;
  margin: 5px 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}
.lc-student-waiting-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}
.lc-student-arena .lc-team:not(.is-my-team) {
  transform: scale(0.9);
  opacity: 0.7;
}
.lc-customize-team {
  margin-top: auto;
  border: 1px solid rgba(242, 193, 78, 0.38);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(242, 193, 78, 0.09);
  color: #f7d77f;
  font:
    800 0.82rem "Tajawal",
    sans-serif;
  cursor: pointer;
  transition: 0.2s;
}
.lc-customize-team:hover {
  background: #f2c14e;
  color: #092036;
}
.lc-identity-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 5, 10, 0.78);
  backdrop-filter: blur(16px);
}
.lc-identity-modal[hidden] {
  display: none;
}
.lc-identity-sheet {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #071a2e;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  animation: lcSheetIn 0.35s ease;
}
@keyframes lcSheetIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}
.lc-identity-sheet h2 {
  margin: 6px 0 22px;
  font-size: 1.8rem;
}
.lc-identity-sheet label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 800;
}
.lc-identity-sheet input[type="text"],
.lc-identity-sheet input:not([type]) {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font: inherit;
  outline: none;
}
.lc-identity-sheet input:focus {
  border-color: #f2c14e;
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.12);
}
.lc-close-button {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}
.lc-avatar-choices {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
}
.lc-avatar-choices button {
  aspect-ratio: 1;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.55rem;
  cursor: pointer;
  transition: 0.2s;
}
.lc-avatar-choices button:hover,
.lc-avatar-choices button.is-selected {
  transform: translateY(-3px);
  border-color: #f2c14e;
  background: rgba(242, 193, 78, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}
.lc-save-identity {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border: 0;
  border-radius: 16px;
  background: #f2c14e;
  color: #092036;
  font:
    900 1rem "Tajawal",
    sans-serif;
  cursor: pointer;
}
.lc-speed-lines {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.1;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 46px,
    rgba(255, 255, 255, 0.18) 47px 48px,
    transparent 49px 96px
  );
  animation: lcLines 16s linear infinite;
}
@keyframes lcLines {
  to {
    background-position: 600px 0;
  }
}
.lc-question-scene {
  max-width: 1500px;
  margin: auto;
}
.lc-question-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 25px;
}
.lc-question-progress {
  display: grid;
  gap: 8px;
}
.lc-question-progress span {
  font-weight: 900;
}
.lc-question-progress > div {
  width: min(320px, 100%);
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.lc-question-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f2c14e;
  box-shadow: 0 0 16px rgba(242, 193, 78, 0.45);
  transition: width 0.4s ease;
}
.lc-multiplier {
  justify-self: center;
  padding: 9px 16px;
  border: 1px solid rgba(242, 193, 78, 0.36);
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.09);
  color: #f7d77f;
  font-weight: 900;
}
.lc-timer {
  justify-self: end;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.lc-timer span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.75rem;
  font-weight: 800;
}
.lc-timer strong {
  font-size: 2.2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.lc-time-critical .lc-timer strong {
  color: #ff6b6b;
  animation: lcTimerBeat 0.65s infinite;
}
@keyframes lcTimerBeat {
  50% {
    transform: scale(1.12);
  }
}
.lc-question-focus {
  text-align: center;
  max-width: 1200px;
  margin: clamp(52px, 8vh, 105px) auto clamp(38px, 6vh, 70px);
}
.lc-question-kicker {
  color: #f2c14e;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.lc-question-focus h1 {
  margin: 16px 0 0;
  font-size: clamp(2rem, 5.2vw, 5.6rem);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.lc-answer-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1250px;
  margin: auto;
}
.lc-answer-option {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: 68px 1fr 18px;
  align-items: center;
  gap: 16px;
  padding: 16px 21px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.075),
    rgba(255, 255, 255, 0.025)
  );
  color: #fff;
  text-align: right;
  font:
    800 clamp(1rem, 1.7vw, 1.35rem) "Tajawal",
    sans-serif;
  overflow: hidden;
  animation: lcOptionIn 0.5s ease both;
  animation-delay: calc(var(--option-index) * 90ms);
  transition: 0.22s ease;
}
.lc-answer-option:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, transparent, rgba(242, 193, 78, 0.13));
  transition: 0.3s;
}
.lc-answer-option b {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(242, 193, 78, 0.11);
  color: #f2c14e;
  font-size: 1.35rem;
}
.lc-answer-option i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
@keyframes lcOptionIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
button.lc-answer-option {
  cursor: pointer;
}
.lc-player-options button.lc-answer-option:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 193, 78, 0.42);
}
.lc-player-options button.lc-answer-option:hover:before {
  width: 100%;
}
.lc-player-options .lc-answer-option.is-selected {
  border-color: #f2c14e;
  background: rgba(242, 193, 78, 0.14);
  transform: scale(1.015);
}
.lc-player-options .lc-answer-option.is-selected i {
  background: #43e38b;
  box-shadow: 0 0 0 6px rgba(67, 227, 139, 0.12);
}
.lc-answer-status {
  max-width: 520px;
  margin: 22px auto 0;
  padding: 14px 18px;
  text-align: center;
  border-radius: 18px;
  background: rgba(67, 227, 139, 0.1);
  border: 1px solid rgba(67, 227, 139, 0.3);
}
.lc-answer-status[hidden] {
  display: none;
}
.lc-answer-status strong,
.lc-answer-status span {
  display: block;
}
.lc-answer-status span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}
.lc-answer-status.show {
  animation: lcStatusIn 0.35s ease;
}
@keyframes lcStatusIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.lc-presenter-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.lc-presenter-footer i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f2c14e;
}
.question-enter .lc-question-focus {
  animation: lcQuestionIn 0.65s cubic-bezier(0.2, 0.85, 0.2, 1);
}
@keyframes lcQuestionIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
  }
}
@media (max-width: 800px) {
  .lc-stage {
    padding: 16px;
  }
  .lc-show-header {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .lc-title-stack h1 {
    font-size: 1.55rem;
  }
  .lc-title-stack p {
    font-size: 0.75rem;
  }
  .lc-ghost-link {
    padding: 8px 11px;
    font-size: 0.75rem;
  }
  .lc-live-chip {
    padding: 8px 10px;
    font-size: 0.7rem;
  }
  .lc-team {
    --team-size: min(100%, 330px);
  }
  .lc-teacher-console {
    position: relative;
    bottom: auto;
    flex-direction: column;
    text-align: center;
    padding: 18px;
  }
  .lc-start-button {
    width: 100%;
    justify-content: center;
  }
  .lc-question-hud {
    grid-template-columns: 1fr auto;
  }
  .lc-multiplier {
    grid-row: 2;
    grid-column: 1/-1;
  }
  .lc-timer {
    grid-column: 2;
  }
  .lc-question-focus {
    margin: 45px auto 30px;
  }
  .lc-answer-field {
    grid-template-columns: 1fr;
  }
  .lc-answer-option {
    min-height: 84px;
    grid-template-columns: 54px 1fr 12px;
    padding: 13px;
  }
  .lc-answer-option b {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
  .lc-avatar-choices {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Live Challenge — Phase 1 cartoon waiting room */
:root {
  --lc-sky: #69d8ff;
  --lc-sky-deep: #32bde9;
  --lc-yellow: #ffd84d;
  --lc-yellow-deep: #e9b91f;
  --lc-green: #63df7b;
  --lc-green-deep: #35b854;
  --lc-white: #fffdf7;
  --lc-ink: #153b57;
  --lc-coral: #ff7d72;
}
.lc-show-body {
  background: linear-gradient(
    180deg,
    var(--lc-sky) 0%,
    #8ee4ff 58%,
    #d9f8ff 100%
  );
  color: var(--lc-ink);
  font-family: "Baloo Bhaijaan 2", "Tajawal", sans-serif;
}
.lc-stage {
  isolation: isolate;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.lc-stage::before,
.lc-stage::after {
  content: "";
  position: fixed;
  z-index: -3;
  width: 320px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  filter: drop-shadow(0 14px 0 rgba(255, 255, 255, 0.23));
  animation: lcCloudFloat 11s ease-in-out infinite alternate;
}
.lc-stage::before {
  top: 16%;
  left: -80px;
}
.lc-stage::after {
  top: 58%;
  right: -100px;
  transform: scale(0.75);
  animation-delay: -4s;
}
@keyframes lcCloudFloat {
  to {
    translate: 50px 10px;
  }
}
.lc-orb {
  display: block !important;
  border-radius: 48% 52% 63% 37%;
  opacity: 0.95;
  filter: none;
  background: var(--lc-yellow);
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.08);
  animation: lcBlob 7s ease-in-out infinite alternate;
}
.lc-orb-b {
  background: var(--lc-green);
  animation-delay: -2.2s;
}
@keyframes lcBlob {
  to {
    transform: translateY(20px) rotate(9deg) scale(1.08);
  }
}
.lc-show-header {
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 253, 247, 0.82);
  box-shadow:
    0 10px 0 rgba(21, 59, 87, 0.13),
    0 22px 50px rgba(20, 115, 150, 0.16);
  backdrop-filter: blur(12px);
  border-radius: 30px;
  padding: 18px 20px;
}
.lc-title-stack h1 {
  color: var(--lc-ink);
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.9);
}
.lc-title-stack p,
.lc-console-copy span,
.lc-student-waiting-copy p {
  color: #4c7087;
}
.lc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #137da4;
  font-weight: 900;
  background: #dff8ff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: 0 5px 0 rgba(21, 59, 87, 0.08);
}
.lc-ghost-link,
.lc-live-chip {
  border: 0;
  background: var(--lc-white);
  color: var(--lc-ink);
  box-shadow: 0 6px 0 rgba(21, 59, 87, 0.14);
  font-weight: 900;
}
.lc-live-chip span {
  background: var(--lc-green);
  box-shadow: 0 0 0 5px rgba(99, 223, 123, 0.2);
}
.lc-loading-state {
  color: var(--lc-ink);
  background: rgba(255, 253, 247, 0.8);
  border: 3px solid #fff;
  border-radius: 30px;
  box-shadow: 0 10px 0 rgba(21, 59, 87, 0.1);
}
.lc-loader-ring {
  border-color: rgba(21, 59, 87, 0.14);
  border-top-color: var(--lc-yellow);
}
.lc-readiness-line,
.lc-student-waiting-copy {
  color: var(--lc-ink);
  text-align: center;
}
.lc-big-number {
  color: var(--lc-yellow-deep);
  text-shadow:
    0 4px 0 #fff,
    0 8px 0 rgba(21, 59, 87, 0.12);
}
.lc-team-arena {
  gap: clamp(24px, 3vw, 46px);
  align-items: center;
  padding: 20px 0 36px;
}
.lc-team {
  position: relative;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none;
  transform-origin: center bottom;
  animation: lcTeamDrop 0.65s cubic-bezier(0.2, 0.9, 0.2, 1.2) both;
  animation-delay: calc(var(--team-index) * 0.09s);
}
@keyframes lcTeamDrop {
  from {
    opacity: 0;
    transform: translateY(-35px) scale(0.7) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.lc-team::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -18px;
  height: 24px;
  border-radius: 50%;
  background: rgba(21, 59, 87, 0.15);
  filter: blur(5px);
  z-index: -1;
}
.lc-team-emblem {
  width: 132px;
  height: 132px;
  border: 7px solid var(--lc-white);
  background: var(--lc-yellow);
  box-shadow:
    0 12px 0 var(--lc-yellow-deep),
    0 22px 32px rgba(21, 59, 87, 0.2),
    inset 0 9px 0 rgba(255, 255, 255, 0.38);
  border-radius: 42% 58% 50% 50%;
  animation: lcMascotFloat 2.8s ease-in-out infinite;
}
.lc-team:nth-child(3n + 2) .lc-team-emblem {
  background: var(--lc-green);
  box-shadow:
    0 12px 0 var(--lc-green-deep),
    0 22px 32px rgba(21, 59, 87, 0.2),
    inset 0 9px 0 rgba(255, 255, 255, 0.38);
}
.lc-team:nth-child(3n + 3) .lc-team-emblem {
  background: var(--lc-white);
  box-shadow:
    0 12px 0 #cdeff7,
    0 22px 32px rgba(21, 59, 87, 0.2),
    inset 0 9px 0 #fff;
}
@keyframes lcMascotFloat {
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}
.lc-team-emblem span {
  font-size: 3.7rem;
  filter: drop-shadow(0 5px 0 rgba(21, 59, 87, 0.13));
}
.lc-team-aura {
  background: transparent !important;
  box-shadow: none !important;
}
.lc-team-copy {
  margin-top: 20px;
  padding: 12px 18px 14px;
  background: var(--lc-white);
  border: 4px solid #fff;
  border-radius: 24px;
  box-shadow:
    0 8px 0 rgba(21, 59, 87, 0.13),
    0 18px 28px rgba(21, 59, 87, 0.12);
  min-width: 220px;
}
.lc-team-copy h2 {
  color: var(--lc-ink);
  font-size: 1.45rem;
  margin: 3px 0;
}
.lc-team-copy p {
  color: #5c7b8f;
}
.lc-team-status {
  color: #167c40;
  font-weight: 900;
}
.lc-team-status i {
  background: var(--lc-green);
}
.lc-team.is-waiting .lc-team-status {
  color: #9a6a00;
}
.lc-team.is-waiting .lc-team-status i {
  background: var(--lc-yellow);
}
.lc-team.is-my-team .lc-team-copy {
  outline: 6px solid rgba(255, 216, 77, 0.55);
  animation: lcMyTeamPulse 2.2s ease-in-out infinite;
}
@keyframes lcMyTeamPulse {
  50% {
    outline-offset: 5px;
  }
}
.lc-members-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.lc-member {
  background: #eafaff;
  color: var(--lc-ink);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(21, 59, 87, 0.1);
  font-weight: 800;
}
.lc-member.is-leader {
  background: var(--lc-yellow);
  color: var(--lc-ink);
}
.lc-member b {
  background: var(--lc-ink);
  color: #fff;
}
.lc-customize-team,
.lc-start-button,
.lc-save-identity {
  border: 3px solid #fff !important;
  background: var(--lc-yellow) !important;
  color: var(--lc-ink) !important;
  box-shadow:
    0 8px 0 var(--lc-yellow-deep),
    0 15px 24px rgba(21, 59, 87, 0.18) !important;
  border-radius: 20px !important;
  font-family: inherit !important;
  font-weight: 900 !important;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease !important;
}
.lc-customize-team:hover,
.lc-start-button:hover,
.lc-save-identity:hover {
  transform: translateY(-3px) rotate(-1deg) !important;
}
.lc-customize-team:active,
.lc-start-button:active,
.lc-save-identity:active {
  transform: translateY(6px) !important;
  box-shadow: 0 2px 0 var(--lc-yellow-deep) !important;
}
.lc-teacher-console {
  background: rgba(255, 253, 247, 0.9);
  border: 4px solid #fff;
  box-shadow:
    0 10px 0 rgba(21, 59, 87, 0.13),
    0 22px 45px rgba(21, 59, 87, 0.15);
  color: var(--lc-ink);
}
.lc-console-copy strong {
  color: var(--lc-ink);
}
.lc-identity-modal {
  background: rgba(35, 170, 217, 0.62);
  backdrop-filter: blur(10px);
}
.lc-identity-sheet {
  background: var(--lc-white);
  color: var(--lc-ink);
  border: 5px solid #fff;
  box-shadow:
    0 14px 0 rgba(21, 59, 87, 0.14),
    0 35px 70px rgba(21, 59, 87, 0.2);
  border-radius: 34px;
}
.lc-identity-sheet input[type="text"],
.lc-identity-sheet input:not([type]) {
  background: #effbff;
  color: var(--lc-ink);
  border: 3px solid #bceeff;
  box-shadow: inset 0 3px 0 rgba(21, 59, 87, 0.06);
}
.lc-identity-sheet input:focus {
  border-color: var(--lc-yellow);
  box-shadow: 0 0 0 5px rgba(255, 216, 77, 0.24);
}
.lc-close-button {
  background: var(--lc-coral);
  color: white;
  border: 3px solid white;
  box-shadow: 0 5px 0 #d85f55;
}
.lc-avatar-choices button {
  background: #eafaff;
  border: 3px solid #fff;
  box-shadow: 0 5px 0 #b8e7f2;
  border-radius: 18px;
}
.lc-avatar-choices button:hover,
.lc-avatar-choices button.is-selected {
  border-color: #fff;
  background: var(--lc-yellow);
  box-shadow: 0 6px 0 var(--lc-yellow-deep);
  transform: translateY(-4px) rotate(3deg);
}
.lc-countdown {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.97) 0 22%,
    rgba(255, 216, 77, 0.97) 23% 45%,
    rgba(105, 216, 255, 0.94) 46% 100%
  );
  color: var(--lc-ink);
}
.lc-countdown strong {
  color: var(--lc-ink);
  text-shadow:
    0 8px 0 #fff,
    0 14px 0 rgba(21, 59, 87, 0.18);
}
@media (max-width: 800px) {
  .lc-team-emblem {
    width: 108px;
    height: 108px;
  }
  .lc-team-copy {
    min-width: min(250px, 82vw);
  }
  .lc-show-header {
    border-radius: 22px;
  }
  .lc-stage::before,
  .lc-stage::after {
    opacity: 0.55;
  }
}

/* Live Challenge cartoon question flow */
.lc-question-stage,
.lc-player-stage {
  position: relative;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 44px);
  overflow: hidden;
}
.lc-question-scene,
.lc-scoreboard-scene {
  position: relative;
  z-index: 3;
  max-width: 1400px;
  margin: auto;
}
.lc-question-hud {
  grid-template-columns: 1fr auto;
}
.lc-question-progress > div {
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
}
.lc-question-progress i {
  background: #ffd84d;
  box-shadow: 0 5px 0 #e9ad20;
}
.lc-timer {
  padding: 8px 18px;
  border: 4px solid #fff;
  border-radius: 24px;
  background: #fff7df;
  box-shadow: 0 7px 0 #d8b14a;
  color: #24506a;
}
.lc-timer span {
  color: #567b8d;
}
.lc-timer strong {
  color: #24506a;
}
.lc-question-focus {
  margin: clamp(45px, 7vh, 85px) auto clamp(28px, 5vh, 55px);
}
.lc-question-kicker {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid #d5f5ff;
  color: #19718e;
  box-shadow: 0 6px 0 rgba(32, 132, 164, 0.18);
  letter-spacing: 0;
}
.lc-question-focus h1 {
  color: #163e57;
  text-shadow: 0 5px 0 rgba(255, 255, 255, 0.75);
  max-width: 1200px;
  margin-inline: auto;
}
.lc-team-hint {
  display: block;
  margin-top: 12px;
  color: #2d7086;
  font-weight: 800;
}
.lc-answer-field {
  gap: 22px;
}
.lc-answer-option {
  min-height: 120px;
  border: 5px solid rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  color: #fff;
  box-shadow:
    0 10px 0 var(--lc-option-shadow),
    0 15px 24px rgba(38, 91, 114, 0.18);
  font-family: "Baloo Bhaijaan 2", "Tajawal", sans-serif;
  transform: translateY(0);
  transition:
    transform 0.16s ease,
    filter 0.2s ease,
    opacity 0.2s ease;
  background: var(--lc-option-bg);
}
.lc-answer-option:before {
  display: none;
}
.lc-answer-option b {
  background: rgba(255, 255, 255, 0.94);
  color: var(--lc-option-ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12);
}
.lc-answer-option i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-style: normal;
  font-size: 2rem;
  font-weight: 900;
}
.lc-answer-option:hover {
  transform: translateY(-4px);
}
.lc-answer-option:active,
.lc-answer-option.is-selected {
  transform: translateY(7px);
  box-shadow:
    0 3px 0 var(--lc-option-shadow),
    0 7px 14px rgba(38, 91, 114, 0.12);
}
.lc-option-0 {
  --lc-option-bg: #ff6666;
  --lc-option-shadow: #c93f46;
  --lc-option-ink: #d9474d;
}
.lc-option-1 {
  --lc-option-bg: #58db7d;
  --lc-option-shadow: #29a954;
  --lc-option-ink: #24994a;
}
.lc-option-2 {
  --lc-option-bg: #ffd84d;
  --lc-option-shadow: #d9a817;
  --lc-option-ink: #a87500;
}
.lc-option-3 {
  --lc-option-bg: #4a9cff;
  --lc-option-shadow: #2572c7;
  --lc-option-ink: #2371c7;
}
.lc-answer-option.is-correct {
  animation: lcCorrectPop 0.65s ease both;
  filter: saturate(1.12);
  outline: 8px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}
.lc-answer-option.is-correct i {
  background: #fff;
  color: #25a851;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12);
}
body[data-challenge-phase="reveal"] .lc-answer-option:not(.is-correct) {
  opacity: 0.42;
  filter: grayscale(0.2);
}
@keyframes lcCorrectPop {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.07) rotate(-1deg);
  }
}
.lc-multiplier-bubble {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  min-width: min(430px, 85vw);
  padding: 28px 38px;
  text-align: center;
  border: 7px solid #fff;
  border-radius: 45% 55% 48% 52%/55% 45% 55% 45%;
  background: #ffd84d;
  color: #744c00;
  box-shadow:
    0 13px 0 #d9a817,
    0 22px 40px rgba(52, 87, 103, 0.22);
}
.lc-multiplier-bubble strong,
.lc-multiplier-bubble span {
  display: block;
}
.lc-multiplier-bubble strong {
  font-size: clamp(1.8rem, 5vw, 4.2rem);
}
.lc-multiplier-bubble span {
  font-size: 1.5rem;
  font-weight: 900;
}
.lc-multiplier-bubble.show {
  animation: lcBubbleVisit 2s ease both;
}
@keyframes lcBubbleVisit {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(-9deg);
  }
  20%,
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(0.7) rotate(7deg);
  }
}
.lc-scoreboard-scene {
  text-align: center;
  padding-top: clamp(25px, 5vh, 60px);
}
.lc-scoreboard-scene h1 {
  margin: 16px 0 30px;
  color: #16445e;
  font-size: clamp(2rem, 5vw, 4.8rem);
  text-shadow: 0 5px 0 #fff;
}
.lc-scoreboard-list {
  display: grid;
  gap: 14px;
  max-width: 1050px;
  margin: auto;
}
.lc-score-team {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  border: 5px solid #fff;
  border-radius: 30px;
  background: #fffaf0;
  color: #19465c;
  box-shadow: 0 9px 0 #aed9e6;
  animation: lcScoreIn 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
  animation-delay: calc(var(--rank) * 130ms);
  text-align: right;
}
.lc-score-rank {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #ffd84d;
  box-shadow: 0 5px 0 #d7a919;
  font-size: 1.4rem;
  font-weight: 900;
}
.lc-score-avatar {
  font-size: 3rem;
}
.lc-score-team div strong,
.lc-score-team div small {
  display: block;
}
.lc-score-team div strong {
  font-size: 1.3rem;
}
.lc-score-team div small {
  color: #6690a0;
}
.lc-round-points {
  padding: 7px 13px;
  border-radius: 16px;
  background: #58db7d;
  color: #135d2c;
  font-size: 1.25rem;
}
.lc-total-points {
  min-width: 120px;
  text-align: left;
  font-size: 1.3rem;
}
.lc-round-points span,
.lc-total-points span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  opacity: 0.72;
  margin-bottom: 2px;
}
.lc-round-points {
  text-align: center;
}
.lc-total-points {
  text-align: center;
}
.lc-next-question-note {
  color: #34748a;
  font-weight: 800;
}
.lc-score-team:nth-child(1) {
  background: #fff4b8;
  box-shadow: 0 9px 0 #e1b936;
}
.lc-score-team:nth-child(2) {
  background: #eff9fc;
}
.lc-score-team:nth-child(3) {
  background: #ffe8cf;
  box-shadow: 0 9px 0 #dfac70;
}
@keyframes lcScoreIn {
  from {
    opacity: 0;
    transform: translateX(80px) scale(0.92);
  }
}
@media (max-width: 800px) {
  .lc-question-hud {
    grid-template-columns: 1fr auto;
  }
  .lc-answer-option {
    min-height: 90px;
  }
  .lc-score-team {
    grid-template-columns: 42px 52px 1fr auto;
    padding: 12px;
    gap: 10px;
  }
  .lc-score-avatar {
    font-size: 2rem;
  }
  .lc-total-points {
    grid-column: 3/5;
    text-align: right;
  }
  .lc-round-points {
    font-size: 1rem;
  }
}

/* Question media builder and live media */
.question-media-builder {
  margin: 16px 0 18px;
  padding: 16px;
  border: 2px dashed rgba(34, 137, 170, 0.28);
  border-radius: 22px;
  background: rgba(110, 215, 255, 0.08);
  min-width: 0;
}
.question-media-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
}
.question-media-controls label,
.q-media-url-field,
.q-media-upload-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.question-media-controls span,
.q-media-url-field > span,
.q-media-upload-field > span {
  font-weight: 800;
}
.question-media-controls select,
.q-media-url-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 10px 12px;
  font: inherit;
}
.question-media-details {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  min-width: 0;
}
.question-media-details[hidden],
.q-media-source-field[hidden],
.q-media-url-field[hidden],
.q-media-upload-field[hidden] {
  display: none !important;
}
.q-media-url-field {
  grid-column: 1/-1;
  width: 100%;
}
.q-media-upload-field {
  grid-column: 1/-1;
  width: 100%;
}
.q-media-upload-field {
  align-self: end;
}
.q-media-file-button {
  position: relative;
  min-height: 46px;
  display: grid !important;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
}
.q-media-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.q-media-file-button b {
  pointer-events: none;
}
.q-media-progress {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.q-media-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(242, 193, 78, 0.8);
  transition: width 0.16s ease;
}
.q-media-progress span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 0.78rem;
  font-weight: 900;
}
.q-media-clear {
  justify-self: start;
  padding: 4px 0;
}
.q-media-preview {
  min-height: 110px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.12);
  min-width: 0;
}
.q-media-preview img,
.q-media-preview video,
.q-media-preview iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 0;
  background: #071522;
}
.q-media-preview iframe {
  aspect-ratio: 16/9;
  max-height: none;
}
.question-media-empty {
  padding: 24px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}
.lc-question-media {
  width: min(860px, 92vw);
  margin: 24px auto 0;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 30px;
  background: #fff8e8;
  box-shadow:
    0 10px 0 #a8d8e7,
    0 18px 30px rgba(45, 103, 126, 0.18);
}
.lc-question-media img,
.lc-question-media video,
.lc-question-media iframe {
  display: block;
  width: 100%;
  max-height: min(42vh, 430px);
  object-fit: contain;
  background: #122b3a;
  border: 0;
}
.lc-question-media iframe {
  aspect-ratio: 16/9;
  max-height: none;
}
.lc-question-focus:has(.lc-question-media:not([hidden])) {
  margin-top: clamp(24px, 4vh, 48px);
}
@media (max-width: 760px) {
  .question-media-controls {
    grid-template-columns: 1fr;
  }
  .lc-question-media {
    border-width: 5px;
    border-radius: 22px;
  }
  .lc-question-media img,
  .lc-question-media video {
    max-height: 34vh;
  }
}

/* Live Challenge — calm motion and stable rendering fixes */
.lc-loading-state[hidden] {
  display: none !important;
}
.lc-answer-field[hidden],
.lc-question-media[hidden],
.lc-scoreboard-scene[hidden],
.lc-question-scene[hidden],
.lc-multiplier-bubble[hidden] {
  display: none !important;
}
.lc-team {
  animation-duration: 0.28s !important;
  animation-timing-function: ease-out !important;
  animation-delay: calc(var(--team-index) * 35ms) !important;
}
.lc-team-emblem {
  animation: none !important;
}
.lc-team.is-my-team .lc-team-copy {
  animation: none !important;
  outline-offset: 2px !important;
}
.lc-team-emblem:after,
.lc-team.is-ready .lc-team-aura,
.lc-team.is-my-team .lc-team-aura {
  animation: none !important;
}
.lc-answer-option {
  animation-duration: 0.24s !important;
  animation-delay: calc(var(--option-index) * 35ms) !important;
  transition:
    transform 0.14s ease,
    filter 0.18s ease,
    opacity 0.18s ease !important;
}
.lc-answer-option.is-correct {
  animation: none !important;
  transform: none !important;
}
.question-enter .lc-question-focus {
  animation-duration: 0.3s !important;
}
.lc-score-team {
  animation-duration: 0.3s !important;
  animation-delay: calc(var(--rank) * 55ms) !important;
}
.lc-time-critical .lc-timer strong {
  animation: none !important;
}
.lc-finished-state {
  min-height: 72vh !important;
  padding: clamp(36px, 6vw, 80px) !important;
  background: rgba(255, 253, 247, 0.94) !important;
  border-width: 6px !important;
  border-radius: 44px !important;
}
.lc-finished-state .lc-loader-ring {
  display: none !important;
}
.lc-finished-state .lc-finished-trophy {
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 1;
  margin-bottom: 16px;
}
.lc-finished-state strong {
  font-size: clamp(3rem, 8vw, 7rem) !important;
  line-height: 1.05;
  color: var(--lc-ink);
  text-shadow: 0 6px 0 #fff;
}
.lc-finished-state span {
  font-size: clamp(1.25rem, 3vw, 2.3rem) !important;
  color: #3e738b !important;
  font-weight: 900;
  margin-top: 18px;
}
@media (prefers-reduced-motion: reduce) {
  .lc-team,
  .lc-answer-option,
  .lc-score-team,
  .question-enter .lc-question-focus,
  .lc-multiplier-bubble.show {
    animation: none !important;
    transition: none !important;
  }
}

/* Phase 7: final celebration and podium */
.lc-celebration-scene[hidden] {
  display: none !important;
}
.lc-celebration-scene {
  position: relative;
  z-index: 5;
  max-width: 1400px;
  min-height: min(88vh, 900px);
  margin: auto;
  padding: clamp(22px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.lc-celebration-heading {
  position: relative;
  z-index: 3;
}
.lc-celebration-heading > span {
  display: inline-flex;
  padding: 9px 18px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: #ffd84d;
  color: #765300;
  box-shadow: 0 6px 0 #d7a919;
  font-weight: 900;
  font-size: clamp(1rem, 2vw, 1.35rem);
}
.lc-celebration-heading h1 {
  margin: 20px 0 5px;
  color: #16445e;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 1;
  text-shadow: 0 7px 0 #fff;
}
.lc-celebration-heading p {
  margin: 10px 0 28px;
  color: #34748a;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 900;
}
.lc-podium {
  position: relative;
  z-index: 3;
  width: min(1080px, 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2vw, 28px);
  direction: ltr;
}
.lc-podium-team {
  width: min(30%, 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  direction: rtl;
  animation: lcPodiumEnter 0.65s cubic-bezier(0.2, 0.9, 0.25, 1.1) both;
}
.lc-podium-rank-1 {
  order: 2;
}
.lc-podium-rank-2 {
  order: 1;
}
.lc-podium-rank-3 {
  order: 3;
}
.lc-podium-mascot {
  font-size: clamp(3.8rem, 8vw, 7rem);
  line-height: 1;
  filter: drop-shadow(0 8px 0 rgba(255, 255, 255, 0.8));
  margin-bottom: 10px;
}
.lc-podium-team > strong {
  max-width: 100%;
  font-size: clamp(1.15rem, 2.2vw, 1.9rem);
  color: #16445e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-podium-score {
  margin: 6px 0 12px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #fff;
  color: #34748a;
  font-weight: 900;
  box-shadow: 0 4px 0 #bee0e9;
}
.lc-podium-block {
  width: 100%;
  min-height: clamp(125px, 18vw, 230px);
  padding: 20px 8px;
  border: 6px solid #fff;
  border-radius: 30px 30px 12px 12px;
  background: #ffd84d;
  box-shadow: 0 11px 0 #d7a919;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #765300;
}
.lc-podium-block b {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}
.lc-podium-block span {
  font-weight: 900;
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
}
.lc-podium-rank-1 .lc-podium-block {
  min-height: clamp(190px, 27vw, 330px);
  background: #ffd84d;
}
.lc-podium-rank-2 .lc-podium-block {
  min-height: clamp(145px, 21vw, 260px);
  background: #e9f1f5;
  box-shadow: 0 11px 0 #a9c5d0;
  color: #4f7180;
}
.lc-podium-rank-3 .lc-podium-block {
  min-height: clamp(115px, 17vw, 210px);
  background: #f4b77e;
  box-shadow: 0 11px 0 #c98148;
  color: #76421e;
}
.lc-celebration-actions {
  position: relative;
  z-index: 4;
  margin-top: 25px;
}
.lc-sound-button {
  appearance: none;
  border: 4px solid #fff;
  border-radius: 20px;
  padding: 12px 20px;
  background: #36c6ee;
  color: #123f56;
  box-shadow: 0 6px 0 #168aac;
  font:
    900 1rem Tajawal,
    sans-serif;
  cursor: pointer;
}
.lc-sound-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #168aac;
}
.lc-sound-button.needs-interaction {
  animation: lcSoundHint 1.4s ease-in-out 2;
}
.lc-confetti {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.lc-confetti i {
  position: absolute;
  top: -12%;
  left: var(--x);
  font-style: normal;
  font-size: clamp(0.7rem, 1.5vw, 1.3rem);
  color: hsl(calc(var(--rotation) + 30), 85%, 55%);
  animation: lcConfettiFall var(--duration) linear var(--delay) 2 both;
  transform: rotate(var(--rotation));
}
@keyframes lcPodiumEnter {
  from {
    opacity: 0;
    transform: translateY(70px) scale(0.92);
  }
}
@keyframes lcConfettiFall {
  to {
    transform: translateY(112vh) rotate(calc(var(--rotation) + 720deg));
  }
}
@keyframes lcSoundHint {
  50% {
    transform: scale(1.06);
  }
}
@media (max-width: 700px) {
  .lc-celebration-scene {
    padding: 18px 8px;
  }
  .lc-podium {
    gap: 5px;
  }
  .lc-podium-team {
    width: 32%;
  }
  .lc-podium-block {
    border-width: 4px;
    border-radius: 20px 20px 8px 8px;
    padding: 12px 4px;
  }
  .lc-podium-team > strong {
    font-size: 0.95rem;
  }
  .lc-podium-score {
    font-size: 0.75rem;
    padding: 4px 7px;
  }
  .lc-celebration-heading p {
    margin-bottom: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lc-podium-team,
  .lc-confetti i,
  .lc-sound-button.needs-interaction {
    animation: none !important;
  }
}

.lc-next-question-button {
  appearance: none;
  border: 4px solid #fff;
  border-radius: 22px;
  padding: 14px 28px;
  margin: 12px auto 0;
  background: #ffd84d;
  color: #16445e;
  box-shadow: 0 7px 0 #d5a91d;
  font:
    900 1.1rem Tajawal,
    sans-serif;
  cursor: pointer;
  display: block;
}
.lc-next-question-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #d5a91d;
}
.lc-next-question-button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.lc-next-question-button[hidden] {
  display: none !important;
}

.essay-question-hint {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px dashed rgba(242, 193, 78, 0.35);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(242, 193, 78, 0.06);
}
.roster-grade-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}
.roster-grade-tools span {
  color: var(--muted);
  font-size: 0.88rem;
}
.student-submission-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  margin-bottom: 9px;
}
.student-submission-card .student-row {
  border: 0;
  margin: 0;
  border-radius: 0;
}
.student-submission-card.is-removed {
  opacity: 0.62;
}
.submission-expand {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}
.submission-expand:disabled {
  opacity: 0.35;
  cursor: default;
}
.submission-group-label {
  display: block;
  color: var(--gold2) !important;
  margin-top: 3px;
}
.submission-details {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}
.submission-question {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.submission-question:last-of-type {
  border-bottom: 0;
}
.submission-question-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.submission-question-head span {
  font-size: 0.82rem;
  color: var(--muted);
}
.submission-question p {
  margin: 7px 0 9px;
  line-height: 1.7;
}
.student-answer > span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.student-answer > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  white-space: pre-wrap;
  line-height: 1.75;
}
.submission-empty {
  padding: 15px;
  color: var(--muted);
}
.remove-from-submission {
  margin-top: 12px;
  color: #ff9f9f !important;
}

/* Academic year / semester class sections */
.academic-setup-panel {
  margin-top: 18px;
}
.academic-setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.academic-setup-grid label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--text);
}
.academic-setup-grid input,
.academic-setup-grid select {
  min-height: 46px;
}
.academic-setup-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.academic-setup-actions small {
  color: var(--muted);
}
.academic-sections-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.academic-section-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}
.academic-section-card > div:first-child {
  display: grid;
  gap: 4px;
}
.academic-section-card > div:first-child span {
  color: var(--muted);
  font-size: 0.9rem;
}
.academic-section-card.is-archived {
  opacity: 0.62;
}
.academic-section-code {
  display: grid;
  gap: 2px;
  text-align: center;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(242, 193, 78, 0.08);
  border: 1px solid rgba(242, 193, 78, 0.2);
}
.academic-section-code small {
  color: var(--muted);
}
.academic-section-code b {
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--gold2);
}
.academic-section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 860px) {
  .academic-setup-grid {
    grid-template-columns: 1fr 1fr;
  }
  .academic-section-card {
    grid-template-columns: 1fr;
  }
  .academic-section-code {
    text-align: right;
    justify-self: start;
  }
}
@media (max-width: 560px) {
  .academic-setup-grid {
    grid-template-columns: 1fr;
  }
}

/* task countdown */
.task-countdown {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(242, 193, 78, 0.25);
  font-weight: 800;
  font-size: 0.84rem;
}
.task-countdown::before {
  content: "⏱";
}
.task-countdown.is-expired {
  opacity: 0.8;
  border-color: rgba(255, 100, 100, 0.32);
}
.task-countdown-inline {
  font-weight: 900;
}
.task-countdown-inline.is-expired {
  opacity: 0.75;
}

/* NTF Class notification dialogs */
.notification-dialog {
  width: min(680px, calc(100% - 24px));
}
.notification-form {
  display: grid;
  gap: 14px;
}
.notification-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.notification-form input,
.notification-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  outline: none;
}
.notification-form input:focus,
.notification-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.12);
}
.notification-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.notification-result {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.8;
}
.notification-dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.notification-status-dialog {
  width: min(760px, calc(100% - 24px));
}
.notification-status-list {
  display: grid;
  gap: 9px;
  max-height: 58vh;
  overflow: auto;
  padding-inline-end: 3px;
}
.notification-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}
.notification-student {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.notification-student strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-status-icon {
  font-size: 1.05rem;
}
.notification-status-badge {
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.notification-status-badge.received {
  background: rgba(53, 190, 120, 0.12);
  border-color: rgba(53, 190, 120, 0.35);
}
.notification-status-badge.pending {
  background: rgba(242, 193, 78, 0.1);
  border-color: rgba(242, 193, 78, 0.32);
}
.notification-status-badge.failed {
  background: rgba(239, 83, 80, 0.1);
  border-color: rgba(239, 83, 80, 0.32);
}
.notification-status-badge.disabled {
  opacity: 0.7;
}
.notification-status-empty {
  border: 1px dashed var(--line);
  border-radius: 15px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 600px) {
  .notification-status-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .notification-status-badge {
    white-space: normal;
  }
  .notification-dialog-actions > * {
    width: 100%;
  }
}

/* Shared push activation + direct message action */
.push-permission-card {
  margin-top: 14px;
  margin-bottom: 14px;
}
.push-permission-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.push-permission-content strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}
.push-permission-content p {
  margin: 0;
  color: var(--muted, #687386);
}
.student-message-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .push-permission-content {
    align-items: stretch;
    flex-direction: column;
  }
}

.paste-attempt-info{margin-top:9px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;font-size:.88rem;color:var(--muted)}.paste-attempt-info strong{color:var(--text)}
