:root {
  --bg: #eff5ff;
  --bg-strong: #dde8ff;
  --panel: rgba(251, 253, 255, 0.88);
  --panel-strong: #fdfefe;
  --line: rgba(16, 35, 60, 0.12);
  --ink: #10233c;
  --muted: #516277;
  --accent: #ff6b4a;
  --accent-strong: #db5235;
  --accent-soft: rgba(255, 107, 74, 0.12);
  --teal: #12857c;
  --teal-soft: rgba(18, 133, 124, 0.12);
  --gold: #f4b63f;
  --sky: #5d8bff;
  --sky-soft: rgba(93, 139, 255, 0.14);
  --shadow: 0 24px 70px rgba(16, 35, 60, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 107, 74, 0.16), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(93, 139, 255, 0.22), transparent 20%),
    radial-gradient(circle at 85% 82%, rgba(18, 133, 124, 0.18), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #edf4ff 48%, #edf7f5 100%);
}

a {
  color: inherit;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.background-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.72;
  pointer-events: none;
}

.orb-a {
  top: -80px;
  right: -40px;
  width: 320px;
  height: 320px;
  background: rgba(255, 107, 74, 0.22);
}

.orb-b {
  bottom: -100px;
  left: -50px;
  width: 340px;
  height: 340px;
  background: rgba(93, 139, 255, 0.2);
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 35, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 60, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
  pointer-events: none;
}

.app-header,
.app-main {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 26px 0 18px;
}

.app-header > div:first-child {
  text-align: center;
  margin-inline: auto;
}

.header-status:empty {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
}

.app-header h1 {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  line-height: 0.96;
  max-width: none;
}

.app-title-main,
.app-title-subline {
  display: block;
  white-space: nowrap;
}

.app-title-subline {
  margin-top: 0.16em;
  font-size: 0.68em;
  line-height: 1.05;
}

.header-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 62px;
  gap: 12px;
  flex-wrap: wrap;
}

.app-main {
  padding-bottom: 44px;
  overflow-anchor: none;
}

.hero-card,
.panel,
.stat-card,
.mini-card,
.table-card,
.leaderboard-card,
.question-card,
.attempt-card,
.presentation-card,
.task-card,
.rank-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.hero-card,
.panel,
.table-card,
.leaderboard-card {
  border-radius: var(--radius-xl);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 22px;
  padding: 30px;
}

.hero-copy h2 {
  margin: 0 0 12px;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.94;
}

.hero-copy p,
.support-text,
.muted {
  color: var(--muted);
}

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

.login-options,
.stats-grid,
.two-col,
.three-col,
.four-col,
.cards-grid,
.feature-grid {
  display: grid;
  gap: 18px;
}

.login-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.admin-quiz-browser-column {
  align-self: start;
  position: sticky;
  top: 104px;
}

.panel {
  padding: 24px;
}

.section-title,
h2,
h3 {
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
}

.mini-card,
.stat-card,
.presentation-card,
.task-card,
.rank-card,
.question-card,
.attempt-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.question-card,
.attempt-card {
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.stat-card h3,
.mini-card h3,
.presentation-card h3,
.task-card h3,
.rank-card h3,
.question-card h3,
.attempt-card h3 {
  margin: 0 0 8px;
}

.value {
  display: block;
  margin-top: 10px;
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1;
}

.value.small {
  font-size: 1.35rem;
}

.accent-value {
  color: var(--accent);
}

.teal-value {
  color: var(--teal);
}

.badge-row,
.pill-row,
.rank-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(111, 88, 53, 0.14);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.badge.teal,
.pill.teal {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: rgba(13, 124, 114, 0.14);
}

.badge.accent,
.pill.accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(211, 95, 61, 0.14);
}

.live-admin-shell {
  gap: 20px;
}

.live-stage-card {
  background:
    radial-gradient(circle at top right, rgba(93, 139, 255, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.9));
}

.live-stage-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.live-current-question {
  border: 1px solid rgba(93, 139, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(93, 139, 255, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.9);
}

.live-current-question p:last-child {
  margin-bottom: 0;
}

.live-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.live-action-row .button {
  flex: 0 0 auto;
}

.live-reveal-board {
  border: 1px solid rgba(18, 133, 124, 0.18);
  background:
    radial-gradient(circle at top right, rgba(18, 133, 124, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(244, 255, 252, 0.98), rgba(236, 250, 247, 0.94));
}

.live-reveal-answer-box {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(18, 133, 124, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.live-reveal-groups {
  display: grid;
  gap: 14px;
}

.live-reveal-group {
  display: grid;
  gap: 8px;
}

.live-result-banner {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
  border: 1px solid transparent;
}

.live-result-banner.correct {
  background: rgba(18, 133, 124, 0.12);
  color: var(--teal);
  border-color: rgba(18, 133, 124, 0.2);
}

.live-result-banner.incorrect {
  background: rgba(255, 107, 74, 0.12);
  color: var(--accent);
  border-color: rgba(211, 95, 61, 0.2);
}

.live-option-label {
  align-items: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.live-option-label:hover {
  border-color: rgba(93, 139, 255, 0.24);
  background: rgba(93, 139, 255, 0.08);
}

.live-option-label.is-selected,
.live-option-label:has(input:checked) {
  background: rgba(93, 139, 255, 0.16);
  border-color: rgba(93, 139, 255, 0.48);
  box-shadow: 0 0 0 4px rgba(93, 139, 255, 0.1);
}

.live-admin-option-list {
  margin-top: 16px;
}

.live-admin-option {
  cursor: default;
  align-items: center;
}

.live-admin-option.is-correct {
  background: rgba(18, 133, 124, 0.12);
  border-color: rgba(18, 133, 124, 0.36);
  box-shadow: 0 0 0 4px rgba(18, 133, 124, 0.08);
}

.live-option-label:has(input:focus-visible) {
  outline: 2px solid rgba(93, 139, 255, 0.34);
  outline-offset: 2px;
}

.live-option-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(16, 35, 60, 0.08);
  color: #10233c;
  font-weight: 800;
  flex: 0 0 auto;
}

.live-option-text {
  flex: 1;
  min-width: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

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

.button.primary {
  background: linear-gradient(135deg, var(--accent), #ff8b55);
  color: #fff;
  box-shadow: 0 12px 28px rgba(255, 107, 74, 0.26);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.teal {
  background: linear-gradient(135deg, var(--teal), #1d968c);
  color: #fff;
  box-shadow: 0 12px 28px rgba(18, 133, 124, 0.24);
}

.button.subtle {
  background: transparent;
  color: var(--ink);
  border: 1px dashed rgba(111, 88, 53, 0.2);
}

.button.danger {
  background: rgba(211, 95, 61, 0.12);
  color: var(--accent);
  border: 1px solid rgba(211, 95, 61, 0.16);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.login-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  background:
    radial-gradient(circle at top right, rgba(93, 139, 255, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92));
}

.login-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -20px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  transform: rotate(18deg);
  border: 14px solid rgba(255, 107, 74, 0.12);
}

.login-card-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(16, 35, 60, 0.08);
  color: var(--sky);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-simple {
  display: grid;
  gap: 28px;
  max-width: 980px;
  margin: clamp(12px, 3vw, 28px) auto 0;
  padding: clamp(26px, 4vw, 36px);
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(255, 107, 74, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(93, 139, 255, 0.18), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.94));
}

.landing-simple-header {
  display: grid;
  justify-items: center;
}

.landing-student-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.landing-student-header .landing-simple-title {
  max-width: none;
  text-align: left;
}

.landing-admin-shortcut,
.landing-admin-shortcut.button {
  position: static;
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  align-self: start;
  justify-self: end;
  padding: 8px 12px;
}

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

.landing-student-first {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.landing-student-first::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./assets/landing-physics-wide.png") center center / cover no-repeat;
  z-index: 0;
  transform: scale(1.02);
  filter: saturate(1.18) contrast(1.06) brightness(1.04);
}

.landing-student-first::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.48));
  z-index: 1;
}

.landing-student-first > * {
  position: relative;
  z-index: 2;
}

.landing-student-first .login-card {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 24px 60px rgba(17, 30, 55, 0.12);
  backdrop-filter: blur(14px) saturate(1.08);
}

.landing-simple-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.landing-simple-options {
  align-items: stretch;
}

.landing-simple .login-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  text-align: left;
}

.landing-simple .login-card h3 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
}

.landing-simple .grid-actions {
  margin-top: auto;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  min-width: 0;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.tab-button-label {
  min-width: 0;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.tab-button-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.tab-button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.tab-button.active .tab-button-badge {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.full .field,
.field.full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 35, 60, 0.15);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(93, 139, 255, 0.22);
  border-color: rgba(93, 139, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(93, 139, 255, 0.08);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.anti-bot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.calculator-display {
  text-align: right;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.calculator-button {
  min-height: 54px;
  border-radius: 18px;
  padding: 12px;
}

.note-editor {
  min-height: 320px;
}

.inline-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.table-card {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(111, 88, 53, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: none;
}

.rank-table td:first-child,
.rank-table th:first-child {
  width: 72px;
}

.rank-table td,
.rank-table th,
.rank-table td strong,
.rank-table td .muted,
.stat-card h3,
.mini-card h3,
.presentation-card h3,
.task-card h3,
.rank-card h3,
.question-card h3,
.attempt-card h3,
.support-text,
.muted,
.kpi,
.kpi strong,
.badge,
.pill,
.notice,
.inline-note {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.stats-view td,
.stats-view th,
.stats-view td strong,
.stats-view td .muted,
.stats-view h3,
.stats-view p,
.stats-view .badge,
.stats-view .value {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(111, 88, 53, 0.18);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
}

.split-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.split-header > * {
  min-width: 0;
}

.presentation-group {
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.76);
  box-shadow: var(--shadow);
}

.presentation-preview-panel {
  display: grid;
  gap: 16px;
}

.presentation-frame-shell {
  position: relative;
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(111, 88, 53, 0.12);
  background: rgba(255, 255, 255, 0.85);
}

.presentation-frame-shell.document-mode {
  min-height: clamp(480px, 82dvh, 1100px);
  height: clamp(480px, 82dvh, 1100px);
}

.presentation-frame-shell.canvas-mode {
  height: auto;
  min-height: 0;
  padding: 16px;
  overflow: visible;
}

.presentation-frame-shell.image-mode {
  overflow: hidden;
}

.presentation-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  background: #fff;
}

.presentation-frame-fallback {
  min-height: clamp(480px, 78dvh, 1080px);
}

.presentation-preview-image {
  display: block;
  width: 100%;
  max-height: 82dvh;
  object-fit: contain;
  background: #fff;
}

.presentation-pdf-viewer {
  display: grid;
  gap: 16px;
}

.presentation-pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.presentation-nav-button {
  min-width: 124px;
}

.presentation-pdf-page-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16, 35, 60, 0.08);
  color: #10233c;
  font-weight: 700;
  white-space: nowrap;
}

.presentation-pdf-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.presentation-pdf-stage {
  display: grid;
  justify-items: center;
  min-height: 240px;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.presentation-pdf-page {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.presentation-pdf-page-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.presentation-pdf-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(111, 88, 53, 0.14);
  background: #fff;
  box-shadow: 0 18px 40px rgba(16, 33, 59, 0.08);
}

.presentation-preview-slide-image {
  display: block;
  width: 100%;
  max-width: min(100%, 980px);
  height: auto;
  max-height: min(78dvh, 1100px);
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(111, 88, 53, 0.14);
  background: #fff;
  box-shadow: 0 18px 40px rgba(16, 33, 59, 0.08);
}

.presentation-frame-shell.has-student-watermark .presentation-frame,
.presentation-frame-shell.has-student-watermark .presentation-preview-image,
.presentation-frame-shell.has-student-watermark .presentation-preview-slide-image,
.presentation-frame-shell.has-student-watermark .presentation-pdf-canvas {
  position: relative;
  z-index: 1;
}

.presentation-watermark-target {
  position: relative;
  display: inline-grid;
  justify-items: center;
  max-width: 100%;
}

.presentation-frame-shell.image-mode .presentation-watermark-target,
.presentation-frame-shell.document-mode .presentation-watermark-target {
  width: 100%;
}

.presentation-pdf-page .presentation-watermark-target {
  width: fit-content;
}

.presentation-watermark-target > .presentation-frame,
.presentation-watermark-target > .presentation-preview-image,
.presentation-watermark-target > .presentation-preview-slide-image,
.presentation-watermark-target > .presentation-pdf-canvas {
  position: relative;
  z-index: 1;
}

.presentation-watermark-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.presentation-watermark-stamp {
  display: block;
  width: min(168%, 1800px);
  color: rgba(16, 35, 60, 0.075);
  font-size: clamp(1.55rem, 3.5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  transform: rotate(-19deg);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.28);
}

.split-header h2,
.split-header h3,
.section-title {
  margin: 0;
}

.section-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.watermark-layer {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  pointer-events: none;
  z-index: 5;
  opacity: 0.14;
  font-size: clamp(2rem, 9vw, 5.5rem);
  font-weight: 800;
  transform: rotate(-18deg);
  color: rgba(31, 42, 55, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.protected-mode .watermark-layer {
  display: grid;
}

.student-welcome-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 27, 46, 0.42);
  backdrop-filter: blur(8px);
  z-index: 28;
}

.student-welcome-card {
  width: min(100%, 620px);
  padding: clamp(24px, 3vw, 34px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background:
    radial-gradient(circle at top right, rgba(255, 160, 122, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(72, 198, 239, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 239, 0.98));
  box-shadow: 0 28px 80px rgba(17, 30, 55, 0.24);
  text-align: center;
}

.student-welcome-card h3 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.student-welcome-card .badge-row {
  justify-content: center;
  margin-bottom: 18px;
}

.student-welcome-card .button {
  min-width: 150px;
}

.student-welcome-quote {
  margin: 0 0 20px;
  font-size: clamp(1.02rem, 2.2vw, 1.24rem);
  line-height: 1.7;
  color: var(--ink);
}

.live-winners-card {
  max-width: 540px;
}

.live-winners-list {
  margin: 18px 0 20px;
  text-align: left;
}

.protection-shield {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 252, 247, 0.98);
  z-index: 30;
}

.protection-shield.active {
  display: flex;
}

.protection-shield-card {
  width: min(100%, 560px);
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(111, 88, 53, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 239, 0.98));
  box-shadow: 0 24px 60px rgba(31, 42, 55, 0.12);
  text-align: center;
}

.protection-shield-card h3 {
  margin: 0 0 12px;
}

.protection-shield-card .badge-row {
  justify-content: center;
  margin-top: 16px;
}

.protected-mode {
  -webkit-touch-callout: none;
}

.protected-mode * {
  user-select: none;
}

.protected-mode input,
.protected-mode textarea {
  user-select: text;
}

.question-options {
  display: grid;
  gap: 10px;
}

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

.option-label,
.input-answer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(111, 88, 53, 0.14);
  background: rgba(255, 255, 255, 0.78);
}

.option-label input,
.input-answer input {
  flex: 0 0 auto;
}

.selection-only .option-label {
  position: relative;
  justify-content: center;
  min-height: 58px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  user-select: none;
}

.selection-only .option-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.selection-only .option-label span {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.selection-only .option-label:hover {
  border-color: rgba(93, 139, 255, 0.24);
  background: rgba(93, 139, 255, 0.08);
}

.selection-only .option-label.is-selected,
.selection-only .option-label:has(input:checked) {
  background: rgba(93, 139, 255, 0.16);
  border-color: rgba(93, 139, 255, 0.48);
  box-shadow: 0 0 0 4px rgba(93, 139, 255, 0.1);
}

.selection-only .option-label:has(input:focus-visible) {
  outline: 2px solid rgba(93, 139, 255, 0.34);
  outline-offset: 2px;
}

.quiz-meta,
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.attempt-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 12;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(31, 42, 55, 0.92);
  color: #fff;
  box-shadow: 0 16px 42px rgba(31, 42, 55, 0.22);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

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

.kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  min-width: 0;
}

.kpi {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(16, 35, 60, 0.1);
  min-width: 124px;
}

.kpi strong {
  display: block;
  font-size: 1.15rem;
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(18, 133, 124, 0.08);
  border: 1px solid rgba(18, 133, 124, 0.16);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.request-image-wrap {
  margin: 14px 0 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(111, 88, 53, 0.12);
}

.request-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.quiz-question-image-wrap {
  margin: 14px 0 4px;
  padding: 10px;
  width: min(100%, 520px);
  min-height: 220px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(111, 88, 53, 0.12);
  contain: layout paint;
}

.quiz-question-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: #fff;
  transform: translateZ(0);
}

.note-warning {
  background: rgba(255, 107, 74, 0.1);
  border-color: rgba(255, 107, 74, 0.18);
}

.landing-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 107, 74, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(93, 139, 255, 0.18), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 250, 255, 0.92));
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 1px dashed rgba(16, 35, 60, 0.1);
  pointer-events: none;
}

.hero-copy-energetic {
  position: relative;
  z-index: 1;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(16, 35, 60, 0.07);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-stage {
  position: relative;
  display: grid;
  gap: 16px;
  z-index: 1;
}

.hero-scene {
  position: relative;
  min-height: 255px;
  padding: 18px;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(16, 35, 60, 0.94), rgba(29, 65, 112, 0.94));
  color: #fff;
  box-shadow: 0 18px 40px rgba(16, 35, 60, 0.24);
}

.scene-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 8px;
  width: min(76%, 270px);
  padding: 20px;
  text-align: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(93, 139, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.scene-core strong {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  letter-spacing: 0.08em;
}

.scene-core-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.scene-core span:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.scene-orbit {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
}

.orbit-1 {
  top: 20px;
  left: 20px;
}

.orbit-2 {
  top: 28%;
  right: 16px;
}

.orbit-3 {
  bottom: 18px;
  left: 16%;
}

.hero-sticker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-sticker {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(16, 35, 60, 0.1);
  box-shadow: var(--shadow);
}

.sticker-coral {
  background: linear-gradient(180deg, rgba(255, 239, 234, 0.98), rgba(255, 247, 242, 0.98));
}

.sticker-teal {
  background: linear-gradient(180deg, rgba(231, 250, 247, 0.98), rgba(244, 255, 253, 0.98));
}

.sticker-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 700;
}

.hero-sticker strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.hero-sticker p {
  margin: 0;
  color: var(--muted);
}

.feature-chip-card {
  background: rgba(255, 255, 255, 0.9);
}

.feature-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--sky-soft);
  border: 1px solid rgba(93, 139, 255, 0.16);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.energetic-notice {
  background: linear-gradient(180deg, rgba(255, 245, 240, 0.94), rgba(255, 251, 248, 0.94));
}

.landing-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 249, 255, 0.9));
}

.login-shell {
  align-items: stretch;
}

.login-panel {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.95));
}

.login-aside {
  align-content: start;
}

.login-demo-card,
.physics-mood-card {
  background: rgba(255, 255, 255, 0.9);
}

.login-notice {
  background: linear-gradient(180deg, rgba(237, 250, 248, 0.94), rgba(245, 255, 253, 0.94));
}

.physics-mood-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.formula-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(16, 35, 60, 0.08);
  color: var(--ink);
  font-weight: 700;
}

.note-preview-box {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(111, 88, 53, 0.12);
  background: rgba(255, 255, 255, 0.72);
  white-space: pre-wrap;
  line-height: 1.6;
  word-break: break-word;
}

.note-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.note-details[open] summary {
  margin-bottom: 10px;
}

.criteria-card {
  margin-top: 4px;
}

.monthly-champion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.monthly-champion-card {
  border: 1px solid rgba(16, 35, 60, 0.12);
  background: rgba(255, 255, 255, 0.74);
}

.monthly-champion-summary,
.monthly-champion-empty {
  display: grid;
  gap: 10px;
}

.monthly-champion-alias {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  color: #10233c;
}

.monthly-champion-empty {
  color: #304864;
}

.progress-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(93, 139, 255, 0.22);
  background:
    radial-gradient(circle at top right, rgba(93, 139, 255, 0.18), transparent 32%),
    radial-gradient(circle at left center, rgba(18, 133, 124, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(7, 19, 40, 0.92), rgba(18, 34, 68, 0.88));
  color: #eef6ff;
}

.progress-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.18;
  pointer-events: none;
}

.progress-card .eyebrow,
.progress-card h3,
.progress-card strong {
  position: relative;
  z-index: 1;
}

.progress-card .muted {
  position: relative;
  z-index: 1;
  color: rgba(227, 239, 255, 0.78);
}

.progress-level-chip {
  position: relative;
  z-index: 1;
  min-width: 96px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(147, 197, 253, 0.24);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(93, 139, 255, 0.16));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 0 28px rgba(93, 139, 255, 0.18);
  text-align: center;
}

.progress-level-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.progress-level-label {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224, 236, 255, 0.84);
}

.progress-bar-shell {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  overflow: hidden;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  background: rgba(7, 16, 34, 0.68);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.28);
}

.progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(18, 133, 124, 0.92), rgba(93, 139, 255, 0.98) 58%, rgba(244, 182, 63, 0.98));
  box-shadow: 0 0 22px rgba(93, 139, 255, 0.36);
}

.progress-meta-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.streak-card {
  background:
    radial-gradient(circle at top left, rgba(244, 182, 63, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(93, 139, 255, 0.2), transparent 34%),
    radial-gradient(circle at bottom left, rgba(18, 133, 124, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(5, 17, 38, 0.95), rgba(17, 34, 68, 0.9));
}

.streak-level-chip {
  min-width: 110px;
}

.streak-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.streak-segment {
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(157, 178, 204, 0.16);
  background:
    linear-gradient(145deg, rgba(52, 69, 96, 0.5), rgba(20, 33, 56, 0.66));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.streak-segment.is-filled {
  border-color: rgba(255, 214, 91, 0.45);
  background:
    linear-gradient(90deg, rgba(255, 166, 51, 0.98), rgba(255, 214, 91, 0.98) 52%, rgba(93, 139, 255, 0.94));
  box-shadow:
    0 0 20px rgba(255, 191, 73, 0.26),
    0 0 34px rgba(93, 139, 255, 0.18);
}

.streak-reward-banner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 214, 91, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 214, 91, 0.16), rgba(93, 139, 255, 0.16));
  color: #ffffff;
  box-shadow: 0 0 24px rgba(255, 214, 91, 0.14);
}

.survey-card {
  background:
    radial-gradient(circle at top right, rgba(93, 139, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom left, rgba(18, 133, 124, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
}

.survey-question-text {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #12324f;
}

.survey-options-list {
  display: grid;
  gap: 10px;
}

.survey-option-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.84);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.survey-option-label:hover {
  border-color: rgba(93, 139, 255, 0.34);
  box-shadow: 0 12px 30px rgba(14, 58, 104, 0.08);
  transform: translateY(-1px);
}

.survey-option-label input {
  margin-top: 3px;
}

.survey-lock-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(93, 139, 255, 0.2);
  background: linear-gradient(135deg, rgba(93, 139, 255, 0.08), rgba(18, 133, 124, 0.1));
}

.survey-results-block {
  gap: 14px;
}

.survey-results-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.survey-results-list {
  display: grid;
  gap: 12px;
}

.survey-result-row {
  display: grid;
  gap: 6px;
}

.survey-result-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.survey-result-bar {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(226, 232, 240, 0.72);
}

.survey-result-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(18, 133, 124, 0.92), rgba(93, 139, 255, 0.96) 62%, rgba(244, 182, 63, 0.92));
  box-shadow: 0 0 18px rgba(93, 139, 255, 0.18);
}

.survey-admin-card .grid-actions {
  margin-top: 8px;
}

.survey-form-actions,
.survey-admin-actions {
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.survey-form-actions .button,
.survey-admin-actions .button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 42px;
  padding: 10px 16px;
  align-self: flex-start;
}

.survey-form-actions .button.primary {
  box-shadow: 0 10px 24px rgba(255, 107, 74, 0.18);
}

.leaderboard-rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  min-width: 0;
}

.leaderboard-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(18, 133, 124, 0.16), rgba(93, 139, 255, 0.18));
  border: 1px solid rgba(93, 139, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 700;
  color: #0e3a68;
  white-space: nowrap;
}

.leaderboard-title-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #44566e;
  white-space: normal;
}

.monthly-archive-table td {
  vertical-align: top;
}

.criteria-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(16, 35, 60, 0.12);
  border-radius: 18px;
  background: rgba(237, 244, 255, 0.7);
}

.criteria-panel p {
  margin: 0;
  color: #304864;
  line-height: 1.6;
}

.criteria-panel p + p {
  margin-top: 8px;
}

.criteria-factor-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.criteria-factor-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(16, 35, 60, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
}

.criteria-factor-table th,
.criteria-factor-table td {
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.criteria-factor-table th {
  font-size: 13px;
  color: #10233c;
  background: rgba(16, 35, 60, 0.08);
}

.criteria-factor-table td {
  color: #304864;
  border-top: 1px solid rgba(16, 35, 60, 0.08);
}

@media (max-width: 1040px) {
  .hero-card,
  .feature-grid,
  .login-options,
  .stats-grid,
  .three-col,
  .four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-sticker-grid {
    grid-template-columns: 1fr;
  }

  .monthly-champion-grid {
    grid-template-columns: 1fr;
  }

  .admin-quiz-browser-column {
    position: static;
    top: auto;
  }
}

@media (max-width: 820px) {
  .app-header {
    flex-direction: column;
    padding-top: 22px;
  }

  .hero-card,
  .feature-grid,
  .login-options,
  .two-col,
  .three-col,
  .four-col,
  .stats-grid,
  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .panel,
  .hero-card {
    padding: 20px;
  }

  .landing-simple {
    padding: 22px;
    gap: 22px;
  }

  .landing-simple-title {
    max-width: 12ch;
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .landing-student-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  .landing-student-header .landing-simple-title {
    max-width: none;
  }

  .landing-student-first::before {
    background: url("./assets/landing-physics-tall.png") center top / cover no-repeat;
    filter: saturate(1.16) contrast(1.05) brightness(1.03);
  }

  .landing-student-first::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.54));
  }

  .landing-student-first .login-card {
    background: rgba(255, 255, 255, 0.5);
  }

  .live-stage-meta {
    flex-direction: column;
  }

  .landing-admin-shortcut,
  .landing-admin-shortcut.button {
    margin-left: 0;
    width: auto;
    min-width: 0;
    padding: 7px 11px;
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .button {
    width: 100%;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 2px 8px;
    margin: 0 -2px 20px;
    scrollbar-width: thin;
  }

  .tabs .tab-button {
    width: auto;
    min-width: max-content;
  }

  .grid-actions,
  .live-action-row,
  .hero-actions {
    flex-direction: column;
  }

  .live-action-row .button {
    width: 100%;
  }

  .hero-scene {
    min-height: 220px;
  }

  th,
  td {
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .app-header,
  .app-main {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .app-header h1 {
    max-width: none;
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .header-status {
    justify-content: flex-start;
  }

  .hero-card,
  .panel {
    border-radius: 22px;
  }

  .mini-card,
  .stat-card,
  .presentation-card,
  .task-card,
  .rank-card,
  .question-card,
  .attempt-card {
    padding: 16px;
  }

  .split-header {
    gap: 12px;
  }

  .split-header .button,
  .split-header a.button {
    width: 100%;
  }

  .badge-row,
  .pill-row,
  .rank-pills {
    gap: 6px;
  }

  .badge,
  .pill {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .kpi-strip {
    flex-direction: column;
  }

  .kpi {
    min-width: 0;
    width: 100%;
  }

  .table-card table {
    min-width: 620px;
  }

  .progress-level-chip {
    width: 100%;
    max-width: 160px;
    margin-inline: auto;
  }

  .progress-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .presentation-frame-shell.document-mode {
    min-height: 72dvh;
    height: 72dvh;
  }

  .presentation-frame-shell.canvas-mode {
    padding: 12px;
  }

  .presentation-watermark-layer {
    padding: 18px 12px;
  }

  .presentation-watermark-stamp {
    width: 172%;
    font-size: 1.15rem;
    letter-spacing: 0.16em;
  }

  .presentation-pdf-toolbar {
    justify-content: center;
  }

  .presentation-nav-button {
    flex: 1 1 140px;
  }

  .notice,
  .inline-note,
  td,
  th,
  p,
  h2,
  h3 {
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }

  .scene-core {
    width: min(82%, 250px);
    padding: 18px;
  }

  .scene-orbit {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .hero-mini-badge,
  .feature-chip,
  .badge,
  .pill {
    font-size: 0.8rem;
  }

  .student-welcome-overlay {
    padding: 16px;
  }

  .student-welcome-card {
    border-radius: 24px;
    padding: 22px 18px;
  }

  .toast {
    right: 10px;
    left: 10px;
    bottom: 12px;
    max-width: none;
    min-width: 0;
  }
}

@media (orientation: landscape) and (min-width: 760px) {
  .landing-student-first {
    min-height: clamp(520px, 56vw, 760px);
  }

  .landing-student-first::before {
    background-image: url("./assets/landing-physics-wide.png");
    background-position: center center;
    background-size: contain;
    transform: none;
  }

  .landing-student-first::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.4));
  }
}

.landing-student-first::before {
  background-image: url("./assets/landing-physics-wide.jpg");
}

@media (max-width: 760px) {
  .landing-student-first::before {
    background-image: url("./assets/landing-physics-tall.jpg");
  }
}

@media (orientation: landscape) and (min-width: 760px) {
  .landing-student-first::before {
    background-image: url("./assets/landing-physics-wide.jpg");
  }
}

.landing-student-options {
  justify-content: center;
  gap: 18px;
}

.landing-student-options .login-card {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

@media (orientation: landscape) and (min-width: 760px) {
  .landing-student-first {
    max-width: 920px;
    min-height: clamp(430px, 48vw, 540px);
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .landing-student-options {
    grid-template-columns: repeat(2, minmax(230px, 280px));
  }

  .landing-simple .login-card {
    min-height: 190px;
  }

  .landing-student-first::before {
    background-image: url("./assets/landing-physics-wide.jpg");
    background-position: center center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    transform: none;
  }

  .landing-student-first::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.34));
  }
}

@media (orientation: landscape) and (min-width: 760px) {
  .landing-student-first {
    max-width: 960px;
    min-height: clamp(410px, 44vw, 500px);
  }

  .landing-student-first::before {
    background-image: url("./assets/landing-physics-wide.jpg");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
  }
}
.admin-student-action-stack {
  display: grid;
  gap: 8px;
}

.admin-student-action-stack .button {
  width: 100%;
  white-space: nowrap;
}
