/* ==========================================================================
   Richup-Style Monopoly UI - High-Craft Obsidian & Emerald Dark Theme
   ========================================================================== */

:root {
  --bg-base: #0b0f17;
  --bg-surface: #131924;
  --bg-surface-2: #1b2333;
  --bg-elevated: #232d40;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #10b981;
  --accent-primary-hover: #059669;
  --accent-secondary: #0ea5e9;
  --accent-secondary-hover: #0284c7;
  --accent-success: #10b981;
  --accent-success-hover: #059669;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #0ea5e9;

  /* Monopoly Property Group Colors */
  --prop-brown: #92400e;
  --prop-light-blue: #38bdf8;
  --prop-pink: #ec4899;
  --prop-orange: #f97316;
  --prop-red: #ef4444;
  --prop-yellow: #eab308;
  --prop-green: #10b981;
  --prop-dark-blue: #0284c7;
  --prop-railroad: #cbd5e1;
  --prop-utility: #14b8a6;

  /* Unified Radius System: 12px panels, 8px controls */
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 12px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.56);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html,
body {
  height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.38);
}

/* ==========================================================================
   Unified Buttons & Inputs (40-44px height, 8px radius, crisp micro-steps)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

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

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

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

.btn-primary {
  background: var(--accent-primary);
  color: #042f2e;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}
.btn-primary:hover:not(:disabled) {
  background: #34d399;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.36);
}

.btn-success {
  background: var(--accent-success);
  color: #042f2e;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}
.btn-success:hover:not(:disabled) {
  background: #34d399;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.36);
}

.btn-warning {
  background: var(--accent-warning);
  color: #0b0f17;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.24);
}
.btn-warning:hover:not(:disabled) {
  background: #fbbf24;
}

.btn-danger {
  background: var(--accent-danger);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.24);
}
.btn-danger:hover:not(:disabled) {
  background: #f87171;
}

.btn-ghost {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* ==========================================================================
   Lobby View
   ========================================================================== */

.lobby-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.12), transparent 44%),
    radial-gradient(circle at 82% 82%, rgba(14, 165, 233, 0.1), transparent 44%),
    var(--bg-base);
}

.lobby-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.lobby-header {
  text-align: center;
  margin-bottom: 24px;
}

.lobby-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.lobby-logo-badge {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #0b0f17;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 18px;
}

.lobby-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
}

.lobby-field {
  margin-bottom: 18px;
}

.lobby-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: transform 0.14s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.token-option:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.token-option:active {
  transform: scale(0.96);
}

.token-option.selected {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.14);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.14s ease, box-shadow 0.15s ease;
}

.color-option:hover {
  transform: scale(1.08);
}

.color-option.selected {
  border-color: #f8fafc;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.55);
}

.lobby-share-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 12px;
  margin-bottom: 18px;
}

.lobby-share-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.lobby-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 4px 0;
}

.lobby-divider::before,
.lobby-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ==========================================================================
   Main Game Layout
   ========================================================================== */

.game-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr) 296px;
  gap: 16px;
  height: 100vh;
  padding: 16px;
  max-width: 1680px;
  margin: 0 auto;
}

.sidebar-left,
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.panel-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

/* Players List */
.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.player-card:last-child {
  margin-bottom: 0;
}

.player-card.active-turn {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.1);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.player-card.bankrupt {
  opacity: 0.42;
  filter: grayscale(0.85);
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
}

.player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-jail {
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-bankrupt {
  background: rgba(239, 68, 68, 0.16);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-you {
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.28);
}

.player-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 12px;
}

.player-cash {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent-success);
}

.player-networth {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-secondary);
}

/* My Properties Panel */
.my-prop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  margin-bottom: 6px;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.14s ease;
}

.my-prop-item:last-child {
  margin-bottom: 0;
}

.my-prop-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.my-prop-swatch {
  width: 8px;
  height: 22px;
  border-radius: 3px;
  flex-shrink: 0;
}

.my-prop-name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-prop-meta {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   11x11 Monopoly Board
   ========================================================================== */

.board-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.monopoly-board {
  width: min(100%, calc(100vh - 32px));
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: 1.45fr repeat(9, 1fr) 1.45fr;
  grid-template-rows: 1.45fr repeat(9, 1fr) 1.45fr;
  gap: 2px;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 4px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.board-tile {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.board-tile:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-2);
  z-index: 5;
}

.board-tile.mortgaged {
  opacity: 0.55;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-surface),
    var(--bg-surface) 6px,
    rgba(239, 68, 68, 0.12) 6px,
    rgba(239, 68, 68, 0.12) 12px
  );
}

.tile-color-bar {
  height: 18%;
  min-height: 8px;
  width: 100%;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.tile-side-left .tile-color-bar,
.tile-side-right .tile-color-bar {
  height: 16%;
}

/* Group Colors */
.group-brown { background-color: var(--prop-brown); }
.group-light_blue { background-color: var(--prop-light-blue); }
.group-pink { background-color: var(--prop-pink); }
.group-orange { background-color: var(--prop-orange); }
.group-red { background-color: var(--prop-red); }
.group-yellow { background-color: var(--prop-yellow); }
.group-green { background-color: var(--prop-green); }
.group-dark_blue { background-color: var(--prop-dark-blue); }
.group-railroad { background-color: var(--prop-railroad); }
.group-utility { background-color: var(--prop-utility); }

.tile-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 3px;
  text-align: center;
  gap: 2px;
}

.tile-name {
  font-size: clamp(7px, 0.72vw, 10px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-price {
  font-size: clamp(7px, 0.68vw, 9.5px);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-secondary);
}

.tile-icon {
  font-size: clamp(12px, 1.35vw, 19px);
  line-height: 1;
}

.corner-tile {
  background: var(--bg-surface-2);
}

.corner-tile .tile-name {
  font-size: clamp(8px, 0.85vw, 11px);
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* Ownership Dot */
.tile-owner-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Houses / Hotels */
.tile-buildings {
  position: absolute;
  top: 2px;
  left: 3px;
  display: flex;
  gap: 2px;
  align-items: center;
}

.house-pip {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #10b981;
  border: 1px solid #042f2e;
}

.hotel-pip {
  width: 10px;
  height: 7px;
  border-radius: 2px;
  background: #ef4444;
  border: 1px solid #450a0a;
}

/* Player Tokens on Tile */
.tile-tokens {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
  z-index: 4;
}

.board-token {
  width: clamp(16px, 1.7vw, 22px);
  height: clamp(16px, 1.7vw, 22px);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(10px, 1.05vw, 14px);
  border: 1.5px solid #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Center Board HUD
   ========================================================================== */

.board-center {
  grid-column: 2 / 11;
  grid-row: 2 / 11;
  background: radial-gradient(circle at 50% 35%, #182132 0%, #0b0f17 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  gap: 12px;
  overflow: hidden;
}

.center-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.turn-banner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.turn-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.turn-text-main {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.turn-text-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.turn-pill-you {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-primary);
  font-weight: 700;
}

.center-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

/* Pipped Tactile Dice */
.dice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dice-tray {
  display: flex;
  align-items: center;
  gap: 14px;
}

.die-face {
  width: 54px;
  height: 54px;
  background: linear-gradient(165deg, #ffffff 0%, #e2e8f0 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 -3px 0 rgba(15, 23, 42, 0.16);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
  font-variant-numeric: tabular-nums;
}

.die-face.doubles {
  box-shadow: 0 0 0 2px var(--accent-warning), 0 8px 22px rgba(245, 158, 11, 0.28);
}

.die-pips {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  gap: 2px;
}

.die-pip {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #0b0f17;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.die-pip-empty {
  width: 7px;
  height: 7px;
}

.dice-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(19, 25, 36, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px 10px;
}

.dice-readout strong {
  color: var(--text-primary);
}

.dice-doubles-tag {
  color: var(--accent-warning);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Live Auction Box inside Center */
.auction-banner {
  width: 100%;
  max-width: 360px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.auction-title {
  font-weight: 700;
  color: var(--accent-warning);
  font-size: 13px;
  margin-bottom: 4px;
}

.auction-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.auction-meta strong {
  color: var(--text-primary);
}

.auction-no-bids {
  color: var(--text-muted);
}

.auction-bid-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

/* Game Log */
.center-log {
  height: 116px;
  background: rgba(11, 15, 23, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  overflow-y: auto;
  font-size: 12px;
}

.log-entry {
  padding: 3px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-entry:last-child {
  border-bottom: none;
  color: var(--text-primary);
}

/* ==========================================================================
   Right Sidebar: Chat
   ========================================================================== */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
}

.chat-msg-author {
  font-weight: 700;
  font-size: 11.5px;
  margin-bottom: 2px;
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
}

.chat-form .input {
  height: 36px;
}

.chat-form .btn-sm {
  height: 36px;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.76);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.16s ease-out;
}

.modal-card.modal-lg {
  max-width: 640px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 15px;
}

.modal-body {
  padding: 18px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 15, 23, 0.45);
}

.prop-card-banner {
  height: 14px;
  width: 100%;
}

.prop-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.prop-stat-box {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.prop-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.prop-stat-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
}

/* Trade Builder */
.trade-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.trade-col {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.trade-prop-list {
  max-height: 160px;
  overflow-y: auto;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trade-prop-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.trade-prop-check:hover {
  background: var(--bg-surface-2);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-info);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn 0.18s ease-out;
}

.toast.toast-success { border-left-color: var(--accent-success); }
.toast.toast-warning { border-left-color: var(--accent-warning); }
.toast.toast-danger { border-left-color: var(--accent-danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1120px) {
  .game-shell {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    height: auto;
    min-height: 100vh;
  }
  .sidebar-right {
    grid-column: 1 / -1;
    height: 280px;
  }
}

@media (max-width: 820px) {
  .game-shell {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 12px;
  }
  .monopoly-board {
    width: 100%;
  }
  .trade-columns {
    grid-template-columns: 1fr;
  }
}
