:root {
  --bg: #091b74;
  --bg-deep: #08155c;
  --panel-blue: linear-gradient(180deg, rgba(78, 126, 239, 0.96) 0%, rgba(18, 46, 148, 0.98) 38%, rgba(9, 22, 94, 0.98) 100%);
  --panel-navy: linear-gradient(180deg, rgba(26, 41, 136, 0.95), rgba(9, 20, 88, 0.98));
  --gold-1: #fff0ad;
  --gold-2: #ffd465;
  --gold-3: #c98b1d;
  --gold-4: #7f4d05;
  --text: #fff4cc;
  --text-soft: #ffdf8a;
  --shadow: 0 22px 50px rgba(4, 7, 38, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

input,
select {
  appearance: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(3, 9, 54, 0.14), rgba(3, 9, 54, 0.44)),
    url("../assets/images/tlo.jpg") center center / cover no-repeat;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen-active {
  display: block;
}

.screen-shell {
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 16px;
}

.start-shell,
.players-shell,
.end-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.start-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}

.start-logo {
  width: min(100%, 470px);
  display: block;
  filter: drop-shadow(0 12px 18px rgba(12, 8, 64, 0.24));
}

.start-card,
.show-modal,
.winner-card {
  width: min(100%, 1280px);
}

.start-card,
.show-modal,
.winner-card,
.game-stage,
.score-panel,
.ranking-panel {
  position: relative;
}

.start-card::before,
.show-modal::before,
.winner-card::before,
.game-stage::before,
.score-panel::before,
.ranking-panel::before,
.status-card::before,
.question-board::before,
.answer-item::before,
.show-control-wrap::before,
.btn-show::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: linear-gradient(180deg, rgba(255, 241, 188, 0.98), rgba(247, 203, 82, 0.95) 35%, rgba(166, 103, 10, 0.98) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.start-card,
.show-modal,
.winner-card,
.game-stage,
.score-panel,
.ranking-panel {
  border-radius: 36px;
  background: rgba(11, 20, 86, 0.28);
  box-shadow: var(--shadow);
}

.start-card {
  padding: 8px 16px 14px;
}

.start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.92fr 0.98fr 1.18fr;
  gap: 10px;
}

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

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

.field-group-control-mode {
  padding-right: 4px;
  min-width: 0;
}

.field-group-wide {
  width: 100%;
}

.show-field label {
  padding-left: 6px;
  color: var(--text-soft);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.03em;
  font-size: clamp(14px, 1.35vw, 18px);
  text-shadow: 0 4px 10px rgba(34, 16, 5, 0.5);
}

.show-control-wrap {
  position: relative;
  border-radius: 28px;
  padding: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(10, 18, 87, 0.2));
  box-shadow: 0 12px 30px rgba(6, 10, 51, 0.3);
}

.show-control {
  position: relative;
  width: 100%;
  min-height: 54px;
  border: none;
  outline: none;
  border-radius: 25px;
  padding: 0 18px;
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 800;
  color: #fff6de;
  background:
    linear-gradient(166deg, rgba(150, 171, 255, 0.24) 0%, rgba(116, 129, 196, 0.16) 20%, rgba(14, 27, 114, 0.12) 21%, rgba(35, 57, 156, 0.94) 22%, rgba(12, 21, 90, 0.98) 100%);
  box-shadow: inset 0 1px 16px rgba(255, 255, 255, 0.12);
}

select.show-control {
  background-image:
    linear-gradient(166deg, rgba(150, 171, 255, 0.24) 0%, rgba(116, 129, 196, 0.16) 20%, rgba(14, 27, 114, 0.12) 21%, rgba(35, 57, 156, 0.94) 22%, rgba(12, 21, 90, 0.98) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='18' viewBox='0 0 28 18'%3E%3Cpath d='M4 4l10 10L24 4' fill='none' stroke='%23fff4ce' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center center, right 24px center;
  padding-right: 60px;
}

select.show-control option {
  background: #f8f4e4;
  color: #10245f;
  font-weight: 800;
}

select.show-control option:checked,
select.show-control option:hover {
  background: #2d67d6;
  color: #ffffff;
}

.start-setup-panel {
  margin-top: 8px;
}

.hero-actions,
.panel-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.start-help-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

@media (min-width: 981px) and (max-width: 1480px) {
  .start-card,
  .show-modal,
  .winner-card {
    width: min(100%, 1180px);
  }

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

  .field-group-control-mode {
    grid-column: span 2;
  }

  .show-field label {
    font-size: 15px;
  }

  .show-control {
    min-height: 50px;
    font-size: 18px;
  }
}

.start-help-link {
  color: #fff0bc;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(9, 23, 94, 0.44);
  border: 1px solid rgba(255, 232, 168, 0.26);
  box-shadow: 0 10px 24px rgba(6, 10, 43, 0.22);
}

.start-help-link:hover {
  background: rgba(26, 53, 166, 0.55);
}

.btn-show {
  position: relative;
  min-height: 50px;
  padding: 0 30px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(12, 11, 41, 0.35);
}

.btn-show-primary {
  color: #704104;
  background: linear-gradient(180deg, #fff2b8 0%, #f6dc7d 28%, #d69f2c 100%);
}

.btn-show-secondary {
  color: #fff5d8;
  background: linear-gradient(180deg, #395cea 0%, #173caf 100%);
}

.btn-show-danger {
  color: #fff5d8;
  background: linear-gradient(180deg, #ef6d6d 0%, #b62839 100%);
}

.start-cta {
  min-width: 260px;
}

.show-modal {
  padding: 28px;
  background: rgba(11, 20, 86, 0.66);
}

.show-modal h3 {
  margin: 0 0 22px;
  text-align: center;
  color: var(--text-soft);
  font-size: clamp(34px, 4vw, 46px);
}

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

.players-form input {
  width: 100%;
  min-height: 72px;
  border: none;
  outline: none;
  border-radius: 22px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #182058;
  font-size: 22px;
  font-weight: 800;
}

.players-form h4 {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 28px;
}

.game-shell {
  display: flex;
  align-items: center;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 18px;
  width: 100%;
}

.game-stage {
  padding: 12px;
  background: rgba(8, 17, 81, 0.14);
}

.show-topbar {
  display: grid;
  grid-template-columns: 248px 314px minmax(240px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.left-top-meta,
.center-top-controls,
.right-top-meta {
  display: flex;
}

.center-top-controls {
  justify-content: center;
}

.right-top-meta {
  gap: 8px;
  justify-content: flex-end;
}

.countdown-track {
  height: 12px;
  width: min(100%, 920px);
  margin: 0 auto 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}

.countdown-bar {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff1a2 0%, #f1c550 45%, #ff7e54 78%, #d12e39 100%);
  transform-origin: left center;
  transition: width 0.35s ease, filter 0.25s ease;
}

.question-meta-row {
  display: none;
}

.question-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 235, 177, 0.22);
  color: #fff0bc;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.status-card {
  position: relative;
  min-height: 46px;
  min-width: 0;
  border-radius: 28px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 19, 92, 0.72);
  color: #ffe293;
  font-size: clamp(14px, 1.2vw, 19px);
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(5, 9, 41, 0.28);
  text-align: center;
  overflow: hidden;
}

.turn-active {
  box-shadow:
    0 0 0 2px rgba(255, 224, 133, 0.22),
    0 0 30px rgba(110, 190, 255, 0.22),
    0 14px 26px rgba(5, 9, 41, 0.28);
}

#turnInfo.turn-active {
  color: #fffde5;
  background:
    radial-gradient(circle at 28% 24%, rgba(118, 255, 233, 0.26), transparent 38%),
    linear-gradient(180deg, rgba(31, 136, 148, 0.96), rgba(10, 73, 115, 0.98));
  box-shadow:
    0 0 0 2px rgba(178, 255, 240, 0.18),
    0 0 28px rgba(99, 255, 230, 0.24),
    0 14px 26px rgba(5, 9, 41, 0.28);
}

#turnInfo,
#countdownInfo {
  white-space: nowrap;
}

#turnInfo {
  overflow: hidden;
  text-overflow: ellipsis;
}

#countdownInfo {
  font-size: clamp(13px, 1.05vw, 17px);
  letter-spacing: 0.01em;
}

.countdown-card {
  min-width: 126px;
}

.session-card,
.round-type-card {
  min-width: 180px;
}

.round-type-card {
  display: none !important;
  color: #fff7c6;
  background:
    radial-gradient(circle at 30% 20%, rgba(140, 236, 255, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(34, 87, 214, 0.96), rgba(11, 31, 121, 0.98));
  box-shadow:
    0 0 0 2px rgba(255, 224, 133, 0.12),
    0 0 26px rgba(83, 212, 255, 0.22),
    0 14px 26px rgba(5, 9, 41, 0.28);
}

.countdown-warning {
  background: linear-gradient(180deg, rgba(255, 147, 112, 0.9), rgba(196, 43, 43, 0.94));
  color: #fff7ea;
}

.strikes-wrap-inline {
  gap: 10px;
}

.strikes-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: none;
}

.strikes {
  display: flex;
  gap: 12px;
}

.strike-item {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(123, 132, 196, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.2);
  font-size: 28px;
  font-weight: 900;
  user-select: none;
  -webkit-user-select: none;
}

.strikes.host-clickable .strike-item {
  cursor: pointer;
}

.strike-item.active {
  background: linear-gradient(180deg, #ff877f 0%, #f44754 100%);
  border-color: rgba(255, 243, 226, 0.44);
  color: #fff8f5;
  box-shadow: 0 10px 22px rgba(255, 75, 75, 0.26);
}

.question-board {
  position: relative;
  min-height: 138px;
  border-radius: 34px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(122, 232, 255, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(122, 136, 198, 0.95), rgba(34, 78, 196, 0.96) 30%, rgba(12, 33, 119, 0.98) 100%);
  box-shadow: var(--shadow);
}

.question-text {
  font-size: clamp(24px, 2.35vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  color: #ffe6a0;
  text-shadow:
    0 2px 0 #75400b,
    0 6px 14px rgba(48, 19, 0, 0.46);
}

.mic-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 6px;
}

.mic-row.host-mic-row {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 12px;
}

.btn-mic-bottom {
  min-width: 320px;
  color: #734207;
  font-size: clamp(18px, 1.55vw, 24px);
}

.mic-emoji {
  font-size: 28px;
}

.btn-mic-bottom.is-listening {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.manual-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 10px;
  margin-bottom: 6px;
}

.manual-answer-input {
  min-height: 48px;
  border: none;
  outline: none;
  border-radius: 24px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff9e5;
  border: 2px solid rgba(255, 235, 177, 0.3);
  font-size: 17px;
  font-weight: 800;
}

.manual-answer-input::placeholder {
  color: rgba(255, 246, 214, 0.7);
}

.status-row {
  margin-bottom: 8px;
}

.game-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.game-footer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 6px;
}

.game-action-btn {
  min-width: 114px;
  min-height: 40px;
  padding-inline: 16px;
}

.heard-box {
  min-height: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff3cb;
  font-size: 16px;
  font-weight: 800;
}

.heard-box:empty {
  min-height: 0;
  padding: 0;
  background: transparent;
}

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

.answer-item {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 74px;
  min-height: 70px;
  align-items: stretch;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(8, 17, 81, 0.18);
  box-shadow: 0 16px 32px rgba(6, 9, 35, 0.35);
  cursor: pointer;
  animation: answerEnter 0.28s ease both;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

@keyframes answerEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.answer-index {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff1b8 0%, #ffd868 40%, #d39c2f 100%);
  color: #6e3c00;
  font-size: 29px;
  font-weight: 900;
}

.answer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 14px;
  text-align: center;
  background: linear-gradient(180deg, #4ca7ff 0%, #1b4fd0 32%, #0d237f 100%);
  color: #ffe5a1;
  font-size: clamp(19px, 1.45vw, 26px);
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 2px 0 rgba(62, 35, 0, 0.62);
}

.answer-points {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ff7e6b 0%, #ff4e52 34%, #c6182c 100%);
  color: #fff8e6;
  font-size: 22px;
  font-weight: 900;
}

.answer-index,
.answer-text,
.answer-points {
  pointer-events: none;
}

.answer-item.is-hidden .answer-text,
.answer-item.is-hidden .answer-points {
  color: transparent;
  text-shadow: none;
}

.answer-item.is-hidden .answer-text::after {
  content: "?";
  color: #ffe08b;
  font-size: 52px;
  text-shadow: none;
}

.answer-item.host-preview.is-hidden {
  box-shadow: 0 0 0 2px rgba(255, 224, 139, 0.26), 0 16px 32px rgba(6, 9, 35, 0.35);
}

.answer-item.host-preview.is-hidden .answer-text,
.answer-item.host-preview.is-hidden .answer-points {
  color: #ffe5a1;
  text-shadow: 0 2px 0 rgba(62, 35, 0, 0.62);
}

.answer-item.host-preview.is-hidden .answer-text::after {
  content: none;
}

.answer-item.host-preview.is-hidden .answer-points {
  opacity: 0.94;
}

.answer-item.host-preview.is-revealed {
  box-shadow: 0 0 0 3px rgba(111, 255, 174, 0.55), 0 18px 36px rgba(6, 9, 35, 0.42);
}

.answer-item.host-preview.is-revealed .answer-text {
  background: linear-gradient(180deg, #75ef9c 0%, #29b85d 38%, #0b6e33 100%);
  color: #fffbe7;
  text-shadow: 0 2px 0 rgba(8, 48, 19, 0.62);
}

.answer-item.host-preview.is-revealed .answer-points {
  background: linear-gradient(180deg, #ffe28a 0%, #ffbc41 40%, #d07b05 100%);
  color: #5d2f00;
}

.answer-item.host-preview.is-revealed .answer-index {
  background: linear-gradient(180deg, #d6ffd8 0%, #8df59a 45%, #31b95f 100%);
  color: #0b4f25;
}

.answer-item.is-revealed {
  transform: translateY(-2px);
}

.answer-item.is-missed {
  opacity: 0.82;
}

.round-banner {
  margin-top: 18px;
  border-radius: 22px;
  padding: 18px 20px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  color: #fff9e6;
  background: rgba(255, 255, 255, 0.12);
}

.round-banner.success {
  background: linear-gradient(180deg, rgba(45, 189, 105, 0.42), rgba(12, 104, 58, 0.36));
}

.round-banner.fail {
  background: linear-gradient(180deg, rgba(255, 96, 96, 0.38), rgba(152, 16, 31, 0.3));
}

.result-box {
  min-height: 28px;
  margin-top: 14px;
  text-align: center;
  color: #ffefbd;
  font-size: 18px;
  font-weight: 800;
}

.game-sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-self: end;
  width: 100%;
}

.score-panel,
.ranking-panel {
  padding: 18px;
  background: rgba(11, 20, 86, 0.72);
}

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

.score-panel-title,
.ranking-title {
  text-align: center;
  color: var(--text-soft);
  font-size: clamp(22px, 1.8vw, 32px);
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 0 rgba(90, 52, 6, 0.6);
}

.score-lines {
  display: grid;
  gap: 10px;
}

.sidebar-session-card {
  width: 100%;
  margin-top: 4px;
  font-size: 13px;
}

.score-line {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 22px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(91, 187, 255, 0.92), rgba(22, 98, 213, 0.98) 35%, rgba(10, 36, 143, 0.98) 100%);
  color: #fff7dd;
  font-size: 15px;
  font-weight: 900;
}

.score-line strong {
  font-size: 18px;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff4cb;
  font-size: 18px;
  font-weight: 800;
}

.score-table th,
.score-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 241, 202, 0.16);
  text-align: left;
}

.score-table th {
  color: var(--text-soft);
}

.compact-score-table {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  overflow: hidden;
}

.game-sidebar[data-player-count="2"] .score-line,
.game-sidebar[data-player-count="3"] .score-line {
  min-height: 46px;
  font-size: 14px;
}

.game-sidebar[data-player-count="2"] .score-line strong,
.game-sidebar[data-player-count="3"] .score-line strong {
  font-size: 16px;
}

.game-sidebar[data-player-count="2"] .score-table,
.game-sidebar[data-player-count="3"] .score-table {
  display: none;
}

.game-sidebar[data-player-count="2"] .score-table th,
.game-sidebar[data-player-count="2"] .score-table td,
.game-sidebar[data-player-count="3"] .score-table th,
.game-sidebar[data-player-count="3"] .score-table td {
  padding: 8px 6px;
}

.game-sidebar[data-player-count="2"] .score-panel-title,
.game-sidebar[data-player-count="3"] .score-panel-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.game-sidebar[data-player-count="2"] .score-panel,
.game-sidebar[data-player-count="3"] .score-panel {
  padding: 12px;
}

.game-sidebar[data-player-count="2"],
.game-sidebar[data-player-count="3"] {
  max-width: 272px;
}

@media (max-width: 1340px) {
  .start-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.winner-card {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 30px;
  background: rgba(11, 20, 86, 0.72);
}

.winner-icon {
  color: var(--text-soft);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.winner-card h2 {
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(44px, 5vw, 62px);
}

.winner-text {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
}

@media (max-width: 1300px) {
  .show-topbar {
    grid-template-columns: 1fr;
  }

  .left-top-meta,
  .center-top-controls,
  .right-top-meta {
    justify-content: center;
  }

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

  .game-footer-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 980px) {
  .start-grid,
  .field-row,
  .players-form,
  .answers-board {
    grid-template-columns: 1fr;
  }

  .question-board {
    min-height: 240px;
    padding: 28px 24px;
  }

  .manual-answer-row {
    grid-template-columns: 1fr;
  }

  .countdown-track {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .screen-shell {
    padding: 8px 10px 14px;
  }

  .start-card,
  .show-modal,
  .winner-card,
  .game-stage,
  .score-panel,
  .ranking-panel {
    border-radius: 24px;
  }

  .start-shell,
  .players-shell,
  .end-shell {
    justify-content: flex-start;
    padding-top: 8px;
  }

  .start-hero {
    margin-bottom: 2px;
  }

  .start-logo {
    width: min(78vw, 250px);
  }

  .start-card {
    padding: 8px 10px 12px;
  }

  .show-field label {
    font-size: 13px;
    padding-left: 2px;
  }

  .show-control {
    min-height: 52px;
    font-size: 17px;
    border-radius: 22px;
    padding: 0 16px;
  }

  select.show-control {
    padding-right: 54px;
    background-position: center center, right 18px center;
  }

  .btn-show {
    min-height: 46px;
    font-size: 17px;
    border-radius: 22px;
  }

  .start-cta,
  .btn-mic-bottom {
    min-width: 0;
    width: 100%;
  }

  .status-card {
    min-height: 40px;
    font-size: 14px;
    padding: 0 8px;
    border-radius: 18px;
  }

  .strikes-label {
    display: none;
  }

  .strikes-wrap-inline {
    gap: 6px;
  }

  .strike-item {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .show-topbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 4px;
  }

  .left-top-meta,
  .center-top-controls,
  .right-top-meta {
    justify-content: stretch;
  }

  .left-top-meta .status-card,
  .center-top-controls .status-card,
  .right-top-meta .status-card {
    width: 100%;
  }

  .right-top-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-column: 1 / -1;
    gap: 6px;
  }

  .countdown-track {
    margin-bottom: 4px;
  }

  .countdown-card {
    min-width: 0;
    width: 100%;
    padding: 0 6px;
    justify-content: center;
  }

  #countdownInfo {
    font-size: 13px;
  }

  .question-board {
    min-height: 104px;
    padding: 10px 12px;
  }

  .question-text {
    font-size: 19px;
    line-height: 1.12;
  }

  .mic-row {
    margin: 2px 0 4px;
  }

  .btn-mic-bottom {
    min-height: 50px;
    font-size: 16px;
  }

  .mic-emoji {
    font-size: 22px;
  }

  .manual-answer-row {
    grid-template-columns: minmax(0, 1fr) 98px;
    gap: 8px;
    margin-bottom: 4px;
  }

  .manual-answer-input {
    min-height: 42px;
    font-size: 15px;
    border-radius: 18px;
    padding: 0 14px;
  }

  .manual-answer-btn {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    font-size: 14px;
  }

  .game-actions-row {
    justify-content: stretch;
    gap: 8px;
  }

  .game-action-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    font-size: 14px;
    padding-inline: 10px;
  }

  .heard-box {
    min-height: 34px;
    font-size: 14px;
    padding: 0 12px;
  }

  .answer-item {
    grid-template-columns: 52px minmax(0, 1fr) 48px;
    min-height: 52px;
    width: min(100%, 360px);
    margin: 0 auto;
    border-radius: 20px;
  }

  .answer-index {
    font-size: 20px;
  }

  .answer-text {
    font-size: 15px;
    padding: 0 8px;
  }

  .answer-points {
    font-size: 14px;
  }

  .game-sidebar {
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  .game-footer-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 4px;
  }

  .score-panel {
    padding: 10px 12px;
    width: 100%;
  }

  .score-panel-title,
  .ranking-title {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .score-lines {
    gap: 8px;
  }

  .score-line {
    min-height: 46px;
    border-radius: 16px;
    padding: 0 12px;
    font-size: 14px;
  }

  .score-line strong {
    font-size: 15px;
  }

  .game-sidebar[data-player-count="2"],
  .game-sidebar[data-player-count="3"] {
    max-width: none;
  }

  .session-card {
    min-width: 0;
    width: 100%;
  }

  .score-table {
    display: none;
  }
}
