@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #1a0000;
  --board-bg: #2d0a00;
  --accent: #ff4500;
  --accent2: #ff8c00;
  --safe: #2e7d32;
  --danger: #b71c1c;
  --card-bg: #1a1a2e;
  --text: #fff8f0;
  --muted: #ffccbc;
  --yellow: #ffd54f;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.screen { display: none; width: 100%; max-width: 640px; flex-direction: column; align-items: center; }
.screen.active { display: flex; }

/* ── SETUP SCREEN ── */
#setup-screen { padding: 20px; }

.game-logo { font-size: 3.5em; text-align: center; margin: 16px 0 4px; }
.game-title {
  font-size: 2em; font-weight: 900; text-align: center;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: -1px; line-height: 1.1; margin-bottom: 4px;
}
.game-sub { color: var(--muted); font-size: .9em; text-align: center; margin-bottom: 20px; }

.setup-box {
  background: rgba(255,69,0,.08);
  border: 1.5px solid rgba(255,69,0,.25);
  border-radius: 16px;
  padding: 16px;
  width: 100%;
  margin-bottom: 14px;
}
.setup-box h3 { color: var(--muted); font-size: .75em; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 900; margin-bottom: 12px; }

.player-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.player-emoji-badge { font-size: 1.4em; width: 32px; text-align: center; flex-shrink: 0; }
.player-name-input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1em;
  font-weight: 700;
}
.player-name-input:focus { outline: none; border-color: var(--accent); }
.remove-btn {
  background: rgba(183,28,28,.4);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1.1em;
  width: 34px; height: 34px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.add-player-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border: 1.5px dashed rgba(255,255,255,.2);
  border-radius: 10px;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: .9em;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
.add-player-btn:active { background: rgba(255,69,0,.15); }

.rules-toggle {
  width: 100%;
  background: rgba(255,140,0,.1);
  border: 1.5px solid rgba(255,140,0,.25);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--accent2);
  font-family: 'Nunito', sans-serif;
  font-size: .9em;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rules-content {
  display: none;
  background: rgba(255,140,0,.06);
  border: 1.5px solid rgba(255,140,0,.15);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  width: 100%;
}
.rules-content.open { display: block; }
.rules-content ul { padding-left: 18px; }
.rules-content li { color: var(--muted); font-size: .88em; margin-bottom: 7px; line-height: 1.45; }
.rules-content li strong { color: var(--yellow); }

.start-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 1.2em;
  font-weight: 900;
  cursor: pointer;
  margin-top: 8px;
  letter-spacing: .5px;
  box-shadow: 0 4px 20px rgba(255,69,0,.4);
}
.start-btn:active { transform: scale(0.97); }
.start-btn:disabled { opacity: .45; cursor: not-allowed; }
.lang-btn {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  color: var(--muted);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
}
.lang-btn.lang-active {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  color: var(--text);
  font-weight: 700;
}

/* ── GAME SCREEN ── */
#game-screen { padding: 0; width: 100%; }

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--board-bg);
  border-bottom: 2px solid var(--accent);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
}
.status-emoji { font-size: 1.6em; }
.status-name { font-size: 1em; font-weight: 900; color: var(--text); flex: 1; }
.status-name span { color: var(--accent2); }
.lives-display { font-size: 1em; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* ── Protection badges ── */
.protection-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.12em;
  font-weight: 900;
  padding: 5px 15px;
  border-radius: 20px;
  letter-spacing: .04em;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.protection-badge.nope-badge {
  background: rgba(210,40,10,.95);
  border: 2.5px solid #ff7755;
  color: #fff;
  animation: badge-pop .45s cubic-bezier(.36,.07,.19,.97), badge-glow-nope 1.8s ease-in-out infinite .45s;
}
.protection-badge.shield-badge {
  background: rgba(13,90,185,.95);
  border: 2.5px solid #80c8ff;
  color: #fff;
  animation: badge-pop .45s cubic-bezier(.36,.07,.19,.97), badge-glow-shield 1.8s ease-in-out infinite .45s;
}
@keyframes badge-pop {
  0%   { transform: scale(.25) rotate(-8deg); opacity: 0;
         box-shadow: 0 0 0 rgba(255,255,255,0); }
  50%  { transform: scale(1.35) rotate(3deg);  opacity: 1;
         box-shadow: 0 0 30px rgba(255,255,255,.7); }
  72%  { transform: scale(.9)  rotate(0deg);
         box-shadow: 0 0 8px rgba(255,255,255,.2); }
  88%  { transform: scale(1.08); }
  100% { transform: scale(1);   box-shadow: none; }
}
@keyframes badge-glow-nope {
  0%,100% { box-shadow: 0 0 6px rgba(255,100,60,.4); }
  50%     { box-shadow: 0 0 20px rgba(255,100,60,1), 0 0 36px rgba(220,40,10,.6); }
}
@keyframes badge-glow-shield {
  0%,100% { box-shadow: 0 0 6px rgba(100,190,255,.4); }
  50%     { box-shadow: 0 0 20px rgba(100,190,255,1), 0 0 36px rgba(13,90,185,.6); }
}
/* Status bar tint while protection is active */
.status-bar.bar-nope-active {
  border-bottom-color: #ff7755;
  box-shadow: 0 3px 16px rgba(210,40,10,.35);
  transition: border-bottom-color .3s, box-shadow .3s;
}
.status-bar.bar-shield-active {
  border-bottom-color: #80c8ff;
  box-shadow: 0 3px 16px rgba(13,90,185,.4);
  transition: border-bottom-color .3s, box-shadow .3s;
}

/* ── Board flip ── */
@keyframes board-flip-anim {
  0%   { transform: perspective(600px) rotateY(0deg)   scaleX(1)    scaleY(1);    filter: brightness(1); }
  28%  { transform: perspective(600px) rotateY(75deg)  scaleX(.2)   scaleY(.95);  filter: brightness(.4) saturate(2); }
  40%  { transform: perspective(600px) rotateY(90deg)  scaleX(.01)  scaleY(.9);   filter: brightness(.05) saturate(4) blur(3px); }
  55%  { transform: perspective(600px) rotateY(-90deg) scaleX(.01)  scaleY(.9);   filter: brightness(.05) saturate(4) blur(3px); }
  72%  { transform: perspective(600px) rotateY(-20deg) scaleX(.85)  scaleY(.98);  filter: brightness(.7) saturate(1.5); }
  100% { transform: perspective(600px) rotateY(0deg)   scaleX(1)    scaleY(1);    filter: brightness(1); }
}
.board-flipping { animation: board-flip-anim .85s ease; }

@keyframes mode-indicator-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px) scale(1.08); }
  40%     { transform: translateX(6px)  scale(1.12); }
  60%     { transform: translateX(-4px) scale(1.06); }
  80%     { transform: translateX(3px); }
}
.mode-shaking { animation: mode-indicator-shake .5s ease; }

/* Full-screen flip flash overlay */
@keyframes flip-flash-anim {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
.flip-flash {
  position: fixed; inset: 0; z-index: 998; pointer-events: none;
  animation: flip-flash-anim .75s ease forwards;
}
.flip-flash.to-chaos { background: radial-gradient(ellipse at center, rgba(183,28,28,.72) 0%, rgba(183,28,28,.15) 65%, transparent 90%); }
.flip-flash.to-calm  { background: radial-gradient(ellipse at center, rgba(27,94,32,.60)  0%, rgba(27,94,32,.10)  65%, transparent 90%); }

.player-strip {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  background: rgba(0,0,0,.3);
  width: 100%;
  scrollbar-width: none;
}
.player-strip::-webkit-scrollbar { display: none; }
.player-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 4px 6px;
  font-size: .7em;
  border: 1.5px solid transparent;
  flex-shrink: 0;
}
.player-chip.active-chip { border-color: var(--accent); background: rgba(255,69,0,.15); }
.player-chip.out-chip { opacity: .35; }
.player-chip .chip-emoji { font-size: 1.3em; }
.player-chip .chip-name { color: var(--muted); font-weight: 700; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip .chip-pos { color: var(--yellow); font-weight: 900; }
.player-chip .chip-lives { font-size: .85em; }

.board-wrap {
  width: 100%;
  background: var(--board-bg);
  padding: 6px 4px;
  overflow: hidden;
}
#board-svg {
  width: 100%;
  display: block;
}

.hand-wrap {
  width: 100%;
  padding: 8px 10px 4px;
  background: rgba(0,0,0,.4);
}
.hand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.hand-label {
  font-size: .72em;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hand-toggle-btn {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: .75em;
  font-weight: 900;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s;
}
.hand-toggle-btn:active { background: rgba(255,255,255,.2); }
.hand-hidden-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  color: rgba(255,255,255,.3);
  font-size: .9em;
  font-style: italic;
}
.hand {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  min-height: 88px;
}
.hand::-webkit-scrollbar { display: none; }
.card-thumb {
  min-width: 60px;
  height: 80px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 2px solid #444;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: .55rem;
  text-align: center;
  padding: 4px;
  transition: border-color .15s, transform .1s;
}
.card-thumb .card-emoji { font-size: 1.5rem; margin-bottom: 2px; }
.card-thumb .card-name { color: var(--muted); line-height: 1.2; }
.card-thumb:active { border-color: var(--accent); transform: scale(0.93); }
.card-thumb.selected { border-color: var(--yellow); }
.empty-hand { color: rgba(255,255,255,.3); font-size: .85em; align-self: center; }

.action-bar {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  width: 100%;
  background: rgba(0,0,0,.3);
}
.action-btn {
  flex: 1;
  padding: 12px 6px;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: .85em;
  font-weight: 900;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.action-btn:active { transform: scale(0.96); }
.action-btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-roll { background: linear-gradient(135deg, #e65100, #ff6d00); color: #fff; }
.btn-play { background: linear-gradient(135deg, #1565c0, #1e88e5); color: #fff; }
.btn-end { background: linear-gradient(135deg, #2e7d32, #43a047); color: #fff; }

.log-wrap {
  width: 100%;
  padding: 6px 10px 10px;
  background: var(--bg);
  min-height: 70px;
}
.log-title { font-size: .65em; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: 1px; font-weight: 900; margin-bottom: 4px; }
.log-entry { font-size: .8em; color: var(--muted); margin-bottom: 3px; line-height: 1.3; }

/* ── MODALS ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--board-bg);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 24px 20px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  position: relative;
  animation: pop-in .2s ease;
}
@keyframes pop-in {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-emoji { font-size: 3em; margin-bottom: 8px; }
.modal-title { font-size: 1.2em; font-weight: 900; color: var(--accent2); margin-bottom: 6px; }
.modal-desc { font-size: .9em; color: var(--muted); line-height: 1.5; margin-bottom: 18px; }
.modal-btns { display: flex; gap: 10px; justify-content: center; }
.modal-btn {
  padding: 11px 22px;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: .95em;
  font-weight: 900;
  cursor: pointer;
}
.modal-btn-ok { background: var(--accent); color: #fff; }
.modal-btn-cancel { background: rgba(255,255,255,.12); color: var(--text); }
.modal-btn:active { opacity: .8; }

/* Dice modal */
#dice-modal .modal-box { border-color: var(--yellow); }
.dice-face { font-size: 4em; margin: 10px 0; animation: spin-in .3s ease; }
@keyframes spin-in {
  from { transform: rotate(-180deg) scale(0); opacity: 0; }
  to { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* Player selector */
.player-selector-list { width: 100%; margin-bottom: 14px; }
.player-select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.player-select-btn:active { background: rgba(255,69,0,.2); border-color: var(--accent); }
.player-select-btn .ps-emoji { font-size: 1.4em; }

/* See Future preview */
.future-spaces { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.future-space-card {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  min-width: 80px;
}
.future-space-card .fs-icon { font-size: 1.6em; }
.future-space-card .fs-label { font-size: .7em; color: var(--muted); margin-top: 4px; text-transform: capitalize; }
.future-space-card .fs-num { font-size: .65em; color: rgba(255,255,255,.4); }

/* ── RESPONSIVE ── */
@media (min-width: 768px) {
  .screen { max-width: 960px; }
  #game-screen { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .status-bar { width: 100%; position: sticky; top: 0; z-index: 50; }
  .left-panel { flex: 1 1 55%; display: flex; flex-direction: column; }
  .right-panel { flex: 1 1 42%; display: flex; flex-direction: column; padding-top: 0; min-width: 280px; }
  .hand-wrap { flex: 1; }
  .hand { min-height: 120px; flex-wrap: wrap; }
  .card-thumb { min-width: 80px; height: 100px; }
  .card-thumb .card-emoji { font-size: 2rem; }
  .card-thumb .card-name { font-size: .65rem; }
  .action-bar { padding: 12px 10px; }
  .action-btn { padding: 16px 8px; font-size: 1em; }
  .log-wrap { min-height: 90px; }
  .log-entry { font-size: .9em; }
  .modal-box { max-width: 420px; padding: 28px 24px; }
}
@media (min-width: 1024px) {
  .screen { max-width: 1200px; }
  .left-panel { flex: 1 1 60%; }
  .right-panel { flex: 1 1 37%; }
  .card-thumb { min-width: 90px; height: 110px; }
  .hand { gap: 10px; }
}

/* ── GAME OVER ── */
#gameover-screen { padding: 24px 20px; align-items: center; }
.gameover-title { font-size: 2.2em; font-weight: 900; color: var(--yellow); text-align: center; margin-bottom: 8px; }
.gameover-winner { font-size: 1.1em; color: var(--muted); text-align: center; margin-bottom: 20px; }
.final-board {
  width: 100%;
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
}
.final-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.final-player-row:last-child { border-bottom: none; }
.final-rank { font-size: 1.2em; font-weight: 900; color: var(--yellow); min-width: 30px; }
.final-emoji { font-size: 1.4em; }
.final-name { flex: 1; font-weight: 700; }
.final-pos { color: var(--muted); font-size: .9em; }

.gameover-btns { display: flex; gap: 12px; width: 100%; }
.gameover-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1em;
  font-weight: 900;
  cursor: pointer;
}
.btn-play-again { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-new-game { background: rgba(255,255,255,.1); color: var(--text); border: 1.5px solid rgba(255,255,255,.2); }

/* ── CONFETTI ── */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* Legend */
.legend-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,.25);
  width: 100%;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .65em;
  color: var(--muted);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* ── SETTINGS ── */
.back-btn {
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 1.1em;
  width: 36px; height: 36px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.back-btn:active { background: rgba(255,255,255,.2); }
.settings-btn {
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 1.2em;
  width: 36px; height: 36px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-btn:active { background: rgba(255,255,255,.2); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.settings-row:last-of-type { border-bottom: none; }
.settings-label { font-weight: 700; font-size: .95em; }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #444; border-radius: 26px; cursor: pointer;
  transition: background .2s;
}
.toggle-slider:before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }
.voice-select {
  flex: 1; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 8px; padding: 6px 8px; color: var(--text);
  font-family: 'Nunito', sans-serif; font-size: .85em; font-weight: 700;
  max-width: 200px;
}
.voice-select option { background: #1a0000; }

/* ── CARD PREVIEW MODAL ── */
.card-preview-box {
  max-width: 380px;
  padding: 20px;
  position: relative;
}
.card-preview-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1.2em; cursor: pointer;
}
.card-preview-img {
  width: 160px; height: 160px; object-fit: contain;
  display: block; margin: 0 auto 12px; border-radius: 12px;
}
.preview-emoji {
  font-size: 4em; text-align: center; margin-bottom: 8px; display: none;
}
.preview-name {
  font-size: 1.5em; font-weight: 900; text-align: center;
  color: var(--accent2); margin-bottom: 10px;
}
.preview-text {
  font-size: .9em; color: var(--muted); text-align: center;
  line-height: 1.5; margin-bottom: 16px; white-space: pre-line;
}
.preview-btns {
  display: flex; flex-direction: column; gap: 8px;
}
.preview-btn {
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: .95em; font-weight: 900;
  cursor: pointer;
}
.preview-btn-listen { background: rgba(255,255,255,.1); color: var(--text); border: 1.5px solid rgba(255,255,255,.2); }
.preview-btn-play { background: linear-gradient(135deg, #1565c0, #1e88e5); color: #fff; }
.preview-btn-cancel { background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); }
@media (min-width: 768px) {
  .card-preview-img { width: 200px; height: 200px; }
  .preview-name { font-size: 1.8em; }
  .preview-btns { flex-direction: row; }
  .preview-btn { flex: 1; }
}

/* ── CARD IMAGES ── */
.card-thumb-bg {
  width: 44px; height: 44px; background-size: contain; background-repeat: no-repeat;
  background-position: center; margin-bottom: 2px; border-radius: 4px;
}
.card-modal-img {
  width: 110px; height: 110px; object-fit: contain; margin: 0 auto 12px;
  display: block; border-radius: 10px;
}
@media (min-width: 768px) {
  .card-thumb-bg { width: 54px; height: 54px; }
  .card-modal-img { width: 140px; height: 140px; }
}

/* Board mode indicator */
.board-mode-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0,0,0,.3);
  width: 100%;
  font-size: .75em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.board-mode-indicator.chaos { color: #ef5350; }
.board-mode-indicator.calm { color: #66bb6a; }

/* Move cards deck toggle */
.move-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: .7em;
  color: var(--muted);
}

/* Extra turns badge on player chip */
.chip-extra { color: #ffd54f; font-size: .75em; font-weight: 900; }
