/* Landlord's shared look: theme colours, the board, tokens, dice and a space's
   deed. Used by board.html (TV) and player.html (phone), on top of /shared.css.
   The board's text scales with its own width (cqw units), so the same markup
   reads on a TV and fits on a phone. */

:root {
  --ll-bg: #10302f;
  --ll-bg-top: #1f5652;
  --ll-bg-dark: #06171a;
  --ll-panel: rgba(4, 22, 24, 0.55);
  --ll-line: rgba(255, 255, 255, 0.14);
  --ll-muted: #a9c6c2;
  --ll-paper: #f6f1e3;
  --ll-paper-dim: #e6dcc0;
  --ll-ink: #1f2a2c;
  --ll-grout: #2b4a47;
  --ll-danger: #ff7088;
  --ll-ok: #45dd9e;
  --ll-red: #e2413b;
  --ll-blue: #2f6fed;
  --ll-green: #23a35a;
  --ll-yellow: #f2c230;
  --ll-purple: #8a4fd8;
  --ll-orange: #f08a24;
  --ll-pink: #e8559b;
  --ll-black: #2b2b33;
}

.hidden { display: none !important; }
.muted { color: var(--ll-muted); }

/* player colours */
.dot.red { background: var(--ll-red); }
.dot.blue { background: var(--ll-blue); }
.dot.green { background: var(--ll-green); }
.dot.yellow { background: var(--ll-yellow); }
.dot.purple { background: var(--ll-purple); }
.dot.orange { background: var(--ll-orange); }
.dot.pink { background: var(--ll-pink); }
.dot.black { background: var(--ll-black); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45); }
.bot-tag { font-size: 0.68rem; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); color: #dfeeec; }
.cash { font-variant-numeric: tabular-nums; font-weight: 800; color: #9cf0c4; white-space: nowrap; }
/* a space's colour in lists */
.sw { display: inline-block; width: 0.85em; height: 0.85em; border-radius: 3px; margin-right: 0.35em; vertical-align: -0.08em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.sw.ico { width: auto; height: auto; box-shadow: none; font-size: 0.85em; }

/* dice */
.die { width: 42px; height: 42px; }
.die rect { fill: #fbf8ef; stroke: #222; stroke-width: 1; }
.die circle { fill: #1a1a1a; }
.die.stale { opacity: 0.35; }
.die text { font: 700 12px sans-serif; fill: #888; text-anchor: middle; dominant-baseline: central; }

/* ===================================================================== */
/* The board                                                             */
/* ===================================================================== */
.ll-board {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1.45fr repeat(8, 1fr) 1.45fr;
  grid-template-rows: 1.45fr repeat(8, 1fr) 1.45fr;
  aspect-ratio: 1;
  gap: 0.25cqw;
  padding: 0.25cqw;
  background: var(--ll-grout);
  border-radius: 1.2cqw;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ll-board .ll-cell {
  position: relative; overflow: hidden; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: var(--ll-paper); color: var(--ll-ink);
  padding: 0.5cqw; line-height: 1.12;
}
.ll-board .ll-cell.side-top { padding-top: 2.3cqw; justify-content: flex-start; }
.ll-board .ll-cell.side-bottom { padding-bottom: 2.3cqw; justify-content: flex-end; }
.ll-board .ll-cell.side-left { padding-left: 2.3cqw; }
.ll-board .ll-cell.side-right { padding-right: 2.3cqw; }
.ll-board .ll-cell.side-corner { background: #efe6cb; }
.ll-board .body { display: flex; flex-direction: column; align-items: center; gap: 0.25cqw; min-width: 0; }
.ll-board .name { font-size: 1.22cqw; font-weight: 700; overflow-wrap: anywhere; }
.ll-board .price { font-size: 1.12cqw; font-weight: 800; color: #44504f; }
.ll-board .sub { font-size: 0.95cqw; color: #5b6766; }
.ll-board .ico { font-size: 2cqw; line-height: 1; }
.ll-board .ico.big { font-size: 3.6cqw; }
.ll-board .side-corner .name { font-size: 1.45cqw; font-weight: 900; letter-spacing: 0.02em; }

/* the district's colour, on the outer edge of the board */
.ll-board .band { position: absolute; }
.ll-board .side-top .band { top: 0; left: 0; right: 0; height: 1.8cqw; }
.ll-board .side-bottom .band { bottom: 0; left: 0; right: 0; height: 1.8cqw; }
.ll-board .side-left .band { top: 0; bottom: 0; left: 0; width: 1.8cqw; }
.ll-board .side-right .band { top: 0; bottom: 0; right: 0; width: 1.8cqw; }

/* the owner's colour: a wash over the whole space (district colours and
   player colours can be close, so the stripe alone isn't enough), and a
   stripe on the inner edge */
.ll-board .ll-cell.owned { --tint: color-mix(in srgb, var(--oc) 24%, var(--ll-paper)); background: var(--tint); }
.ll-board .own { position: absolute; background: var(--oc); }
.ll-board .side-top .own { bottom: 0; left: 0; right: 0; height: 1cqw; }
.ll-board .side-bottom .own { top: 0; left: 0; right: 0; height: 1cqw; }
.ll-board .side-left .own { top: 0; bottom: 0; right: 0; width: 1cqw; }
.ll-board .side-right .own { top: 0; bottom: 0; left: 0; width: 1cqw; }

.ll-board .ll-cell.mortgaged { background: repeating-linear-gradient(135deg, var(--tint, var(--ll-paper)) 0 0.6cqw, var(--ll-paper-dim) 0.6cqw 1.2cqw); }
.ll-board .ll-cell.mortgaged .body { opacity: 0.55; }
.ll-board .mort {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 0.85cqw; font-weight: 900; letter-spacing: 0.08em; color: #a0302c; background: rgba(246, 241, 227, 0.9);
  padding: 0.1cqw 0.4cqw; border: 0.12cqw solid #a0302c; border-radius: 0.3cqw; white-space: nowrap;
}

/* houses and towers sit just inside the colour band */
.ll-board .blds { position: absolute; display: flex; gap: 0.15cqw; align-items: flex-end; }
.ll-board .side-top .blds { top: 2cqw; left: 50%; transform: translateX(-50%); }
.ll-board .side-bottom .blds { bottom: 2cqw; left: 50%; transform: translateX(-50%); }
.ll-board .side-left .blds { left: 2cqw; top: 0.4cqw; }
.ll-board .side-right .blds { right: 2cqw; top: 0.4cqw; }
.ll-board .side-top .body, .ll-board .side-bottom .body { margin: 1.5cqw 0; }
.ll-board .house { width: 1.35cqw; height: 1.35cqw; }
.ll-board .house path { fill: #2e8b57; stroke: #12391f; stroke-width: 0.6; }
.ll-board .tower { width: 1.5cqw; height: 2.1cqw; }
.ll-board .tower path { fill: #c0392b; stroke: #4a120c; stroke-width: 0.5; }
.ll-board .tower path.win { fill: #ffe7a3; stroke: none; }

/* players' tokens */
.ll-board .toks {
  position: absolute; left: 0; right: 0; bottom: 0.35cqw; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 0.15cqw; pointer-events: none; z-index: 2;
}
.ll-board .side-bottom .toks { bottom: auto; top: 0.35cqw; }
.ll-board .side-corner .toks { bottom: 0.6cqw; }
.ll-board .tok {
  width: 2.35cqw; height: 2.35cqw; border-radius: 50%; background: var(--pc); color: #fff;
  font-size: 1.25cqw; font-weight: 900; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0.15cqw 0.4cqw rgba(0, 0, 0, 0.5), inset 0 0 0 0.2cqw rgba(255, 255, 255, 0.7);
}
.ll-board .tok.light { color: #3a2c00; }
.ll-board .tok.held { box-shadow: 0 0 0 0.25cqw #1f2a2c, inset 0 0 0 0.2cqw rgba(255, 255, 255, 0.7); outline: 0.2cqw dashed #1f2a2c; outline-offset: 0.35cqw; }

/* what just happened */
.ll-board .ll-cell.landed { box-shadow: inset 0 0 0 0.4cqw var(--gold); animation: ll-pulse 1.1s ease-in-out 3; }
.ll-board .ll-cell.for-sale { box-shadow: inset 0 0 0 0.4cqw #fff, inset 0 0 0 0.75cqw var(--gold); }
.ll-board .ll-cell.pickable { cursor: pointer; }
@keyframes ll-pulse { 0%, 100% { filter: none; } 50% { filter: brightness(1.12); } }
@media (prefers-reduced-motion: reduce) { .ll-board * { animation: none !important; } }

/* the phone's compact board: colours, icons and tokens only */
.ll-board.compact { gap: 0.4cqw; padding: 0.4cqw; }
.ll-board.compact .ll-cell { padding: 0; justify-content: center; }
.ll-board.compact .side-top .band, .ll-board.compact .side-bottom .band { height: 3cqw; }
.ll-board.compact .side-left .band, .ll-board.compact .side-right .band { width: 3cqw; }
.ll-board.compact .side-top .own, .ll-board.compact .side-bottom .own { height: 1.7cqw; }
.ll-board.compact .side-left .own, .ll-board.compact .side-right .own { width: 1.7cqw; }
.ll-board.compact .ico { font-size: 3.6cqw; }
.ll-board.compact .body { margin: 0; }
.ll-board.compact .blds { gap: 0; }
.ll-board.compact .side-top .blds { top: 3.2cqw; }
.ll-board.compact .side-bottom .blds { bottom: 3.2cqw; }
.ll-board.compact .side-left .blds { left: 3.2cqw; }
.ll-board.compact .side-right .blds { right: 3.2cqw; }
.ll-board.compact .house { width: 1.9cqw; height: 1.9cqw; }
.ll-board.compact .tower { width: 2.4cqw; height: 3.2cqw; }
.ll-board.compact .mort { display: none; }
.ll-board.compact .toks { position: static; margin-top: 0.3cqw; }
.ll-board.compact .tok { width: 4.2cqw; height: 4.2cqw; font-size: 2.3cqw; }
.ll-board.compact .ll-cell.mine { box-shadow: inset 0 0 0 0.5cqw rgba(242, 193, 78, 0.9); }
.ll-board.compact .ll-cell.landed { box-shadow: inset 0 0 0 0.8cqw var(--gold); }
.ll-board.compact .ll-cell.for-sale { box-shadow: inset 0 0 0 0.8cqw #fff; }

.ll-center { grid-row: 2 / 10; grid-column: 2 / 10; min-width: 0; min-height: 0; position: relative; }

/* a space's details (the phone's info sheet, the TV's "for sale" card) */
.deed-band {
  border-radius: 10px 10px 0 0; padding: 10px 14px; color: #fff; font-weight: 900; font-size: 1.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.deed-band small { display: block; font-size: 0.75rem; font-weight: 700; opacity: 0.9; letter-spacing: 0.06em; text-transform: uppercase; }
table.deed-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.deed-table td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
table.deed-table td:last-child { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
table.deed-table tr.on td { color: var(--gold); }
table.deed-table tr.sep td { border-top: 1px solid rgba(255, 255, 255, 0.3); }
.info-text { margin: 8px 0; line-height: 1.4; }

/* the log: one line per event, a stripe in the player's colour */
.ll-log { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; line-height: 1.4; }
.ll-log li { padding: 2px 0 2px 8px; border-left: 3px solid var(--pc, transparent); margin-bottom: 2px; color: #d9e7e5; }
.ll-log li.sys { color: var(--ll-muted); font-style: italic; }
.ll-log li.turn { color: var(--gold); font-weight: 800; border-left-color: transparent; padding-left: 0; margin-top: 6px; }
