/* ===== ROOT TOKENS ===== */
:root {
  --bg: #0a0d14;
  --surface: #111826;
  --surface2: #1a2336;
  --border: #2a3550;
  --gold: #f0c040;
  --gold-light: #ffe580;
  --green: #2ecc71;
  --green-dark: #1a7a45;
  --red: #e74c3c;
  --yellow: #f1c40f;
  --text: #e8edf5;
  --text-dim: #8899aa;
  --font-en: 'Outfit', sans-serif;
  --font-ja: 'Noto Sans JP', sans-serif;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}

/* ===== SCREENS ===== */
.screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.hidden {
  display: none;
}

.screen.active {
  display: flex;
}

/* ===== STADIUM BG ===== */
.stadium-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 120% 60% at 50% 100%, #1a4a2a 0%, transparent 55%),
    radial-gradient(ellipse 80% 40% at 30% 0%, rgba(240, 192, 64, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 70% 0%, rgba(240, 192, 64, 0.07) 0%, transparent 50%),
    linear-gradient(175deg, #07091a 0%, #0d1530 40%, #0a1220 100%);
  overflow: hidden;
}

/* 背景画像：assets/title-bg.jpg を差し替えるだけで変更可能 */
.stadium-bg .bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
  mix-blend-mode: luminosity;
}


/* ===== TITLE SCREEN ===== */
#screen-title {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.title-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
}

.title-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

/* ロゴ画像: assets/logo.png を差し替えるだけで変更可能 */
.logo-img {
  max-width: 280px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(240, 192, 64, 0.3));
}

.title-logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.title-en {
  font-family: var(--font-en);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold), var(--gold-light), #fff8e1, var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 3s linear infinite;
  filter: drop-shadow(0 0 24px rgba(240, 192, 64, 0.5));
}

@keyframes titleShimmer {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.title-sub {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.title-ja {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.25em;
  margin-bottom: 20px;
  font-family: var(--font-ja);
}

.title-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
  opacity: 0.85;
}

/* ===== TITLE BANNER IMAGE ===== */
.title-banner-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(240, 192, 64, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.title-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ===== SPARKLE PARTICLES ===== */
.sparkle-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.sparkle {
  position: absolute;
  color: var(--gold);
  opacity: 0;
  animation: sparkleFly 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
  left: 8%;
  top: 12%;
  font-size: 1.4rem;
  animation-delay: 0s;
}

.sparkle:nth-child(2) {
  left: 88%;
  top: 18%;
  font-size: 2rem;
  animation-delay: 0.25s;
}

.sparkle:nth-child(3) {
  left: 22%;
  top: 55%;
  font-size: 1.2rem;
  animation-delay: 0.5s;
}

.sparkle:nth-child(4) {
  left: 72%;
  top: 65%;
  font-size: 1.8rem;
  animation-delay: 0.75s;
}

.sparkle:nth-child(5) {
  left: 48%;
  top: 8%;
  font-size: 1rem;
  animation-delay: 1s;
}

.sparkle:nth-child(6) {
  left: 38%;
  top: 82%;
  font-size: 1.6rem;
  animation-delay: 0.4s;
}

.sparkle:nth-child(7) {
  left: 92%;
  top: 48%;
  font-size: 1.3rem;
  animation-delay: 0.65s;
}

.sparkle:nth-child(8) {
  left: 3%;
  top: 42%;
  font-size: 1.5rem;
  animation-delay: 0.9s;
}

@keyframes sparkleFly {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }

  25% {
    opacity: 1;
    transform: translate(4px, -12px) scale(1.2);
  }

  60% {
    opacity: 0.7;
    transform: translate(-3px, -30px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(2px, -55px) scale(1.4);
  }
}

30% {
  opacity: 0.9;
}

60% {
  opacity: 0.4;
}

100% {
  opacity: 0;
  transform: translate(0, -40px) scale(1.2);
}
}

/* ===== 遊び方ボタン（タイトル画面） ===== */
.title-how-btn {
  background: none;
  border: 1px solid rgba(240, 192, 64, 0.3);
  border-radius: 50px;
  color: var(--text-dim);
  font-family: var(--font-ja);
  font-size: 0.9rem;
  padding: 10px 28px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.title-how-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 192, 64, 0.06);
}

/* ===== TITLE MAIN BUTTONS ===== */
.title-main-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}

/* マルチプレイボタンのコンテナ */
.title-multi-btns {
  margin-bottom: 14px;
}

.title-main-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.22s;
  font-family: var(--font-ja);
  backdrop-filter: blur(4px);
  position: relative;
}

.title-main-btn:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

/* ソロ: メインボタン（大きたらしく;グリーンアクセント） */
.title-solo-main {
  width: 100%;
  flex-direction: row;
  justify-content: center;
  gap: 14px;
  padding: 22px 20px;
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(46, 204, 113, 0.07);
  margin-bottom: 12px;
}

.title-solo-main .tmb-icon {
  font-size: 1.8rem;
}

.title-solo-main .tmb-label {
  font-size: 1.15rem;
  color: var(--green);
}

.title-solo-main .tmb-desc {
  font-size: 0.8rem;
  color: rgba(46, 204, 113, 0.7);
}

.title-solo-main:hover {
  border-color: var(--green);
  background: rgba(46, 204, 113, 0.12);
  box-shadow: 0 8px 28px rgba(46, 204, 113, 0.2);
}

/* 準備中: グレーアウト（クリックでポップアップ表示） */
.title-wip-btn {
  opacity: 0.6;
  cursor: pointer;
}

.title-wip-btn:hover {
  opacity: 0.8;
  transform: translateY(-2px);
  border-color: rgba(240, 192, 64, 0.4);
  background: rgba(240, 192, 64, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 準備中バッジ */
.wip-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(240, 192, 64, 0.15);
  border: 1px solid rgba(240, 192, 64, 0.4);
  color: var(--gold);
  font-family: var(--font-ja);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.tmb-icon {
  font-size: 2rem;
}

.tmb-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.tmb-desc {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.btn-solo-small,
.title-how-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50px;
  color: var(--text-dim);
  font-family: var(--font-ja);
  font-size: 0.95rem;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 360px;
  letter-spacing: 0.03em;
  text-align: center;
}

.btn-solo-small:hover {
  border-color: var(--green);
  color: var(--green);
}

.title-how-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 192, 64, 0.06);
}

.title-how {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
}

.title-how:hover {
  color: var(--gold);
}

/* ソッカモフッター */
.sokkamo-footer {
  display: block;
  text-align: center;
  padding: 14px 20px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.2s;
  margin-top: auto;
  width: 100%;
}

.sokkamo-footer:hover {
  color: var(--gold);
}

.sokkamo-footer strong {
  color: var(--text);
  font-weight: 700;
}

/* ===== FOOTER BANNER IMAGE ===== */
/* assets/title-footer-banner.jpg 推奨:1040×400px (表示 max 520×200px) */
.footer-banner-wrap {
  width: 100%;
  max-width: 520px;
  margin: 20px auto 0;
  overflow: hidden;
}

.footer-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  opacity: 0.85;
}


/* タイトル画面全体レイアウト */
#screen-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

#screen-title .title-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 16px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, #d4a820, var(--gold), #e8c840);
  color: #0a0d14;
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(240, 192, 64, 0.35);
  letter-spacing: 0.05em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(240, 192, 64, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.wide {
  width: 100%;
  max-width: 360px;
  align-self: center;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 13px 32px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-secondary.wide {
  width: 100%;
  max-width: 360px;
  align-self: center;
}

/* Share Buttons Container */
.share-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  align-self: center;
}

/* 𝕏 Share Button */
.btn-x-share {
  background: #000000;
  color: #ffffff;
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 13px 32px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
}

.btn-x-share:hover {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.btn-x-share.wide {
  width: 100%;
}

/* OS Native Share Button */
.btn-os-share {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-os-share:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(240, 192, 64, 0.15);
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  font-family: var(--font-ja);
}

.btn-back:hover {
  color: var(--gold);
}

/* ===== SCREEN HEADER ===== */
.screen-header {
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-title {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

/* ===== HOW TO PLAY ===== */
.howto-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.howto-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.step-num {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.4;
  min-width: 48px;
  line-height: 1;
}

.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-body p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.score-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.rule {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.rule-icon {
  font-size: 1.2rem;
}

.rule-name {
  font-weight: 700;
  min-width: 64px;
}

.rule-desc {
  color: var(--text-dim);
}

/* ===== FORM / CREATE / JOIN ===== */
.form-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 1rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.room-code-input {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

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

.cat-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 0.85rem;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cat-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 192, 64, 0.08);
}

/* COMING SOON スタイル */
.cat-btn.cat-coming-soon {
  cursor: not-allowed;
  opacity: 0.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
}

.cat-btn.cat-coming-soon:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface2);
}

.coming-soon-badge {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(240, 192, 64, 0.4);
  border-radius: 4px;
  padding: 2px 6px;
  background: rgba(240, 192, 64, 0.08);
}


.round-select {
  display: flex;
  gap: 12px;
}

.round-btn {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-en);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.round-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 192, 64, 0.08);
}

/* ===== LOBBY ===== */
.lobby-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lobby-share {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.share-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.share-code {
  font-family: var(--font-en);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(240, 192, 64, 0.4);
}

.btn-copy {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-ja);
}

.btn-copy:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.player-list-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-en);
}

.player-name {
  font-weight: 600;
}

.player-tag {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.lobby-info {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}

/* ===== GAME HEADER ===== */
.game-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.round-info {
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}

.vote-label {
  color: var(--gold);
}

.scoreboard-mini {
  display: flex;
  gap: 12px;
}

.score-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-family: var(--font-en);
}

.score-chip .sc-name {
  color: var(--text-dim);
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-chip .sc-pts {
  font-weight: 700;
  color: var(--gold);
}

.score-chip .sc-cards {
  font-size: 0.7rem;
}

/* ===== QUESTION SCREEN ===== */
#screen-question {
  padding-bottom: 32px;
}

.question-card {
  margin: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.question-person {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 8px;
  line-height: 1.2;
}

.question-situation-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.question-situation {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.question-prompt {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.timer-bar-wrap {
  margin: 0 16px 16px;
  position: relative;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 1s linear, background 1s;
}

.timer-label {
  position: absolute;
  right: 0;
  top: -22px;
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}

.answer-form {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-form textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 1rem;
  padding: 14px 16px;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
  width: 100%;
}

.answer-form textarea:focus {
  border-color: var(--gold);
}

.waiting-msg {
  padding: 32px;
  text-align: center;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== VOTE SCREEN ===== */
.vote-question {
  padding: 16px 16px 0;
  text-align: center;
}

.vote-person {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}

.vote-situation {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.5;
}

.vote-instruction {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 12px 16px 0;
  padding-bottom: 4px;
}

.choices-list {
  padding: 12px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.choice-item:hover {
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.05);
}

.choice-item.selected {
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.1);
}

.choice-item.disabled {
  cursor: default;
  opacity: 0.45;
}

.choice-num {
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.choice-text {
  font-size: 0.95rem;
  line-height: 1.6;
}

.choice-vote-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}

/* ===== RESULT SCREEN ===== */
.result-header {
  padding: 20px 20px 0;
}

.result-round-label {
  font-family: var(--font-en);
  font-size: 1rem;
  color: var(--text-dim);
}

.real-quote-reveal {
  margin: 16px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(46, 204, 113, 0.04));
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius);
  padding: 20px;
}

.reveal-label {
  font-size: 0.8rem;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.reveal-person {
  font-family: var(--font-en);
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.reveal-quote {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--text);
}

.reveal-source {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
  opacity: 0.6;
  letter-spacing: 0.03em;
}

.result-events {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.event-icon {
  font-size: 1.1rem;
}

.event-text {
  flex: 1;
}

.event-pts {
  font-family: var(--font-en);
  font-weight: 700;
}

.event-pts.pos {
  color: var(--green);
}

.event-pts.neg {
  color: var(--red);
}

.scoreboard-full {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
}

.sb-rank {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text-dim);
  min-width: 28px;
}

.sb-rank.gold {
  color: var(--gold);
}

.sb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.sb-name {
  flex: 1;
  font-weight: 600;
}

.sb-cards {
  display: flex;
  gap: 4px;
}

.sb-card {
  font-size: 0.75rem;
}

.sb-pts {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
}

/* ===== FINAL SCREEN ===== */
#screen-final {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.final-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
}

.final-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* ポータルリンク：控えめなテキストリンク風 */
.btn-portal {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-ja);
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color 0.2s;
  padding: 4px 0;
  letter-spacing: 0.05em;
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.15);
}

.btn-portal:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* タイトルへ：控えめなテキスト */
.btn-ghost.wide {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-ja);
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 0;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.15);
  align-self: center;
}

.btn-ghost.wide:hover {
  color: var(--text);
  text-decoration-color: var(--text-dim);
}

.champion-label {
  font-family: var(--font-en);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 12px;
}

.champion-name {
  font-family: var(--font-en);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
  text-shadow: 0 0 32px rgba(240, 192, 64, 0.3);
  margin-bottom: 32px;
}

.final-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

/* ===== NEW LABELS (INFO LABEL) ===== */
.info-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-ja);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.mt-8 {
  margin-top: 8px !important;
}

.mt-12 {
  margin-top: 12px !important;
}

/* ===== OVERLAY ANIMATIONS ===== */
.overlay-anim {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  animation: fadeOverlay 0.25s ease;
}

.overlay-anim.hidden {
  display: none;
}

@keyframes fadeOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.goal-text {
  font-family: var(--font-en);
  font-size: 5rem;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 0.05em;
  animation: goalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.5);
  text-shadow: 0 0 60px rgba(46, 204, 113, 0.8);
}

.goal-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-top: 12px;
}

@keyframes goalPop {
  0% {
    transform: scale(0.2) rotate(-10deg);
    opacity: 0
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1
  }
}

.card-anim {
  width: 130px;
  height: 180px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  animation: cardDraw 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.6);
  padding-bottom: 12px;
  position: relative;
}

.yellow-card {
  background: linear-gradient(145deg, #ffe040, #d4a800);
  box-shadow: 0 0 80px rgba(241, 196, 15, 0.9), 0 0 140px rgba(241, 196, 15, 0.4);
}

.red-card {
  background: linear-gradient(145deg, #ff4030, #a00000);
  box-shadow: 0 0 80px rgba(231, 76, 60, 1), 0 0 160px rgba(231, 76, 60, 0.5);
}

.card-inner {
  flex: 1;
}

.card-label {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.12em;
}

.card-msg {
  margin-top: 20px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.03em;
  animation: msgPop 0.4s 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5) both;
}

.card-player-name {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
  animation: msgPop 0.4s 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.5) both;
}

@keyframes cardDraw {
  0% {
    transform: translateY(-100px) rotate(20deg) scale(0.3);
    opacity: 0;
  }

  70% {
    transform: translateY(8px) rotate(-3deg) scale(1.05);
    opacity: 1;
  }

  100% {
    transform: translateY(0) rotate(0) scale(1);
    opacity: 1;
  }
}

@keyframes msgPop {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 回答待ちプログレス */
.answer-progress-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
  flex-wrap: wrap;
}

.ap-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
  border: 2px solid var(--border);
}

.ap-dot.done {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.answer-progress-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 4px;
}

/* ===== MISC ===== */
.hidden {
  display: none !important;
}

.room-code-display {
  font-family: var(--font-en);
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 480px) {
  .title-en {
    font-size: 3.2rem;
  }

  .question-person {
    font-size: 2.2rem;
  }

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

  .cat-btn:last-child {
    grid-column: auto;
  }
}

@media (min-width: 768px) {
  .screen {
    position: relative;
    min-height: 100vh;
  }

  .form-content,
  .lobby-content,
  .howto-content {
    max-width: 500px;
    margin: 0 auto;
  }

  .choices-list {
    max-width: 560px;
    margin: 0 auto;
  }

  .scoreboard-full,
  .result-events {
    max-width: 560px;
    margin: 0 auto;
  }
}

/* ===== MODE SELECT (TITLE) ===== */
.mode-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-ja);
}

.mode-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.mode-battle {
  border-color: rgba(240, 192, 64, 0.3);
}

.mode-battle:hover {
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.08);
}

.mode-solo {
  border-color: rgba(46, 204, 113, 0.3);
}

.mode-solo:hover {
  border-color: var(--green);
  background: rgba(46, 204, 113, 0.08);
}

.mode-icon {
  font-size: 2rem;
}

.mode-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.mode-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.title-sub-btns {
  margin-bottom: 8px;
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-family: var(--font-ja);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  padding: 4px;
}

.btn-ghost:hover {
  color: var(--gold);
}

/* ===== PERSON PHOTO ===== */
.person-photo-wrap {
  margin-bottom: 12px;
}

.person-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--gold);
  box-shadow: 0 0 16px rgba(240, 192, 64, 0.3);
}

/* ===== SOLO RULE BOX ===== */
.solo-rule-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.solo-rule-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.solo-rule-box p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.solo-rule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.solo-rule-list li {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ===== SOLO SCORE DISPLAY ===== */
.solo-score-disp {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

/* ===== VERDICT BOX (correct / wrong) ===== */
.verdict-box {
  margin: 16px;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 900;
  animation: goalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.5);
}

.verdict-box.correct {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: var(--green);
}

.verdict-box.wrong {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: var(--red);
}

/* ===== SOLO SCORE SUMMARY ===== */
.solo-score-summary {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.solo-score-big {
  font-family: var(--font-en);
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
}

/* ===== SOLO FINAL (redesign) ===== */
#screen-solo-final {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.solo-final-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.solo-final-header {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--gold);
}

/* スコアサークル */
.solo-score-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.solo-score-circle-inner {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: radial-gradient(circle at 50% 40%, rgba(240, 192, 64, 0.12), transparent 70%);
  border: 2px solid rgba(240, 192, 64, 0.25);
  border-radius: 50%;
  width: 160px;
  height: 160px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 40px rgba(240, 192, 64, 0.15), inset 0 0 30px rgba(240, 192, 64, 0.05);
}

.solo-score-num {
  font-family: var(--font-en);
  font-size: 4rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(240, 192, 64, 0.6);
  line-height: 1;
}

.solo-score-denom {
  font-family: var(--font-en);
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 400;
}

.solo-score-unit {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ランクカード */
.solo-rank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  width: 100%;
}

/* ボタン群 */
.solo-final-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* ===== REVIEW SCREEN ===== */
.review-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.review-q-num {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-dim);
  min-width: 28px;
}

.review-person {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

.review-situation {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.review-choices {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-choice {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.review-choice.real {
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(46, 204, 113, 0.08);
}

.review-choice.selected-correct {
  border-color: var(--green);
  background: rgba(46, 204, 113, 0.15);
}

.review-choice.selected-wrong {
  border-color: var(--red);
  background: rgba(231, 76, 60, 0.12);
}

.review-choice-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.review-choice-tag {
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: auto;
  flex-shrink: 0;
  align-self: flex-start;
}

/* ===== HOW TO PLAY VISUALS ===== */
.howto-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(240, 192, 64, 0.1), rgba(240, 192, 64, 0.04));
  border: 1px solid rgba(240, 192, 64, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 8px;
}

.howto-summary-icon {
  font-size: 2rem;
}

.howto-summary-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

.howto-summary-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* 例題カード */
.howto-example {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 10px;
}

.howto-ex-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  font-family: var(--font-en);
  font-weight: 700;
  margin-bottom: 6px;
}

.howto-ex-person {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.howto-ex-situation {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* 入力デモ */
.howto-answer-demo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.howto-demo-input {
  font-style: italic;
  color: var(--text);
  font-size: 0.9rem;
  flex: 1;
}

.howto-demo-badge {
  font-size: 0.72rem;
  color: var(--green);
  border: 1px solid rgba(46, 204, 113, 0.4);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* 選択肢デモ */
.howto-choices-demo {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.howto-choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
}

.howto-choice-item.real {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.06);
}

.hci-num {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--gold);
  min-width: 18px;
}

.hci-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hci-badge.real {
  color: var(--green);
  border: 1px solid rgba(46, 204, 113, 0.5);
}

.hci-badge.fake {
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.hci-badge.ai {
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.4);
}

/* ソロモードのステップ枠 */
.howto-solo-mode {
  border: 1px solid rgba(46, 204, 113, 0.25);
  background: rgba(46, 204, 113, 0.04);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 4px;
}


/* ===== RESPONSIVE: PC / TABLET ===== */
@media (min-width: 600px) {

  /* タイトル: ボタンを大きく */
  .title-main-btn {
    padding: 28px 20px;
  }

  .tmb-icon {
    font-size: 2.4rem;
  }

  .tmb-label {
    font-size: 1.15rem;
  }

  .title-content {
    max-width: 480px;
  }
}

@media (min-width: 860px) {

  /* タブレット・PC: 全体を中央寄せ */
  .screen {
    position: relative;
    min-height: 100vh;
    align-items: center;
  }

  #screen-title {
    justify-content: center;
  }

  #screen-title .title-content {
    max-width: 520px;
    padding: 48px 32px 20px;
  }

  .form-content,
  .lobby-content,
  .howto-content {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .choices-list,
  .review-list {
    max-width: 620px;
    margin: 0 auto;
    width: 100%;
  }

  .scoreboard-full,
  .result-events {
    max-width: 620px;
    margin: 0 auto;
  }

  .question-card {
    max-width: 620px;
    margin: 20px auto;
  }

  .final-content {
    max-width: 500px;
  }
}

@media (min-width: 1200px) {

  /* 大画面PC: 2カラムレイアウト（ゲーム中） */
  #screen-question,
  #screen-vote,
  #screen-result {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 0 40px;
    padding: 0 40px;
  }

  .game-header {
    width: 100%;
    max-width: 100%;
  }

  .question-card {
    max-width: 500px;
    flex: 1;
    margin: 20px 0;
  }

  .answer-form,
  .choices-list {
    max-width: 480px;
    flex: 1;
    margin: 0;
    padding: 20px 0;
  }

  .result-header,
  .real-quote-reveal {
    width: 100%;
    max-width: 700px;
  }
}

/* ===== SOUND FAB & PANEL ===== */
.sound-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  letter-spacing: 0;
}

.sound-fab:hover {
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.12);
  box-shadow: 0 6px 24px rgba(240, 192, 64, 0.25);
}

.sound-fab:active {
  transform: scale(0.9);
}

/* 音量パネル: デフォルトは非表示 */
.sound-panel {
  position: fixed;
  bottom: 76px;
  right: 16px;
  z-index: 9998;
  background: rgba(17, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  /* 初期非表示 */
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sound-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sound-panel-title {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sound-toggle-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.sound-toggle-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 192, 64, 0.08);
}

.sound-toggle-btn.sound-off {
  color: var(--text-dim);
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--surface);
}

/* BGMボタン + スライダーの横並び */
.volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-row .sound-toggle-btn {
  flex-shrink: 0;
  width: auto;
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* 音量スライダー */
.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(240, 192, 64, 0.5);
  transition: transform 0.15s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(240, 192, 64, 0.5);
}

/* 音量数値表示 */
.volume-val {
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--text-dim);
  min-width: 24px;
  text-align: right;
}


/* ===== MODAL (準備中ポップアップ) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInBg 0.25s ease;
}

@keyframes fadeInBg {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--surface);
  border: 1px solid rgba(240, 192, 64, 0.3);
  border-radius: 20px;
  padding: 36px 28px;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(240, 192, 64, 0.08);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.4);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(12px);
  }

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

.modal-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.modal-title {
  font-family: var(--font-ja);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  width: 100%;
}