:root {
  --bg-deep: #241038;
  --bg-table: #185c47;
  --bg-table-light: #227b5f;
  --accent-pink: #ff4d94;
  --accent-pink-light: #ff85b3;
  --accent-gold: #ffd13b;
  --accent-cyan: #2de2e6;
  --anime-border: #1f102b;
  --card-white: #fffdf9;
  --text-dark: #251330;
  --font-main: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Yu Gothic UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background: radial-gradient(circle at 50% 35%, #4a1e6b 0%, #1c0b2b 100%);
  color: #fff;
}

.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ==================== トップバー ==================== */
.top-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  background: linear-gradient(90deg, #2b1045 0%, #461766 50%, #2b1045 100%);
  border-bottom: 3px solid var(--anime-border);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid var(--anime-border);
  box-shadow: 2px 2px 0 var(--anime-border);
}

.logo-area h1 {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 2px 2px 0 var(--anime-border);
}

.top-stats {
  display: flex;
  gap: 12px;
}

.stat-pill {
  background: #180926;
  border: 2px solid var(--accent-gold);
  border-radius: 999px;
  padding: 2px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 0 var(--anime-border);
}

.stat-pill .label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.stat-pill .value {
  font-size: 0.96rem;
  font-weight: 900;
  color: #fff;
}

.top-controls {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: #fff;
  color: var(--text-dark);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 10px;
  border: 2.5px solid var(--anime-border);
  box-shadow: 0 3px 0 var(--anime-border);
  cursor: pointer;
  transition: transform 0.1s;
}

.icon-btn:hover {
  transform: translateY(-2px);
  background: #ffeef6;
}

.icon-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--anime-border);
}

/* ==================== メインテーブル ==================== */
.table-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 18px 10px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(45, 226, 230, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 55%, var(--bg-table-light) 0%, var(--bg-table) 62%, #0e382b 100%);
  border: 5px solid #4d2614;
  border-radius: 26px;
  margin: 5px 12px;
  box-shadow:
    inset 0 0 0 3px #d99b38,
    inset 0 0 30px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* ==================== CPU ライバル席 ==================== */
.cpu-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  z-index: 10;
}

.cpu-seat {
  position: relative;
  background: rgba(24, 11, 38, 0.82);
  border: 2.5px solid var(--anime-border);
  border-radius: 14px;
  padding: 5px 10px 5px 108px; /* 左側を大きな顔アイコン用に空ける */
  min-height: 118px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.18s, border-color 0.2s;
}

.cpu-seat.exchanging {
  border-color: var(--accent-cyan);
  transform: translateY(2px) scale(1.015);
  box-shadow: 0 0 14px rgba(45, 226, 230, 0.5);
}

.cpu-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cpu-portrait {
  /* 席の左側いっぱいに大きく表示する */
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 90px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  object-position: 50% 15%;
  /* 全身画像を小さく縮めると顔が潰れるため、顔から胸元あたりを切り出して表示する */
  object-view-box: inset(6% 16% 44% 16%);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 2px 0 var(--anime-border);
  flex-shrink: 0;
}

.cpu-info {
  flex: 1;
  min-width: 0;
}

.cpu-name {
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpu-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpu-change-badge {
  background: #351a52;
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.cpu-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
}

.cpu-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  transition: width 0.1s linear;
}

.cpu-cards {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 1px;
  min-height: 42px;
}

.mini-card {
  width: 31px;
  height: 42px;
  border-radius: 5px;
  border: 2px solid var(--anime-border);
  background: repeating-linear-gradient(
    45deg,
    #ff4d94,
    #ff4d94 5px,
    #ff7eb3 5px,
    #ff7eb3 10px
  );
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.7rem;
  transition: transform 0.2s, background 0.2s;
  position: relative;
}

.mini-card.face-up {
  background: var(--card-white);
  color: var(--text-dark);
}

.mini-card.face-up.red {
  color: #e6194b;
}

.mini-card.face-up.joker {
  background: linear-gradient(135deg, #fff6b7, #f6416c);
  color: #fff;
  text-shadow: 1px 1px 0 var(--anime-border);
}

.mini-card.swapping {
  animation: miniCardSwap 0.36s ease;
}

@keyframes miniCardSwap {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(12px) scale(0.75) rotate(12deg); opacity: 0.4; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.cpu-hand-result {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 900;
  background: var(--accent-gold);
  color: var(--text-dark);
  border-radius: 6px;
  padding: 1px 6px;
  border: 2px solid var(--anime-border);
}

/* ==================== センターステージ（ディーラー＆山札） ==================== */
.center-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 12;
  padding: 2px 8px;
}

.dealer-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.dealer-character {
  position: relative;
  /* 画面の高さに余裕がある時だけ大きく表示（元画像は 896×1200 なので縦横比 3:4）。
     720px前後の画面では手札やボタンが押し出されないよう従来の176pxのまま */
  height: clamp(176px, calc(100vh - 610px), 290px);
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  border: 3.5px solid var(--anime-border);
  background: radial-gradient(circle at 50% 35%, #ff99c8 0%, #6b21a8 100%);
  box-shadow:
    0 5px 0 var(--anime-border),
    0 0 20px rgba(255, 77, 148, 0.45);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dealer-character.deal-bounce {
  animation: dealerBounce 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dealerBounce {
  0% { transform: scale(1) translateY(0); }
  45% { transform: scale(1.07) translateY(-6px) rotate(-1.5deg); }
  100% { transform: scale(1) translateY(0); }
}

#dealer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.dealer-name-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(24, 11, 38, 0.88);
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-align: center;
  padding: 2px 6px;
  border-top: 2px solid var(--accent-gold);
}

/* アニメ調吹き出し */
.speech-bubble {
  position: relative;
  background: #ffffff;
  color: var(--text-dark);
  border: 3px solid var(--anime-border);
  border-radius: 18px;
  padding: 10px 15px;
  width: 280px;
  box-shadow: 4px 5px 0 var(--anime-border);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 9px 15px 9px 0;
  border-style: solid;
  border-color: transparent var(--anime-border) transparent transparent;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 7px 11px 7px 0;
  border-style: solid;
  border-color: transparent #ffffff transparent transparent;
}

.speech-bubble.pop {
  animation: bubblePop 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bubblePop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

#dealer-text {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.42;
  color: var(--text-dark);
}

/* ==================== 山札（デッキ）ハブ ==================== */
.deck-hub {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 8, 30, 0.74);
  border: 3px solid var(--anime-border);
  border-radius: 18px;
  padding: 10px 16px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.4);
}

.deck-visual-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.deck-stack {
  position: relative;
  width: 62px;
  height: 86px;
}

.deck-card-back {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  border: 2.5px solid var(--anime-border);
  background: repeating-linear-gradient(
    -45deg,
    #ff4d94,
    #ff4d94 7px,
    #ff85b3 7px,
    #ff85b3 14px
  );
  box-shadow: 0 4px 0 var(--anime-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-card-back.layer-3 { transform: translate(5px, 5px); }
.deck-card-back.layer-2 { transform: translate(2.5px, 2.5px); }
.deck-card-back.layer-1 { transform: translate(0, 0); }

.deck-emblem {
  background: #fff;
  color: var(--anime-border);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 5px;
  border: 2px solid var(--anime-border);
}

.deck-counter-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 108px;
}

.deck-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.deck-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.deck-count {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 2px 3px 0 var(--anime-border);
}

.deck-count.danger {
  color: #ff4757;
  animation: pulseDanger 0.55s infinite alternate;
}

@keyframes pulseDanger {
  from { transform: scale(1); }
  to { transform: scale(1.14); }
}

.deck-unit {
  font-size: 0.85rem;
  font-weight: 800;
}

.deck-bar-bg {
  width: 100%;
  height: 9px;
  background: #12061c;
  border-radius: 99px;
  border: 2px solid var(--anime-border);
  overflow: hidden;
}

.deck-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2de2e6, #ffd13b);
  transition: width 0.2s ease;
}

.trash-pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-left: 12px;
  border-left: 2px dashed rgba(255, 255, 255, 0.25);
}

.trash-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #ccc;
}

.trash-cards {
  position: relative;
  width: 50px;
  height: 68px;
  border-radius: 7px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trash-card-visual {
  position: absolute;
  width: 42px;
  height: 58px;
  background: var(--card-white);
  border: 2px solid var(--anime-border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--text-dark);
  box-shadow: 1px 2px 4px rgba(0,0,0,0.4);
}

/* ==================== プレイヤーエリア（カードを大きく表示！） ==================== */
.player-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 15;
  background: linear-gradient(180deg, rgba(24, 10, 38, 0.6) 0%, rgba(24, 10, 38, 0.92) 100%);
  border: 3px solid var(--anime-border);
  border-radius: 22px;
  padding: 10px 22px 12px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45);
}

.player-info-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-hand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1c0b2b;
  border: 2.5px solid var(--accent-gold);
  padding: 4px 16px;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--anime-border);
}

.hand-rank-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.hand-rank-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 209, 59, 0.6);
}

.key-hint {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f3e8ff;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 14px;
  border-radius: 999px;
}

kbd {
  background: #fff;
  color: var(--text-dark);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 900;
  border: 1.5px solid var(--anime-border);
}

.player-change-count {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

/* プレイヤーの手札5枚（大判サイズ） */
.player-cards-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 6px 0 4px;
  min-height: 196px;
  align-items: center;
}

.playing-card {
  position: relative;
  width: 138px;
  height: 190px;
  background: var(--card-white);
  border: 4px solid var(--anime-border);
  border-radius: 16px;
  box-shadow: 0 7px 0 var(--anime-border), 0 10px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 13px;
  color: var(--text-dark);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s, border-color 0.16s;
}

.playing-card:hover {
  transform: translateY(-10px);
}

.playing-card.red {
  color: #e6194b;
}

.playing-card.joker-card {
  background: linear-gradient(145deg, #fff8d6 0%, #ffd1dc 50%, #e0c3fc 100%);
  color: #6b21a8;
}

/* 捨てる選択状態 */
.playing-card.selected {
  transform: translateY(-26px) rotate(-2deg);
  border-color: var(--accent-pink);
  background: #fff0f6;
  box-shadow:
    0 14px 0 var(--anime-border),
    0 0 24px rgba(255, 77, 148, 0.9);
}

.playing-card.selected::after {
  content: 'チェンジ選択中';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 2px 11px;
  border-radius: 999px;
  border: 2px solid var(--anime-border);
  box-shadow: 0 2px 0 var(--anime-border);
  white-space: nowrap;
}

.card-corner-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.card-rank {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.card-suit-small {
  font-size: 1.3rem;
  margin-top: 2px;
}

.card-center-suit {
  font-size: 3.9rem;
  align-self: center;
  line-height: 1;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.08));
}

.card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-key-badge {
  background: #eee7f8;
  color: #553c7b;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1.5px solid #bda8db;
}

.playing-card.dealing-in {
  animation: cardDealIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 開始時の配布：まだ配られていないカードの置き場所（見えない） */
.card-slot-empty {
  visibility: hidden;
}

/* 開始時の配布：ディーラーから飛んできたカードがその場に置かれる */
.playing-card.deal-land,
.mini-card.deal-land {
  animation: cardDealLand 0.16s ease-out;
}

@keyframes cardDealLand {
  0% {
    opacity: 0.4;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cardDealIn {
  0% {
    opacity: 0;
    transform: translateY(-90px) scale(0.5) rotate(12deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

/* ==================== アクションボタン ==================== */
.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-action-btn {
  background: #381d54;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 14px;
  border: 3px solid var(--anime-border);
  box-shadow: 0 4px 0 var(--anime-border);
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.sub-action-btn:hover:not(:disabled) {
  background: #4e2a73;
  transform: translateY(-2px);
}

.sub-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.main-exchange-btn {
  background: linear-gradient(180deg, #ff66a3 0%, #ff2e7e 100%);
  color: #fff;
  font-family: var(--font-main);
  padding: 7px 32px;
  border-radius: 16px;
  border: 3.5px solid var(--anime-border);
  box-shadow: 0 5px 0 var(--anime-border), 0 0 18px rgba(255, 77, 148, 0.6);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 290px;
  transition: transform 0.1s, filter 0.15s;
}

.main-exchange-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.08);
}

.main-exchange-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--anime-border);
}

.main-exchange-btn:disabled {
  background: #5c4b6b;
  box-shadow: 0 4px 0 var(--anime-border);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-main-text {
  font-size: 1.08rem;
  font-weight: 900;
  text-shadow: 1px 2px 0 var(--anime-border);
}

.btn-sub-text {
  font-size: 0.74rem;
  font-weight: 800;
  color: #ffe3ef;
}

.showdown-btn {
  margin-left: 20px; /* チェンジボタンとの誤爆を防ぐため少し離す */
  background: linear-gradient(180deg, #ffd13b 0%, #ff9500 100%);
  color: var(--text-dark);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 900;
  padding: 11px 18px;
  border-radius: 14px;
  border: 3px solid var(--anime-border);
  box-shadow: 0 5px 0 var(--anime-border);
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s;
}

.showdown-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}

.showdown-btn.confirming {
  background: linear-gradient(180deg, #ff6b6b 0%, #e6194b 100%);
  color: #fff;
  animation: showdown-confirm-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes showdown-confirm-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.showdown-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ディーラーから飛んでいくカードアニメーション */
.flying-card {
  position: fixed;
  width: 60px;
  height: 84px;
  border-radius: 8px;
  border: 2.5px solid var(--anime-border);
  background: repeating-linear-gradient(
    -45deg,
    #ff4d94,
    #ff4d94 6px,
    #ff85b3 6px,
    #ff85b3 12px
  );
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  z-index: 80;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

/* ゲーム開始時のカウントダウン */
.countdown-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 5, 26, 0.35);
  z-index: 90;
  pointer-events: none;
}

.countdown-number {
  font-family: var(--font-main);
  font-size: 9rem;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 6px var(--anime-border);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--anime-border), 0 0 40px rgba(255, 77, 148, 0.8);
}

.countdown-number.go {
  color: var(--accent-gold);
  font-size: 7rem;
}

.countdown-number.pop {
  animation: countdownPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countdownPop {
  0% { transform: scale(2.2); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  80% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

/* ==================== オーバーレイ＆モーダル共通 ==================== */
.overlay-screen {
  position: fixed;
  inset: 0;
  background: rgba(15, 5, 26, 0.84);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.modal-card {
  background: linear-gradient(180deg, #341552 0%, #1f0b33 100%);
  border: 4px solid var(--accent-gold);
  border-radius: 26px;
  padding: 22px 28px;
  max-width: 650px;
  width: 100%;
  box-shadow: 0 10px 0 var(--anime-border), 0 0 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 92vh;
  overflow-y: auto;
}

/* ホーム画面ヒーロー */
.home-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 18px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.home-dealer-thumb {
  width: 96px;
  height: 120px;
  object-fit: cover;
  object-position: center top;
  object-view-box: inset(4% 14% 38% 14%); /* 上半身を切り出して表示 */
  border-radius: 14px;
  border: 3px solid var(--anime-border);
  flex-shrink: 0;
  box-shadow: 0 4px 0 var(--anime-border);
}

.home-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-badge {
  align-self: flex-start;
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 999px;
  border: 2px solid var(--anime-border);
}

.modal-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 2px 3px 0 var(--anime-border);
}

.modal-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #f3e8ff;
}

.modal-desc strong {
  color: var(--accent-cyan);
}

.home-actions, .result-actions {
  display: flex;
  gap: 12px;
}

.secondary-modal-btn {
  flex: 1;
  background: #3d1e5e;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.96rem;
  font-weight: 900;
  padding: 12px 18px;
  border-radius: 16px;
  border: 3px solid var(--anime-border);
  box-shadow: 0 5px 0 var(--anime-border);
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}

.secondary-modal-btn:hover {
  background: #532a7d;
  transform: translateY(-2px);
}

.start-game-btn {
  flex: 1.4;
  background: linear-gradient(180deg, #ffd13b 0%, #ff9f1a 100%);
  color: var(--text-dark);
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 900;
  padding: 12px 22px;
  border-radius: 16px;
  border: 3.5px solid var(--anime-border);
  box-shadow: 0 6px 0 var(--anime-border);
  cursor: pointer;
  transition: transform 0.12s;
}

.start-game-btn:hover {
  transform: translateY(-3px) scale(1.01);
}

.start-game-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--anime-border);
}

/* ==================== リザルト画面 ==================== */
.result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: rgba(0, 0, 0, 0.28);
  padding: 12px 16px;
  border-radius: 18px;
}

.result-dealer-thumb {
  width: 82px;
  height: 102px;
  object-fit: cover;
  object-position: center top;
  object-view-box: inset(4% 14% 38% 14%); /* 上半身を切り出して表示 */
  border-radius: 14px;
  border: 3px solid var(--anime-border);
  flex-shrink: 0;
}

.result-comment {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
  line-height: 1.45;
}

.result-ranking {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  font-weight: 800;
}

.rank-item.is-player {
  background: rgba(255, 77, 148, 0.28);
  border: 2px solid var(--accent-pink);
}

.rank-item.winner {
  background: linear-gradient(90deg, rgba(255, 209, 59, 0.35), rgba(255, 77, 148, 0.35));
  border: 2px solid var(--accent-gold);
}

.rank-cards-mini {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.rank-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.rank-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rank-hand {
  color: var(--accent-gold);
  white-space: nowrap;
}

/* チェンジ回数は途中で改行されないよう小さなバッジにまとめる */
.rank-changes {
  font-size: 0.72rem;
  color: #ddd;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 設定パネル */
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px;
  border-radius: 16px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.setting-group label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.radio-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  flex: 1;
  background: #25103a;
  color: #ccc;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 10px;
  border: 2px solid var(--anime-border);
  cursor: pointer;
  transition: all 0.15s;
}

.pill-btn.active {
  background: var(--accent-cyan);
  color: var(--text-dark);
  border-color: #fff;
  box-shadow: 0 3px 0 var(--anime-border);
}

/* ==================== 役・数字の強さ説明モーダル（カード絵柄付き） ==================== */
.rules-card {
  max-width: 820px;
  text-align: left;
}

.rules-dealer-guide {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  border-radius: 18px;
  border: 2px solid rgba(255, 209, 59, 0.45);
}

.guide-dealer-avatar {
  width: 78px;
  height: 98px;
  object-fit: cover;
  object-position: center top;
  object-view-box: inset(4% 14% 38% 14%); /* 上半身を切り出して表示 */
  border-radius: 14px;
  border: 3px solid var(--anime-border);
  flex-shrink: 0;
}

.guide-bubble {
  flex: 1;
  background: #fff;
  color: var(--text-dark);
  border-radius: 14px;
  padding: 10px 14px;
  border: 2.5px solid var(--anime-border);
  box-shadow: 3px 4px 0 var(--anime-border);
}

.guide-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--accent-pink);
  margin-bottom: 4px;
}

#guide-speech {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.section-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ddd;
}

/* 数字の強さ順ストリップ */
.strength-section {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.rank-order-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 2px;
}

.rank-step-arrow {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.strength-note {
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #f3e8ff;
}

.strength-note strong {
  color: var(--accent-cyan);
}

/* 説明用の視覚カード絵柄 */
.sample-card {
  width: 38px;
  height: 52px;
  background: var(--card-white);
  border: 2px solid var(--anime-border);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px;
  color: var(--text-dark);
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  position: relative;
}

.sample-card.red {
  color: #e6194b;
}

.sample-card.joker {
  background: linear-gradient(145deg, #fff8d6 0%, #ffd1dc 50%, #e0c3fc 100%);
  color: #6b21a8;
  border-color: var(--accent-gold);
}

.sample-card.highlight {
  border-color: var(--accent-pink);
  box-shadow: 0 3px 0 var(--anime-border), 0 0 10px rgba(255, 77, 148, 0.75);
  transform: translateY(-2px);
}

.sample-card.dim {
  opacity: 0.55;
}

.sample-card .sc-rank {
  font-size: 0.78rem;
  line-height: 1;
  align-self: flex-start;
}

.sample-card .sc-suit {
  font-size: 1.15rem;
  line-height: 1;
}

/* ミニカードではJOKERの文字を縮めて枠に収める */
.sample-card.joker .sc-rank {
  font-size: 0.5rem;
  letter-spacing: -0.03em;
}

/* ルール画面：プレイ中に開いた時の一時停止表示 */
.rules-pause-note {
  background: rgba(45, 226, 230, 0.15);
  border: 2px solid var(--accent-cyan);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 12px;
  text-align: center;
}

/* 役一覧リスト */
.hands-section {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

/* 強さの順が一目で分かるよう1列で並べる */
.hands-visual-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.strength-arrow {
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  margin: 4px 0;
}

.strength-arrow.strong {
  color: var(--accent-gold);
}

.strength-arrow.weak {
  color: #a78bbd;
}

/* 強さの順位バッジ */
.hvi-order {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: #d8c7ea;
}

.hand-visual-item.strongest {
  border-color: var(--accent-gold);
  background: rgba(255, 209, 59, 0.14);
}

.hand-visual-item.strongest .hvi-order {
  background: linear-gradient(180deg, #ffd13b 0%, #ff9500 100%);
}

.hand-visual-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hand-visual-item:hover {
  background: rgba(255, 77, 148, 0.18);
  border-color: var(--accent-gold);
}

.hvi-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.hvi-name {
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.hvi-desc {
  font-size: 0.72rem;
  color: #e9d5ff;
  line-height: 1.3;
}

.hvi-cards {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

/* =====================================================================
   高級カジノ テーマ（黒・深緑のフェルト・金の細線）
   ここから下は上のスタイルを上書きしている。元の見た目に戻す時はこのブロックを消す。
   ===================================================================== */
:root {
  --lux-ink: #0a0a0c;
  --lux-panel: rgba(10, 12, 14, 0.78);
  --lux-panel-solid: #111316;
  --lux-gold: #c9a45c;
  --lux-gold-light: #ecd9a4;
  --lux-gold-dark: #8a6a2f;
  --lux-gold-line: rgba(201, 164, 92, 0.55);
  --lux-gold-faint: rgba(201, 164, 92, 0.22);
  --lux-ivory: #f3ead7;
  --lux-muted: #a99f8c;
  --lux-wine: #6e1424;
  --lux-wine-light: #8f1d31;
  --lux-felt: #0f3b2c;
  --lux-felt-dark: #05211a;
  --lux-metal: linear-gradient(180deg, #f1dfa8 0%, #d2b06a 45%, #a7813e 100%);
  --font-main: 'Zen Kaku Gothic New', 'Yu Gothic UI', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-serif: 'Shippori Mincho B1', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  --font-display: 'Cinzel', 'Shippori Mincho B1', serif;
  /* 既存の色変数も落ち着いた色に寄せる */
  --accent-gold: #c9a45c;
  --accent-cyan: #d9c48f;
  --accent-pink: #8f1d31;
  --anime-border: #050506;
}

body, html {
  background: radial-gradient(ellipse at 50% 30%, #1b1c20 0%, #070708 75%);
  color: var(--lux-ivory);
  font-weight: 500;
}

/* ---- 共通：ボタンの基本形（細い金線・影は控えめ） ---- */
.icon-btn,
.sub-action-btn,
.secondary-modal-btn,
.pill-btn {
  background: rgba(255, 255, 255, 0.02);
  color: var(--lux-ivory);
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--lux-gold-line);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.icon-btn:hover,
.sub-action-btn:hover:not(:disabled),
.secondary-modal-btn:hover,
.pill-btn:hover {
  background: rgba(201, 164, 92, 0.1);
  border-color: var(--lux-gold);
  color: var(--lux-gold-light);
  transform: none;
}

.icon-btn:active,
.sub-action-btn:active:not(:disabled),
.secondary-modal-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* 主ボタン：金属的なゴールド */
.start-game-btn,
.main-exchange-btn:not(:disabled) {
  background: var(--lux-metal);
  color: #1a1408;
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.12em;
  border: 1px solid #f6e7bd;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--lux-gold-dark);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
}

.start-game-btn:hover,
.main-exchange-btn:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.start-game-btn:active,
.main-exchange-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--lux-gold-dark);
}

.main-exchange-btn:disabled {
  background: #15171a;
  color: var(--lux-muted);
  border: 1px solid rgba(201, 164, 92, 0.25);
  border-radius: 4px;
  box-shadow: none;
  font-family: var(--font-serif);
  letter-spacing: 0.12em;
  opacity: 1;
}

.main-exchange-btn .btn-sub-text {
  color: inherit;
  opacity: 0.75;
  font-family: var(--font-main);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.main-exchange-btn:not(:disabled) .btn-sub-text {
  color: #3a2d12;
}

.sub-action-btn:disabled {
  opacity: 0.35;
}

/* 勝負ボタン：ワインレッドの漆塗り＋金縁 */
.showdown-btn {
  background: linear-gradient(180deg, #8f1d31 0%, #5a0f1c 100%);
  color: var(--lux-ivory);
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.12em;
  border: 1px solid var(--lux-gold);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 6px 16px rgba(0, 0, 0, 0.45);
}

.showdown-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.showdown-btn.confirming {
  background: linear-gradient(180deg, #b3243c 0%, #7a1426 100%);
  color: #fff;
  border-color: var(--lux-gold-light);
  box-shadow: 0 0 0 1px var(--lux-gold-light), 0 0 18px rgba(179, 36, 60, 0.6);
}

/* ---- トップバー ---- */
.top-bar {
  background: linear-gradient(180deg, #121316 0%, #0a0a0c 100%);
  border-bottom: 1px solid var(--lux-gold-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}

.logo-badge {
  background: transparent;
  color: var(--lux-gold);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.2em;
  border: 1px solid var(--lux-gold-line);
  border-radius: 2px;
  box-shadow: none;
}

.logo-area h1 {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.18em;
  background: var(--lux-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.stat-pill {
  background: transparent;
  border: 1px solid var(--lux-gold-faint);
  border-radius: 2px;
  box-shadow: none;
}

.stat-pill .label {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  color: var(--lux-gold);
  font-weight: 700;
}

.stat-pill .value {
  font-family: var(--font-display);
  color: var(--lux-ivory);
  font-weight: 700;
}

.icon-btn {
  font-size: 0.76rem;
  padding: 5px 14px;
}

/* ---- テーブル（深緑のフェルト＋木枠＋金の細線） ---- */
.table-area {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, var(--lux-felt) 0%, var(--lux-felt-dark) 100%);
  border: 6px solid #1c120b;
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px var(--lux-gold-line),
    inset 0 0 60px rgba(0, 0, 0, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.7);
}

/* ---- ライバル席 ---- */
.cpu-seat {
  background: var(--lux-panel);
  border: 1px solid var(--lux-gold-faint);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.cpu-seat.exchanging {
  border-color: var(--lux-gold);
  box-shadow: 0 0 14px rgba(201, 164, 92, 0.35);
}

.cpu-portrait {
  border: 1px solid var(--lux-gold-line);
  border-radius: 4px;
  box-shadow: none;
}

.cpu-name {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lux-ivory);
}

.cpu-status {
  color: var(--lux-muted);
  font-weight: 500;
}

.cpu-change-badge {
  background: transparent;
  border: 1px solid var(--lux-gold-faint);
  color: var(--lux-gold);
  border-radius: 2px;
  font-weight: 700;
}

.cpu-progress-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.cpu-progress-fill {
  background: linear-gradient(90deg, var(--lux-gold-dark), var(--lux-gold-light));
}

.cpu-hand-result {
  background: transparent;
  color: var(--lux-gold-light);
  border: 1px solid var(--lux-gold-line);
  border-radius: 2px;
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
}

/* ---- カードの裏面（ワインレッド＋金の細かい格子） ---- */
.mini-card:not(.face-up),
.deck-card-back,
.flying-card {
  background:
    repeating-linear-gradient(45deg, rgba(201, 164, 92, 0.22) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, rgba(201, 164, 92, 0.22) 0 1px, transparent 1px 6px),
    linear-gradient(160deg, #7a1628 0%, #4a0b17 100%);
  border: 1px solid var(--lux-gold);
  box-shadow: inset 0 0 0 2px #2a0710, 0 3px 8px rgba(0, 0, 0, 0.5);
}

.mini-card {
  border-radius: 3px;
}

.mini-card.face-up {
  background: #fbf8f1;
  border: 1px solid #cfc4ad;
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mini-card.face-up.red {
  color: #9b1b30;
}

.mini-card.face-up.joker {
  background: linear-gradient(160deg, #fbf8f1 0%, #ead9ad 100%);
  color: #6b4b12;
  text-shadow: none;
}

.deck-emblem {
  background: #0d0e10;
  color: var(--lux-gold);
  border: 1px solid var(--lux-gold-line);
  border-radius: 2px;
}

/* ---- ディーラー ---- */
.dealer-character {
  border: 1px solid var(--lux-gold);
  border-radius: 6px;
  background: #0d0e10;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45), 0 12px 28px rgba(0, 0, 0, 0.55);
}

.dealer-name-tag {
  background: rgba(8, 8, 10, 0.85);
  color: var(--lux-gold);
  font-family: var(--font-display);
  letter-spacing: 0.35em;
  border-top: 1px solid var(--lux-gold-line);
}

.speech-bubble {
  background: rgba(12, 13, 15, 0.92);
  color: var(--lux-ivory);
  border: 1px solid var(--lux-gold-line);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.speech-bubble::before {
  border-color: transparent var(--lux-gold-line) transparent transparent;
}

.speech-bubble::after {
  left: -9px;
  border-color: transparent #0c0d0f transparent transparent;
}

#dealer-text {
  color: var(--lux-ivory);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---- 山札・捨て札 ---- */
.deck-hub {
  background: var(--lux-panel);
  border: 1px solid var(--lux-gold-faint);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.deck-label,
.trash-label {
  color: var(--lux-gold);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.deck-count {
  font-family: var(--font-display);
  color: var(--lux-ivory);
  text-shadow: none;
}

.deck-count.danger {
  color: #d4485e;
}

.deck-bar-bg {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
}

.deck-bar-fill {
  background: linear-gradient(90deg, var(--lux-gold-dark), var(--lux-gold-light));
}

.trash-pile {
  border-left: 1px solid var(--lux-gold-faint);
}

.trash-cards {
  border: 1px dashed var(--lux-gold-faint);
}

.trash-card-visual {
  background: #fbf8f1;
  border: 1px solid #cfc4ad;
  color: #1a1a1a;
}

/* ---- プレイヤーエリア ---- */
.player-area {
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.55) 0%, rgba(8, 9, 11, 0.88) 100%);
  border: 1px solid var(--lux-gold-faint);
  border-radius: 10px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.player-hand-badge {
  background: transparent;
  border: 1px solid var(--lux-gold-line);
  border-radius: 2px;
  box-shadow: none;
}

.hand-rank-label {
  color: var(--lux-gold);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hand-rank-name {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--lux-gold-light);
  text-shadow: none;
}

.key-hint {
  background: transparent;
  color: var(--lux-muted);
  font-weight: 500;
}

kbd {
  background: transparent;
  color: var(--lux-gold-light);
  border: 1px solid var(--lux-gold-line);
  border-radius: 2px;
  font-family: var(--font-main);
  font-weight: 700;
}

.player-change-count {
  color: var(--lux-muted);
  font-weight: 500;
}

.player-change-count strong {
  color: var(--lux-ivory);
}

/* ---- 手札のカード（象牙色の上質紙） ---- */
.playing-card {
  background: linear-gradient(170deg, #fdfbf6 0%, #f2ecdf 100%);
  border: 1px solid #d9cfb9;
  border-radius: 10px;
  color: #17171a;
  box-shadow:
    inset 0 0 0 4px #fdfbf6,
    inset 0 0 0 5px rgba(201, 164, 92, 0.45),
    0 10px 24px rgba(0, 0, 0, 0.45);
}

.playing-card.red {
  color: #9b1b30;
}

.playing-card.joker-card {
  background: linear-gradient(170deg, #fdfbf6 0%, #ecdcb2 100%);
  color: #6b4b12;
}

.card-rank {
  font-family: var(--font-serif);
  font-weight: 800;
}

.card-key-badge {
  background: transparent;
  color: #8a7d64;
  border: 1px solid #d9cfb9;
  border-radius: 2px;
  font-weight: 700;
}

.playing-card.selected {
  transform: translateY(-22px);
  background: linear-gradient(170deg, #fdfbf6 0%, #efe5cf 100%);
  border-color: var(--lux-gold);
  box-shadow:
    inset 0 0 0 4px #fdfbf6,
    inset 0 0 0 5px var(--lux-gold),
    0 0 0 1px var(--lux-gold),
    0 0 22px rgba(201, 164, 92, 0.55),
    0 16px 28px rgba(0, 0, 0, 0.5);
}

.playing-card.selected::after {
  background: #0d0e10;
  color: var(--lux-gold-light);
  border: 1px solid var(--lux-gold);
  border-radius: 2px;
  box-shadow: none;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ---- モーダル（ホーム・リザルト・ルール） ---- */
.overlay-screen {
  background: rgba(4, 4, 6, 0.82);
}

.modal-card {
  background: linear-gradient(180deg, #141518 0%, #0b0b0d 100%);
  border: 1px solid var(--lux-gold-line);
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 6px #0b0b0d,
    inset 0 0 0 7px var(--lux-gold-faint),
    0 30px 80px rgba(0, 0, 0, 0.8);
}

.home-hero,
.settings-panel,
.result-ranking,
.strength-section,
.hands-section,
.rules-dealer-guide {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lux-gold-faint);
  border-radius: 4px;
}

.home-dealer-thumb,
.result-dealer-thumb,
.guide-dealer-avatar {
  border: 1px solid var(--lux-gold-line);
  border-radius: 4px;
  box-shadow: none;
}

.modal-badge {
  background: transparent;
  color: var(--lux-gold);
  border: 1px solid var(--lux-gold-line);
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.modal-title {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--lux-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.modal-desc {
  color: var(--lux-ivory);
  font-weight: 500;
}

.modal-desc strong {
  color: var(--lux-gold-light);
}

.setting-group label {
  color: var(--lux-gold);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pill-btn {
  color: var(--lux-muted);
  font-weight: 500;
}

.pill-btn.active {
  background: rgba(201, 164, 92, 0.14);
  color: var(--lux-gold-light);
  border-color: var(--lux-gold);
  box-shadow: inset 0 0 0 1px rgba(201, 164, 92, 0.35);
  font-weight: 700;
}

.result-comment {
  color: var(--lux-ivory);
  font-family: var(--font-serif);
}

.rank-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 600;
}

.rank-item.is-player {
  background: rgba(110, 20, 36, 0.35);
  border: 1px solid rgba(143, 29, 49, 0.9);
}

.rank-item.winner {
  background: linear-gradient(90deg, rgba(201, 164, 92, 0.18), rgba(201, 164, 92, 0.04));
  border: 1px solid var(--lux-gold);
}

.rank-hand {
  color: var(--lux-gold-light);
  font-family: var(--font-serif);
}

.rank-changes {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  color: var(--lux-muted);
}

/* ルール画面 */
.guide-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lux-gold-faint);
  border-radius: 4px;
  color: var(--lux-ivory);
  box-shadow: none;
}

.guide-title,
.section-heading {
  color: var(--lux-gold);
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
}

#guide-speech {
  color: var(--lux-ivory);
}

.section-sub,
.strength-note {
  color: var(--lux-muted);
}

.strength-note strong {
  color: var(--lux-gold-light);
}

.rank-step-arrow {
  color: var(--lux-gold-dark);
}

.sample-card {
  background: #fbf8f1;
  border: 1px solid #cfc4ad;
  border-radius: 3px;
  color: #17171a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.sample-card.red {
  color: #9b1b30;
}

.sample-card.joker {
  background: linear-gradient(160deg, #fbf8f1 0%, #ead9ad 100%);
  color: #6b4b12;
  border-color: var(--lux-gold);
}

.sample-card.highlight {
  border-color: var(--lux-gold);
  box-shadow: 0 0 0 1px var(--lux-gold), 0 0 10px rgba(201, 164, 92, 0.55);
}

.sample-card.dim {
  opacity: 0.35;
}

.hand-visual-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.hand-visual-item:hover {
  background: rgba(201, 164, 92, 0.08);
  border-color: var(--lux-gold-line);
}

.hand-visual-item.strongest {
  background: rgba(201, 164, 92, 0.1);
  border-color: var(--lux-gold);
}

.hvi-name {
  color: var(--lux-gold-light);
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
}

.hvi-desc {
  color: var(--lux-muted);
}

.hvi-order {
  background: transparent;
  color: var(--lux-gold);
  border: 1px solid var(--lux-gold-line);
  font-family: var(--font-display);
}

.hand-visual-item.strongest .hvi-order {
  background: var(--lux-metal);
  color: #1a1408;
  border-color: #f6e7bd;
}

.strength-arrow.strong {
  color: var(--lux-gold);
}

.strength-arrow.weak {
  color: var(--lux-muted);
}

.rules-pause-note {
  background: rgba(201, 164, 92, 0.08);
  border: 1px solid var(--lux-gold-line);
  border-radius: 4px;
  color: var(--lux-ivory);
}

/* ---- カウントダウン ---- */
.countdown-overlay {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.countdown-number {
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--lux-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  text-shadow: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
  letter-spacing: 0.08em;
}

.countdown-number.go {
  font-size: 6rem;
  letter-spacing: 0.2em;
}

.rank-place {
  display: inline-block;
  min-width: 2.6em;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--lux-gold);
  letter-spacing: 0.08em;
}

.result-modal .modal-title {
  font-family: var(--font-display);
  letter-spacing: 0.25em;
}

/* チェンジボタンの文字：元の黒い影が金色の上で二重に見えてにじむため消す */
.main-exchange-btn .btn-main-text,
.main-exchange-btn:not(:disabled) {
  text-shadow: none;
}

/* ---- ジョーカー（象牙の紙に金縁、道化師の帽子の紋章） ---- */
.playing-card.joker-card {
  background: linear-gradient(170deg, #fdfbf6 0%, #f1e6c9 100%);
  color: #7a1628;
  box-shadow:
    inset 0 0 0 4px #fdfbf6,
    inset 0 0 0 5px var(--lux-gold),
    inset 0 0 0 7px #fdfbf6,
    inset 0 0 0 8px rgba(201, 164, 92, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.45);
}

.playing-card.joker-card.selected {
  background: linear-gradient(170deg, #fdfbf6 0%, #efe0bb 100%);
}

.joker-corner {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: #7a1628;
  writing-mode: vertical-rl;
  text-orientation: upright;
  position: absolute;
  top: 12px;
  left: 12px;
  line-height: 1;
}

.joker-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.joker-center .joker-emblem {
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.joker-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  background: var(--lux-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border-top: 1px solid rgba(201, 164, 92, 0.6);
  border-bottom: 1px solid rgba(201, 164, 92, 0.6);
  padding-top: 2px;
  padding-bottom: 2px;
}

.joker-wild {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #8a6a2f;
}

.mini-card.face-up.joker,
.sample-card.joker {
  background: linear-gradient(160deg, #fdfbf6 0%, #f1e6c9 100%);
  border-color: var(--lux-gold);
}

.sample-card.joker .sc-rank {
  font-family: var(--font-display);
  color: #7a1628;
  font-size: 0.42rem;
  letter-spacing: 0.06em;
}

.sample-card .sc-suit .joker-emblem,
.mini-card .joker-emblem,
.trash-card-visual .joker-emblem {
  display: block;
}

/* 一時停止中（ルール画面表示中）はカウントダウンのアニメーションも止める */
body.game-paused .countdown-number {
  animation-play-state: paused;
}

/* ==================== スマホ縦向き ==================== */
/* PCの配置のままだと手札とボタンが画面外に出るので、縦に詰めて1画面に収める */
@media (max-width: 600px) {
  .game-container {
    height: 100dvh;
    width: 100%;
  }

  .top-bar {
    padding: 4px 8px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .logo-badge { display: none; }
  .logo-area h1 { font-size: 0.95rem; }
  .top-stats { gap: 4px; }
  .stat-pill { padding: 2px 8px; }
  .top-controls { gap: 4px; }
  .icon-btn { padding: 4px 7px; font-size: 0.66rem; }

  .table-area {
    margin: 4px;
    padding: 5px;
    gap: 6px;
    border-width: 4px;
    border-radius: 12px;
    justify-content: space-between;
  }

  /* ライバル：顔を上、カードを下にして3人を1行に */
  .cpu-row { gap: 4px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cpu-seat {
    padding: 4px;
    min-height: 0;
    gap: 2px;
  }
  .cpu-header { gap: 4px; padding-right: 18px; }
  .cpu-portrait {
    position: static;
    width: 30px;
    height: 30px;
  }
  .cpu-name {
    font-size: 0.6rem;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cpu-status { font-size: 0.55rem; }
  .cpu-change-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 0.55rem;
    padding: 0 4px;
  }
  .cpu-cards { gap: 2px; min-height: 0; }
  .mini-card {
    width: 19px;
    height: 26px;
    border-width: 1px;
    border-radius: 3px;
    font-size: 0.5rem;
  }
  .mini-card .joker-emblem { width: 12px; height: 12px; }
  .cpu-hand-result { font-size: 0.55rem; }

  /* ディーラーと山札：上下に並べて小さく */
  .center-stage {
    flex-direction: column;
    gap: 6px;
    padding: 0;
  }
  .dealer-stage { width: 100%; gap: 10px; }
  .dealer-character {
    /* 背の高い画面では余った高さをディーラーに回す */
    height: clamp(84px, calc(100dvh - 620px), 160px);
    border-radius: 10px;
    border-width: 2px;
  }
  .dealer-name-tag { font-size: 0.5rem; }
  .speech-bubble {
    flex: 1;
    width: auto;
    padding: 6px 9px;
    border-radius: 10px;
  }
  #dealer-text { font-size: 0.72rem; line-height: 1.35; }

  .deck-hub {
    gap: 10px;
    padding: 4px 10px;
    border-radius: 10px;
  }
  .deck-visual-wrapper { gap: 8px; }
  .deck-stack { width: 30px; height: 42px; }
  .deck-card-back { border-radius: 4px; border-width: 1.5px; }
  .deck-emblem { font-size: 0.4rem; }
  .deck-label { font-size: 0.6rem; }
  .deck-count { font-size: 1.3rem; }
  .deck-bar-bg { width: 70px; }
  .trash-pile { padding-left: 8px; flex-direction: row; gap: 6px; }
  .trash-label { font-size: 0.6rem; }
  .trash-cards { width: 30px; height: 42px; }
  .trash-card-visual { width: 26px; height: 36px; font-size: 0.6rem; }
  .trash-card-visual .joker-emblem { width: 16px; height: 16px; }

  /* 自分の手札とボタン */
  .player-area {
    padding: 6px;
    gap: 6px;
    border-radius: 12px;
  }
  .player-info-bar { gap: 6px; }
  .player-hand-badge { padding: 2px 10px; gap: 6px; }
  .hand-rank-label { font-size: 0.6rem; }
  .hand-rank-name { font-size: 0.9rem; }
  .key-hint { display: none; } /* スマホにはキーボードがないので出さない */
  .player-change-count { font-size: 0.72rem; }

  .player-cards-row {
    gap: 5px;
    margin: 2px 0;
    min-height: 0;
    width: 100%;
  }
  .playing-card {
    flex: 1;
    width: auto;
    max-width: 72px;
    height: auto;
    aspect-ratio: 138 / 190;
    padding: 4px 5px;
    border-width: 2px;
    border-radius: 8px;
  }
  .card-rank { font-size: 1.05rem; }
  .card-suit-small { font-size: 0.75rem; margin-top: 0; }
  .card-center-suit { font-size: 1.9rem; }
  .card-key-badge { display: none; }
  .card-bottom-row { justify-content: flex-end; }
  .joker-corner { display: none; }
  .joker-center svg { width: 32px; height: 32px; }
  .joker-title { font-size: 0.5rem; letter-spacing: 0.1em; padding-left: 0.1em; }
  .joker-wild { font-size: 0.45rem; }

  .action-bar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .sub-action-btn {
    padding: 6px 4px;
    font-size: 0.72rem;
  }
  .sub-action-btn kbd { display: none; }
  .main-exchange-btn {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 6px 10px;
  }
  .showdown-btn {
    grid-column: 1 / -1;
    margin-left: 0;
    margin-top: 4px; /* チェンジボタンとの押し間違いを防ぐ */
    padding: 8px;
  }

  /* ホーム・結果・ルール画面 */
  .overlay-screen { padding: 8px; }
  .modal-card {
    padding: 14px 12px;
    gap: 10px;
    border-radius: 14px;
    max-height: calc(100dvh - 16px);
  }
  .home-hero { padding: 10px; gap: 10px; }
  .home-dealer-thumb { width: 64px; height: 80px; }
  .modal-title { font-size: 1.4rem; }
  .modal-desc { font-size: 0.8rem; }
  .pill-btn { padding: 6px 4px; font-size: 0.7rem; }
  .rank-item { padding: 6px 8px; font-size: 0.74rem; gap: 6px; }
  .rank-info { min-width: 0; }
  .rank-meta-line { flex-wrap: wrap; gap: 2px 4px; }
  .rank-cards-mini { gap: 2px; }
  .rank-cards-mini .sample-card { width: 24px; height: 33px; border-radius: 3px; padding: 1px 2px; }
  .rank-cards-mini .sample-card .sc-rank { font-size: 0.6rem; }
  .rank-cards-mini .sample-card .sc-suit { font-size: 0.55rem; }
  .rank-cards-mini .sample-card .joker-emblem { width: 14px; height: 14px; }
  .result-dealer-thumb { width: 64px; height: 80px; }
  .rules-dealer-guide { padding: 10px; gap: 10px; }
  .guide-dealer-avatar { width: 56px; height: 70px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 2px; }
  /* 役一覧：カードを説明の下に回して、文字が細く潰れないようにする */
  .hand-visual-item { flex-wrap: wrap; }
  .hvi-info { flex-basis: calc(100% - 40px); }
  .hvi-cards { margin-left: 38px; }
  .countdown-number { font-size: 5rem; }
  .countdown-number.go { font-size: 3.6rem; }
}

/* スマホ横向きは高さが足りないので、縦向きにしてもらう */
.rotate-notice { display: none; }
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  .rotate-notice {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: #0f051a;
    color: var(--lux-gold, #c9a45c);
    font-family: var(--font-serif, serif);
    font-size: 1.1rem;
    line-height: 1.8;
  }
}

/* ==================== スマホ縦向き：文字とボタンの細身化 ==================== */
/* PCの太い文字・大きいボタンをそのまま縮めると野暮ったいので、細い線と字間で見せる */
@media (max-width: 600px) {
  /* トップバー：題字と成績を1行目、操作を2行目に小さく */
  .top-bar { padding: 6px 10px 5px; row-gap: 4px; }
  .logo-area h1 { font-size: 0.9rem; letter-spacing: 0.24em; }
  .stat-pill { padding: 1px 7px; gap: 5px; }
  .stat-pill .label { font-size: 0.5rem; letter-spacing: 0.24em; }
  .stat-pill .value { font-size: 0.78rem; }
  .top-controls { width: 100%; justify-content: flex-end; gap: 6px; }
  .icon-btn {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    padding: 3px 9px;
    border-color: var(--lux-gold-faint);
    color: var(--lux-gold-light);
  }

  /* ライバル・ディーラー・山札の文字 */
  .cpu-name { font-weight: 600; letter-spacing: 0.04em; }
  .cpu-status { color: var(--lux-muted); }
  #dealer-text { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1.5; }
  .deck-label, .trash-label { font-weight: 500; letter-spacing: 0.12em; }

  /* 役の表示 */
  .player-hand-badge {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--lux-gold-line);
    border-radius: 0;
    box-shadow: none;
    padding: 0 2px 2px;
  }
  .hand-rank-label { font-size: 0.54rem; font-weight: 500; letter-spacing: 0.2em; color: var(--lux-muted); }
  .hand-rank-name { font-size: 0.95rem; letter-spacing: 0.1em; }
  .player-change-count { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.1em; color: var(--lux-muted); }
  .player-change-count strong { color: var(--lux-gold-light); }

  /* ボタン：補助は細い線だけ、チェンジと勝負は高さをそろえて横に並べる */
  .action-bar { grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .sub-action-btn {
    height: 30px;
    padding: 0 4px;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    border-color: var(--lux-gold-faint);
    color: var(--lux-gold-light);
  }
  .main-exchange-btn,
  .showdown-btn {
    grid-column: auto;
    height: 50px;
    margin: 2px 0 0;
    padding: 0 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
  }
  .main-exchange-btn .btn-main-text { font-size: 0.95rem; letter-spacing: 0.3em; padding-left: 0.3em; }
  .main-exchange-btn .btn-sub-text { font-size: 0.5rem; letter-spacing: 0.02em; white-space: nowrap; }
  .showdown-btn { font-size: 0.85rem; letter-spacing: 0.24em; }

  .player-cards-row { margin-top: 16px; } /* 選んで浮いたカードが役の表示に重ならないように */

  /* 選んだカードの印：長い札は幅からはみ出すので「捨てる」とだけ出す */
  .playing-card.selected::after {
    content: '捨てる';
    top: -9px;
    font-size: 0.52rem;
    letter-spacing: 0.2em;
    padding: 1px 6px 1px 8px;
    white-space: nowrap;
  }

  /* ホーム・結果画面のボタンと文字 */
  .modal-badge { font-size: 0.6rem; letter-spacing: 0.16em; }
  .modal-title { font-size: 1.3rem; letter-spacing: 0.2em; }
  .modal-desc { font-size: 0.74rem; font-weight: 500; line-height: 1.7; }
  .setting-group label { font-size: 0.68rem; letter-spacing: 0.14em; }
  .pill-btn { font-size: 0.64rem; font-weight: 500; letter-spacing: 0.04em; line-height: 1.5; }
  .start-game-btn, .secondary-modal-btn {
    min-height: 46px;
    padding: 8px 6px;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
  }
  .secondary-modal-btn { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; }
}
