/* PI Monopoly - classic vintage-luxury theme: dark carved wood, gold trim, parchment */
:root {
  --wood-dark: #1a0f07;
  --wood: #3b2412;
  --parchment: #f3e7c9;
  --ink: #2b1d0e;
  --gold: #c9a227;
  --gold-light: #e8c35a;
  --gold-dim: #8a6a1f;
  --cream: #f7efd9;
  --muted: #b9a489;
  --panel: rgba(38, 22, 10, 0.82);
  --display: Cinzel, Georgia, serif;
  --body: Lora, Georgia, serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--body);
  background:
    radial-gradient(900px 500px at 50% -15%, rgba(201, 162, 39, 0.16), transparent 62%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #2a180b 0%, var(--wood-dark) 100%) fixed,
    var(--wood-dark);
}

.app { max-width: 1280px; margin: 0 auto; padding: 22px 16px 40px; }

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.top h1 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: 3px;
  color: var(--gold-light); text-shadow: 0 2px 0 #000, 0 0 14px rgba(201, 162, 39, 0.35);
}
.top h1 span { color: var(--cream); }

.setup { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
select, input {
  width: 110px;
  font: inherit; color: var(--cream);
  background: #2a180b; border: 1px solid var(--gold-dim);
  border-radius: 6px; padding: 6px 10px;
}

.names { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 16px; color: var(--muted); font-size: 14px; }
.names input.pname { width: 130px; }
.names input.pname[hidden] { display: none; }

.layout { display: grid; grid-template-columns: minmax(0, 800px) minmax(260px, 1fr); gap: 24px; align-items: start; }
.chat-col { grid-column: 1 / -1; }
.chat-log { list-style: none; margin: 0 0 12px; padding: 0; height: 320px; overflow-y: auto; display: grid; gap: 6px; align-content: start; }
.chat-log li { font-size: 14px; line-height: 1.35; word-break: break-word; }
.chat-log b { color: var(--gold-light); }
.chat-form { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px; }
.chat-form input, .chat-form select { min-width: 0; width: 100%; }
.chat-form button { grid-column: 1 / -1; }
.chat-note { margin: 8px 0 0; font-size: 12px; opacity: 0.7; }
.summary { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--gold-dim); border-radius: 8px; background: var(--panel); }
.summary h2 { margin: 0 0 6px; font-family: var(--display); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-light); }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings th, .standings td { padding: 6px 8px; text-align: right; border-bottom: 1px solid rgba(201, 162, 39, 0.2); }
.standings th:nth-child(2), .standings td:nth-child(2) { text-align: left; }
.standings td:last-child { font-weight: 700; color: var(--gold-light); }
@media (min-width: 1400px) {
  .layout { grid-template-columns: minmax(0, 800px) minmax(260px, 1fr) minmax(260px, 340px); }
  .chat-col { grid-column: auto; }
  .chat-log { height: 560px; }
}
.board-col { min-width: 0; }

.stage { width: 100%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); }
.stage canvas { display: block; width: 100% !important; height: auto !important; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* buttons: gold-trimmed plates */
.neon {
  font: 700 14px var(--display); letter-spacing: 1px; text-transform: uppercase;
  color: #2b1d0e;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dim));
  border: 1px solid #5c4212; border-radius: 6px;
  padding: 11px 22px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s, filter 0.2s, opacity 0.2s;
}
.neon:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.neon.ghost {
  color: var(--cream);
  background: linear-gradient(180deg, #4a2d15, #2e1a0b);
  border: 1px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 8px rgba(0, 0, 0, 0.45);
}
.neon:disabled { opacity: 0.4; cursor: not-allowed; }
.neon:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.status {
  min-height: 1.4em; margin: 14px 0 0; text-align: center;
  color: var(--gold-light); font-style: italic; font-size: 15px;
}

.side { display: grid; gap: 16px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: inset 0 0 0 3px rgba(26, 15, 7, 0.9), inset 0 0 0 4px rgba(201, 162, 39, 0.25), 0 10px 26px rgba(0, 0, 0, 0.45);
}
.panel h2 {
  margin: 0 0 12px; font-family: var(--display); font-size: 14px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--gold-light);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35); padding-bottom: 8px;
}

.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.players li {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 2px 10px; align-items: center;
  padding: 9px 12px; border-radius: 6px;
  border: 1px solid rgba(201, 162, 39, 0.18); background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s, background 0.2s;
}
.players li.active { border-color: var(--gold-light); background: rgba(201, 162, 39, 0.14); }
.players li.out { opacity: 0.4; text-decoration: line-through; }
.players .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--gold-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.players .nm { font-weight: 600; font-family: var(--body); }
.players .bal { font-family: var(--display); font-weight: 700; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.players small { grid-column: 2 / 4; color: var(--muted); font-size: 13px; }

.burn { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
/* title deed: the card shown when a property is clicked */
.deed-modal[hidden] { display: none; }
.deed-modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(10, 6, 2, 0.7);
}
.deed {
  width: min(330px, 100%); background: #f7f0dc; color: #1c1408;
  border: 2px solid #1c1408; border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); font-family: var(--body);
}
.deed-head {
  padding: 22px 14px 14px; text-align: center; color: #fff;
  font-family: var(--display); font-weight: 700; letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.deed-head .deed-name { display: block; font-size: 20px; text-transform: uppercase; }
.deed-head .deed-sub { display: block; font-size: 11px; letter-spacing: 2px; margin-top: 4px; opacity: 0.9; }
.deed-body { padding: 12px 18px 16px; }
.deed-rents { width: 100%; border-collapse: collapse; font-size: 14px; }
.deed-rents td { padding: 4px 0; border-bottom: 1px dotted rgba(28, 20, 8, 0.35); }
.deed-rents td + td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.deed-rents tr.main td { font-weight: 700; font-size: 15px; }
.deed-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: #3a2b12; }
.deed-note b { color: #1c1408; }
.deed-owner { margin: 10px 0 0; font-size: 13px; color: #5c4212; text-align: center; font-style: italic; }
.deed-close { margin-top: 14px; width: 100%; }
.prop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.prop-actions .neon { padding: 6px 10px; font-size: 12px; }
#props li { display: block; }
.burn b { color: var(--gold-light); }

.log {
  list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto;
  display: grid; gap: 6px; font-size: 14px; color: #e6d7b8;
}
.log li {
  padding: 7px 10px; border-radius: 4px;
  border-left: 3px solid var(--gold); background: rgba(0, 0, 0, 0.2);
}

/* card reveal: parchment card with gold trim over a dimmed board */
.card-modal[hidden] { display: none; }
.card-modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 16px;
  background: rgba(10, 6, 2, 0.7);
  backdrop-filter: blur(3px);
}
.card-face {
  width: min(360px, 100%); padding: 28px 26px 22px; text-align: center;
  color: var(--ink, #2b1d0e);
  background: #f3e7c9;
  border: 3px solid var(--gold);
  border-radius: 10px;
  box-shadow: inset 0 0 0 4px #f3e7c9, inset 0 0 0 5px var(--gold-dim), 0 20px 50px rgba(0, 0, 0, 0.6);
}
.card-kind {
  margin: 0 0 14px; font-family: var(--display); font-weight: 700;
  font-size: 15px; letter-spacing: 2px; text-transform: uppercase; color: #5c4212;
}
.card-text { margin: 0 0 22px; font-size: 18px; line-height: 1.45; color: #2b1d0e; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}
