:root {
  color-scheme: dark;
  --bg: #090a0f;
  --stage: #151821;
  --panel: #202331;
  --panel-strong: #292d3e;
  --blue: #2f80ed;
  --cyan: #48d6d2;
  --gold: #f6c85f;
  --warm: #ffe29a;
  --green: #2ecc71;
  --red: #e04f5f;
  --text: #f7f3e8;
  --muted: #b9bcc8;
  --line: rgba(246, 200, 95, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(47, 128, 237, 0.14), transparent 28%),
    radial-gradient(ellipse at top, rgba(72, 214, 210, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

.stage-shell {
  position: relative;
  min-height: 100vh;
  padding: 20px;
}

.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: auto;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(9, 10, 15, 0.76), rgba(9, 10, 15, 0.94)),
    radial-gradient(ellipse at center, rgba(72, 214, 210, 0.16), transparent 50%);
  backdrop-filter: blur(4px);
}

.boot-screen {
  display: grid;
  place-items: center;
}

.mobile-only,
.mobile-intel-close {
  display: none;
}

.auth-panel,
.end-panel {
  margin: min(12vh, 100px) auto;
}

.overlay-panel {
  width: min(480px, 100%);
  padding: 24px;
  border: 1px solid rgba(246, 200, 95, 0.36);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(32, 35, 49, 0.96), rgba(15, 18, 28, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.overlay-panel h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.overlay-panel p:not(.eyebrow) {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.start-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 226, 154, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--gold), #b88224);
  color: #15100a;
  cursor: pointer;
  font-weight: 900;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 16px;
  padding: 4px;
  border: 1px solid rgba(72, 214, 210, 0.22);
  border-radius: 8px;
  background: rgba(9, 10, 15, 0.52);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.auth-tab.active {
  background: var(--panel-strong);
  color: var(--warm);
}

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

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(72, 214, 210, 0.28);
  border-radius: 6px;
  outline: none;
  background: #10131d;
  color: var(--text);
}

.auth-form small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.account-rules {
  padding: 10px 12px;
  border: 1px solid rgba(72, 214, 210, 0.18);
  border-radius: 6px;
  background: rgba(9, 10, 15, 0.48);
}

.account-rules p {
  margin: 0 0 8px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
}

.account-rules ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-rules li {
  position: relative;
  min-height: 18px;
  padding-left: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.account-rules li::before {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(185, 188, 200, 0.48);
  border-radius: 50%;
  content: "";
}

.account-rules li[data-rule-state="valid"] {
  color: #a9e9c4;
}

.account-rules li[data-rule-state="valid"]::before {
  border-color: var(--green);
  background: var(--green);
}

.account-rules li[data-rule-state="valid"]::after {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 5px;
  height: 3px;
  border-bottom: 2px solid #09120d;
  border-left: 2px solid #09120d;
  content: "";
  transform: rotate(-45deg);
}

.account-rules li[data-rule-state="invalid"] {
  color: #ffabb4;
}

.account-rules li[data-rule-state="invalid"]::before {
  border-color: var(--red);
}

.account-rules li[data-rule-state="invalid"]::after {
  position: absolute;
  top: 0;
  left: 6px;
  color: var(--red);
  content: "!";
  font-size: 12px;
  font-weight: 900;
}

.start-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.48;
}

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

.report-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 10, 15, 0.86);
  backdrop-filter: blur(5px);
}

.report-panel {
  display: grid;
  gap: 14px;
}

.report-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.report-panel label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.report-panel select,
.report-panel textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(72, 214, 210, 0.28);
  border-radius: 6px;
  outline: none;
  background: #10131d;
  color: var(--text);
  font: inherit;
}

.report-panel textarea {
  resize: vertical;
}

.auth-form input:focus {
  border-color: var(--cyan);
}

.auth-form input[type="file"] {
  padding: 10px;
  color: var(--muted);
}

.optional-label {
  color: var(--muted);
  font-weight: 500;
}

.form-error {
  min-height: 20px;
  margin-bottom: 0 !important;
  color: #ff9ba6 !important;
}

.menu-shell {
  width: min(920px, 100%);
  margin: 4vh auto;
}

.ranking-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(720px, 100%);
  height: 100%;
  margin: 0 auto;
}

.ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.ranking-header h2 {
  margin: 0;
}

.mobile-scoreboard-panel {
  min-height: 0;
  overflow: hidden;
}

.mobile-scoreboard-panel .leaderboard-list {
  max-height: 100%;
  overflow: auto;
}

.menu-header,
.menu-actions,
.scoreboard-panel {
  border: 1px solid rgba(246, 200, 95, 0.22);
  background: rgba(21, 24, 33, 0.94);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
}

.player-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-lockup h2,
.section-heading h2 {
  margin: 0;
}

.menu-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 28px 20px;
  border-top: 0;
}

.menu-actions h1 {
  font-size: 38px;
  line-height: 1.08;
}

.menu-copy {
  margin: 12px 0 0;
  color: var(--muted);
}

.menu-start {
  min-width: 210px;
}

.scoreboard-panel {
  margin-top: 14px;
  padding: 18px;
  border-radius: 8px;
}

.leaderboard-list {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.leaderboard-entry {
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(185, 188, 200, 0.14);
}

.leaderboard-entry:first-child {
  border: 1px solid rgba(246, 200, 95, 0.38);
  border-radius: 6px;
  background: rgba(246, 200, 95, 0.09);
}

.leaderboard-entry.current-user {
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: rgba(72, 214, 210, 0.12);
  color: var(--warm);
}

.leaderboard-gap {
  padding: 2px 10px;
  color: var(--muted);
  text-align: center;
}

.scoreboard-position {
  color: var(--gold);
}

.leaderboard-empty {
  padding: 24px 10px;
  color: var(--muted);
  text-align: center;
}

.profile-image {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10131d;
  object-fit: cover;
}

.profile-image.large {
  width: 58px;
  height: 58px;
}

.scoreboard-avatar {
  width: 36px;
  height: 36px;
}

.end-panel {
  text-align: center;
}

.end-score {
  display: block;
  margin: 18px 0 24px;
  color: var(--gold);
  font-size: 44px;
}

.end-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.end-actions .ghost-button {
  min-height: 52px;
}

.game-loading {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 10, 15, 0.88);
  backdrop-filter: blur(5px);
}

.loading-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(390px, 100%);
  padding: 16px;
  border: 1px solid rgba(72, 214, 210, 0.38);
  border-radius: 8px;
  background: #151821;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.loading-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 4px solid rgba(246, 200, 95, 0.22);
  border-top-color: var(--gold);
  border-right-color: var(--cyan);
  border-radius: 50%;
  animation: loading-spin 700ms linear infinite;
}

.loading-panel strong {
  display: block;
  line-height: 1.3;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 18px;
  max-width: 1440px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #1f2434, #10131d);
  color: var(--warm);
  font-weight: 900;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.status-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-strip span,
.audio-button {
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(72, 214, 210, 0.26);
  border-radius: 8px;
  background: rgba(32, 35, 49, 0.88);
  color: var(--warm);
  text-align: center;
  font-weight: 800;
}

.audio-button {
  color: var(--text);
  cursor: pointer;
}

.audio-button[aria-pressed="false"] {
  color: var(--muted);
  border-color: rgba(185, 188, 200, 0.28);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  align-items: start;
}

.host-panel,
.side-rail,
.frame-wrap,
.lifeline-panel,
.intel-panel,
.ladder-panel {
  border: 1px solid rgba(246, 200, 95, 0.2);
  border-radius: 8px;
  background: rgba(21, 24, 33, 0.88);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.host-panel {
  padding: 14px;
}

.host-portrait {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 248px;
  padding: 8px 6px 0;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(47, 128, 237, 0.28), rgba(246, 200, 95, 0.12)),
    #10131d;
}

.host-portrait::before {
  content: "";
  position: absolute;
  inset: auto 10% 7% 10%;
  height: 28%;
  border-radius: 50%;
  background: rgba(72, 214, 210, 0.12);
  filter: blur(18px);
}

.host-image {
  position: relative;
  width: min(100%, 224px);
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.44));
}

.host-copy {
  margin-top: 14px;
}

.host-copy p:last-child {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

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

.frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050609;
}

.frame-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(72, 214, 210, 0.28);
  pointer-events: none;
}

.frame-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frame-source {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.frame-source:hover,
.frame-source:focus-visible {
  color: var(--cyan);
}

.question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}

#promptText {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

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

.answer-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 76px;
  width: 100%;
  border: 1px solid rgba(246, 200, 95, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), #171a26);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--cyan);
  outline: none;
  transform: translateY(-1px);
}

.answer-button[disabled] {
  cursor: not-allowed;
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 8px;
  border-radius: 50%;
  background: #111522;
  color: var(--gold);
  font-weight: 900;
}

.answer-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.answer-button.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, #39301f, #1c1a20);
}

.answer-button.eliminated {
  opacity: 0.34;
  filter: grayscale(1);
}

.answer-button.correct {
  border-color: var(--green);
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.34), #15251d);
}

.answer-button.wrong {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(224, 79, 95, 0.34), #28171c);
}

.lock-button,
.ghost-button,
.tool-button {
  border: 1px solid rgba(246, 200, 95, 0.35);
  border-radius: 8px;
  background: #151821;
  color: var(--text);
  cursor: pointer;
}

.report-button {
  grid-column: 1 / -1;
  color: var(--muted);
}

.lock-button {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, var(--gold), #b88224);
  color: #15100a;
  font-weight: 900;
}

.round-action-slot {
  min-height: 48px;
  margin-top: 12px;
}

.round-action-slot > button {
  width: 100%;
  min-height: 48px;
}

.lock-button:disabled,
.tool-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--warm);
}

.side-rail {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.lifeline-panel,
.intel-panel,
.ladder-panel {
  padding: 12px;
}

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

.tool-button {
  min-height: 44px;
  color: var(--warm);
  font-weight: 900;
}

.intel-panel:empty {
  display: none;
}

.intel-panel {
  color: var(--muted);
  line-height: 1.35;
}

.intel-content > p:last-child {
  margin-bottom: 0;
}

.student-row {
  display: grid;
  grid-template-columns: 52px 1fr 42px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.meter {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.12);
}

.meter::-webkit-progress-value,
.meter::-moz-progress-bar {
  background: var(--cyan);
}

.score-ladder {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.score-ladder li {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
}

.score-ladder li.active {
  background: rgba(246, 200, 95, 0.18);
  color: var(--warm);
  font-weight: 900;
}

.hidden {
  display: none !important;
}

.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}

.static-page p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.back-link {
  color: var(--warm);
}

@media (max-width: 1100px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .host-panel {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: center;
  }

  .host-portrait {
    min-height: 92px;
    padding: 4px 2px 0;
  }

  .host-image {
    width: 86px;
    aspect-ratio: 1;
  }

  .side-rail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .ladder-panel {
    grid-column: 1 / -1;
  }

  .score-ladder {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-screen="game"],
  body[data-screen="menu"],
  body[data-screen="ranking"] {
    height: 100dvh;
    overflow: hidden;
  }

  .stage-shell {
    min-height: 100dvh;
    padding: 8px;
  }

  body[data-screen="game"] .stage-shell {
    height: 100dvh;
    min-height: 0;
  }

  .app-overlay {
    padding: 8px;
  }

  .auth-panel,
  .end-panel {
    margin: 2vh auto;
  }

  .menu-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    margin: 0;
  }

  .menu-actions {
    display: flex;
    min-height: 0;
    padding: 20px 14px;
    grid-template-columns: 1fr;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
  }

  .menu-actions h1 {
    font-size: 30px;
  }

  .menu-header {
    padding: 8px 10px;
  }

  .menu-header .profile-image.large {
    width: 44px;
    height: 44px;
  }

  .menu-copy {
    font-size: 14px;
    line-height: 1.4;
  }

  .menu-start {
    width: 100%;
    margin-top: 22px;
  }

  .mobile-only {
    display: block;
  }

  .mobile-ranking-button {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
  }

  #menuScreen .scoreboard-panel {
    display: none;
  }

  .ranking-shell {
    width: 100%;
  }

  .ranking-header {
    padding: 4px 2px 10px;
  }

  .ranking-header .ghost-button {
    flex: 0 0 auto;
  }

  .mobile-scoreboard-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    margin: 0;
    padding: 8px;
  }

  .mobile-scoreboard-panel .leaderboard-list {
    margin-top: 0;
  }

  .end-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 26px;
  }

  #gameScreen:not(.hidden) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #menuScreen,
  #rankingScreen {
    overflow: hidden;
  }

  .topbar {
    width: 100%;
    margin: 0;
  }

  .brand-lockup {
    display: none;
  }

  .status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
  }

  .status-strip span,
  .audio-button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 34px;
    padding: 4px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.1;
  }

  .game-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  .host-panel {
    display: block;
    min-height: 34px;
    max-height: 42px;
    padding: 6px 8px;
    overflow: hidden;
  }

  .host-portrait,
  .host-copy .eyebrow {
    display: none;
  }

  .host-copy {
    margin: 0;
  }

  .host-copy p:last-child {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-game {
    display: grid;
    grid-template-rows: minmax(0, 1.12fr) auto minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 0;
  }

  .frame-wrap {
    height: 100%;
    min-height: 0;
    border-radius: 6px;
    aspect-ratio: auto;
  }

  .frame-wrap img {
    object-fit: contain;
  }

  .frame-source {
    display: none !important;
  }

  #promptText {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .question-row {
    display: block;
    min-height: 16px;
    margin: 0;
  }

  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 5px;
    min-height: 0;
  }

  .answer-button {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 4px;
    height: 100%;
    min-height: 0;
    padding: 4px;
    overflow: hidden;
    border-radius: 6px;
  }

  .answer-letter {
    width: 22px;
    height: 22px;
    margin: 0;
    font-size: 11px;
  }

  .answer-text {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .answer-button.long-answer .answer-text {
    font-size: 11px;
  }

  .answer-button.very-long-answer .answer-text {
    font-size: 10px;
  }

  .round-action-slot {
    min-height: 38px;
    margin: 0;
  }

  .round-action-slot > button {
    min-height: 38px;
  }

  .side-rail {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .lifeline-panel {
    padding: 4px;
    border-radius: 6px;
  }

  .lifeline-panel > .eyebrow {
    display: none;
  }

  .lifeline-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .report-button {
    grid-column: auto;
  }

  .tool-button {
    min-height: 34px;
    border-radius: 6px;
    font-size: 12px;
  }

  .intel-panel:not(:empty) {
    position: fixed;
    right: 8px;
    bottom: 50px;
    left: 8px;
    z-index: 18;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(42dvh, 300px);
    padding: 8px;
    overflow: hidden;
    border-color: var(--cyan);
    background: #151821;
  }

  .intel-content {
    min-height: 0;
    overflow: auto;
  }

  .mobile-intel-close {
    display: block;
    justify-self: end;
    min-height: 30px;
    margin-bottom: 4px;
    border: 1px solid rgba(72, 214, 210, 0.34);
    border-radius: 6px;
    background: #10131d;
    color: var(--warm);
    font-size: 12px;
    font-weight: 800;
  }

  .report-dialog-overlay {
    padding: 8px;
  }

  .report-panel {
    max-height: calc(100dvh - 16px);
    padding: 14px;
    overflow: auto;
  }

  .ladder-panel {
    display: none;
  }
}

@media (max-width: 720px) and (max-height: 640px) {
  .host-panel {
    display: none;
  }

  .menu-actions h1 {
    font-size: 26px;
  }

  .menu-copy {
    margin-top: 8px;
    font-size: 12px;
  }

  .menu-start {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
