:root {
  --bg: #f3f5f8;
  --bg-soft: #e8edf3;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #122033;
  --muted: #5f6d80;
  --line: #d7dee8;
  --primary: #4aa663;
  --primary-strong: #368a4d;
  --primary-soft: #e7f5ea;
  --success: #0f8a5f;
  --warning: #b56c00;
  --danger: #bd2f3f;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow: 0 10px 32px rgba(10, 26, 45, 0.08);
}

* { box-sizing: border-box; }

html {
  font-family: "Manrope", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fbfd 0%, #eef2f7 100%);
}

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

img {
  display: block;
  max-width: 100%;
}

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

.app-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, rgba(74, 166, 99, 0.18), transparent 30%),
    radial-gradient(circle at 85% 100%, rgba(54, 138, 77, 0.14), transparent 38%);
}

.app-frame {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
}

.app-shell--guest .app-frame {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar,
.card,
.student-card,
.auth-card,
.projector-sidebar,
.projector-question {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #78c88c);
}

.brand p,
.sidebar__footer p,
.hero__text,
.empty-state,
.list-row p,
.table__row p {
  margin: 0;
  color: var(--muted);
}

.nav-links,
.stack {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link--active {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-soft);
}

.nav-link--accent {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
}

.nav-link--accent:hover {
  background: var(--primary-strong);
  color: #fff;
}

.sidebar__footer {
  display: grid;
  gap: 10px;
}

.main-content {
  display: grid;
  gap: 18px;
  align-content: start;
  padding-bottom: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff, #f2fbf4);
  border: 1px solid #d5ecd9;
  box-shadow: var(--shadow);
}

.hero h1,
.section-heading h1,
.section-heading h2,
.card h2,
.student-card h1,
.auth-card h1 {
  margin: 0;
  line-height: 1.2;
}

.hero h1 {
  max-width: 14ch;
  margin-top: 6px;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
}

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

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

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.metric-card span,
.eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

.card {
  padding: 20px;
}

.card--soft { background: var(--surface-soft); }

.card--danger {
  border-color: #efc0c6;
  background: #fff6f7;
}

.card--narrow {
  max-width: 820px;
}

.card--interactive {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(12, 27, 49, 0.1);
}

.card--hero {
  text-align: center;
  padding: 36px 24px;
}

.card--qr {
  text-align: center;
}

.section-heading,
.actions,
.student-meta,
.projector-question__meta,
.actions--spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.page-header--compact {
  padding: 0 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.page-header--plain {
  border: 0;
  background: transparent;
  padding: 8px 0 6px;
}

.page-header__intro {
  display: grid;
  gap: 6px;
  max-width: 70ch;
}

.page-header__intro h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.1vw, 2.1rem);
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-header__actions--right {
  margin-left: auto;
  justify-content: flex-end;
}

.content-grid {
  display: grid;
  gap: 14px;
}

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

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

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

.metric-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.metric-tile span {
  display: inline-block;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.metric-tile strong {
  display: block;
  margin-top: 7px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--primary:hover {
  background: var(--primary-strong);
}

.button--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.button--ghost:hover {
  background: var(--surface-soft);
}

.button--full {
  width: 100%;
}

.field {
  display: grid;
  gap: 7px;
}

.field input,
.field select,
.field textarea,
.option-row input[type="text"],
.option-row input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus,
.button:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid #6fbe82;
  outline-offset: 1px;
}

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

.option-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.option-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.option-list li:last-child {
  border-bottom: 0;
}

.stack-list {
  display: grid;
}

.resource-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.resource-row:last-child {
  border-bottom: 0;
}

.resource-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.resource-row__action {
  color: var(--primary);
  font-weight: 600;
}

.list-row,
.table__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.table__row {
  grid-template-columns: 1.4fr 1fr 1fr auto;
}

.table__row--3 {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.table__row:last-child,
.list-row:last-child {
  border-bottom: 0;
}

.table-shell {
  display: grid;
  gap: 10px;
}

.table-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.table-head--3 {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.table-body {
  display: grid;
}

.empty-block {
  display: grid;
  gap: 10px;
  justify-items: start;
  text-align: left;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e0f1e5;
  color: #255a32;
}

.badge--info,
.badge--lobby {
  background: #e0f1e5;
  color: #28693a;
}

.badge--in_progress {
  background: #e9f8f2;
  color: var(--success);
}

.badge--finished {
  background: #fff3e5;
  color: var(--warning);
}

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

.media-grid img {
  border-radius: 10px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-grid--compact img {
  aspect-ratio: 4 / 3;
}

.video-card,
.answer-callout,
.notice-inline {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid #b9dec3;
}

.option-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.checkbox,
.radio-card {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-grid {
  display: grid;
  gap: 8px;
}

.radio-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
}

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

.student-color-option {
  min-height: 78px;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 30, 51, 0.12);
}

.student-color-option.is-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #28693a, 0 8px 20px rgba(13, 30, 51, 0.14);
}

.student-color-option__index {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: rgba(18, 32, 51, 0.3);
}

.student-color-option--1 { background: linear-gradient(135deg, #3d5a80, #6f86c6); }
.student-color-option--2 { background: linear-gradient(135deg, #2a9d8f, #79c2a5); }
.student-color-option--3 { background: linear-gradient(135deg, #e76f51, #f4a261); }
.student-color-option--4 { background: linear-gradient(135deg, #9c6644, #dda15e); }
.student-color-option--5 { background: linear-gradient(135deg, #7b2cbf, #c77dff); }
.student-color-option--6 { background: linear-gradient(135deg, #006d77, #83c5be); }
.student-color-option--7 { background: linear-gradient(135deg, #bc4749, #f28482); }
.student-color-option--8 { background: linear-gradient(135deg, #264653, #2a9d8f); }

.option-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kahoot-question {
  background: #fff;
  border: 1px solid #dbe2ee;
  border-radius: 0;
  box-shadow: 0 12px 24px rgba(10, 28, 50, 0.08);
}

.kahoot-question__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #dbe2ee;
}

.kahoot-question__title-wrap h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.35rem, 2.8vw, 2.5rem);
  color: #111827;
}

.kahoot-question__progress {
  margin: 0 0 6px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.kahoot-pill {
  min-width: 92px;
  min-height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.kahoot-pill--timer {
  background: #7c3aed;
  border-color: transparent;
  color: #fff;
}

.kahoot-pill--answers {
  background: #fff;
  border: 3px solid #111827;
  color: #111827;
}

.kahoot-pill--answers strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.kahoot-pill--answers span {
  display: block;
  margin-top: 3px;
  font-size: 0.85rem;
  font-weight: 700;
}

.kahoot-question__media {
  min-height: min(38vh, 360px);
  display: grid;
  place-items: center;
  padding: 16px;
  background: #f3f4f6;
}

.kahoot-question__media img {
  width: min(100%, 760px);
  max-height: min(34vh, 320px);
  object-fit: cover;
  border-radius: 8px;
}

.kahoot-question__placeholder {
  width: min(100%, 760px);
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  color: #d9c4ff;
  background:
    linear-gradient(180deg, #7c50bf, #7c50bf),
    linear-gradient(150deg, transparent 62%, #45218f 62%),
    linear-gradient(210deg, transparent 65%, #4f2aa0 65%);
}

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

.kahoot-option {
  min-height: 104px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  color: #fff;
  font-size: clamp(1.05rem, 2.2vw, 1.8rem);
  font-weight: 700;
}

.kahoot-option__symbol {
  width: 40px;
  font-size: 1.45em;
  line-height: 1;
}

.kahoot-option__text {
  flex: 1;
}

.kahoot-option--1 { background: #e41e4f; }
.kahoot-option--2 { background: #1f6fd8; }
.kahoot-option--3 { background: #d9a106; }
.kahoot-option--4 { background: #2e9b25; }

.option-card {
  min-height: 96px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.option-card--1 { background: linear-gradient(135deg, #3d5a80, #5d79bc); }
.option-card--2 { background: linear-gradient(135deg, #1e8f82, #57b89d); }
.option-card--3 { background: linear-gradient(135deg, #de6345, #ef9254); }
.option-card--4 { background: linear-gradient(135deg, #7b5e3b, #b78a50); }

.projector-shell {
  min-height: 100vh;
  padding: 18px;
  color: var(--text);
  background: #fff;
}

.projector-layout {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
}

.projector-layout--single {
  grid-template-columns: 1fr;
}

.projector-sidebar,
.projector-question {
  background: rgba(14, 33, 22, 0.86);
  border-color: rgba(150, 206, 167, 0.34);
  color: #e9f6ed;
}

.projector-main,
.projector-stage {
  display: grid;
  gap: 16px;
  align-content: start;
}

.projector-stage--question-only {
  min-height: calc(100vh - 220px);
  align-content: center;
}

.projector-stage--question-only .kahoot-question {
  width: min(100%, 1100px);
  justify-self: center;
}

.projector-main--single {
  min-height: calc(100vh - 36px);
  align-content: center;
}

.projector-stage .card {
  color: var(--text);
}

.projector-sidebar .card {
  color: var(--text);
}

.projector-stage--lobby-split {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
  justify-items: stretch;
}

.lobby-qr-pane,
.lobby-info-pane {
  min-height: calc(100vh - 72px);
}

.lobby-qr-pane {
  display: grid;
  place-items: center;
  place-content: center;
  gap: 18px;
  text-align: center;
}

.lobby-info-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 36px;
  text-align: center;
}

.lobby-meta {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.lobby-count {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
}

.lobby-class {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.projector-question h2 {
  margin: 10px 0;
  font-size: clamp(1.5rem, 3vw, 2.7rem);
}

.timer {
  min-width: 96px;
  padding: 9px 12px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  color: #000;
  border: 1px solid rgba(188, 229, 199, 0.46);
  background: rgba(192, 233, 203, 0.24);
}

.timer--small {
  color: var(--text);
  border-color: var(--line);
  background: #eff3fa;
}

.qr-card {
  display: inline-block;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
}

.qr-card--huge {
  padding: 20px;
  margin: 0 auto;
}

.qr-card--huge svg {
  width: min(46vw, 1200px) !important;
  max-width: 100%;
  height: auto;
  display: block;
}

.lobby-qr-pane .qr-card--huge {
  width: min(100%, 960px);
}

.lobby-qr-pane .qr-card--huge svg {
  width: 100% !important;
  margin: 0 auto;
}

.qr-caption {
  margin: 0;
}

.join-link {
  word-break: break-all;
  color: rgba(237, 244, 255, 0.86);
}

.join-link--dark {
  color: var(--text);
  font-weight: 600;
}

.join-link--large {
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.25;
}

.actions--center {
  justify-content: center;
}

.lobby-info-pane .actions--center {
  justify-content: center;
}

.actions form {
  margin: 0;
}

.button--hero {
  min-width: min(100%, 320px);
  padding: 15px 24px;
  font-size: 1.15rem;
}

.student-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #fff;
  overflow: hidden;
}

.student-screen {
  width: min(100%, 560px);
  min-height: calc(100dvh - 32px);
  display: grid;
  align-items: center;
}

.student-screen--kahoot {
  width: 100%;
  min-height: calc(100dvh - 32px);
}

.student-screen--kahoot > div {
  width: 100%;
  height: 100%;
}

.student-card,
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.waiting-state {
  text-align: center;
  padding: 18px 8px;
}

.student-card--wide {
  width: min(100%, 640px);
}

.student-question h2 {
  margin: 0;
  font-size: 1.2rem;
}

.student-kahoot-stage {
  min-height: calc(100dvh - 32px);
  width: 100%;
}

.student-kahoot-form {
  min-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  overflow: hidden;
}

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

.student-kahoot-meta__question {
  font-weight: 700;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: #fff;
  background: #111827;
  border-radius: 999px;
  padding: 8px 14px;
}

.student-kahoot-meta__timer {
  min-width: 90px;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  color: #fff;
  background: #7c3aed;
  text-align: center;
}

.student-kahoot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.student-kahoot-option {
  border: 0;
  border-radius: 18px;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-shadow: 0 10px 30px rgba(10, 28, 50, 0.16);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.student-kahoot-option__symbol {
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
  color: #fff;
  font-weight: 800;
}

.student-kahoot-option.is-selected {
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 8px #101828, 0 10px 30px rgba(10, 28, 50, 0.2);
}

.student-kahoot-option--1 { background: #e41e4f; }
.student-kahoot-option--2 { background: #1f6fd8; }
.student-kahoot-option--3 { background: #d9a106; }
.student-kahoot-option--4 { background: #2e9b25; }
.student-kahoot-option--5 { background: #f97316; }
.student-kahoot-option--6 { background: #0ea5a6; }
.student-kahoot-option--7 { background: #7c3aed; }
.student-kahoot-option--8 { background: #ef4444; }

.student-kahoot-form--text {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  justify-items: center;
  gap: 6px;
}

.student-kahoot-textarea-wrap {
  width: min(100%, 900px);
  height: min(46vh, 420px);
  min-height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: text;
  padding: 0;
  margin: 0;
  overflow: hidden;
  align-self: center;
}

.student-kahoot-textarea {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  outline: none;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.2;
}

.student-kahoot-textarea:focus {
  outline: none;
}

.student-answer-preview {
  width: min(100%, 900px);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 10px 14px;
}

.student-answer-preview__label {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.student-answer-preview__value {
  margin: 4px 0 0;
  min-height: 1.35em;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-answer-feedback {
  min-height: 20px;
}

.student-answer-feedback .notice-inline {
  text-align: center;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 16px;
}

.form-shell {
  gap: 16px;
}

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

.panel-title {
  margin: 0;
}

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

.actions--inline {
  justify-content: flex-start;
}

.projector-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.flash {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
  max-width: min(92vw, 400px);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.flash--notice { border-color: #b8ddcf; }
.flash--alert { border-color: #efb9c0; }

@media (max-width: 1140px) {
  .app-frame,
  .projector-layout,
  .hero,
  .grid--2,
  .grid--3,
  .content-grid--2,
  .content-grid--3,
  .metric-strip,
  .projector-stage--lobby,
  .projector-stage--lobby-split {
    grid-template-columns: 1fr;
  }

  .sidebar { order: 2; }

  .lobby-qr-pane,
  .lobby-info-pane {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .app-frame,
  .projector-shell {
    padding: 12px;
    gap: 12px;
  }

  .hero,
  .card,
  .sidebar,
  .student-card,
  .auth-card,
  .projector-sidebar,
  .projector-question {
    padding: 15px;
  }

  .table__row,
  .list-row,
  .option-row,
  .resource-row,
  .table__row--3 {
    grid-template-columns: 1fr;
  }

  .table-head,
  .table-head--3 {
    display: none;
  }

  .actions,
  .actions--spread,
  .page-header,
  .page-header__actions,
  .student-meta,
  .section-heading,
  .projector-question__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .option-grid,
  .media-grid,
  .student-color-grid,
  .kahoot-options {
    grid-template-columns: 1fr;
  }

  .student-kahoot-option {
    min-height: 0;
  }

  .student-kahoot-form {
    gap: 6px;
  }

  .student-kahoot-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .hero__actions .button {
    width: 100%;
  }

  .kahoot-question__header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .kahoot-option {
    min-height: 86px;
    padding: 14px;
  }
}

