:root {
  --teal: #07958f;
  --teal-strong: #008f8a;
  --teal-dark: #087b78;
  --teal-soft: #e9f8f6;
  --teal-soft-2: #f1fbfa;
  --ink: #111827;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #8a94a6;
  --line: #dde3ea;
  --panel: #ffffff;
  --page: #f7f9fb;
  --warning: #f59e0b;
  --warning-bg: #fff4df;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
}

/* Raise-hand activity */
.raise-hand-editor-note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: var(--teal-soft-2);
}

.raise-hand-editor-note img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.raise-hand-editor-note div {
  display: grid;
  gap: 5px;
}

.raise-hand-editor-note strong,
.raise-hand-editor-note p {
  margin: 0;
}

.raise-hand-editor-note strong {
  color: #123735;
  font-size: 17px;
}

.raise-hand-editor-note p {
  max-width: 52ch;
  color: #466864;
  line-height: 1.6;
}

.raise-hand-prompt-block > span small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.raise-hand-editor-preview {
  width: min(760px, 100%);
  height: min(430px, 100%);
  min-height: 320px;
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
}

.raise-hand-editor-preview::after,
.live-response-results.raise-hand-live-stage::after {
  display: none;
}

.raise-hand-preview-person,
.raise-hand-preview-next {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.raise-hand-preview-person span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  font-size: 58px;
}

.raise-hand-preview-person strong {
  color: #123735;
  font-size: 21px;
}

.raise-hand-preview-person button {
  min-width: 84px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.raise-hand-preview-next {
  position: absolute;
  left: calc(50% + 92px);
  top: 45%;
  opacity: 0.42;
  transform: scale(0.72);
}

.raise-hand-preview-next span {
  font-size: 48px;
}

.student-raise-hand-content {
  min-height: calc(100vh - 72px);
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 28px var(--student-content-inline) max(48px, env(safe-area-inset-bottom));
  text-align: center;
}

.student-raise-hand-content .student-question-pill {
  justify-self: start;
}

.student-raise-hand-prompt {
  max-width: 34ch;
  margin: 32px 0 24px;
  color: #344054;
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}

.student-raise-hand-avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--student-mint);
  font-size: 70px;
}

.student-raise-hand-content h1 {
  max-width: 16ch;
  margin: 28px 0 10px;
  color: #123735;
  font-size: 30px;
  line-height: 1.28;
  text-wrap: balance;
}

.student-raise-hand-detail {
  max-width: 30ch;
  margin: 0;
  color: #667085;
  font-size: 16px;
  line-height: 1.6;
}

.student-raise-hand-position {
  margin-top: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--student-teal-dark);
  background: var(--student-mint);
  font-size: 14px;
  font-weight: 800;
}

.student-raise-hand-auto {
  margin: 12px 0 0;
  color: var(--student-teal-dark);
  font-size: 16px;
  font-weight: 800;
}

.student-raise-hand-button {
  width: 148px;
  height: 148px;
  margin-top: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--student-teal);
  box-shadow: 0 8px 0 #087f70;
  font-size: 34px;
  font-weight: 900;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease;
}

.student-raise-hand-button:hover {
  transform: translateY(-2px);
}

.student-raise-hand-button:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #087f70;
}

.student-raise-hand-button:disabled {
  color: #667085;
  background: #e5e7eb;
  box-shadow: none;
}

.student-raise-hand-content.is-answering {
  justify-items: stretch;
  text-align: left;
}

.student-raise-hand-content.is-answering .student-raise-hand-prompt,
.student-raise-hand-content.is-answering .student-raise-hand-avatar,
.student-raise-hand-content.is-answering > h1,
.student-raise-hand-content.is-answering > .student-raise-hand-detail {
  justify-self: center;
  text-align: center;
}

.student-raise-hand-content.is-answering .student-raise-hand-avatar {
  width: 72px;
  height: 72px;
  font-size: 46px;
}

.student-raise-hand-content.is-answering .student-raise-hand-prompt {
  margin: 20px 0 14px;
  font-size: 16px;
}

.student-raise-hand-content.is-answering > h1 {
  margin: 14px 0 6px;
  font-size: 25px;
}

.student-raise-hand-composer {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #dce7e5;
}

.student-raise-hand-composer > label {
  position: relative;
  display: grid;
  gap: 8px;
}

.student-raise-hand-composer > label > span,
.student-raise-hand-upload-head strong {
  color: #253041;
  font-size: 15px;
  font-weight: 800;
}

.student-raise-hand-composer textarea {
  min-height: 132px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #ccd7dc;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
}

.student-raise-hand-composer textarea::placeholder {
  color: #667085;
}

.student-raise-hand-composer textarea:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.28);
  outline-offset: 2px;
  border-color: var(--student-teal);
}

.student-raise-hand-composer label small {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #667085;
  font-size: 12px;
}

.student-raise-hand-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-raise-hand-upload-head span {
  color: #667085;
  font-size: 12px;
}

.student-raise-hand-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.student-raise-hand-previews:empty {
  display: none;
}

.student-raise-hand-previews figure {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 10px;
  background: #eef3f4;
}

.student-raise-hand-previews img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-raise-hand-previews button {
  width: 32px;
  height: 32px;
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 24, 39, 0.78);
  font-size: 20px;
}

.student-raise-hand-upload {
  min-height: 48px;
}

.student-raise-hand-progress {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--student-teal-dark);
  font-size: 13px;
  line-height: 1.5;
}

.student-raise-hand-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: 10px;
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10;
  padding-top: 4px;
  background: #fff;
}

.student-raise-hand-actions button {
  min-height: 54px;
  margin: 0;
}

.live-response-results.raise-hand-live-stage {
  width: min(1160px, calc(100vw - 120px));
  height: clamp(360px, calc(100vh - 404px), 620px);
  height: clamp(360px, calc(100dvh - 404px), 620px);
  min-height: 0;
  align-self: center;
  overflow: hidden;
}

.live-response-results.raise-hand-live-stage.is-answering {
  width: min(1500px, calc(100vw - 180px));
  height: clamp(360px, calc(100vh - 404px), 620px);
  height: clamp(360px, calc(100dvh - 404px), 620px);
}

.temp-live-page[data-live-kind="raise_hand"][data-live-phase="results"],
.temp-live-page[data-live-kind="raise_hand"][data-live-phase="results"] .live-preview-stage {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.raise-hand-live-empty {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.raise-hand-live-empty img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  opacity: 0.84;
}

.raise-hand-live-empty strong {
  color: #123735;
  font-size: 36px;
}

.raise-hand-live-empty span {
  color: #667085;
  font-size: 18px;
}

.raise-hand-live-waiting {
  display: grid;
  justify-items: center;
  transform: translateY(-30px);
}

.raise-hand-live-waiting strong {
  font-size: 48px;
  line-height: 1.2;
  transform-origin: center;
  will-change: opacity, transform;
  animation: raiseHandWaitingBreath 1.2s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}

@keyframes raiseHandWaitingBreath {
  from {
    opacity: 0.72;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

.raise-hand-live-queue {
  height: 100%;
  position: relative;
  display: grid;
  place-items: center;
}

.raise-hand-live-primary {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.raise-hand-live-avatar {
  width: 228px;
  height: 228px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f8f6;
  font-size: 144px;
  animation: raiseHandHeadFloat 2.8s linear infinite;
}

.raise-hand-live-primary > strong {
  color: #123735;
  font-size: 58px;
  line-height: 1.2;
}

.raise-hand-live-primary > em {
  color: #667085;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
}

.raise-hand-live-primary > button,
.raise-hand-answer-actions button {
  min-width: 132px;
  min-height: 50px;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 18px;
  font-weight: 800;
}

.raise-hand-live-primary > button:disabled,
.raise-hand-answer-actions button:disabled {
  color: #667085;
  background: #e5e7eb;
}

.raise-hand-live-secondary {
  position: absolute;
  left: calc(50% + 260px);
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 6px;
  opacity: 0.42;
  transform: translateY(-50%) scale(0.76);
  transform-origin: left center;
}

.raise-hand-live-secondary span {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef3f4;
  font-size: 68px;
}

.raise-hand-live-secondary strong {
  color: #344054;
  font-size: 25px;
}

.raise-hand-live-more {
  position: absolute;
  bottom: 16px;
  margin: 0;
  color: #667085;
  font-size: 17px;
  font-weight: 700;
}

@keyframes raiseHandHeadFloat {
  0%, 100% { transform: translate(0, 3px); }
  12.5% { transform: translate(0.7px, 2.3px); }
  25% { transform: translate(1px, -1.5px); }
  37.5% { transform: translate(0.7px, -5.3px); }
  50% { transform: translate(0, -6px); }
  62.5% { transform: translate(-0.7px, -5.3px); }
  75% { transform: translate(-1px, -1.5px); }
  87.5% { transform: translate(-0.7px, 2.3px); }
}

@supports selector(:has(*)) {
  .temp-live-page:has(.live-qr-panel.is-open) .live-response-results.raise-hand-live-stage.is-answering {
    width: min(1450px, calc(100vw - 470px));
    transform: translateX(clamp(170px, 10vw, 220px));
  }
}

.raise-hand-answer-layout {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  gap: 24px;
}

.raise-hand-answer-queue {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 12px 20px 0;
}

.raise-hand-answer-queue > strong {
  color: #344054;
  font-size: 16px;
}

.raise-hand-answer-queue > div {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.raise-hand-answer-queue article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f3f6f7;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1), opacity 350ms ease;
}

.raise-hand-answer-queue article.is-current {
  color: #123735;
  background: #e9f8f6;
}

.raise-hand-answer-queue article.is-completing {
  opacity: 0;
  transform: translateY(-36px);
}

.raise-hand-answer-queue article > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 31px;
}

.raise-hand-answer-queue article div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.raise-hand-answer-queue article strong,
.raise-hand-answer-queue article em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raise-hand-answer-queue article strong {
  font-size: 15px;
}

.raise-hand-answer-queue article em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.raise-hand-answer-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dce7e5;
  border-radius: 16px;
  background: #fff;
}

.raise-hand-answer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 50px;
}

.raise-hand-answer-actions button {
  min-width: 132px;
  min-height: 50px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #344054;
  font-size: 16px;
  font-weight: 800;
}

.raise-hand-answer-frame {
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  aspect-ratio: 4 / 3;
  justify-self: center;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f4f7f8;
}

.raise-hand-answer-text,
.raise-hand-answer-placeholder {
  z-index: 2;
  margin: 0;
  padding: 14px 18px;
  color: #1f2937;
  background: #fff;
  font-size: 20px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.raise-hand-answer-placeholder {
  color: #667085;
  font-size: 16px;
  text-align: center;
}

.raise-hand-image-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.84);
}

.raise-hand-answer-text + .raise-hand-image-toolbar,
.raise-hand-answer-placeholder + .raise-hand-image-toolbar {
  top: 76px;
}

.raise-hand-image-toolbar button {
  min-width: 38px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: transparent;
  font-weight: 800;
}

.raise-hand-image-toolbar button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.raise-hand-image-viewport {
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.raise-hand-image-viewport.is-dragging {
  cursor: grabbing;
}

.raise-hand-image-viewport img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  transform-origin: center;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  -webkit-user-drag: none;
}

.raise-hand-image-viewport.is-dragging img {
  transition: none;
}

.raise-hand-image-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 10px 10px;
}

.raise-hand-image-thumbs button {
  width: 60px;
  height: 44px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #dce7e5;
}

.raise-hand-image-thumbs button.is-active {
  border-color: var(--teal);
}

.raise-hand-image-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 980px) {
  .live-response-results.raise-hand-live-stage {
    width: calc(100vw - 48px);
  }

  .live-response-results.raise-hand-live-stage.is-answering {
    width: calc(100vw - 48px);
    height: clamp(340px, calc(100vh - 250px), 580px);
    height: clamp(340px, calc(100dvh - 250px), 580px);
  }

  .raise-hand-answer-layout {
    grid-template-columns: 152px minmax(0, 1fr);
    gap: 14px;
  }

  .raise-hand-live-secondary {
    left: calc(50% + 190px);
  }

  .raise-hand-live-avatar {
    width: 180px;
    height: 180px;
    font-size: 112px;
  }

  .raise-hand-live-primary > strong {
    font-size: 44px;
  }

  .raise-hand-live-waiting strong {
    font-size: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .raise-hand-live-avatar,
  .raise-hand-live-waiting strong {
    animation: none;
  }

  .raise-hand-live-waiting strong {
    opacity: 1;
    transform: none;
    will-change: auto;
  }

  .student-raise-hand-button,
  .raise-hand-answer-queue article,
  .raise-hand-image-viewport img {
    transition-duration: 1ms;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--text);
  background: #fff;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(0, 143, 138, 0.32);
  outline-offset: 2px;
}

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

.class-empty-state,
.student-waiting-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.class-empty-state h3,
.class-empty-state p,
.student-waiting-state h2,
.student-waiting-state p {
  margin: 0;
}

.student-join-panel form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.route-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 100vh;
  color: var(--muted);
  background: var(--page);
}

.route-loading-brand {
  background:
    radial-gradient(circle at center, rgba(40, 219, 199, 0.14), transparent 34%),
    var(--page);
}

.route-loading-icon {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(22, 189, 174, 0.28));
  animation: routeLoadingBreath 2s ease-in-out infinite;
  will-change: transform, filter, opacity;
}

.route-loading p {
  margin: 0;
}

.route-loading-error div {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

@keyframes routeLoadingBreath {
  0%,
  100% {
    opacity: 0.86;
    transform: scale(0.94);
    filter: drop-shadow(0 14px 26px rgba(22, 189, 174, 0.2));
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
    filter: drop-shadow(0 22px 42px rgba(22, 189, 174, 0.36));
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-loading-icon {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.home-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  padding: 48px 0 72px;
  background: #eef9f8;
}

.home-flow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
  contain: strict;
}

@media (prefers-reduced-motion: reduce) {
  .home-flow-canvas {
    opacity: 1;
  }
}

/* Teacher weekly points report */
.points-shell {
  --points-ink: #16263a;
  --points-muted: #5d7181;
  --points-line: #dce7e5;
  --points-soft: #edf8f6;
  --points-teal: #0b9c91;
  --points-blue: #3978d6;
  background: #f6f9fa;
}

.points-content {
  padding: 4px 42px 26px 34px;
}

.points-workspace {
  min-height: 690px;
  height: calc(100vh - 198px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: var(--teacher-panel, rgba(247, 253, 253, 0.52));
  box-shadow: var(--teacher-inset, inset 0 1px 0 rgba(255, 255, 255, 0.96)), var(--teacher-shadow, 0 18px 34px rgba(37, 91, 103, 0.06));
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
  backdrop-filter: blur(24px) saturate(1.14);
}

.points-workspace-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow-y: auto;
  padding: 20px 26px 28px;
  scrollbar-color: rgba(11, 156, 145, 0.34) transparent;
}

.points-toolbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 18px 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(251, 254, 254, 0.58);
}

.points-toolbar-controls {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(180px, 240px) minmax(0, 1fr) minmax(160px, 220px);
  align-items: center;
  gap: 24px;
  padding-left: clamp(32px, 4vw, 64px);
}

.points-toolbar-controls > .points-export {
  grid-column: 4;
}

.points-toolbar label {
  position: relative;
  display: grid;
  gap: 8px;
}

.points-toolbar .points-filter > span {
  color: #435766;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 750;
  text-align: center;
}

.points-class-filter {
  width: 100%;
}

.points-week-filter {
  width: 100%;
}

.points-filter::after {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  right: 18px;
  bottom: 20px;
  border-right: 2px solid #23344e;
  border-bottom: 2px solid #23344e;
  pointer-events: none;
  transform: rotate(45deg);
}

.points-toolbar select {
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  color: var(--points-ink);
  background: rgba(253, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
}

.points-toolbar select {
  width: 100%;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 44px 0 18px;
  color: #23344e;
  font: inherit;
}

.points-toolbar select option {
  color: #23344e;
  background: #fff;
  font: inherit;
}

.points-toolbar select:focus-visible {
  outline: 3px solid rgba(11, 156, 145, 0.18);
  border-color: var(--points-teal);
}

.points-export {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 12px;
  padding-inline: 20px;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.points-export svg {
  width: 18px;
  height: 18px;
}

.points-view-switch {
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 4px;
  background: rgba(226, 239, 238, 0.78);
}

.points-view-switch label {
  min-width: 0;
  display: block;
  cursor: pointer;
}

.points-view-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

.points-view-switch span {
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #48606d;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.points-view-switch label:hover span {
  color: #176e69;
  background: rgba(255, 255, 255, 0.54);
}

.points-view-switch input:checked + span {
  color: #fff;
  background: var(--points-teal);
}

.points-view-switch input:focus-visible + span {
  outline: 3px solid rgba(11, 156, 145, 0.24);
  outline-offset: 2px;
}

.points-view-panel[hidden] {
  display: none;
}

.points-view-panel {
  min-height: 0;
  height: 100%;
  display: grid;
  align-content: stretch;
  overflow: hidden;
}

.points-panel {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: rgba(253, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px rgba(27, 83, 95, 0.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  backdrop-filter: blur(16px) saturate(1.08);
}

.points-participation-panel {
  grid-template-rows: minmax(0, 1fr);
}

.points-participation {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.points-participation-summary {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 26px;
  border-bottom: 1px solid #e3eceb;
}

.points-participation-summary > div {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.points-participation-summary span,
.points-participation-summary p {
  color: #526977;
  font-size: 13px;
}

.points-participation-summary strong {
  color: var(--points-ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.points-participation-summary small {
  margin-left: 3px;
  color: #526977;
  font-size: 12px;
}

.points-participation-summary p {
  margin: 0 0 0 auto;
  text-align: right;
}

.points-participation-table-wrap {
  min-height: 0;
  overflow: auto;
}

.points-participation-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.points-participation-table th,
.points-participation-table td {
  height: 68px;
  padding: 0 26px;
  border-bottom: 1px solid #e8efee;
  color: var(--points-ink);
  text-align: left;
}

.points-participation-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 44px;
  color: #526977;
  background: #f7fbfa;
  font-size: 12px;
  font-weight: 700;
}

.points-participation-table th:first-child {
  width: 38%;
}

.points-participation-table th:nth-child(2) {
  width: 20%;
}

.points-participation-table tbody th {
  font-weight: 400;
}

.points-participation-student {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.points-participation-student i {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #176e69;
  background: #e3f4f1;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.points-participation-student strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-participation-count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.points-participation-count strong {
  font-size: 17px;
}

.points-participation-count small {
  color: #607481;
  font-size: 12px;
}

.points-participation-rate {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 48px;
  align-items: center;
  gap: 14px;
}

.points-participation-track {
  height: 8px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eeec;
}

.points-participation-track i {
  width: calc(var(--points-participation-rate) * 100%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--points-teal);
  transform-origin: left center;
}

.points-participation-rate > strong {
  color: #176e69;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.points-chart-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 24px;
  color: var(--points-muted);
  text-align: center;
}

.points-chart-empty strong {
  color: var(--points-ink);
}

.points-chart-empty span {
  font-size: 13px;
}

.points-ranking-panel {
  grid-template-rows: minmax(0, 1fr);
}

.points-ranking-bars {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding: 22px;
  scrollbar-color: rgba(11, 156, 145, 0.3) transparent;
}

.points-ranking-bar-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(160px, 240px) minmax(220px, 1fr) 78px;
  align-items: center;
  gap: 16px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(247, 251, 250, 0.72);
}

.points-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #536977;
  background: #edf2f3;
  font-variant-numeric: tabular-nums;
}

.points-rank.is-top-1 {
  color: #795900;
  background: #fff1b8;
}

.points-rank.is-top-2 {
  color: #586978;
  background: #e8eef2;
}

.points-rank.is-top-3 {
  color: #87512f;
  background: #f7dfce;
}

.points-student-identity {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.points-student-identity i {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #087a72;
  background: #dff4ef;
  font-style: normal;
  font-weight: 800;
}

.points-student-identity strong {
  overflow: hidden;
  color: var(--points-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-ranking-bar {
  height: 18px;
  overflow: hidden;
  border-radius: 6px;
  background: #e6f0ef;
}

.points-ranking-bar i {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--points-teal);
  transform: scaleX(var(--points-ranking-bar));
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.points-ranking-score {
  color: var(--points-ink);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.points-ranking-score small {
  margin-left: 3px;
  color: var(--points-muted);
  font-size: 0.6875rem;
  font-weight: 650;
}

.points-students-empty {
  min-height: 170px;
  display: grid;
  place-content: center;
  gap: 7px;
  color: var(--points-muted);
  text-align: center;
}

.points-students-empty strong {
  color: var(--points-ink);
}

.points-load-error,
.points-empty-page {
  text-align: center;
}

.points-load-error,
.points-empty-page {
  min-height: 100%;
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 30px;
  background: transparent;
}

.points-load-error strong,
.points-empty-page h2 {
  margin: 0;
  color: var(--points-ink);
}

.points-load-error p,
.points-empty-page p {
  max-width: 52ch;
  margin: 0 0 8px;
  color: var(--points-muted);
}

.points-empty-page > span svg {
  width: 44px;
  color: var(--points-teal);
}

.points-loading {
  min-height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: center;
  gap: 16px;
}

.points-loading div {
  height: 110px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(234, 241, 241, 0.62);
  animation: pointsSkeleton 1.2s ease-in-out infinite alternate;
}

.points-loading p {
  grid-column: 1 / -1;
  color: var(--points-muted);
  text-align: center;
}

@keyframes pointsSkeleton {
  to {
    background: #f3f7f7;
  }
}

@media (max-width: 1120px) {
  .points-content {
    padding: 20px;
  }

  .points-toolbar {
    align-items: end;
    flex-wrap: wrap;
  }

  .points-toolbar-controls {
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-left: 0;
  }

  .points-toolbar-controls > .points-export {
    grid-column: auto;
  }

  .points-view-switch {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .points-content {
    padding: 14px 12px 28px;
  }

  .points-workspace {
    min-height: calc(100vh - 160px);
    height: auto;
    overflow: visible;
    border-radius: 22px;
  }

  .points-workspace-body {
    display: block;
    overflow: visible;
    padding: 16px;
  }

  .points-view-panel {
    min-height: 520px;
    height: clamp(520px, calc(100vh - 180px), 720px);
  }

  .points-participation-summary {
    align-items: flex-start;
    gap: 10px 22px;
    flex-wrap: wrap;
    padding: 16px 18px;
  }

  .points-participation-summary p {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }

  .points-participation-table th,
  .points-participation-table td {
    padding-inline: 18px;
  }

  .points-toolbar {
    padding: 16px;
  }

  .points-toolbar-controls {
    grid-template-columns: 1fr 1fr;
  }

  .points-class-filter {
    grid-column: 1 / -1;
  }

  .points-week-filter,
  .points-view-switch,
  .points-toolbar-controls > .points-export {
    grid-column: 1 / -1;
  }

  .points-toolbar .points-filter {
    width: auto;
  }

  .points-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .points-export {
    justify-content: center;
  }

  .points-ranking-bars {
    padding-inline: 14px;
  }

  .points-ranking-bar-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank student score"
      ". bar bar";
    gap: 8px 12px;
  }

  .points-ranking-bar-row .points-rank {
    grid-area: rank;
  }

  .points-ranking-bar-row .points-student-identity {
    grid-area: student;
  }

  .points-ranking-bar-row .points-ranking-bar {
    grid-area: bar;
  }

  .points-ranking-bar-row .points-ranking-score {
    grid-area: score;
  }
}

@media (prefers-reduced-motion: reduce) {
  .points-ranking-bar i,
  .points-participation-track i,
  .points-view-panel,
  .points-loading div {
    animation: none;
    transition: none;
  }
}

.home-card {
  width: min(680px, calc(100vw - 48px));
  text-align: center;
  z-index: 1;
}

.home-page-auth .home-card {
  width: min(430px, calc(100vw - 48px));
}

.home-brand-image {
  width: min(660px, 100%);
  margin: 0 auto 22px;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: default;
}

.home-brand-image img {
  width: 100%;
  height: auto;
  display: block;
}

.home-page-auth .home-brand-image {
  width: min(220px, 58vw);
  margin-bottom: 18px;
  cursor: pointer;
  animation: authBrandIn 260ms ease both;
}

html[data-home-transition="return"] .home-brand-image {
  view-transition-name: home-return-brand;
}

html[data-home-transition="return"] .auth-panel:not([hidden]) {
  view-transition-name: home-return-auth;
}

html[data-home-transition="return"] .home-actions:not([hidden]) {
  view-transition-name: home-return-actions;
}

html[data-home-transition="return"] {
  overflow: hidden;
}

html[data-home-transition="return"]::view-transition-old(root) {
  opacity: 0;
  animation: none;
}

html[data-home-transition="return"]::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html[data-home-transition="return"]::view-transition-group(home-return-brand) {
  z-index: 3;
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-home-transition="return"]::view-transition-image-pair(home-return-brand),
html[data-home-transition="return"]::view-transition-old(home-return-brand),
html[data-home-transition="return"]::view-transition-new(home-return-brand) {
  mix-blend-mode: normal;
}

html[data-home-transition="return"]::view-transition-old(home-return-auth) {
  animation: homeReturnAuthOut 160ms cubic-bezier(0.4, 0, 1, 1) both;
}

html[data-home-transition="return"]::view-transition-group(home-return-auth) {
  z-index: 1;
}

html[data-home-transition="return"]::view-transition-group(home-return-actions) {
  z-index: 2;
}

html[data-home-transition="return"]::view-transition-new(home-return-actions) {
  animation: homeReturnActionsIn 220ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

.home-return-fallback-exit {
  pointer-events: none;
}

@keyframes homeReturnAuthOut {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes homeReturnActionsIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 33px;
  margin-bottom: 36px;
}

.logo-mark {
  width: 92px;
  height: 92px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, #0aa89e 0%, #008d88 55%, #006f78 100%);
  box-shadow: inset 0 12px 22px rgba(255, 255, 255, 0.2), 0 14px 24px rgba(0, 130, 125, 0.14);
  position: relative;
  flex: none;
}

.logo-mark::before {
  content: "Q";
  font-size: 58px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 26px;
  height: 13px;
  border-radius: 16px 16px 16px 2px;
  background: #fff;
  transform: rotate(36deg);
}

.brand-title {
  margin: 0;
  color: #1f2937;
  font-size: 72px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 5px 9px rgba(17, 24, 39, 0.13);
}

.slogan {
  margin: 0 0 55px;
  color: #596475;
  font-size: 35px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 8px;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  width: 512px;
  max-width: 100%;
  margin: 0 auto;
}

.home-actions[hidden] {
  display: none;
}

.btn {
  height: 44px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: #fff;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: var(--teal-strong);
  border-color: var(--teal-strong);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.btn-outline {
  color: var(--teal);
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--teal);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--teal-soft-2);
}

.home-actions .btn {
  height: 66px;
  border: 1px solid var(--teacher-border, rgba(255, 255, 255, 0.9));
  font-size: 28px;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 18px rgba(37, 91, 103, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

.home-actions .btn-outline {
  border-color: rgba(7, 149, 143, 0.42);
  color: var(--teal-dark);
  background: rgba(253, 255, 255, 0.58);
}

.home-actions .btn-outline:hover {
  border-color: rgba(7, 149, 143, 0.58);
  color: var(--teal-dark);
  background: rgba(242, 251, 249, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 20px rgba(37, 91, 103, 0.1);
}

.home-actions .btn-primary {
  border-color: rgba(7, 149, 143, 0.34);
  color: #fff;
  background: linear-gradient(135deg, rgba(20, 197, 188, 0.88), rgba(7, 149, 143, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 10px 18px rgba(7, 149, 143, 0.18);
}

.home-actions .btn-primary:hover {
  border-color: rgba(7, 149, 143, 0.48);
  background: linear-gradient(135deg, rgba(34, 208, 199, 0.92), rgba(8, 127, 121, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 12px 22px rgba(7, 149, 143, 0.2);
}

.auth-panel {
  width: 386px;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 24px;
  border: 1px solid var(--teacher-border, rgba(255, 255, 255, 0.9));
  border-radius: 24px;
  background: rgba(253, 255, 255, 0.78);
  box-shadow: var(--teacher-inset, inset 0 1px 0 rgba(255, 255, 255, 0.94)), var(--teacher-shadow, 0 18px 34px rgba(37, 91, 103, 0.06));
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  backdrop-filter: blur(24px) saturate(1.12);
  text-align: left;
  animation: authPanelIn 280ms ease-out both;
}

.auth-panel-register {
  width: 430px;
}

.auth-panel-register .legal-acceptance span {
  white-space: nowrap;
}

.auth-panel[hidden] {
  display: none;
}

@keyframes authPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authBrandIn {
  from {
    opacity: 0.82;
    transform: translateY(8px) scale(1.04);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page-auth .home-brand-image,
  .auth-panel {
    animation: none;
  }
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.auth-title {
  margin: 0;
  color: #172033;
  font-size: 21px;
  font-weight: 700;
}

.icon-btn,
.text-btn {
  border: 0;
  background: transparent;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #475569;
  background: var(--teacher-control, rgba(253, 255, 255, 0.66));
}

.icon-btn:hover,
.text-btn:hover {
  background: var(--teacher-control-hover, rgba(253, 255, 255, 0.88));
}

.auth-form {
  display: grid;
  gap: 13px;
}

#teacher-login-panel {
  display: grid;
  gap: 13px;
}

.auth-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--teacher-border, rgba(255, 255, 255, 0.9));
  border-radius: 14px;
  background: rgba(247, 253, 253, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.auth-method-tabs button {
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #52627a;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.auth-method-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
  box-shadow: 0 6px 10px rgba(7, 149, 143, 0.14);
}

.auth-notice {
  border: 1px solid rgba(7, 149, 143, 0.22);
  border-radius: 12px;
  background: rgba(237, 250, 250, 0.74);
  color: #087b78;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.auth-forgot {
  justify-self: center;
}

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

.field label {
  color: #374151;
  font-size: 14px;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--teacher-border, rgba(255, 255, 255, 0.9));
  border-radius: 12px;
  padding: 0 13px;
  color: var(--text);
  background: var(--teacher-control, rgba(253, 255, 255, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.field select {
  padding-right: 36px;
}

.field input::placeholder {
  color: #6b788c;
}

.field input:focus,
.field select:focus {
  border-color: rgba(7, 149, 143, 0.42);
  background: var(--teacher-control-hover, rgba(253, 255, 255, 0.88));
}

.field input.invalid,
.field select.invalid {
  border-color: #dc2626;
}

.field-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.class-week-select {
  position: relative;
}

.class-week-select-trigger {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--teacher-border, rgba(255, 255, 255, 0.9));
  border-radius: 12px;
  padding: 0 22px 0 16px;
  color: var(--text);
  background: var(--teacher-control, rgba(253, 255, 255, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.class-week-select-trigger:hover,
.class-week-select-trigger[aria-expanded="true"] {
  border-color: rgba(7, 149, 143, 0.42);
  background: var(--teacher-control-hover, rgba(253, 255, 255, 0.88));
}

.class-week-select-trigger:focus-visible {
  outline: 3px solid rgba(18, 184, 134, 0.2);
  outline-offset: 2px;
}

.class-week-select-trigger.invalid {
  border-color: #dc2626;
}

.class-week-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.class-week-select-trigger span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #253041;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-week-select-trigger span.is-placeholder {
  color: #6b788c;
}

.class-week-select-trigger svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: #344558;
  stroke-width: 2.2;
}

.class-week-select-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(240px, 32vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d7e4e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.class-week-select-menu[hidden] {
  display: none;
}

.class-week-select-option {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #253041;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.class-week-select-option:hover,
.class-week-select-option:focus-visible {
  outline: none;
  color: #087b78;
  background: #eef9f7;
}

.class-week-select-option[aria-selected="true"] {
  color: #087b78;
  background: #e4f6f3;
  font-weight: 700;
}

.auth-error {
  min-height: 18px;
  color: #dc2626;
  font-size: 13px;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 10px;
}

.auth-code-row .btn {
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.auth-panel .btn-primary {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
  box-shadow: 0 8px 12px rgba(7, 149, 143, 0.16);
}

.auth-panel .btn-primary:hover {
  background: linear-gradient(135deg, #22d0c7 0%, #087f79 100%);
  box-shadow: 0 10px 16px rgba(7, 149, 143, 0.18);
}

.auth-panel .btn-outline {
  border-color: var(--teacher-border, rgba(255, 255, 255, 0.9));
  color: #253041;
  background: var(--teacher-control, rgba(253, 255, 255, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 4px 8px rgba(15, 23, 42, 0.04);
}

.auth-panel .btn-outline:hover {
  border-color: rgba(7, 149, 143, 0.36);
  color: var(--teal-dark);
  background: rgba(242, 251, 249, 0.88);
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

.text-btn {
  color: var(--teal);
  padding: 4px 5px;
  border-radius: 4px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px 1fr;
  background: var(--page);
}

.sidebar {
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  height: 88px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 29px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
}

.sidebar-brand .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  box-shadow: none;
}

.sidebar-brand .logo-mark::before {
  font-size: 25px;
}

.sidebar-brand .logo-mark::after {
  right: 6px;
  bottom: 8px;
  width: 11px;
  height: 5px;
}

.nav-list {
  display: grid;
  gap: 18px;
  padding: 38px 16px;
}

.nav-item {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 25px;
  border-radius: 7px;
  border: 0;
  color: #344154;
  background: transparent;
  font-size: 18px;
  text-align: left;
}

.nav-item.active {
  color: var(--teal);
  background: linear-gradient(90deg, #e5f8f5, rgba(239, 250, 248, 0.58));
  font-weight: 700;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--teal);
}

.nav-icon {
  width: 23px;
  height: 23px;
  color: currentColor;
}

.nav-icon-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.nav-item.active .nav-icon-img {
  filter: brightness(0) saturate(100%) invert(50%) sepia(68%) saturate(1532%) hue-rotate(137deg) brightness(91%) contrast(95%);
}

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

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px 0 38px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.account {
  position: relative;
}

.account-btn {
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 16px;
  white-space: nowrap;
}

.account-btn svg {
  width: 18px;
  height: 18px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  display: block;
  object-fit: cover;
  overflow: hidden;
  flex: none;
}

.account-menu,
.more-menu {
  position: absolute;
  z-index: 10;
  min-width: 136px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.account-menu {
  top: 58px;
  right: 0;
  min-width: 168px;
}

.more-menu {
  top: 40px;
  right: 0;
}

.account-menu[hidden],
.more-menu[hidden] {
  display: none;
}

.account-role-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 1px 3px 6px;
  padding: 7px 7px 10px;
  border-bottom: 1px solid #edf1f3;
  color: #667085;
  font-size: 12px;
}

.account-role-label strong {
  color: var(--teal-dark);
  font-size: 13px;
}

.account-role-label span,
.account-role-label strong {
  white-space: nowrap;
}

.menu-item {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: #374151;
  text-align: left;
}

.menu-item:hover {
  background: #f4f7f7;
}

.content {
  max-width: 1305px;
  padding: 34px 30px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: 635px 608px;
  gap: 22px;
  align-items: stretch;
}

.section-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.classes-panel {
  padding: 31px 27px 22px;
}

.interaction-panel {
  padding: 31px 25px 29px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 33px;
}

.section-title {
  margin: 0;
  color: #111827;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.create-class {
  height: 42px;
  min-width: 120px;
  color: var(--teal);
  font-size: 17px;
  font-weight: 600;
}

.class-list {
  display: grid;
}

.class-card {
  display: grid;
  grid-template-columns: 132px 1fr auto 34px;
  align-items: center;
  gap: 23px;
  min-height: 132px;
  border-bottom: 1px solid var(--line);
}

.class-card:first-child {
  margin-top: -7px;
}

.thumb {
  width: 132px;
  height: 96px;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #d7e4e8;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  position: relative;
}

.thumb::before,
.thumb::after {
  content: "";
  position: absolute;
}

.thumb-campus {
  background: linear-gradient(180deg, #8db3c5, #e6d3a6);
}

.thumb-campus::before {
  left: 10px;
  right: 10px;
  bottom: 13px;
  height: 34px;
  border-radius: 3px;
  background: linear-gradient(90deg, #d2b178, #f5e7c8 18% 30%, #b58d59 31% 37%, #f5e7c8 38% 55%, #b58d59 56% 64%, #f5e7c8 65%);
}

.thumb-campus::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background: linear-gradient(90deg, #5f8a65, #d9c781, #557c51);
}

.thumb-library {
  background: linear-gradient(120deg, #f2f3f4, #8b6b48);
}

.thumb-library::before {
  top: 11px;
  right: 13px;
  bottom: 8px;
  width: 62px;
  background: repeating-linear-gradient(90deg, #6d4f35 0 7px, #c4a178 8px 11px);
}

.thumb-city {
  background: linear-gradient(180deg, #8eb6cb, #395c6e 64%, #1e3541);
}

.thumb-city::before {
  left: 9px;
  right: 8px;
  bottom: 12px;
  height: 35px;
  background: repeating-linear-gradient(90deg, #2c4653 0 7px, #7ea3b5 7px 11px, #203743 11px 18px);
}

.thumb-lab {
  background: linear-gradient(120deg, #eef5f6, #aecbd4);
}

.thumb-lab::before {
  left: 21px;
  top: 12px;
  width: 18px;
  height: 58px;
  border-radius: 2px 2px 9px 9px;
  background: linear-gradient(180deg, transparent 0 42%, rgba(11, 165, 175, 0.7) 43%);
  box-shadow: 35px 3px 0 rgba(11, 165, 175, 0.22), 70px 0 0 rgba(11, 165, 175, 0.28);
  border: 2px solid rgba(110, 139, 150, 0.5);
}

.class-info h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
}

.class-info p {
  margin: 0 0 12px;
  color: #667085;
  font-size: 16px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #667085;
  font-size: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 6px;
  border: 0;
  font-size: 15px;
  line-height: 1;
}

.status.live {
  color: var(--teal);
  background: #dff6f4;
}

.status.pending {
  color: #d97706;
  background: var(--warning-bg);
}

.status.ended {
  color: #6b7280;
  background: #f1f2f4;
}

.class-action {
  min-width: 110px;
  height: 45px;
  color: var(--teal);
  font-size: 17px;
  font-weight: 700;
}

.more-wrap {
  position: relative;
}

.more-btn {
  color: #1f2937;
  font-size: 22px;
  font-weight: 700;
}

.view-all {
  width: 188px;
  height: 52px;
  margin: 21px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--teal);
  font-size: 17px;
  font-weight: 600;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.view-all svg {
  width: 18px;
  height: 18px;
}

.interaction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 21px;
  margin-top: 64px;
}

.type-card {
  height: 222px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 27px;
  color: var(--teal);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.type-card:hover {
  border-color: rgba(0, 143, 138, 0.5);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.type-card svg {
  width: 52px;
  height: 52px;
  stroke-width: 2.4;
}

.type-card span {
  color: #111827;
  font-size: 22px;
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.25);
}

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

.save-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
}

.save-modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: 440px;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.member-field-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 13px;
  color: #52627a;
  background: #fff;
  text-align: left;
}

.member-field-button:hover {
  border-color: rgba(7, 149, 143, 0.48);
}

.member-field-button strong {
  color: #07958f;
  white-space: nowrap;
}

.member-modal {
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
}

.activity-overview-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.activity-overview-modal > .modal-foot[hidden],
.activity-overview-modal .btn[hidden],
.activity-overview-select-trigger[hidden] {
  display: none;
}

.activity-overview-subtitle {
  margin: 4px 0 0;
  color: #52627a;
  font-size: 13px;
  line-height: 1.45;
}

.activity-overview-body {
  min-height: 0;
  gap: 14px;
  padding: 16px 22px 6px;
}

.activity-overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.activity-overview-select-trigger {
  min-width: 72px;
  height: 40px;
  padding: 0 16px;
}

.activity-overview-week-control {
  width: 164px;
  min-width: 132px;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: #13253f;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.activity-overview-week-control:hover:not(:disabled) {
  border-color: #7ab9b5;
}

.activity-overview-week-control:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.18);
  outline-offset: 2px;
  border-color: #07958f;
}

.activity-overview-week-control:disabled {
  color: #52627a;
  background: #f3f7f7;
  cursor: default;
}

.activity-overview-selection-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border: 1px solid #cfe4e2;
  border-radius: 10px;
  color: #31504f;
  background: #f1faf9;
  font-size: 13px;
}

.activity-overview-selection-bar[hidden] {
  display: none;
}

.activity-overview-selection-bar label {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
  cursor: pointer;
}

.activity-overview-selection-bar input,
.activity-overview-item-select input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #07958f;
}

.activity-overview-selection-bar input:focus-visible,
.activity-overview-item-select input:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.2);
  outline-offset: 2px;
}

.activity-overview-selection-bar strong {
  color: #076f6b;
  font-size: 13px;
}

.activity-overview-list {
  min-height: 260px;
  max-height: min(470px, calc(100vh - 260px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid #e2eaed;
  scrollbar-gutter: stable;
}

.activity-overview-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-overview-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 4px;
}

.activity-overview-items.is-selecting .activity-overview-item {
  grid-template-columns: 24px 38px minmax(0, 1fr);
}

.activity-overview-item.is-selected {
  background: #f6fbfa;
}

.activity-overview-item + .activity-overview-item {
  border-top: 1px solid #e8eef0;
}

.activity-overview-order {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #076f6b;
  background: #e8f7f5;
  font-size: 14px;
  font-weight: 800;
}

.activity-overview-item-content {
  min-width: 0;
}

.activity-overview-item-select {
  min-width: 24px;
  min-height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.activity-overview-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-overview-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #076f6b;
  background: #edf8f7;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.activity-overview-used {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #5f6f7f;
  background: #eef2f4;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.activity-overview-item p {
  max-width: 70ch;
  margin: 8px 0 0;
  color: #13253f;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.activity-overview-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-overview-item-actions button {
  min-width: 64px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #43556c;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.activity-overview-item-actions button:hover,
.activity-overview-item-actions button:focus-visible {
  color: #076f6b;
  background: #eaf8f6;
}

.activity-overview-item-actions button:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.2);
  outline-offset: 1px;
}

.activity-overview-item-actions svg {
  width: 17px;
  height: 17px;
}

.activity-overview-flow-body {
  min-height: 330px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px 22px;
}

.activity-overview-flow-body[hidden] {
  display: none;
}

.activity-overview-forward-summary {
  display: block;
  max-height: 84px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid #dbe8e6;
  border-radius: 8px;
  color: #172033;
  background: #f7fbfb;
  font-size: 14px;
  line-height: 1.55;
}

.activity-overview-edit-guard {
  min-height: 300px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.activity-overview-edit-guard-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #087f7a;
  background: #e7f7f5;
}

.activity-overview-edit-guard-icon svg {
  width: 25px;
  height: 25px;
}

.activity-overview-edit-guard strong {
  color: #172033;
  font-size: 17px;
}

.activity-overview-edit-guard p {
  max-width: 48ch;
  margin: 0;
  color: #52627a;
  font-size: 14px;
  line-height: 1.65;
}

.activity-overview-state {
  min-height: 258px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  color: #52627a;
  text-align: center;
}

.activity-overview-state strong {
  color: #13253f;
  font-size: 16px;
}

.activity-overview-state p {
  max-width: 48ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.activity-overview-state .btn {
  margin-top: 8px;
}

.activity-overview-loading {
  padding: 3px 4px;
}

.activity-overview-loading > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
}

.activity-overview-loading > div + div {
  border-top: 1px solid #edf1f2;
}

.activity-overview-loading i,
.activity-overview-loading b,
.activity-overview-loading em {
  display: block;
  border-radius: 7px;
  background: linear-gradient(90deg, #edf2f3 25%, #f8fbfb 50%, #edf2f3 75%);
  background-size: 240% 100%;
  animation: activityOverviewLoading 1.2s ease-in-out infinite;
}

.activity-overview-loading i {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.activity-overview-loading span {
  display: grid;
  gap: 10px;
}

.activity-overview-loading b {
  width: 72px;
  height: 22px;
}

.activity-overview-loading em {
  width: min(440px, 82%);
  height: 18px;
}

@keyframes activityOverviewLoading {
  to {
    background-position: -120% 0;
  }
}

.member-modal-subtitle {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #718096;
  font-size: 13px;
}

.member-modal-count {
  color: #52627a;
  font-weight: 700;
}

.member-modal-body {
  min-height: 0;
  max-height: min(520px, calc(100vh - 190px));
  overflow: hidden;
  gap: 8px;
  padding: 14px 22px 4px;
}

.member-modal > .modal-head {
  padding: 18px 22px;
}

.member-modal > .modal-foot {
  padding: 14px 22px 18px;
}

.member-invite-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: 8px;
  background: #f3fbfa;
}

.invitation-qr {
  width: 118px;
  height: 118px;
  flex: none;
  display: grid;
  place-items: center;
  border: 8px solid #fff;
  color: #fff;
  background:
    repeating-conic-gradient(#073c3a 0 25%, #fff 0 50%) 0 0 / 18px 18px;
  box-shadow: 0 0 0 1px #d7e7e5;
}

.invitation-qr span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 4px solid #fff;
  border-radius: 4px;
  background: #07958f;
  font-size: 13px;
  font-weight: 800;
}

.invitation-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.invitation-qr img:not([hidden]) + span {
  display: none;
}

.member-invite-copy {
  display: grid;
  gap: 9px;
  color: #52627a;
}

.member-invite-copy strong {
  color: #071835;
  font-size: 30px;
  letter-spacing: 5px;
}

.member-copy-button {
  width: fit-content;
}

.member-list-columns,
.member-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) 72px;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.member-list-columns {
  padding: 2px 14px 4px;
  color: #718096;
  font-size: 12px;
}

.member-list-columns span:first-child,
.member-identity {
  transform: translateX(-70px);
}

.member-list-columns span:nth-child(2),
.member-note-cell {
  transform: translateX(-80px);
}

.member-list-columns span:nth-child(3),
.member-delete-button {
  transform: translateX(-20px);
}

.member-list {
  min-height: 0;
  max-height: min(432px, calc(100vh - 322px));
  display: grid;
  align-content: start;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.member-list-row {
  min-height: 72px;
  padding: 10px 14px;
}

.member-list-row + .member-list-row {
  border-top: 1px solid var(--line);
}

.member-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.member-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07958f;
  background: #e9f8f6;
  font-size: 21px;
  font-weight: 700;
}

.member-identity strong {
  min-width: 0;
  overflow: hidden;
  color: #182b46;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-note-cell {
  min-width: 0;
  display: grid;
  justify-items: center;
}

.member-note-display {
  max-width: 100%;
  min-height: 34px;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  padding: 6px 9px;
  color: #52627a;
  background: #f4f7f8;
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-note-display:hover,
.member-note-display:focus-visible {
  color: #087b78;
  background: #eaf7f5;
}

.member-note-display.is-empty {
  color: #087b78;
  background: transparent;
}

.member-note-cell form {
  display: grid;
  gap: 5px;
}

.member-note-cell input {
  width: 100%;
  height: 36px;
  border: 1px solid #b8cbc9;
  border-radius: 7px;
  padding: 0 9px;
  color: #23344e;
  background: #fff;
  font-size: 13px;
}

.member-note-cell form > div {
  display: flex;
  gap: 6px;
}

.member-note-cell form button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

.member-note-save {
  color: #fff;
  background: #07958f;
}

.member-note-cancel {
  color: #52627a;
  background: #eef3f4;
}

.member-note-cell .auth-error {
  min-height: 0;
  font-size: 11px;
}

.member-delete-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #718096;
  background: transparent;
  justify-self: center;
}

.member-delete-button:hover,
.member-delete-button:focus-visible {
  color: #dc2626;
  background: #fff5f5;
}

.member-delete-button svg {
  width: 17px;
}

.member-empty {
  min-height: 156px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  color: #718096;
  text-align: center;
}

.member-empty strong {
  color: #334155;
}

.member-empty p {
  margin: 0;
  font-size: 13px;
}

.member-list-loading {
  display: grid;
  gap: 1px;
}

.member-list-loading span {
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f7f9fa 20%, #edf3f3 50%, #f7f9fa 80%);
  background-size: 220% 100%;
  animation: memberLoading 1.2s ease-in-out infinite;
}

.member-list-error {
  min-height: 18px;
  margin-top: -5px;
}

.member-list-error:empty {
  display: none;
}

.member-delete-modal-backdrop {
  z-index: 34;
}

@keyframes memberLoading {
  to {
    background-position: -120% 0;
  }
}

@media (max-width: 720px) {
  .member-modal {
    width: min(100vw - 24px, 720px);
  }

  .activity-overview-backdrop {
    align-items: end;
    padding: 12px;
  }

  .activity-overview-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .activity-overview-body {
    padding: 14px 16px 4px;
  }

  .activity-overview-toolbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .activity-overview-week-control {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .activity-overview-selection-bar {
    gap: 10px;
  }

  .activity-overview-list {
    min-height: 220px;
    max-height: calc(100vh - 302px);
  }

  .activity-overview-item {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
    padding: 16px 2px;
  }

  .activity-overview-items.is-selecting .activity-overview-item {
    grid-template-columns: 24px 38px minmax(0, 1fr);
  }

  .activity-overview-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .activity-overview-item-actions button {
    min-width: 76px;
    min-height: 44px;
    background: #f4f8f8;
  }

  .activity-overview-flow-body {
    min-height: min(390px, calc(100vh - 190px));
    padding: 18px 16px;
  }

  .member-modal-body {
    min-height: 0;
    max-height: calc(100vh - 178px);
    padding: 14px 14px 2px;
  }

  .member-list-columns {
    display: none;
  }

  .member-list {
    max-height: calc(100vh - 268px);
  }

  .member-modal > .modal-head {
    padding: 16px;
  }

  .member-modal > .modal-foot {
    padding: 12px 16px 16px;
  }

  .member-list-row {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px 12px;
    padding: 13px;
  }

  .member-identity {
    grid-column: 1;
    transform: none;
  }

  .member-note-cell {
    grid-column: 1 / -1;
    padding-left: 0;
    transform: none;
  }

  .member-delete-button {
    grid-column: 2;
    grid-row: 1;
    transform: none;
  }
}

/* Public legal documents and agreement consent */
.legal-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #5b6f73;
  font-size: 13px;
  line-height: 1.5;
}

.legal-links a {
  border-radius: 4px;
  color: #256b67;
  text-decoration: none;
}

.legal-links a:hover {
  color: #075f5b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-links a:focus-visible,
.legal-acceptance a:focus-visible,
.legal-version-list a:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.22);
  outline-offset: 3px;
}

.home-legal-links {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 12px;
  flex-wrap: nowrap;
  gap: 6px;
  color: #666;
  font-size: 12px;
  white-space: nowrap;
}

.home-legal-links a {
  color: inherit;
}

.home-legal-links a:hover {
  color: #4b4b4b;
}

.home-legal-links .icp-filing {
  flex-basis: auto;
}



.home-legal-links a:focus-visible {
  outline-color: #666;
}

.legal-acceptance {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: #52627a;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.legal-acceptance input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.legal-acceptance input:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.22);
  outline-offset: 2px;
}

.legal-acceptance a {
  color: #087b78;
  font-weight: 700;
  text-decoration: none;
}

.legal-acceptance a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.student-legal-links {
  width: 100%;
  margin-top: 2px;
}

.student-login-form .legal-acceptance {
  margin-top: 2px;
  text-align: left;
}

.legal-page {
  min-height: 100vh;
  color: #27353c;
  background: #f4faf9;
}

.legal-page-header {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - 960px) / 2));
  border-bottom: 1px solid #dce8e6;
  background: rgba(249, 253, 252, 0.96);
}

.legal-brand,
.legal-back {
  border: 0;
  color: #30464b;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.legal-brand .qingwen-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legal-brand .sidebar-brand-mark {
  width: 38px;
  height: 38px;
}

.legal-brand .sidebar-brand-text {
  color: #263644;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
}

.legal-back {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  padding: 0 10px;
  color: #256b67;
  font-size: 14px;
  font-weight: 700;
}

.legal-back:hover {
  background: #e8f5f3;
}

.legal-back:focus-visible,
.legal-brand:focus-visible,
.legal-consent-exit:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.22);
  outline-offset: 3px;
}

.legal-back svg {
  width: 18px;
  height: 18px;
}

.legal-document {
  width: min(780px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
  color: #33424a;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.legal-document > :first-child {
  margin-top: 0;
}

.legal-document h1,
.legal-document h2,
.legal-document h3 {
  color: #152c30;
  text-wrap: balance;
}

.legal-document h1 {
  margin: 0 0 28px;
  font-size: 32px;
  line-height: 1.3;
}

.legal-document h2 {
  margin: 48px 0 16px;
  padding-top: 4px;
  font-size: 22px;
  line-height: 1.4;
}

.legal-document h3 {
  margin: 30px 0 12px;
  font-size: 18px;
  line-height: 1.5;
}

.legal-document p,
.legal-document ul,
.legal-document ol,
.legal-document blockquote,
.legal-document table {
  margin: 14px 0;
}

.legal-document ul,
.legal-document ol {
  padding-left: 1.55em;
}

.legal-document li + li {
  margin-top: 7px;
}

.legal-document strong {
  color: #20383c;
}

.legal-document blockquote {
  padding: 16px 18px;
  border: 1px solid #cfe5e1;
  border-radius: 12px;
  color: #285e5a;
  background: #eaf7f5;
}

.legal-document blockquote p {
  margin: 0;
}

.legal-document table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-spacing: 0;
  border-collapse: collapse;
  white-space: normal;
}

.legal-document th,
.legal-document td {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid #d8e5e3;
  text-align: left;
  vertical-align: top;
}

.legal-document th {
  color: #244c49;
  background: #eaf5f3;
  font-weight: 750;
}

.legal-document a {
  color: #087b78;
  text-underline-offset: 3px;
}

.legal-page-footer {
  display: flex;
  justify-content: center;
  padding: 24px 20px 36px;
  border-top: 1px solid #dce8e6;
}

.legal-consent-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #eef9f8;
}

.legal-consent-panel {
  width: min(520px, 100%);
  padding: 34px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 8px rgba(37, 91, 103, 0.08);
}

.legal-consent-brand .qingwen-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.legal-consent-brand .sidebar-brand-mark {
  width: 42px;
  height: 42px;
}

.legal-consent-brand .sidebar-brand-text {
  color: #263644;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
}

.legal-consent-panel h1 {
  margin: 28px 0 10px;
  color: #172d31;
  font-size: 26px;
  line-height: 1.35;
}

.legal-consent-panel > p {
  margin: 0;
  color: #5c6f76;
  line-height: 1.7;
}

.legal-version-list {
  margin: 24px 0;
  border-top: 1px solid #dde8e6;
}

.legal-version-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #dde8e6;
}

.legal-version-list dt {
  color: #263b40;
  font-weight: 700;
}

.legal-version-list dd {
  margin: 0;
  color: #697b81;
  font-size: 13px;
}

.legal-version-list a {
  color: #087b78;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.legal-consent-form {
  display: grid;
  gap: 14px;
}

.legal-consent-form .btn-primary {
  width: 100%;
  height: 46px;
  border-radius: 10px;
}

.legal-consent-exit {
  justify-self: center;
  border: 0;
  padding: 5px 8px;
  color: #64748b;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .home-page-auth {
    padding-bottom: 70px;
  }

  .home-legal-links {
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .legal-page-header {
    min-height: 62px;
    padding: 8px 14px;
  }

  .legal-brand .sidebar-brand-mark {
    width: 32px;
    height: 32px;
  }

  .legal-brand .sidebar-brand-text {
    font-size: 19px;
    letter-spacing: 3px;
  }

  .legal-back span {
    display: none;
  }

  .legal-document {
    width: min(100% - 32px, 780px);
    padding: 36px 0 52px;
    font-size: 15px;
    line-height: 1.8;
  }

  .legal-document h1 {
    font-size: 26px;
  }

  .legal-document h2 {
    margin-top: 38px;
    font-size: 20px;
  }

  .legal-document h3 {
    font-size: 17px;
  }

  .legal-document th,
  .legal-document td {
    min-width: 140px;
    padding: 10px 12px;
  }

  .legal-consent-panel {
    padding: 26px 22px;
  }

  .legal-version-list > div {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .legal-version-list a {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-page *,
  .legal-consent-page * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.confirm-copy {
  margin: 0;
  color: #23344e;
  font-size: 16px;
  line-height: 1.7;
}

.confirm-copy span {
  color: #071835;
  font-weight: 700;
}

.modal-body {
  display: grid;
  gap: 15px;
  padding: 20px 22px 8px;
}

.profile-modal-backdrop {
  z-index: 90;
}

.profile-modal {
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.teacher-shell .modal.profile-modal {
  background: #f8fbfc;
}

.profile-modal-head {
  align-items: center;
}

.profile-title-row,
.profile-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.profile-view {
  display: grid;
  gap: 14px;
  padding: 20px 22px 22px;
}

.profile-view[hidden] {
  display: none;
}

.profile-name-form,
.profile-setting-row {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.profile-name-form {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 18px;
  padding: 12px 16px;
}

.profile-setting-row div {
  display: grid;
  gap: 5px;
}

.profile-password-row div {
  align-self: center;
}

.profile-section-head strong,
.profile-setting-row strong {
  color: #172033;
  font-size: 15px;
}

.profile-setting-row span,
.profile-view-copy {
  color: #64748b;
  font-size: 13px;
}

.profile-inline-form,
.profile-code-row {
  display: flex;
  gap: 10px;
}

.profile-inline-form {
  min-width: 0;
}

.profile-name-form .auth-error {
  grid-column: 2;
  min-height: 0;
}

.profile-name-form .auth-error:empty {
  display: none;
}

.profile-inline-form input,
.profile-code-row input {
  min-width: 0;
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
}

.profile-inline-form .btn,
.profile-code-row .btn,
.profile-setting-row .btn {
  flex: none;
  white-space: nowrap;
}

.profile-setting-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.profile-delete-row {
  margin-top: 2px;
  border-color: #efcfcc;
  background: #fffafa;
}

.profile-delete-row strong {
  color: #9f241c;
}

.teacher-shell .profile-modal .profile-delete-button {
  border-color: #d92d20;
  color: #b42318;
  background: #fff;
}

.teacher-shell .profile-modal .profile-delete-button:hover:not(:disabled),
.teacher-shell .profile-modal .profile-delete-button:focus-visible {
  border-color: #b42318;
  color: #8f1d18;
  background: #fff3f2;
}

.profile-delete-modal-backdrop {
  z-index: 94;
}

.profile-delete-confirm {
  width: min(500px, calc(100vw - 48px));
}

.teacher-shell .modal.profile-delete-confirm {
  background: #fff;
}

.profile-delete-confirm .auth-error:empty {
  display: none;
}

.teacher-shell .profile-delete-modal-backdrop .danger-btn {
  border-color: #d92d20;
  color: #fff;
  background: #d92d20;
}

.teacher-shell .profile-delete-modal-backdrop .danger-btn:hover:not(:disabled),
.teacher-shell .profile-delete-modal-backdrop .danger-btn:focus-visible {
  border-color: #b42318;
  color: #fff;
  background: #b42318;
}

.profile-subview {
  gap: 16px;
}

.profile-back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  color: var(--teal);
  background: transparent;
  font-weight: 700;
}

.profile-back svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.profile-view-copy {
  margin: 0;
}

.profile-view-copy strong {
  color: #23344e;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.profile-modal .btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.save-modal {
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

.start-week-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 18px;
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border: 1px solid var(--teacher-border, #d7e4e8);
  border-radius: 16px;
  background: #f8fcfc;
  color: var(--ink);
  box-sizing: border-box;
}

.start-week-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.start-week-loading { padding: 18px 0; color: #475569; }
.start-week-option {
  display: grid;
  gap: 5px;
  padding: 12px 4px;
  border: 1px solid #cbdede;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.start-week-option strong { font-size: 14px; }
.start-week-option span { font-size: 12px; color: #475569; }
.start-week-option:hover:not(:disabled) { border-color: var(--teal); background: #eaf8f6; }
.start-week-option:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.start-week-option:disabled { background: #e9edef; border-color: #e1e6e8; color: #8b969d; cursor: not-allowed; }
.start-week-option:disabled span { color: #8b969d; }
.start-week-popover .week-picker-error:empty { display: none; }

.save-target-card[hidden],
[data-save-target-error]:empty {
  display: none;
}

.save-target-card strong,
.save-target-card span {
  overflow-wrap: anywhere;
  min-width: 0;
}

.save-target-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.save-modal button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.save-modal-body {
  gap: 16px;
  padding: 20px 22px 22px;
}

.save-modal-body[hidden] {
  display: none;
}

.save-modal-copy {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.6;
}

.save-target-grid,
.save-class-list {
  display: grid;
  gap: 12px;
}

.save-target-card,
.save-class-option {
  width: 100%;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #fbfffe;
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.save-target-card:hover,
.save-class-option:hover {
  border-color: var(--teal);
  background: #f2fbf9;
  box-shadow: 0 10px 24px rgba(15, 122, 114, 0.12);
}

.save-target-card:active,
.save-class-option:active {
  transform: translateY(1px);
}

.save-target-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  padding: 15px;
}

.save-target-card svg {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  justify-self: center;
  color: var(--teal);
  stroke-width: 2;
}

.save-target-card strong,
.save-class-option strong,
.save-success-body strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.save-target-card span,
.save-class-option span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.save-class-option {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
}

.week-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
  max-height: min(330px, 42vh);
  overflow-y: auto;
  padding: 2px;
}

.week-picker-option {
  position: relative;
  min-width: 0;
}

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

.week-picker-option span {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid #d7e4e8;
  border-radius: 10px;
  color: #475569;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.week-picker-option input:checked + span {
  border-color: rgba(7, 149, 143, 0.52);
  color: #087b78;
  background: #eaf8f6;
}

.week-picker-option input:focus-visible + span {
  outline: 3px solid rgba(18, 184, 134, 0.2);
  outline-offset: 2px;
}

.week-picker-option:hover span {
  border-color: rgba(7, 149, 143, 0.38);
  background: #f5fbfa;
}

.week-picker-error {
  min-height: 18px;
  margin: 0;
  color: #dc2626;
  font-size: 13px;
}

.save-week-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.save-success-body {
  min-height: 170px;
  place-items: center;
  text-align: center;
}

.save-success-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal-strong);
}

.save-success-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.modal-foot {
  justify-content: flex-end;
  gap: 12px;
}

.danger-btn {
  border-color: #dc2626;
  background: #dc2626;
}

.danger-btn:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  min-width: 196px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 7px;
  color: #fff;
  background: rgba(17, 24, 39, 0.9);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.toast[hidden] {
  display: none;
}

@media (max-width: 720px) {
  html,
  body,
  .home-page,
  .home-card,
  .home-actions .btn,
  .home-brand-image,
  .home-brand-image img {
    color-scheme: only light;
    forced-color-adjust: none;
  }

  .home-page {
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 40px 0 72px;
    background: #eef9f8 !important;
    -webkit-text-fill-color: initial;
  }

  .home-page-auth {
    padding: 24px 0 72px;
  }

  .brand-lockup {
    flex-direction: column;
    gap: 18px;
    margin-bottom: 13px;
  }

  .logo-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .logo-mark::before {
    font-size: 36px;
  }

  .logo-mark::after {
    right: 10px;
    bottom: 12px;
    width: 16px;
    height: 8px;
  }

  .brand-title {
    font-size: 34px;
    text-shadow: none;
  }

  .slogan {
    margin-bottom: 30px;
    font-size: 15px;
    letter-spacing: 2px;
  }

  .home-brand-image {
    width: min(260px, 70vw);
    margin-bottom: 20px;
  }

  .home-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    width: min(280px, 76vw);
  }

  .home-actions .btn {
    height: 44px;
    min-width: 0;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 17px;
  }

  .home-brand-image img {
    opacity: 1;
    -webkit-filter: none !important;
    filter: none !important;
    mix-blend-mode: normal;
  }

  .home-page-auth .home-brand-image {
    width: min(190px, 54vw);
    margin-bottom: 10px;
  }

  .home-actions .btn-outline {
    border-color: rgba(7, 149, 143, 0.42) !important;
    color: var(--teal-dark) !important;
    background: rgba(253, 255, 255, 0.58) !important;
    -webkit-text-fill-color: var(--teal-dark);
  }

  .home-actions .btn-primary {
    border-color: rgba(7, 149, 143, 0.34) !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(20, 197, 188, 0.88), rgba(7, 149, 143, 0.92)) !important;
    -webkit-text-fill-color: #fff;
  }

  .auth-panel {
    margin-top: 12px;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .auth-panel-register .legal-acceptance span {
    white-space: normal;
  }
}

@media (max-height: 820px) {
  .home-page-auth {
    place-items: start center;
    overflow-y: auto;
    padding: 18px 0 72px;
  }

  .home-page-auth .home-brand-image {
    width: min(150px, 44vw);
    height: 112px;
    margin-bottom: 6px;
  }

  .home-page-auth .home-brand-image img {
    height: 100%;
    object-fit: contain;
  }

  .home-page-auth .auth-panel {
    margin-top: 6px;
    padding: 18px;
  }

  .home-page-auth .auth-head {
    margin-bottom: 12px;
  }

  .home-page-auth .auth-form,
  .home-page-auth #teacher-login-panel {
    gap: 10px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }

  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .interaction-grid {
    margin-top: 28px;
  }
}

.teacher-shell {
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
  overflow: hidden;
  background: #f7f9fb;
}

.teacher-shell .sidebar {
  min-height: 100vh;
  border-right: 1px solid #dbe3ec;
  background: #fff;
}

.teacher-shell .sidebar-brand {
  height: 112px;
  padding: 0 30px;
  border-bottom: 0;
  justify-content: center;
  gap: 14px;
  cursor: default;
  flex-wrap: nowrap;
}

.teacher-shell .sidebar-brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: block;
}

.teacher-shell .sidebar-brand-text {
  color: #263644;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 5px;
  white-space: nowrap;
}

.teacher-shell .nav-list {
  gap: 26px;
  padding: 27px 20px 0;
}

.teacher-shell .nav-item {
  min-height: 54px;
  gap: 15px;
  padding: 0 17px;
  border-radius: 5px;
  color: #13243d;
  font-size: 17px;
  font-weight: 500;
}

.teacher-shell .nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #10b7ad 0%, #07958f 100%);
  box-shadow: 0 7px 14px rgba(7, 149, 143, 0.18);
}

.teacher-shell .nav-item.active::before {
  display: none;
}

.teacher-shell .nav-icon {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
}

.teacher-shell .nav-item.active .nav-icon-img {
  filter: brightness(0) invert(1);
}

.teacher-shell .main-area {
  min-width: 0;
  overflow: visible;
}

.teacher-shell .topbar {
  height: 112px;
  padding: 0 30px 0 43px;
  border-bottom: 1px solid #dbe3ec;
  background: #fff;
}

.teacher-shell .top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.teacher-shell .top-icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #071835;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.teacher-shell .top-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.1;
}

.teacher-shell .top-icon:hover {
  background: #f6faf9;
}

.teacher-shell .top-icon-dot::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 0;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff332e;
}

.teacher-shell .account {
  margin-left: 16px;
}

.teacher-shell .account-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.teacher-shell .account-btn svg {
  width: 27px;
  height: 27px;
  color: #071835;
  stroke-width: 2.1;
}

.teacher-shell .account-btn:hover {
  background: #f6faf9;
}

.teacher-shell .account-menu {
  top: 52px;
}

.teacher-shell .content {
  max-width: none;
  padding: 27px 24px 0 23px;
}

.teacher-shell .workbench-grid {
  width: 100%;
  grid-template-columns: minmax(720px, 780px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.teacher-shell .section-panel {
  height: 764px;
  border-color: #dbe3ec;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.teacher-shell .classes-panel {
  display: flex;
  flex-direction: column;
  padding: 30px 21px 23px;
}

.teacher-shell .interaction-panel {
  padding: 30px 28px;
}

.teacher-shell .section-head {
  margin-bottom: 21px;
}

.teacher-shell .section-title {
  font-size: 26px;
  font-weight: 800;
}

.teacher-shell .section-actions {
  gap: 20px;
}

.teacher-shell .temp-class,
.teacher-shell .create-class {
  width: 121px;
  height: 45px;
  padding: 0;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 700;
}

.teacher-shell .class-table-wrap {
  overflow: visible;
  border: 1px solid #e0e6ee;
  border-radius: 7px;
}

.teacher-shell .class-simple-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e6ee;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.teacher-shell .class-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 120px 96px 126px 132px;
  align-items: center;
  justify-items: center;
  gap: 16px;
  padding: 0 20px;
  color: #52627a;
  background: #fbfcfd;
  border-bottom: 1px solid #e0e6ee;
  font-size: 15px;
  font-weight: 700;
}

.teacher-shell .class-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.teacher-shell .class-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: #13243d;
  font-size: 16px;
}

.teacher-shell .class-table th {
  height: 59px;
  padding: 0 8px;
  color: #33445c;
  background: #fbfcfd;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.teacher-shell .class-table th:first-child {
  padding-left: 18px;
}

.teacher-shell .class-table th:nth-child(1) {
  width: 245px;
}

.teacher-shell .class-table th:nth-child(2) {
  width: 100px;
}

.teacher-shell .class-table th:nth-child(3) {
  width: 125px;
}

.teacher-shell .class-table th:nth-child(4) {
  width: 90px;
}

.teacher-shell .class-table th:nth-child(5) {
  width: 65px;
}

.teacher-shell .class-table th:nth-child(6) {
  width: 95px;
}

.teacher-shell .class-table th:nth-child(7) {
  width: 32px;
}

.teacher-shell .class-row {
  min-height: 122px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 120px 96px 126px 132px;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: #fff;
}

.teacher-shell .class-row + .class-row {
  border-top: 1px solid #e0e6ee;
}

.teacher-shell .class-row:hover {
  background: #fbfefd;
}

.teacher-shell .course-name {
  justify-self: center;
  color: #071835;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.teacher-shell .course-class {
  justify-self: center;
  color: #23344e;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.teacher-shell .course-class-wrap {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.teacher-shell .class-members-button {
  border: 0;
  padding: 2px 4px;
  color: #07958f;
  background: transparent;
  font-size: 13px;
}

.teacher-shell .class-members-button:hover {
  text-decoration: underline;
}

.teacher-shell .class-row td {
  padding: 0 8px;
  vertical-align: middle;
  color: #1d2d46;
  font-size: 16px;
}

.teacher-shell .course-cell {
  padding-left: 9px;
}

.teacher-shell .course-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.teacher-shell .course-content strong {
  color: #071835;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.teacher-shell .class-thumb {
  width: 90px;
  height: 76px;
  flex: none;
  display: block;
  object-fit: cover;
  border-radius: 5px;
}

.teacher-shell .status {
  height: 32px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

.teacher-shell .status.live {
  color: #07958f;
  background: #e2f8f6;
}

.teacher-shell .status.pending {
  color: #ff7a00;
  background: #fff0dc;
}

.teacher-shell .status.ended {
  color: #5b6573;
  background: #f1f3f6;
}

.teacher-shell .class-action {
  justify-self: center;
  width: 118px;
  min-width: 118px;
  height: 52px;
  padding: 0;
  border-radius: 5px;
  font-size: 17px;
  font-weight: 700;
}

.teacher-shell .class-manage {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.teacher-shell .class-manage-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #33445c;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.teacher-shell .class-manage-btn:hover:not(:disabled) {
  border-color: rgba(7, 149, 143, 0.48);
  color: #07958f;
  background: #fbfffe;
}

.teacher-shell .class-manage-btn.danger:hover:not(:disabled) {
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
  background: #fff7f7;
}

.teacher-shell .class-manage-btn:disabled {
  color: #b8c2d0;
  background: #f6f8fa;
  cursor: not-allowed;
}

.teacher-shell .class-manage-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.teacher-shell .more-wrap {
  position: relative;
}

.teacher-shell .more-btn {
  width: 32px;
  height: 32px;
  color: #071835;
}

.teacher-shell .more-btn svg {
  width: 25px;
  height: 25px;
  fill: #071835;
  stroke-width: 0;
}

.teacher-shell .class-footer {
  height: 55px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  color: #1d2d46;
  font-size: 16px;
}

.teacher-shell .pager {
  display: flex;
  align-items: center;
  gap: 13px;
}

.teacher-shell .pager-btn,
.teacher-shell .page-size {
  height: 37px;
  border: 1px solid #e0e6ee;
  border-radius: 5px;
  color: #1d2d46;
  background: #fff;
  font-size: 15px;
}

.teacher-shell .pager-btn {
  width: 37px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.teacher-shell .pager-btn:first-child svg {
  transform: rotate(180deg);
}

.teacher-shell .pager-btn svg,
.teacher-shell .page-size svg {
  width: 18px;
  height: 18px;
}

.teacher-shell .pager-btn.active {
  color: #fff;
  border-color: #07958f;
  background: linear-gradient(135deg, #10b7ad 0%, #07958f 100%);
}

.teacher-shell .page-size {
  justify-self: end;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
}

.teacher-shell .interaction-grid {
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.teacher-shell .type-card {
  min-height: 108px;
  height: 108px;
  gap: 11px;
  border-color: #e0e6ee;
  border-radius: 7px;
  color: #07958f;
  padding: 13px 12px;
  background: #fff;
}

.teacher-shell .type-card:hover {
  border-color: rgba(7, 149, 143, 0.48);
  background: #fbfffe;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.teacher-shell .type-card:focus-visible {
  outline: 2px solid rgba(7, 149, 143, 0.32);
  outline-offset: 3px;
}

.teacher-shell .type-card svg {
  width: 53px;
  height: 53px;
  stroke-width: 2.2;
}

.teacher-shell .type-icon-img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
}

.teacher-shell .type-card span {
  color: #13243d;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .teacher-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: auto;
  }

  .teacher-shell .workbench-grid {
    grid-template-columns: minmax(760px, 1fr);
  }

  .teacher-shell .section-panel {
    height: auto;
  }

  .teacher-shell .interaction-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .member-invite-panel {
    align-items: flex-start;
  }

  .teacher-shell {
    display: block;
  }

  .teacher-shell .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #dbe3ec;
  }

  .teacher-shell .sidebar-brand {
    height: 80px;
  }

  .teacher-shell .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 10px;
    padding: 0 16px 16px;
  }

  .teacher-shell .nav-item {
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
  }

  .teacher-shell .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
  }

  .teacher-shell .content {
    padding: 18px;
  }

  .teacher-shell .class-table-wrap {
    overflow-x: auto;
  }

  .teacher-shell .class-table {
    min-width: 850px;
  }

  .teacher-shell .interaction-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .teacher-shell .class-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px;
  }

  .teacher-shell .class-list-head {
    display: none;
  }
}

.teacher-shell {
  --teacher-header-height: 132px;
  --teacher-header-optical-shift: -1px;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  position: relative;
  isolation: isolate;
  grid-template-columns: 250px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 0;
  color: #071835;
  background: #eaf5f6 url("/assets/generated/teacher-workspace-background-flowers.png") center / cover no-repeat;
  box-shadow: none;
}

.teacher-shell .sidebar {
  min-height: auto;
  border-right: 0;
  background: transparent;
  backdrop-filter: none;
}

.teacher-shell .sidebar-brand {
  height: var(--teacher-header-height);
  align-items: center;
  padding: 0 24px;
  border: 0;
  background: transparent;
  justify-content: center;
  gap: 14px;
  cursor: default;
  flex-wrap: nowrap;
}

.teacher-shell .sidebar-brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: block;
  transform: translateY(var(--teacher-header-optical-shift));
}

.teacher-shell .sidebar-brand-text {
  color: #263644;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 5px;
  white-space: nowrap;
  transform: translateY(var(--teacher-header-optical-shift));
}

.teacher-shell .nav-list {
  gap: 28px;
  padding: 4px 28px 0;
}

.teacher-shell .nav-item {
  min-height: 58px;
  gap: 14px;
  padding: 0 22px;
  border-radius: 14px;
  color: #13243d;
  background: transparent;
  font-size: 17px;
  font-weight: 600;
}

.teacher-shell .nav-item:hover {
  background: rgba(255, 255, 255, 0.5);
}

.teacher-shell .nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
  box-shadow: 0 8px 8px rgba(7, 149, 143, 0.16);
}

.teacher-shell .nav-icon {
  width: 24px;
  height: 24px;
}

.teacher-shell .main-area {
  min-width: 0;
  overflow: visible;
}

.teacher-shell .topbar {
  height: var(--teacher-header-height);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 30;
  padding: 0 47px 0 48px;
  border: 0;
  background: transparent;
}

.teacher-shell .top-actions {
  gap: 18px;
  align-items: center;
  position: relative;
  top: var(--teacher-header-optical-shift);
}

.teacher-shell .account {
  display: flex;
  align-items: center;
  transform: translateY(var(--teacher-header-optical-shift));
}

.teacher-shell .top-icon,
.teacher-shell .account-btn {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #071835;
  background: rgba(251, 254, 254, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 8px rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.teacher-shell .top-icon svg,
.teacher-shell .account-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.teacher-shell .top-icon:hover,
.teacher-shell .account-btn:hover {
  background: rgba(255, 255, 255, 0.94);
}

.teacher-shell .top-icon-dot::after {
  top: 6px;
  right: 5px;
}

.teacher-shell .account {
  margin-left: 18px;
}

.teacher-shell .account-menu {
  top: 66px;
  right: 0;
  z-index: 60;
}

.teacher-shell .content {
  max-width: none;
  padding: 4px 42px 26px 34px;
}

.teacher-shell .workbench-grid {
  width: 100%;
  grid-template-columns: minmax(620px, 1.28fr) minmax(410px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.teacher-shell .section-panel {
  min-height: 690px;
  height: calc(100vh - 198px);
  max-height: none;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: rgba(247, 253, 253, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 18px 34px rgba(37, 91, 103, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
  backdrop-filter: blur(24px) saturate(1.14);
}

.teacher-shell .classes-panel {
  display: flex;
  flex-direction: column;
  padding: 40px 20px 24px;
  background: rgba(247, 253, 253, 0.5);
}

.teacher-shell .interaction-panel {
  display: flex;
  flex-direction: column;
  padding: 40px 32px 24px;
  overflow: hidden;
}

.teacher-shell .section-head {
  margin-bottom: 28px;
  padding: 0 4px;
}

.teacher-shell .section-title {
  color: #223142;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
}

.teacher-shell .section-actions {
  gap: 18px;
}

.teacher-shell .temp-class,
.teacher-shell .create-class {
  width: 118px;
  height: 48px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
}

.teacher-shell .class-simple-list {
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(250, 254, 254, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(226, 240, 242, 0.34);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}

.teacher-shell .class-list-scroll {
  height: 100%;
  min-height: 0;
  padding: 0 18px 18px;
  overflow-x: hidden;
  overflow-y: auto;
}

.teacher-shell .class-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 66px;
  grid-template-columns: minmax(180px, 1fr) minmax(70px, 0.42fr) minmax(76px, 0.36fr) minmax(108px, 0.54fr) minmax(128px, 0.62fr);
  justify-content: stretch;
  justify-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  color: #54657d;
  background: #fbfefe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 14px;
  font-weight: 700;
}

.teacher-shell .class-list-head span:nth-child(3),
.teacher-shell .class-list-head span:nth-child(4) {
  transform: none;
}

.teacher-shell .class-list-head span:nth-child(4) {
  transform: none;
}

.teacher-shell .class-row {
  min-height: 116px;
  grid-template-columns: minmax(180px, 1fr) minmax(70px, 0.42fr) minmax(76px, 0.36fr) minmax(108px, 0.54fr) minmax(128px, 0.62fr);
  justify-content: stretch;
  gap: 8px;
  margin-top: 0;
  padding: 18px 12px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  background: rgba(253, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px rgba(27, 83, 95, 0.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  backdrop-filter: blur(16px) saturate(1.08);
}

.teacher-shell .class-row + .class-row {
  margin-top: 14px;
  border-top: 0;
}

.teacher-shell .class-row:hover {
  border-color: rgba(255, 255, 255, 0.96);
  background: rgba(253, 255, 255, 0.74);
}

.teacher-shell .course-title-cell {
  justify-self: stretch;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.teacher-shell .course-name {
  min-width: 0;
  color: #071835;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.teacher-shell .course-class-wrap {
  justify-self: center;
  gap: 8px;
}

.teacher-shell .course-class {
  color: #1d2d46;
  font-size: 17px;
  line-height: 1.1;
}

.teacher-shell .class-members-button {
  color: #07958f;
  font-size: 13px;
  line-height: 1.2;
}

.teacher-shell .class-action {
  width: 106px;
  min-width: 106px;
  height: 50px;
  border-radius: 10px;
  font-size: 17px;
  transform: none;
}

.teacher-shell .class-manage {
  gap: 8px;
  justify-self: center;
  transform: none;
}

.teacher-shell .class-manage-btn {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  background: rgba(251, 254, 254, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 4px 8px rgba(15, 23, 42, 0.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.teacher-shell .interaction-grid {
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  grid-template-rows: repeat(5, minmax(88px, 1fr));
  gap: 12px 16px;
  margin-top: 0;
}

.teacher-shell .type-card {
  min-height: 88px;
  height: auto;
  gap: 8px;
  padding: 12px 10px;
  border-color: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(226, 240, 242, 0.28), 0 8px 18px rgba(27, 83, 95, 0.04);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}

.teacher-shell .type-card:hover {
  border-color: rgba(255, 255, 255, 0.98);
  background: rgba(253, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 12px rgba(7, 149, 143, 0.06);
  transform: translateY(-1px);
}

.teacher-shell .type-icon-img {
  width: 48px;
  height: 48px;
  padding: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(251, 254, 254, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.teacher-shell .type-card[data-interaction-kind="raise_hand"] .type-icon-img {
  filter: none;
}

.teacher-shell .type-card span {
  color: #071835;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 700;
}

.teacher-shell .class-empty-state {
  min-height: 360px;
  color: #52627a;
}

.teacher-shell .topbar {
  justify-content: space-between;
}

.teacher-shell .teacher-top-greeting {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(var(--teacher-header-optical-shift));
}

.teacher-shell .teacher-top-greeting h1 {
  margin: 0;
  color: #223142;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 31px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
}

.teacher-shell .top-actions {
  margin-left: auto;
}

.teacher-shell .workbench-left-column {
  min-width: 0;
  min-height: 690px;
  height: calc(100vh - 198px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.teacher-shell .teacher-promo-carousel {
  position: relative;
  min-height: 236px;
  height: 236px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  background: rgba(247, 253, 253, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 14px 24px rgba(37, 91, 103, 0.06);
  -webkit-backdrop-filter: blur(20px) saturate(1.12);
  backdrop-filter: blur(20px) saturate(1.12);
}

.teacher-shell .teacher-promo-track,
.teacher-shell .teacher-promo-slide {
  position: absolute;
  inset: 0;
}

.teacher-shell .teacher-promo-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.teacher-shell .teacher-promo-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.teacher-shell .teacher-promo-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.teacher-shell .teacher-promo-image-fallback {
  position: absolute;
  z-index: 1;
  right: 28px;
  top: 28px;
  display: none;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(244, 253, 253, 0.9);
  color: #385166;
  font-size: 13px;
  font-weight: 600;
}

.teacher-shell .teacher-promo-slide.image-unavailable img {
  visibility: hidden;
}

.teacher-shell .teacher-promo-slide.image-unavailable .teacher-promo-image-fallback {
  display: block;
}

.teacher-shell .teacher-promo-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(244, 253, 253, 0.92) 0%, rgba(244, 253, 253, 0.72) 38%, rgba(244, 253, 253, 0.18) 74%),
    linear-gradient(180deg, rgba(7, 24, 53, 0.02), rgba(7, 149, 143, 0.1));
}

.teacher-shell .teacher-promo-copy {
  position: absolute;
  z-index: 1;
  left: 30px;
  top: 28px;
  max-width: min(420px, calc(100% - 64px));
  color: #071835;
}

.teacher-shell .teacher-promo-copy strong {
  display: block;
  color: #223142;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
}

.teacher-shell .teacher-promo-copy p {
  max-width: 34ch;
  margin: 12px 0 0;
  color: #284052;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 600;
}

.teacher-shell .teacher-promo-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.teacher-shell .teacher-promo-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 24, 53, 0.22);
  cursor: pointer;
}

.teacher-shell .teacher-promo-dot.active {
  width: 22px;
  background: #07958f;
}

.teacher-shell .workbench-left-column .classes-panel {
  flex: 1;
  min-height: 0;
  height: auto;
  padding: 28px 20px 20px;
}

.teacher-shell .workbench-left-column .section-head {
  margin-bottom: 18px;
}

.teacher-shell .workbench-left-column .section-title {
  font-size: 24px;
}

.teacher-shell .workbench-left-column .class-list-head {
  min-height: 54px;
}

.teacher-shell .workbench-left-column .class-row {
  min-height: 88px;
  padding: 14px 12px;
  border-radius: 18px;
}

.teacher-shell .workbench-left-column .course-name {
  font-size: 18px;
}

.teacher-shell .workbench-left-column .course-class {
  font-size: 16px;
}

.teacher-shell .workbench-left-column .class-action {
  height: 44px;
  font-size: 16px;
}

.teacher-shell .workbench-left-column .class-overview-button {
  width: 68px;
  min-width: 68px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.teacher-shell .workbench-left-column .class-empty-state {
  min-height: 260px;
}

@media (prefers-reduced-motion: reduce) {
  .teacher-shell .teacher-promo-slide {
    transition: none;
  }

  .activity-overview-loading i,
  .activity-overview-loading b,
  .activity-overview-loading em {
    animation: none;
  }
}

@media (max-width: 1320px) {
  .teacher-shell {
    --teacher-header-height: 112px;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: auto;
  }

  .teacher-shell .sidebar-brand {
    height: var(--teacher-header-height);
  }

  .teacher-shell .sidebar-brand-mark {
    width: 44px;
    height: 44px;
  }

  .teacher-shell .sidebar-brand-text {
    font-size: 26px;
    letter-spacing: 4px;
  }

  .teacher-shell .nav-list {
    padding-top: 0;
  }

  .teacher-shell .topbar {
    height: var(--teacher-header-height);
    padding-right: 28px;
    padding-left: 36px;
  }

  .teacher-shell .content {
    padding: 0 24px 24px;
  }

  .teacher-shell .workbench-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .teacher-shell .workbench-left-column {
    min-height: 0;
    height: auto;
  }

  .teacher-shell .teacher-promo-carousel {
    height: 220px;
    min-height: 220px;
  }

  .teacher-shell .section-panel {
    height: auto;
    max-height: none;
  }

  .teacher-shell .workbench-left-column .classes-panel {
    min-height: 430px;
  }

  .teacher-shell .interaction-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .teacher-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: block;
    border-radius: 0;
  }

  .teacher-shell .sidebar {
    border-right: 0;
    border-bottom: 0;
  }

  .teacher-shell .sidebar-brand {
    height: 82px;
  }

  .teacher-shell .sidebar-brand-mark {
    width: 34px;
    height: 34px;
  }

  .teacher-shell .sidebar-brand-text {
    font-size: 22px;
    letter-spacing: 3px;
  }

  .teacher-shell .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 10px;
    padding: 0 16px 16px;
  }

  .teacher-shell .nav-item {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  .teacher-shell .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px 20px;
  }

  .teacher-shell .teacher-top-greeting {
    width: calc(100% - 112px);
    min-height: 48px;
  }

  .teacher-shell .teacher-top-greeting h1 {
    font-size: 24px;
    line-height: 1.16;
  }

  .teacher-shell .top-actions {
    margin-left: 0;
  }

  .teacher-shell .top-icon,
  .teacher-shell .account-btn {
    width: 48px;
    height: 48px;
  }

  .teacher-shell .content {
    padding: 0 14px 18px;
  }

  .teacher-shell .classes-panel,
  .teacher-shell .interaction-panel {
    padding: 24px 14px 16px;
  }

  .teacher-shell .workbench-left-column {
    gap: 16px;
  }

  .teacher-shell .teacher-promo-carousel {
    height: 190px;
    min-height: 190px;
    border-radius: 18px;
  }

  .teacher-shell .teacher-promo-copy {
    left: 18px;
    top: 20px;
    max-width: calc(100% - 36px);
  }

  .teacher-shell .teacher-promo-copy strong {
    font-size: 21px;
  }

  .teacher-shell .teacher-promo-copy p {
    max-width: 28ch;
    font-size: 14px;
    line-height: 1.55;
  }

  .teacher-shell .workbench-left-column .classes-panel {
    min-height: 0;
  }

  .teacher-shell .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .teacher-shell .section-title {
    width: 100%;
  }

  .teacher-shell .section-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .teacher-shell .class-list-head {
    display: none;
  }

  .teacher-shell .class-row {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 14px;
    padding: 18px;
  }

  .teacher-shell .course-title-cell {
    justify-self: start;
    justify-content: flex-start;
  }

  .teacher-shell .course-name {
    text-align: left;
  }

  .teacher-shell .class-action,
  .teacher-shell .class-manage,
  .teacher-shell .class-overview-button {
    justify-self: start;
  }

  .teacher-shell .interaction-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 560px) {
  .profile-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .profile-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .profile-inline-form,
  .profile-code-row,
  .profile-setting-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-setting-row .btn,
  .profile-actions .btn {
    width: 100%;
  }

  .profile-name-form {
    grid-template-columns: 1fr;
  }

  .profile-name-form .auth-error {
    grid-column: auto;
  }
}

.editor-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 254px minmax(650px, 1fr) 580px;
  grid-template-rows: 68px 1fr 86px;
  background: #f8fafb;
  color: #1f2937;
}

.editor-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 230px 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding: 0 39px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.editor-brand,
.live-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
}

.editor-brand .logo-mark,
.live-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: none;
}

.editor-brand .logo-mark::before,
.live-brand .logo-mark::before {
  font-size: 24px;
}

.editor-brand .logo-mark::after,
.live-brand .logo-mark::after {
  right: 6px;
  bottom: 8px;
  width: 11px;
  height: 5px;
}

.editor-top h1 {
  margin: 0;
  padding-left: 35px;
  border-left: 1px solid var(--line);
  color: #111827;
  font-size: 22px;
}

.editor-save {
  color: #6b7280;
  font-size: 14px;
}

.editor-return {
  height: 38px;
  border-color: var(--line);
  color: #475569;
}

.editor-steps {
  grid-row: 2 / 3;
  padding: 42px 31px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.step {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: flex-start;
  gap: 17px;
  border: 0;
  background: transparent;
  color: #8a94a6;
  font-size: 17px;
  text-align: left;
  position: relative;
}

.step::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 38px;
  bottom: 8px;
  border-left: 2px dashed #cbd5e1;
}

.step:last-of-type::after {
  display: none;
}

.step span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  color: #4b5563;
  background: #fff;
  flex: none;
}

.step.active {
  color: var(--teal);
  font-weight: 700;
}

.step.active span {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.tip-card {
  margin-top: 325px;
  padding: 18px 16px;
  border-radius: 6px;
  background: #f1f5f8;
  color: #475569;
  font-size: 14px;
}

.tip-card p {
  margin: 12px 0 8px;
  line-height: 1.7;
}

.editor-form {
  padding: 30px 32px 96px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.form-block {
  display: block;
  margin-bottom: 30px;
  position: relative;
}

.form-block > span,
.setting-block > span,
.toggle-row span {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.form-block textarea {
  width: 100%;
  height: 82px;
  padding: 14px 16px;
  resize: none;
  border: 1px solid #cfd7df;
  border-radius: 5px;
  color: #111827;
  background: #fff;
  line-height: 1.6;
}

.form-block textarea.invalid {
  border-color: #dc2626;
}

.form-block em {
  position: absolute;
  right: 16px;
  bottom: 11px;
  color: #8a94a6;
  font-style: normal;
}

.seg-buttons {
  display: flex;
  gap: 36px;
}

.seg {
  width: 140px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #374151;
  font-size: 16px;
}

.seg i {
  width: 20px;
  height: 20px;
  border: 2px solid #c7cdd4;
  border-radius: 50%;
}

.seg.active {
  color: var(--teal);
  border-color: var(--teal);
  background: #f2fbfa;
}

.seg.active i {
  border: 6px solid var(--teal);
}

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

.option-row {
  display: grid;
  grid-template-columns: 42px 1fr 46px;
  align-items: center;
  height: 38px;
}

.option-row b {
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d5dce3;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #f8fafc;
  font-weight: 500;
}

.option-row input {
  height: 38px;
  border: 1px solid #d5dce3;
  border-radius: 0 4px 4px 0;
  padding: 0 14px;
}

.radio-dot {
  width: 22px;
  height: 22px;
  justify-self: end;
  border: 2px solid #9aa3ad;
  border-radius: 50%;
  background: #fff;
}

.radio-dot.checked {
  border: 6px solid var(--teal);
}

.add-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 10px;
}

.add-option > button:first-child {
  height: 36px;
  border: 1px dashed #cfd7df;
  border-radius: 4px;
  background: #fff;
  color: #6b7280;
}

.settings-row,
.toggle-row {
  display: grid;
  grid-template-columns: 190px 205px 1fr;
  gap: 28px;
  align-items: end;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.stepper {
  display: inline-grid;
  grid-template-columns: 36px 52px 36px auto;
  align-items: center;
  height: 38px;
}

.stepper button,
.stepper strong,
.bonus-select,
.rank-select {
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d5dce3;
  background: #fff;
}

.stepper button:first-child {
  border-radius: 4px 0 0 4px;
}

.stepper button:nth-child(3) {
  border-radius: 0 4px 4px 0;
}

.stepper em {
  position: static;
  margin-left: 12px;
}

.bonus-select,
.rank-select {
  width: 114px;
  display: flex;
  justify-content: space-around;
  border-color: #f2d49a;
  border-radius: 4px;
  color: #f59e0b;
  font-weight: 700;
}

.rank-select {
  width: 150px;
  border-color: #d5dce3;
  color: #374151;
}

.toggle-row {
  margin-top: 28px;
}

.switch {
  width: 52px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}

.switch.on {
  background: var(--teal);
}

.switch.on::after {
  left: 29px;
}

.student-preview {
  padding: 30px 28px 96px;
  background: #fff;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-head h2 {
  margin: 0;
  font-size: 18px;
}

.preview-tab {
  height: 34px;
  min-width: 100px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f9fb;
  color: #6b7280;
}

.preview-tab svg {
  width: 17px;
  height: 17px;
  vertical-align: -3px;
}

.preview-tab.active {
  color: var(--teal);
  border-color: var(--teal);
  background: #f2fbfa;
}

.preview-phone {
  margin-top: 22px;
  min-height: 636px;
  padding: 34px 25px 0;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.pill {
  display: inline-flex;
  height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--teal);
  background: #e6f7f4;
  font-weight: 700;
}

.preview-phone h3 {
  margin: 28px 0 18px;
  font-size: 20px;
}

.preview-phone p {
  color: #6b7280;
}

.preview-option {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid #d5dce3;
  border-radius: 7px;
  background: #fff;
  text-align: left;
}

.preview-option b {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2f4f6;
  font-weight: 500;
}

.preview-option.selected {
  border-color: var(--teal);
  background: #eef9f7;
}

.preview-option.selected b {
  color: #fff;
  background: var(--teal);
}

.preview-phone footer {
  height: 62px;
  margin: 130px -25px 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--line);
  color: #64748b;
}

.preview-phone footer b {
  color: var(--teal);
}

.editor-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.editor-actions > div {
  display: flex;
  gap: 32px;
}

.editor-actions .btn {
  width: 145px;
  height: 46px;
  font-size: 18px;
}

.editor-actions .btn-primary {
  width: 180px;
}

.editor-page {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 68px minmax(0, 1fr);
  overflow: hidden;
  background: #f6f8fa;
  color: var(--text);
}

.editor-page .editor-top {
  grid-column: auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.editor-page .editor-brand {
  width: 216px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  flex-wrap: nowrap;
}

.editor-page .editor-brand .sidebar-brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: block;
}

.editor-page .editor-brand .sidebar-brand-text {
  color: #263644;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 5px;
  white-space: nowrap;
}

.editor-title-wrap {
  position: relative;
  justify-self: start;
}

.editor-type-trigger {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

.editor-type-trigger:hover,
.editor-type-trigger[aria-expanded="true"] {
  border-color: #cfdce5;
  background: #f8fbfb;
}

.editor-type-trigger img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.editor-type-menu {
  position: absolute;
  top: 50px;
  left: 0;
  z-index: 20;
  width: 190px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d8e2e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.editor-type-menu[hidden] {
  display: none;
}

.editor-type-menu button {
  height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: #374151;
  text-align: left;
}

.editor-type-menu button:hover,
.editor-type-menu button.active {
  color: var(--teal);
  background: var(--teal-soft);
}

.editor-page .editor-return {
  height: 40px;
  border-color: #cfdce5;
  color: #374151;
  background: #fff;
}

.editor-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 440px;
  gap: 18px;
  padding: 16px;
}

.activity-preview,
.choice-editor-panel {
  min-width: 0;
  border: 1px solid #dfe7ed;
  border-radius: 8px;
  background: #fff;
}

.activity-preview {
  min-height: 0;
  display: grid;
  padding: 12px;
}

.activity-preview-stage {
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 52px minmax(112px, 0.48fr) minmax(270px, 1fr);
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #ffffff;
}

.preview-topline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid #edf2f5;
}

.preview-topline p {
  grid-column: 2;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.preview-topline strong {
  color: var(--teal);
}

.preview-brand {
  position: absolute;
  top: 50%;
  right: 18px;
  z-index: 14;
  width: 150px;
  height: 38px;
  max-height: 38px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.preview-qr-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  background: #fff;
}

.preview-qr-button:hover,
.preview-qr-button[aria-expanded="true"] {
  border-color: rgba(7, 149, 143, 0.44);
  background: #f2fbfa;
}

.preview-qr-button img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.preview-qr-panel {
  position: absolute;
  top: 188px;
  left: 54px;
  z-index: 10;
  width: 216px;
  height: 216px;
  display: grid;
  justify-items: center;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 190ms ease, transform 190ms ease, visibility 0s linear 190ms;
}

.preview-qr-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 190ms ease, transform 190ms ease, visibility 0s;
}

.preview-qr-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-qr-panel span {
  display: none;
}

.preview-question-area,
.preview-options-area {
  display: grid;
  justify-items: center;
  padding: 18px clamp(28px, 5vw, 72px);
}

.preview-question-area {
  align-content: start;
  padding-top: clamp(24px, 4.8vh, 48px);
}

.preview-options-area {
  align-content: end;
  padding-bottom: 56px;
}

.matching-preview-stage {
  grid-template-rows: 52px minmax(84px, 0.24fr) minmax(360px, 1fr);
}

.matching-preview-stage .preview-question-area {
  padding-top: clamp(18px, 3.2vh, 30px);
}

.matching-preview-stage .preview-options-area {
  align-content: start;
  padding-top: 6px;
  padding-bottom: 56px;
}

.category-preview-stage {
  grid-template-rows: 52px minmax(74px, 0.18fr) minmax(430px, 1fr);
}

.category-preview-stage .preview-question-area {
  padding-top: clamp(16px, 2.4vh, 26px);
}

.category-preview-stage .preview-options-area {
  align-content: start;
  justify-items: stretch;
  padding: 8px clamp(18px, 2.8vw, 34px) 58px;
}

.ordering-preview-stage {
  grid-template-rows: 52px minmax(120px, 0.38fr) minmax(300px, 1fr);
}

.ordering-preview-stage .preview-question-area {
  padding-top: clamp(22px, 4vh, 42px);
}

.ordering-preview-stage .preview-options-area {
  align-content: center;
  padding: 8px clamp(28px, 5vw, 72px) 86px;
}

.poll-preview-stage .preview-question-area {
  padding-top: clamp(24px, 4.8vh, 46px);
}

.poll-preview-stage .preview-options-area {
  align-content: center;
  padding-top: 12px;
  padding-bottom: 86px;
}

.brainstorm-preview-stage {
  grid-template-rows: 52px minmax(112px, 0.25fr) minmax(340px, 1fr);
}

.brainstorm-preview-stage .preview-question-area {
  padding-top: clamp(22px, 4.2vh, 42px);
}

.brainstorm-preview-stage .preview-options-area {
  align-content: stretch;
  justify-items: stretch;
  padding: 6px clamp(28px, 4vw, 58px) 72px;
}

.wordcloud-preview-stage {
  grid-template-rows: 52px minmax(112px, 0.28fr) minmax(320px, 1fr);
}

.wordcloud-preview-stage .preview-question-area {
  padding-top: clamp(22px, 4.2vh, 42px);
}

.wordcloud-preview-stage .preview-options-area {
  align-content: start;
  padding: 8px clamp(28px, 5vw, 72px) 76px;
}

.rating-preview-stage {
  grid-template-rows: 52px minmax(112px, 0.38fr) minmax(300px, 1fr);
}

.rating-preview-stage .preview-question-area {
  padding-top: clamp(22px, 4.2vh, 42px);
}

.rating-preview-stage .preview-options-area {
  align-content: center;
  justify-items: stretch;
  padding: 10px clamp(28px, 4vw, 58px) 76px;
}

.random-picker-preview-stage {
  grid-template-rows: 52px minmax(82px, 0.16fr) minmax(650px, 1fr);
}

.random-picker-preview-stage .preview-question-area {
  padding-top: clamp(18px, 3vh, 30px);
}

.random-picker-preview-stage .preview-options-area {
  align-content: center;
  justify-items: center;
  padding: 0 clamp(18px, 3vw, 42px) 68px;
}

.preview-question-area h2 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.24;
  font-weight: 700;
  text-align: center;
  text-wrap: balance;
}

.preview-bars {
  width: min(1500px, 100%);
  height: 250px;
  min-height: 250px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 1fr);
  align-items: end;
  gap: clamp(10px, 1.6vw, 24px);
  position: relative;
}

.preview-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  height: 2px;
  border-radius: 999px;
  background: #9fb1b9;
}

.preview-bars.poll-preview-bars {
  width: min(1500px, 100%);
}

.preview-bars.poll-pie-results {
  height: 280px;
  min-height: 280px;
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  align-items: center;
  justify-items: center;
  transform: translateY(-134px);
}

.preview-bars.poll-pie-results::after {
  display: none;
}

.preview-bars.wordcloud-preview-results {
  width: min(760px, 100%);
  height: 286px;
  min-height: 286px;
  display: block;
  align-self: start;
  justify-self: center;
  transform: none;
}

.preview-bars.wordcloud-preview-results::after {
  display: none;
}

.preview-bars.rating-scale-results {
  width: min(1220px, 100%);
  height: 440px;
  min-height: 440px;
  display: block;
  align-self: center;
  justify-self: center;
}

.preview-bars.rating-scale-results::after {
  display: none;
}

.rating-score-preview {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(188px, 224px);
  align-items: center;
  gap: clamp(34px, 4vw, 58px);
  transform: translateX(38px);
}

.rating-chart-wrap {
  min-width: 0;
  height: 370px;
  position: relative;
}

.rating-chart {
  width: 100%;
  height: 330px;
  display: block;
  overflow: visible;
}

.rating-chart-reference {
  stroke: #d5dce2;
  stroke-width: 4;
  opacity: 0.82;
}

.rating-chart-area {
  fill: var(--rating-color);
  fill-opacity: 0.72;
  stroke: none;
  mix-blend-mode: multiply;
}

.rating-chart-line {
  fill: none;
  stroke: var(--rating-color);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rating-chart-dot {
  fill: var(--rating-color);
  stroke: none;
}

.rating-axis-label {
  position: absolute;
  top: 150px;
  z-index: 2;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

.rating-axis-label-min {
  left: -28px;
}

.rating-axis-label-max {
  right: -34px;
}

.rating-chart-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 306px;
  display: flex;
  justify-content: space-between;
  color: #707985;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
}

.rating-average-badges {
  position: absolute;
  left: var(--rating-average-x, 50%);
  top: 268px;
  z-index: 3;
  width: 1px;
  height: 96px;
}

.rating-average-badge {
  position: absolute;
  left: -28px;
  top: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--rating-color);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.rating-average-overall {
  top: 66px;
  color: #2f343a;
  background: #fff;
  border-color: #2f343a;
  font-weight: 700;
}

.rating-preview-legend {
  min-width: 0;
  max-height: 360px;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 13px;
}

.rating-preview-legend span {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: #334155;
}

.rating-preview-legend i {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--rating-color);
}

.rating-preview-legend b {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
  display: -webkit-box;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rating-scale-preview {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  align-items: center;
  gap: clamp(48px, 5vw, 72px);
  transform: translateX(54px);
}

.rating-scale-canvas {
  min-width: 0;
  min-height: 214px;
  position: relative;
  display: grid;
  align-content: center;
  padding: 36px 0 50px;
}

.rating-scale-line {
  position: relative;
  height: 3px;
  margin: 0 34px 0 8px;
  border-radius: 999px;
  background: #cbd5df;
}

.rating-scale-line i {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aeb9c6;
  transform: translate(-50%, -50%);
}

.rating-scale-side {
  position: absolute;
  top: 24px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

.rating-scale-side-min {
  left: -4px;
}

.rating-scale-side-max {
  right: -4px;
}

.rating-scale-ticks {
  display: flex;
  justify-content: space-between;
  margin: 54px 32px 0 6px;
  color: #7b8794;
  font-size: 15px;
  font-weight: 600;
}

.rating-scale-preview .rating-preview-legend {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 9px;
}

.rating-scale-preview .rating-preview-legend span {
  min-width: 0;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #334155;
}

.rating-scale-preview .rating-preview-legend i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--rating-color);
}

.rating-scale-preview .rating-preview-legend b {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-scale-preview.answered .rating-scale-line {
  background: #ff3b83;
}

.rating-scale-preview.answered .rating-scale-line i {
  background: #ff3b83;
}

.wordcloud-preview {
  position: relative;
  width: 100%;
  height: 100%;
  font-family: inherit;
}

.wordcloud-word {
  position: absolute;
  display: inline-block;
  max-width: min(var(--word-max-width, 72%), calc(100% - 24px));
  line-height: 1.08;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: none;
}

.wordcloud-result-cloud .wordcloud-word {
  left: var(--word-left);
  top: var(--word-top);
  color: var(--word-color);
  font-size: var(--word-size);
  transform: translate(-50%, -50%);
}

.wordcloud-result-cloud .wordcloud-word.is-vertical {
  max-width: none;
  max-height: calc(100% - 24px);
  line-height: 1;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.teacher-wordcloud-cloud {
  overflow: hidden;
}

.teacher-wordcloud-cloud:not(.is-laid-out) {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px;
}

.teacher-wordcloud-cloud:not(.is-laid-out) .wordcloud-word {
  position: static;
  max-width: 100%;
  color: var(--word-color);
  font-size: 20px;
  line-height: 1.08;
  white-space: nowrap;
  transform: none;
}

.teacher-wordcloud-cloud.is-laid-out .wordcloud-word {
  left: var(--word-left);
  top: var(--word-top);
  max-width: none;
  color: var(--word-color);
  font-size: var(--word-size);
  line-height: 1.02;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.teacher-wordcloud-cloud.is-laid-out .wordcloud-word[hidden] {
  display: none;
}

.wordcloud-word-thankful {
  left: 43%;
  top: 43%;
  color: #aebbd0;
  font-size: 56px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-successful {
  left: 31%;
  top: 68%;
  color: #f6cfc5;
  font-size: 42px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-peaceful {
  left: 64%;
  top: 31%;
  color: #f2c5b8;
  font-size: 41px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-friendly {
  left: 31%;
  top: 21%;
  color: #f3bed7;
  font-size: 34px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-hopeful {
  left: 55%;
  top: 61%;
  color: #ee9bc8;
  font-size: 20px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-joyful {
  left: 18%;
  top: 45%;
  color: #8beed8;
  font-size: 21px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-happy {
  left: 17%;
  top: 37%;
  color: #c6c3d3;
  font-size: 18px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: upright;
  transform: translate(-50%, -50%);
}

.wordcloud-word-loving {
  left: 65%;
  top: 54%;
  color: #97b7b1;
  font-size: 18px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: upright;
  transform: translate(-50%, -50%);
}

.wordcloud-word-smiling {
  left: 78%;
  top: 44%;
  color: #92ead5;
  font-size: 18px;
  transform: translate(-50%, -50%);
}

.wordcloud-word-harmonious {
  left: 50%;
  top: 76%;
  color: #c3a0de;
  font-size: 18px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: upright;
  transform: translate(-50%, -50%);
}

.brainstorm-preview-flow {
  width: 100%;
  height: 100%;
  min-height: 330px;
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: 168px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: start;
  gap: 20px 28px;
  overflow: visible;
}

.brainstorm-preview-flow::after {
  display: none;
}

.brainstorm-step-list {
  grid-row: 1 / 3;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 28px;
  padding-top: 4px;
}

.brainstorm-step {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  color: #b7c0ca;
}

.brainstorm-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 28px;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: #edf1f4;
}

.brainstorm-step strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a9b3bd;
  background: #f1f3f5;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
}

.brainstorm-step span {
  min-width: 0;
  color: currentColor;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
}

.brainstorm-step small {
  grid-column: 2;
  margin-top: 2px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.brainstorm-step.active {
  color: #3f3f46;
}

.brainstorm-step.active strong {
  color: #fff;
  background: var(--teal);
}

.brainstorm-empty-copy {
  justify-self: start;
  align-self: start;
  margin-top: 8px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 800;
}

.brainstorm-next-button {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: end;
  min-width: 134px;
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 8px;
  color: #d1d5db;
  background: #f1f2f4;
  font-size: 14px;
  font-weight: 800;
  cursor: not-allowed;
}

.brainstorm-next-button img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.9;
}

.preview-bars.random-picker-wheel-results {
  width: min(1120px, 100%);
  height: 650px;
  min-height: 650px;
  display: block;
  align-self: center;
  justify-self: center;
  overflow: visible;
}

.preview-bars.random-picker-wheel-results::after {
  display: none;
}

.random-wheel-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 36px;
}

.random-wheel-shell {
  grid-row: 1 / 3;
  justify-self: center;
  position: relative;
  width: min(620px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f7fb;
  box-shadow: inset 0 0 0 16px #f3f6fa, 0 0 0 1px #d9e3ea, 0 20px 42px rgba(15, 23, 42, 0.1);
}

.random-picker-preview-stage.random-picker-long-question .random-wheel-shell {
  transform: translateY(72px);
}

.random-wheel-shell.is-insufficient {
  opacity: 0.72;
}

.random-wheel-pointer {
  position: absolute;
  top: -48px;
  left: 50%;
  z-index: 5;
  width: 72px;
  height: 88px;
  object-fit: contain;
  pointer-events: none;
  transform: translateX(-50%);
  transform-origin: 50% 28%;
  filter: drop-shadow(0 7px 10px rgba(15, 23, 42, 0.18));
}

.random-wheel-shell.is-ticking .random-wheel-pointer {
  animation: random-pointer-flick 118ms cubic-bezier(0.18, 0.82, 0.28, 1) infinite;
}

@keyframes random-pointer-flick {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }
  28% {
    transform: translateX(-50%) rotate(-12deg);
  }
  62% {
    transform: translateX(-50%) rotate(8deg);
  }
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

.random-wheel {
  position: relative;
  width: calc(100% - 34px);
  height: calc(100% - 34px);
  border: 10px solid #fff;
  border-radius: 50%;
  background: conic-gradient(var(--wheel-gradient));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  transform: rotate(var(--wheel-rotation, 0deg));
  transition: transform var(--spin-duration, 1000ms) cubic-bezier(0.12, 0.75, 0.18, 1);
}

.random-wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 164px;
  height: 30px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) rotate(var(--label-angle)) translateY(calc(var(--label-distance) * -1)) rotate(90deg);
  transform-origin: center;
  pointer-events: none;
}

.random-wheel-label b {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: var(--label-size);
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
}

.random-wheel-label.active b {
  max-width: 166px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #263241;
  background: #fff;
  text-shadow: none;
  box-shadow: 0 0 0 2px rgba(38, 50, 65, 0.1);
}

.random-wheel-play {
  position: absolute;
  z-index: 6;
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  border: 8px solid #fff;
  border-radius: 50%;
  background: #6b2ed6;
  box-shadow: 0 8px 18px rgba(74, 35, 156, 0.26);
}

.random-wheel-play:hover:not(:disabled) {
  background: #5a23c1;
}

.random-wheel-play:disabled {
  cursor: wait;
  opacity: 0.84;
}

.random-wheel-play span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid #fff;
}

.random-wheel-meta {
  align-self: center;
  justify-self: center;
  min-width: 0;
  width: 178px;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 18px 18px;
  border: 1px solid #dce6ed;
  border-radius: 8px;
  background: #f7fafc;
  text-align: center;
  transform: translateY(-86px);
}

.random-wheel-meta strong {
  color: var(--teal);
  font-size: 46px;
  line-height: 1;
}

.random-wheel-meta span {
  color: #536273;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.random-wheel-results {
  min-width: 0;
  width: 178px;
  max-height: none;
  align-self: start;
  justify-self: center;
  overflow: visible;
  display: flex;
  align-content: flex-start;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
  transform: translateY(-220px);
}

.random-wheel-results em {
  color: #64748b;
  font-size: 18px;
  line-height: 1.3;
  font-style: normal;
  font-weight: 800;
}

.random-wheel-results span {
  max-width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 7px;
  border: 1px solid #cfdce5;
  border-radius: 6px;
  color: #263241;
  background: #fff;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.random-wheel-results b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--teal);
  font-size: 16px;
  line-height: 1;
}

.preview-bars.qa-answer-results {
  width: min(760px, 100%);
  height: 310px;
  min-height: 310px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 1fr);
  align-items: end;
}

.preview-bars.qa-answer-results::after {
  display: none;
}

.activity-preview-stage .preview-bars.qa-answer-results {
  height: auto;
  min-height: 280px;
  grid-auto-flow: row;
  grid-auto-columns: initial;
  place-items: center;
  align-items: center;
  overflow: visible;
}

.activity-preview-stage .qa-summary-grid {
  width: min(680px, 100%);
  min-height: 240px;
}

.activity-preview-stage .qa-summary-card {
  min-height: 170px;
}

.preview-bars.matching-preview-grid {
  width: min(1220px, 100%);
  height: 360px;
  min-height: 320px;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 4.8vw, 76px);
  overflow: visible;
}

.preview-bars.matching-preview-grid::after {
  display: none;
}

.preview-bars.category-preview-grid {
  width: min(1540px, calc(100vw - 180px));
  height: min(620px, calc(100vh - 310px));
  min-height: 400px;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  align-items: stretch;
  gap: 20px;
  overflow: visible;
}

.preview-bars.category-preview-grid::after {
  display: none;
}

.temp-live-page[data-live-phase="results"] .live-response-results.category-preview-grid {
  width: min(1540px, calc(100vw - 180px));
  height: min(620px, calc(100vh - 310px));
  min-height: 400px;
  align-self: center;
}

.temp-live-page[data-live-kind="category"] .live-join-stage {
  position: relative;
}

.temp-live-page[data-live-kind="category"] .live-answer-timer:not([hidden]) {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
}

.temp-live-page[data-live-kind="category"] .live-answer-timer.is-final {
  color: #263348;
}

.preview-bars.category-preview-grid.category-is-revealed {
  grid-template-columns: minmax(0, 1fr);
}

.preview-bars.ordering-preview-grid {
  width: min(1500px, 100%);
  height: 206px;
  min-height: 206px;
  display: grid;
  grid-auto-flow: row;
  grid-template-rows: minmax(58px, auto) auto;
  align-content: center;
  gap: 26px;
  overflow: visible;
}

.preview-bars.ordering-preview-grid::after {
  display: none;
}

.ordering-preview-list {
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 18px);
}

.ordering-preview-card {
  width: min(150px, 17vw);
  min-width: 118px;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1.5px solid color-mix(in srgb, var(--ordering-color) 80%, #ffffff);
  border-radius: 6px;
  background: #fff;
  color: #263241;
}

.ordering-preview-card span {
  min-width: 0;
  color: #293547;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  overflow-wrap: anywhere;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ordering-result-summary {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.ordering-result-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  color: #344256;
  background: #f7f9fc;
}

.ordering-result-pill svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.ordering-result-pill.correct svg {
  color: #0f9f93;
}

.ordering-result-pill.incorrect svg {
  color: #d25b4d;
}

.ordering-result-pill strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
}

.category-option-bank {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d8e2ea;
  border-radius: 12px;
  background: #eef3f9;
}

.category-option-bank header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: #344256;
  border-bottom: 1px solid #d8e2ea;
  font-size: 19px;
  font-weight: 800;
}

.category-option-bank header strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--teal);
  background: #fff;
  font-size: 17px;
}

.category-option-bank > div {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px 12px 14px 14px;
}

.category-option-bank > div span {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #d9e3ea;
  border-radius: 10px;
  color: #263241;
  background: #fff;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.category-option-bank > div::-webkit-scrollbar,
.category-bucket-card > div::-webkit-scrollbar,
.category-is-revealed .category-bucket-grid::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.category-option-bank > div::-webkit-scrollbar-thumb,
.category-bucket-card > div::-webkit-scrollbar-thumb,
.category-is-revealed .category-bucket-grid::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #9ca8b4;
  background-clip: padding-box;
}

.category-bucket-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--category-columns, 4), minmax(180px, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 18px;
}

.category-bucket-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr);
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--category-color) 82%, #ffffff);
  border-radius: 12px;
  background: color-mix(in srgb, var(--category-color) 10%, #ffffff);
}

.category-bucket-card header {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: #fff;
  background: var(--category-color);
}

.category-bucket-card header strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--category-color);
  background: rgba(255, 255, 255, 0.95);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.category-bucket-card header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: 21px;
  font-weight: 800;
}

.category-bucket-card > div {
  min-height: 0;
  display: flex;
  align-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.category-bucket-card > div span {
  max-width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--category-color) 28%, #dbe5ec);
  border-radius: 6px;
  color: #243242;
  background: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.category-is-revealed .category-bucket-grid {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 10px 10px 2px;
  scrollbar-gutter: stable;
}

.category-is-revealed .category-bucket-card {
  min-height: 250px;
}

.category-is-revealed .category-bucket-card > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-content: start;
  gap: 12px;
}

.category-revealed-item {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--category-color) 30%, #dbe5ec);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
}

.category-bucket-card > div .category-revealed-item > span {
  min-height: 38px;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.category-revealed-item small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-revealed-item small b,
.category-revealed-item small em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 800;
}

.category-revealed-item small b {
  color: #087b65;
  background: #dff7ef;
}

.category-revealed-item small em {
  color: #b14d42;
  background: #fff0ed;
}

.category-preview-grid.category-is-compact {
  gap: 14px;
}

.category-preview-grid.category-is-compact .category-bucket-grid {
  gap: 12px;
}

.category-preview-grid.category-is-compact .category-bucket-card {
  grid-template-rows: 54px minmax(0, 1fr);
}

.category-preview-grid.category-is-compact .category-bucket-card header span {
  font-size: 17px;
}

.category-preview-grid.category-is-compact .category-bucket-card > div {
  padding: 10px;
}

.category-preview-stage .preview-bars.category-preview-grid {
  width: 100%;
  height: min(430px, 100%);
  min-height: 390px;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.category-preview-stage .category-option-bank {
  grid-template-rows: 44px minmax(0, 1fr);
  border-radius: 8px;
}

.category-preview-stage .category-option-bank header {
  padding: 0 14px;
  font-size: 16px;
}

.category-preview-stage .category-option-bank header strong {
  width: 28px;
  height: 28px;
  font-size: 15px;
}

.category-preview-stage .category-option-bank > div {
  gap: 8px;
  padding: 10px;
}

.category-preview-stage .category-option-bank > div span {
  min-height: 38px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 17px;
}

.category-preview-stage .category-bucket-grid {
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 12px;
}

.category-preview-stage .category-bucket-card {
  min-height: 184px;
  grid-template-rows: 48px minmax(0, 1fr);
  border-width: 1px;
  border-radius: 8px;
}

.category-preview-stage .category-bucket-card header {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 0 12px;
}

.category-preview-stage .category-bucket-card header strong {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

.category-preview-stage .category-bucket-card header span {
  font-size: 18px;
}

.category-preview-stage .category-bucket-card > div {
  gap: 8px;
  padding: 12px;
}

.matching-preview-column {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.matching-source-card,
.matching-answer-card {
  min-width: 0;
  height: 64px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border: 1px solid #b8c5d6;
  border-radius: 6px;
  background: #fff;
  color: #2b3138;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
}

.matching-source-card {
  grid-template-columns: minmax(0, 1fr) 48px;
  border-color: var(--match-color);
}

.matching-answer-card {
  grid-template-columns: 48px minmax(0, 1fr);
  border-color: var(--match-color);
  will-change: transform;
}

.matching-source-card span,
.matching-answer-card span {
  min-width: 0;
  padding: 0 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matching-source-card strong,
.matching-answer-card strong {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.matching-source-card strong {
  background: var(--match-color);
}

.matching-answer-card strong {
  background: var(--match-color);
}

.preview-bar-item {
  min-width: 0;
  height: 250px;
  display: block;
  position: relative;
  z-index: 1;
}

.preview-bar-item em {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: #334155;
  font-size: 18px;
  line-height: 1;
  font-style: normal;
  font-weight: 700;
}

.preview-bar-track {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  width: min(68px, 100%);
  height: 170px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
}

.preview-bar-track i {
  width: 100%;
  display: block;
  min-height: 0;
  border-radius: 7px 7px 0 0;
  background: #82d2c9;
  transition:
    height 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease;
}

.preview-bar-item.correct .preview-bar-track i {
  background: var(--teal);
}

.preview-bar-item strong {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #334155;
  background: #eef3f5;
  font-size: 14px;
  font-weight: 700;
}

.preview-bar-item.correct strong {
  color: #fff;
  background: var(--teal);
}

.preview-bar-item span {
  position: absolute;
  left: 50%;
  top: 204px;
  transform: translateX(-50%);
  width: min(140px, 100%);
  max-width: 140px;
  color: #334155;
  font-size: 15px;
  line-height: 1.22;
  font-weight: 600;
  text-align: center;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.poll-bar-item em {
  top: auto;
  bottom: 86px;
  font-size: 17px;
  font-weight: 500;
}

.poll-bar-item .preview-bar-track {
  height: 0;
}

.poll-bar-item strong {
  display: none;
}

.poll-bar-item span {
  top: 196px;
  font-weight: 500;
  -webkit-line-clamp: 2;
}

.poll-pie-preview {
  width: min(760px, 100%);
  min-height: 250px;
  display: grid;
  grid-template-columns: 220px minmax(260px, 360px);
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 38px;
}

.poll-pie-chart {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#d7e4e8 0 100%);
  position: relative;
}

.poll-pie-chart::after {
  content: "";
  position: absolute;
  inset: 54px;
  border-radius: 50%;
  background: #fff;
}

.poll-pie-chart strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.poll-pie-legend {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.poll-pie-legend span {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #334155;
}

.poll-pie-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--poll-color);
}

.poll-pie-legend b {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poll-pie-legend em {
  color: #475569;
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
}

.qa-bar-item {
  height: 310px;
}

.qa-bar-item em {
  top: -6px;
  z-index: 3;
  padding: 0;
  background: transparent;
}

.qa-bar-item .preview-bar-track {
  bottom: 118px;
  height: 176px;
}

.qa-bar-item strong {
  bottom: 86px;
}

.qa-bar-item span {
  display: none;
}

.qa-bar-item small {
  position: absolute;
  left: 50%;
  top: 238px;
  transform: translateX(-50%);
  width: min(260px, 150%);
  color: #334155;
  font-size: 17px;
  line-height: 1.28;
  font-weight: 700;
  text-align: center;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.preview-participants {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.preview-participants button,
.preview-participants div {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #d9e6e9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
}

.preview-participants button:hover,
.preview-participants button:focus-visible {
  border-color: rgba(7, 149, 143, 0.42);
  background: #f2fbfa;
}

.preview-participants img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.preview-participants span {
  min-width: 10px;
  font-size: 16px;
  font-weight: 800;
}

.answer-drawer {
  position: absolute;
  top: 52px;
  right: 0;
  bottom: 0;
  z-index: 12;
  width: min(280px, 78%);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-left: 1px solid #d9e6e9;
  background: #fff;
  box-shadow: -10px 0 24px rgba(15, 23, 42, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(104%);
  transition: transform 210ms ease, opacity 210ms ease, visibility 0s linear 210ms;
}

.answer-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform 210ms ease, opacity 210ms ease, visibility 0s;
}

.answer-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.answer-drawer h3,
.answer-drawer h4 {
  margin: 0;
  color: var(--ink);
}

.answer-drawer h3 {
  font-size: 20px;
}

.answer-drawer h4 {
  margin-bottom: 10px;
  font-size: 15px;
}

.answer-drawer header button {
  width: 32px;
  height: 32px;
  border: 1px solid #d5dde5;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 20px;
  line-height: 1;
}

.answer-empty {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #64748b;
  background: #f5f8fa;
  font-size: 14px;
}

.student-list {
  max-height: min(430px, 52vh);
  overflow: auto;
  display: grid;
  gap: 8px;
}

.student-list span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  color: #334155;
  background: #fff;
  font-size: 14px;
}

.choice-editor-panel {
  overflow: auto;
  padding: 16px;
  border-right: 1px solid #dfe7ed;
}

.choice-editor-panel .form-block {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  position: relative;
}

.choice-editor-panel .form-block > span,
.choice-editor-panel .setting-block > span,
.rule-row > span,
.form-block-head span {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.form-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-block-head small {
  color: #64748b;
  font-size: 13px;
}

.form-block-head small b {
  color: var(--teal);
  font-weight: 800;
}

.choice-editor-panel textarea {
  width: 100%;
  height: 82px;
  resize: vertical;
  min-height: 72px;
  max-height: 180px;
  padding: 10px 12px 28px;
  border: 1px solid #cfd9e2;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}

.choice-editor-panel textarea.invalid {
  border-color: #dc2626;
}

.choice-editor-panel .answer-textarea {
  height: 96px;
}

.choice-editor-panel .picker-entry-textarea {
  height: 126px;
  min-height: 118px;
  max-height: 220px;
  padding-bottom: 12px;
}

.choice-editor-panel .question-block em {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #7b8794;
  font-size: 12px;
  font-style: normal;
}

.choice-editor-panel .option-list {
  display: grid;
  gap: 8px;
}

.choice-editor-panel .acceptable-answer-list {
  display: grid;
  gap: 8px;
}

.choice-editor-panel .matching-pair-list {
  display: grid;
  gap: 8px;
}

.choice-editor-panel .category-list {
  display: grid;
  gap: 10px;
}

.choice-editor-panel .ordering-item-list {
  display: grid;
  gap: 8px;
}

.choice-editor-panel .rating-criterion-list,
.choice-editor-panel .rating-level-list {
  display: grid;
  gap: 8px;
}

.picker-option-list {
  min-height: 120px;
  max-height: 260px;
  overflow: auto;
  display: flex;
  align-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e3ea;
  border-radius: 8px;
  background: #f7fafc;
}

.picker-option-chip {
  max-width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 10px;
  border: 1px solid #cbd8e2;
  border-radius: 6px;
  color: #263241;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.picker-option-chip:hover {
  border-color: rgba(7, 149, 143, 0.46);
  background: #f2fbfa;
}

.picker-option-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-option-chip strong {
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

.choice-editor-panel .option-row {
  height: auto;
  display: grid;
  grid-template-columns: 40px 32px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.poll-editor-panel:not(.poll-has-answer) .poll-option-row {
  grid-template-columns: 32px minmax(0, 1fr) 34px;
}

.poll-editor-panel:not(.poll-has-answer) .poll-option-row .correct-toggle {
  display: none;
}

.poll-option-row .option-letter {
  color: #fff;
  background: var(--teal);
}

.correct-toggle,
.option-delete {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff;
}

.correct-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(7, 149, 143, 0.46);
  background: rgba(231, 250, 247, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.correct-toggle:not(.checked)::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.42;
  transition: opacity 160ms ease;
}

.correct-toggle:not(.checked):hover,
.correct-toggle:not(.checked):focus-visible {
  border-color: rgba(7, 149, 143, 0.72);
  background: rgba(219, 248, 245, 0.96);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.correct-toggle:not(.checked):hover::after,
.correct-toggle:not(.checked):focus-visible::after {
  opacity: 0.72;
}

.correct-toggle.checked {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 7px 14px rgba(7, 149, 143, 0.2);
}

.correct-toggle img {
  width: 18px;
  height: 18px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.correct-toggle.checked img {
  opacity: 1;
}

.option-letter {
  width: 32px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #475569;
  background: #f1f5f8;
  font-weight: 700;
}

.matching-pair-index {
  width: 30px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.choice-editor-panel .matching-pair-row {
  height: auto;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.choice-editor-panel .category-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfe8ef;
  border-radius: 8px;
  background: #fbfdfe;
}

.category-letter {
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.ordering-item-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.choice-editor-panel .ordering-item-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.choice-editor-panel .rating-criterion-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.choice-editor-panel .rating-level-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 88px 34px;
  align-items: center;
  gap: 8px;
}

.rating-criterion-index,
.rating-level-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.rating-scale-end-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.rating-scale-max-grid {
  margin-top: 10px;
  margin-bottom: 0;
}

.choice-editor-panel .option-row input,
.choice-editor-panel .matching-pair-row input,
.choice-editor-panel .category-row input,
.choice-editor-panel .ordering-item-row input,
.choice-editor-panel .rating-criterion-row input,
.choice-editor-panel .rating-level-row input,
.choice-editor-panel .rating-scale-end input,
.acceptable-answer-row input,
.number-input {
  width: 100%;
  height: 38px;
  border: 1px solid #cfd9e2;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
}

.choice-editor-panel .category-answer-input {
  grid-column: 2 / 4;
}

.category-answer-list {
  grid-column: 1 / 4;
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.category-answer-chip {
  max-width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid #bccad6;
  border-radius: 6px;
  color: #263241;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.category-answer-chip:hover {
  border-color: rgba(7, 149, 143, 0.46);
  background: #f2fbfa;
}

.category-answer-chip span {
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

.acceptable-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.option-delete {
  border: 1px solid #cfd9e2;
}

.option-delete:hover {
  border-color: #fecaca;
  background: #fff5f5;
}

.option-delete img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.choice-editor-panel .add-option {
  width: 100%;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  border: 1px dashed #b9cbd4;
  border-radius: 6px;
  color: var(--teal);
  background: #fbfffe;
  font-weight: 700;
}

.choice-editor-panel .add-option img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.editor-save-bar {
  position: sticky;
  bottom: -16px;
  z-index: 2;
  margin: 18px -16px -16px;
  padding: 14px 16px 16px;
  border-top: 0;
  background: transparent;
}

.editor-save-action {
  width: 100%;
  height: 46px;
  font-size: 16px;
  font-weight: 800;
}

.editor-save-action svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #e6edf1;
}

.choice-editor-panel .setting-block {
  display: grid;
  gap: 7px;
}

.number-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.number-with-unit em {
  color: #64748b;
  font-style: normal;
  font-weight: 700;
}

.rule-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6edf1;
}

.rule-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.brainstorm-rule-list .vote-count-row,
.brainstorm-rule-list .vote-duration-row {
  transition: opacity 180ms ease;
}

.brainstorm-rule-list .vote-count-row.is-disabled,
.brainstorm-rule-list .vote-duration-row.is-disabled {
  opacity: 0.58;
}

.label-with-help {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.inline-help {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9fb1bf;
  border-radius: 50%;
  color: #64748b;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.inline-help:hover,
.inline-help:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.inline-help-tooltip {
  position: fixed;
  inset: auto;
  margin: 0;
  border: 0;
  width: max-content;
  max-width: min(220px, calc(100vw - 16px));
  padding: 7px 9px;
  border-radius: 6px;
  color: #fff;
  background: #23344e;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

.time-limit-row,
.multi-limit-row {
  grid-template-columns: minmax(0, 1fr) auto 88px 24px;
}

.vote-count-row,
.vote-duration-row,
.word-limit-row {
  grid-template-columns: minmax(0, 1fr) 88px 24px;
}

.rule-row > em {
  white-space: nowrap;
}

.time-limit-row em,
.multi-limit-row em,
.vote-count-row em,
.vote-duration-row em,
.word-limit-row em {
  color: #64748b;
  font-style: normal;
}

.poll-style-block {
  display: grid;
  gap: 8px;
}

.poll-style-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.poll-style-toggle button {
  min-width: 0;
  height: 116px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid #cfd9e2;
  border-radius: 5px;
  color: #8a94a6;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.poll-style-toggle button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.42;
  filter: grayscale(1) saturate(0);
}

.poll-style-toggle button:hover {
  border-color: rgba(7, 149, 143, 0.52);
  color: var(--teal);
  background: #f5fcfb;
}

.poll-style-toggle button.active {
  border-color: var(--teal);
  color: var(--teal);
  background: #fff;
}

.poll-style-toggle button.active img,
.poll-style-toggle button:hover img {
  opacity: 1;
  filter: none;
}

.choice-editor-panel .switch {
  width: 48px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 160ms ease;
}

.choice-editor-panel .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left 160ms ease;
}

.choice-editor-panel .switch.on {
  background: var(--teal);
}

.choice-editor-panel .switch.on::after {
  left: 25px;
}

.number-input:disabled {
  color: #94a3b8;
  background: #f1f5f8;
}

@media (max-width: 1180px) {
  .editor-page {
    height: auto;
    overflow: visible;
    grid-template-rows: auto auto;
  }

  .editor-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-preview-stage {
    height: auto;
    min-height: 620px;
  }

  .category-preview-stage {
    min-height: 700px;
  }

  .ordering-preview-stage {
    min-height: 620px;
  }

  .brainstorm-preview-stage {
    min-height: 620px;
  }

  .rating-preview-stage {
    min-height: 620px;
  }

  .random-picker-preview-stage {
    min-height: 760px;
  }

  .choice-editor-panel {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .editor-page {
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
    grid-template-rows: auto auto;
  }

  .editor-page .editor-top {
    grid-template-columns: 1fr;
    height: auto;
    gap: 10px;
    padding: 14px 18px;
  }

  .editor-title-wrap,
  .editor-page .editor-return {
    justify-self: stretch;
  }

  .editor-type-trigger,
  .editor-page .editor-return {
    width: 100%;
  }

  .editor-main {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    padding: 14px;
  }

  .activity-preview,
  .activity-preview-stage {
    width: 100%;
    max-width: 100%;
  }

  .editor-main > * {
    max-width: calc(100vw - 28px);
  }

  .activity-preview-stage {
    min-height: 590px;
    grid-template-rows: 74px minmax(130px, 0.72fr) minmax(260px, 1fr);
  }

  .matching-preview-stage {
    grid-template-rows: 74px minmax(110px, 0.36fr) minmax(330px, 1fr);
  }

  .category-preview-stage {
    min-height: 690px;
    grid-template-rows: 74px minmax(92px, 0.26fr) minmax(430px, 1fr);
  }

  .ordering-preview-stage {
    min-height: 610px;
    grid-template-rows: 74px minmax(120px, 0.5fr) minmax(300px, 1fr);
  }

  .poll-preview-stage {
    min-height: 590px;
    grid-template-rows: 74px minmax(130px, 0.72fr) minmax(260px, 1fr);
  }

  .brainstorm-preview-stage {
    min-height: 590px;
    grid-template-rows: 74px minmax(108px, 0.36fr) minmax(330px, 1fr);
  }

  .rating-preview-stage {
    min-height: 590px;
    grid-template-rows: 74px minmax(118px, 0.46fr) minmax(320px, 1fr);
  }

  .random-picker-preview-stage {
    min-height: 690px;
    grid-template-rows: 74px minmax(108px, 0.36fr) minmax(470px, 1fr);
  }

  .matching-preview-stage .preview-options-area {
    padding-top: 0;
  }

  .category-preview-stage .preview-options-area {
    padding: 0 12px 58px;
  }

  .ordering-preview-stage .preview-options-area {
    padding: 0 12px 64px;
  }

  .poll-preview-stage .preview-options-area {
    padding: 0 12px 68px;
  }

  .brainstorm-preview-stage .preview-options-area {
    padding: 0 12px 68px;
  }

  .rating-preview-stage .preview-options-area {
    padding: 0 12px 68px;
  }

  .random-picker-preview-stage .preview-options-area {
    padding: 0 12px 68px;
  }

  .preview-topline {
    display: flex;
    min-width: 0;
    overflow: hidden;
    padding: 10px 86px 10px 12px;
  }

  .preview-topline p {
    min-width: 0;
    padding-right: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    font-size: 14px;
  }

  .preview-brand {
    position: absolute;
    right: 12px;
    width: 72px;
    max-height: 30px;
    transform: translateY(-50%);
  }

  .preview-qr-panel {
    top: 88px;
    left: 50%;
    width: 188px;
    height: 188px;
    padding: 5px;
    transform: translate(-50%, -10px);
  }

  .preview-qr-panel.is-open {
    transform: translate(-50%, 0);
  }

  .preview-qr-panel img {
    width: 100%;
    height: 100%;
  }

  .preview-question-area h2 {
    font-size: 23px;
  }

  .preview-bars {
    grid-auto-columns: minmax(70px, 1fr);
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .preview-bars.qa-answer-results {
    width: 100%;
    grid-auto-columns: minmax(92px, 1fr);
    overflow-x: auto;
    height: 300px;
    min-height: 300px;
    padding-bottom: 0;
  }

  .activity-preview-stage .preview-bars.qa-answer-results {
    height: auto;
    min-height: 250px;
    grid-auto-flow: row;
    grid-auto-columns: initial;
    overflow: visible;
  }

  .activity-preview-stage .qa-summary-grid {
    width: 100%;
    min-height: 220px;
    gap: 14px;
  }

  .preview-bars.matching-preview-grid {
    width: 100%;
    height: 330px;
    min-height: 330px;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .preview-bars.category-preview-grid {
    width: 100%;
    height: 430px;
    min-height: 430px;
    grid-template-columns: 132px minmax(640px, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .preview-bars.ordering-preview-grid {
    width: 100%;
    height: 260px;
    min-height: 260px;
    grid-template-rows: minmax(112px, auto) auto;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .preview-bars.poll-preview-bars {
    width: 100%;
    grid-auto-columns: minmax(72px, 1fr);
  }

  .preview-bars.poll-pie-results {
    height: auto;
    min-height: 300px;
    overflow: visible;
  }

  .preview-bars.wordcloud-preview-results {
    width: 100%;
    height: 254px;
    min-height: 254px;
    overflow: visible;
    padding-bottom: 0;
    transform: none;
  }

  .wordcloud-word-thankful {
    font-size: 40px;
  }

  .wordcloud-word-successful {
    left: 36%;
    top: 67%;
    font-size: 31px;
  }

  .wordcloud-word-peaceful {
    left: 64%;
    top: 31%;
    font-size: 31px;
  }

  .wordcloud-word-friendly {
    left: 31%;
    top: 22%;
    font-size: 25px;
  }

  .wordcloud-word-hopeful {
    left: 57%;
    top: 60%;
    font-size: 16px;
  }

  .wordcloud-word-joyful {
    left: 18%;
    top: 45%;
    font-size: 16px;
  }

  .wordcloud-word-happy,
  .wordcloud-word-loving,
  .wordcloud-word-smiling,
  .wordcloud-word-harmonious {
    font-size: 15px;
  }

  .brainstorm-preview-flow {
    height: auto;
    min-height: 320px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 18px;
  }

  .brainstorm-step-list {
    grid-row: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding-top: 0;
  }

  .brainstorm-step {
    flex: 1 1 0;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 7px;
  }

  .brainstorm-step:not(:last-child)::after {
    display: none;
  }

  .brainstorm-step span {
    font-size: 14px;
  }

  .brainstorm-step small {
    display: none;
  }

  .brainstorm-empty-copy {
    justify-self: center;
    margin-top: 28px;
    font-size: 16px;
    text-align: center;
  }

  .brainstorm-next-button {
    grid-column: 1;
  }

  .preview-bars.rating-scale-results {
    width: 100%;
    height: auto;
    min-height: 430px;
    overflow: visible;
  }

  .rating-score-preview {
    min-height: 430px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, auto) auto;
    gap: 16px;
    transform: none;
  }

  .rating-chart-wrap {
    height: 258px;
  }

  .rating-chart {
    height: 238px;
  }

  .rating-axis-label {
    top: 104px;
    font-size: 18px;
  }

  .rating-axis-label-min {
    left: -2px;
  }

  .rating-axis-label-max {
    right: -8px;
  }

  .rating-chart-ticks {
    top: 222px;
    padding: 0 8px;
    font-size: 15px;
  }

  .rating-average-badges {
    top: 202px;
  }

  .rating-average-badge {
    width: 44px;
    height: 44px;
    left: -22px;
    font-size: 16px;
  }

  .rating-average-overall {
    top: 52px;
  }

  .rating-preview-legend {
    max-height: 126px;
    overflow: auto;
    align-content: start;
    gap: 9px;
    padding: 0 6px;
  }

  .rating-preview-legend span {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 9px;
  }

  .rating-preview-legend i {
    width: 14px;
    height: 14px;
  }

  .rating-preview-legend b {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .preview-bars.random-picker-wheel-results {
    width: 100%;
    height: auto;
    min-height: 470px;
  }

  .random-wheel-preview {
    min-height: 470px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, auto) auto auto;
    gap: 12px;
  }

  .random-wheel-shell {
    grid-row: auto;
    width: min(390px, calc(100vw - 74px));
    box-shadow: inset 0 0 0 11px #f3f6fa, 0 0 0 1px #d9e3ea, 0 14px 30px rgba(15, 23, 42, 0.1);
  }

  .random-picker-preview-stage.random-picker-long-question .random-wheel-shell {
    transform: translateY(34px);
  }

  .random-wheel-label {
    width: 104px;
    transform: translate(-50%, -50%) rotate(var(--label-angle)) translateY(calc(min(var(--label-distance), 124px) * -1)) rotate(90deg);
  }

  .random-wheel-label b {
    font-size: min(var(--label-size), 12px);
  }

  .random-wheel-pointer {
    top: -34px;
    width: 54px;
    height: 66px;
  }

  .random-wheel-play {
    width: 68px;
    height: 68px;
    border-width: 5px;
  }

  .random-wheel-play span {
    margin-left: 4px;
    border-top-width: 12px;
    border-bottom-width: 12px;
    border-left-width: 18px;
  }

  .random-wheel-meta {
    justify-self: center;
    width: min(220px, 100%);
    grid-template-columns: 1fr;
    align-items: center;
    padding: 14px 16px;
    transform: translateY(-16px);
  }

  .random-wheel-meta strong {
    font-size: 36px;
  }

  .random-wheel-meta span {
    font-size: 16px;
  }

  .random-wheel-results {
    justify-content: center;
    width: 100%;
    max-height: none;
    overflow: visible;
    transform: translateY(-10px);
  }

  .random-wheel-results em {
    font-size: 16px;
  }

  .random-wheel-results span {
    min-height: 36px;
    font-size: 16px;
  }

  .random-wheel-results b {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .rating-scale-preview {
    min-height: 330px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(170px, auto) auto;
    gap: 18px;
    transform: none;
  }

  .rating-scale-canvas {
    min-height: 176px;
    padding: 34px 8px 44px;
  }

  .rating-scale-line {
    margin: 0 18px;
  }

  .rating-scale-side {
    top: 20px;
    font-size: 16px;
  }

  .rating-scale-side-min {
    left: 0;
  }

  .rating-scale-side-max {
    right: 0;
  }

  .rating-scale-ticks {
    margin: 48px 18px 0;
  }

  .rating-scale-preview .rating-preview-legend {
    max-height: 118px;
    overflow: auto;
    align-content: start;
    gap: 8px;
    padding: 0 6px;
  }

  .poll-pie-preview {
    width: 100%;
    min-height: 300px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }

  .poll-pie-chart {
    width: 168px;
    height: 168px;
  }

  .poll-pie-chart::after {
    inset: 42px;
  }

  .poll-pie-legend {
    width: 100%;
  }

  .ordering-preview-list {
    width: max-content;
    min-width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .ordering-preview-card {
    width: 124px;
    min-width: 124px;
    padding: 9px 10px;
  }

  .ordering-preview-card span {
    font-size: 15px;
  }

  .ordering-result-summary {
    justify-content: flex-start;
  }

  .ordering-result-pill {
    min-width: max-content;
  }

  .category-option-bank {
    grid-template-rows: 40px minmax(0, 1fr);
  }

  .category-option-bank header {
    padding: 0 10px;
    font-size: 14px;
  }

  .category-option-bank > div {
    padding: 8px;
  }

  .category-option-bank > div span {
    min-height: 34px;
    padding: 0 10px;
    font-size: 15px;
  }

  .category-bucket-grid {
    grid-template-columns: repeat(4, minmax(146px, 1fr));
    gap: 10px;
  }

  .category-bucket-card {
    min-height: 198px;
  }

  .category-bucket-card header {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 0 10px;
  }

  .category-bucket-card header span {
    font-size: 16px;
  }

  .matching-preview-column {
    gap: 12px;
  }

  .matching-source-card,
  .matching-answer-card {
    height: 54px;
    font-size: 16px;
  }

  .matching-source-card {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .matching-answer-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .matching-source-card strong,
  .matching-answer-card strong {
    font-size: 19px;
  }

  .qa-bar-item {
    height: 300px;
  }

  .qa-bar-item .preview-bar-track {
    bottom: 116px;
    height: 166px;
  }

  .qa-bar-item strong {
    bottom: 84px;
  }

  .qa-bar-item span {
    display: none;
  }

  .qa-bar-item small {
    top: 232px;
    font-size: 15px;
    -webkit-line-clamp: 4;
  }

  .preview-participants {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .score-grid,
  .rating-scale-end-grid,
  .time-limit-row,
  .multi-limit-row {
    grid-template-columns: 1fr;
  }

  .choice-editor-panel .rating-level-row {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .choice-editor-panel .rating-level-row [data-rating-level-score] {
    grid-column: 2;
  }

  .choice-editor-panel .rating-level-row .option-delete {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .vote-count-row,
  .vote-duration-row,
  .word-limit-row {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .vote-count-row > span,
  .vote-duration-row > span,
  .word-limit-row > span {
    grid-column: 1 / -1;
  }

  .vote-count-row .number-input,
  .vote-duration-row .number-input,
  .word-limit-row .number-input {
    grid-column: 1;
  }

  .vote-count-row em,
  .vote-duration-row em,
  .word-limit-row em {
    grid-column: 2;
    align-self: center;
  }

  .choice-editor-panel .matching-pair-row {
    grid-template-columns: 30px minmax(0, 1fr) 34px;
  }

  .choice-editor-panel .matching-pair-row .matching-pair-index {
    grid-row: 1 / 3;
  }

  .choice-editor-panel .matching-pair-row [data-matching-option-input],
  .choice-editor-panel .matching-pair-row [data-matching-answer-input] {
    grid-column: 2;
  }

  .choice-editor-panel .matching-pair-row .option-delete {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .choice-editor-panel .category-row {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .choice-editor-panel .category-answer-input {
    grid-column: 1 / 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .answer-drawer,
  .answer-drawer.is-open,
  .preview-qr-panel,
  .preview-qr-panel.is-open,
  .live-participant-modal-backdrop,
  .live-participant-modal,
  .random-wheel {
    transition: none;
    animation: none;
  }

  .random-wheel-shell.is-ticking .random-wheel-pointer {
    animation: none;
  }
}

.temp-live-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.live-preview-stage {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-rows: 86px minmax(176px, auto) minmax(260px, 1fr) 142px;
  padding: 0 clamp(34px, 6vw, 118px);
  background: #fff;
}

.live-preview-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 0 calc(-1 * clamp(34px, 6vw, 118px));
  padding: 0 clamp(34px, 6vw, 118px);
  background: #f3f5f7;
  border-bottom: 1px solid #e1e7ee;
}

.live-preview-head p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #475569;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.live-head-actions {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateX(clamp(-48px, -3vw, -32px));
}

.live-head-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9e6e9;
  border-radius: 12px;
  color: #253041;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 4px 10px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.live-head-button:hover,
.live-head-button:focus-visible {
  border-color: rgba(37, 48, 65, 0.2);
  color: #253041;
  background: #f5f7f9;
}

.live-head-button:focus-visible {
  outline: 3px solid rgba(18, 184, 134, 0.16);
  outline-offset: 2px;
}

.live-head-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.1;
}

.live-head-button.is-muted {
  color: #64748b;
}

.live-preview-brand {
  justify-self: end;
  min-width: 0;
  width: 132px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  border: 0;
  background: transparent;
  cursor: default;
}

.live-preview-brand img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.live-qr-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9e6e9;
  border-radius: 8px;
  background: #fff;
}

.live-qr-button:hover,
.live-qr-button[aria-expanded="true"] {
  border-color: rgba(7, 149, 143, 0.44);
  background: #f2fbfa;
}

.live-qr-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.live-qr-panel {
  position: fixed;
  top: 104px;
  left: 58px;
  z-index: 24;
  width: 360px;
  height: 360px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid #d7e4e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 190ms ease, transform 190ms ease, visibility 0s linear 190ms;
}

.live-qr-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 190ms ease, transform 190ms ease, visibility 0s;
}

.live-qr-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.live-qr-status {
  max-width: 220px;
  color: #536170;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.live-qr-panel > strong {
  display: block;
  margin-top: 8px;
  text-align: center;
  letter-spacing: 0.16em;
  color: #123735;
}

.student-score-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}

.student-score-breakdown div {
  padding: 12px;
  border-radius: 14px;
  background: #f4faf8;
  border: 1px solid #d8ebe6;
  text-align: center;
}

.student-score-breakdown span,
.student-score-breakdown strong {
  display: block;
}

.student-score-breakdown span {
  margin-bottom: 4px;
  color: #67817e;
  font-size: 12px;
}

.student-score-breakdown strong {
  color: #123735;
  font-size: 16px;
}

.live-question-hero {
  align-self: start;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(1500px, 100%);
  padding-top: 24px;
  text-align: center;
}

.live-question-copy {
  width: 100%;
}

.live-question-hero h1 {
  display: inline;
  margin: 0;
  color: #1f2937;
  font-size: 54px;
  line-height: 1.18;
  font-weight: 800;
  text-wrap: balance;
}

.live-question-toggle {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 10px;
  padding: 5px 7px;
  border: 0;
  border-radius: 8px;
  color: #087b78;
  background: transparent;
  font: inherit;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  vertical-align: 0.16em;
  cursor: pointer;
}

.live-question-toggle[hidden] {
  display: none;
}

.live-question-toggle:hover {
  background: #edf9f7;
}

.live-question-toggle:active {
  background: #dff4f0;
}

.live-question-toggle:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.34);
  outline-offset: 2px;
}

.live-join-stage {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 56px 0 36px;
}

.temp-live-page[data-live-phase="results"] .live-join-stage {
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 20px;
  padding-top: 12px;
}

.live-join-stage > [hidden] {
  display: none;
}

.live-start-button[hidden],
.live-stage-action-button[hidden],
.live-end-button[hidden],
.live-countdown [hidden],
.live-answer-timer[hidden] {
  display: none;
}

.live-waiting {
  color: #252b38;
  font-size: 58px;
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
  transform: translateY(34px);
  animation: liveWaitingBreath 2.2s ease-in-out infinite;
}

@keyframes liveWaitingBreath {
  0%,
  100% {
    opacity: 0.68;
    transform: translateY(34px) scale(0.985);
  }
  50% {
    opacity: 1;
    transform: translateY(34px) scale(1);
  }
}

.live-countdown {
  display: grid;
  place-items: center;
  min-height: 320px;
}

.live-countdown-intro {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: #1f2937;
  font-size: 58px;
  font-weight: 800;
}

.live-countdown-intro > span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: var(--teal);
  animation: liveStopwatchShake 180ms ease-in-out infinite;
}

.live-countdown-intro svg {
  width: 64px;
  height: 64px;
  stroke-width: 2.2;
}

@keyframes liveStopwatchShake {
  0%,
  100% {
    transform: rotate(-8deg) translateX(-2px);
  }
  50% {
    transform: rotate(8deg) translateX(2px);
  }
}

.live-countdown-number {
  color: var(--teal);
  font-size: clamp(150px, 22vw, 300px);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.live-countdown-number.is-ticking {
  animation: liveCountdownTick 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes liveCountdownTick {
  from {
    transform: scale(1.22);
  }
  to {
    transform: scale(1);
  }
}

.live-response-results {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 8;
  align-self: end;
  justify-self: center;
  grid-row: 2;
  transform: none;
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars {
  height: var(--live-chart-height, 250px);
  min-height: 0;
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars .preview-bar-item {
  height: 100%;
}

.temp-live-page[data-live-phase="results"] .live-response-results.live-option-bars {
  transform: translateY(calc(clamp(40px, 10vh, 120px) - var(--live-bar-label-shift, 0px)));
}

.live-response-results.live-option-bars .preview-bar-track {
  bottom: 72px;
  height: var(--live-bar-track-height, 170px);
}

.live-response-results .poll-bar-item .preview-bar-track {
  height: var(--live-bar-track-height, 170px);
}

.live-response-results .poll-bar-item em {
  bottom: 78px;
  transition: bottom 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.live-response-results.poll-pie-results {
  transform: none;
}

.live-response-results.live-choice-bars .preview-bar-track i {
  border-radius: 7px 7px 0 0;
}

.live-response-results.live-option-bars .preview-bar-item em {
  top: auto;
  bottom: 78px;
  z-index: 3;
  min-width: 24px;
  color: #334155;
  font-size: 18px;
  text-align: center;
  transition: none;
}

.live-response-results .live-choice-bar-item em.is-count-changed,
.live-response-results .poll-bar-item em.is-count-changed {
  animation: live-count-pop 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes live-count-pop {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  45% {
    transform: translateX(-50%) translateY(-8px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

.live-choice-label {
  position: absolute;
  top: calc(100% - 60px);
  left: 50%;
  width: min(210px, 135%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transform: translateX(-50%);
  color: #334155;
  text-align: center;
}

.live-response-results .live-choice-label strong {
  position: static;
  width: auto;
  height: auto;
  display: inline;
  flex: 0 0 auto;
  color: #475569;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  font-size: 15px;
  transform: none;
}

.live-response-results .live-choice-label span {
  position: static;
  width: auto;
  max-width: 155px;
  display: block;
  overflow: hidden;
  color: #334155;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: none;
}

.live-response-results.live-option-bars .live-choice-label {
  width: min(260px, calc(100% - 8px));
  align-items: flex-start;
}

.live-response-results.live-option-bars .live-choice-label span {
  width: 100%;
  max-width: none;
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: clip;
  text-wrap: pretty;
  white-space: normal;
}

.live-response-results.live-option-bars .live-choice-label b {
  margin-top: 2px;
}

.live-choice-label b {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.live-choice-bar-item:not(.is-revealed) .preview-bar-track i {
  background: #82d2c9;
}

.live-response-results.live-choice-bars .live-choice-bar-item.is-revealed.correct .preview-bar-track i,
.live-response-results .poll-bar-item .preview-bar-track i {
  background: #82d2c9;
}

.live-choice-bar-item.is-revealed.incorrect .preview-bar-track i {
  background: #bac8ce;
}

.live-choice-bar-item.is-revealed.correct .live-choice-label span {
  color: var(--teal-dark);
}

.live-participation-stats {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 15;
}

.live-participation-stats div {
  min-width: 74px;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(28, 52, 62, 0.08);
}

.live-rating-results {
  width: min(940px, calc(100vw - 300px));
}

.live-rating-chart {
  display: grid;
  gap: 18px;
  width: 100%;
  min-height: 360px;
  padding: 22px 26px 20px;
  border: 1px solid rgba(181, 205, 208, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 56px rgba(24, 55, 62, 0.1);
  backdrop-filter: blur(18px);
}

.live-rating-chart svg {
  width: 100%;
  height: 270px;
  overflow: visible;
}

.live-rating-grid {
  fill: none;
  stroke: #dce9eb;
  stroke-width: 0.45;
}

.live-rating-chart polyline {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.live-rating-chart circle {
  fill: #fff;
  stroke: var(--teal);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.live-rating-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.live-rating-labels span {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.live-rating-labels strong {
  color: #153d3a;
  font-size: 20px;
}

.live-answer-timer {
  position: relative;
  left: auto;
  top: auto;
  z-index: 9;
  align-self: start;
  justify-self: center;
  grid-row: 1;
  color: #263348;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.04em;
  transform: none;
}

.live-answer-timer.is-final {
  color: #263348;
  font-size: clamp(72px, 9vw, 128px);
  font-weight: 900;
  letter-spacing: 0;
}

.live-answer-timer.is-final.is-pulsing {
  animation: liveFinalCountdownShake 760ms linear;
}

@keyframes liveFinalCountdownShake {
  0%,
  100% {
    transform: rotate(0) scale(1);
  }
  12% {
    transform: translate(-16px, 8px) rotate(-4deg) scale(1.08);
  }
  26% {
    transform: translate(18px, -10px) rotate(4deg) scale(1.14);
  }
  42% {
    transform: translate(-14px, -5px) rotate(-3deg) scale(1.1);
  }
  58% {
    transform: translate(12px, 10px) rotate(3deg) scale(1.16);
  }
  76% {
    transform: translate(-8px, 4px) rotate(-2deg) scale(1.08);
  }
}

.live-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.live-results-head strong {
  color: #1f2937;
  font-size: 30px;
}

.live-results-head span {
  color: #667085;
  font-size: 18px;
  font-weight: 700;
}

.live-results-grid {
  display: grid;
  gap: 16px;
}

.live-result-option {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 1fr) 68px;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 10px 18px;
  border: 1px solid #dfe7ed;
  border-radius: 10px;
  background: #fff;
}

.live-result-option > div:first-child {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.live-result-option strong {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--teal);
  font-size: 18px;
}

.live-result-option span {
  overflow: hidden;
  color: #253041;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-result-option em,
.live-result-option small {
  color: #667085;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.live-result-option small {
  color: var(--teal-dark);
  font-size: 20px;
  text-align: right;
}

.live-result-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf1f3;
}

.live-result-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 280ms ease;
}

.live-results-empty {
  min-height: 280px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #667085;
}

.live-results-empty strong {
  color: var(--teal);
  font-size: 64px;
}

.live-results-empty span {
  font-size: 20px;
  font-weight: 700;
}

.live-participant-cloud {
  width: min(1180px, 100%);
  height: 330px;
  position: relative;
}

.live-participant-cloud span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--name-color);
  font-size: 27px;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(var(--name-rotate)) scale(var(--name-scale));
  transform-origin: center;
}

.live-participant-cloud span b {
  display: inline-block;
  flex: 0 0 auto;
  font-size: 27px;
  line-height: 1;
  font-weight: 400;
}

.live-participant-cloud span em {
  color: inherit;
  font-style: normal;
}

.live-participant-cloud span.is-new {
  animation: liveNameIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes liveNameIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px)) rotate(var(--name-rotate)) scale(calc(var(--name-scale) * 0.9));
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--name-rotate)) scale(var(--name-scale));
    filter: blur(0);
  }
}

.live-start-button {
  position: fixed;
  left: 50%;
  bottom: 76px;
  z-index: 14;
  width: min(380px, 78vw);
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--teal);
  color: #fff;
  box-shadow: none;
  font-size: 28px;
  font-weight: 800;
  text-shadow: none;
  transform: translateX(-50%);
  transition: background-color 160ms ease, transform 160ms ease;
}

.live-start-button:hover {
  background: var(--teal-dark);
  transform: translateX(-50%) translateY(-2px);
}

.live-start-button:active {
  background: var(--teal-strong);
  transform: translateX(-50%);
}

.live-start-button svg {
  width: 24px;
  height: 24px;
}

.live-bottom-nav {
  position: fixed;
  left: 34px;
  bottom: 24px;
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.live-bottom-nav button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1f2937;
}

.live-bottom-nav button[hidden] {
  display: none;
}

.live-bottom-nav button:first-child svg {
  transform: rotate(180deg);
}

.live-bottom-nav .live-ranking-button {
  margin-left: 10px;
}

.live-bottom-nav .live-ranking-button,
.live-bottom-nav .live-reanswer-button,
.live-bottom-nav .live-end-button {
  border: 1px solid #d7e4e8;
  border-radius: 50%;
  background: #fff;
  color: #253041;
}

.live-bottom-nav .live-ranking-button:hover,
.live-bottom-nav .live-ranking-button:focus-visible,
.live-bottom-nav .live-reanswer-button:hover,
.live-bottom-nav .live-reanswer-button:focus-visible,
.live-bottom-nav .live-end-button:hover,
.live-bottom-nav .live-end-button:focus-visible {
  border-color: rgba(37, 48, 65, 0.2);
  color: #253041;
  background: #f5f7f9;
}

.live-bottom-nav .live-ranking-button svg,
.live-bottom-nav .live-reanswer-button svg,
.live-bottom-nav .live-end-button svg {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.live-bottom-nav button:disabled {
  opacity: 0.32;
  cursor: pointer;
}

.live-bottom-nav svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.3;
}

.live-bottom-nav > span {
  min-width: 66px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef0f4;
  color: #1f2937;
  font-size: 18px;
  font-weight: 800;
}

.live-ranking-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(18, 31, 45, 0.32);
  -webkit-backdrop-filter: blur(14px) saturate(0.88);
  backdrop-filter: blur(14px) saturate(0.88);
  animation: liveRankingBackdropIn 180ms ease-out;
}

.live-ranking-backdrop[hidden] {
  display: none;
}

.live-participant-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(18, 31, 45, 0.32);
  -webkit-backdrop-filter: blur(14px) saturate(0.88);
  backdrop-filter: blur(14px) saturate(0.88);
  animation: liveRankingBackdropIn 180ms ease-out;
}

.live-participant-modal-backdrop[hidden] {
  display: none;
}

.live-ranking-modal {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 56px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(248, 252, 252, 0.86);
  box-shadow: 0 8px 24px rgba(17, 38, 49, 0.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
  animation: liveRankingModalIn 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

.live-participant-modal {
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 56px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(248, 252, 252, 0.92);
  box-shadow: 0 8px 24px rgba(17, 38, 49, 0.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
  animation: liveRankingModalIn 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

.live-ranking-head {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 16px;
}

.live-ranking-head > div,
.live-ranking-head > div > span {
  display: flex;
  align-items: center;
}

.live-ranking-head > div {
  gap: 14px;
}

.live-ranking-head > div > span {
  width: 48px;
  height: 48px;
  justify-content: center;
  border-radius: 50%;
  background: #e5f6f3;
  color: #087f7a;
}

.live-ranking-head svg {
  width: 27px;
  height: 27px;
  stroke-width: 2;
}

.live-participant-modal-head img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.live-ranking-head h2,
.live-ranking-head p {
  margin: 0;
}

.live-ranking-head h2 {
  color: #172033;
  font-size: 25px;
}

.live-ranking-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
}

.live-ranking-head > button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #475569;
  font-size: 27px;
  line-height: 1;
}

.live-ranking-head > button:hover {
  background: #fff;
}

.live-ranking-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 24px 14px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(226, 235, 237, 0.8);
}

.live-ranking-tabs button {
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  font-size: 15px;
  font-weight: 800;
}

.live-ranking-tabs button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.92);
  color: #087f7a;
  box-shadow: 0 2px 6px rgba(18, 50, 55, 0.08);
}

.live-ranking-list {
  min-height: 280px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 24px 24px;
}

.live-participant-modal-list {
  min-height: 260px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 24px 24px;
}

.live-ranking-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: 38px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.live-participant-modal-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.live-participant-modal-row.is-offline .live-participant-modal-avatar {
  opacity: 0.72;
  filter: saturate(0.3);
}

.live-participant-presence {
  min-width: 46px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.live-participant-presence.is-online {
  background: #dff4f0;
  color: #075f59;
}

.live-participant-presence.is-offline {
  background: #e9eef0;
  color: #475467;
}

.live-ranking-row.is-top-1 {
  background: rgba(255, 249, 221, 0.78);
}

.live-ranking-row.is-top-2,
.live-ranking-row.is-top-3 {
  background: rgba(244, 248, 248, 0.82);
}

.live-ranking-place {
  color: #596579;
  font-size: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.live-ranking-row.is-top-1 .live-ranking-place {
  color: #b47708;
  font-size: 22px;
}

.live-ranking-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rank-avatar);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.live-participant-modal-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rank-avatar);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.live-ranking-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.live-ranking-identity strong {
  overflow: hidden;
  color: #253041;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-ranking-identity span {
  color: #718096;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.live-ranking-score {
  color: #087f7a;
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.live-ranking-score small {
  margin-left: 3px;
  color: #667085;
  font-size: 12px;
}

.live-ranking-empty,
.live-ranking-loading {
  min-height: 300px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #667085;
  text-align: center;
}

.live-ranking-empty svg {
  width: 42px;
  height: 42px;
  color: #99aaa9;
}

.live-ranking-empty strong {
  color: #344054;
  font-size: 18px;
}

.live-ranking-empty span {
  max-width: 30rem;
  font-size: 14px;
  line-height: 1.6;
}

.live-ranking-loading i {
  width: 28px;
  height: 28px;
  border: 3px solid #cfe5e2;
  border-top-color: #0a938c;
  border-radius: 50%;
  animation: liveRankingSpin 700ms linear infinite;
}

@keyframes liveRankingBackdropIn {
  from { opacity: 0; }
}

@keyframes liveRankingModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
}

@keyframes liveRankingSpin {
  to { transform: rotate(360deg); }
}

.live-winner-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(18, 31, 45, 0.34);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  backdrop-filter: blur(14px) saturate(0.9);
  animation: liveRankingBackdropIn 180ms ease-out;
}

.live-winner-backdrop[hidden] {
  display: none;
}

.live-winner-modal {
  position: relative;
  width: min(780px, 100%);
  max-height: min(740px, calc(100vh - 56px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 237, 169, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(252, 255, 255, 0.86), rgba(245, 250, 251, 0.78));
  box-shadow: 0 8px 24px rgba(17, 38, 49, 0.18);
  -webkit-backdrop-filter: blur(26px) saturate(1.22);
  backdrop-filter: blur(26px) saturate(1.22);
  animation: liveRankingModalIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.live-winner-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(210, 223, 228, 0.8);
  border-radius: 12px;
  color: #334155;
  background: rgba(255, 255, 255, 0.78);
  font-size: 28px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.live-winner-close:hover,
.live-winner-close:focus-visible {
  color: #172033;
  background: #fff;
}

.live-winner-head {
  position: relative;
  z-index: 2;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px 72px 8px;
  text-align: center;
}

.live-winner-head > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a66f05;
  background: rgba(255, 243, 194, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.live-winner-head svg {
  width: 26px;
  height: 26px;
}

.live-winner-head h2 {
  margin: 0;
}

.live-winner-head h2 {
  color: #172033;
  font-size: 26px;
  letter-spacing: 0;
}

.live-winner-podium {
  position: relative;
  z-index: 2;
  min-height: 400px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: end;
  justify-items: center;
  gap: 0;
  padding: 26px clamp(24px, 4vw, 42px) 30px;
}

.live-winner-people {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(10px, 2vw, 18px);
  margin-bottom: -10px;
  pointer-events: none;
}

.live-winner-card {
  --winner-rest-y: 0px;
  --winner-float-distance: 6px;
  position: relative;
  min-width: 0;
  align-self: end;
  display: grid;
  justify-items: center;
  transform: translateY(var(--winner-rest-y));
}

.live-winner-card:not(.is-empty) {
  animation: liveWinnerFloat 3.2s ease-in-out infinite;
}

@keyframes liveWinnerFloat {
  0%, 100% { transform: translateY(var(--winner-rest-y)); }
  50% { transform: translateY(calc(var(--winner-rest-y) - var(--winner-float-distance))); }
}

.live-winner-card.is-place-1 {
  grid-column: 2;
  --winner-rest-y: -6px;
}

.live-winner-card.is-place-2 {
  grid-column: 1;
  --winner-rest-y: 46px;
}

.live-winner-card.is-place-3 {
  grid-column: 3;
  --winner-rest-y: 78px;
}

.live-winner-profile {
  position: relative;
  z-index: 2;
  min-width: 0;
  width: min(150px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
}

.live-winner-crown {
  position: absolute;
  z-index: 3;
  top: -30px;
  width: 58px;
  height: 58px;
  object-fit: contain;
  pointer-events: none;
}

.live-winner-avatar {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: #172033;
  background: transparent;
  font-size: 44px;
  line-height: 1;
  font-weight: 900;
  box-shadow: none;
}

.live-winner-profile strong {
  max-width: 100%;
  overflow: hidden;
  color: #172033;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-winner-podium-art {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(15, 23, 42, 0.08));
  pointer-events: none;
  user-select: none;
}

.live-winner-state {
  grid-column: 1 / -1;
  align-self: center;
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #64748b;
  text-align: center;
}

.live-winner-state strong {
  color: #172033;
  font-size: 24px;
}

.live-winner-state span {
  max-width: 30rem;
  font-size: 15px;
  line-height: 1.6;
}

.live-winner-state i {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(207, 229, 226, 0.9);
  border-top-color: #0a938c;
  border-radius: 50%;
  animation: liveRankingSpin 700ms linear infinite;
}

.live-winner-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.live-drawer-tab {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 30;
  width: 54px;
  min-height: 176px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 12px 10px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: #3f4758;
  color: #fff;
  transform: translateY(-50%);
  box-shadow: -2px 4px 12px rgba(15, 23, 42, 0.16);
}

.live-drawer-tab svg {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
}

.live-drawer-tab[aria-expanded="true"] svg {
  transform: rotate(0);
}

.live-drawer-tab span {
  writing-mode: vertical-rl;
  letter-spacing: 5px;
  line-height: 1.15;
  font-size: 18px;
  font-weight: 800;
}

.live-control-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 32;
  width: min(380px, 88vw);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 24px;
  border-left: 1px solid #d9e6e9;
  background: #fff;
  box-shadow: -12px 0 26px rgba(15, 23, 42, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(102%);
  transition: transform 210ms ease, opacity 210ms ease, visibility 0s linear 210ms;
}

.live-control-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform 210ms ease, opacity 210ms ease, visibility 0s;
}

.live-reset-modal-backdrop,
.live-question-delete-modal-backdrop,
.live-question-edit-modal-backdrop,
.live-question-forward-modal-backdrop {
  z-index: 40;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(4px);
}

.live-control-drawer header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 16px;
}

.live-control-drawer h2,
.live-control-drawer h3,
.live-control-drawer p {
  margin: 0;
}

.live-control-drawer h2 {
  color: #172033;
  font-size: 24px;
}

.live-control-drawer header p {
  margin-top: 4px;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
}

.live-control-drawer header button {
  width: 36px;
  height: 36px;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 24px;
  line-height: 1;
}

.live-control-drawer header > button:last-child {
  grid-column: 3;
  justify-self: end;
}

.live-drawer-section {
  min-height: 0;
  display: grid;
  gap: 14px;
}

.live-drawer-section h3 {
  color: #253041;
  font-size: 16px;
}

.live-week-section {
  padding-bottom: 16px;
  border-bottom: 1px solid #e4ebef;
}

.class-week-control {
  width: min(100%, 320px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 7px 14px;
  color: #253041;
  text-align: left;
}

.class-week-control > span {
  font-size: 15px;
  font-weight: 800;
}

.class-week-control select {
  width: 100%;
  height: 44px;
  border: 1px solid #d7e4e8;
  border-radius: 10px;
  padding: 0 34px 0 12px;
  color: #253041;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.class-week-control select:focus-visible {
  outline: 3px solid rgba(18, 184, 134, 0.2);
  outline-offset: 2px;
}

.class-week-control select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.class-week-control small {
  grid-column: 1 / -1;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.class-week-control-compact {
  width: 132px;
  display: block;
}

.class-week-control-compact select {
  height: 40px;
}

.temp-class-empty .class-week-control {
  width: min(280px, 100%);
  margin-top: 2px;
}

.live-question-section {
  overflow: hidden;
}

.live-question-order-list {
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 2px;
}

.live-question-order-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.live-question-order-item:active {
  cursor: grabbing;
}

.live-question-order-item.active {
  border-color: rgba(7, 149, 143, 0.42);
  background: #f2fbfa;
}

.live-question-order-item.is-dragging {
  opacity: 0.48;
}

.live-question-order-item.is-drop-before::before,
.live-question-order-item.is-drop-after::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
}

.live-question-order-item.is-drop-before::before {
  top: -6px;
}

.live-question-order-item.is-drop-after::after {
  bottom: -6px;
}

.live-question-order-item > span {
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.live-question-order-item strong {
  min-width: 0;
  overflow: hidden;
  color: #253041;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-question-order-item div {
  display: inline-flex;
  gap: 4px;
}

.live-question-order-item button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e4e8;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.live-question-order-item svg {
  width: 16px;
  height: 16px;
}

.live-question-order-item .live-question-delete-button {
  border-color: #f2d4d4;
  color: #c74444;
}

.live-question-order-item .live-question-edit-button {
  border-color: #bfe3df;
  color: var(--teal);
}

.live-question-order-item .live-question-forward-button {
  border-color: #cfe3f4;
  color: #2870a8;
}

.live-question-order-item .live-question-edit-button:hover,
.live-question-order-item .live-question-edit-button:focus-visible {
  border-color: #79c8c1;
  background: #eefaf9;
}

.live-question-order-item .live-question-forward-button:hover,
.live-question-order-item .live-question-forward-button:focus-visible {
  border-color: #8bbdde;
  background: #eef7fd;
  color: #155c92;
}

.live-question-order-item .live-question-delete-button:hover,
.live-question-order-item .live-question-delete-button:focus-visible {
  border-color: #e9a9a9;
  background: #fff4f4;
  color: #ad2929;
}

.live-setting-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #253041;
  font-size: 15px;
  font-weight: 800;
}

.live-reset-button {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #fff;
  color: #253041;
  font-size: 15px;
  font-weight: 800;
}

.live-reset-button:hover,
.live-question-order-item button:hover {
  border-color: rgba(7, 149, 143, 0.42);
  background: #f2fbfa;
}

.live-reset-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.live-reset-button svg {
  width: 18px;
  height: 18px;
}

.live-question-forward-modal {
  max-width: 460px;
}

.live-question-forward-body {
  display: grid;
  gap: 12px;
}

.live-question-forward-title {
  display: block;
  padding: 10px 12px;
  border: 1px solid #dbe8e6;
  border-radius: 8px;
  color: #172033;
  background: #f7fbfb;
  font-size: 14px;
  line-height: 1.45;
}

.live-forward-class-list {
  max-height: min(360px, 52vh);
  overflow: auto;
  display: grid;
  gap: 10px;
}

.live-forward-class-option {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #fff;
  color: #253041;
  text-align: left;
}

.live-forward-class-option:hover,
.live-forward-class-option:focus-visible {
  border-color: rgba(7, 149, 143, 0.42);
  background: #f2fbfa;
}

.live-forward-class-option:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.live-forward-class-option span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.live-forward-class-option strong,
.live-forward-class-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-forward-class-option small {
  color: #667085;
}

.live-forward-class-option em {
  flex: none;
  color: var(--teal);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.live-forward-empty {
  padding: 18px 12px;
  border: 1px dashed #cbd9df;
  border-radius: 8px;
  color: #667085;
  background: #f8fbfc;
  text-align: center;
  font-size: 14px;
}

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

.live-reset-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.live-reset-options label:has(input:checked),
.live-reset-options label.is-selected {
  border-color: rgba(7, 149, 143, 0.46);
  background: #f2fbfa;
}

.live-reset-options input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.live-reset-options span {
  display: grid;
  gap: 4px;
}

.live-reset-options strong {
  color: #172033;
  font-size: 15px;
}

.live-reset-options em {
  color: #667085;
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.temp-live-empty-page {
  display: grid;
  place-items: center;
  padding: 32px;
}

.temp-class-empty {
  width: min(620px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.temp-empty-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.temp-empty-brand .sidebar-brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: block;
}

.temp-empty-brand .sidebar-brand-text {
  color: #263644;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 5px;
  white-space: nowrap;
}

.temp-class-empty h1 {
  margin: 12px 0 0;
  color: #1f2937;
  font-size: 42px;
  line-height: 1.2;
}

.temp-class-empty p {
  max-width: 32rem;
  margin: 0;
  color: #667085;
  font-size: 18px;
  line-height: 1.7;
}

.temp-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .live-preview-stage {
    grid-template-rows: 74px minmax(158px, auto) minmax(260px, 1fr) 126px;
    padding: 0 22px;
  }

  .live-preview-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .live-head-actions {
    transform: none;
  }

  .live-preview-head > div:not(.live-head-actions) {
    display: none;
  }

  .live-preview-head p {
    justify-self: center;
    font-size: 15px;
  }

  .live-preview-brand {
    width: auto;
  }

  .live-qr-panel {
    top: 82px;
    left: 22px;
    width: min(330px, calc(100vw - 44px));
    height: min(330px, calc(100vw - 44px));
  }

  .live-question-hero {
    gap: 12px;
    padding-top: 18px;
  }

  .live-question-hero h1 {
    font-size: 36px;
  }

  .live-question-toggle {
    margin-inline-start: 8px;
    font-size: 16px;
  }

  .live-waiting {
    font-size: 40px;
  }

  .live-countdown-intro {
    gap: 14px;
    font-size: 40px;
  }

  .live-countdown-intro > span {
    width: 54px;
    height: 54px;
  }

  .live-countdown-intro svg {
    width: 48px;
    height: 48px;
  }

  .live-result-option {
    grid-template-columns: minmax(220px, 0.9fr) minmax(180px, 1fr) 58px;
    gap: 14px;
  }

  .live-response-results {
    bottom: 22px;
  }

  .live-participant-cloud {
    height: 310px;
  }

  .live-participant-cloud span {
    font-size: 21px;
  }

  .live-bottom-nav {
    left: 18px;
    bottom: 18px;
  }

  .live-participation-stats {
    left: auto;
    right: 18px;
    bottom: 74px;
    width: auto;
    max-width: calc(100vw - 36px);
    flex-wrap: nowrap;
  }

  .live-ranking-modal {
    width: min(640px, 100%);
  }

  .live-participant-modal {
    width: min(500px, 100%);
  }

  .live-winner-modal {
    width: min(760px, 100%);
    max-height: min(700px, calc(100vh - 44px));
  }

  .live-winner-podium {
    min-height: 360px;
    padding-inline: 22px;
  }

  .live-winner-profile {
    width: min(150px, 100%);
  }

  .live-winner-people {
    width: min(640px, 100%);
  }

  .live-winner-podium-art {
    width: min(680px, 100%);
  }

  .live-drawer-tab {
    min-height: 158px;
  }

  .live-start-button {
    bottom: 56px;
    width: min(340px, 76vw);
    height: 76px;
    font-size: 24px;
  }
}

@media (max-width: 560px) {
  .live-preview-head {
    grid-template-columns: auto 1fr;
    justify-items: stretch;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 10px;
    row-gap: 8px;
  }

  .live-head-actions {
    justify-self: start;
  }

  .live-preview-brand {
    justify-self: end;
  }

  .live-preview-head p {
    order: 2;
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 92vw;
  }

  .live-question-hero h1 {
    font-size: 30px;
  }

  .live-participant-cloud {
    align-content: start;
    padding-top: 20px;
  }

  .live-control-drawer {
    width: 100vw;
  }

  .live-ranking-backdrop,
  .live-participant-modal-backdrop {
    padding: 12px;
  }

  .live-ranking-modal,
  .live-participant-modal {
    max-height: calc(100vh - 24px);
  }

  .live-ranking-head {
    padding: 16px 16px 12px;
  }

  .live-ranking-tabs {
    margin: 0 16px 12px;
  }

  .live-ranking-list {
    padding: 0 16px 16px;
  }

  .live-participant-modal-list {
    padding: 0 16px 16px;
  }

  .live-ranking-row {
    grid-template-columns: 28px 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 10px;
  }

  .live-participant-modal-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 10px;
  }

  .live-ranking-avatar {
    width: 40px;
    height: 40px;
  }

  .live-participant-modal-avatar {
    width: 40px;
    height: 40px;
  }

  .live-ranking-score {
    font-size: 19px;
  }

  .live-winner-backdrop {
    padding: 12px;
  }

  .live-winner-modal {
    max-height: calc(100vh - 24px);
    border-radius: 16px;
  }

  .live-winner-close {
    top: 14px;
    right: 14px;
  }

  .live-winner-head {
    min-height: 82px;
    justify-content: center;
    padding: 16px 62px 8px;
    text-align: center;
  }

  .live-winner-head > span {
    width: 44px;
    height: 44px;
  }

  .live-winner-head h2 {
    font-size: 22px;
  }

  .live-winner-podium {
    min-height: 310px;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 28px 10px 14px;
  }

  .live-winner-profile {
    width: 100%;
    gap: 5px;
    padding: 0;
  }

  .live-winner-avatar {
    width: 48px;
    height: 48px;
    font-size: 34px;
  }

  .live-winner-crown {
    top: -24px;
    width: 46px;
    height: 46px;
  }

  .live-winner-profile strong {
    font-size: 14px;
  }

  .live-winner-card {
    --winner-float-distance: 4px;
  }

  .live-winner-card.is-place-1 {
    --winner-rest-y: -2px;
  }

  .live-winner-card.is-place-2 {
    --winner-rest-y: 24px;
  }

  .live-winner-card.is-place-3 {
    --winner-rest-y: 40px;
  }

  .live-winner-people {
    width: min(92vw, 100%);
    gap: 7px;
    margin-bottom: -6px;
  }

  .live-winner-podium-art {
    width: min(92vw, 100%);
  }

  .temp-class-empty h1 {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-waiting,
  .live-countdown-intro > span,
  .live-countdown-number.is-ticking,
  .live-answer-timer.is-final.is-pulsing,
  .student-phase-card-large strong,
  .brainstorm-phase-live strong {
    animation: none;
  }

  .live-participant-cloud span.is-new {
    animation: none;
  }

  .live-control-drawer,
  .live-control-drawer.is-open {
    transition: none;
  }

  .live-ranking-backdrop,
  .live-ranking-modal,
  .live-ranking-loading i,
  .live-winner-backdrop,
  .live-winner-modal,
  .live-winner-state i,
  .live-winner-card:not(.is-empty),
  .live-winner-avatar {
    animation: none;
  }

  .live-winner-fireworks {
    display: none;
  }

  .preview-bar-track i,
  .live-response-results.live-choice-bars .live-choice-bar-item em,
  .live-response-results .poll-bar-item em {
    transition: none;
  }

  .live-response-results .live-choice-bar-item em.is-count-changed,
  .live-response-results .poll-bar-item em.is-count-changed {
    animation: none;
  }
}

.student-page {
  --student-teal: #0fa58f;
  --student-teal-dark: #087f70;
  --student-mint: #eaf8f4;
  --student-page-width: 430px;
  --student-content-inline: 18px;
  width: min(var(--student-page-width), 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  color: #101828;
  box-shadow: 0 0 0 1px #e7ecef, 0 12px 50px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  position: relative;
}

.student-header {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(108px, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) var(--student-content-inline) 10px;
  border-bottom: 1px solid #edf1f3;
  background: rgba(255, 255, 255, 0.96);
}

.student-header.student-header-no-account {
  grid-template-columns: minmax(108px, 1fr);
}

.student-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.student-brand img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.student-brand span {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.student-header > button {
  width: 42px;
  height: 42px;
  justify-self: end;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #101828;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.student-header > button:active,
.student-header > button:focus {
  background: transparent;
  outline: none;
}

.student-header > button:focus-visible {
  outline: 2px solid rgba(15, 165, 143, 0.55);
  outline-offset: 3px;
}

.student-header > button svg {
  width: 28px;
  height: 28px;
}

.student-header > button img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.student-account-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.3);
}

.student-account-backdrop[hidden] {
  display: none;
}

.student-account-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(var(--student-page-width), 100%);
  max-height: min(88vh, 720px);
  max-height: min(88dvh, 720px);
  display: grid;
  padding: 22px 24px calc(16px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.12);
  transform: translateX(-50%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.student-account-sheet > button:first-child {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 28px;
  line-height: 1;
}

.student-account-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--student-teal);
  background: var(--student-mint);
}

.student-account-icon svg {
  width: 25px;
  height: 25px;
}

.student-account-content {
  width: 100%;
  min-height: min-content;
  display: grid;
  justify-items: center;
}

.student-account-sheet h2 {
  margin: 10px 0 12px;
}

.student-account-sheet p {
  margin: 0 0 16px;
  color: #667085;
  line-height: 1.5;
  text-align: center;
}

.student-login-tabs,
.student-login-form,
.student-password-form {
  width: 100%;
}

.student-login-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  margin: 0 0 12px;
  border-radius: 12px;
  background: #f2f4f7;
}

.student-login-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: #667085;
  background: transparent;
  font-weight: 800;
}

.student-login-tabs button.active {
  color: #101828;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.student-login-form,
.student-password-form {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
}

.student-login-form label,
.student-password-form label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.student-login-form input,
.student-password-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 0 13px;
  color: #101828;
  background: #fff;
  font-size: 16px;
}

.student-login-form input.invalid,
.student-password-form input.invalid {
  border-color: #ef4444;
}

.student-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: end;
}

.student-code-row button,
.student-password-form button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--student-teal);
  font-weight: 800;
}

.student-code-row button:disabled,
.student-password-form button:disabled {
  color: #98a2b3;
  background: #eaedef;
}

.student-form-error {
  min-height: 16px;
  margin: -4px 0 0 !important;
  color: #dc2626 !important;
  font-size: 13px;
  line-height: 1.4 !important;
  text-align: left !important;
}

.student-account-content .student-primary-button,
.student-account-skip {
  width: 100%;
  min-height: 50px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
}

.student-account-skip {
  margin-top: 4px;
  border: 0;
  color: #667085;
  background: transparent;
}

.student-profile-head {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  justify-items: start;
}

.student-profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--student-mint);
  color: var(--student-teal);
  overflow: hidden;
}

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

.student-profile-avatar svg {
  width: 30px;
  height: 30px;
}

.student-profile-head h2,
.student-profile-head p {
  margin-inline: 0;
  text-align: left;
}

.student-history-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 18px;
}

.student-password-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef2f6;
}

.student-history-stats article {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 10px;
  background: #f6fbfa;
  text-align: center;
}

.student-history-stats strong {
  display: block;
  font-size: 18px;
  color: #0f766e;
  overflow-wrap: anywhere;
}

.student-history-stats span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.student-history-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.student-history-head button {
  border: 0;
  background: transparent;
  color: var(--student-teal);
  font-weight: 800;
}

.student-history-list {
  width: 100%;
  display: grid;
  gap: 8px;
}

.admin-account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf1f3;
  border-radius: 10px;
  background: #fff;
}

.admin-account-info {
  min-width: 0;
}

.admin-account-info strong,
.admin-account-info span,
.admin-account-info em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-account-info strong {
  color: #101828;
  font-size: 14px;
}

.admin-account-info span {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.admin-account-info em {
  margin-top: 5px;
  color: #344054;
  font-size: 13px;
  font-style: normal;
}

.admin-account-delete {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .admin-account-card {
    grid-template-columns: 1fr;
  }

  .admin-account-delete {
    justify-self: start;
  }
}

.student-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf1f3;
  border-radius: 10px;
  background: #fff;
}

.student-history-item div {
  min-width: 0;
}

.student-history-item strong,
.student-history-item span,
.student-history-item em {
  display: block;
  min-width: 0;
}

.student-history-item strong {
  color: #101828;
  font-size: 14px;
}

.student-history-item span {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.student-history-item em {
  margin-top: 5px;
  color: #344054;
  font-size: 13px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.student-history-item b {
  display: grid;
  justify-items: end;
  color: #667085;
  font-size: 13px;
}

.student-history-item b.is-correct {
  color: #0f9f6e;
}

.student-history-item b.is-wrong {
  color: #d92d20;
}

.student-history-item small {
  margin-top: 3px;
  color: #101828;
  font-size: 12px;
}

.student-history-empty {
  width: 100%;
  margin: 10px 0;
  padding: 18px 12px;
  border-radius: 10px;
  background: #f8fafb;
  color: #667085;
  text-align: center;
}

.student-join-page {
  background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
}

.student-join-hero {
  min-height: 155px;
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  padding: 24px var(--student-content-inline) 20px;
  background: linear-gradient(135deg, #fff 38%, #effbf8 100%);
}

.student-join-hero h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 1px;
}

.student-join-hero h1 span {
  color: var(--student-teal);
}

.student-join-hero p {
  margin: 12px 0 0;
  color: #667085;
  font-size: 14px;
}

.student-book-art {
  width: 112px;
  height: 82px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 70% 30% 64% 36%;
  color: rgba(15, 165, 143, 0.34);
  background: rgba(15, 165, 143, 0.08);
  transform: rotate(8deg);
}

.student-book-art strong {
  font-size: 62px;
  font-weight: 400;
  transform: rotate(-20deg);
}

.student-book-art span {
  position: absolute;
  top: -13px;
  right: 4px;
  padding: 5px 9px;
  border-radius: 20px;
  background: #dff5ef;
  font-size: 12px;
}

.student-join-card {
  min-height: calc(100vh - 58px);
  margin: 0;
  padding: 34px var(--student-content-inline) calc(24px + env(safe-area-inset-bottom));
  border-radius: 0;
  background: #fff;
}

.student-join-card form {
  display: grid;
  gap: 28px;
}

.student-join-card [hidden] {
  display: none;
}

.student-join-loading,
.student-rejoin-confirm {
  min-height: calc(100vh - 150px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.student-join-loading {
  gap: 8px;
  color: #667085;
}

.student-join-loading > span {
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border: 3px solid #dcecea;
  border-top-color: var(--student-teal);
  border-radius: 50%;
  animation: studentJoinLoading 720ms linear infinite;
}

.student-join-loading strong {
  color: #1d2939;
  font-size: 18px;
}

.student-join-loading p {
  margin: 0 0 12px;
  font-size: 14px;
}

.student-rejoin-confirm {
  gap: 8px;
}

.student-rejoin-avatar {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #eaf8f6;
  font-size: 82px;
  line-height: 1;
}

.student-rejoin-confirm > p,
.student-rejoin-confirm h1 {
  margin: 0;
}

.student-rejoin-confirm > p {
  color: #667085;
  font-size: 16px;
}

.student-rejoin-confirm h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #101828;
  font-size: 28px;
  line-height: 1.3;
}

.student-rejoin-actions {
  width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.student-account-sync {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 14px;
  border: 1px solid #cfe3df;
  border-radius: 12px;
  color: #1d2939;
  background: #f4fbf9;
  text-align: left;
}

.student-account-sync[hidden] {
  display: none;
}

.student-account-sync input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--student-teal);
}

.student-account-sync span {
  display: grid;
  gap: 3px;
}

.student-account-sync strong {
  font-size: 15px;
  line-height: 1.35;
}

.student-account-sync small {
  color: #526171;
  font-size: 12px;
  line-height: 1.45;
}

.student-account-sync:focus-within {
  outline: 2px solid rgba(15, 165, 143, 0.42);
  outline-offset: 2px;
}

.student-account-sync.is-bound-elsewhere {
  border-color: #e4e7ec;
  color: #667085;
  background: #f8f9fa;
}

.student-host-blocked {
  min-height: calc(100vh - 58px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 36px var(--student-content-inline) calc(54px + env(safe-area-inset-bottom));
  text-align: center;
}

.student-host-blocked-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: var(--student-teal-dark);
  background: var(--student-mint);
}

.student-host-blocked-icon svg {
  width: 34px;
  height: 34px;
}

.student-host-blocked p,
.student-host-blocked h1,
.student-host-blocked > span:not(.student-host-blocked-icon) {
  margin: 0;
}

.student-host-blocked p {
  color: var(--student-teal-dark);
  font-size: 14px;
  font-weight: 800;
}

.student-host-blocked h1 {
  max-width: 12em;
  color: #101828;
  font-size: 26px;
  line-height: 1.3;
  text-wrap: balance;
}

.student-host-blocked > span:not(.student-host-blocked-icon) {
  max-width: 28em;
  color: #526171;
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}

.student-host-blocked .student-primary-button {
  margin-top: 18px;
}

.student-secondary-button {
  width: 100%;
  min-height: 54px;
  border: 1px solid #bdd4d1;
  border-radius: 11px;
  color: #087b78;
  background: #fff;
  font-size: 17px;
  font-weight: 800;
}

.student-secondary-button:hover,
.student-secondary-button:focus-visible {
  border-color: #0fa58f;
  background: #eef9f7;
}

.student-secondary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

@keyframes studentJoinLoading {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-join-loading > span,
  .member-list-loading span {
    animation: none;
  }
}

.student-name-field {
  display: grid;
  gap: 12px;
  font-size: 17px;
  font-weight: 800;
}

.student-name-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid #d9e1e6;
  border-radius: 11px;
  color: #101828;
  background: #fff;
  font-size: 18px;
}

.student-avatar-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.student-avatar-picker legend {
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 800;
}

.student-avatar-feature {
  min-height: 148px;
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
}

.student-avatar-feature output {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  font-size: 94px;
  line-height: 1;
}

.student-avatar-feature button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  border: 0;
  color: var(--student-teal);
  background: transparent;
  font-size: 16px;
  font-weight: 800;
}

.student-avatar-feature svg {
  width: 18px;
  height: 18px;
}

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

.student-avatar-grid button {
  min-width: 0;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e1e7eb;
  border-radius: 11px;
  background: #fff;
}

.student-avatar-grid button span {
  font-size: 32px;
}

.student-avatar-grid button i {
  display: none;
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--student-teal);
  font-size: 12px;
  font-style: normal;
}

.student-avatar-grid button.selected {
  z-index: 2;
  border: 2px solid var(--student-teal);
}

.student-avatar-grid button.selected i {
  display: grid;
}

.student-avatar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(15, 23, 42, 0.38);
}

.student-avatar-backdrop[hidden] {
  display: none;
}

.student-avatar-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(var(--student-page-width), 100%);
  max-height: min(78vh, 680px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.16);
  transform: translateX(-50%);
  animation: studentAvatarSheetIn 240ms ease-out;
}

.student-avatar-sheet header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.student-avatar-sheet h2,
.student-avatar-sheet p {
  margin: 0;
}

.student-avatar-sheet h2 {
  font-size: 22px;
}

.student-avatar-sheet p {
  margin-top: 5px;
  color: #98a2b3;
  font-size: 13px;
}

.student-avatar-sheet header button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #667085;
  background: #f3f6f7;
  font-size: 25px;
  line-height: 1;
}

.student-avatar-sheet .student-avatar-grid {
  overflow-y: auto;
  overflow-x: hidden;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 10px;
  padding: 3px 3px 14px;
  overscroll-behavior: contain;
}

.student-avatar-sheet .student-avatar-grid button {
  min-height: 52px;
}

.student-avatar-sheet .student-primary-button {
  min-height: 54px;
  font-size: 18px;
}

.student-primary-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--student-teal);
  box-shadow: 0 10px 22px rgba(15, 165, 143, 0.2);
  font-size: 20px;
  font-weight: 800;
}

.student-primary-button:disabled {
  color: #98a2b3;
  background: #eaedef;
  box-shadow: none;
}

.student-login-note {
  margin: -10px 0 0;
  color: #98a2b3;
  font-size: 13px;
  text-align: center;
}

.student-ready-stage,
.student-countdown-stage {
  min-height: calc(100vh - 84px);
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 28px var(--student-content-inline) 80px;
  text-align: center;
}

.student-ready-stage {
  padding-bottom: 340px;
}

.student-ready-avatar {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--student-mint);
  font-size: 82px;
}

.student-ready-stage > strong {
  margin-top: 14px;
  font-size: 18px;
}

.student-ready-stage h1 {
  margin: 38px 0 8px;
  color: var(--student-teal);
  font-size: 34px;
  animation: studentReadyPulse 700ms ease-in-out infinite alternate;
}

.student-ready-stage p,
.student-countdown-stage > p {
  max-width: 300px;
  margin: 0;
  color: #98a2b3;
  line-height: 1.7;
}

.student-countdown-stage {
  align-content: start;
  padding-top: 54px;
}

.student-question-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 19px;
  border-radius: 999px;
  color: var(--student-teal);
  background: var(--student-mint);
  font-size: 14px;
  font-weight: 800;
}

.student-countdown-stage h1 {
  max-width: 360px;
  margin: 72px 0 42px;
  font-size: 28px;
  line-height: 1.45;
}

.student-phase-page[data-student-kind="choice"] .student-countdown-stage {
  padding-top: clamp(26px, 5.5vh, 42px);
}

.student-phase-page[data-student-kind="choice"] .student-countdown-stage h1 {
  max-width: 22rem;
  margin: clamp(24px, 4.5vh, 36px) 0 clamp(28px, 5vh, 38px);
  font-size: clamp(21px, 5.6vw, 24px);
  line-height: 1.42;
  text-wrap: balance;
}

.student-countdown-ring {
  --countdown-progress: 1;
  width: 174px;
  height: 174px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--student-teal) calc(var(--countdown-progress) * 1turn), #eaf4f1 0);
}

.student-countdown-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.student-countdown-ring strong {
  z-index: 1;
}

.student-countdown-ring strong {
  color: var(--student-teal);
  font-size: 76px;
  line-height: 1;
}

.student-countdown-ring strong.is-ticking {
  animation: studentCountdownTick 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.student-countdown-stage > p {
  margin-top: 38px;
}

.student-answer-content,
.student-result-content {
  display: grid;
  padding: 28px var(--student-content-inline) 120px;
}

.student-answer-content .student-question-pill {
  justify-self: start;
}

.student-answer-content h1,
.student-result-content h1 {
  margin: 26px 0 24px;
  font-size: 24px;
  line-height: 1.45;
  text-align: center;
}

.student-score-scale {
  display: none !important;
}

.student-score-scale div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 14px;
}

.student-score-scale i {
  height: 9px;
  display: block;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edef;
}

.student-score-scale b {
  width: 88%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--student-teal);
  animation: studentScoreDrain 60s linear forwards;
}

.student-poll-timer {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.student-poll-timer div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475467;
  font-size: 14px;
}

.student-poll-timer strong {
  color: var(--student-teal-dark);
  font-size: 15px;
}

.student-poll-timer i {
  height: 9px;
  display: block;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edef;
}

.student-poll-timer b {
  width: calc(var(--poll-progress) * 100%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--student-teal);
}

.student-poll-timer.is-final strong {
  color: #d97706;
}

.student-poll-timer.is-final b {
  background: #e99a28;
}

.student-poll-timer.is-expired strong {
  color: #667085;
}

.student-answer-option,
.student-result-option {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  padding: 12px 16px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  font-size: 17px;
  text-align: left;
}

.student-answer-option i {
  width: 22px;
  height: 22px;
  border: 2px solid #c8d0d6;
  border-radius: 50%;
}

.student-answer-option.selected {
  border: 2px solid var(--student-teal);
  background: #f7fcfa;
}

.student-answer-option.selected i {
  border: 7px solid var(--student-teal);
}

.student-answer-content .student-primary-button {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .student-choice-compact .student-answer-content {
    align-content: start;
    padding-top: 18px;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .student-choice-compact .student-question-pill {
    min-height: 32px;
    padding-inline: 16px;
    font-size: 13px;
  }

  .student-choice-compact .student-answer-content h1 {
    margin: 16px 0;
    font-size: clamp(19px, 5.4vw, 22px);
    line-height: 1.4;
    text-wrap: balance;
  }

  .student-choice-compact .student-poll-timer {
    gap: 6px;
    margin-bottom: 10px;
  }

  .student-choice-compact .student-answer-option {
    min-height: 54px;
    gap: 10px;
    margin-bottom: 8px;
    padding: 9px 14px;
    font-size: 16px;
    line-height: 1.35;
  }

  .student-choice-compact .auth-error {
    min-height: 0;
    margin: 0;
  }

  .student-choice-compact .auth-error:not(:empty) {
    min-height: 18px;
    margin-top: 2px;
  }

  .student-choice-compact .student-primary-button {
    width: min(calc(100% - 36px), 394px);
    min-height: 52px;
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    margin: 0;
    font-size: 18px;
    transform: translateX(-50%);
  }
}

.student-answer-control {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.student-control-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-control-head strong {
  font-size: 16px;
}

.student-control-head span {
  flex: 0 0 auto;
  color: var(--student-teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.student-control-help {
  margin: -7px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.student-matching-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.student-matching-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.student-match-card {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  text-align: left;
}

.student-match-card strong {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #98a2b3;
  font-size: 12px;
}

.student-match-card span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
}

.student-match-card em {
  grid-column: 2;
  color: var(--answer-color);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.student-match-card.is-active,
.student-match-card.is-paired {
  border: 2px solid var(--answer-color);
  background: color-mix(in srgb, var(--answer-color) 6%, #fff);
}

.student-match-card.is-active strong,
.student-match-card.is-paired strong {
  background: var(--answer-color);
}

.student-category-items {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-category-item {
  min-height: 52px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  text-align: left;
}

.student-category-item span {
  overflow-wrap: anywhere;
}

.student-category-item em {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 5px;
  color: #667085;
  background: #f1f4f5;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.student-category-item.is-active {
  border: 2px solid var(--student-teal);
  background: #f7fcfa;
}

.student-category-item.is-assigned em {
  border: 1px solid color-mix(in srgb, var(--answer-color) 42%, #fff);
  color: var(--answer-color);
  background: color-mix(in srgb, var(--answer-color) 10%, #fff);
}

.student-category-targets {
  display: grid;
  gap: 9px;
}

.student-category-targets button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  text-align: left;
}

.student-category-targets button strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--answer-color);
}

.student-category-targets button em {
  color: var(--answer-color);
  font-style: normal;
  font-weight: 900;
}

.student-category-targets button:disabled {
  opacity: 0.5;
}

.student-ordering-list {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.student-ordering-card {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.student-ordering-card.is-dragging {
  z-index: 2;
  border-color: var(--student-teal);
  box-shadow: 0 8px 18px rgba(15, 165, 143, 0.18);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.student-ordering-card > strong {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--student-teal);
  font-size: 12px;
}

.student-ordering-card > span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
}

.student-order-handle {
  border: 0;
  color: #667085;
  background: #f3f6f7;
  font-weight: 900;
}

.student-order-handle {
  width: 48px;
  height: 48px;
  justify-self: end;
  border-radius: 7px;
  touch-action: none;
  cursor: grab;
  font-size: 19px;
  letter-spacing: -4px;
  user-select: none;
}

.student-order-handle:active {
  cursor: grabbing;
}

.student-poll-options {
  display: grid;
}

.student-answer-option.is-multiple i {
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.student-answer-option.is-multiple.selected i {
  border: 2px solid var(--student-teal);
  background: var(--student-teal);
}

.student-answer-option:disabled {
  opacity: 0.45;
}

.student-text-answer {
  display: grid;
  gap: 8px;
}

.student-text-answer span {
  font-weight: 800;
}

.student-text-answer textarea {
  min-height: 180px;
  padding: 14px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  resize: vertical;
  font: inherit;
}

.student-text-answer small {
  justify-self: end;
  color: #98a2b3;
}

.student-collab-page .student-answer-content {
  gap: 18px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.student-collab-page:has(.student-collab-input) .student-answer-content {
  align-content: start;
}

.student-collab-page:has(.student-collab-input) .student-collab-input {
  margin-top: 24px;
}

.student-collab-page:has(.student-keyword-input) .student-keyword-input {
  margin-top: 24px;
}

.student-collab-page:has(.student-collab-input) .student-primary-button {
  margin-top: 0;
}

.student-collab-page .student-answer-content h1 {
  margin: 18px 0 4px;
}

.student-collab-input,
.student-keyword-input {
  display: grid;
  gap: 9px;
}

.student-collab-input > span,
.student-keyword-input > span,
.student-own-submissions h2,
.student-public-results h2,
.student-rating-list h2 {
  margin: 0;
  color: #101828;
  font-size: 16px;
  font-weight: 800;
}

.student-collab-input textarea,
.student-keyword-input input {
  width: 100%;
  padding: 14px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  font: inherit;
  outline: none;
}

.student-collab-input textarea {
  min-height: 170px;
  resize: vertical;
}

.student-keyword-input input {
  min-height: 56px;
}

.student-collab-input textarea:focus,
.student-keyword-input input:focus {
  border: 2px solid var(--student-teal);
}

.student-collab-input small,
.student-keyword-input small {
  justify-self: end;
  color: #98a2b3;
}

.student-own-submissions,
.student-public-results {
  display: grid;
  gap: 11px;
  padding-top: 4px;
}

.student-own-submissions article,
.student-public-results article,
.student-rating-results article {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 12px;
  padding: 12px 13px;
  border: 1px solid #e1e7eb;
  border-radius: 10px;
  background: #f9fbfa;
}

.student-own-submissions article span,
.student-public-results article span {
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.student-own-submissions article em,
.student-public-results article em,
.student-rating-results article em {
  color: var(--student-teal-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.student-keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-keyword-chips span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--student-teal-dark);
  background: var(--student-mint);
  font-size: 14px;
  font-weight: 800;
}

.student-brainstorm-votes {
  display: grid;
  gap: 10px;
}

.student-brainstorm-votes button {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dbe2e7;
  border-radius: 10px;
  color: #101828;
  background: #fff;
  text-align: left;
}

.student-brainstorm-votes button.selected {
  border: 2px solid var(--student-teal);
  background: #f5fcfa;
}

.student-brainstorm-votes button.is-own,
.student-brainstorm-votes button:disabled {
  cursor: not-allowed;
  border-style: dashed;
  color: #667085;
  background: #f4f6f8;
  opacity: 0.78;
}

.student-brainstorm-votes small {
  color: #667085;
}

.student-brainstorm-votes em {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--student-teal-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.student-public-results article > strong {
  width: 30px;
  height: 30px;
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--student-teal);
  font-size: 13px;
}

.student-public-results article {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.student-public-results article small {
  grid-column: 2;
  color: #667085;
}

.student-wordcloud-results .wordcloud-result-cloud {
  box-sizing: border-box;
  width: 100%;
  min-height: 330px;
  height: 330px;
  padding: 20px 16px;
  overflow: hidden;
  border: 1px solid #e3ebe8;
  border-radius: 12px;
  background: #f7fbfa;
}

.student-wordcloud-results .wordcloud-result-cloud .wordcloud-word {
  max-width: min(var(--word-max-width, 68%), calc(100% - 32px));
  font-size: max(14px, calc(var(--word-size) * 0.72));
}

.student-wordcloud-results .wordcloud-result-cloud .answer-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.student-rating-list {
  display: grid;
  gap: 13px;
}

.student-rating-list section {
  --rating-criterion-color: var(--student-teal);
  display: grid;
  gap: 18px;
  padding: 16px 14px 18px;
  border: 1px solid color-mix(in srgb, var(--rating-criterion-color) 22%, #e1e7eb);
  border-radius: 11px;
  background: color-mix(in srgb, var(--rating-criterion-color) 5%, #fff);
}

.student-rating-heading {
  display: grid;
  place-items: center;
  text-align: center;
}

.student-rating-heading h2 {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.student-rating-heading h2::before {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--rating-criterion-color, var(--student-teal));
  content: "";
}

.student-rating-heading output {
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--rating-criterion-color, var(--student-teal)) 72%, #0f172a);
  background: color-mix(in srgb, var(--rating-criterion-color, var(--student-teal)) 13%, #fff);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.student-rating-slider {
  --rating-progress: 0%;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.student-rating-slider input {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.student-rating-slider input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--rating-criterion-color, var(--student-teal)) 0 var(--rating-progress), #dce6e3 var(--rating-progress) 100%);
}

.student-rating-slider input::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -9px;
  appearance: none;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--rating-criterion-color, var(--student-teal));
  box-shadow: 0 0 0 2px var(--rating-criterion-color, var(--student-teal)), 0 3px 7px color-mix(in srgb, var(--rating-criterion-color, var(--student-teal)) 26%, transparent);
}

.student-rating-slider input::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: #dce6e3;
}

.student-rating-slider input::-moz-range-progress {
  height: 6px;
  border-radius: 99px;
  background: var(--rating-criterion-color, var(--student-teal));
}

.student-rating-slider input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--rating-criterion-color, var(--student-teal));
  box-shadow: 0 0 0 2px var(--rating-criterion-color, var(--student-teal));
}

.student-rating-ticks {
  display: grid;
  grid-template-columns: repeat(var(--rating-level-count, 4), minmax(0, 1fr));
  gap: 3px;
}

.student-rating-ticks span {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #667085;
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.student-rating-ticks strong,
.student-rating-ticks em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-weight: 700;
}

.student-rating-ticks em {
  color: #7a8994;
  font-weight: 600;
}

.student-rating-ticks span:first-child {
  text-align: left;
}

.student-rating-ticks span:last-child {
  text-align: right;
}

.student-rating-result-chart {
  display: grid;
  gap: 14px;
}

.student-rating-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.student-rating-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.student-rating-chart-legend span::before {
  width: 18px;
  height: 6px;
  border-radius: 99px;
  background: var(--student-teal);
  content: "";
}

.student-rating-chart-legend .is-average::before {
  background: #aebbd0;
}

.student-rating-overall-average {
  display: grid;
  gap: 8px;
}

.student-rating-overall-average div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 3px;
  padding: 10px;
  border-radius: 9px;
  color: var(--student-teal-dark);
  background: var(--student-mint);
}

.student-rating-overall-average div.is-class-average {
  color: #52627a;
  background: #f0f3f7;
}

.student-rating-overall-average span {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
}

.student-rating-overall-average strong {
  font-size: 22px;
  line-height: 1;
}

.student-rating-overall-average em {
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.student-rating-result-chart section {
  --rating-criterion-color: var(--student-teal);
  display: grid;
  gap: 9px;
}

.student-rating-result-chart header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-rating-result-chart header strong {
  min-width: 0;
  color: #101828;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.student-rating-result-chart header span {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--rating-criterion-color, var(--student-teal)) 72%, #0f172a);
  font-size: 13px;
  font-weight: 900;
}

.student-rating-chart-bars {
  display: grid;
  gap: 5px;
}

.student-rating-chart-bars i {
  position: relative;
  height: 9px;
  overflow: visible;
  border-radius: 99px;
  background: #e8efed;
}

.student-rating-chart-bars i b {
  width: var(--my-rating);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--rating-criterion-color, var(--student-teal));
}

.student-rating-chart-bars i.is-average {
  height: 6px;
  margin-right: 38px;
  background: #edf0f4;
}

.student-rating-chart-bars i.is-average b {
  width: var(--average-rating);
  background: #aebbd0;
}

.student-rating-chart-bars i em {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  transform: translateY(-50%);
  white-space: nowrap;
}

.student-rating-public-results .student-rating-result-chart {
  padding: 16px 14px;
  border: 1px solid #e1e7eb;
  border-radius: 11px;
  background: #fff;
}

.student-collab-page:has(.student-rating-list) .student-answer-content {
  gap: 12px;
}

.student-collab-page:has(.student-rating-list) .auth-error {
  min-height: 0;
  margin: 0;
}

.student-collab-page:has(.student-rating-list) .auth-error:not(:empty) {
  min-height: 18px;
  margin-top: 2px;
}

.student-collab-page:has(.student-rating-list) .student-primary-button {
  margin-top: 0;
}

.student-random-wheel {
  min-width: 0;
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.student-random-wheel .random-wheel-preview {
  min-height: 410px;
  height: auto;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  overflow: visible;
}

.student-random-wheel .random-wheel-shell {
  grid-row: auto;
  width: min(330px, calc(100vw - 48px));
  box-shadow: inset 0 0 0 11px #f3f6fa, 0 0 0 1px #d9e3ea, 0 14px 30px rgba(15, 23, 42, 0.1);
}

.student-random-wheel .random-wheel {
  overflow: hidden;
}

.student-random-wheel .random-wheel-label {
  width: min(96px, 25vw);
  height: 24px;
  transform: translate(-50%, -50%) rotate(var(--label-angle)) translateY(calc(min(var(--label-distance), 92px) * -1)) rotate(90deg);
}

.student-random-wheel .random-wheel-label b {
  font-size: min(var(--label-size), 11px);
}

.student-random-wheel .random-wheel-pointer {
  top: -34px;
  width: 54px;
  height: 66px;
}

.student-random-wheel .random-wheel-play {
  width: 68px;
  height: 68px;
  border-width: 5px;
}

.student-random-wheel .random-wheel-play span {
  margin-left: 4px;
  border-top-width: 12px;
  border-bottom-width: 12px;
  border-left-width: 18px;
}

.student-random-wheel .random-wheel-meta {
  width: 100%;
  max-width: 178px;
  padding: 12px 14px;
  transform: none;
}

.student-random-wheel .random-wheel-meta strong {
  font-size: 32px;
}

.student-random-wheel .random-wheel-meta span {
  font-size: 14px;
}

.student-random-wheel .random-wheel-results em,
.student-random-wheel .random-wheel-results span {
  font-size: 14px;
}

.student-random-wheel .random-wheel-results {
  width: 100%;
  transform: none;
}

.student-random-wheel .random-wheel-results b {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.student-random-wheel.is-spinning .random-wheel {
  animation: studentTeacherWheelSpin 900ms linear infinite;
  transition: none;
}

.student-empty-state {
  margin: 30px 0;
  color: #667085;
  text-align: center;
}

.student-phase-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 36px 0 8px;
  padding: 34px 22px;
  border: 1px solid #d9ebe7;
  border-radius: 18px;
  color: var(--student-teal-dark);
  background: #f4fbf9;
  text-align: center;
}

.student-phase-card strong {
  color: #102a43;
  font-size: clamp(30px, 10vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.student-phase-card-large strong {
  display: inline-block;
  animation: brainstormPrepareBreath 2.2s ease-in-out infinite;
  transform-origin: center;
}

.student-phase-card p {
  margin: 0;
  color: #667085;
  font-size: 15px;
  font-weight: 700;
}

.student-phase-card-large {
  min-height: 210px;
  align-content: center;
}

@keyframes studentTeacherWheelSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .student-random-wheel.is-spinning .random-wheel {
    animation: none;
  }
}

@media (max-width: 350px) {
}

.student-result-content {
  padding: 28px var(--student-content-inline) 190px;
}

.student-result-content h1 {
  margin: 38px 0 28px;
  font-size: 28px;
  line-height: 1.4;
  text-align: left;
}

.student-result-content .student-question-pill {
  justify-self: start;
  min-height: 43px;
  padding-inline: 22px;
  font-size: 17px;
}

.student-result-content .student-score-scale {
  margin-bottom: 38px;
}

.student-result-content .student-score-scale div {
  margin-bottom: 8px;
  font-size: 18px;
}

.student-result-content .student-score-scale i {
  height: 10px;
}

.student-result-content .student-score-scale b {
  animation: none;
}

.student-result-option i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #c8d0d6;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.student-result-option em {
  padding: 5px 8px;
  border-radius: 5px;
  color: #07856f;
  background: #e9f8f3;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.student-result-options {
  display: grid;
  gap: 15px;
}

.student-result-options .student-result-option {
  min-height: 84px;
  margin-bottom: 0;
  padding: 14px 18px;
  border-radius: 11px;
  font-size: 20px;
}

.student-result-options .student-result-option i {
  width: 28px;
  height: 28px;
}

.student-result-option.correct {
  border: 2px solid #18a777;
  background: #fbfffd;
}

.student-result-option.correct i {
  border-color: #18a777;
  background: #18a777;
}

.student-result-option.incorrect {
  border-color: #e25d64;
}

.student-result-option.incorrect i {
  border-color: #e25d64;
  background: #e25d64;
}

.student-result-text {
  border: 1px solid #dbe2e7;
  border-radius: 12px;
  background: #fff;
}

.student-result-text {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.student-submitted-content {
  min-height: calc(100vh - 83px);
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 54px var(--student-content-inline) 80px;
  text-align: center;
}

.student-submitted-check {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--student-teal);
  font-size: 38px;
  font-weight: 900;
}

.student-submitted-content h1 {
  margin: 18px 0 6px;
  font-size: 28px;
}

.student-submitted-summary {
  width: 100%;
  display: grid;
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e1e7eb;
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.student-submitted-summary > strong {
  font-size: 14px;
}

.student-structured-result-page .student-result-content {
  padding-bottom: 210px;
}

.student-result-summary {
  margin-top: 0;
}

.student-submitted-list {
  display: grid;
  gap: 8px;
}

.student-submitted-list div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border-radius: 8px;
  background: #f6faf9;
  font-size: 12px;
}

.student-submitted-list div span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-submitted-list div em {
  flex: 0 0 auto;
  color: #667085;
  font-style: normal;
}

.student-submitted-order {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 28px;
}

.student-submitted-order li {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6faf9;
}

.student-submitted-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-submitted-votes span {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--student-teal-dark);
  background: var(--student-mint);
  font-weight: 800;
}

.student-submitted-rating {
  display: grid;
  gap: 22px;
}

.student-submitted-rating-average {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-radius: 10px;
  color: #0c887a;
  background: #eaf8f4;
}

.student-submitted-rating-average span {
  font-size: 18px;
  font-weight: 800;
}

.student-submitted-rating-average strong {
  color: #0b897d;
  font-size: 34px;
  line-height: 1;
}

.student-submitted-rating-average em {
  color: #0b897d;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
}

.student-submitted-rating section {
  --rating-criterion-color: var(--student-teal);
  display: grid;
  gap: 12px;
}

.student-submitted-rating header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
}

.student-submitted-rating header strong {
  min-width: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 850;
}

.student-submitted-rating header span {
  color: color-mix(in srgb, var(--rating-criterion-color, var(--student-teal)) 72%, #0f172a);
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.student-submitted-rating section i {
  height: 12px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeae7;
}

.student-submitted-rating section i b {
  width: var(--submitted-rating, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--rating-criterion-color, var(--student-teal));
}

.student-category-result-chart {
  display: grid;
  gap: 12px;
}

.student-category-result-chart article {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--result-category-color) 35%, #dbe5ec);
  border-radius: 10px;
  background: color-mix(in srgb, var(--result-category-color) 7%, #fff);
}

.student-category-result-chart header {
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  color: #fff;
  background: var(--result-category-color);
}

.student-category-result-chart header span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--result-category-color);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.student-category-result-chart header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.student-category-result-chart header em {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.student-category-result-chart article > div {
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 7px;
  padding: 10px;
}

.student-category-result-chart article > div span {
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--result-category-color) 25%, #dbe5ec);
  border-radius: 7px;
  color: #243242;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.student-category-result-chart article > div small {
  color: #98a2b3;
}

/* Preview and live participation icons share the same treatment. */
.preview-participants img,
.live-participation-stats img {
  filter: grayscale(1) brightness(0);
}

.student-page .toast,
.student-evaluation {
  display: none !important;
}

.student-result-content,
.student-submitted-content {
  padding-bottom: 48px;
}

.qa-summary-grid {
  width: min(760px, 82vw);
  min-height: 280px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 28px;
}

.qa-summary-grid.is-revealed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qa-summary-card {
  min-height: 190px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid #dce7ea;
  border-radius: 14px;
  background: #fff;
}

.qa-summary-card div {
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
}

.qa-summary-card span,
.qa-summary-card small {
  color: #526274;
  font-size: 18px;
  font-weight: 800;
}

.qa-summary-card strong {
  color: #152238;
  font-size: 64px;
  line-height: 1;
}

.qa-summary-card i {
  height: var(--qa-height);
  min-height: 8px;
  background: #0f9f93;
}

.qa-summary-card.acceptable i {
  background: #5b8def;
}

.qa-summary-card.incorrect i {
  background: #df725f;
}

.preview-bars.ordering-preview-grid {
  width: min(1040px, 88vw);
  height: min(520px, 62vh);
  min-height: 380px;
  display: grid;
  place-items: center;
}

.ordering-result-stage {
  width: 100%;
  max-height: min(620px, calc(100vh - 300px));
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
}

.ordering-result-stage .ordering-preview-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.ordering-result-stage.is-answering .ordering-preview-list {
  max-width: 1120px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ordering-result-stage.is-revealed .ordering-preview-list {
  width: min(760px, 100%);
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.ordering-result-stage .ordering-preview-card {
  width: auto;
  min-width: 0;
  min-height: 92px;
  gap: 16px;
  padding: 16px 20px;
  border-width: 2px;
  border-radius: 12px;
}

.ordering-result-stage.is-answering .ordering-preview-card {
  min-height: 104px;
  justify-content: center;
  border-color: #cbd3dc;
  background: #f8fafc;
}

.ordering-result-stage.is-answering .ordering-preview-card > strong {
  display: none;
}

.ordering-result-stage.is-answering .ordering-preview-card span {
  text-align: center;
}

.ordering-result-stage.is-revealed .ordering-preview-card {
  min-height: 72px;
  padding: 12px 18px;
}

.ordering-preview-card > strong {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--ordering-color);
  font-size: 23px;
}

.ordering-result-stage .ordering-preview-card span {
  font-size: 21px;
  font-weight: 800;
}

.ordering-answering-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.ordering-answering-copy strong {
  color: var(--teal);
  font-size: 112px;
  line-height: 1;
}

.ordering-answering-copy span,
.ordering-result-pill em {
  color: #536273;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
}

.ordering-result-pill {
  min-height: 54px;
  padding: 0 20px;
}

.ordering-result-pill strong {
  font-size: 25px;
}

.ordering-result-stage .ordering-result-pill {
  gap: 8px;
  min-width: 96px;
  justify-content: center;
}

.ordering-result-stage .ordering-result-pill svg {
  width: 25px;
  height: 25px;
}

@media (prefers-reduced-motion: reduce) {
  .ordering-result-stage .ordering-preview-card {
    transition: none;
  }
}

.preview-bars.category-preview-grid {
  width: min(1540px, calc(100vw - 180px));
  height: min(620px, calc(100vh - 310px));
  min-height: 400px;
  align-self: center;
  align-items: stretch;
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars.category-preview-grid {
  width: min(1540px, calc(100vw - 180px));
  height: min(620px, calc(100vh - 310px));
  min-height: 400px;
}

@media (max-width: 1180px) {
  .preview-bars.category-preview-grid,
  .temp-live-page[data-live-phase="results"] .live-response-results.preview-bars.category-preview-grid {
    width: calc(100vw - 64px);
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  }

  .category-preview-grid .category-bucket-grid {
    --category-columns: 2 !important;
  }

  .preview-bars.category-preview-grid.category-is-revealed {
    grid-template-columns: minmax(0, 1fr);
  }
}

.temp-live-page[data-live-phase="results"] .live-response-results.matching-preview-grid {
  align-self: center;
  width: min(1220px, 88vw);
  height: auto;
  min-height: 0;
  max-height: 62vh;
  gap: clamp(28px, 4.8vw, 76px);
  transform: translateY(-54px);
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid .matching-preview-column {
  gap: clamp(8px, 1.3vh, 16px);
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid .matching-source-card,
.temp-live-page[data-live-phase="results"] .matching-preview-grid .matching-answer-card {
  height: clamp(48px, 5.9vh, 64px);
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid:not(.matching-is-revealed) .matching-source-card,
.temp-live-page[data-live-phase="results"] .matching-preview-grid:not(.matching-is-revealed) .matching-answer-card {
  border-color: #c6ced8;
  color: #566171;
  background: #f7f8fa;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid:not(.matching-is-revealed) .matching-source-card strong,
.temp-live-page[data-live-phase="results"] .matching-preview-grid:not(.matching-is-revealed) .matching-answer-card strong {
  background: #98a2b3;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-compact {
  width: min(1120px, 86vw);
  gap: clamp(20px, 3.4vw, 48px);
  transform: translateY(-42px);
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-compact .matching-preview-column {
  gap: 6px;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-compact .matching-source-card,
.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-compact .matching-answer-card {
  height: clamp(34px, 4.4vh, 46px);
  font-size: 16px;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-compact .matching-source-card strong,
.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-compact .matching-answer-card strong {
  font-size: 17px;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-dense .matching-preview-column {
  gap: 4px;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-dense .matching-source-card,
.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-dense .matching-answer-card {
  height: clamp(28px, 3.4vh, 36px);
  font-size: 14px;
}

.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-dense .matching-source-card strong,
.temp-live-page[data-live-phase="results"] .matching-preview-grid.matching-is-dense .matching-answer-card strong {
  font-size: 15px;
}

.brainstorm-preview-flow {
  width: min(980px, 88vw);
  height: min(540px, 64vh);
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars.brainstorm-preview-flow {
  width: min(980px, 88vw);
  height: min(540px, 56vh);
  min-height: 320px;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.brainstorm-live-board {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 8px 14px 18px 8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #9fcfc8 #eef7f5;
}

.brainstorm-live-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.brainstorm-live-shell > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 12px;
}

.brainstorm-live-shell > header strong {
  margin-right: auto;
  color: #173e3b;
  font-size: 18px;
}

.brainstorm-live-shell.is-vote-board > header {
  min-height: 48px;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.brainstorm-live-meta {
  color: #526a78;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.brainstorm-live-countdown {
  min-width: 104px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #cae7e3;
  border-radius: 999px;
  color: #067a75;
  background: #f1fbf9;
  box-shadow: 0 8px 20px rgba(20, 126, 117, 0.09);
  font-weight: 850;
  white-space: nowrap;
}

.brainstorm-live-countdown b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.brainstorm-live-countdown em {
  color: #5d7784;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.brainstorm-live-countdown.is-final {
  border-color: #fecaca;
  color: #b42318;
  background: #fff1f0;
}

.brainstorm-live-countdown.is-final em {
  color: #b42318;
}

.brainstorm-live-board[aria-live="polite"] article {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.brainstorm-phase-live {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 18px;
  color: #153d3a;
  text-align: center;
}

.brainstorm-phase-live strong {
  display: inline-block;
  font-size: clamp(64px, 10vw, 132px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.06em;
  animation: brainstormPrepareBreath 2.2s ease-in-out infinite;
  transform-origin: center;
}

.brainstorm-phase-live span {
  color: #5a6f7d;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 800;
}

@keyframes brainstormPrepareBreath {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.985);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.brainstorm-live-board::-webkit-scrollbar {
  width: 10px;
}

.brainstorm-live-board::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef7f5;
}

.brainstorm-live-board::-webkit-scrollbar-thumb {
  border: 2px solid #eef7f5;
  border-radius: 999px;
  background: #83c6bc;
}

.brainstorm-live-board article {
  width: 100%;
  min-height: 78px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border: 1px solid #dbe8e6;
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  background: #fff;
  color: #233047;
  box-shadow: 0 8px 24px rgba(24, 85, 80, 0.07);
}

.brainstorm-live-board article b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #087b78;
  background: #e8f7f4;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.brainstorm-live-board article span {
  min-width: 0;
  color: #17233a;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.brainstorm-live-board article strong {
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #087b78;
  background: #edf9f7;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars.wordcloud-preview-results {
  width: min(1080px, 88vw);
  height: min(520px, 62vh);
}

.live-rating-results {
  width: min(1760px, 95vw);
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars.live-rating-results {
  width: min(1820px, calc(100vw - 130px));
  height: auto;
  min-height: 620px;
  display: block;
  align-self: center;
  justify-self: center;
  margin-inline: auto;
  transform: translate(54px, 64px);
}

.temp-live-page[data-live-phase="results"] .live-response-results.preview-bars.live-rating-results::after {
  display: none;
}

.live-rating-chart {
  width: min(1700px, 100%);
  min-height: 620px;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-inline: auto;
  padding: 8px 18px 0;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  backdrop-filter: none;
}

.live-rating-chart svg {
  width: 100%;
  height: 580px;
  overflow: visible;
}

.live-rating-chart text {
  fill: #263348;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.live-rating-chart .live-rating-grid {
  fill: none;
}

.live-rating-chart .rating-axis-tick line {
  display: none;
}

.live-rating-chart .rating-axis-tick text {
  fill: #7c8b9c;
  font-size: 15px;
  text-anchor: end;
}

.live-rating-chart .rating-axis-line {
  fill: none;
  stroke: #9fb3bd;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.live-rating-chart .rating-x-labels text {
  fill: #687586;
  font-size: 14px;
  text-anchor: middle;
}

.live-rating-chart .rating-x-labels .rating-level-label {
  fill: #263348;
  font-size: 17px;
  font-weight: 850;
}

.live-rating-chart .rating-x-labels .rating-level-score {
  fill: #687586;
  font-size: 14px;
  font-weight: 750;
}

.live-rating-chart .rating-x-tick line {
  stroke: #9fb3bd;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.live-rating-chart .rating-x-labels .rating-axis-title {
  fill: #38455a;
  font-size: 16px;
  text-anchor: end;
}

.live-rating-chart .rating-y-title {
  fill: #38455a;
  font-size: 16px;
}

.live-rating-chart .rating-score-endpoint {
  fill: #1f2937;
  font-size: 34px;
  letter-spacing: 0;
  text-anchor: middle;
}

.live-rating-chart .rating-series {
  pointer-events: visiblePainted;
}

.live-rating-chart .rating-area {
  fill: var(--series-color);
  opacity: 0.2;
  cursor: pointer;
  transition: opacity 180ms ease, filter 180ms ease;
  animation: liveRatingAreaIn 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--series-order, 0) * 45ms);
}

.live-rating-chart .rating-line {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: opacity 180ms ease, stroke-width 180ms ease, filter 180ms ease;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  pointer-events: stroke;
  cursor: pointer;
  animation: liveRatingLineDraw 680ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--series-order, 0) * 45ms);
}

.live-rating-chart .rating-dot {
  fill: var(--series-color);
  stroke: var(--series-color);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
  transform-box: fill-box;
  transform-origin: center;
  cursor: pointer;
  animation: liveRatingDotIn 360ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(360ms + var(--series-order, 0) * 45ms);
}

.live-rating-chart.is-rating-series-active .rating-series:not(.is-active) .rating-area {
  opacity: 0.08;
}

.live-rating-chart.is-rating-series-active .rating-series:not(.is-active) .rating-line,
.live-rating-chart.is-rating-series-active .rating-series:not(.is-active) .rating-dot {
  opacity: 0.42;
}

.live-rating-chart .rating-series.is-active .rating-area {
  opacity: 0.58;
  filter: saturate(1.2);
}

.live-rating-chart .rating-series.is-active .rating-line {
  stroke-width: 5.4;
  filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--series-color) 32%, transparent));
}

.live-rating-chart .rating-series.is-active .rating-dot {
  opacity: 1;
  transform: scale(1.2);
  filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--series-color) 34%, transparent));
}

.live-rating-chart .rating-total-average line {
  stroke: rgba(91, 103, 123, 0.28);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.live-rating-chart .rating-total-average circle {
  fill: #fff;
  stroke: #222938;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.live-rating-chart .rating-total-average text {
  fill: #222938;
  stroke: none;
  font-size: 27px;
  font-weight: 850;
  text-anchor: middle;
}

.live-rating-labels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  transform: translate(-62px, -52px);
}

.live-rating-labels span {
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  text-align: left;
  gap: 12px;
  color: #263348;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  outline: none;
  cursor: default;
  transition: color 160ms ease, transform 160ms ease;
}

.live-rating-labels span:focus-visible {
  border-radius: 8px;
  outline: 2px solid color-mix(in srgb, var(--series-color) 58%, #fff);
  outline-offset: 5px;
}

.live-rating-labels i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--series-color);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.live-rating-labels strong {
  min-width: 0;
  color: #263348;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 160ms ease, font-weight 160ms ease;
}

.live-rating-labels span.is-active {
  color: #111827;
  transform: translateX(-4px);
}

.live-rating-labels span.is-active i {
  transform: scale(1.35);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--series-color) 16%, transparent);
}

.live-rating-labels span.is-active strong {
  color: #111827;
  font-weight: 850;
}

@keyframes liveRatingLineDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes liveRatingAreaIn {
  from {
    opacity: 0;
  }
}

@keyframes liveRatingDotIn {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-rating-chart .rating-line,
  .live-rating-chart .rating-dot {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
  }

  .live-rating-chart .rating-area {
    animation: none;
  }
}

.preview-bars.random-picker-wheel-results {
  height: min(650px, 72vh);
  min-height: 520px;
}

.preview-bars.random-picker-wheel-results .random-wheel-shell {
  width: min(560px, 60vh);
}

.preview-bars.random-picker-wheel-results .random-wheel-meta,
.preview-bars.random-picker-wheel-results .random-wheel-results {
  transform: none;
}

.preview-bars.random-picker-wheel-results .random-wheel-meta {
  align-self: end;
  margin-bottom: 18px;
}

.preview-bars.random-picker-wheel-results .random-wheel-results {
  align-self: start;
  margin-top: 18px;
}

.random-wheel.is-spinning {
  animation: studentTeacherWheelSpin 900ms linear infinite;
  transition: none;
}

@media (max-width: 720px) {
  .qa-summary-grid,
  .qa-summary-grid.is-revealed {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .brainstorm-live-shell.is-vote-board > header {
    align-items: flex-start;
  }

  .brainstorm-live-countdown {
    min-width: 92px;
    padding: 7px 10px;
  }

  .brainstorm-live-board article {
    width: 100%;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .brainstorm-live-board article strong {
    grid-column: 2;
    justify-self: start;
  }
}

/* Student mobile uses inline feedback and dedicated result pages only. */
.student-page .toast,
.student-page .student-evaluation {
  display: none !important;
}

/* Admin workspace */
.admin-root {
  min-height: 100vh;
  color: #17212b;
  background: #f5f8f8;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.admin-login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(145deg, #eef9f7 0%, #f7fafb 55%, #edf6f7 100%);
}

.admin-login-shell {
  width: min(420px, 100%);
  display: grid;
  gap: 24px;
}

.admin-login-brand {
  width: 164px;
  margin-left: 28px;
}

.admin-login-brand img,
.admin-brand img {
  width: 100%;
  height: auto;
  display: block;
}

.admin-login-card {
  width: 100%;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 65, 68, 0.1);
}

.admin-login-card h1,
.admin-login-card p,
.admin-topbar h1,
.admin-topbar p,
.admin-panel-head h2,
.admin-panel-head p {
  margin: 0;
}

.admin-login-card h1 {
  font-size: 24px;
  line-height: 1.25;
}

.admin-login-card label,
.admin-form label {
  display: grid;
  gap: 7px;
  color: #25343b;
  font-size: 13px;
  font-weight: 650;
}

.admin-login-card input,
.admin-form input,
.admin-form textarea,
.admin-inline-form input,
.admin-list-toolbar input,
.admin-list-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cdd9db;
  border-radius: 10px;
  background: #fff;
  color: #17212b;
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.admin-login-card input,
.admin-form input,
.admin-form textarea,
.admin-inline-form input,
.admin-list-toolbar input {
  padding: 9px 11px;
}

.admin-form textarea {
  resize: vertical;
}

.admin-login-card input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-inline-form input:focus,
.admin-list-toolbar input:focus,
.admin-list-toolbar select:focus {
  border-color: #078c84;
  box-shadow: 0 0 0 3px rgba(7, 140, 132, 0.14);
}

.admin-login-card input::placeholder,
.admin-form input::placeholder,
.admin-list-toolbar input::placeholder {
  color: #63767c;
  opacity: 1;
}

.admin-primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #078c84;
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.admin-primary-button:hover {
  background: #06766f;
}

.admin-primary-button:focus-visible,
.admin-sidebar button:focus-visible,
.admin-row-actions button:focus-visible,
.admin-pagination button:focus-visible,
.admin-dialog button:focus-visible {
  outline: 3px solid rgba(7, 140, 132, 0.28);
  outline-offset: 2px;
}

.admin-primary-button:disabled,
.admin-row-actions button:disabled,
.admin-dialog button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.admin-primary-button svg,
.admin-refresh svg,
.admin-signout svg {
  width: 18px;
  height: 18px;
}

.admin-form-error {
  min-height: 18px;
  margin: 0;
  color: #b42318;
  font-size: 13px;
}

.admin-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}

.admin-app[hidden],
.admin-login-view[hidden],
.admin-detail-drawer[hidden] {
  display: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid #dfe8e8;
  background: #f9fbfb;
}

.admin-brand {
  width: 136px;
  min-height: 46px;
  margin: 0 8px 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #087f79;
  cursor: pointer;
}

@media (max-width: 520px) {
  .admin-login-view {
    padding: 28px 18px;
  }

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

  .admin-login-brand {
    width: 150px;
    margin-left: 20px;
  }

  .admin-login-card {
    padding: 24px 20px;
  }
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar nav button,
.admin-signout {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4c5c63;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.admin-sidebar nav button:hover,
.admin-signout:hover {
  background: #ecf4f3;
  color: #075f5a;
}

.admin-sidebar nav button.active {
  background: #dff2ef;
  color: #075f5a;
  font-weight: 800;
}

.admin-sidebar nav svg,
.admin-signout svg {
  width: 20px;
  height: 20px;
}

.admin-signout {
  margin-top: auto;
}

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

.admin-topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
  border-bottom: 1px solid #dfe8e8;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-mobile-signout {
  display: none;
}

.admin-topbar p {
  margin-bottom: 4px;
  color: #64767c;
  font-size: 12px;
}

.admin-topbar h1 {
  font-size: 23px;
  line-height: 1.25;
  text-wrap: balance;
}

.admin-refresh {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #cdd9db;
  border-radius: 9px;
  background: #fff;
  color: #33444b;
  cursor: pointer;
}

.admin-workspace {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px 32px 56px;
}

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

.admin-skeleton i {
  height: 108px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e9efef 25%, #f4f7f7 50%, #e9efef 75%);
  background-size: 200% 100%;
  animation: adminSkeleton 1.4s linear infinite;
}

@keyframes adminSkeleton {
  to { background-position: -200% 0; }
}

.admin-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #dfe8e8;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.admin-overview-warning {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #6f4b08;
  background: #fff4d6;
  font-size: 13px;
  line-height: 1.55;
}

.admin-metric-strip article {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid #e4ebeb;
}

.admin-metric-strip article:last-child {
  border-right: 0;
}

.admin-metric-strip span,
.admin-metric-strip small {
  display: block;
  color: #607279;
  font-size: 12px;
}

.admin-metric-strip strong {
  display: block;
  margin: 8px 0 6px;
  color: #14272a;
  font-size: 27px;
  line-height: 1;
}

.admin-metric-strip small {
  color: #087a73;
  font-weight: 700;
}

.admin-trend-panel,
.admin-table-panel {
  margin-top: 18px;
  border: 1px solid #dfe8e8;
  border-radius: 14px;
  background: #fff;
}

.admin-trend-panel {
  padding: 22px;
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.admin-panel-head h2 {
  font-size: 16px;
}

.admin-panel-head p {
  margin-top: 5px;
  color: #687a80;
  font-size: 12px;
}

.admin-table-panel > .admin-panel-head {
  padding: 20px 22px 0;
}

.admin-trend-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #edf3f3;
}

.admin-trend-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #52646a;
  font-size: 12px;
  cursor: pointer;
}

.admin-trend-tabs button[aria-selected="true"] {
  background: #fff;
  color: #075f5a;
  font-weight: 750;
  box-shadow: 0 2px 6px rgba(29, 65, 68, 0.08);
}

.admin-bar-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(30, minmax(5px, 1fr));
  align-items: end;
  gap: 4px;
  margin-top: 24px;
  padding-top: 12px;
  border-bottom: 1px solid #dfe8e8;
}

.admin-bar-chart > span {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-bar-chart i {
  width: min(14px, 100%);
  height: max(3px, calc(var(--admin-bar) * 165px));
  border-radius: 4px 4px 1px 1px;
  background: #159a91;
  transition: height 200ms ease-out;
}

.admin-bar-chart small {
  width: 28px;
  color: #718187;
  font-size: 9px;
  text-align: center;
  transform: rotate(-55deg);
  transform-origin: center;
}

.admin-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.admin-list-toolbar > div strong,
.admin-list-toolbar > div span {
  display: block;
}

.admin-list-toolbar > div span {
  margin-top: 4px;
  color: #65777d;
  font-size: 12px;
}

.admin-list-toolbar form {
  display: flex;
  gap: 8px;
}

.admin-list-toolbar label {
  min-width: min(330px, 40vw);
  position: relative;
}

.admin-list-toolbar label svg {
  width: 17px;
  height: 17px;
  position: absolute;
  left: 12px;
  top: 12px;
  color: #687a80;
}

.admin-list-toolbar input {
  padding-left: 38px;
}

.admin-list-toolbar select {
  width: 118px;
  padding: 0 10px;
}

.admin-list-toolbar form > button,
.admin-pagination button,
.admin-row-actions button,
.admin-inline-form button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #cdd9db;
  border-radius: 8px;
  background: #fff;
  color: #34464c;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.admin-list-toolbar form > button:hover,
.admin-pagination button:hover:not(:disabled),
.admin-row-actions button:hover:not(:disabled),
.admin-inline-form button:hover {
  border-color: #71aaa6;
  color: #075f5a;
}

.admin-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.admin-table-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table-panel th {
  padding: 12px 16px;
  border-bottom: 1px solid #dfe8e8;
  background: #f8fafa;
  color: #56686e;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

.admin-table-panel td {
  padding: 15px 16px;
  border-bottom: 1px solid #e7eeee;
  color: #33464c;
  vertical-align: middle;
}

.admin-table-panel tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table-panel tbody tr:hover {
  background: #fbfdfd;
}

.admin-table-panel td strong,
.admin-table-panel td small,
.admin-table-panel td span {
  display: block;
}

.admin-table-panel td strong {
  color: #17292d;
}

.admin-table-panel td small {
  margin-top: 4px;
  color: #6b7c82;
  font-size: 11px;
}

.admin-actions-column {
  width: 1%;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.admin-row-actions button.is-danger {
  border-color: #f1c4c0;
  color: #b42318;
}

.admin-status {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.admin-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.admin-status.is-active {
  background: #e7f6f1;
  color: #08755e;
}

.admin-status.is-active i {
  background: #16966f;
}

.admin-status.is-disabled {
  background: #f2f4f5;
  color: #5d686c;
}

.admin-status.is-disabled i {
  background: #7c888c;
}

.admin-role-badge {
  display: inline-block;
  width: max-content;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #edf2fb;
  color: #355a8c;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #e1e9e9;
  color: #64767c;
  font-size: 12px;
}

.admin-pagination > div {
  display: flex;
  gap: 6px;
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-empty,
.admin-error {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: #66777d;
  text-align: center;
}

.admin-empty > span svg {
  width: 30px;
  height: 30px;
  color: #78918f;
}

.admin-empty strong,
.admin-error strong {
  color: #26383e;
}

.admin-empty p {
  max-width: 48ch;
  margin: 0;
  font-size: 13px;
}

.admin-error button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: #078c84;
  color: #fff;
  cursor: pointer;
}

.admin-inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-inline-form input {
  min-width: 130px;
}

.admin-inline-form .admin-form-error {
  display: block;
}

.admin-promo-list {
  display: grid;
  gap: 10px;
}

.admin-promo-list article {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid #dfe8e8;
  border-radius: 12px;
  background: #fff;
}

.admin-promo-list article > img {
  width: 148px;
  height: 84px;
  border-radius: 8px;
  background: #edf3f3;
  object-fit: cover;
}

.admin-promo-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-promo-list p {
  max-width: 72ch;
  margin: 7px 0;
  color: #53666c;
  font-size: 13px;
  text-wrap: pretty;
}

.admin-promo-list small {
  color: #718187;
}

.admin-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #17212b;
  box-shadow: 0 8px 24px rgba(20, 39, 42, 0.18);
}

.admin-dialog::backdrop {
  background: rgba(15, 28, 32, 0.36);
  backdrop-filter: blur(4px);
}

.admin-dialog-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e9e9;
}

.admin-dialog-shell > header h2 {
  margin: 0;
  font-size: 18px;
}

.admin-dialog-shell > header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef3f3;
  color: #43555b;
  font-size: 22px;
  cursor: pointer;
}

.admin-dialog-body {
  max-height: calc(100vh - 130px);
  padding: 20px;
  overflow-y: auto;
}

.admin-form {
  display: grid;
  gap: 15px;
}

.admin-form label small {
  color: #687a80;
  font-size: 11px;
  font-weight: 500;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.admin-form .admin-checkbox {
  min-height: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #d2dddd;
  border-radius: 10px;
}

.admin-form .admin-checkbox input {
  width: 18px;
  min-height: 18px;
}

.admin-promo-form-preview {
  width: 100%;
  max-height: 220px;
  border-radius: 10px;
  background: #edf3f3;
  object-fit: contain;
}

.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.admin-dialog-actions button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #ccd8da;
  border-radius: 9px;
  background: #fff;
  color: #34464c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-dialog-actions .is-primary {
  border-color: #078c84;
  background: #078c84;
  color: #fff;
}

.admin-dialog-actions .is-danger {
  border-color: #c43228;
  background: #c43228;
  color: #fff;
}

.admin-confirm-copy {
  margin: 0 0 18px;
  color: #405159;
  line-height: 1.65;
  text-wrap: pretty;
}

.admin-detail-drawer {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100vh;
  border-left: 1px solid #dce6e6;
  background: #fff;
  box-shadow: -8px 0 24px rgba(22, 49, 52, 0.12);
  overflow-y: auto;
}

.admin-detail-drawer > header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #e1e9e9;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.admin-detail-drawer header p,
.admin-detail-drawer header h2 {
  margin: 0;
}

.admin-detail-drawer header p {
  margin-bottom: 4px;
  color: #687a80;
  font-size: 12px;
}

.admin-detail-drawer header h2 {
  font-size: 20px;
}

.admin-detail-drawer header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #edf3f3;
  color: #33464c;
  font-size: 22px;
  cursor: pointer;
}

.admin-detail-body {
  padding: 20px;
}

.admin-detail-body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 0 20px;
  border: 1px solid #dfe8e8;
  border-radius: 10px;
  background: #dfe8e8;
  overflow: hidden;
}

.admin-detail-body dl div {
  padding: 12px;
  background: #fff;
}

.admin-detail-body dt {
  color: #6b7c82;
  font-size: 11px;
}

.admin-detail-body dd {
  margin: 5px 0 0;
  color: #24363c;
  font-size: 13px;
  font-weight: 700;
}

.admin-history {
  margin-top: 24px;
}

.admin-history h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.admin-history article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e5ecec;
}

.admin-history article strong,
.admin-history article span,
.admin-history article small {
  display: block;
}

.admin-history article span,
.admin-history article small {
  margin-top: 4px;
  color: #6a7c82;
  font-size: 11px;
}

.admin-history article b {
  flex: 0 0 auto;
  color: #245f5b;
  font-size: 12px;
  text-align: right;
}

.admin-detail-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #607279;
}

.admin-root .toast {
  z-index: 60;
}

.auth-forgot-button,
.student-forgot-button {
  justify-self: end;
  margin-top: -4px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #087f79;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-forgot-button:focus-visible,
.student-forgot-button:focus-visible {
  outline: 3px solid rgba(7, 140, 132, 0.24);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .admin-metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-metric-strip article:nth-child(3) {
    border-right: 0;
  }

  .admin-metric-strip article:nth-child(-n + 3) {
    border-bottom: 1px solid #e4ebeb;
  }

  .admin-promo-list article {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .admin-promo-list article > img {
    width: 120px;
    height: 76px;
  }

  .admin-promo-list .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .admin-app {
    display: block;
    padding-bottom: 74px;
  }

  .admin-sidebar {
    position: fixed;
    z-index: 20;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    height: 66px;
    display: block;
    padding: 7px 8px;
    border-top: 1px solid #d9e4e4;
    border-right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .admin-brand,
  .admin-signout {
    display: none;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .admin-sidebar nav button {
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0 2px;
    font-size: 10px;
  }

  .admin-sidebar nav svg {
    width: 19px;
    height: 19px;
  }

  .admin-topbar {
    min-height: 78px;
    padding: 14px 16px;
  }

  .admin-topbar h1 {
    font-size: 20px;
  }

  .admin-refresh span {
    display: none;
  }

  .admin-mobile-signout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #d9e4e4;
    border-radius: 10px;
    background: #fff;
    color: #485f60;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
  }

  .admin-mobile-signout svg {
    width: 15px;
    height: 15px;
  }

  .admin-workspace {
    padding: 18px 14px 30px;
  }

  .admin-metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .admin-metric-strip article,
  .admin-metric-strip article:nth-child(3) {
    border-right: 1px solid #e4ebeb;
    border-bottom: 1px solid #e4ebeb;
  }

  .admin-metric-strip article:nth-child(even) {
    border-right: 0;
  }

  .admin-metric-strip article:last-child {
    border-bottom: 0;
  }

  .admin-panel-head,
  .admin-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-trend-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .admin-trend-tabs button {
    flex: 0 0 auto;
  }

  .admin-bar-chart {
    overflow-x: auto;
    grid-template-columns: repeat(30, 14px);
  }

  .admin-list-toolbar form {
    flex-wrap: wrap;
  }

  .admin-list-toolbar label {
    min-width: 100%;
  }

  .admin-list-toolbar select,
  .admin-list-toolbar form > button {
    flex: 1;
  }

  .admin-table-panel thead {
    display: none;
  }

  .admin-table-panel table,
  .admin-table-panel tbody,
  .admin-table-panel tr,
  .admin-table-panel td {
    display: block;
    width: 100%;
  }

  .admin-table-panel tr {
    padding: 14px;
    border-bottom: 1px solid #dfe8e8;
  }

  .admin-table-panel td {
    padding: 5px 0;
    border: 0;
  }

  .admin-table-panel td[data-label] {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .admin-table-panel td[data-label]::before {
    content: attr(data-label);
    color: #758889;
    font-size: 12px;
    line-height: 1.8;
  }

  .admin-table-panel td:last-child {
    padding-top: 10px;
  }

  .admin-row-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .admin-promo-list article {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
  }

  .admin-promo-list article > img {
    width: 92px;
    height: 68px;
  }

  .admin-promo-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-promo-list p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-skeleton i {
    animation: none;
  }

  .admin-bar-chart i,
  .admin-login-card input,
  .admin-form input,
  .admin-form textarea {
    transition: none;
  }
}

.student-score-float {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 30;
  width: min(360px, calc(100% - 32px));
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 18px;
  color: #fff;
  background: var(--student-teal);
  box-shadow: 0 12px 32px rgba(15, 165, 143, 0.28);
  transform: translateX(-50%);
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.student-score-float.is-wrong {
  background: #d92d20;
  box-shadow: 0 12px 32px rgba(217, 45, 32, 0.26);
}

.student-score-float.is-before-enter {
  transform: translate(-50%, calc(100% + 24px));
}

.student-score-float > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #73dc82, #19b26b);
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
}

.student-score-float.is-wrong > span {
  background: linear-gradient(145deg, #ff8a7a, #d92d20);
}

.student-score-float > strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.student-score-float em {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.student-result-page:has(.student-score-float) .student-result-content {
  padding-bottom: 120px;
}

.student-evaluation {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(var(--student-page-width), 100%);
  min-height: 145px;
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  color: #fff;
  background: var(--student-teal);
  box-shadow: 0 -12px 35px rgba(15, 165, 143, 0.2);
  transform: translateX(-50%);
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.student-evaluation.is-wrong {
  background: #667085;
}

.student-evaluation.is-before-enter {
  transform: translate(-50%, calc(100% + 24px));
}

.student-evaluation > span {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #73dc82, #19b26b);
  font-size: 42px;
  font-weight: 900;
}

.student-evaluation div {
  display: grid;
  gap: 3px;
}

.student-evaluation div strong {
  font-size: 27px;
}

.student-evaluation div small {
  font-size: 15px;
}

.student-evaluation em {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

@keyframes studentReadyPulse {
  from { transform: scale(0.92); }
  to { transform: scale(1.08); }
}

@keyframes studentCountdownTick {
  from {
    opacity: 0.35;
    transform: scale(1.24);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes studentScoreDrain {
  from { width: 100%; }
  to { width: 10%; }
}

@keyframes studentAvatarSheetIn {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

@media (max-width: 370px) {
  .student-header {
    grid-template-columns: minmax(0, 1fr) 40px;
    padding-inline: var(--student-content-inline);
  }

  .student-header.student-header-no-account {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-join-card {
    padding-inline: 20px;
  }

  .student-avatar-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .student-avatar-grid button span {
    font-size: 29px;
  }

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

  .student-history-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-history-item b {
    justify-items: start;
  }

  .student-evaluation {
    grid-template-columns: 68px 1fr auto;
    gap: 10px;
    min-height: 140px;
  }

  .student-evaluation > span {
    width: 62px;
    height: 62px;
    font-size: 38px;
  }

  .student-evaluation div strong {
    font-size: 24px;
  }

  .student-evaluation em {
    padding: 9px 11px;
    font-size: 20px;
  }

  .student-result-content {
    padding-inline: 18px;
  }

  .student-result-options .student-result-option {
    min-height: 76px;
  }

  .student-answer-content {
    padding-inline: 12px;
  }

  .student-matching-grid {
    gap: 6px;
  }

  .student-match-card {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 5px;
    padding: 8px 6px;
  }

  .student-ordering-card {
    grid-template-columns: 25px minmax(0, 1fr) 44px;
    gap: 5px;
    padding-inline: 6px;
  }

  .student-order-handle {
    width: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-ready-stage h1,
  .student-countdown-ring strong.is-ticking,
  .student-score-scale b,
  .student-ordering-card {
    animation: none;
    transition: none;
  }
}

/* Question bank */
.question-bank-shell {
  overflow: auto;
}

.bank-content {
  padding: 4px 42px 26px 34px;
}

.bank-panel {
  min-height: 690px;
  height: calc(100vh - 198px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: rgba(247, 253, 253, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 18px 34px rgba(37, 91, 103, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
  backdrop-filter: blur(24px) saturate(1.14);
}

.bank-toolbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(251, 254, 254, 0.58);
}

.bank-search {
  width: min(420px, 44%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  color: #64748b;
  background: rgba(253, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.bank-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.12);
}

.bank-search span {
  font-size: 23px;
  line-height: 1;
  transform: rotate(-20deg);
}

.bank-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #13243d;
  background: transparent;
  font: inherit;
}

.bank-search input::placeholder {
  color: #64748b;
}

.bank-select {
  position: relative;
  height: 48px;
}

.bank-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #23344e;
  border-bottom: 2px solid #23344e;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.bank-select select {
  appearance: none;
  -webkit-appearance: none;
  height: 100%;
  min-width: 132px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  padding: 0 64px 0 16px;
  color: #23344e;
  background: rgba(253, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font: inherit;
  cursor: pointer;
}

.bank-select select:focus-visible {
  outline: 3px solid rgba(18, 184, 134, 0.16);
  border-color: var(--teal);
}

.bank-list-head,
.bank-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 130px 120px 190px;
  gap: 20px;
  align-items: center;
}

.bank-list-head {
  height: 58px;
  padding: 0 40px;
  color: #54657d;
  background: rgba(251, 254, 254, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

.bank-list-head span:nth-child(n + 2) {
  text-align: center;
}

.bank-list {
  min-height: calc(100% - 152px);
  padding: 18px 20px 22px;
}

.bank-row {
  min-height: 98px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: rgba(253, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px rgba(27, 83, 95, 0.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  backdrop-filter: blur(16px) saturate(1.08);
}

.bank-row + .bank-row {
  margin-top: 14px;
}

.bank-row:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.86);
}

.bank-row:hover {
  background: rgba(253, 255, 255, 0.74);
}

.bank-question-link {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  color: #13243d;
  background: transparent;
  text-align: left;
}

.bank-question-link strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.bank-question-link:hover strong {
  color: var(--teal-dark);
}

.bank-type {
  width: max-content;
  max-width: 120px;
  justify-self: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #087f75;
  background: rgba(226, 248, 246, 0.82);
  font-size: 13px;
  white-space: nowrap;
}

.bank-row time {
  justify-self: center;
  color: #64748b;
  font-size: 14px;
}

.bank-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bank-add-class {
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
}

.bank-more {
  position: relative;
}

.bank-more-trigger {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  color: #526277;
  background: rgba(251, 254, 254, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 4px 8px rgba(15, 23, 42, 0.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.bank-more-trigger:hover {
  color: var(--teal-dark);
  background: #f2fbf9;
  border-color: #9bd8cf;
}

.bank-more-trigger svg {
  width: 19px;
  height: 19px;
}

.bank-more-menu {
  top: 44px;
}

.danger-text {
  color: #c62828;
}

.danger-text:hover {
  color: #a51818;
  background: #fff4f4;
}

.bank-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.bank-empty > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(226, 248, 246, 0.82);
  font-size: 28px;
}

.bank-empty h2,
.bank-empty p {
  margin: 0;
}

.bank-empty h2 {
  color: #13243d;
  font-size: 20px;
}

.bank-empty p {
  max-width: 360px;
  color: #64748b;
  line-height: 1.6;
}

.bank-class-body {
  padding-bottom: 22px;
}

.bank-class-list {
  display: grid;
  gap: 10px;
}

.bank-class-option {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #d8e2e8;
  border-radius: 7px;
  color: #13243d;
  background: #fff;
  text-align: left;
}

.bank-class-option:hover {
  border-color: var(--teal);
  background: #f2fbf9;
}

.bank-class-option span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.bank-class-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-class-option small {
  color: #64748b;
}

.bank-class-option em {
  flex: none;
  color: var(--teal-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .bank-content {
    padding: 20px;
  }

  .bank-list-head,
  .bank-row {
    min-width: 0;
    grid-template-columns: minmax(250px, 1fr) 96px 84px 154px;
    gap: 12px;
  }

  .bank-list-head,
  .bank-row {
    padding-left: 18px;
    padding-right: 18px;
  }

  .bank-list-head {
    padding-left: 38px;
    padding-right: 38px;
  }

  .bank-add-class {
    padding: 0 11px;
  }
}

@media (max-width: 700px) {
  .bank-toolbar {
    min-width: 650px;
    align-items: stretch;
    flex-direction: column;
  }

  .bank-search {
    width: 100%;
  }

  .bank-panel {
    overflow-x: auto;
  }

  .bank-list-head,
  .bank-row {
    min-width: 650px;
  }
}

/* Teacher visual-system alignment: keep behavior intact, unify surfaces to the workbench language. */
:root {
  --teacher-bg:
    radial-gradient(ellipse at 48% 0%, rgba(166, 201, 208, 0.42), transparent 38%),
    radial-gradient(ellipse at 94% 96%, rgba(29, 204, 196, 0.26), transparent 34%),
    linear-gradient(180deg, #eaf5f6 0%, #f8fcfc 34%, #edfafa 66%, #def5f3 100%);
  --teacher-bg-soft:
    radial-gradient(ellipse at 44% 11%, rgba(133, 177, 187, 0.2), transparent 34%),
    radial-gradient(circle at 92% 92%, rgba(4, 175, 169, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(247, 252, 252, 0.34), rgba(237, 250, 250, 0.42));
  --teacher-panel: rgba(247, 253, 253, 0.52);
  --teacher-panel-strong: rgba(253, 255, 255, 0.72);
  --teacher-control: rgba(253, 255, 255, 0.66);
  --teacher-control-hover: rgba(253, 255, 255, 0.88);
  --teacher-border: rgba(255, 255, 255, 0.9);
  --teacher-line: rgba(217, 231, 233, 0.86);
  --teacher-shadow: 0 18px 34px rgba(37, 91, 103, 0.06);
  --teacher-shadow-tight: 0 8px 18px rgba(27, 83, 95, 0.05);
  --teacher-inset: inset 0 1px 0 rgba(255, 255, 255, 0.94), inset 0 0 0 1px rgba(226, 240, 242, 0.28);
  --teacher-radius-panel: 28px;
  --teacher-radius-card: 18px;
  --teacher-radius-control: 12px;
}

.teacher-shell .modal,
.editor-page .modal,
.temp-live-page .modal,
.live-ranking-modal,
.live-control-drawer,
.profile-modal {
  border: 1px solid var(--teacher-border);
  border-radius: 24px;
  background: rgba(253, 255, 255, 0.9);
  box-shadow: var(--teacher-inset), var(--teacher-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  backdrop-filter: blur(24px) saturate(1.12);
}

.teacher-shell .modal-head,
.teacher-shell .modal-foot,
.editor-page .modal-head,
.editor-page .modal-foot,
.temp-live-page .modal-head,
.temp-live-page .modal-foot {
  border-color: var(--teacher-line);
}

.teacher-shell .modal-title,
.editor-page .modal-title,
.temp-live-page .modal-title,
.profile-modal strong {
  color: #172033;
  letter-spacing: 0;
}

.teacher-shell .icon-btn,
.editor-page .icon-btn,
.temp-live-page .icon-btn,
.profile-modal .icon-btn {
  border-color: var(--teacher-border);
  border-radius: 12px;
  background: var(--teacher-control);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.teacher-shell .icon-btn:hover,
.editor-page .icon-btn:hover,
.temp-live-page .icon-btn:hover,
.profile-modal .icon-btn:hover {
  border-color: rgba(7, 149, 143, 0.34);
  background: var(--teacher-control-hover);
}

.teacher-shell .btn-primary,
.editor-page .btn-primary,
.temp-live-page .btn-primary,
.editor-save-action,
.live-start-button,
.live-stage-action-button {
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
  box-shadow: 0 8px 12px rgba(7, 149, 143, 0.16);
}

.teacher-shell .btn-primary:hover,
.editor-page .btn-primary:hover,
.temp-live-page .btn-primary:hover,
.editor-save-action:hover,
.live-start-button:hover,
.live-stage-action-button:hover {
  background: linear-gradient(135deg, #22d0c7 0%, #087f79 100%);
  box-shadow: 0 10px 16px rgba(7, 149, 143, 0.18);
}

.teacher-shell .btn-outline,
.editor-page .btn-outline,
.temp-live-page .btn-outline,
.editor-page .editor-return,
.bank-add-class,
.live-reset-button {
  border: 1px solid var(--teacher-border);
  border-radius: 12px;
  color: #253041;
  background: var(--teacher-control);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 4px 8px rgba(15, 23, 42, 0.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.teacher-shell .btn-outline:hover,
.editor-page .btn-outline:hover,
.temp-live-page .btn-outline:hover,
.editor-page .editor-return:hover,
.bank-add-class:hover,
.live-reset-button:hover {
  border-color: rgba(7, 149, 143, 0.36);
  color: var(--teal-dark);
  background: rgba(242, 251, 249, 0.88);
}

.modal-backdrop,
.save-modal-backdrop,
.profile-modal-backdrop,
.live-ranking-backdrop,
.live-reset-modal-backdrop,
.live-question-delete-modal-backdrop,
.live-question-edit-modal-backdrop,
.live-question-forward-modal-backdrop {
  background: rgba(15, 23, 42, 0.26);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.editor-page {
  position: relative;
  isolation: isolate;
  height: 100vh;
  min-height: 100vh;
  grid-template-rows: 110px minmax(0, 1fr);
  overflow: hidden;
  background: var(--teacher-bg);
  color: #071835;
}

.editor-page::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--teacher-bg-soft);
  pointer-events: none;
}

.editor-page .editor-top {
  position: relative;
  z-index: 5;
  min-height: 110px;
  grid-template-columns: 248px minmax(0, 1fr) auto;
  gap: 22px;
  padding: 12px 42px 10px 38px;
  border: 0;
  background: transparent;
}

.editor-page .editor-brand {
  width: 214px;
  min-height: 72px;
  gap: 14px;
  border: 0;
  background: transparent;
  overflow: visible;
  cursor: default;
  flex-wrap: nowrap;
}

.editor-page .editor-brand .sidebar-brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: block;
}

.editor-page .editor-brand .sidebar-brand-text {
  color: #263644;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 5px;
  white-space: nowrap;
}

.editor-type-trigger {
  min-height: 52px;
  padding: 0 16px 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #13243d;
  background: transparent;
  font-size: 24px;
  overflow: visible;
}

.editor-type-trigger:hover,
.editor-type-trigger[aria-expanded="true"] {
  border-color: var(--teacher-border);
  background: rgba(253, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.editor-type-menu {
  top: 58px;
  width: 208px;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--teacher-border);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.94);
  box-shadow: var(--teacher-inset), 0 14px 24px rgba(15, 23, 42, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}

.editor-type-menu button {
  height: 40px;
  border-radius: 10px;
  font-weight: 700;
}

.editor-main {
  grid-template-columns: minmax(660px, 1fr) minmax(380px, 440px);
  gap: 22px;
  padding: 0 30px 28px;
  position: relative;
  z-index: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.activity-preview,
.choice-editor-panel {
  border: 1px solid var(--teacher-border);
  border-radius: var(--teacher-radius-panel);
  background: var(--teacher-panel);
  box-shadow: var(--teacher-inset), var(--teacher-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
  backdrop-filter: blur(24px) saturate(1.14);
}

.activity-preview {
  padding: 13px;
}

.activity-preview-stage {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.preview-topline {
  min-height: 58px;
  border-color: var(--teacher-line);
  background: rgba(251, 254, 254, 0.52);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

.preview-topline p {
  color: #344558;
  font-weight: 800;
}

.preview-brand {
  right: 24px;
}

.preview-qr-button,
.live-qr-button {
  border-color: var(--teacher-border);
  border-radius: 10px;
  background: rgba(253, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.preview-qr-button:hover,
.preview-qr-button[aria-expanded="true"],
.live-qr-button:hover,
.live-qr-button[aria-expanded="true"] {
  border-color: rgba(7, 149, 143, 0.42);
  background: #f2fbfa;
}

.preview-qr-panel,
.live-qr-panel {
  border: 1px solid var(--teacher-border);
  border-radius: 18px;
  background: rgba(253, 255, 255, 0.94);
  box-shadow: var(--teacher-inset), 0 16px 34px rgba(15, 23, 42, 0.12);
}

.preview-question-area h2 {
  color: #172033;
  font-weight: 800;
}

.choice-editor-panel {
  padding: 20px;
}

.choice-editor-panel .form-block {
  gap: 10px;
  margin-bottom: 18px;
}

.choice-editor-panel .form-block > span,
.choice-editor-panel .setting-block > span,
.rule-row > span,
.form-block-head span {
  color: #172033;
  font-size: 15px;
  font-weight: 800;
}

.choice-editor-panel textarea,
.choice-editor-panel .option-row input,
.choice-editor-panel .matching-pair-row input,
.choice-editor-panel .category-row input,
.choice-editor-panel .ordering-item-row input,
.choice-editor-panel .rating-criterion-row input,
.choice-editor-panel .rating-level-row input,
.choice-editor-panel .rating-scale-end input,
.acceptable-answer-row input,
.number-input {
  border: 1px solid rgba(207, 220, 229, 0.92);
  border-radius: 12px;
  color: #13243d;
  background: rgba(253, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.choice-editor-panel textarea:focus,
.choice-editor-panel input:focus,
.number-input:focus {
  border-color: rgba(7, 149, 143, 0.56);
  outline: 3px solid rgba(18, 184, 134, 0.14);
}

.choice-editor-panel .category-row,
.picker-option-list {
  border-color: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.picker-option-chip,
.category-answer-chip {
  border-color: rgba(203, 216, 226, 0.82);
  border-radius: 10px;
  background: rgba(253, 255, 255, 0.78);
}

.option-letter,
.matching-pair-index,
.category-letter,
.ordering-item-index,
.rating-criterion-index,
.rating-level-index {
  border-radius: 10px;
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
  box-shadow: 0 5px 8px rgba(7, 149, 143, 0.12);
}

.correct-toggle,
.option-delete {
  border-color: var(--teacher-border);
  border-radius: 10px;
  background: rgba(253, 255, 255, 0.7);
}

.choice-editor-panel .option-row .correct-toggle {
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 255, 254, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(7, 149, 143, 0.08),
    0 5px 12px rgba(15, 65, 72, 0.12);
  backdrop-filter: blur(12px) saturate(1.12);
}

.choice-editor-panel .option-row .correct-toggle::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  opacity: 1;
  text-shadow: 0 1px 2px rgba(7, 149, 143, 0.22);
  transition: color 160ms ease, text-shadow 160ms ease;
}

.choice-editor-panel .option-row .correct-toggle:not(.checked):hover,
.choice-editor-panel .option-row .correct-toggle:not(.checked):focus-visible {
  border-color: rgba(7, 149, 143, 0.44);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 255, 253, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 3px rgba(18, 184, 134, 0.12),
    0 6px 14px rgba(15, 65, 72, 0.14);
}

.choice-editor-panel .option-row .correct-toggle:not(.checked):hover::after,
.choice-editor-panel .option-row .correct-toggle:not(.checked):focus-visible::after {
  color: var(--teal);
  text-shadow: none;
}

.choice-editor-panel .option-row .correct-toggle.checked {
  border-color: rgba(7, 149, 143, 0.54);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 255, 252, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 3px rgba(18, 184, 134, 0.12),
    0 6px 14px rgba(15, 65, 72, 0.15);
}

.choice-editor-panel .option-row .correct-toggle.checked::after {
  color: var(--teal);
  text-shadow: none;
}

.choice-editor-panel .option-row .correct-toggle.checked img {
  opacity: 0;
}

.choice-editor-panel .add-option {
  height: 38px;
  border-color: rgba(122, 200, 193, 0.68);
  border-radius: 12px;
  color: var(--teal-dark);
  background: rgba(251, 255, 254, 0.58);
}

.choice-editor-panel .add-option:hover {
  border-color: rgba(7, 149, 143, 0.52);
  background: rgba(242, 251, 249, 0.9);
}

.poll-style-toggle button {
  border-color: var(--teacher-border);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.66);
}

.poll-style-toggle button.active {
  border-color: rgba(7, 149, 143, 0.5);
  color: var(--teal-dark);
  background: rgba(242, 251, 249, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.score-grid,
.rule-list {
  border-color: var(--teacher-line);
}

.choice-editor-panel .switch,
.switch {
  background: #c9d6e3;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.choice-editor-panel .switch.on,
.switch.on {
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
}

.editor-save-bar {
  bottom: -20px;
  margin: 20px -20px -20px;
  padding: 16px 20px 20px;
  border-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.save-modal {
  max-width: 560px;
}

.save-target-grid {
  gap: 12px;
}

.save-target-card,
.save-class-option,
.bank-class-option,
.live-forward-class-option {
  border: 1px solid var(--teacher-border);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), var(--teacher-shadow-tight);
}

.save-target-card:hover,
.save-class-option:hover,
.bank-class-option:hover,
.live-forward-class-option:hover,
.live-forward-class-option:focus-visible {
  border-color: rgba(7, 149, 143, 0.38);
  background: rgba(242, 251, 249, 0.86);
}

.temp-live-page {
  background: #fff;
  color: #172033;
}

.live-preview-stage {
  background: #fff;
}

.live-preview-head {
  min-height: 92px;
  border-bottom: 1px solid rgba(217, 231, 233, 0.9);
  background: rgba(247, 251, 252, 0.82);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.live-preview-head p {
  color: #344558;
  font-size: 18px;
  font-weight: 800;
}

.live-preview-brand {
  width: 132px;
}

.live-question-hero h1 {
  color: #172033;
  letter-spacing: 0;
}

.live-start-button {
  min-width: 360px;
  height: 88px;
  border-radius: 16px;
  font-size: 28px;
}

.live-bottom-nav {
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  background: rgba(250, 254, 254, 0.58);
  box-shadow: var(--teacher-inset), 0 10px 24px rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.live-bottom-nav button,
.live-bottom-nav > span,
.preview-participants button,
.preview-participants div {
  border: 1px solid var(--teacher-border);
  border-radius: 12px;
  color: #253041;
  background: rgba(253, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 8px rgba(15, 23, 42, 0.04);
}

.live-bottom-nav button:hover,
.live-bottom-nav .live-ranking-button:hover,
.live-bottom-nav .live-ranking-button:focus-visible,
.live-bottom-nav .live-reanswer-button:hover,
.live-bottom-nav .live-reanswer-button:focus-visible,
.live-bottom-nav .live-end-button:hover,
.live-bottom-nav .live-end-button:focus-visible {
  border-color: rgba(37, 48, 65, 0.2);
  color: #253041;
  background: rgba(245, 247, 249, 0.92);
}

.preview-participants button:hover,
.preview-participants button:focus-visible {
  border-color: rgba(7, 149, 143, 0.36);
  color: var(--teal-dark);
  background: rgba(242, 251, 249, 0.9);
}

.live-bottom-nav > span {
  color: #172033;
  font-weight: 900;
}

.live-bottom-nav .live-ranking-button,
.live-bottom-nav .live-reanswer-button,
.live-bottom-nav .live-end-button {
  color: #253041;
  background: rgba(253, 255, 255, 0.78);
}

.live-question-picker {
  position: relative;
  display: grid;
}

.live-bottom-nav .live-question-count-button {
  width: auto;
  min-width: 72px;
  height: 44px;
  padding: 0 16px;
  color: #172033;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.live-bottom-nav .live-question-count-button:hover,
.live-bottom-nav .live-question-count-button:focus-visible,
.live-question-picker.is-open .live-question-count-button {
  border-color: rgba(7, 149, 143, 0.34);
  color: var(--teal-dark);
  background: rgba(242, 251, 249, 0.94);
}

.live-question-picker-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(360px, calc(100vw - 40px));
  max-height: min(420px, calc(100vh - 150px));
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--teacher-border);
  border-radius: 14px;
  background: rgba(253, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  overflow: auto;
  transform: none;
}

.live-question-picker-panel[hidden] {
  display: none;
}

.live-bottom-nav .live-question-jump-option {
  width: 100%;
  height: auto;
  min-height: 48px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
}

.live-bottom-nav .live-question-jump-option > span {
  min-width: 32px;
  width: 32px;
  max-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  border: 0;
  border-radius: 9px;
  background: #eef5f5;
  box-shadow: none;
  color: #53616f;
  font-size: 13px;
  font-weight: 900;
}

.live-bottom-nav .live-question-jump-option > strong {
  min-width: 0;
  align-self: center;
  overflow: hidden;
  color: #253041;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-bottom-nav .live-question-jump-option:hover,
.live-bottom-nav .live-question-jump-option:focus-visible {
  border-color: rgba(7, 149, 143, 0.28);
  background: rgba(242, 251, 249, 0.92);
}

.live-bottom-nav .live-question-jump-option.active {
  border-color: rgba(7, 149, 143, 0.42);
  background: #e8f8f5;
}

.live-bottom-nav .live-question-jump-option.active > span {
  background: var(--teal);
  color: #fff;
}

.live-drawer-tab {
  width: 58px;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(135deg, #4a5667 0%, #303a4a 100%);
  box-shadow: -6px 10px 24px rgba(15, 23, 42, 0.18);
}

.live-control-drawer {
  width: min(420px, 90vw);
  gap: 20px;
  padding: 28px;
  border-left: 1px solid var(--teacher-border);
  border-radius: 28px 0 0 28px;
  background: rgba(253, 255, 255, 0.9);
  box-shadow: -18px 0 34px rgba(15, 23, 42, 0.12), var(--teacher-inset);
}

.live-control-drawer header button {
  border-color: var(--teacher-border);
  border-radius: 12px;
  background: var(--teacher-control);
}

.live-question-order-list {
  gap: 12px;
}

.live-question-order-item {
  min-height: 64px;
  border: 1px solid var(--teacher-border);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), var(--teacher-shadow-tight);
}

.live-question-order-item.active {
  border-color: rgba(7, 149, 143, 0.42);
  background: rgba(242, 251, 249, 0.9);
}

.live-question-order-item button {
  border-color: var(--teacher-border);
  border-radius: 10px;
  background: rgba(253, 255, 255, 0.78);
}

.live-question-order-item .live-question-forward-button {
  color: var(--teal-dark);
}

.live-setting-row {
  min-height: 58px;
  padding: 0 2px;
}

.live-ranking-modal {
  width: min(720px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
}

.live-ranking-head,
.live-ranking-tabs {
  border-color: var(--teacher-line);
}

.live-ranking-tabs {
  border-radius: 16px;
  background: rgba(247, 253, 253, 0.7);
}

.live-ranking-tabs button {
  border-radius: 12px;
}

.live-ranking-tabs button[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, #14c5bc 0%, #07958f 100%);
  box-shadow: 0 6px 10px rgba(7, 149, 143, 0.12);
}

.live-ranking-row {
  border: 1px solid var(--teacher-border);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.live-reset-options label,
.live-forward-class-option,
.live-question-forward-title {
  border-color: var(--teacher-border);
  border-radius: 16px;
  background: rgba(253, 255, 255, 0.72);
}

.teacher-shell .qingwen-brand-lockup,
.editor-page .qingwen-brand-lockup,
.temp-empty-brand .qingwen-brand-lockup,
.live-preview-brand .qingwen-brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
  min-width: max-content !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
}

.teacher-shell .sidebar-brand .qingwen-brand-lockup {
  transform: translateY(-8px);
}

.teacher-shell .qingwen-brand-lockup .sidebar-brand-mark,
.editor-page .qingwen-brand-lockup .sidebar-brand-mark,
.temp-empty-brand .qingwen-brand-lockup .sidebar-brand-mark,
.live-preview-brand .qingwen-brand-lockup .sidebar-brand-mark {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  flex: 0 0 48px !important;
  display: block !important;
}

.teacher-shell .qingwen-brand-lockup .sidebar-brand-text,
.editor-page .qingwen-brand-lockup .sidebar-brand-text,
.temp-empty-brand .qingwen-brand-lockup .sidebar-brand-text,
.live-preview-brand .qingwen-brand-lockup .sidebar-brand-text {
  display: inline-block !important;
  min-width: max-content !important;
  color: #263644 !important;
  font-size: 30px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: 5px !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.teacher-shell .sidebar-brand .qingwen-brand-lockup {
  gap: 17px !important;
}

.teacher-shell .sidebar-brand .qingwen-brand-lockup .sidebar-brand-mark {
  width: 58px !important;
  height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
  flex: 0 0 58px !important;
}

.teacher-shell .sidebar-brand .qingwen-brand-lockup .sidebar-brand-text {
  font-size: 36px !important;
  letter-spacing: 6px !important;
}

@media (max-width: 1320px) {
  .teacher-shell .sidebar-brand .qingwen-brand-lockup {
    gap: 15px !important;
  }

  .teacher-shell .sidebar-brand .qingwen-brand-lockup .sidebar-brand-mark {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    flex: 0 0 52px !important;
  }

  .teacher-shell .sidebar-brand .qingwen-brand-lockup .sidebar-brand-text {
    font-size: 31px !important;
    letter-spacing: 5px !important;
  }
}

@media (max-width: 900px) {
  .teacher-shell .sidebar-brand .qingwen-brand-lockup {
    gap: 11px !important;
  }

  .teacher-shell .sidebar-brand .qingwen-brand-lockup .sidebar-brand-mark {
    width: 39px !important;
    height: 39px !important;
    max-width: 39px !important;
    max-height: 39px !important;
    flex: 0 0 39px !important;
  }

  .teacher-shell .sidebar-brand .qingwen-brand-lockup .sidebar-brand-text {
    font-size: 25px !important;
    letter-spacing: 4px !important;
  }
}

.editor-page .preview-brand .qingwen-brand-lockup {
  gap: 8px !important;
  min-width: 0 !important;
  transform: none !important;
}

.editor-page .preview-brand .qingwen-brand-lockup .sidebar-brand-mark {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  flex: 0 0 28px !important;
}

.editor-page .preview-brand .qingwen-brand-lockup .sidebar-brand-text {
  color: #263644 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
}

.teacher-shell .main-area,
.teacher-shell .topbar {
  overflow: visible !important;
}

.teacher-shell .account,
.teacher-shell .account-menu {
  z-index: 80;
}

.bank-panel {
  background: var(--teacher-panel);
  box-shadow: var(--teacher-inset), var(--teacher-shadow);
}

.bank-toolbar,
.bank-list-head {
  background: rgba(251, 254, 254, 0.58);
}

.bank-search,
.bank-select select {
  background: rgba(253, 255, 255, 0.72);
}

.bank-row {
  background: rgba(253, 255, 255, 0.62);
}

.bank-row:hover {
  background: rgba(253, 255, 255, 0.78);
}

.bank-empty > span {
  background: rgba(226, 248, 246, 0.88);
}

@media (max-width: 1320px) {
  .editor-main {
    grid-template-columns: minmax(560px, 1fr) minmax(360px, 400px);
    gap: 18px;
    padding-inline: 22px;
  }

  .live-start-button {
    min-width: 320px;
  }
}

@media (max-width: 1050px) {
  .editor-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .editor-page .editor-top {
    height: auto;
    min-height: 98px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px 22px;
  }

  .editor-title-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .editor-main {
    grid-template-columns: 1fr;
    padding: 0 18px 22px;
  }

  .activity-preview,
  .choice-editor-panel {
    min-height: 560px;
  }
}

@media (max-width: 720px) {
  .live-preview-stage {
    grid-template-rows: 74px minmax(150px, auto) minmax(260px, 1fr) 124px;
    padding-inline: 18px;
  }

  .live-preview-head {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .live-preview-brand {
    width: 138px;
  }

  .live-question-hero h1 {
    font-size: 38px;
  }

  .live-start-button {
    min-width: min(320px, calc(100vw - 48px));
    height: 72px;
    font-size: 24px;
  }

  .live-bottom-nav {
    left: 16px;
    right: 16px;
    justify-content: center;
  }
}

/* Keep the legal checkbox compact inside the more general participant form rules. */
.student-login-form .legal-acceptance {
  width: 100%;
  display: flex;
  align-items: start;
  gap: 8px;
  margin: 2px 0 12px;
  padding-bottom: 4px;
  color: #52627a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  overflow: visible;
}

.student-login-form .legal-acceptance span {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  overflow-wrap: anywhere;
}

.student-login-form .legal-acceptance a {
  display: inline-block;
  white-space: nowrap;
}

.student-login-form .legal-acceptance input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.student-login-form > .student-primary-button {
  position: static;
  bottom: auto;
  margin-top: 0;
}

@media (max-height: 820px) {
  .student-account-sheet {
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    padding: 16px 18px max(20px, calc(12px + env(safe-area-inset-bottom)));
  }

  .student-account-icon {
    width: 40px;
    height: 40px;
  }

  .student-account-icon svg {
    width: 22px;
    height: 22px;
  }

  .student-account-sheet h2 {
    margin: 6px 0 8px;
  }

  .student-login-tabs {
    margin-bottom: 8px;
  }

  .student-login-tabs button {
    min-height: 36px;
  }

  .student-login-form,
  .student-password-form {
    gap: 8px;
  }

  .student-login-form input,
  .student-password-form input,
  .student-code-row button,
  .student-password-form button {
    min-height: 44px;
  }

  .student-account-content .student-primary-button,
  .student-account-skip {
    min-height: 48px;
  }
}

/* Ordering editor: drag from the dedicated handle without interfering with text editing. */
.choice-editor-panel .ordering-item-row {
  grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 150ms ease, box-shadow 150ms ease;
}

.ordering-drag-handle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--teacher-border, #cfd9e2);
  border-radius: 10px;
  color: #64748b;
  background: rgba(253, 255, 255, 0.76);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ordering-drag-handle svg {
  width: 20px;
  height: 20px;
}

.ordering-drag-handle:hover {
  border-color: rgba(7, 149, 143, 0.48);
  color: var(--teal-dark, #087f79);
  background: #f2fbfa;
}

.ordering-drag-handle:focus-visible {
  border-color: rgba(7, 149, 143, 0.48);
  outline: 3px solid rgba(18, 184, 134, 0.14);
  color: var(--teal-dark, #087f79);
  background: #f2fbfa;
}

.ordering-drag-handle:active,
.ordering-item-row.is-dragging .ordering-drag-handle {
  cursor: grabbing;
}

.ordering-item-list.is-reordering {
  user-select: none;
}

.ordering-item-row.is-dragging {
  z-index: 3;
  border-radius: 10px;
  background: rgba(247, 253, 252, 0.98);
  box-shadow: 0 6px 12px rgba(15, 65, 72, 0.14);
}

.ordering-preview-stage .preview-bars.ordering-preview-grid {
  width: min(1500px, 100%);
  height: auto;
  min-height: 206px;
  overflow: visible;
}

.ordering-preview-stage .ordering-preview-list {
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  row-gap: 12px;
}

.ordering-preview-stage .ordering-preview-card {
  flex: 0 1 150px;
  min-width: 108px;
}

@media (prefers-reduced-motion: reduce) {
  .choice-editor-panel .ordering-item-row {
    transition: none;
  }
}

/* Teacher notification center */
.teacher-notification-popover {
  position: fixed;
  z-index: 50;
  box-sizing: border-box;
  width: min(400px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 96px));
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  color: #17283a;
  box-shadow: 0 8px 24px rgba(18, 45, 55, 0.18);
}

.teacher-notification-popover[hidden] {
  display: none;
}

.teacher-notification-popover > header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2eceb;
}

.teacher-notification-popover > header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.teacher-notification-popover > header span {
  display: block;
  margin-top: 3px;
  color: #526a70;
  font-size: 12px;
}

.teacher-notification-popover > header button,
.teacher-notification-more,
.teacher-notification-state button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #e7f5f3;
  color: #076d67;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.teacher-notification-popover > header button:hover:not(:disabled),
.teacher-notification-more:hover:not(:disabled),
.teacher-notification-state button:hover {
  background: #d8efec;
}

.teacher-notification-popover button:focus-visible,
.teacher-notification-detail button:focus-visible {
  outline: 3px solid rgba(7, 140, 132, 0.25);
  outline-offset: 2px;
}

.teacher-notification-popover button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.teacher-notification-content {
  max-height: min(550px, calc(100vh - 164px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.teacher-notification-item {
  padding: 15px 18px;
  border-bottom: 1px solid #e8efef;
  background: #fff;
}

.teacher-notification-item.is-unread {
  background: #f2faf9;
}

.teacher-notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.teacher-notification-item-head > button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #14273a;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.teacher-notification-item-head > button:hover {
  color: #077b74;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.teacher-notification-unread {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #0b8f87;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
}

.teacher-notification-item p {
  display: -webkit-box;
  margin: 7px 0 8px;
  overflow: hidden;
  color: #405961;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.teacher-notification-item time {
  color: #687c82;
  font-size: 11px;
}

.teacher-notification-more {
  width: calc(100% - 32px);
  margin: 10px 16px 14px;
}

.teacher-notification-inline-error {
  margin: 0;
  padding: 8px 16px 14px;
  color: #a32720;
  font-size: 12px;
  text-align: center;
}

.teacher-notification-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  padding: 28px;
  color: #587077;
  text-align: center;
}

.teacher-notification-state strong {
  color: #243940;
  font-size: 14px;
}

.teacher-notification-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #e8f5f3;
  color: #07867e;
}

.teacher-notification-empty-icon svg {
  width: 21px;
  height: 21px;
}

.teacher-notification-skeleton {
  display: grid;
  gap: 1px;
  background: #e8efef;
}

.teacher-notification-skeleton i {
  height: 94px;
  background: linear-gradient(100deg, #f4f7f7 30%, #fff 48%, #f4f7f7 66%);
  background-size: 220% 100%;
  animation: teacher-notification-loading 1.2s linear infinite;
}

@keyframes teacher-notification-loading {
  to { background-position-x: -220%; }
}

.teacher-notification-detail {
  width: min(620px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #17283a;
  box-shadow: 0 8px 24px rgba(18, 45, 55, 0.2);
  box-sizing: border-box;
}

.teacher-notification-detail::backdrop {
  background: rgba(15, 35, 42, 0.36);
  backdrop-filter: blur(3px);
}

.teacher-notification-detail > article > header {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e3eceb;
}

.teacher-notification-detail > article,
.teacher-notification-detail > article > header > div {
  min-width: 0;
}

.teacher-notification-detail > article {
  width: 100%;
  box-sizing: border-box;
}

.teacher-notification-detail > article > header > div {
  flex: 1;
  padding-right: 46px;
}

.teacher-notification-detail h2 {
  margin: 5px 0 0;
  color: #162a3d;
  font-size: 21px;
  line-height: 1.4;
  text-wrap: balance;
}

.teacher-notification-detail header span {
  color: #63787e;
  font-size: 12px;
}

.teacher-notification-detail header button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: #edf3f3;
  color: #43565d;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.teacher-notification-detail-body {
  max-height: calc(100vh - 150px);
  padding: 22px 24px 28px;
  overflow-y: auto;
  color: #2d454d;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Admin notification management */
.admin-notification-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.admin-notification-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.admin-notification-status.is-published {
  background: #dff3ef;
  color: #076f68;
}

.admin-notification-status.is-draft {
  background: #eef2f3;
  color: #53666c;
}

.admin-notification-status.is-withdrawn {
  background: #fff0e8;
  color: #9b431d;
}

.admin-notification-list > article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 1px solid #e3ebeb;
}

.admin-notification-list > article:last-child {
  border-bottom: 0;
}

.admin-notification-copy {
  min-width: 0;
}

.admin-notification-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-notification-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-notification-copy p {
  display: -webkit-box;
  margin: 8px 0;
  overflow: hidden;
  color: #465c62;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-notification-copy small {
  color: #687b80;
  font-size: 11px;
}

.admin-notification-form textarea {
  min-height: 190px;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .admin-sidebar nav {
    grid-template-columns: repeat(5, 1fr);
  }

  .admin-notification-list > article {
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .admin-notification-list .admin-row-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .teacher-notification-popover {
    max-height: calc(100vh - 88px);
  }

  .teacher-notification-detail > article > header,
  .teacher-notification-detail-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .teacher-notification-detail {
    width: calc(100vw - 48px);
  }

  .teacher-notification-detail header button {
    right: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-notification-skeleton i {
    animation: none;
  }
}
