/* Monopoly Tabletop — mobile-first, UK board */

:root {
  --board-green: #1a5c3a;
  --board-felt: #1e6b42;
  --ink: #1a1a1a;
  --paper: #f3e6c8;
  --cream: #faf3e0;
  --go: #c0392b;
  --accent: #0d4a2b;
  --danger: #b91c1c;
  --ok: #15803d;
  --shadow: rgba(0, 0, 0, 0.35);
  --seat-bottom: 0deg;
  --seat-left: 90deg;
  --seat-top: 180deg;
  --seat-right: 270deg;
  --ui-bg: rgba(15, 30, 22, 0.94);
  --ui-border: rgba(243, 230, 200, 0.25);
  --font-display: "Libre Baskerville", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #0b1f14;
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--cream);
  color: var(--ink);
  transition: transform 0.12s ease, filter 0.12s ease;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: #f0c14b; color: #1a1a1a; }
button.danger { background: var(--danger); color: #fff; }
button.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--ui-border);
}
button.small { padding: 0.4rem 0.65rem; font-size: 0.85rem; }

input:not([type="checkbox"]):not([type="radio"]),
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
}
input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  box-sizing: border-box;
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  max-width: 1.1rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  flex: 0 0 1.1rem;
  align-self: center;
  accent-color: #f0c14b;
  vertical-align: middle;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.5rem; }

/* Screens */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: auto;
  padding: calc(1rem + var(--safe-top)) 1rem calc(1rem + var(--safe-bottom));
  background:
    radial-gradient(ellipse at 30% 20%, #245c3a 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, #0f3d28 0%, transparent 45%),
    linear-gradient(160deg, #0b1f14, #143525 60%, #0b1f14);
}
.screen.active { display: flex; }

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.5rem);
  letter-spacing: 0.04em;
  color: #f0c14b;
  text-shadow: 0 2px 0 #5c3a00, 0 8px 24px rgba(0,0,0,0.4);
  text-align: center;
  margin-top: 12vh;
  animation: brandIn 0.8s ease both;
}
@keyframes brandIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  animation: brandIn 0.8s 0.15s ease both;
}

.card-panel {
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  padding: 1.1rem;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  backdrop-filter: blur(8px);
}

.row { display: flex; gap: 0.5rem; align-items: center; }
.row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 0.65rem; }
.muted { opacity: 0.7; font-size: 0.9rem; }
.label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }

.player-setup {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}
.player-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-items: center;
  background: rgba(255,255,255,0.04);
  padding: 0.65rem;
  border-radius: 10px;
}
.player-row > input,
.player-row > select {
  width: 100%;
}
.colour-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.15rem;
}
.colour-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 0;
  background: var(--swatch);
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
  flex: 0 0 auto;
  min-width: 0;
}
.colour-swatch.selected {
  outline: 2px solid #f0c14b;
  outline-offset: 2px;
  border-color: #fff;
}
.colour-swatch.taken {
  opacity: 0.28;
  cursor: not-allowed;
}
@media (min-width: 420px) {
  .player-row {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .colour-pick {
    grid-column: 1 / -1;
  }
}
.token .token-icon {
  width: 85%;
  height: 85%;
  display: grid;
  place-items: center;
}
.token .token-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chip-icon {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: -0.2rem;
}
.chip-icon svg { width: 100%; height: 100%; }
.token-pick { font-size: 0.9rem; }

.rules-list { display: flex; flex-direction: column; gap: 0.55rem; margin: 0.75rem 0; }
.rule-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rule-item label { flex: 1; font-size: 0.95rem; }
.toggle {
  appearance: none;
  width: 44px; height: 26px;
  background: #334;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle:checked { background: #f0c14b; }
.toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.toggle:checked::after { transform: translateX(18px); }

/* ===== GAME TABLE ===== */
#screen-game {
  padding: 0;
  overflow: hidden;
  background: #0a1810;
}

/* Static board — never rotates; padding set by JS per active seat */
.board-fixed {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0.45rem 0.45rem clamp(5.5rem, 16vmin, 7.75rem);
  container-type: size;
  pointer-events: none;
  transition: padding 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.board-fixed .stage {
  pointer-events: auto;
}

/* Controls / chrome rotate around the fixed board */
.table-rotator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, width, height, left, top;
  background: transparent;
  overflow: hidden;
  z-index: 10;
  pointer-events: none;
}
.table-rotator .game-chrome,
.table-rotator .toast,
.table-rotator .flash,
.table-rotator .card-draw,
.table-rotator .modal-backdrop {
  pointer-events: auto;
}
.table-rotator .flash {
  pointer-events: none;
}

.game-chrome {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  pointer-events: none;
}
.game-chrome > * { pointer-events: auto; }
.game-chrome.top { top: 0; padding-top: max(0.4rem, var(--safe-top)); }
.game-chrome.bottom {
  bottom: 0;
  padding-bottom: max(0.35rem, var(--safe-bottom));
  flex-direction: column;
  gap: 0.3rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.82) 28%);
}

.chrome-icons {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
button.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 10px;
}
button.icon-btn svg {
  display: block;
}

.action-panel {
  width: 100%;
  max-width: 520px;
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: 14px 14px 0 0;
  padding: 0.45rem 0.65rem calc(0.45rem + var(--safe-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,0.4);
}
.action-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.action-body {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  opacity: 0.9;
  min-height: 0;
}
.action-body:empty { display: none; }
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.action-buttons button {
  flex: 1 1 auto;
  min-width: 4.5rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
}

.hud-pill {
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.stage {
  position: relative;
  width: min(100cqw, 100cqh);
  height: min(100cqw, 100cqh);
  max-width: 100%;
  max-height: 100%;
}

.board {
  position: absolute;
  inset: 4%;
  background:
    radial-gradient(circle at 50% 50%, #248050 0%, var(--board-green) 70%),
    var(--board-felt);
  border: 3px solid #0d2e1c;
  box-shadow:
    0 0 0 5px #5c3d0a,
    0 0 0 8px #2a1a08,
    0 20px 50px var(--shadow);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1.35fr repeat(9, 1fr) 1.35fr;
  grid-template-rows: 1.35fr repeat(9, 1fr) 1.35fr;
}

.center-logo {
  grid-column: 2 / 11;
  grid-row: 2 / 11;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  container-type: size;
}

/* Player cash around the centre, facing each seat */
.center-cash {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.seat-cash {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(8, 20, 12, 0.78);
  color: #f3e6c8;
  font-weight: 600;
  font-size: clamp(0.58rem, 2.35cqmin, 0.78rem);
  border: 1.5px solid color-mix(in srgb, var(--seat-colour, #fff) 65%, transparent);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  font-variant-numeric: tabular-nums;
}
.seat-cash.empty {
  display: none;
}
.seat-cash.active {
  background: rgba(15, 35, 22, 0.92);
  border-color: var(--seat-colour, #f0c14b);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--seat-colour, #f0c14b) 45%, transparent);
}
.seat-cash .chip-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}
.seat-cash .chip-icon svg {
  width: 100%;
  height: 100%;
}
/* Pin to each inner edge (not % of the chip — that squashed them in the middle) */
.seat-cash[data-seat="0"] {
  left: 50%;
  bottom: 5%;
  top: auto;
  transform: translateX(-50%) rotate(0deg);
}
.seat-cash[data-seat="1"] {
  /* Player 2 — left seat (clockwise from bottom) */
  left: 5%;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}
.seat-cash[data-seat="2"] {
  left: 50%;
  top: 5%;
  transform: translateX(-50%) rotate(180deg);
}
.seat-cash[data-seat="3"] {
  /* Player 4 — right seat */
  right: 5%;
  left: auto;
  top: 50%;
  transform: translateY(-50%) rotate(270deg);
}

.cell {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #2a2a2a;
  overflow: hidden;
  container-type: size;
}
.cell-inner {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: clamp(0.48rem, 6.8cqmin, 0.7rem);
  line-height: 1.05;
  color: var(--ink);
}
.cell.edge-bottom .cell-inner,
.cell.edge-top .cell-inner {
  inset: 0;
  width: 100%;
  height: 100%;
}
/*
 * Outward-facing labels (base of letters toward the nearest outer edge):
 *   bottom → upright, top → 180°, left → 90°, right → 270°
 * Colour band stays toward the centre.
 */
.cell.edge-bottom .cell-inner {
  /* upright — base toward bottom edge */
}
.cell.edge-top .cell-inner {
  transform: rotate(180deg);
}
/* Side tiles: swap axes then rotate */
.cell.edge-left .cell-inner,
.cell.edge-right .cell-inner {
  width: 100cqh;
  height: 100cqw;
  left: 50%;
  top: 50%;
}
.cell.edge-left .cell-inner {
  transform: translate(-50%, -50%) rotate(90deg);
}
.cell.edge-right .cell-inner {
  transform: translate(-50%, -50%) rotate(270deg);
}

.cell .name {
  padding: 1px 2px;
  font-weight: 700;
  text-align: center;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  hyphens: none;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.05;
}
.cell .name.icon-name {
  font-size: 1.35em;
  font-weight: 800;
}
.cell .name .chest-icon {
  width: 1.1em;
  height: 1.1em;
  display: block;
}
.cell .price {
  text-align: center;
  font-size: 0.92em;
  opacity: 0.85;
  padding: 0 1px 1px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.cell .price[hidden] {
  display: none !important;
}
.cell .parking-pot {
  font-weight: 700;
  opacity: 1;
  color: #1a1a1a;
}
.cell .swatch {
  /* Invisible flex spacer — visible colour is painted on the cell edge */
  height: 22%;
  min-height: 5px;
  max-height: 30%;
  width: 100%;
  flex-shrink: 0;
  visibility: hidden;
  pointer-events: none;
}

/*
 * Set colour band on the cell itself (inner edge, toward centre).
 * Avoids gaps on side tiles where the rotated .cell-inner undershoots.
 */
.cell.has-swatch::before {
  content: "";
  position: absolute;
  background: var(--swatch, transparent);
  pointer-events: none;
  z-index: 1;
}
.cell.has-swatch.edge-bottom::before {
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  min-height: 5px;
  max-height: 30%;
}
.cell.has-swatch.edge-top::before {
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  min-height: 5px;
  max-height: 30%;
}
.cell.has-swatch.edge-left::before {
  top: 0;
  bottom: 0;
  right: 0;
  width: 22%;
  min-width: 5px;
  max-width: 30%;
}
.cell.has-swatch.edge-right::before {
  top: 0;
  bottom: 0;
  left: 0;
  width: 22%;
  min-width: 5px;
  max-width: 30%;
}

.cell.corner .name { font-size: 1.05em; font-weight: 800; }
.cell.special { background: #ebe1c4; }

/* Soft owner wash over the tile body */
.cell.owned {
  background: color-mix(in srgb, var(--owner-colour, transparent) 18%, var(--paper));
  overflow: visible; /* let outer owner bar sit just off the tile */
}
.cell.owned::after {
  content: "";
  position: absolute;
  background: var(--owner-colour, transparent);
  pointer-events: none;
  z-index: 4;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--owner-colour) 35%, #000);
}
.cell.owned.edge-bottom::after {
  left: 0;
  right: 0;
  top: auto;
  bottom: -5px;
  height: 5px;
}
.cell.owned.edge-top::after {
  left: 0;
  right: 0;
  bottom: auto;
  top: -5px;
  height: 5px;
}
.cell.owned.edge-left::after {
  top: 0;
  bottom: 0;
  right: auto;
  left: -5px;
  width: 5px;
}
.cell.owned.edge-right::after {
  top: 0;
  bottom: 0;
  left: auto;
  right: -5px;
  width: 5px;
}

/* Mortgaged: red wash, fully opaque (no greyscale fade) */
.cell.mortgaged {
  filter: none;
  opacity: 1;
  background: color-mix(in srgb, #c62828 46%, var(--paper)) !important;
}
.cell.mortgaged .name::after { content: " ✖"; }
.cell.mortgaged.has-swatch::before {
  filter: saturate(0.55);
}

.houses-row {
  display: flex;
  justify-content: center;
  gap: 1px;
  padding: 0;
  min-height: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.houses-row:empty { display: none; }
.house-pip {
  width: 4px; height: 4px;
  background: #15803d;
  border-radius: 1px;
}
.house-pip.hotel {
  width: 9px; height: 5px;
  background: #b91c1c;
  border-radius: 1px;
}

/* Grid placement: bottom row L→R = GO..Jail (0..10) */
/* Right column B→T = 11..19 (Pall Mall..Vine) — wait classic: after Jail going up is Pall Mall */
/* Top row R→L = 20..30 */
/* Left column T→B = 31..39 */

.cell[data-id="0"]  { grid-column: 11; grid-row: 11; } /* GO bottom-right */
.cell[data-id="1"]  { grid-column: 10; grid-row: 11; }
.cell[data-id="2"]  { grid-column: 9; grid-row: 11; }
.cell[data-id="3"]  { grid-column: 8; grid-row: 11; }
.cell[data-id="4"]  { grid-column: 7; grid-row: 11; }
.cell[data-id="5"]  { grid-column: 6; grid-row: 11; }
.cell[data-id="6"]  { grid-column: 5; grid-row: 11; }
.cell[data-id="7"]  { grid-column: 4; grid-row: 11; }
.cell[data-id="8"]  { grid-column: 3; grid-row: 11; }
.cell[data-id="9"]  { grid-column: 2; grid-row: 11; }
.cell[data-id="10"] { grid-column: 1; grid-row: 11; } /* Jail bottom-left */

.cell[data-id="11"] { grid-column: 1; grid-row: 10; }
.cell[data-id="12"] { grid-column: 1; grid-row: 9; }
.cell[data-id="13"] { grid-column: 1; grid-row: 8; }
.cell[data-id="14"] { grid-column: 1; grid-row: 7; }
.cell[data-id="15"] { grid-column: 1; grid-row: 6; }
.cell[data-id="16"] { grid-column: 1; grid-row: 5; }
.cell[data-id="17"] { grid-column: 1; grid-row: 4; }
.cell[data-id="18"] { grid-column: 1; grid-row: 3; }
.cell[data-id="19"] { grid-column: 1; grid-row: 2; }

.cell[data-id="20"] { grid-column: 1; grid-row: 1; } /* Free Parking top-left */
.cell[data-id="21"] { grid-column: 2; grid-row: 1; }
.cell[data-id="22"] { grid-column: 3; grid-row: 1; }
.cell[data-id="23"] { grid-column: 4; grid-row: 1; }
.cell[data-id="24"] { grid-column: 5; grid-row: 1; }
.cell[data-id="25"] { grid-column: 6; grid-row: 1; }
.cell[data-id="26"] { grid-column: 7; grid-row: 1; }
.cell[data-id="27"] { grid-column: 8; grid-row: 1; }
.cell[data-id="28"] { grid-column: 9; grid-row: 1; }
.cell[data-id="29"] { grid-column: 10; grid-row: 1; }
.cell[data-id="30"] { grid-column: 11; grid-row: 1; } /* Go to Jail top-right */

.cell[data-id="31"] { grid-column: 11; grid-row: 2; }
.cell[data-id="32"] { grid-column: 11; grid-row: 3; }
.cell[data-id="33"] { grid-column: 11; grid-row: 4; }
.cell[data-id="34"] { grid-column: 11; grid-row: 5; }
.cell[data-id="35"] { grid-column: 11; grid-row: 6; }
.cell[data-id="36"] { grid-column: 11; grid-row: 7; }
.cell[data-id="37"] { grid-column: 11; grid-row: 8; }
.cell[data-id="38"] { grid-column: 11; grid-row: 9; }
.cell[data-id="39"] { grid-column: 11; grid-row: 10; }

.tokens-layer {
  display: none; /* tokens live inside cells now */
}

.cell > .token {
  position: absolute;
  width: min(48%, 1.85rem);
  height: min(48%, 1.85rem);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.65));
}
.cell > .token .ring {
  position: absolute;
  inset: 0;
  border: 2.5px solid var(--token-colour);
  border-radius: 50%;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.12),
    0 0 0 1.5px rgba(0,0,0,0.35);
}
.cell > .token .token-icon {
  position: relative;
  width: 72%;
  height: 72%;
  display: grid;
  place-items: center;
  z-index: 1;
}
.cell > .token .token-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.cell > .token.current {
  animation: pulseToken 1.2s ease infinite;
  z-index: 8;
  width: min(54%, 2.05rem);
  height: min(54%, 2.05rem);
}
@keyframes pulseToken {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.12); }
}

.dice-face {
  display: inline-flex;
  gap: 0.35rem;
  font-size: 1.4rem;
  margin: 0.15rem 0;
}

/* Modals / sheets */
.sheet {
  background: #14261c;
  color: var(--cream);
  width: 100%;
  max-width: 520px;
  max-height: 85%;
  overflow: auto;
  border-radius: 18px 18px 0 0;
  padding: 1rem 1rem calc(1rem + var(--safe-bottom));
  border: 1px solid var(--ui-border);
  animation: sheetUp 0.28s ease;
}
@keyframes sheetUp {
  from { transform: translateY(40%); opacity: 0.5; }
  to { transform: none; opacity: 1; }
}
.sheet h2 { color: #f0c14b; }

.prop-list { display: flex; flex-direction: column; gap: 0.35rem; }
.prop-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.15rem;
  border-radius: 0;
  background: transparent;
  font-size: 0.9rem;
  cursor: pointer;
}
.prop-item input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  max-width: 1.1rem;
  flex: 0 0 1.1rem;
}
.prop-item .sw {
  width: 10px; height: 28px; border-radius: 2px; flex-shrink: 0;
}
.prop-item .meta {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}
.prop-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.log-list {
  font-size: 0.82rem;
  max-height: 50vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.log-list div {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.toast {
  position: absolute;
  top: max(1rem, var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% - 2rem));
  background: #f0c14b;
  color: #1a1a1a;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  z-index: 100;
  transition: transform 0.3s ease, opacity 0.2s ease;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
.toast:empty {
  display: none;
}

/* Brief centre flash — not a modal; auto-dismisses */
.flash {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 1rem;
}
.flash[hidden] { display: none !important; }
.flash-text {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5.5vmin, 2rem);
  font-weight: 700;
  color: #f0c14b;
  text-align: center;
  line-height: 1.25;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  background: rgba(8, 20, 12, 0.82);
  border: 1px solid rgba(240, 193, 75, 0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  max-width: min(18rem, 85%);
}
.flash.show .flash-text {
  animation: flashPop 1.35s ease forwards;
}
.flash.rent .flash-text {
  color: #f3e6c8;
  border-color: rgba(243, 230, 200, 0.3);
}
@keyframes flashPop {
  0% { opacity: 0; transform: scale(0.88); }
  12% { opacity: 1; transform: scale(1.04); }
  22% { transform: scale(1); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.98); }
}

.card-draw {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.55);
}
.card-draw[hidden] { display: none !important; }
.card-draw-face {
  width: min(100%, 22rem);
  background: #f3e6c8;
  color: #1a1a1a;
  border-radius: 14px;
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  text-align: center;
  animation: cardPop 0.28s ease;
}
.card-draw-face.chance {
  border-top: 8px solid #c0392b;
}
.card-draw-face.chest {
  border-top: 8px solid #1e5a9c;
}
.card-draw-kind {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}
.card-draw-text {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 1.1rem;
}
.card-draw-face button {
  width: 100%;
}
@keyframes cardPop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: none; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

@media (min-width: 700px) {
  .board { inset: 5%; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .action-panel { max-height: 38%; overflow: auto; }
}
