/* ======================================================
   مونوپولی فارسی — CSS
   Mobile-first · RTL · Glassmorphism · Minimal Modern
   ====================================================== */

/* ─── CSS Variables ─── */
:root {
  --clr-bg: #f0f2f7;
  --clr-surface: #ffffff;
  --clr-surface-2: #f8faff;
  --clr-border: rgba(255,255,255,0.7);
  --clr-border-2: rgba(0,0,0,0.06);

  --clr-primary: #4f7ef0;
  --clr-primary-light: #dce8ff;
  --clr-primary-dark: #3a63c8;

  --clr-green: #34c47c;
  --clr-green-light: #d4f5e5;

  --clr-accent: #7c5cbf;
  --clr-accent-light: #ede7ff;

  --clr-danger: #f05050;
  --clr-danger-light: #ffe0e0;

  --clr-warning: #f0a030;
  --clr-warning-light: #fff3d4;

  --clr-text: #1a1f36;
  --clr-text-2: #6b7280;
  --clr-text-3: #9ca3af;

  /* Player colors */
  --p1: #4f7ef0;
  --p2: #f06090;
  --p3: #34c47c;
  --p4: #f0a030;

  /* Board property colors */
  --prop-brown:   #a0522d;
  --prop-lblue:   #87ceeb;
  --prop-pink:    #e86080;
  --prop-orange:  #f5843c;
  --prop-red:     #e83030;
  --prop-yellow:  #f5c842;
  --prop-green:   #2a9d5c;
  --prop-dblue:   #2355c4;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(79,126,240,0.08);
  --shadow-md: 0 4px 20px rgba(79,126,240,0.13);
  --shadow-lg: 0 8px 40px rgba(79,126,240,0.18);

  --font: 'Tanha', sans-serif;

  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(.4,0,.2,1);
}
@font-face {
  font-family: 'Tanha';
  src: url('fonts/Tanha.eot'); 
  src: url('fonts/Tanha.eot?#iefix') format('embedded-opentype'), 
       url('fonts/Tanha.woff2') format('woff2'),
       url('fonts/Tanha.woff') format('woff'), 
       url('fonts/Tanha.ttf') format('truetype'); 
  font-weight: normal;
  font-style: normal;
  font-display: swap; 
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  direction: rtl;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  user-select: none;
}

.hidden { display: none !important; }

/* ─── Splash Screen ─── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a2a6c 0%, #3a5fc4 40%, #4f7ef0 70%, #7c5cbf 100%);
  animation: splash-bg-in 0.6s ease forwards;
}

@keyframes splash-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: splash-logo-in 0.8s 0.3s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes splash-logo-in {
  from { opacity: 0; transform: scale(0.7) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.splash-icon {
  font-size: 72px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.splash-title {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.splash-subtitle {
  font-size: 22px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  letter-spacing: 4px;
}

.splash-loader {
  width: 200px;
  animation: splash-logo-in 0.5s 0.9s both;
}

.loader-bar {
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  background: #fff;
  border-radius: 999px;
  width: 0%;
  animation: loader-grow 1.6s 1s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes loader-grow {
  to { width: 100%; }
}

/* ─── App container ─── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 20px;
  gap: 10px;
  animation: app-in 0.5s ease;
}

@keyframes app-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Glass Card Utility ─── */
.glass-card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-md);
}

/* ─── HEADER ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--clr-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  flex-shrink: 0;
}

.icon-btn:active {
  transform: scale(0.92);
  background: #c5d8ff;
}

.active-player-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--clr-primary-light);
  border-radius: 20px;
  padding: 5px 12px 5px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-primary-dark);
  max-width: 110px;
  overflow: hidden;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p1);
  flex-shrink: 0;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
}

.header-center {
  flex: 1;
  text-align: center;
}

.header-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -0.3px;
}

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

.player-money-display {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--clr-green-light);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1d8c56;
}

.money-icon { font-size: 14px; }

/* ─── GAME BOARD ─── */
.game-board-wrapper {
  padding: 0 12px;
}

.board {
  /* 11×11 grid, 10 cells per edge + 4 corners */
  display: grid;
  grid-template-columns: 44px repeat(9, 1fr) 44px;
  grid-template-rows: 44px repeat(9, 1fr) 44px;
  gap: 1.5px;
  background: var(--clr-border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--clr-border-2);
  aspect-ratio: 1/1;
  width: 100%;
  position: relative;
}

/* Center area */
.board-center {
  grid-column: 2 / 11;
  grid-row: 2 / 11;
  background: linear-gradient(135deg, #f0f5ff 0%, #fdf0ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  gap: 4px;
  padding: 8px;
}

.board-center-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--clr-primary);
  letter-spacing: -0.5px;
}

.board-center-icon {
  font-size: 32px;
  animation: float 3s ease-in-out infinite;
}

.board-center-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--clr-text-3);
  letter-spacing: 2px;
}

/* board pieces container in center */
.pieces-on-board {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
}

/* Board Cell Base */
.cell {
  background: var(--clr-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.cell:active {
  transform: scale(0.94);
}

/* Color stripe at top of property cells */
.cell-stripe {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: 6px;
  border-radius: 0;
}

/* Bottom cells — stripe at bottom */
.cell.bottom .cell-stripe {
  top: auto;
  bottom: 0;
}
/* Left cells — stripe on right */
.cell.left-col .cell-stripe {
  top: 0; bottom: 0;
  left: auto;
  right: 0;
  width: 6px;
  height: auto;
}
/* Right cells — stripe on left */
.cell.right-col .cell-stripe {
  top: 0; bottom: 0;
  right: auto;
  left: 0;
  width: 6px;
  height: auto;
}

.cell-emoji {
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.cell-name {
  font-size: 5.5px;
  font-weight: 700;
  color: var(--clr-text);
  text-align: center;
  line-height: 1.2;
  word-break: keep-all;
  padding: 0 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cell-price {
  font-size: 4.5px;
  font-weight: 500;
  color: var(--clr-text-3);
  text-align: center;
}

/* Corner cells — larger */
.cell.corner {
  background: var(--clr-surface-2);
  cursor: default;
}

.cell.corner:active { transform: none; }

.corner-emoji {
  font-size: 18px;
  line-height: 1;
}

.corner-label {
  font-size: 6.5px;
  font-weight: 700;
  color: var(--clr-text-2);
  text-align: center;
  margin-top: 2px;
  line-height: 1.2;
  white-space: nowrap;
}

/* Owner indicator dot */
.cell-owner-dot {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid #fff;
}

/* Player piece on cell */
.piece {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.9);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: all 0.4s cubic-bezier(.34,1.56,.64,1);
}

.cell.highlight-active {
  background: var(--clr-primary-light);
  box-shadow: inset 0 0 0 2px var(--clr-primary);
}

/* ─── PLAYERS PANEL ─── */
.players-panel {
  padding: 0 12px;
}

.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Player Card */
.player-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 2px solid transparent;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--player-color);
  border-radius: 0 4px 4px 0;
  transition: width var(--transition);
}

.player-card.active {
  border-color: var(--player-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--player-color) 15%, transparent),
              var(--shadow-md);
}

.player-card.active::before {
  width: 6px;
}

.player-card.eliminated {
  opacity: 0.45;
  filter: grayscale(0.7);
}

.player-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--player-color) 15%, white);
  border: 2.5px solid var(--player-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.player-card.active .player-avatar {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--player-color) 25%, transparent);
}

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

.player-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-status {
  font-size: 10px;
  font-weight: 500;
  color: var(--clr-text-3);
  margin-top: 1px;
}

.player-card.active .player-status {
  color: var(--player-color);
}

.player-turn-badge {
  background: var(--player-color);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  display: none;
  flex-shrink: 0;
}

.player-card.active .player-turn-badge {
  display: block;
  animation: badge-pop 0.3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes badge-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.player-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.stat-item {
  background: var(--clr-bg);
  border-radius: 8px;
  padding: 5px 7px;
  text-align: center;
}

.stat-val {
  font-size: 11px;
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1;
}

.stat-lbl {
  font-size: 8.5px;
  font-weight: 500;
  color: var(--clr-text-3);
  margin-top: 1px;
}

/* Jail indicator */
.jail-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  display: none;
}

.player-card.in-jail .jail-indicator {
  display: block;
}

/* ─── CONTROLS PANEL ─── */
.controls-panel {
  margin: 0 12px;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Dice */
.dice-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dice-display {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.die {
  width: 50px;
  height: 50px;
  background: var(--clr-surface);
  border-radius: 14px;
  border: 2px solid var(--clr-border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.15s, box-shadow 0.15s;
  perspective: 100px;
}

.die.rolling {
  animation: die-roll 0.6s ease;
}

@keyframes die-roll {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-15deg) scale(1.1); }
  40%  { transform: rotate(20deg) scale(0.95); }
  60%  { transform: rotate(-10deg) scale(1.05); }
  80%  { transform: rotate(8deg) scale(0.98); }
  100% { transform: rotate(0deg) scale(1); }
}

.dice-total {
  flex: 1;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--clr-text);
}

/* Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 8px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.2px;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}

.btn:active::after { background: rgba(255,255,255,0.2); }
.btn:active { transform: scale(0.95); }

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,126,240,0.35);
}

.btn-primary:active { box-shadow: 0 2px 6px rgba(79,126,240,0.25); }

.btn-accent {
  background: var(--clr-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(52,196,124,0.35);
}

.btn-secondary {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border-2);
}

.btn-danger {
  background: var(--clr-danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(240,80,80,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text-2);
  border: 1.5px solid var(--clr-border-2);
}

.btn-ghost:active { background: var(--clr-bg); }

.btn-full { width: 100%; }
.btn-large { padding: 12px 10px; font-size: 11px; flex-direction: column; gap: 3px; min-height: 58px; }
.btn-sm { padding: 8px 14px; font-size: 12px; border-radius: 10px; }

.btn-icon { font-size: 16px; }
.btn-large .btn-icon { font-size: 20px; }

/* ─── MODALS ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 20, 50, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 12px;
  animation: overlay-in 0.25s ease;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: var(--clr-surface);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
  width: calc(100% - 24px);
  max-width: 440px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: modal-slide-in 0.35s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes modal-slide-in {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-color-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  padding-top: 8px;
}

.modal-emoji {
  font-size: 36px;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--clr-text);
  text-align: center;
  letter-spacing: -0.5px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--clr-text-2);
  text-align: center;
}

.modal-price-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.price-card {
  background: var(--clr-bg);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.price-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--clr-text-3);
  margin-bottom: 4px;
}

.price-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--clr-text);
}

.modal-info {
  font-size: 12px;
  color: var(--clr-text-2);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
}

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

/* Chance card */
.chance-card {
  text-align: center;
}

.chance-icon-wrap {
  font-size: 48px;
  margin-bottom: 8px;
  animation: float 2s ease-in-out infinite;
}

.chance-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--clr-text);
  margin: 12px 0 8px;
  line-height: 1.5;
}

.chance-amount {
  font-size: 26px;
  font-weight: 900;
  color: var(--clr-green);
  margin-bottom: 20px;
}

.chance-amount.negative { color: var(--clr-danger); }

/* Tax card */
.tax-card { text-align: center; }

.tax-icon-wrap {
  font-size: 48px;
  margin-bottom: 8px;
}

.tax-amount {
  font-size: 32px;
  font-weight: 900;
  color: var(--clr-danger);
  margin: 16px 0 24px;
}

/* Jail card */
.jail-card { text-align: center; }

.jail-icon-wrap {
  font-size: 48px;
  margin-bottom: 8px;
  animation: shake 0.5s ease 0.3s;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.jail-desc {
  font-size: 16px;
  color: var(--clr-text-2);
  margin: 12px 0 24px;
}

/* Rent card */
.rent-card { text-align: center; }
.rent-icon-wrap { font-size: 48px; margin-bottom: 8px; }
.rent-amount {
  font-size: 32px;
  font-weight: 900;
  color: var(--clr-danger);
  margin: 16px 0 24px;
}

/* Winner card */
.winner-card { text-align: center; }
.winner-animation {
  font-size: 72px;
  animation: winner-bounce 0.6s cubic-bezier(.34,1.56,.64,1);
  display: block;
  margin-bottom: 8px;
}

@keyframes winner-bounce {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.winner-name {
  font-size: 32px;
  font-weight: 900;
  color: var(--clr-primary);
  margin: 8px 0 4px;
}

.winner-subtitle {
  font-size: 14px;
  color: var(--clr-text-3);
  margin-bottom: 24px;
}

/* Assets modal */
.assets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 16px;
}

.asset-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--clr-bg);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.asset-color {
  width: 12px;
  height: 32px;
  border-radius: 4px;
  flex-shrink: 0;
}

.asset-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
}

.asset-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--clr-primary);
}

.assets-empty {
  text-align: center;
  padding: 24px;
  color: var(--clr-text-3);
  font-size: 14px;
}

/* Settings */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--clr-border-2);
}

.setting-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--clr-text);
}

/* Toggle */
.toggle { position: relative; display: inline-block; width: 46px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--clr-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Cell info modal */
.cell-info-body {
  margin-bottom: 20px;
}

.cell-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--clr-border-2);
  font-size: 13px;
}

.cell-info-row:last-child { border-bottom: none; }

.cell-info-key {
  color: var(--clr-text-2);
  font-weight: 500;
}

.cell-info-val {
  color: var(--clr-text);
  font-weight: 700;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26,31,54,0.92);
  color: #fff;
  border-radius: 30px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  white-space: nowrap;
  animation: toast-in 0.3s cubic-bezier(.34,1.56,.64,1) forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  pointer-events: none;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--clr-border-2); border-radius: 4px; }

/* ─── Responsive tweaks ─── */
@media (max-height: 700px) {
  .header-inner { height: 52px; }
  .btn-large { min-height: 50px; padding: 8px 6px; }
  .controls-panel { padding: 12px; gap: 8px; }
  .die { width: 44px; height: 44px; font-size: 20px; }
}

@media (min-width: 400px) {
  .cell-emoji { font-size: 12px; }
  .cell-name { font-size: 6px; }
  .cell-price { font-size: 5px; }
  .corner-emoji { font-size: 20px; }
  .corner-label { font-size: 7px; }
  .btn-large { font-size: 12px; }
}

/* ─── Background decoration ─── */
body::before {
  content: '';
  position: fixed;
  top: -180px;
  right: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79,126,240,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(124,92,191,0.09) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.app { position: relative; z-index: 1; }
