/* ============================================
   早押しボタン hayaosi - スタイル
   白背景・定番ボタンデザイン・低遅延優先
============================================ */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  overscroll-behavior: none;
  touch-action: manipulation;
}

input { user-select: text; -webkit-user-select: text; }

/* ========= スクリーン共通 ========= */
.screen {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.hidden { display: none !important; }

/* ========= 入室画面 ========= */
#entry-screen {
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  background: #fafafa;
}
.entry-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  color: #d62828;
  letter-spacing: 0.04em;
}
.subtitle {
  margin: 0 0 22px;
  font-size: 13px;
  text-align: center;
  color: #666;
  line-height: 1.6;
}
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: #d62828; }

.role-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.primary-btn, .secondary-btn {
  font-family: inherit;
  padding: 14px 8px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.3;
  transition: transform .08s, box-shadow .12s;
}
.primary-btn small, .secondary-btn small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  opacity: .85;
}
.primary-btn {
  background: #d62828;
  color: #fff;
  box-shadow: 0 4px 0 #9b1c1c;
}
.primary-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #9b1c1c;
}
.secondary-btn {
  background: #fff;
  color: #d62828;
  border: 2px solid #d62828;
}
.secondary-btn:active { transform: translateY(2px); }

.status {
  margin: 14px 0 0;
  font-size: 13px;
  text-align: center;
  color: #d62828;
  min-height: 18px;
}
.help { margin-top: 18px; font-size: 13px; color: #555; }
.help summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.help ol { padding-left: 20px; line-height: 1.7; }
.help .note { font-size: 12px; color: #888; margin-top: 8px; }

/* ========= トップバー ========= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #ececec;
  flex-shrink: 0;
  gap: 10px;
  flex-wrap: wrap;
}
.room-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.room-label {
  font-size: 11px;
  color: #888;
  background: #f3f3f3;
  padding: 2px 7px;
  border-radius: 4px;
}
.room-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.player-count {
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}
.player-mybadge {
  font-size: 12px;
  color: #555;
  background: #f7f7f7;
  padding: 3px 8px;
  border-radius: 10px;
}
.player-mybadge span { font-weight: 700; color: #1a1a1a; }
.score-badge {
  font-size: 13px;
  font-weight: 700;
  color: #d6a420;
  background: #fff8e1;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid #f5dca0;
}

.connection {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ccc;
  transition: background .2s;
}
.dot.connected { background: #2ecc71; }
.dot.error     { background: #e74c3c; }

/* ========= モード切替 ========= */
.mode-switch {
  display: inline-flex;
  background: #f0f0f0;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.mode-btn {
  font-family: inherit;
  border: none;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #888;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.mode-btn.active {
  background: #fff;
  color: #d62828;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ========= 結果バナー ========= */
.result-banner {
  background: #fff;
  border-bottom: 2px solid #ececec;
  padding: 14px 16px;
  text-align: center;
  flex-shrink: 0;
  transition: background .25s;
}
.result-banner.win {
  background: linear-gradient(180deg, #fff7e6 0%, #ffeac2 100%);
  border-bottom-color: #f5b942;
}
.result-banner.lose { background: #f6f6f6; }
.result-banner.correct {
  background: linear-gradient(180deg, #e8f9ec 0%, #c5efd0 100%);
  border-bottom-color: #2ecc71;
}
.result-banner.incorrect {
  background: linear-gradient(180deg, #fdecec 0%, #f7c5c5 100%);
  border-bottom-color: #e74c3c;
}
.result-name {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.15;
  word-break: break-all;
}
.result-banner.win .result-name { color: #d62828; }
.result-banner.correct .result-name { color: #1f9c4a; }
.result-banner.incorrect .result-name { color: #c0392b; }
.result-sub {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* ========= 早押しボタン本体 ========= */
.button-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 18px 20px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 24%, #f9f9f9 0%, #efefef 58%, #e3e3e3 100%);
}

.buzz-btn {
  position: relative;
  width: min(80vw, 58vh, 368px);
  height: min(80vw, 58vh, 368px);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.buzz-shadow {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 92%;
  height: 18%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 72%);
  filter: blur(4px);
  z-index: 0;
}
.buzz-base {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 98%;
  height: 40%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    linear-gradient(180deg, #a1a1a1 0%, #777 42%, #595959 70%, #424242 100%);
  box-shadow:
    inset 0 -10px 18px rgba(0,0,0,.45),
    inset 0 8px 12px rgba(255,255,255,.18),
    0 8px 16px rgba(0,0,0,.24);
  z-index: 1;
}

.buzz-ring {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 95%;
  height: 67%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, #ffffff 0%, #ececec 28%, #bdbdbd 68%, #9a9a9a 100%);
  border: 2px solid #8a8a8a;
  box-shadow:
    inset 0 3px 3px rgba(255,255,255,.78),
    inset 0 -10px 14px rgba(0,0,0,.3),
    0 12px 18px rgba(0,0,0,.24);
  z-index: 2;
}

/* 赤いボタン部分 */
.buzz-top {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 80%;
  height: 61%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 22%, #ffe3dc 0%, #ff9f90 18%, #ff4c3a 36%, #df1e10 66%, #8a0f08 100%);
  border: 2px solid #76100b;
  box-shadow:
    inset 0 -20px 34px rgba(0,0,0,.48),
    inset 0 14px 24px rgba(255,255,255,.36),
    0 12px 22px rgba(0,0,0,.28);
  z-index: 3;
  transition:
    transform .07s ease-out,
    box-shadow .07s ease-out,
    filter .15s ease-out;
}

.buzz-top::before {
  content: "";
  position: absolute;
  left: 16%;
  top: 12%;
  width: 42%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.82) 0%, rgba(255,255,255,0) 72%);
  transform: rotate(-14deg);
  pointer-events: none;
}

.buzz-top::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 46%;
  height: 18%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(120,0,0,.45) 0%, rgba(120,0,0,0) 68%);
  pointer-events: none;
}

/* ハイライト光彩（押された時に光るレイヤー） */
.buzz-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,200,.85) 0%, rgba(255,180,80,.5) 30%, rgba(255,80,40,0) 70%);
  opacity: 0;
  transition: opacity .15s ease-out;
  pointer-events: none;
  z-index: 4;
}

.buzz-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(12px, 4vw, 19px);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ffe58f;
  text-shadow:
    0 2px 2px rgba(0,0,0,.35),
    0 0 8px rgba(255,238,180,.35);
  pointer-events: none;
  z-index: 5;
}
.buzz-btn.pressed .buzz-top {
  transform: translateX(-50%) translateY(13px) scale(0.948);
  box-shadow:
    inset 0 -10px 18px rgba(0,0,0,.56),
    inset 0 7px 14px rgba(255,255,255,.24),
    0 5px 10px rgba(0,0,0,.3),
    0 0 46px 10px rgba(255, 88, 48, .72);
  filter: brightness(1.13) saturate(1.2);
}
.buzz-btn.pressed .buzz-glow {
  opacity: 1;
  animation: glowPulse .6s ease-out;
}
@keyframes glowPulse {
  0%   { opacity: 0; transform: scale(.7); }
  30%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}
.buzz-btn.locked {
  opacity: 0.55;
  filter: grayscale(0.3);
  pointer-events: none;
}

.stage-hint {
  margin-top: 18px;
  font-size: 13px;
  color: #777;
  text-align: center;
}

/* ========= 4択モード（プレイヤー） ========= */
.choice-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: #ffffff;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 420px;
}
.choice-btn {
  font-family: inherit;
  aspect-ratio: 1.4 / 1;
  border: 3px solid #ddd;
  background: #fff;
  border-radius: 18px;
  font-size: 56px;
  font-weight: 800;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .08s, border-color .15s, background .15s, color .15s;
  box-shadow: 0 4px 0 #e5e5e5;
}
.choice-btn[data-choice="1"] { color: #e74c3c; }
.choice-btn[data-choice="2"] { color: #3498db; }
.choice-btn[data-choice="3"] { color: #f39c12; }
.choice-btn[data-choice="4"] { color: #27ae60; }

.choice-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #e5e5e5; }
.choice-btn.selected {
  background: #fff8e1;
  border-color: #d6a420;
  box-shadow: 0 4px 0 #b8901c, 0 0 0 4px rgba(245, 185, 66, .25);
}
.choice-btn.reveal-correct {
  background: #d4f5dd;
  border-color: #2ecc71;
  box-shadow: 0 4px 0 #1f9c4a, 0 0 0 4px rgba(46, 204, 113, .35);
  animation: revealPulse .5s ease-out;
}
.choice-btn.reveal-wrong {
  opacity: 0.5;
}
.choice-btn.locked { pointer-events: none; opacity: .65; }
@keyframes revealPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.choice-status {
  margin-top: 18px;
  font-size: 14px;
  color: #777;
  text-align: center;
  font-weight: 600;
}

/* ========= ホスト画面 ========= */
#host-screen { background: #f7f7f7; }

.host-section {
  padding: 0 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 4px 8px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  color: #d62828;
}
.next-btn {
  font-family: inherit;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #000;
  transition: transform .08s;
}
.next-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #000;
}

/* ランキング */
.ranking-block {
  background: #fff;
  border-radius: 12px;
  padding: 8px 14px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ranking-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  animation: slideIn .25s ease-out;
}
.ranking-list li:last-child { border-bottom: none; }
.ranking-list li.empty {
  color: #aaa;
  font-size: 13px;
  text-align: center;
  justify-content: center;
  padding: 18px 0;
}
.ranking-list li.first {
  background: linear-gradient(90deg, #fff5dc 0%, #fff 100%);
  font-weight: 700;
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}
.ranking-list li.wrong-answer {
  opacity: 0.5;
  text-decoration: line-through;
}
.rank-num {
  font-size: 22px;
  font-weight: 800;
  color: #888;
  min-width: 30px;
  text-align: center;
}
.ranking-list li.first .rank-num { color: #d62828; }
.rank-name {
  flex: 1;
  font-size: 18px;
  color: #222;
  word-break: break-all;
}
.rank-time {
  font-size: 13px;
  color: #888;
  font-variant-numeric: tabular-nums;
}
.rank-mark {
  font-size: 18px;
  font-weight: 800;
  margin-left: 6px;
}
.rank-mark.correct { color: #2ecc71; }
.rank-mark.wrong { color: #e74c3c; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 判定ブロック */
.judge-block {
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  text-align: center;
  animation: slideIn .3s ease-out;
}
.judge-prompt {
  margin: 0 0 12px;
  font-size: 16px;
  color: #333;
}
.judge-prompt span {
  font-weight: 800;
  color: #d62828;
  font-size: 20px;
}
.judge-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.judge-btn {
  font-family: inherit;
  padding: 18px 8px;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .08s;
}
.judge-correct {
  background: #2ecc71;
  color: #fff;
  box-shadow: 0 4px 0 #1f9c4a;
}
.judge-wrong {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 4px 0 #a93226;
}
.judge-btn:active { transform: translateY(2px); }
.judge-correct:active { box-shadow: 0 2px 0 #1f9c4a; }
.judge-wrong:active { box-shadow: 0 2px 0 #a93226; }
.judge-hint {
  font-size: 11px;
  color: #888;
  margin: 6px 0 0;
}

/* 4択モード集計 */
.tally {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.tally-item {
  display: grid;
  grid-template-columns: 32px 1fr 40px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.tally-num {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}
.tally-item[data-n="1"] .tally-num { color: #e74c3c; }
.tally-item[data-n="2"] .tally-num { color: #3498db; }
.tally-item[data-n="3"] .tally-num { color: #f39c12; }
.tally-item[data-n="4"] .tally-num { color: #27ae60; }
.tally-bar {
  height: 18px;
  background: #f0f0f0;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
}
.tally-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d62828, #ff6b35);
  border-radius: 9px;
  transition: width .3s ease-out;
}
.tally-item[data-n="1"] .tally-fill { background: linear-gradient(90deg, #e74c3c, #ff8a7a); }
.tally-item[data-n="2"] .tally-fill { background: linear-gradient(90deg, #3498db, #7fbde8); }
.tally-item[data-n="3"] .tally-fill { background: linear-gradient(90deg, #f39c12, #ffc862); }
.tally-item[data-n="4"] .tally-fill { background: linear-gradient(90deg, #27ae60, #6bd690); }
.tally-count {
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  color: #555;
  font-variant-numeric: tabular-nums;
}

/* 個別回答リスト */
.answers-list {
  list-style: none;
  padding: 12px;
  margin: 0 0 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 60px;
}
.answers-list .empty {
  color: #aaa;
  font-size: 13px;
  width: 100%;
  text-align: center;
  padding: 12px 0;
}
.answer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f7f7f7;
  padding: 5px 10px 5px 6px;
  border-radius: 16px;
  font-size: 13px;
  animation: slideIn .2s ease-out;
}
.answer-chip .chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  font-weight: 800;
  font-size: 13px;
}
.answer-chip[data-n="1"] { background: #fdecec; }
.answer-chip[data-n="1"] .chip-num { color: #e74c3c; }
.answer-chip[data-n="2"] { background: #e8f3fc; }
.answer-chip[data-n="2"] .chip-num { color: #3498db; }
.answer-chip[data-n="3"] { background: #fef6e6; }
.answer-chip[data-n="3"] .chip-num { color: #f39c12; }
.answer-chip[data-n="4"] { background: #e8f7ee; }
.answer-chip[data-n="4"] .chip-num { color: #27ae60; }
.answer-chip.correct { box-shadow: 0 0 0 2px #2ecc71; font-weight: 700; }
.answer-chip.wrong { opacity: .5; }

/* 正解発表 */
.reveal-block {
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  text-align: center;
}
.reveal-prompt {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.reveal-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.reveal-btn {
  font-family: inherit;
  padding: 14px 0;
  border: 2px solid #ddd;
  background: #fff;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .08s;
}
.reveal-btn[data-answer="1"] { color: #e74c3c; }
.reveal-btn[data-answer="2"] { color: #3498db; }
.reveal-btn[data-answer="3"] { color: #f39c12; }
.reveal-btn[data-answer="4"] { color: #27ae60; }
.reveal-btn:active { transform: translateY(2px); }
.reveal-btn.selected {
  background: #fff8e1;
  border-color: #d6a420;
}
.reveal-status {
  margin: 10px 0 0;
  font-size: 13px;
  color: #2ecc71;
  font-weight: 700;
  min-height: 18px;
}

/* 参加者一覧&スコア */
.players {
  padding: 0 12px;
  margin: 14px 0 24px;
}
.players h3 {
  font-size: 13px;
  color: #888;
  margin: 8px 4px;
  font-weight: 600;
}
.players-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.players-list li {
  background: #f7f7f7;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  color: #444;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.players-list li .player-score {
  background: #fff8e1;
  color: #d6a420;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}
.players-list li.disconnected {
  opacity: .4;
  text-decoration: line-through;
}
.reset-scores-btn {
  font-family: inherit;
  display: block;
  margin: 12px auto 0;
  background: #fff;
  color: #888;
  border: 1px solid #ddd;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.reset-scores-btn:active { background: #f0f0f0; }

/* ========= スマホ細部調整 ========= */
@media (max-height: 600px) {
  .buzz-btn {
    width: min(58vw, 42vh, 280px);
    height: min(58vw, 42vh, 280px);
  }
  .result-name { font-size: 22px; }
  .choice-btn { font-size: 44px; }
}

@media (max-width: 360px) {
  .topbar { gap: 6px; }
  .player-mybadge, .score-badge { font-size: 11px; }
}

@media (max-width: 480px) and (orientation: portrait) {
  #entry-screen {
    justify-content: flex-start;
    padding: max(14px, env(safe-area-inset-top)) 12px 16px;
  }

  .entry-card {
    max-width: 100%;
    border-radius: 14px;
    padding: 18px 14px;
  }

  .title {
    font-size: 24px;
  }

  .subtitle {
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.45;
  }

  .role-buttons {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    gap: 8px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  }

  #host-screen .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  #host-screen .room-info {
    justify-content: space-between;
  }

  .result-banner {
    padding: 10px 12px;
  }

  .result-name {
    font-size: clamp(24px, 9vw, 34px);
  }

  .button-stage {
    justify-content: flex-start;
    padding-top: 12px;
    gap: 10px;
  }

  .buzz-btn {
    width: min(92vw, 52vh, 360px);
    height: min(92vw, 52vh, 360px);
  }

  .my-name {
    margin-top: 6px;
    font-size: 12px;
  }

  .reset-btn {
    width: 100%;
    box-shadow: 0 2px 0 #9b1c1c;
  }

  .ranking {
    margin: 8px;
    padding: 12px;
  }

  .players {
    margin: 0 8px;
    padding: 0 12px 18px;
  }
}
