/* Native game UI. Layout 4, motion 2, density 6. Semantic player colors are
   distinct from the single green action accent. Layers: header 1, alert 2. */
.effect-preview { margin: 12px 0; padding: 12px; background: var(--subtle); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; overflow-wrap: anywhere; }
.effect-preview p { margin: 8px 0; font-size: .9rem; }
.preview-warnings { padding-left: 18px; margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.preview-warnings li + li { margin-top: 5px; }
.projection-delta { font-weight: 650; }
.weekly-statement { overflow-wrap: anywhere; }
.statement-totals, .statement-sources { margin: 10px 0; }
.statement-totals > div, .statement-sources > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; padding: 5px 0; }
.statement-totals dt, .statement-sources dt { color: var(--muted); font-size: .85rem; }
.statement-totals dd, .statement-sources dd { margin: 0; font-variant-numeric: tabular-nums; font-size: .85rem; }
.result-explanation { max-width: 76ch; padding-top: 12px; overflow-wrap: anywhere; }
.result-explanation h3 { margin-top: 0; }
.result-explanation p { line-height: 1.65; }
:root {
  color-scheme: light dark;
  --bg: #edf0ec;
  --surface: #fafbf8;
  --subtle: #e3e8e1;
  --text: #202b26;
  --muted: #536157;
  --line: #bec9be;
  --accent: #245c43;
  --accent-text: #fafbf8;
  --danger: #a12d31;
  --p0: #165e91;
  --p1: #8a3b79;
  --p2: #885815;
  --p3: #267354;
  --radius: 10px;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button,
input,
select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
button {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 15px;
  font-weight: 600;
  white-space: nowrap;
}
button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--subtle);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
button.primary:hover:not(:disabled) {
  filter: brightness(1.12);
  background: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: inherit;
}
input,
select {
  min-height: 46px;
  padding: 10px;
  width: 100%;
}
input::placeholder {
  color: var(--muted);
}
label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 22px;
  line-height: 1.35;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.7;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
strong,
b,
.number {
  font-variant-numeric: tabular-nums;
}
.masthead {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  max-width: 1560px;
  margin: auto;
}
.wordmark {
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.04em;
}
.wordmark span {
  margin-left: 8px;
  font-weight: 400;
}
.masthead [role="status"] {
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 1560px;
  margin: auto;
  padding: 24px 32px 48px;
}
.mobile-shortcuts { display: none; }
.loading {
  padding: 60px 0;
  color: var(--muted);
}
.entry {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
  max-width: 1120px;
  margin: 56px auto;
}
.entry-copy p {
  max-width: 440px;
  color: var(--muted);
  font-size: 17px;
}
.entry-copy .rule-note {
  font-size: 14px;
}
.paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.entry form {
  display: grid;
  gap: 18px;
}
.join-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.or {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}
.or:before,
.or:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.rules {
  margin-top: 32px;
  display: grid;
  gap: 10px;
}
.rules p {
  margin: 0;
  font-size: 15px;
}
.lobby {
  max-width: 920px;
  margin: 32px auto;
}
.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.room-code {
  font-family: ui-monospace, monospace;
  font-size: 30px;
  letter-spacing: 0.12em;
}
.members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.member {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  min-height: 100px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.member > div:not(.member-figure) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.member p {
  margin: 4px 0 0;
}
.seat {
  width: 38px;
  height: 46px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  font-weight: 800;
  font-size: 20px;
}
.player-0 {
  color: var(--p0);
}
.player-1 {
  color: var(--p1);
}
.player-2 {
  color: var(--p2);
}
.player-3 {
  color: var(--p3);
}
.lobby-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.game-top h1 {
  font-size: 28px;
  margin: 0;
}
.week-label {
  font-size: 14px;
  color: var(--muted);
  margin: 5px 0 0;
}
.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.score-player {
  background: var(--surface);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 4px solid var(--line);
}
.score-player.current {
  border-top-color: var(--accent);
}
.player-title {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 10px;
}
.player-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.you {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.stats dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.stats dd {
  margin: 0;
  font-size: 18px;
  font-family: ui-monospace, monospace;
}
.score-player dl {
  margin: 0;
}
.quarter {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
.board-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.board-tools button {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 38px;
}
.region-nav {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding-bottom: 9px;
}
.region-nav button {
  font-size: 12px;
  min-height: 36px;
  padding: 7px 10px;
}
.map-viewport {
  height: min(73dvh, 800px);
  min-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--subtle);
  padding: 18px;
}
.map {
  --region-size: 350px;
  display: grid;
  grid-template-columns: repeat(3, var(--region-size));
  gap: 30px;
  width: max-content;
  padding: 4px;
}
.map.compact {
  --region-size: 280px;
}
.region {
  width: var(--region-size);
  height: var(--region-size);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 3px;
}
.region-center {
  grid-column: 2/6;
  grid-row: 2/6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
}
.region-center strong {
  font-size: 22px;
}
.region-center p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.region-center small {
  margin-top: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1px;
  padding: 3px;
  min-height: 0;
  min-width: 0;
  border-radius: 5px;
  border: 1px solid var(--line);
  white-space: normal;
  overflow: hidden;
  font-weight: 400;
  background: var(--surface);
  text-align: left;
}
.tile.selected {
  outline: 3px solid var(--accent);
  outline-offset: 0;
}
.tile .tile-name {
  font-size: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile small {
  font-size: 9px;
  line-height: 1;
}
.tile.event {
  border-style: dashed;
}
.tile.transit {
  background: var(--bg);
}
.tile.owner-0 {
  border-bottom: 4px solid var(--p0);
}
.tile.owner-1 {
  border-bottom: 4px solid var(--p1);
}
.tile.owner-2 {
  border-bottom: 4px solid var(--p2);
}
.tile.owner-3 {
  border-bottom: 4px solid var(--p3);
}
.tile.path {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.tokens {
  display: flex;
  gap: 2px;
  min-height: 13px;
  justify-content: flex-end;
}
.token {
  font-size: 10px;
  line-height: 13px;
  min-width: 13px;
  text-align: center;
  border-radius: 3px;
  background: var(--text);
  color: var(--surface);
  font-weight: 700;
}
.token.player-0 {
  background: var(--p0);
  color: #fafbf8;
}
.token.player-1 {
  background: var(--p1);
  color: #fafbf8;
}
.token.player-2 {
  background: var(--p2);
  color: #fafbf8;
}
.token.player-3 {
  background: var(--p3);
  color: #fafbf8;
}
.tile-pos-0 {
  grid-area: 1/1;
}
.tile-pos-1 {
  grid-area: 1/2;
}
.tile-pos-2 {
  grid-area: 1/3;
}
.tile-pos-3 {
  grid-area: 1/4;
}
.tile-pos-4 {
  grid-area: 1/5;
}
.tile-pos-5 {
  grid-area: 1/6;
}
.tile-pos-6 {
  grid-area: 2/6;
}
.tile-pos-7 {
  grid-area: 3/6;
}
.tile-pos-8 {
  grid-area: 4/6;
}
.tile-pos-9 {
  grid-area: 5/6;
}
.tile-pos-10 {
  grid-area: 6/6;
}
.tile-pos-11 {
  grid-area: 6/5;
}
.tile-pos-12 {
  grid-area: 6/4;
}
.tile-pos-13 {
  grid-area: 6/3;
}
.tile-pos-14 {
  grid-area: 6/2;
}
.tile-pos-15 {
  grid-area: 6/1;
}
.tile-pos-16 {
  grid-area: 5/1;
}
.tile-pos-17 {
  grid-area: 4/1;
}
.tile-pos-18 {
  grid-area: 3/1;
}
.tile-pos-19 {
  grid-area: 2/1;
}
.sidebar {
  display: grid;
  gap: 16px;
}
.sidebar .paper {
  padding: 18px;
}
.sidebar h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.sidebar p {
  font-size: 13px;
  margin-bottom: 12px;
}
.action-list {
  display: grid;
  gap: 9px;
}
.action-list button {
  width: 100%;
}
.action-list label {
  font-size: 12px;
}
.action-list select {
  font-size: 13px;
  max-width: 100%;
}
.cooperation-panel input,
.cooperation-panel select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.cooperation-panel .action-list {
  margin-top: 12px;
}
.role-preview {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.65;
}
.role-preview p + p {
  margin-top: 8px;
}
.role-panel select,
.role-panel button {
  width: 100%;
  min-width: 0;
}
.role-panel details {
  margin-top: 12px;
}
.expanded-card-panel select,
.expanded-card-panel button {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.expanded-card-panel p,
.expanded-card-panel button,
.expanded-card-panel details {
  margin-top: 10px;
}
.turn-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.deadline {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.hand {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.hand-card {
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 72px;
}
.hand-card strong {
  font-size: 13px;
}
.hand-card small {
  display: block;
  margin-top: 8px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
.detail-grid dt {
  font-size: 12px;
  color: var(--muted);
}
.detail-grid dd {
  margin: 5px 0 0;
  font-size: 14px;
}
.events {
  margin-top: 20px;
}
.events summary {
  cursor: pointer;
  font-weight: 600;
}
.event-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.event-list li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.event-list b {
  color: var(--text);
}
.response-panel {
  border: 2px solid var(--accent);
}
.results {
  margin-bottom: 24px;
}
.results table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.results th,
.results td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.results .table-scroll {
  overflow: auto;
}
.fine-print {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
}
#error {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(600px, 90vw);
  padding: 14px 22px;
  background: var(--surface);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  z-index: 2;
  line-height: 1.6;
}
#error[hidden] {
  display: none;
}
details.help {
  margin-top: 20px;
}
details.help summary {
  cursor: pointer;
  color: var(--muted);
}
details.help p {
  font-size: 13px;
  margin-top: 12px;
}
.month-panel {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 18px;
}
.month-panel h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.month-panel p {
  font-size: 13px;
  margin-bottom: 8px;
}
.month-panel summary {
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
}
@media (max-width: 767px) {
  .month-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.game-layout > section,
.sidebar,
.paper {
  min-width: 0;
}
.action-list small {
  line-height: 1.6;
}
.action-list button {
  white-space: normal;
  overflow-wrap: anywhere;
}
.action-list .route-choice {
  text-align: left;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #19211e;
    --surface: #222e28;
    --subtle: #2b3830;
    --text: #e5ece4;
    --muted: #b5c4b7;
    --line: #5b6c5f;
    --accent: #a1d7b5;
    --accent-text: #192a20;
    --danger: #f2a2a2;
    --p0: #88bce6;
    --p1: #dab0d1;
    --p2: #e4bd82;
    --p3: #a4d8bb;
  }
  .token.player-0,
  .token.player-1,
  .token.player-2,
  .token.player-3 {
    color: #19211e;
  }
}
@media (max-width: 1024px) {
  .scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .entry {
    gap: 30px;
    margin-top: 32px;
  }
  .map {
    --region-size: 310px;
  }
  .map.compact {
    --region-size: 260px;
  }
}
@media (max-width: 767px) {
  .masthead {
    height: 64px;
    padding: 0 16px;
  }
  .wordmark {
    font-size: 17px;
  }
  .masthead [role="status"] {
    font-size: 11px;
  }
  main {
    padding: 18px 16px 32px;
  }
  .entry {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
  }
  .entry h1 {
    max-width: 340px;
  }
  .entry-copy p {
    font-size: 15px;
  }
  .rules {
    margin-top: 18px;
  }
  .paper {
    padding: 18px;
  }
  .members {
    grid-template-columns: 1fr;
  }
  .lobby-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .game-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .map-viewport {
    height: 440px;
    min-height: 0;
    padding: 12px;
  }
  .map {
    --region-size: 300px;
    grid-template-columns: repeat(2, var(--region-size));
    gap: 20px;
  }
  .map.compact {
    --region-size: 250px;
  }
  .game-top {
    gap: 12px;
  }
  .game-top h1 {
    font-size: 23px;
  }
  .score-player {
    padding: 10px;
  }
  .stats dd {
    font-size: 16px;
  }
  .stats dt {
    font-size: 10px;
  }
  .player-title {
    font-size: 13px;
  }
  .quarter {
    font-size: 11px;
  }
  .deadline {
    font-size: 12px;
  }
  .board-tools {
    gap: 5px;
  }
  .results th,
  .results td {
    white-space: nowrap;
  }
}
@media (max-width: 767px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .game-layout > .sidebar {
    display: contents;
  }
  .game-layout > .sidebar > section:first-child {
    grid-row: 1;
  }
  .game-layout > section {
    grid-row: 2;
  }
  .scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Native board navigation; the overview and full board share a 3 by 2 layout. */
.map { --region-size: 420px; grid-template-columns: repeat(3, var(--region-size)); }
.map.compact { --region-size: 320px; }
.tile .tile-name { font-size: 12px; }
.map.compact .tile-name { font-size: 10px; }
.tile-heading { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.tile-heading small { font-size: 10px; }
.tile-status { font-size: 10px; padding: 1px 3px; border-radius: 2px; background: var(--subtle); color: var(--text); }
.tile.possible-destination { border-style: double; border-width: 3px; border-color: var(--accent); }
.tile.route-path, .mini-cell.route-path { box-shadow: inset 0 0 0 2px var(--accent); }
.tile.route-destination, .mini-cell.route-destination { outline: 3px solid var(--accent); outline-offset: 0; }
.board-tools button { min-height: 44px; }
.map-overview { display: grid; grid-template-columns: minmax(240px,330px) minmax(0,1fr); gap: 10px 20px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.map-overview .overview-heading, .map-overview .map-legend { grid-column: 1/-1; }
.overview-info { min-width: 0; font-size: 13px; }
.overview-info p { color: var(--muted); margin: 12px 0 0; }
.overview-players { display: grid; gap: 5px; margin-top: 8px; }
.overview-players button { display: flex; align-items: center; gap: 9px; padding: 6px 8px; text-align: left; white-space: normal; font-size: 13px; }
.overview-players small { display: block; margin-top: 2px; font-weight: 400; }
.overview-players button > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.overview-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mini-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 390px; }
.mini-region { min-width: 0; padding: 6px; background: var(--bg); border-radius: 5px; white-space: normal; }
.mini-region.in-view { border-color: var(--accent); }
.mini-region-map { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); aspect-ratio: 1; gap: 2px; }
.mini-center { grid-area: 2/2/6/6; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.mini-center small { font-size: 10px; margin-top: 3px; }
.mini-cell { background: var(--line); min-width: 0; font: 700 9px/1 system-ui; display: grid; place-items: center; border-radius: 1px; color: var(--text); }
.mini-cell.event { background: var(--subtle); border: 1px dashed var(--muted); }
.mini-cell.service { background: var(--surface); border: 1px solid var(--muted); }
.mini-cell.is-selected { outline: 2px solid var(--text); }
.mini-owner-0 { border-bottom: 3px solid var(--p0); }
.mini-owner-1 { border-bottom: 3px solid var(--p1); }
.mini-owner-2 { border-bottom: 3px solid var(--p2); }
.mini-owner-3 { border-bottom: 3px solid var(--p3); }
.mini-region-label { display: block; font-size: 10px; margin-top: 4px; color: var(--muted); }
.overview-window { position: absolute; border: 2px solid var(--accent); border-radius: 4px; pointer-events: none; }
.map-legend { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.turn-guide { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 18px; }
.turn-guide p { font-size: 13px; margin: 6px 0; color: var(--muted); }
.turn-shortcuts { display: flex; align-items: start; gap: 8px; flex-wrap: wrap; }
.turn-shortcuts button { font-size: 12px; }
.turn-steps { padding: 0; margin: 8px 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.turn-steps [aria-current] { font-weight: 800; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.turn-guide .recent-change { grid-column: 1/-1; margin: 0; }
.recent-change small { display: block; margin-top: 4px; }
.route-choice strong, .route-choice small { display: block; }
.route-choice small { margin-top: 6px; font-weight: 400; line-height: 1.6; }
.project-state-note { padding: 10px; border-left: 3px solid var(--accent); background: var(--subtle); }
@media (max-width: 767px) {
  .map { --region-size: 360px; grid-template-columns: repeat(3, var(--region-size)); }
  .map.compact { --region-size: 280px; }
  .map-overview { display: block; padding: 10px; }
  .overview-info { display: none; }
  .mini-grid { gap: 5px; }
  .mini-region { padding: 4px; }
  .mini-center { font-size: 10px; }
  .turn-guide { grid-template-columns: minmax(0,1fr); }
  .turn-shortcuts { gap: 6px; }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .map-overview { display: block; }
  .overview-info { display: none; }
}

/* Office dioramas are decorative; ownership, labels and controls stay HTML. */
.guide-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; font-size: 12px; text-underline-offset: 4px; }
.hand-category { display: block; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 700; }
.hand-card .hand-timing { font-size: 10px; line-height: 1.4; }
.quick-guide { max-width: 920px; padding: 40px 24px; }
.quick-guide h1 { font-size: 34px; }
.quick-guide section { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.quick-guide table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.quick-guide th, .quick-guide td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.quick-guide td:first-child { white-space: nowrap; }
.quick-guide li { margin-bottom: 12px; line-height: 1.7; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0; }
.guide-nav a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 5px; }
.guide-warning { border-left: 3px solid var(--accent); padding-left: 14px; }
.guide-resources { margin: 0; }
.guide-resources div { margin-bottom: 16px; }
.guide-resources dt { font-weight: 700; margin-bottom: 4px; }
.guide-resources dd { margin: 0; color: var(--muted); line-height: 1.7; }
@media (max-width: 767px) { .quick-guide { padding: 28px 16px; } .quick-guide h1 { font-size: 28px; } }
.map { position: relative; }
.movement-ghost { position: absolute; left: 0; top: 0; z-index: 10; pointer-events: none; width: 25px; height: 25px; }
.map.compact .movement-ghost { width: 19px; height: 19px; }
.is-travelling { opacity: 0; }
.dice-result { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; font-size: 12px; color: var(--muted); }
.dice-cubes { display: flex; gap: 5px; }
.die { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 2px; width: 27px; height: 27px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.die i { border-radius: 50%; }
.die .pip { background: var(--text); }
@media (prefers-reduced-motion: reduce) { .movement-ghost { display: none; } .is-travelling { opacity: 1; } }
[data-district] { --room-accent: #73988c; }
[data-district="priority"] { --room-accent: #768ca8; }
[data-district="meeting"] { --room-accent: #ac8273; }
[data-district="social"] { --room-accent: #b49a68; }
[data-district="admin"] { --room-accent: #8b947b; }
[data-district="leisure"] { --room-accent: #739b7e; }
.map { --region-size: 450px; }
.map.compact { --region-size: 320px; }
.region {
  --art-floor: #e5ebe4;
  --art-grid: #bdcebf;
  --art-front: #aebfb3;
  --art-side: #8d9f96;
  --art-outline: #758f82;
}
.region-center {
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--room-accent);
  box-shadow: 0 3px 0 var(--line);
}
.district-number { font: 500 10px/1.3 ui-monospace, monospace; letter-spacing: .12em; color: var(--muted); }
.region-center strong { font-size: 23px; letter-spacing: -.04em; }
.region-center p, .region-center small { margin: 0; }
.region-center .region-art { display: block; flex: 0 1 auto; min-height: 0; width: 100%; max-width: 260px; height: auto; }
.mini-region { border-top: 3px solid var(--room-accent); }
.mini-center { border-top: 2px solid var(--room-accent); }
.tile { position: relative; box-shadow: 0 2px 0 var(--line); }
.tile.service { background: var(--subtle); }
.tile:has(.pawn-token) { border-top-color: var(--text); border-left-color: var(--text); border-right-color: var(--text); }
.tile.owner-0 { border-bottom-color: var(--p0); }
.tile.owner-1 { border-bottom-color: var(--p1); }
.tile.owner-2 { border-bottom-color: var(--p2); }
.tile.owner-3 { border-bottom-color: var(--p3); }
.tile .tile-heading { flex: 0 0 11px; }
.tile .tile-name { flex-shrink: 0; }
.project-tier { display: flex; flex: 0 0 auto; align-items: end; gap: 1px; height: 10px; }
.project-tier i { width: 3px; height: 4px; background: var(--line); border: 1px solid var(--muted); }
.project-tier i:nth-child(2) { height: 7px; }
.project-tier i:nth-child(3) { height: 10px; }
.project-tier .built { background: var(--text); border-color: var(--text); }
.player-0 { --seat: var(--p0); }
.player-1 { --seat: var(--p1); }
.player-2 { --seat: var(--p2); }
.player-3 { --seat: var(--p3); }
.pawn-token {
  display: inline-block; position: relative; flex: 0 0 auto;
  width: 21px; height: 21px; min-width: 0; padding: 0;
  border: 2px solid var(--seat); border-radius: 6px;
  background: var(--surface); vertical-align: middle;
}
.role-portrait { display: block; width: 100%; height: 100%; border-radius: 3px; }
.pawn-number {
  position: absolute; left: -3px; bottom: -4px; min-width: 11px; padding: 0 1px;
  border: 1px solid var(--surface); border-radius: 3px;
  font: 700 9px/11px system-ui, sans-serif; text-align: center;
  background: var(--seat); color: #fff;
}
.tokens { flex: 0 0 23px; gap: 0; padding: 0 1px 3px; align-items: start; }
.tokens .pawn-token + .pawn-token { margin-left: -9px; }
.portrait-seat { width: 40px; height: 40px; border-radius: 9px; }
.portrait-seat .role-portrait { border-radius: 5px; }
.portrait-seat .pawn-number { min-width: 16px; font-size: 10px; line-height: 15px; }
.map.compact .region-center { gap: 2px; padding: 7px; }
.map.compact .region-center strong { font-size: 18px; }
.map.compact .region-center .region-art { max-width: 170px; }
.map.compact .region-center p, .map.compact .region-center small { font-size: 10px; }
.map.compact .tile { padding: 2px; gap: 0; }
.map.compact .tile .tile-name { -webkit-line-clamp: 1; font-size: 10px; line-height: 12px; }
.map.compact .project-tier { display: none; }
.map.compact .tokens { flex-basis: 17px; }
.map.compact .tokens .pawn-token { width: 14px; height: 14px; border-width: 1px; border-radius: 3px; }
.map.compact .tokens .pawn-token + .pawn-token { margin-left: -7px; }
.map.compact .tokens .pawn-number { font-size: 8px; line-height: 9px; min-width: 9px; bottom: -3px; }
@media (prefers-color-scheme: dark) {
  .region { --art-floor: #293b35; --art-grid: #3e554c; --art-front: #8b9e94; --art-side: #637b70; --art-outline: #304a40; }
}
@media (max-width: 767px) {
  .map { --region-size: 360px; }
  .map.compact { --region-size: 280px; }
  .region-center { gap: 2px; padding: 8px; }
  .region-center strong { font-size: 20px; }
  .region-center .region-art { max-width: 210px; }
  .tile { gap: 0; padding: 2px; }
  .tile .tile-heading { flex-basis: 9px; }
  .tile .tile-heading small { font-size: 9px; }
  .tile .tile-name { font-size: 10px; line-height: 11px; }
  .tokens { flex-basis: 18px; }
  .tokens .pawn-token { width: 16px; height: 16px; border-width: 1px; }
  .tokens .pawn-token + .pawn-token { margin-left: -8px; }
  .tokens .pawn-number { bottom: -2px; font-size: 8px; line-height: 9px; }
}
