:root {
  --background: var(--md-sys-color-surface, #0f172a);
  --surface: var(--md-sys-color-surface-container, #1e293b);
  --surface-light: var(--md-sys-color-surface-container-high, #273549);
  --surface-hover: var(--md-sys-color-surface-container-highest, #334155);
  --surface-border: var(--md-sys-color-outline, rgba(248, 250, 252, 0.16));

  --text-primary: var(--md-sys-color-on-surface, #f8fafc);
  --text-secondary: var(--md-sys-color-on-surface-variant, #94a3b8);
  --text-muted: #78859a;

  --brand: var(--md-sys-color-primary, #6366f1);
  --brand-light: #818cf8;
  --secondary: var(--md-sys-color-secondary, #34d399);

  --success: #34d399;
  --danger: var(--md-sys-color-error, #f87171);
  --warning: #f4b72b;

  --red: #e73d4f;
  --blue: #287be0;
  --yellow: #f4b72b;
  --green: #24a860;

  --radius-small: 12px;
  --radius-medium: 16px;
  --radius-large: 28px;

  --shadow-soft: var(--md-sys-elevation-3, 0 8px 24px rgba(15, 23, 42, 0.55));

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  font-family: Roboto, system-ui, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text-primary);
  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(99, 102, 241, 0.22),
      transparent 30%
    ),
    radial-gradient(
      circle at 92% 100%,
      rgba(52, 211, 153, 0.08),
      transparent 28%
    ),
    var(--background);
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(159, 103, 255, 0.8);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

[hidden] {
  display: none !important;
}

.host-app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

.host-app[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.host-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--surface-border);
  padding:
    calc(10px + var(--safe-top))
    calc(22px + var(--safe-right))
    10px
    calc(22px + var(--safe-left));
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
}

.host-topbar__content {
  display: flex;
  width: min(100%, 1440px);
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-logo {
  height: 36px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.connection-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(244, 183, 43, 0.12);
  animation: pulse 1.2s infinite;
}

.connection-status--online .connection-indicator {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(32, 200, 121, 0.12);
  animation: none;
}

.connection-status--offline .connection-indicator {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 93, 108, 0.12);
  animation: none;
}

.topbar-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--surface-border);
  border-radius: 11px;
  padding: 8px 13px;
  gap: 7px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.topbar-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.host-main {
  width: min(
    calc(100% - 44px - var(--safe-left) - var(--safe-right)),
    1440px
  );
  flex: 1;
  margin: 0 auto;
  padding: 38px 0 50px;
}

.room-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 30px;
}

.room-overview__copy {
  max-width: 720px;
}

.eyebrow,
.panel-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.room-overview h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.room-overview p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.room-pin-card {
  display: flex;
  min-width: 250px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(159, 103, 255, 0.35);
  border-radius: var(--radius-medium);
  padding: 16px 17px 16px 20px;
  gap: 18px;
  background: rgba(124, 58, 237, 0.12);
}

.room-pin-card__label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.room-pin-card strong {
  font-size: 1.8rem;
  letter-spacing: 0.15em;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  gap: 14px;
}

.metric-card {
  display: flex;
  min-height: 100px;
  align-items: center;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-medium);
  padding: 18px;
  gap: 14px;
  background: rgba(17, 24, 39, 0.78);
}

.metric-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.15);
}

.metric-card div {
  min-width: 0;
}

.metric-card div span {
  display: block;
  overflow: hidden;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card strong {
  font-size: 1.25rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(330px, 0.7fr);
  align-items: start;
  gap: 20px;
}

.dashboard-primary,
.dashboard-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
}

.panel {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-large);
  padding: clamp(20px, 3vw, 28px);
  background: rgba(17, 24, 39, 0.8);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(14px);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 25px;
  gap: 18px;
}

.panel-header--compact {
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.question-position {
  flex: 0 0 auto;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  font-weight: 900;
}

.question-empty-state,
.players-empty-state,
.ranking-empty-state {
  color: var(--text-muted);
  text-align: center;
}

.question-empty-state {
  padding: 32px 15px 25px;
}

.empty-state-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 22px;
  color: var(--brand-light);
  font-size: 2rem;
  font-weight: 900;
  background: rgba(124, 58, 237, 0.14);
}

.question-empty-state h3 {
  margin: 0;
  color: var(--text-primary);
}

.question-empty-state p {
  max-width: 500px;
  margin: 10px auto 0;
  line-height: 1.55;
}

.current-question-text {
  margin: 0 0 22px;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 850;
  line-height: 1.35;
}

.host-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.host-answer {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 68px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 15px;
  padding: 12px 15px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.045);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    opacity 180ms ease;
}

.host-answer__letter {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
}

.host-answer--red .host-answer__letter {
  background: var(--red);
}

.host-answer--blue .host-answer__letter {
  background: var(--blue);
}

.host-answer--yellow .host-answer__letter {
  background: var(--yellow);
}

.host-answer--green .host-answer__letter {
  background: var(--green);
}

.host-answer__text {
  min-width: 0;
  color: var(--text-secondary);
  line-height: 1.35;
}

.host-answer__count {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.host-answer--correct {
  border-color: rgba(32, 200, 121, 0.8);
  background: rgba(32, 200, 121, 0.12);
}

.host-answer--incorrect {
  opacity: 0.54;
}

.timer-progress {
  margin-top: 24px;
}

.timer-progress__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.timer-progress__header strong {
  color: var(--text-primary);
}

.timer-progress__track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.timer-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--secondary));
  transition: width 150ms linear;
}

.timer-progress__track span.timer-bar--danger {
  background: linear-gradient(90deg, var(--danger), var(--warning));
}

.question-explanation {
  margin-top: 22px;
  border: 1px solid rgba(32, 200, 121, 0.25);
  border-radius: 14px;
  padding: 16px;
  background: rgba(32, 200, 121, 0.08);
}

.question-explanation strong {
  color: var(--secondary);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.question-explanation p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.control-hint {
  min-height: 22px;
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.primary-controls,
.secondary-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary-controls {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--surface-border);
}

.control-button,
.secondary-control,
.modal-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 11px 17px;
  gap: 9px;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    background-color 120ms ease;
}

.control-button {
  min-width: 170px;
  border: 0;
}

.control-button--primary {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
}

.control-button--success {
  background: linear-gradient(135deg, #2bdb8b, #139c5d);
}

.control-button--danger {
  background: linear-gradient(135deg, #ff7080, #c62c43);
}

.secondary-control {
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.secondary-control--danger {
  color: #ff929c;
}

.control-button:hover:not(:disabled),
.secondary-control:hover:not(:disabled),
.modal-button:hover:not(:disabled) {
  filter: brightness(1.09);
}

.control-button:active:not(:disabled),
.secondary-control:active:not(:disabled),
.modal-button:active:not(:disabled) {
  transform: scale(0.98);
}

.players-empty-state {
  padding: 24px 10px;
}

.players-empty-state span {
  display: block;
  margin-bottom: 10px;
  font-size: 2rem;
}

.players-empty-state p {
  margin: 0;
  line-height: 1.5;
}

.players-list,
.ranking-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.player-item,
.ranking-item {
  display: grid;
  align-items: center;
  border: 1px solid var(--surface-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.player-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 10px;
  gap: 10px;
}

.player-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(145deg, var(--brand-light), var(--brand));
}

.player-info {
  min-width: 0;
}

.player-name {
  display: block;
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-status {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.remove-player-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
}

.remove-player-button:hover {
  color: var(--danger);
  background: rgba(255, 93, 108, 0.1);
}

.ranking-empty-state {
  padding: 20px 8px;
  line-height: 1.5;
}

.ranking-item {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  padding: 11px 12px;
  gap: 10px;
}

.ranking-position {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.07);
}

.ranking-name {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-score {
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 900;
}

.results-chart {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.result-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.result-row__letter {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
}

.result-row__letter--red {
  background: var(--red);
}

.result-row__letter--blue {
  background: var(--blue);
}

.result-row__letter--yellow {
  background: var(--yellow);
}

.result-row__letter--green {
  background: var(--green);
}

.result-row__content {
  min-width: 0;
}

.result-row__info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  gap: 15px;
}

.result-row__answer {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row__value {
  font-size: 0.8rem;
}

.result-row__track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.result-row__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--secondary));
  transition: width 500ms ease;
}

.result-row--correct .result-row__track {
  box-shadow: 0 0 0 2px rgba(32, 200, 121, 0.35);
}

.result-row--correct .result-row__bar {
  background: var(--success);
}

.host-footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding:
    10px
    calc(16px + var(--safe-right))
    calc(10px + var(--safe-bottom))
    calc(16px + var(--safe-left));
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 20px;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: modalEnter 180ms ease-out;
}

.modal-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 19px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 900;
  background: var(--danger);
}

.modal-card h2 {
  margin: 0;
}

.modal-card p {
  margin: 12px 0 24px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.modal-button {
  border: 0;
}

.modal-button--secondary {
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.06);
}

.modal-button--danger {
  background: linear-gradient(135deg, #ff7080, #c62c43);
}

.host-toast {
  position: fixed;
  right: 22px;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 150;
  max-width: min(390px, calc(100vw - 44px));
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 14px 17px;
  color: var(--text-primary);
  background: rgba(17, 24, 39, 0.97);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.host-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-message {
  padding: 18px;
  color: #fff;
  background: #b91c35;
  font-weight: 800;
  text-align: center;
}

@keyframes pulse {
  50% {
    opacity: 0.42;
  }
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1050px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .room-pin-card {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .host-topbar {
    padding-right: 13px;
    padding-left: 13px;
  }

  .host-main {
    width: calc(100% - 24px);
    padding-top: 25px;
  }

  .brand-copy small,
  .connection-status span:last-child {
    display: none;
  }

  .topbar-actions {
    gap: 9px;
  }

  .topbar-link {
    padding: 8px 10px;
  }

  .host-answer-grid,
  .dashboard-sidebar {
    grid-template-columns: 1fr;
  }

  .control-button {
    width: 100%;
  }

  .secondary-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 80px;
  }

  .panel {
    padding: 19px 15px;
    border-radius: 20px;
  }

  .room-pin-card strong {
    font-size: 1.5rem;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }

  .host-footer span:nth-child(2),
  .host-footer span:nth-child(3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

.connection-status--connecting .connection-indicator {
  background: var(--warning);
}

.host-login {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.host-login[hidden] {
  display: none;
}

.host-shell-bar {
  flex: 0 0 auto;
}

.host-shell-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-user-label {
  max-width: 220px;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font: 500 0.75rem/1.3 Roboto, system-ui, "Segoe UI", sans-serif;
}

.host-login__card {
  width: min(440px, calc(100% - 32px));
  display: grid;
  gap: 16px;
  margin: auto;
  padding: 28px 24px;
}

.host-login__card h1 {
  margin: 0;
}

.host-login__card p {
  margin: 0;
  color: var(--text-secondary);
}

.host-login .form-error,
.host-prep .form-error,
.host-studio .form-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
}

.host-prep,
.host-studio {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--background);
}

.host-studio {
  z-index: 36;
}

.host-prep[hidden],
.host-studio[hidden] {
  display: none;
}

.host-prep__card,
.studio-editor {
  width: min(920px, calc(100% - 32px));
  margin: 24px auto 96px;
  display: grid;
  gap: 16px;
}

.host-prep__card h1,
.studio-editor h1 {
  margin: 0;
}

.host-prep__card > p,
.studio-editor > p {
  margin: 0;
  color: var(--text-secondary);
}

.host-selected-quiz {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}

.quiz-library {
  display: grid;
  gap: 12px;
}

.quiz-library__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiz-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.quiz-card--selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.quiz-card__body h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.quiz-card__body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.quiz-card__badge {
  display: inline-block;
  margin-bottom: 8px;
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--md-sys-color-on-primary, #fff);
  background: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quiz-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.host-quiz-empty {
  margin: 0;
  color: var(--text-secondary);
}

.host-prep__footer {
  display: grid;
  gap: 8px;
  padding-bottom: 24px;
}

.host-prep__create {
  justify-self: start;
}

.host-prep .md-fab {
  z-index: 46;
}

.studio-questions {
  display: grid;
  gap: 16px;
}

.studio-question {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.studio-question h2 {
  margin: 0;
  font-size: 1rem;
}

.studio-key-label {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font: 500 0.75rem/1.3 Roboto, system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
}

.studio-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.studio-remove {
  justify-self: start;
}

.studio-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.host-prep__create--pulse {
  animation: host-create-pulse 0.7s ease 0s 3;
}

@keyframes host-create-pulse {
  0%,
  100% {
    box-shadow: var(--md-sys-elevation-1, 0 1px 2px rgba(0, 0, 0, 0.32));
  }
  50% {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.45);
  }
}

.host-history {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--background);
}

.host-history[hidden] {
  display: none;
}

.host-history__layout {
  width: min(960px, calc(100% - 32px));
  margin: 24px auto 96px;
  display: grid;
  gap: 16px;
}

.host-history__layout h1,
.host-history__layout h2 {
  margin: 0;
}

.history-player-list,
.history-progress-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.history-player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-border);
}

.history-player small {
  color: var(--text-secondary);
}

.host-history__detail,
.host-history__progress {
  padding: 16px;
}
