:root {
  --bg-color: #faf6ee;
  --panel-bg: #ffffff;
  --panel-border: #000000;
  --text-main: #000000;
  --text-muted: #525252;
  
  --ink: #000000;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-yellow: #fde047;
  --accent-purple: #8b5cf6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --color-brown: #78350f;
  --color-dark_blue: #1d4ed8;
  --color-green: #15803d;
  --color-yellow: #eab308;
  --color-red: #dc2626;
  --color-orange: #ea580c;
  --color-pink: #db2777;
  --color-light_blue: #0284c7;
  --color-railroad: #1e293b;
  --color-utility: #475569;
}

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

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(#000000 0.75px, transparent 0.75px), 
    radial-gradient(#000000 0.75px, var(--bg-color) 0.75px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   HEADER & NAVIGATION
======================================================== */
header {
  background: #ffffff;
  border-bottom: 3.5px solid var(--ink);
  box-shadow: 0 4px 0px var(--ink);
  padding: calc(12px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-right, 0px)) 12px calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-yellow);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0px var(--ink);
  padding: 4px 12px;
  border-radius: 6px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink);
  box-shadow: 2.5px 2.5px 0px var(--ink);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-room {
  background: #e0e7ff;
}

.badge-turn {
  background: #86efac;
}

.badge-actions {
  background: #fde68a;
}

/* ========================================================
   BUTTONS (TACTILE NEO-BRUTALIST CONTROLS)
======================================================== */
button {
  cursor: pointer;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: inherit;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 3.5px 3.5px 0px var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:hover:not(:disabled) {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 5px 5px 0px var(--ink);
}

button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--ink);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 2px 2px 0px var(--ink);
  transform: none !important;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
}
.btn-secondary:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn-danger {
  background: #ff4757;
  color: #ffffff;
}
.btn-danger:hover:not(:disabled) {
  background: #ee3849;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}
.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-start {
  background: #facc15;
  color: var(--ink);
}
.btn-start:hover:not(:disabled) {
  background: #eab308;
}

.btn-leave {
  font-size: 0.75rem;
  padding: 6px 12px;
}

.btn-mic.active {
  background: #00d26a;
  color: var(--ink);
}
.btn-mic.muted {
  background: #ff4757;
  color: #ffffff;
}
.btn-mic.is-talking {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.6), 3px 3px 0px var(--ink) !important;
  animation: pulse-talking-btn 0.6s infinite alternate ease-in-out;
}

@keyframes pulse-talking-btn {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2px);
  }
}

.btn-action {
  background: #8b5cf6;
  color: #ffffff;
}
.btn-action:hover:not(:disabled) {
  background: #7c3aed;
}

.btn-bank {
  background: #10b981;
  color: var(--ink);
}
.btn-bank:hover:not(:disabled) {
  background: #059669;
  color: #ffffff;
}

.btn-property {
  background: #facc15;
  color: var(--ink);
}
.btn-property:hover:not(:disabled) {
  background: #eab308;
}

/* ========================================================
   MAIN CONTAINER & LOBBY VIEW
======================================================== */
main {
  flex: 1;
  padding: 20px calc(24px + env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.lobby-card {
  max-width: 480px;
  margin: 40px auto;
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 8px 8px 0px var(--ink);
}

.lobby-card h2 {
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  padding-bottom: 12px;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.form-group input {
  padding: 10px 14px;
  border-radius: 6px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 3px 3px 0px var(--ink);
  transition: all 0.15s ease;
}

.form-group input:focus {
  outline: none;
  background: #fffde7;
  box-shadow: 4.5px 4.5px 0px var(--ink);
}

.lobby-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
}

.lobby-divider::before,
.lobby-divider::after {
  content: "";
  flex: 1;
  height: 2.5px;
  background: var(--ink);
}

.lobby-divider span {
  font-size: 0.8rem;
  font-weight: 900;
  background: #ffffff;
  border: 2px solid var(--ink);
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 2px 2px 0px var(--ink);
}

.lobby-players-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.lobby-player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 2.5px 2.5px 0px var(--ink);
  font-weight: 800;
  color: var(--ink);
}

.lobby-empty-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: 6px;
  text-align: center;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-box {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.join-box input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 16px; /* prevent iOS auto-zoom */
  border-radius: 6px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: 2.5px 2.5px 0px var(--ink);
}

.join-box input:focus {
  outline: none;
  background: #fffde7;
  box-shadow: 4px 4px 0px var(--ink);
}

.join-box button {
  flex-shrink: 0;
}

.room-code-display {
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: center;
  background: var(--accent-yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: 4px 4px 0px var(--ink);
  margin: 6px 0;
  user-select: all;
}

/* ========================================================
   GAME BOARD & TABLE LAYOUT
======================================================== */
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.table-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.section-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-weight: 900;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Opponents Area --- */
.opponents-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.opponent-card {
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 14px;
  min-width: 250px;
  flex: 1;
  box-shadow: 4px 4px 0px var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.opponent-card.is-turn {
  background: #fffbeb;
  border-color: var(--ink);
  box-shadow: 6px 6px 0px var(--ink);
  outline: 3px solid #f59e0b;
}

.opponent-card.is-speaking {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3.5px rgba(34, 197, 94, 0.45), 4px 4px 0px var(--ink) !important;
}

.opponent-card.is-turn.is-speaking {
  outline: 3px solid #16a34a !important;
  box-shadow: 0 0 0 3.5px rgba(34, 197, 94, 0.45), 6px 6px 0px var(--ink) !important;
}

.opponent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
}

.player-stats {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.player-stats span {
  background: #f1f5f9;
  border: 1.5px solid var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 1.5px 1.5px 0px var(--ink);
}

/* ========================================================
   CENTER DECK & DISCARD TABLE (NEO-BRUTAL GAME MAT)
======================================================== */
.center-table-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  background: #059669;
  border: 3.5px solid var(--ink);
  border-radius: 12px;
  padding: 20px 28px;
  box-shadow: 6px 6px 0px var(--ink);
  position: relative;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.2) 1.5px, transparent 0);
  background-size: 16px 16px;
}

.table-slot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.slot-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-transform: uppercase;
  background: var(--accent-yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  padding: 3px 8px;
  border-radius: 4px;
}

.table-center-divider {
  width: 3px;
  height: 140px;
  background: var(--ink);
  box-shadow: 1px 0px 0px rgba(255, 255, 255, 0.4);
}

.deck-pile-visual,
.discard-pile-visual {
  width: 114px;
  height: 164px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.deck-pile-visual {
  cursor: default;
  /* 3D Neo-Brutal Stacked Deck Shadow */
  box-shadow: 3px 3px 0 var(--ink), 6px 6px 0 var(--ink), 9px 9px 0 var(--ink);
  transition: transform 0.15s ease;
}

.empty-slot-card {
  width: 100%;
  height: 100%;
  border: 3px dashed var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 2px 2px 0px var(--ink);
}

/* Card Back Visual (Monopoly Deal Classic) */
.deal-card-back {
  width: 100%;
  height: 100%;
  background: #003882;
  border: 3px solid var(--ink);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px #ffffff;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.card-back-pattern {
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  pointer-events: none;
}

.card-back-banner {
  background: #dc2626;
  border: 2.5px solid var(--ink);
  padding: 4px 10px;
  border-radius: 4px;
  transform: rotate(-6deg);
  text-align: center;
  box-shadow: 3px 3px 0px var(--ink);
}

.card-back-monopoly {
  font-size: 0.75rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.06em;
  line-height: 1;
}

.card-back-deal {
  font-size: 0.95rem;
  font-weight: 900;
  color: #facc15;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 1.5px 1.5px 0px var(--ink);
}

/* ========================================================
   MY TABLE (BANK & PROPERTY SETS)
======================================================== */
.my-board {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 5px 5px 0px var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.my-board.is-speaking {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3.5px rgba(34, 197, 94, 0.45), 5px 5px 0px var(--ink) !important;
}

.my-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.my-table-title {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.player-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.speaking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #16a34a;
  border-radius: 9999px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 1.5px 1.5px 0px var(--ink);
  animation: speaking-pulse 1.4s infinite ease-in-out;
}

.speaking-indicator.hidden {
  display: none !important;
}

.speaking-indicator .mic-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.speaking-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 10px;
}

.speaking-wave .wave-bar {
  display: inline-block;
  width: 2px;
  height: 4px;
  background-color: #16a34a;
  border-radius: 1px;
  animation: sound-wave 0.6s ease-in-out infinite alternate;
}

.speaking-wave .wave-bar:nth-child(1) {
  animation-delay: 0.1s;
}
.speaking-wave .wave-bar:nth-child(2) {
  animation-delay: 0.25s;
}
.speaking-wave .wave-bar:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sound-wave {
  0% {
    height: 3px;
  }
  100% {
    height: 10px;
  }
}

@keyframes speaking-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 1.5px 1.5px 0px var(--ink);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 2px 2px 0px var(--ink), 0 0 6px rgba(34, 197, 94, 0.4);
  }
}

.sets-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 80px;
}

.property-group {
  background: #fafafa;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  min-width: 155px;
  flex: 1;
  max-width: 230px;
  box-shadow: 3.5px 3.5px 0px var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.property-group.is-complete {
  border: 3px solid var(--ink) !important;
  background: #f0fdf4 !important;
  box-shadow: 5px 5px 0px var(--ink) !important;
}

.group-header {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 2px 2px 0px var(--ink);
}

.badge-full-set {
  background: var(--accent-yellow);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0px var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.set-counter-text {
  opacity: 0.95;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 4px;
  border-radius: 3px;
}

.empty-state-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  font-style: italic;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: 6px;
  width: 100%;
  text-align: center;
}

.bank-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 52px;
  align-items: center;
}

/* Hand Section */
.hand-section {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 5px 5px 0px var(--ink);
}

.hand-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* ========================================================
   MONOPOLY DEAL PHYSICAL CARD STYLING (NEO-BRUTALIST)
======================================================== */
.deal-card {
  width: 140px;
  height: 204px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  padding: 6px;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 4px 0px var(--ink);
  user-select: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  font-family: inherit;
}

.deal-card.interactive:hover {
  transform: translate(-3px, -5px) scale(1.02);
  box-shadow: 7px 7px 0px var(--ink);
  cursor: pointer;
  z-index: 15;
}

.deal-card.is-turn-playable {
  outline: 3.5px solid var(--success);
  outline-offset: 1px;
  box-shadow: 4px 4px 0px var(--ink);
}

.deal-card.is-turn-playable:hover {
  outline: 4px solid #059669;
  box-shadow: 7px 7px 0px var(--ink);
}

/* Large preview mode (used in modals and inspector) */
.deal-card.card-preview {
  width: 176px;
  height: 254px;
  box-shadow: 8px 8px 0px var(--ink) !important;
  cursor: default !important;
  transform: none !important;
}

/* Card Inner Frame */
.card-frame {
  width: 100%;
  height: 100%;
  border: 2px solid var(--ink);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  position: relative;
}

/* Corner Value Badges ($XM) */
.card-val-badge {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  box-shadow: 1.5px 1.5px 0px var(--ink);
  z-index: 5;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
  padding: 0;
}

.card-val-badge.val-tl {
  top: 3px;
  left: 3px;
}

.card-val-badge.val-br {
  bottom: 3px;
  right: 3px;
}

.card-val-badge .val-curr {
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.9;
  margin-right: -0.5px;
}

.card-val-badge .val-num {
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

.card-val-badge .val-unit {
  font-size: 0.48rem;
  font-weight: 900;
  line-height: 1;
  margin-left: -0.5px;
}

.card-val-badge.val-10 .val-curr {
  font-size: 0.44rem;
}

.card-val-badge.val-10 .val-num {
  font-size: 0.62rem;
  letter-spacing: -0.04em;
}

.card-val-badge.val-10 .val-unit {
  font-size: 0.42rem;
}

.card-preview .card-val-badge {
  width: 38px;
  height: 38px;
  border-width: 2.5px;
  box-shadow: 2px 2px 0px var(--ink);
}

.card-preview .card-val-badge.val-tl {
  top: 4px;
  left: 4px;
}

.card-preview .card-val-badge.val-br {
  bottom: 4px;
  right: 4px;
}

.card-preview .card-val-badge .val-curr {
  font-size: 0.68rem;
}

.card-preview .card-val-badge .val-num {
  font-size: 0.96rem;
}

.card-preview .card-val-badge .val-unit {
  font-size: 0.64rem;
}

.card-preview .card-val-badge.val-10 .val-curr {
  font-size: 0.58rem;
}

.card-preview .card-val-badge.val-10 .val-num {
  font-size: 0.84rem;
  letter-spacing: -0.03em;
}

.card-preview .card-val-badge.val-10 .val-unit {
  font-size: 0.56rem;
}

/* --- Card Header Bar --- */
.card-header-bar {
  padding: 3px 4px 3px 32px; /* space for top-left badge */
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  border-bottom: 2px solid var(--ink);
  box-sizing: border-box;
  text-align: center;
  position: relative;
}

.card-preview .card-header-bar {
  padding: 5px 8px 5px 43px;
  min-height: 44px;
}

.card-header-title {
  font-size: 0.60rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: normal;
  line-height: 1.15;
  overflow: visible;
  text-overflow: clip;
  flex: 1;
  text-align: center;
  word-break: normal;
  overflow-wrap: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-preview .card-header-title {
  font-size: 0.8rem;
  line-height: 1.2;
}

.rent-main-title {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.rent-sub-title {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 1.5px;
  opacity: 0.95;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-preview .rent-main-title {
  font-size: 0.86rem;
}

.card-preview .rent-sub-title {
  font-size: 0.64rem;
  margin-top: 2px;
}

.card-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  flex-shrink: 0;
}

/* --- Property Card Rent Table --- */
.card-rent-table {
  flex: 1;
  margin: 6px 6px 4px 6px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px;
  background: #f8fafc;
}

.rent-table-title {
  font-size: 0.62rem;
  font-weight: 900;
  text-align: center;
  color: var(--ink);
  letter-spacing: 0.06em;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.rent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6rem;
  padding: 1.5px 5px;
  color: var(--ink);
  font-weight: 700;
}

.rent-row:nth-child(even) {
  background: #e2e8f0;
  border-radius: 2px;
}

.rent-amount {
  font-weight: 900;
  color: var(--ink);
}

.card-set-badge {
  font-size: 0.55rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  padding: 2.5px 4px;
  background: var(--accent-yellow);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  margin-top: 3px;
  letter-spacing: 0.04em;
}

.card-house-note {
  font-size: 0.50rem;
  color: var(--text-muted);
  text-align: center;
  margin: 2px 0 1px 0;
  line-height: 1.1;
  font-weight: 800;
  border-top: 1px dashed #cbd5e1;
  padding-top: 2px;
}

/* --- Action Cards --- */
.action-art-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  gap: 2px;
}

.action-type-pill {
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: #dc2626;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  box-shadow: 1px 1px 0px var(--ink);
  text-transform: uppercase;
}

.card-preview .action-type-pill {
  font-size: 0.65rem;
  padding: 2px 8px;
  margin-bottom: 3px;
}

.action-art-svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.4));
}

.card-preview .action-art-svg {
  width: 76px;
  height: 76px;
}

.action-art-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  transition: transform 0.15s ease;
}

.card-preview .action-art-img {
  width: 100px;
  height: 100px;
}

.action-rule-box {
  background: #f1f5f9;
  border-top: 2px solid var(--ink);
  padding: 5px 26px 5px 6px; /* space for bottom-right badge */
  text-align: center;
  font-size: 0.58rem;
  line-height: 1.18;
  color: var(--ink);
  font-weight: 700;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-preview .action-rule-box {
  font-size: 0.72rem;
  padding: 6px 36px 6px 8px;
  min-height: 58px;
}

/* --- Wild Property Cards --- */
.wild-split-header {
  min-height: 35px;
  display: flex;
  border-bottom: 2px solid var(--ink);
  position: relative;
  padding-left: 31px;
  box-sizing: border-box;
}

.wild-split-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  padding: 2px 4px;
  line-height: 1.15;
  box-sizing: border-box;
}

.card-preview .wild-split-header {
  min-height: 44px;
  padding-left: 43px;
}

.card-preview .wild-split-col {
  font-size: 0.72rem;
}

.wild-dual-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
}

.wild-card-title {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.wild-swap-icon {
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 900;
  line-height: 1;
}

.wild-card-subtitle {
  font-size: 0.55rem;
  color: #64748b;
  text-align: center;
  font-weight: 700;
}

.wild-active-badge {
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  border: 1.5px solid var(--ink);
  font-size: 0.55rem;
  font-weight: 800;
}

.wild-rainbow-wheel {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(#78350f, #0284c7, #db2777, #ea580c, #dc2626, #facc15, #15803d, #1d4ed8, #1e293b, #475569, #78350f);
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px var(--ink);
}

.wild-wheel-center {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.52rem;
  letter-spacing: -0.02em;
}

/* --- Money Cards (Authentic Neo-Brutalist Banknotes) --- */
.deal-card.card-money {
  padding: 6px;
  background: #ffffff;
}

.banknote-frame {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 2.5px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  box-sizing: border-box;
  position: relative;
}

.money-theme-10 {
  background: #fef08a;
  color: var(--ink);
}

.money-theme-5 {
  background: #e9d5ff;
  color: var(--ink);
}

.money-theme-4 {
  background: #bae6fd;
  color: var(--ink);
}

.money-theme-3 {
  background: #bbf7d0;
  color: var(--ink);
}

.money-theme-2 {
  background: #fecdd3;
  color: var(--ink);
}

.money-theme-1 {
  background: #fef9c3;
  color: var(--ink);
}

.banknote-top-header {
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 10px;
  z-index: 2;
  text-align: center;
}

.card-preview .banknote-top-header {
  font-size: 0.72rem;
  margin-top: 14px;
}

.banknote-center-oval {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 2px 2px 0px var(--ink);
  box-sizing: border-box;
  padding: 4px;
}

.card-preview .banknote-center-oval {
  width: 122px;
  height: 122px;
  border-width: 3px;
  box-shadow: 3px 3px 0px var(--ink);
}

.banknote-tycoon-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--ink);
  margin-bottom: 2px;
}

.card-preview .banknote-tycoon-img {
  width: 38px;
  height: 38px;
  border-width: 2px;
  margin-bottom: 4px;
}

.banknote-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 1;
  color: var(--ink);
}

.banknote-amount .bn-curr {
  font-size: 0.82rem;
  font-weight: 900;
  margin-right: 0.5px;
}

.banknote-amount .bn-val {
  font-size: 1.35rem;
  font-weight: 900;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.03em;
}

.banknote-amount .bn-unit {
  font-size: 0.78rem;
  font-weight: 900;
  margin-left: 0.5px;
}

.card-preview .banknote-amount .bn-curr {
  font-size: 1.1rem;
}

.card-preview .banknote-amount .bn-val {
  font-size: 1.85rem;
}

.card-preview .banknote-amount .bn-unit {
  font-size: 1.05rem;
}

.banknote-label {
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
  color: var(--ink);
}

.card-preview .banknote-label {
  font-size: 0.65rem;
  margin-top: 3px;
}

.banknote-bottom-banner {
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
  z-index: 2;
  text-align: center;
}

.card-preview .banknote-bottom-banner {
  font-size: 0.7rem;
  margin-bottom: 14px;
}

.banknote-corner {
  position: absolute;
  font-size: 0.62rem;
  font-weight: 900;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--ink);
  line-height: 1;
}
.banknote-corner.c-tl { top: 4px; left: 5px; }
.banknote-corner.c-tr { top: 4px; right: 5px; }
.banknote-corner.c-bl { bottom: 4px; left: 5px; }
.banknote-corner.c-br { bottom: 4px; right: 5px; }

.card-preview .banknote-corner {
  font-size: 0.82rem;
}
.card-preview .banknote-corner.c-tl { top: 6px; left: 7px; }
.card-preview .banknote-corner.c-tr { top: 6px; right: 7px; }
.card-preview .banknote-corner.c-bl { bottom: 6px; left: 7px; }
.card-preview .banknote-corner.c-br { bottom: 6px; right: 7px; }

/* ========================================================
   TABLETOP MINI CARDS & BANKNOTES
======================================================== */
.mini-property-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-left-width: 8px;
  box-shadow: 2.5px 2.5px 0px var(--ink);
  gap: 6px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.mini-property-item:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4px 4px 0px var(--ink);
}

.mini-prop-name {
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.2;
  flex: 1;
}

.mini-prop-badge {
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent-yellow);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.mini-wild-tag {
  background: #a855f7;
  color: #ffffff;
  border: 1.5px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  font-size: 0.58rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* Mini Bank Bills in Bank Container */
.mini-bank-bill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  box-shadow: 2.5px 2.5px 0px var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.mini-bank-bill:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4px 4px 0px var(--ink);
}

.mini-bank-val {
  font-weight: 900;
  font-size: 0.8rem;
}

/* ========================================================
   MODALS (TACTILE HIGH-IMPACT DIALOGS)
======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 12px;
  padding: 22px;
  max-width: 440px;
  width: 92%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 8px 8px 0px var(--ink);
}

.modal-card-dialog {
  max-width: 440px;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2.5px solid var(--ink);
  padding-bottom: 10px;
}

.modal-header-row h3 {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.modal-close-x {
  background: #fee2e2;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.modal-close-x:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--ink);
  background: #fca5a5;
}

.modal-close-x:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--ink);
}

.modal-card-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-select {
  padding: 10px 12px;
  border-radius: 6px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  box-shadow: 3px 3px 0px var(--ink);
  cursor: pointer;
}

.modal-select:focus {
  outline: none;
  background: #fffde7;
  box-shadow: 4px 4px 0px var(--ink);
}

/* ========================================================
   PAYMENT MODAL (NEO-BRUTALIST BASE)
======================================================== */
.modal-payment-dialog {
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.payment-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-alert-box {
  background: #fef3c7;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 3px 3px 0px var(--ink);
}

.payment-alert-title {
  font-weight: 900;
  font-size: 1.05rem;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.payment-alert-desc {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.payment-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-stat-card {
  background: #f8fafc;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  box-shadow: 2px 2px 0px var(--ink);
}

.payment-stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.payment-stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ink);
}

.payment-stat-value.is-valid {
  color: #059669;
}

.payment-stat-value.is-invalid {
  color: #dc2626;
}

.payment-guide-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  background: #f1f5f9;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1.35;
}

.payment-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-section-heading {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 2px;
}

.payment-selectable-card {
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 2px 2px 0px var(--ink);
  position: relative;
  user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.payment-selectable-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--ink);
}

.payment-selectable-card.is-selected {
  background: #ecfdf5;
  border-color: #059669;
  box-shadow: 3px 3px 0px #059669;
  transform: translate(-1px, -1px);
}

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

.payment-card-val {
  background: #fde047;
  border: 1.5px solid var(--ink);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.75rem;
  color: var(--ink);
}

.payment-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.75rem;
  background: #ffffff;
}

.payment-selectable-card.is-selected .payment-checkbox {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.payment-card-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.payment-card-color-stripe {
  height: 6px;
  border-radius: 3px;
  border: 1.5px solid var(--ink);
  margin-top: 2px;
}

.payment-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-say-no {
  background: #fee2e2;
  color: #dc2626;
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0px var(--ink);
  font-weight: 900;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-say-no:hover {
  background: #fca5a5;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--ink);
}

.btn-say-no:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--ink);
}

/* ========================================================
   EXCESS CARDS NOTIFICATION MODAL (NEO-BRUTALIST BASE)
======================================================== */
.modal-excess-dialog {
  max-width: 460px;
}

.excess-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.excess-alert-box {
  background: #fef3c7;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 3px 3px 0px var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.excess-alert-badge {
  display: inline-block;
  align-self: flex-start;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0px var(--ink);
}

.excess-desc-text {
  font-size: 0.90rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.excess-cards-section-title {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.excess-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px;
}

.excess-card-item {
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 2.5px 2.5px 0px var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.excess-card-val {
  background: #fde047;
  border: 1.5px solid var(--ink);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.72rem;
  color: var(--ink);
}

.excess-card-type-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.excess-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.excess-card-color-stripe {
  height: 6px;
  border-radius: 3px;
  border: 1.5px solid var(--ink);
  margin-top: 2px;
}

/* ========================================================
   SIDEBAR / GAME ACTIVITY LOG
======================================================== */
.sidebar {
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 5px 5px 0px var(--ink);
  overflow: hidden;
}

.sidebar-actions-section {
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 3px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-actions-header {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.btn-end-turn-sidebar {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 3px 3px 0px var(--ink);
  letter-spacing: 0.03em;
}

.sidebar-header {
  padding: 12px 18px;
  border-bottom: 3px solid var(--ink);
  font-weight: 900;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-yellow);
  color: var(--ink);
}

.logs-list {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
  max-height: 520px;
}

.log-item {
  line-height: 1.35;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.log-item .time {
  background: #e2e8f0;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.68rem;
  padding: 1.5px 5px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  margin-right: 6px;
  display: inline-block;
}

/* ========================================================
   UTILITIES & RESPONSIVENESS
======================================================== */
.hidden {
  display: none !important;
}

.btn-move-wild {
  background: #f8fafc;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  cursor: pointer;
  margin-left: auto;
  box-shadow: 1px 1px 0px var(--ink);
  transition: transform 0.1s ease, background 0.1s ease;
}

.btn-move-wild:hover {
  background: #e2e8f0;
  transform: translate(-1px, -1px);
}

/* ========================================================
   GLOBAL MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
======================================================== */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

button,
.deal-card,
.mini-property-item,
.mini-bank-bill,
.payment-selectable-card,
.modal-close-x,
.sidebar-header,
.btn-move-wild,
.btn-say-no {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hand-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.hand-subtitle-desktop {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.hand-subtitle-mobile {
  display: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sidebar-chevron {
  display: none;
}

/* Touch feedback: only apply hover transforms on pointer devices that support hover */
@media (hover: hover) {
  .deal-card.interactive:hover {
    transform: translate(-3px, -5px) scale(1.02);
    box-shadow: 7px 7px 0px var(--ink);
    cursor: pointer;
    z-index: 15;
  }
  .deal-card.is-turn-playable:hover {
    outline: 4px solid #059669;
    box-shadow: 7px 7px 0px var(--ink);
  }
  .mini-property-item:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4px 4px 0px var(--ink);
  }
  .mini-bank-bill:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4px 4px 0px var(--ink);
  }
  button:hover:not(:disabled) {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 5px 5px 0px var(--ink);
  }
}

/* Touch active tactile compression */
.deal-card.interactive:active {
  transform: scale(0.97) !important;
  box-shadow: 2px 2px 0px var(--ink) !important;
}

.mini-property-item:active,
.mini-bank-bill:active {
  transform: scale(0.97);
  box-shadow: 1.5px 1.5px 0px var(--ink);
}

/* ========================================================
   TABLET & MOBILE (<= 960px)
======================================================== */
@media (max-width: 960px) {
  .game-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    width: 100%;
  }

  .table-area {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .sidebar {
    max-height: none;
  }

  .sidebar-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .sidebar-chevron {
    display: inline-block;
    font-size: 0.72rem;
    transition: transform 0.2s ease;
  }

  .sidebar.is-collapsed .sidebar-chevron {
    transform: rotate(-90deg);
  }

  .sidebar.is-collapsed .logs-list {
    display: none;
  }

  .logs-list {
    max-height: 180px;
    padding: 10px 14px;
    gap: 6px;
  }

  .log-item {
    font-size: 0.75rem;
    line-height: 1.3;
  }
}

/* ========================================================
   MOBILE VIEWPORT (<= 768px)
======================================================== */
@media (max-width: 768px) {
  /* Header Mobile Bar */
  header {
    flex-direction: column;
    align-items: stretch;
    padding: calc(8px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px)) 8px calc(12px + env(safe-area-inset-left, 0px));
    gap: 8px;
    box-shadow: 0 3px 0px var(--ink);
    border-bottom-width: 3px;
  }

  .header-left {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .logo {
    font-size: 0.95rem;
    padding: 3px 8px;
    box-shadow: 2px 2px 0px var(--ink);
    border-width: 2px;
    white-space: nowrap;
  }

  #room-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    box-shadow: 2px 2px 0px var(--ink);
    white-space: nowrap;
  }

  .header-status {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .header-status::-webkit-scrollbar {
    display: none;
  }

  .header-status .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 2px 2px 0px var(--ink);
    border-width: 1.5px;
  }

  .header-status button {
    font-size: 0.72rem;
    padding: 4px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 2px 2px 0px var(--ink);
    border-width: 2px;
  }

  .btn-leave {
    font-size: 0.7rem;
    padding: 4px 8px;
    margin-left: auto;
  }

  /* Main Container */
  main {
    padding: 10px calc(12px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
    gap: 12px;
  }

  /* Lobby Card */
  .lobby-card {
    margin: 12px auto;
    padding: 18px 14px;
    border-width: 3px;
    box-shadow: 4px 4px 0px var(--ink);
    width: 100%;
  }

  .lobby-card h2 {
    font-size: 1.35rem;
    padding-bottom: 8px;
    border-bottom-width: 2.5px;
  }

  .form-group input {
    font-size: 16px; /* prevent iOS auto-zoom */
    padding: 9px 12px;
    border-width: 2px;
    box-shadow: 2.5px 2.5px 0px var(--ink);
  }

  /* Opponents Area */
  .opponents-row {
    gap: 10px;
    padding: 2px 2px 8px 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .opponent-card {
    min-width: 235px;
    max-width: 265px;
    flex: 0 0 245px;
    scroll-snap-align: start;
    padding: 10px;
    border-width: 2.5px;
    box-shadow: 3px 3px 0px var(--ink);
  }

  .opponent-header {
    font-size: 0.88rem;
    margin-bottom: 6px;
    padding-bottom: 3px;
  }

  .player-stats {
    font-size: 0.72rem;
    gap: 8px;
    margin-bottom: 8px;
  }

  .player-stats span {
    padding: 1.5px 5px;
  }

  .opponent-card .sets-container {
    gap: 6px;
    min-height: 50px;
  }

  .opponent-card .property-group {
    min-width: 105px;
    max-width: 100%;
    padding: 5px;
    box-shadow: 2px 2px 0px var(--ink);
    border-width: 1.5px;
  }

  .opponent-card .group-header {
    font-size: 0.64rem;
    padding: 2px 5px;
    margin-bottom: 4px;
    border-width: 1.5px;
  }

  .opponent-card .mini-property-item {
    padding: 3px 5px;
    font-size: 0.62rem;
    border-left-width: 5px;
    box-shadow: 1.5px 1.5px 0px var(--ink);
    min-width: 0;
    box-sizing: border-box;
  }

  .opponent-card .mini-prop-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  /* Center Deck & Discard Table */
  .center-table-row {
    padding: 10px 10px;
    gap: 14px;
    border-width: 2.5px;
    border-radius: 10px;
    box-shadow: 4px 4px 0px var(--ink);
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .table-slot-container {
    min-width: 0;
    max-width: 120px;
    flex: 1;
    align-items: center;
  }

  .deck-pile-visual,
  .discard-pile-visual {
    width: 78px;
    height: 112px;
    border-radius: 6px;
  }

  .deck-pile-visual {
    box-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink), 6px 6px 0 var(--ink);
  }

  .table-center-divider {
    height: 76px;
    width: 2px;
  }

  .slot-label {
    font-size: 0.60rem;
    padding: 2px 6px;
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
  }

  .card-back-banner {
    padding: 2px 5px;
    transform: rotate(-4deg);
    border-width: 1.5px;
    box-shadow: 2px 2px 0px var(--ink);
  }

  .card-back-monopoly {
    font-size: 0.52rem;
  }

  .card-back-deal {
    font-size: 0.68rem;
  }

  #discard-pile-slot .deal-card {
    transform: scale(0.52) rotate(-2deg) !important;
    transform-origin: center center !important;
  }

  .empty-slot-card {
    font-size: 0.60rem;
    border-width: 2px;
  }

  /* My Table (Bank & Properties) */
  .my-board {
    padding: 12px 10px;
    gap: 10px;
    border-width: 2.5px;
    box-shadow: 4px 4px 0px var(--ink);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
  }

  .my-table-title {
    font-size: 0.95rem;
  }

  .bank-container {
    gap: 6px;
    min-height: 38px;
  }

  .mini-bank-bill {
    padding: 4px 8px;
    font-size: 0.68rem;
    border-width: 1.5px;
    box-shadow: 2px 2px 0px var(--ink);
  }

  .mini-bank-val {
    font-size: 0.75rem;
  }

  #my-properties-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 50px;
    width: 100%;
    box-sizing: border-box;
  }

  #my-properties-container .property-group {
    min-width: 0 !important;
    max-width: 100%;
    width: 100%;
    padding: 6px;
    border-width: 2px;
    box-shadow: 2.5px 2.5px 0px var(--ink);
    box-sizing: border-box;
    overflow: hidden;
  }

  .group-header {
    padding: 3px 6px;
    font-size: 0.66rem;
    margin-bottom: 6px;
    border-width: 1.5px;
  }

  .badge-full-set {
    font-size: 0.56rem;
    padding: 1px 4px;
  }

  .mini-property-item {
    padding: 4px 5px;
    font-size: 0.63rem;
    border-width: 1.5px;
    border-left-width: 5px;
    box-shadow: 2px 2px 0px var(--ink);
    min-width: 0;
    box-sizing: border-box;
  }

  .mini-prop-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    font-size: 0.64rem;
  }

  .mini-prop-badge {
    font-size: 0.56rem;
    padding: 1px 3px;
    flex-shrink: 0;
  }

  .btn-move-wild {
    font-size: 0.58rem;
    padding: 1.5px 4px;
  }

  /* My Hand (Horizontal Swiping Carousel) */
  .hand-section {
    padding: 12px 10px;
    border-width: 2.5px;
    box-shadow: 4px 4px 0px var(--ink);
  }

  .hand-subtitle-desktop {
    display: none;
  }

  .hand-subtitle-mobile {
    display: inline;
  }

  .hand-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 4px 2px 10px 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .hand-cards .deal-card {
    width: 118px;
    height: 172px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-width: 2px;
    padding: 4px;
    box-shadow: 3px 3px 0px var(--ink);
  }

  /* Inner Card Details on Mobile Hand Cards */
  .hand-cards .card-frame {
    border-width: 1.5px;
  }

  .hand-cards .card-val-badge {
    width: 24px;
    height: 24px;
    border-width: 1.5px;
  }

  .hand-cards .card-val-badge .val-curr { font-size: 0.46rem; }
  .hand-cards .card-val-badge .val-num { font-size: 0.62rem; }
  .hand-cards .card-val-badge .val-unit { font-size: 0.42rem; }

  .hand-cards .card-header-bar {
    padding: 2px 4px 2px 26px;
    min-height: 28px;
    border-bottom-width: 1.5px;
  }

  .hand-cards .card-header-title {
    font-size: 0.52rem;
    line-height: 1.1;
  }

  .hand-cards .rent-main-title {
    font-size: 0.58rem;
  }

  .hand-cards .rent-sub-title {
    font-size: 0.44rem;
  }

  .hand-cards .card-rent-table {
    margin: 3px;
    padding: 3px;
    border-width: 1px;
  }

  .hand-cards .rent-table-title {
    font-size: 0.54rem;
    padding-bottom: 1px;
    border-bottom-width: 1px;
  }

  .hand-cards .rent-row {
    font-size: 0.52rem;
    padding: 1px 3px;
  }

  .hand-cards .card-set-badge {
    font-size: 0.48rem;
    padding: 1px 3px;
    margin-top: 2px;
    border-width: 1px;
  }

  .hand-cards .card-house-note {
    font-size: 0.42rem;
    padding-top: 1px;
  }

  .hand-cards .action-type-pill {
    font-size: 0.46rem;
    padding: 1px 4px;
  }

  .hand-cards .action-art-svg {
    width: 42px;
    height: 42px;
  }

  .hand-cards .action-art-img {
    width: 56px;
    height: 56px;
    border-width: 1px;
  }

  .hand-cards .action-rule-box {
    min-height: 38px;
    font-size: 0.50rem;
    line-height: 1.15;
    padding: 3px 22px 3px 4px;
    border-top-width: 1.5px;
  }

  .hand-cards .wild-split-header {
    min-height: 28px;
    padding-left: 26px;
    border-bottom-width: 1.5px;
  }

  .hand-cards .wild-split-col {
    font-size: 0.48rem;
    padding: 1px 2px;
  }

  .hand-cards .wild-card-title {
    font-size: 0.56rem;
  }

  .hand-cards .wild-swap-icon {
    font-size: 0.95rem;
  }

  .hand-cards .wild-rainbow-wheel {
    width: 46px;
    height: 46px;
    border-width: 2px;
  }

  .hand-cards .wild-wheel-center {
    width: 18px;
    height: 18px;
    font-size: 0.44rem;
  }

  .hand-cards .banknote-frame {
    border-width: 2px;
    padding: 4px 3px;
  }

  .hand-cards .banknote-top-header {
    font-size: 0.46rem;
    margin-top: 6px;
  }

  .hand-cards .banknote-bottom-banner {
    font-size: 0.46rem;
    margin-bottom: 6px;
  }

  .hand-cards .banknote-center-oval {
    width: 68px;
    height: 68px;
    border-width: 2px;
  }

  .hand-cards .banknote-tycoon-img {
    width: 20px;
    height: 20px;
  }

  .hand-cards .banknote-amount .bn-curr {
    font-size: 0.68rem;
  }

  .hand-cards .banknote-amount .bn-val {
    font-size: 1.1rem;
  }

  .hand-cards .banknote-amount .bn-unit {
    font-size: 0.64rem;
  }

  .hand-cards .banknote-corner {
    font-size: 0.52rem;
  }

  /* Modals Optimization for Mobile */
  .modal-overlay {
    padding: 10px;
    align-items: center;
    justify-content: center;
  }

  .modal-content {
    width: 100%;
    max-width: 350px;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    gap: 10px;
    border-width: 3px;
    box-shadow: 5px 5px 0px var(--ink);
  }

  .modal-header-row {
    padding-bottom: 8px;
    border-bottom-width: 2px;
  }

  .modal-header-row h3 {
    font-size: 1.05rem;
  }

  .modal-close-x {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  .modal-card-preview {
    padding: 4px 0;
  }

  /* Scaled Card Preview inside Modals on Mobile */
  .deal-card.card-preview {
    width: 136px;
    height: 198px;
    box-shadow: 5px 5px 0px var(--ink) !important;
    padding: 5px;
  }

  .card-preview .card-val-badge {
    width: 28px;
    height: 28px;
    border-width: 2px;
  }

  .card-preview .card-val-badge .val-curr { font-size: 0.54rem; }
  .card-preview .card-val-badge .val-num { font-size: 0.76rem; }
  .card-preview .card-val-badge .val-unit { font-size: 0.50rem; }

  .card-preview .card-header-bar {
    padding: 3px 6px 3px 32px;
    min-height: 35px;
  }

  .card-preview .card-header-title {
    font-size: 0.62rem;
    line-height: 1.15;
  }

  .card-preview .rent-main-title {
    font-size: 0.70rem;
  }

  .card-preview .rent-sub-title {
    font-size: 0.52rem;
  }

  .card-preview .card-rent-table {
    margin: 4px 4px 3px 4px;
    padding: 4px;
  }

  .card-preview .rent-table-title {
    font-size: 0.60rem;
  }

  .card-preview .rent-row {
    font-size: 0.58rem;
    padding: 1.5px 4px;
  }

  .card-preview .card-set-badge {
    font-size: 0.52rem;
    padding: 2px 4px;
  }

  .card-preview .card-house-note {
    font-size: 0.46rem;
  }

  .card-preview .action-type-pill {
    font-size: 0.52rem;
    padding: 1.5px 6px;
    margin-bottom: 2px;
  }

  .card-preview .action-art-svg {
    width: 54px;
    height: 54px;
  }

  .card-preview .action-art-img {
    width: 72px;
    height: 72px;
  }

  .card-preview .action-rule-box {
    font-size: 0.58rem;
    padding: 4px 28px 4px 6px;
    min-height: 42px;
  }

  .card-preview .wild-split-header {
    min-height: 35px;
    padding-left: 32px;
  }

  .card-preview .wild-split-col {
    font-size: 0.58rem;
  }

  .card-preview .wild-card-title {
    font-size: 0.66rem;
  }

  .card-preview .wild-rainbow-wheel {
    width: 58px;
    height: 58px;
  }

  .card-preview .wild-wheel-center {
    width: 24px;
    height: 24px;
    font-size: 0.50rem;
  }

  .card-preview .banknote-frame {
    border-width: 2px;
  }

  .card-preview .banknote-center-oval {
    width: 88px;
    height: 88px;
  }

  .card-preview .banknote-amount .bn-val {
    font-size: 1.35rem;
  }

  .card-preview .banknote-top-header {
    font-size: 0.56rem;
    margin-top: 8px;
  }

  .card-preview .banknote-bottom-banner {
    font-size: 0.56rem;
    margin-bottom: 8px;
  }

  .card-preview .banknote-tycoon-img {
    width: 26px;
    height: 26px;
  }

  .card-preview .banknote-corner {
    font-size: 0.62rem;
  }

  .modal-actions {
    gap: 8px;
  }

  .modal-actions button {
    min-height: 44px;
    font-size: 0.84rem;
    padding: 10px 14px;
  }

  .modal-select {
    min-height: 44px;
    font-size: 16px; /* prevent iOS auto-zoom */
    padding: 8px 10px;
  }

  /* Sidebar Actions on Mobile */
  .sidebar-actions-section {
    padding: 10px 12px;
    gap: 6px;
  }

  .btn-end-turn-sidebar {
    min-height: 44px;
    font-size: 0.9rem;
    padding: 10px 14px;
  }

  /* Payment Modal on Mobile */
  .modal-payment-dialog {
    max-width: min(94vw, 440px);
    max-height: calc(100dvh - 24px);
    padding: 14px 12px;
  }

  .payment-alert-box {
    padding: 10px 12px;
  }

  .payment-alert-title {
    font-size: 0.95rem;
  }

  .payment-alert-desc {
    font-size: 0.82rem;
  }

  .payment-stats-grid {
    gap: 6px;
  }

  .payment-stat-card {
    padding: 6px 4px;
  }

  .payment-stat-label {
    font-size: 0.65rem;
  }

  .payment-stat-value {
    font-size: 1.05rem;
  }

  .payment-guide-text {
    font-size: 0.78rem;
    padding: 6px 8px;
  }

  .payment-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: 180px;
  }

  .payment-selectable-card {
    padding: 6px 8px;
    min-height: 46px;
  }

  .payment-card-name {
    font-size: 0.74rem;
  }

  .btn-say-no,
  .payment-btn-group button {
    min-height: 44px;
  }

  /* Excess Cards Modal on Mobile */
  .modal-excess-dialog {
    max-width: min(94vw, 420px);
    padding: 14px 12px;
  }

  .excess-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: 180px;
  }

  .excess-desc-text {
    font-size: 0.84rem;
  }
}

/* ========================================================
   VERY SMALL SCREENS (<= 380px)
======================================================== */
@media (max-width: 380px) {
  header {
    padding: calc(6px + env(safe-area-inset-top, 0px)) 6px 6px 6px;
  }

  .logo {
    font-size: 0.86rem;
    padding: 2px 6px;
  }

  #room-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .header-status .badge,
  .header-status button {
    font-size: 0.66rem;
    padding: 3px 6px;
  }

  .btn-leave {
    font-size: 0.66rem;
    padding: 3px 6px;
  }

  .room-code-display {
    font-size: 1.4rem;
    padding: 8px 10px;
  }

  .btn-end-turn-sidebar {
    font-size: 0.82rem;
    padding: 8px 10px;
    min-height: 42px;
  }

  #my-properties-container {
    grid-template-columns: 1fr;
  }

  .center-table-row {
    padding: 8px 10px;
    gap: 10px;
  }

  .deck-pile-visual,
  .discard-pile-visual {
    width: 74px;
    height: 108px;
  }

  .table-center-divider {
    height: 70px;
  }

  .hand-cards .deal-card {
    width: 112px;
    height: 164px;
  }

  /* Compact Modals on Tiny Screens */
  .modal-content {
    max-width: calc(100vw - 16px);
    padding: 10px;
  }

  .modal-payment-dialog {
    max-width: calc(100vw - 16px);
    padding: 10px 8px;
  }

  .modal-excess-dialog {
    max-width: calc(100vw - 16px);
    padding: 10px 8px;
  }

  .excess-cards-grid {
    grid-template-columns: 1fr;
    max-height: 160px;
  }

  .payment-stats-grid {
    gap: 4px;
  }

  .payment-stat-label {
    font-size: 0.58rem;
  }

  .payment-stat-value {
    font-size: 0.92rem;
  }

  .payment-cards-grid {
    grid-template-columns: 1fr;
    max-height: 160px;
  }
}

