:root {
  color-scheme: light;
  --paper: #f5efdf;
  --light: #fff9ec;
  --ink: #20392c;
  --muted: #52624e;
  --red: #b54436;
  --line: #d4cdb8;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.5 var(--sans); color: var(--ink); background: var(--paper);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #a85a26; outline-offset: 3px; }
a { color: inherit; }
.top, main, .footer { width: min(1392px, 100% - 88px); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: bold 21px var(--serif); letter-spacing: .075em; }
.brand-icon { display: grid; place-items: center; width: 32px; height: 32px; background: var(--ink); color: var(--paper); border-radius: 6px; font: 22px var(--sans); }
.text-button { background: transparent; border: 0; padding: 8px 0; font-weight: 700; }
.text-button:hover { color: var(--red); }
.text-button span { margin-left: 5px; }
main { flex: 1; }
.landing { position: relative; isolation: isolate; min-height: 665px; display: grid; grid-template-columns: minmax(365px, 1fr) 1fr; column-gap: 30px; align-content: center; padding: 70px 0 76px; }
.intro, .entry { z-index: 1; grid-column: 1; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); background: var(--red); }
h1, h2, p { margin-top: 0; }
.intro h1 { margin: 0 0 22px; font: bold clamp(60px, 7.5vw, 111px)/.88 var(--serif); letter-spacing: -.075em; }
.period { color: var(--red); }
.lead { max-width: 365px; font-size: 17px; line-height: 1.5; color: var(--muted); margin-bottom: 19px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 11px; font-weight: 750; margin-bottom: 32px; }
.hero-meta span { color: var(--red); font-size: 7px; }
.hero-board {
  grid-column: 2; grid-row: 1 / 3; justify-self: center; align-self: center;
  width: 90%; max-width: 570px; aspect-ratio: 1; padding: 9%; transform: rotate(-7deg);
  border: 1px solid var(--ink); border-radius: 9px; box-shadow: 12px 15px 0 #24382b, 15px 25px 36px #344d3440;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), #2c4634 calc(12.5% - 1px) 12.5%),
    repeating-linear-gradient(0deg, transparent 0 calc(12.5% - 1px), #2c4634 calc(12.5% - 1px) 12.5%),
    linear-gradient(135deg, #c1684d, #e9b971 38%, #839363 69%, #267370);
}
.hero-inner {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border: 2px solid #263a2e; outline: 4px solid #f2e2b4;
}
.entry { width: min(100%, 445px); border: 1px solid var(--line); border-radius: 13px; background: #fff9ed; padding: 15px 17px; box-shadow: 0 7px 20px #3427190a; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { border: none; border-bottom: 2px solid transparent; background: transparent; font-size: 12px; font-weight: 750; padding: 7px 10px; color: var(--muted); }
.tabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--red); }
#entryForm { display: grid; grid-template-columns: 1fr minmax(95px, auto); gap: 10px; }
#entryForm:has(#codeLabel:not([hidden])) { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 4px; font-size: 12px; font-weight: 750; }
input, select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--light); }
#codeLabel input { text-transform: uppercase; }
#entrySubmit { grid-column: 1 / -1; }
.primary, .outline { border: 1px solid var(--ink); border-radius: 6px; padding: 9px 13px; font-weight: 750; }
.primary { background: var(--ink); color: var(--light); }
.primary:hover:not(:disabled) { background: #305343; }
.outline { background: transparent; }
.outline:hover:not(:disabled) { background: #e9e2cf; }
.footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 17px 0; color: var(--muted); font-size: 11px; }
.footer span:first-child { letter-spacing: .1em; font-weight: 800; }

.room { padding: 26px 0 32px; }
.room-top { display: flex; gap: 12px; justify-content: space-between; align-items: end; margin-bottom: 17px; }
.room-top h1 { font: bold clamp(24px,4vw,42px)/1 var(--serif); letter-spacing: .07em; margin: 0; }
.table-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 310px); gap: 17px; align-items: start; }
.board-scroll { max-width: 850px; width: 100%; margin-inline: auto; }
.board {
  display: grid; grid-template: 1.23fr repeat(7, 1fr) 1.23fr / 1.23fr repeat(7, 1fr) 1.23fr;
  aspect-ratio: 1; gap: 1px; padding: 5px; border-radius: 8px; overflow: hidden;
  background: var(--ink);
}
.board-center {
  grid-area: 2 / 2 / 9 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #f7e6b9; background: #aab598;
  text-align: center; padding: 8px;
}
.board-center p { margin: 0; font-size: clamp(9px,1.4vw,15px); }
.board-dice { display: flex; gap: .1em; font-size: clamp(25px,5vw,67px); line-height: 1; margin: 8px 0 14px; }
.tile {
  background: var(--light); border: 0; padding: clamp(3px,1vw,10px) 2px;
  overflow: hidden; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 -5px var(--stripe, transparent); line-height: 1.12;
}
.tile.side-1 { box-shadow: inset -5px 0 var(--stripe, transparent); padding-right: 6px; }
.tile.side-2 { box-shadow: inset 0 -5px var(--stripe, transparent); }
.tile.side-3 { box-shadow: inset 5px 0 var(--stripe, transparent); padding-left: 6px; }
.tile:hover { background: #e9e1cb; }
.tile:focus-visible { outline-offset: -3px; }
.tile.corner { background: #eadcbb; }
.tile-name { font-size: clamp(8px, .93vw, 12px); font-weight: 800; overflow-wrap: anywhere; }
.tile-price { font-size: clamp(7px,.83vw,11px); margin-top: 3px; color: var(--muted); }
.tile-icon { font-size: clamp(12px,1.9vw,25px); line-height: 1; margin-bottom: 2px; color: #9f4737; }
.pieces { position: absolute; bottom: 5px; left: 2px; right: 2px; display: flex; flex-wrap: wrap; justify-content: center; }
.token { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: none; border-radius: 50%; color: white; background: var(--token); }
.tile .token { font-size: clamp(6px, .85vw, 12px); width: clamp(9px,1.25vw,17px); height: clamp(9px,1.25vw,17px); box-shadow: 0 0 0 1px var(--light); }
.tile:has(.pieces .token) { padding-bottom: clamp(11px, 1.85vw, 24px); }
.tile-owner { position: absolute; top: 1px; right: 1px; font-size: 9px; background: transparent; color: white; padding: 0 2px; border-radius: 2px; max-width: 100%; }
.side { display: grid; gap: 10px; }
.panel { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--light); }
.panel h2 { font: bold 19px/1.2 var(--serif); margin: 0 0 9px; }
.player { display: flex; gap: 8px; align-items: center; padding: 5px; border-radius: 6px; }
.player.current { background: #e5ebd8; }
.player.out { opacity: .58; }
.player-name { min-width: 0; margin-right: auto; overflow-wrap: anywhere; }
.player-name small { display: block; color: var(--muted); }
.player-name small:empty { display: none; }
.action-panel { display: grid; gap: 7px; }
.action-panel h2, .action-panel p { margin-bottom: 0; }
.action-panel p { color: var(--muted); }
.subdued { color: var(--muted); font-size: 12px; justify-self: start; }
.bid-form { display: flex; gap: 5px; }
.log-panel ol { list-style: none; padding: 0; margin: 0; max-height: 172px; overflow: auto; }
.log-panel li { padding: 4px 0; border-top: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.notice { position: fixed; z-index: 10; bottom: 15px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; margin: 0; border-radius: 8px; background: var(--ink); color: var(--light); padding: 10px 13px; box-shadow: 0 5px 14px #0003; }
dialog { width: min(510px, 92vw); max-height: 85vh; color: var(--ink); background: var(--light); border: 1px solid var(--line); padding: 24px; border-radius: 12px; }
dialog::backdrop { background: #182a23aa; }
dialog h2 { font: bold 29px/1.1 var(--serif); margin-bottom: 13px; padding-right: 24px; }
.close { position: absolute; right: 9px; top: 7px; border: 0; background: transparent; font-size: 23px; line-height: 1.2; }
.rules { padding-left: 19px; margin: 0; }
.rules li + li { margin-top: 9px; }
.property-actions, .trade-form { display: grid; gap: 7px; }
.check { display: flex; align-items: center; gap: 7px; width: fit-content; }
.check input { width: auto; }
@media (max-width: 960px) {
  .top, main, .footer { width: calc(100% - 42px); }
  .hero-board { width: 94%; }
}
@media (max-width: 760px) {
  .landing { grid-template-columns: 1fr; gap: 0; min-height: auto; padding: 45px 0 37px; }
  .hero-board { grid-column: 1; grid-row: 3; width: min(72%, 400px); padding: 8%; margin: 55px 0 20px; }
  .hero-meta { margin-bottom: 23px; }
  .table-layout { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr 1fr; }
  .log-panel { grid-column: 1 / -1; }
}
@media (max-width: 470px) {
  body { font-size: 14px; }
  .top { min-height: 59px; }
  .top, main, .footer { width: calc(100% - 24px); }
  .room { padding-top: 19px; }
  .room-top .outline { font-size: 11px; padding: 7px; }
  .room-top { align-items: center; }
  .board { padding: 3px; }
  .tile-name { font-size: clamp(6.5px, 1.8vw, 8px); }
  .tile-price { font-size: 7px; margin-top: 1px; }
  .tile { box-shadow: inset 0 -3px var(--stripe, transparent); }
  .tile.side-1 { box-shadow: inset -3px 0 var(--stripe, transparent); padding-right: 3px; }
  .tile.side-2 { box-shadow: inset 0 -3px var(--stripe, transparent); }
  .tile.side-3 { box-shadow: inset 3px 0 var(--stripe, transparent); padding-left: 3px; }
  .pieces { bottom: 3px; }
  .side { grid-template-columns: 1fr; }
  .action-panel { grid-row: 1; }
  #entryForm:has(#codeLabel:not([hidden])) { grid-template-columns: 1fr; }
}

/* Illustrated city and game feedback */
:root {
  --paper: #f9efd9;
  --light: #fff9e8;
  --ink: #1a3331;
  --muted: #4a5e52;
  --red: #b5353d;
  --line: #dcc8a5;
}
body {
  background:
    radial-gradient(ellipse at 85% 8%, #ffd28180, transparent 36rem),
    radial-gradient(ellipse at 3% 66%, #b9d4ac58, transparent 32rem),
    var(--paper);
}
.brand-icon { background: #b5353d; box-shadow: 3px 3px #e6a840; }
.hero-board {
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), #183936 calc(12.5% - 1px) 12.5%),
    repeating-linear-gradient(0deg, transparent 0 calc(12.5% - 1px), #183936 calc(12.5% - 1px) 12.5%),
    conic-gradient(from 12deg, #f39f42, #da5265, #8a64ba, #42aab0, #f1c354, #e36142, #f39f42);
  box-shadow: 10px 13px 0 #173630, 17px 26px 32px #344d3447;
  transition: transform .34s ease, box-shadow .34s ease;
}
.hero-board:hover { transform: rotate(-3deg) translateY(-5px); box-shadow: 9px 14px #173630, 15px 25px 42px #344d3454; }
.board-center p { padding: .25em .7em; border-radius: 20px; background: #14364ce6; color: #fff2cb; }
.board-dice { margin: 5px 0 9px; gap: .28em; perspective: 300px; }
.die {
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center;
  width: .76em; aspect-ratio: 1; padding: .085em; border: 1px solid #ffe9ac;
  border-radius: 18%; background: #fff2c8; color: #913b46; box-shadow: .035em .08em #b8814e, 0 .13em .19em #092f4e5c;
  transform: rotate(-8deg);
}
.die:nth-child(2) { transform: rotate(9deg); background: #ffe1a3; }
.pip { width: 61%; aspect-ratio: 1; border-radius: 50%; background: currentColor; }
.die-mark { grid-area: 1 / 1 / -1 / -1; font-size: .4em; font-style: normal; }
.die.rolled { animation: tumble .46s cubic-bezier(.15,.7,.28,1.2) both; }
.die.rolled:nth-child(2) { animation-delay: 55ms; }
.tile { background: color-mix(in srgb, var(--stripe, #ebbd70) 14%, var(--light)); transition: background .15s ease; }
.tile:hover { background: color-mix(in srgb, var(--stripe, #f0b95f) 35%, var(--light)); }
.tile.corner { background: #f5ce89; }
.tile.my-location { outline: 2px solid #a4264e; outline-offset: -2px; z-index: 1; }
.tile.arrival::after, .tile.developed::after { content: ''; position: absolute; inset: 0; background: #ffd752; pointer-events: none; animation: highlight 1s ease-out forwards; }
.tile.developed::after { background: #45b877; }
.flying-piece { position: fixed; z-index: 20; pointer-events: none; box-shadow: 0 3px 8px #10292495; }
.confetti { position: fixed; z-index: 20; top: -18px; left: var(--x); width: 8px; height: 12px; background: var(--color); pointer-events: none; animation: confetti-fall 2s var(--delay) ease-in both; }
.action-panel { border-top: 3px solid #b5353d; }
.primary { transition: background .17s ease, transform .17s ease; }
.primary:not(:disabled):active { transform: scale(.97); }
@keyframes tumble { 0% { transform: translateY(-35%) rotate(-100deg) rotateX(120deg) scale(.65); } 70% { transform: translateY(4%) rotate(20deg) scale(1.09); } }
@keyframes highlight { from { opacity: .9; } to { opacity: 0; } }
@keyframes confetti-fall { to { transform: translate(8vw, 105vh) rotate(680deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Letterpress game board */
body { background: radial-gradient(ellipse at 80% 12%, #ecd7a6 0%, transparent 38rem), #f3e7ca; }
.room-tools { display: flex; gap: 6px; align-items: center; }
#sound[aria-pressed="true"] { background: #1b4736; color: #fff3d6; }
.board {
  --board-paper: #efe0bd;
  --board-ink: #273826;
  background: var(--board-ink);
  gap: 2px;
  padding: 5px;
  border-radius: 3px;
  outline: 1px solid #846d4b;
  box-shadow: 0 0 0 5px var(--board-paper), 0 0 0 6px #af9b74, 0 9px 19px #66552e21;
}
.board-center {
  position: relative;
  overflow: hidden;
  justify-content: center;
  padding: 0;
  color: #f5e9c8;
  background-color: #aab598;
}
.board-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.board-controls { position: absolute; inset-inline: 29% 3%; bottom: 5%; display: grid; justify-items: center; gap: 5px; }
.board-center p { background: #263e30; color: #fff2ce; max-width: 100%; overflow-wrap: anywhere; }
.board-dice {
  background: transparent; border: 0; padding: 0; color: inherit; margin: 0;
  font-size: clamp(25px, 5vw, 67px); transition: transform .18s ease;
}
.board-dice:disabled { opacity: 1; }
.board-dice:not(:disabled):hover { transform: rotate(-4deg) scale(1.13); }
.board-dice:not(:disabled):active { transform: scale(.93); }
.board-dice:not(:disabled) .die { box-shadow: .035em .08em #a16e35, 0 0 .23em #fff8ba; }
.die { color: #294432; }
.tile {
  --tile-width: 6px;
  background-color: var(--board-paper);
  background-image: repeating-linear-gradient(39deg, transparent 0 3px, #6c512812 3px 4px, transparent 4px 7px);
  color: var(--board-ink);
  font-variant-numeric: tabular-nums;
}
.tile.side-0 { box-shadow: inset 0 var(--tile-width) var(--stripe, transparent); }
.tile.side-1 { box-shadow: inset calc(-1 * var(--tile-width)) 0 var(--stripe, transparent); }
.tile.side-2 { box-shadow: inset 0 calc(-1 * var(--tile-width)) var(--stripe, transparent); }
.tile.side-3 { box-shadow: inset var(--tile-width) 0 var(--stripe, transparent); }
.tile.corner { background-color: #e9d2a0; }
.tile-icon { color: #23452e; }
.tile[data-kind="arrest"] .tile-icon, .tile[data-kind="tax"] .tile-icon { color: #9b352d; }
.tile[data-kind="card"] .tile-icon { color: #89541d; }
.tile[data-kind="utility"] .tile-icon { color: #235b6e; }
.table-event {
  margin: 10px 0 0; padding: 7px 10px; min-height: 33px;
  border-bottom: 1px solid #b49e74; color: #364733; font-size: 12px; font-weight: 650;
}
.player b { text-align: right; white-space: nowrap; }
.player b small { display: block; font-size: 10px; }
.player b .gain { color: #176947; }
.player b .loss { color: #a3362b; }
@media (max-width: 470px) {
  .board { gap: 1px; padding: 3px; }
  .tile { --tile-width: 3px; }
  .board-controls { bottom: 4%; gap: 3px; }
  .room-tools { gap: 3px; }
  .room-tools .outline { padding: 6px; }
}

/* The city poster extends behind the lobby and the game table. */
body { background: #123a37; isolation:isolate; }
body::before {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(90deg,#082b2af5 0%,#0e3432dd 21%,#1034306b 43%,transparent 69%),
    url("assets/city-panorama.webp") center 52% / cover no-repeat;
}
body:has(.room:not([hidden]))::before {
  background:linear-gradient(110deg,#072825ba,#132c297a),
    url("assets/city-panorama.webp") center / cover no-repeat;
}
.top,.footer { color:#fff0cb; border-color:#dfbe7966; }
.top { min-height:66px; }
.brand-icon { background:#a5412e; color:#fff1c7; border:1px solid #f0ce8e; }
.top .text-button { color:#f5dec0; }
.landing { min-height:calc(100svh - 120px); padding:clamp(32px,6vh,76px) 0; grid-template-columns:minmax(330px,460px) 1fr; }
.intro,.room-top { color:#fff0cf; }
.intro .eyebrow,.room-top .eyebrow { color:#f3d59c; }
.intro h1 { font-size:clamp(68px,8vw,118px); text-shadow:0 3px 8px #072c2766; }
.intro .period,.hero-meta span { color:#ffb356; }
.intro .lead { color:#fff0d5; text-shadow:0 1px 5px #123a31; }
.hero-meta { color:#f8e2b9; margin-bottom:24px; }
.entry,.panel,dialog { background:linear-gradient(125deg,#fff4d7,#f2e4c4); border:1px solid #bd945b; border-radius:4px; box-shadow:0 4px 0 #755336,0 12px 25px #061c1a55; }
.entry { padding:17px 20px 19px; border-top:4px solid #c18949; }
.entry .primary,.action-panel .primary { background:#963e2e; border-color:#663527; color:#fff2d2; }
.entry .primary:hover,.action-panel .primary:hover { background:#753625; }
.room-top .outline { color:#fff0ce; background:#163c35e8; border-color:#d3b97d; }
.board { box-shadow:0 0 0 3px #ddb87d,0 0 0 8px #805633,0 6px 0 8px #473621,0 18px 32px #09232099; }
.table-layout { gap:25px; }
.table-event { color:#fff0cf; background:#12392feb; border:1px solid #bea470; border-radius:3px; margin-top:17px; }
.side .panel { padding:17px; }
.side .panel h2 { border-bottom:1px solid #b79a68; padding-bottom:8px; }
.action-panel { border-top:4px solid #a54431; }
.tile[data-kind="station"] .tile-icon,.tile[data-kind="park"] .tile-icon,.tile[data-kind="utility"] .tile-icon {
  display:block; width:61%; height:38%; min-height:10px; font-size:0;
  background-size:cover; background-position:center; border-radius:2px;
}
.tile[data-kind="station"] .tile-icon,.deed-art[data-kind="station"] { background-image:url("assets/station.webp"); }
.tile[data-kind="park"] .tile-icon,.deed-art[data-kind="park"] { background-image:url("assets/park.webp"); }
.tile[data-kind="utility"] .tile-icon,.deed-art[data-kind="utility"] { background-image:url("assets/works.webp"); }
.deed-art { height:clamp(100px,23vh,180px); background:url("assets/canal.webp") center / cover; margin:-24px -24px 18px; border-bottom:4px double #826335; }
#property .close { z-index:1; background:#fbebc8; border:1px solid #907746; width:32px; height:32px; border-radius:50%; }
@media(max-width:760px) {
  body::before { background:linear-gradient(0deg,#123632 3%,#123632b3 42%,#0d302627 78%),url("assets/city-panorama.webp") 65% top / auto 100% no-repeat; }
  .landing { min-height:calc(100svh - 115px); grid-template-columns:minmax(0,1fr); align-content:end; padding-top:clamp(120px,24vh,245px); }
  .intro { text-shadow:0 1px 6px #132e29,0 2px 16px #132e29; }
  .intro h1 { font-size:clamp(56px,11vw,76px); margin-bottom:12px; }
  .entry { padding:12px 15px; }
  .table-layout { gap:13px; }
  .room { padding-inline:4px; }
}
@media (min-width: 900px) {
  .room {
    --play-size: clamp(490px, calc(100svh - 177px), 850px);
    max-width: calc(var(--play-size) + 335px);
    margin-inline:auto;
    padding-top:16px;
  }
  .room-top { margin-bottom:13px; align-items:center; }
  .room-top h1 { font-size:clamp(24px,3vh,34px); }
  .room-top .eyebrow { margin-bottom:3px; }
  .board-scroll { max-width:var(--play-size); }
}
.board-scroll { container-type:inline-size; }
.tile .tile-name { font-size:clamp(7px,1.55cqw,12px); }
.tile .tile-price { font-size:clamp(7px,1.3cqw,10px); }
