:root {
  color-scheme: light;
  font-family: "Inter", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  --display: "Arial Rounded MT Bold", "Ubuntu Sans", system-ui, sans-serif;
  --ink: #203c33;
  --muted: #4d6359;
  --paper: #f9efd9;
  --card: #fffbec;
  --edge: #d8c7a3;
  --green: #175a4c;
  --red: #a62b35;
  --red-hover: #89222b;
  --gold: #eac467;
  --sea: #21596c;
  --radius: 14px;
  --gap: 10px;
  --float-shadow: 0 14px 26px #442a191d;
  --press-time: 170ms;
  --enter-time: 320ms;
  --spring: cubic-bezier(.18,.94,.32,1.18);
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; isolation: isolate; color: var(--ink);
  background: radial-gradient(ellipse at 53% 30%, #fff8e2d9, transparent 75%), linear-gradient(146deg, #faedd2, #f7e4bd);
  background-attachment: fixed;
}
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; transition: translate var(--press-time) var(--spring), scale var(--press-time) var(--spring), background-color var(--press-time); }
button:disabled { opacity: .54; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #276a9a; outline-offset: 3px; }
h1, h2, h3, p, figure, dl, ol, ul { margin: 0; }
h1, h2, h3 { line-height: 1.1; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

#app { min-height: 100vh; color: var(--ink); }
.header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1440px; min-height: 64px; margin-inline: auto; padding: 8px clamp(16px, 3.8vw, 52px);
  padding-top: max(8px, env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-mark {
  position: relative; isolation: isolate; display: grid; place-items: center;
  width: 31px; height: 33px; flex: none; border: 1px solid #8e2731; border-radius: 7px;
  background: var(--red); color: white; transform: rotate(-8deg);
}
.brand-mark::before {
  content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit;
  background: var(--red);
}
.brand-mark::after {
  content: ""; position: absolute; z-index: -2; inset: 0; border: 1px solid #214e40;
  border-radius: inherit; background: var(--green); transform: translateX(5px) rotate(18deg);
}
.brand-mark .ui-icon { width: 20px; height: 20px; }
.brand-name { display: flex; align-items: center; gap: 5px; font: 850 1rem/1 var(--display); letter-spacing: -.035em; }
.brand-name > span { padding: .24em .38em; border-radius: 5px; background: #f1d9cd; color: var(--red); font-size: .8em; }
@media (max-width: 420px) {
  .welcome-header .brand-name { display: none; }
  .table .brand-name { font-size: .86rem; }
  .table .brand-mark { width: 25px; height: 27px; }
  .table .brand-mark .ui-icon { width: 16px; height: 16px; }
}
.header.flow-header {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  max-width: none; padding-inline: clamp(12px, 5vw, 50px);
  border-bottom: 1px solid #d8c7a380; background: #fffbecb3;
}
.flow-header .brand { grid-area: 1 / 2; }
@media (max-width: 620px) {
  .header.flow-header { padding-inline: 12px; padding-bottom: 6px; }
}
.button {
  min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px;
  color: var(--ink); background: transparent; font-size: .92rem; font-weight: 700; line-height: 1.2; text-align: center;
}
.button:not(:disabled):active, .mode-option:active, .stepper-controls button:not(:disabled):active { translate: 0 2px; scale: .98; }
.button.primary { color: white; background: var(--red); border: 1px solid #84232a; box-shadow: 0 4px 0 #701e26; }
.button.primary:not(:disabled):hover { background: var(--red-hover); }
.button.secondary { background: #eee3c8; border-color: var(--edge); }
.button.primary:disabled { background: #b9b2a4; border-color: #a39c8d; box-shadow: none; color: #f5f1e6; }
.button.secondary:disabled { background: #e3ddcf; border-color: #cfc6b2; box-shadow: none; color: #8a8474; }
.detached-actions .dialog-footer .button.primary:disabled { background: #b9b2a4; border-color: #a39c8d; box-shadow: none; color: #f5f1e6; }
.detached-actions .dialog-footer .button.secondary:disabled { background: #e3ddcf; border-color: #cfc6b2; box-shadow: none; color: #8a8474; }
.button:disabled { cursor: not-allowed; }
.button.secondary:not(:disabled):hover { background: #f3dcaa; }
.button.text-button:hover { background: #1857470e; }
.button.wide { width: 100%; }
.header .text-button { min-height: 44px; padding-inline: 12px; }

.ui-icon { width: 21px; height: 21px; flex: none; vertical-align: middle; }
.icon-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
h1, .podium-step, .balance-value, .sheet-assets-head b { font-family: var(--display); }
.page-pattern {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  color: #9b704b; opacity: .35; mask-image: radial-gradient(ellipse at center, #0005 15%, #000 78%);
}
.welcome-header { max-width: 1180px; }
.welcome-header .text-button { border-color: var(--edge); background: #fff9e9; font-size: .78rem; }
.welcome-actions { display: flex; gap: 6px; }
.welcome-actions .ui-icon { width: 17px; height: 17px; }
.welcome-stage {
  max-width: 1010px; min-height: calc(100dvh - 64px); margin-inline: auto;
  display: grid; align-content: center; justify-items: center; gap: clamp(12px, 3vh, 26px);
  padding: 12px 16px max(30px, env(safe-area-inset-bottom)); text-align: center;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 {
  font-size: clamp(2.85rem, 9vw, 6.35rem); font-weight: 900; letter-spacing: -.07em; line-height: .93;
}
.hero-copy h1 span, .hero-copy em { display: block; animation: brand-enter .56s var(--spring) both; }
.hero-copy em { color: var(--red); font-style: normal; animation-delay: 65ms; }
.hero-copy p {
  margin: 14px auto 0; max-width: 32ch; color: var(--muted);
  font-size: clamp(.93rem, 1.5vw, 1.14rem); line-height: 1.42;
  animation: brand-enter .44s ease-out 125ms both;
}
.hero-cta { width: min(100%, 300px); }
.button.hero-play {
  width: 100%; min-height: 57px; margin-top: 3px; padding: 12px 16px; border-radius: 13px;
  font-size: 1.03rem; gap: 12px; box-shadow: 0 5px 0 #701e26, 0 11px 19px #813b3a32;
  animation: action-breathe 3.8s ease-in-out 1.1s infinite;
}
.hero-play .ui-icon:last-of-type { margin-left: auto; width: 18px; }
.hero-play .ui-icon:first-of-type { width: 24px; height: 24px; }
.hero-pieces { width: min(550px, 100%); height: clamp(182px, 48vw, 248px); position: relative; isolation: isolate; }
.hero-platform {
  position: absolute; width: 84%; height: 52%; left: 8%; bottom: 0; border-radius: 50%;
  border: 1px solid #9f824d62;
  background: radial-gradient(ellipse, #fcde99, #e6ab54 78%);
  box-shadow: 0 9px 0 #b57847, 0 16px 24px #76502c38;
}
.hero-platform::after { content: ""; position: absolute; inset: 5px; border: 1px solid #9f824d48; border-radius: inherit; }
.hero-card {
  position: absolute; top: 7%; width: 40%; border: 2px solid #233f35; border-radius: 13px;
  background: #fff; padding: 6px; text-align: left; color: var(--ink);
  box-shadow: 0 6px 0 #2e5243, 0 13px 20px #422d1842;
  animation: float-piece 5s ease-in-out infinite alternate;
}
.hero-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 7px; }
.hero-card figcaption { padding: 5px 4px 2px; font-size: clamp(.83rem, 2.5vw, 1.1rem); font-weight: 800; }
.hero-card-makassar { left: 11%; transform: rotate(-13deg); background: #fff3d2; }
.hero-card-makassar img { background: linear-gradient(#e6f2dd, #c5dfca); }
.hero-card-mamuju { right: 12%; top: 14%; transform: rotate(10deg); background: #e6f5ff; animation-delay: -1.7s; }
.hero-die {
  position: absolute; perspective: 480px; --die-size: clamp(40px, 11vw, 60px);
  animation: rock-die 6.5s ease-in-out infinite alternate;
}
.hero-die-one { top: 66%; left: 5%; --rest: -17deg; --die-turn: -28deg; --pip-color: #993947; }
.hero-die-two { top: 5%; right: 8%; --rest: 16deg; animation-delay: -2.6s; }
@keyframes brand-enter { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes action-breathe { 0%, 75%, 100% { transform: scale(1); } 86% { transform: scale(1.019); } }
@keyframes float-piece { from { translate: 0 0; } to { translate: 3px -8px; } }
@keyframes rock-die { from { transform: rotate(var(--rest)); } to { transform: translateY(-6px) rotate(calc(var(--rest) + 17deg)); } }

.flow { max-width: 1040px; margin: 0 auto; padding: clamp(20px, 4vw, 42px) clamp(17px, 5vw, 50px) 50px; }
.flow-title { margin-bottom: 25px; }
.flow h1 { font-size: clamp(1.95rem, 5vw, 3.2rem); font-weight: 820; letter-spacing: -.06em; }
.flow-title p { margin-top: 9px; color: var(--muted); }
.flow.mode-flow {
  display: grid; align-content: start; gap: clamp(18px, 3.5svh, 30px);
  max-width: 540px; padding-block: clamp(24px, 12svh, 106px) 32px;
}
.mode-flow .flow-title { margin: 0; text-align: center; }
.mode-flow h1 { font-size: clamp(1.7rem, 6vw, 2.7rem); }
.mode-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2.8vw, 14px); }
.mode-option {
  --mode-paper: #ffeba9; --mode-edge: #8a5812;
  display: grid; grid-template-rows: auto 1fr; justify-items: center; align-content: start;
  gap: 11px; min-width: 0; min-height: clamp(130px, 32vw, 156px); padding: 13px clamp(5px, 2vw, 11px) 11px;
  color: var(--ink); text-align: center; background: #fff;
  border: 1px solid #a0bacb; border-bottom: 3px solid var(--mode-edge); border-radius: 14px;
  box-shadow: 0 4px 8px #213d5414; transition: background var(--press-time), translate var(--press-time);
}
.mode-option[data-mode="local"], .mode-option[data-mode="online"] { --mode-paper: #c5f1e3; --mode-edge: #147667; }
.mode-option[data-mode="network"], .mode-option[data-mode="lan"] { --mode-paper: #d4edff; --mode-edge: #226595; }
.mode-option[data-mode="match"] { --mode-paper: #ebe0fc; --mode-edge: #7049a6; }
.mode-symbol {
  display: grid; place-items: center; width: clamp(40px, 11vw, 52px); aspect-ratio: 1;
  border-radius: 14px; color: var(--mode-edge); background: var(--mode-paper);
}
.mode-symbol .ui-icon { width: 56%; height: 56%; }
.mode-content { display: grid; align-content: start; gap: 5px; min-width: 0; }
.mode-content strong { font: 830 clamp(.81rem, 3.2vw, 1.05rem)/1.15 var(--display); overflow-wrap: anywhere; }
.mode-content small { color: var(--muted); font-size: clamp(.71rem, 2.65vw, .8rem); line-height: 1.3; }
.mode-flow .flow-return { margin-top: 2px; }
.mode-flow .flow-return .button { padding-inline: 16px; }
@media (hover: hover) {
  .mode-option:hover { background: color-mix(in srgb, var(--mode-paper) 28%, white); }
}
.room-mode-flow { max-width: 460px; }
.room-mode-actions { display: grid; gap: 12px; }
.flow-return { display: flex; justify-content: center; }
.room-mode-flow .flow-return { margin-top: 16px; }
.room-mode-option { display: grid; gap: 10px; }
.room-mode-option :is(p, ol) { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.room-mode-option ol { display: grid; gap: 6px; margin: 0; padding-inline-start: 1.25rem; }
.room-mode-option li::marker { color: var(--green); font-weight: 800; }
.room-mode-host { background: linear-gradient(135deg, #e9f2e7, var(--card) 74%); }
.screen-awake {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 4px 12px; margin-block: 8px; padding: 6px 10px; font-size: .82rem; line-height: 1.35;
}
.screen-awake p { flex: 1 1 170px; }
.screen-awake-actions { display: flex; gap: 4px; }
.screen-awake-actions .button { padding: 6px 10px; font-size: .8rem; }
.table-main > .screen-awake { margin-inline: 8px; }
.screen-awake-video { position: fixed; inset: auto 0 0 auto; width: 2px; height: 2px; pointer-events: none; }
.join-code-field { margin-bottom: 12px; }
.join-code-field input { text-transform: uppercase; letter-spacing: .12em; font-weight: 750; }
@media (max-width: 840px) {
}
.panel { border: 1px solid var(--edge); background: var(--card); border-radius: var(--radius); padding: clamp(15px, 2.5vw, 24px); min-width: 0; }
.panel h2 { font-size: 1.1rem; font-weight: 760; letter-spacing: -.025em; }
.info-card {
  padding: 10px 12px; border: 1px solid var(--edge); border-radius: 10px;
  background: var(--card); overflow-wrap: anywhere;
}
.info-card h3 { margin-bottom: 8px; font-size: 1rem; }
.info-card p { font-size: .86rem; line-height: 1.48; }
.info-stack { display: grid; gap: 8px; }
.setup-grid, .lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setup-grid.one-panel { grid-template-columns: 1fr; max-width: 610px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.counter, .fine-print { color: var(--muted); font-size: .84rem; }
.avatar {
  --space: 38px;
  display: inline-grid; place-items: center; width: var(--space); height: var(--space); flex: none;
  border: 2px solid var(--pawn); border-radius: 26%;
  background: linear-gradient(150deg, #fffdf1, color-mix(in srgb, var(--pawn) 18%, #ebf5ff));
}
.character-sprite { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.character-picker { border: 0; padding: 0; margin-top: 14px; }
.character-editor { display: grid; gap: 10px; }
.character-preview {
  min-height: 90px; display: grid; place-items: center; border: 1px solid #bcd6e5; border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, #fff 0 30%, transparent 31%), #dfedfb;
}
.character-preview .avatar {
  --space: 70px; border-width: 0; border-radius: 0; background: transparent;
  filter: drop-shadow(2px 3px 0 #27487224);
}
.character-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 540px) {
  .character-editor { grid-template-columns: 108px minmax(0, 1fr); align-items: stretch; }
}

.field { display: grid; gap: 6px; margin: 0; }
.field > span, fieldset legend { font-size: .83rem; font-weight: 750; }
input:not([type="checkbox"]):not([type="radio"]), select {
  min-height: 45px; border-radius: 7px; border: 1px solid var(--edge); background: #fff; padding: 8px 10px;
  width: 100%; min-width: 0; color: var(--ink); font-size: 1rem;
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 12px; }
.switch { display: flex; align-items: flex-start; gap: 8px; font-size: .91rem; margin-bottom: 10px; }
.switch input { accent-color: var(--green); margin-top: 3px; }
fieldset { padding: 0; margin: 0; border: 0; }
fieldset legend { margin-bottom: 4px; }

.room-code { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; background: #eaf2ec; padding: 9px 11px; border-radius: 7px; margin: 13px 0 9px; }
.room-code span, .room-code strong { display: block; }
.room-code span { font-size: .75rem; color: var(--muted); }
.room-code strong { color: var(--green); letter-spacing: .17em; font-family: monospace; font-size: 1.2rem; }
.room-code .button { font-size: .78rem; min-height: 44px; padding: 5px 9px; background: var(--card); }
.rule-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin: 13px 0; overflow-wrap: anywhere; }
.rule-list > div { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.rule-list dt { color: var(--muted); }
.rule-list dd { margin: 0; text-align: right; font-weight: 750; }
.rule-list :is(dt, dd) { min-width: 0; }
.start-button { margin-top: 6px; width: 100%; }
.countdown { display: grid; justify-items: center; align-content: center; gap: 18px; min-height: 65vh; padding: 20px; text-align: center; }
.countdown h1 { font-size: clamp(1.25rem, 4vw, 2rem); font-weight: 750; }
.countdown-card { display: grid; justify-items: center; gap: 16px; padding: clamp(12px, 5vw, 32px); }
#countdown-number { font-size: clamp(5rem, 15vw, 9rem); font-weight: 850; line-height: 1; color: var(--red); }
#countdown-number > span { display: block; animation: countdown-wobble 620ms cubic-bezier(.2,.8,.25,1) both; }
@keyframes countdown-wobble {
  0% { transform: scale(.55) rotate(-14deg); opacity: .35; }
  36% { transform: scale(1.15) rotate(9deg); }
  62% { transform: scale(.96) rotate(-5deg); }
  82% { transform: scale(1.04) rotate(2deg); }
}
.entrance-clouds { position: fixed; z-index: 6; inset: 0; overflow: hidden; pointer-events: none; }
.entrance-clouds > span {
  position: absolute; inset: -4% auto -4% -8%; width: 67%;
  background:
    radial-gradient(ellipse at 31% 20%, #fff 12%, #f0f9ff 34%, transparent 68%),
    radial-gradient(ellipse at 42% 53%, #fff 17%, #ebf5fb 36%, transparent 67%),
    radial-gradient(ellipse at 23% 86%, #fff 16%, #e2f2fc 44%, transparent 73%);
  filter: drop-shadow(0 10px 22px #7da5bc40);
  animation: clouds-open 1400ms cubic-bezier(.3,.7,.21,1) both;
}
.entrance-clouds > span:last-child { inset-inline: auto -8%; --cloud-direction: 1; scale: -1 1; }
.countdown .entrance-clouds { z-index: 0; }
.countdown .entrance-clouds > span { animation: none; opacity: .48; translate: calc(var(--cloud-direction, -1) * 61%) 0; }
.countdown-card { position: relative; z-index: 1; }
@keyframes clouds-open {
  12% { opacity: 1; }
  to { translate: calc(var(--cloud-direction, -1) * 124%) -6%; opacity: .3; }
}
@media (prefers-reduced-motion: reduce) {
  #countdown-number > span { animation: none; }
  .entrance-clouds { display: none; }
}
.countdown-pawns { display: flex; gap: 4px; }
.countdown-pawns .avatar { --space: clamp(34px, 11vw, 54px); }

.table #app { min-height: 100dvh; display: flex; flex-direction: column; }
.table .header { width: 100%; min-height: 58px; }
.table-tools, .table-top { display: flex; align-items: center; gap: 8px; }
.table-tools { flex: none; }
.icon-button {
  display: grid; place-items: center; background: var(--card); border: 1px solid var(--edge); padding: 0;
  min-height: 44px; width: 44px;
}
.table-top h1 { font-size: .9rem; font-weight: 850; white-space: nowrap; }
.table-top h1 span { color: var(--muted); font-weight: 560; }
.round-card { padding: 6px; border: 1px solid var(--edge); border-radius: 8px; background: var(--card); }
.table-layout {
  --felt: radial-gradient(ellipse at 56% 17%, #f1f7daaf, transparent 58%),
    linear-gradient(148deg, #bfdad2bb, #79aaa7c9);
  display: flex; flex: 1; width: min(100%, 1240px); min-width: 0; margin-inline: auto;
  padding: 0 clamp(0px, 2vw, 28px);
}
.table-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.table-stage { background: var(--felt); border-radius: 19px 19px 7px 7px; border: 1px solid #72a496; display: flex; flex: 1; }
.table-side {
  position: sticky; bottom: 0; z-index: 3; width: min(100%, 940px); margin: 0 auto;
  padding: 0 11px max(9px, env(safe-area-inset-bottom));
  border: 1px solid #cdbd96; border-bottom: 0; border-radius: 19px 19px 0 0;
  background: var(--card); box-shadow: 0 -5px 17px #23463523;
}
.turn-label { font-size: .72rem; color: var(--muted); font-weight: 650; margin-bottom: 2px; }
.balances { display: flex; gap: 7px; padding: 3px 4px 7px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.balances li {
  display: flex; gap: 6px; align-items: center; flex: 0 0 auto; max-width: 180px;
  min-height: 48px; padding: 3px 7px 3px 5px; background: var(--card); border: 1px solid var(--edge); border-radius: 11px;
}
.balances li.current-player { border-color: var(--player); box-shadow: inset 0 0 0 1px var(--player); }
.balances .balance-person { overflow: hidden; }
.balances strong, .balances small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balances strong { font-size: .77rem; }
.balances small { color: var(--muted); font-size: .71rem; }
.balances .avatar { --space: 30px; }
.balance-rank {
  font-size: .73rem; font-weight: 800; min-width: 22px; height: 22px; align-self: flex-start;
  display: inline-grid; place-items: center; background: #f3e5b9; color: #664715; border-radius: 8px;
}
.cash-up .balance-value { color: #146449; }
.cash-down .balance-value { color: #a62432; }
.balances .cash-up { background: #deefde; }
.balances .cash-down { background: #f8ded9; }
.board-frame { position: relative; flex: 1; min-height: clamp(370px, calc(100dvh - 248px), 650px); overflow: hidden; border-radius: 18px 18px 7px 7px; }
#board { --board-center-y: 48%; position: absolute; inset: 0; }
#board, .scene { width: 100%; height: 100%; }
.scene { perspective: 1350px; perspective-origin: 50% var(--board-center-y); position: relative; touch-action: none; cursor: grab; user-select: none; }
.scene.dragging, .scene.dragging button { cursor: grabbing; }
.board-model {
  position: absolute; left: 50%; top: var(--board-center-y); width: var(--board-size); height: var(--board-size); transform-style: preserve-3d;
  transform: translate(calc(-50% + var(--camera-x, 0px)), calc(-50% + var(--camera-y, 0px))) rotateX(var(--tilt, 36deg)) rotateZ(var(--angle, -11deg)) scale3d(var(--view, .8), var(--view, .8), var(--view, .8));
  transition: transform 340ms cubic-bezier(.24,.56,.35,1);
}
.board-model.following-roll { transition: none; }
.dragging .board-model { transition: none; }
.board-face { position: absolute; inset: 0; transform: translateZ(1px); transform-style: preserve-3d; }
.board-floor {
  position: absolute; inset: -7px; border-radius: 10px; border: 2px solid #f9edce;
  background: #e3c68a; box-shadow: 0 0 0 2px #6d5a34, 0 13px 23px #2e4e3f55;
}
.board-rim { position: absolute; background: #91653d; border: 1px solid #704d32; }
.rim-front, .rim-back { width: calc(var(--board-size) + 14px); height: 20px; left: -7px; transform: translateZ(-5px) rotateX(-90deg); transform-origin: top; }
.rim-front { top: calc(var(--board-size) + 7px); }
.rim-back { top: -7px; }
.rim-left, .rim-right { height: calc(var(--board-size) + 14px); width: 20px; top: -7px; transform: translateZ(-5px) rotateY(90deg); transform-origin: left; }
.rim-left { left: -7px; }
.rim-right { left: calc(var(--board-size) + 7px); }
.board-middle {
  position: absolute; inset: var(--cell); border-radius: 10px; transform-style: preserve-3d;
  background: #83a569; box-shadow: inset 0 0 0 4px #4f7054;
}
.tile {
  position: absolute; left: calc(3px + var(--x) * var(--cell)); top: calc(3px + var(--y) * var(--cell));
  display: grid; align-content: center; justify-items: center; gap: 4px;
  width: 83px; height: 83px; padding: 8px 3px 3px; border: 1px solid #a8b8cf; border-radius: 6px;
  background: #fbfdff; color: #162744; text-align: center; overflow: hidden;
  box-shadow: inset 0 -2px 0 #52659224;
}
.tile:hover, .tile:focus-visible { outline: 2px solid #2563eb; }
.tile.current { outline: 3px solid #4054cc; outline-offset: 1px; }
.tile-name { display: block; padding: 1px 0; font-size: 13px; font-weight: 800; letter-spacing: -.035em; line-height: 1; pointer-events: none; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--tile-accent); }
.tile-land { border-bottom: 2px solid var(--land-set); }
.tile-land .tile-glyph {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid #acb9cf; background: transparent; border-radius: 50%; font-size: 23px;
}
.tile-land .ui-icon { width: 26px; height: 26px; }
.tile-land .tile-name { font-size: 15px; overflow-wrap: anywhere; }
.tile-special { --tile-accent: #2758e6; }
.tile-start {
  --tile-accent: #2563eb; padding-bottom: 12px;
}
.tile-news { --tile-accent: #245be7; }
.tile-fate { --tile-accent: #7541e9; }
.tile-wild { --tile-accent: #007b9e; }
.tile-held { --tile-accent: #e32669; }
.tile-rest { --tile-accent: #008869; }
.tile-jobs { --tile-accent: #087bd5; }
.tile-hospital { --tile-accent: #0089aa; }
.tile-bank { --tile-accent: #5042d8; }
.tile-fee { --tile-accent: #3769db; }
.tile-personal-tax { --tile-accent: #9642ca; }
.tile-property-tax { --tile-accent: #c13aa9; }
.tile-police { --tile-accent: #d92363; }
.tile-jail { --tile-accent: #363b73; }
.tile-start .tile-name { font-size: 17px; text-transform: uppercase; }
.tile-glyph { display: block; font-size: 32px; line-height: 1.14; }
/* The seat number also appears on the owner's HUD portrait. */
.tile.tile-land.owned {
  border: 3px solid color-mix(in srgb, var(--owner) 55%, #cedadf);
  background: linear-gradient(155deg, color-mix(in srgb, var(--owner) 13%, white), color-mix(in srgb, var(--owner) 6%, white));
}
.tile-land.owned .tile-glyph { opacity: .48; }
.board-overview .tile-land.owned {
  border-width: 4px;
  background: color-mix(in srgb, var(--owner) 15%, white);
}
.plot-building {
  position: absolute; left: var(--bx); top: var(--by); width: 0; height: 0;
  transform: translateZ(3px) scale3d(1.07,1.07,1.04); transform-style: preserve-3d; pointer-events: none;
}
.building-footprint {
  position: absolute; width: 36px; height: 29px; inset: -14.5px auto auto -18px;
  border: 2px solid color-mix(in srgb, var(--building), #162b50 20%); border-radius: 5px;
  background: var(--building);
  transform: translateZ(-.5px);
}
.building-part {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--d);
  transform: translate3d(-50%, -50%, var(--z)); transform-style: preserve-3d;
  --facade: var(--building); --windows: none;
}
.building-roof, .building-gable { --facade: color-mix(in srgb, var(--building), black 19%); }
.building-trim { --facade: color-mix(in srgb, var(--building), white 11%); }
.building-glass {
  --facade: color-mix(in srgb, var(--building), black 17%);
  --windows: linear-gradient(0deg, transparent 24%, #0005 24% 78%, transparent 78%);
}
.building-shop { --windows: linear-gradient(90deg, transparent 20%, #0004 20% 74%, transparent 74%); }
.building-awning { --windows: linear-gradient(90deg, #0003 50%, transparent 50%); }
.building-part i { position: absolute; display: block; border-radius: 3px; border: 1px solid #11284a48; }
.building-top { inset: 0; background: color-mix(in srgb, var(--facade), white 43%); transform: translateZ(var(--h)); }
.building-front, .building-back {
  left: 0; width: var(--w); height: var(--h); transform: rotateX(90deg); transform-origin: top;
  background: var(--windows) 0 0 / 7px 6px, color-mix(in srgb, var(--facade), white 15%);
}
.building-front { top: var(--d); }
.building-back { top: 0; }
.building-left, .building-right {
  top: 0; width: var(--h); height: var(--d); transform: rotateY(-90deg); transform-origin: left;
  background: var(--windows) 0 0 / 6px 7px, color-mix(in srgb, var(--facade), #11284a 35%);
}
.building-left { left: 0; }
.building-right { left: var(--w); }
.building-gable :is(.building-left, .building-right) {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.roof-slope {
  left: 0; top: 50%; width: var(--w); height: var(--slope);
  background: repeating-linear-gradient(0deg, #0d20303b 0 1px, transparent 1px 5px),
    color-mix(in srgb, var(--facade), white 25%);
  transform-origin: top;
  transform: translateZ(var(--h)) rotateX(calc(-1 * var(--pitch)));
}
.roof-slope-back {
  transform: translateZ(var(--h)) rotateX(calc(180deg + var(--pitch)));
  background-color: var(--facade);
}
.building-growing { animation: build-tower .55s cubic-bezier(.2,.88,.38,1.22) both; }
@keyframes build-tower {
  from { transform: translateZ(3px) scale3d(1.07,1.07,.03); }
  to { transform: translateZ(3px) scale3d(1.07,1.07,1.04); }
}
.pawn {
  position: absolute; left: var(--left, 0); top: var(--top, 0); transform-style: preserve-3d;
  width: 31px; height: 31px; transform: translate(-50%, -50%) translateZ(16px);
  transition: left var(--step-time) ease-in-out, top var(--step-time) ease-in-out; pointer-events: none;
}
.pawn::before, .pawn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
}
.pawn::before { background: #13283c55; transform: translate3d(2px, 3px, -14.4px); filter: blur(2px); }
.pawn::after { display: none; }
.pawn.active-pawn::after, .pawn.inspected-pawn::after {
  display: block; inset: -3px; border: 2.5px solid var(--color);
  box-shadow: 0 0 0 1.5px #fff, inset 0 0 0 1px #3b2a39;
  transform: translateZ(-14.1px);
}
.pawn-piece {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 118px; transform-origin: 0 0;
  transform: translateZ(-15px) rotateZ(calc(-1 * var(--angle))) rotateX(calc(-1 * var(--tilt))) translateZ(var(--foot-depth, 0px)) scale(var(--pawn-scale, 1)) translate(-50%, -94px);
}
.pawn-marker { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; transform: translateZ(calc(var(--pawn-label-height, 77px) - 16px)); }
.pawn.landed-pawn .pawn-piece { animation: land-pawn 140ms ease-out; }
@keyframes land-pawn { from { scale: 1.06 .96; } }
.tile.just-owned { animation: win-tile 550ms ease-out; }
@keyframes win-tile { 30% { box-shadow: inset 0 0 0 6px #fff8cd, 0 0 0 6px #fff8cdae; } }
.pawn.moving-pawn { transition: none; }

.board-dice {
  position: absolute; z-index: 2; left: 50%; top: var(--roll-center-y, var(--board-center-y)); translate: -50% 0;
  pointer-events: none;
}
.die {
  --half-die: calc(var(--die-size, 52px) / 2);
  --resting-die: rotateX(-31deg) rotateY(var(--die-turn, 28deg)) rotateX(var(--die-x)) rotateY(var(--die-y));
  display: block; position: relative; width: var(--die-size, 52px); aspect-ratio: 1; transform-style: preserve-3d;
  transform: var(--resting-die);
}
.die-face {
  --face-center: #fff8e6; --face-edge: #e0cdab;
  position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center; padding: 16%; border-radius: 4px; border: 1px solid #a49271;
  background: linear-gradient(145deg, var(--face-center), var(--face-edge));
  box-shadow: inset 1px 1px 2px #fff8, inset -1px -1px 2px #68523247;
  backface-visibility: hidden;
}
.die-face i { width: 63%; aspect-ratio: 1; border-radius: 50%; background: var(--pip-color, #273b37); box-shadow: inset 0 1px 1px #0006; }
.die-face .pip-1 { grid-area: 1 / 1; }
.die-face .pip-3 { grid-area: 1 / 3; }
.die-face .pip-4 { grid-area: 2 / 1; }
.die-face .pip-5 { grid-area: 2 / 2; }
.die-face .pip-6 { grid-area: 2 / 3; }
.die-face .pip-7 { grid-area: 3 / 1; }
.die-face .pip-9 { grid-area: 3 / 3; }
.die-face:is(.face-2,.face-5) { --face-center: #fffdf2; --face-edge: #e9dabd; }
.die-face:is(.face-3,.face-4) { --face-center: #e6d6b8; --face-edge: #c1aa86; }
.face-1 { transform: translateZ(var(--half-die)); }
.face-2 { transform: rotateX(90deg) translateZ(var(--half-die)); }
.face-3 { transform: rotateY(90deg) translateZ(var(--half-die)); }
.face-4 { transform: rotateY(-90deg) translateZ(var(--half-die)); }
.face-5 { transform: rotateX(-90deg) translateZ(var(--half-die)); }
.face-6 { transform: rotateY(180deg) translateZ(var(--half-die)); }
.camera-controls {
  display: flex; gap: 4px; position: absolute; bottom: 7px; right: 7px;
  border: 1px solid #969f7f; border-radius: 12px; padding: 3px; background: #fff9e8;
}
.camera-controls button {
  display: inline-flex; justify-content: center; align-items: center; gap: 4px;
  border: 0; border-radius: 8px; min-width: 44px; height: 44px; color: var(--green); background: transparent; font-size: 1.12rem;
}
.camera-controls .camera-toggle { font-size: .75rem; font-weight: 760; padding-inline: 7px; }
.camera-controls button:hover, .camera-controls button[aria-expanded="true"] { background: #eee8cf; }
.camera-options {
  display: grid; grid-template-columns: repeat(4, 44px); gap: 3px; position: absolute; bottom: calc(100% + 6px); right: 0; padding: 4px;
  background: var(--card); border: 1px solid var(--edge); border-radius: 11px; box-shadow: var(--float-shadow);
}
.camera-options button { background: #f1e8cb; }
.emote-controls { position: absolute; z-index: 2; bottom: 7px; left: 7px; }
.emote-toggle.button {
  min-height: 52px; padding-inline: 10px; border: 1px solid #969f7f;
  border-radius: 12px; background: #fff9e8; font-size: .79rem;
}
.emote-toggle:not(:disabled):is(:hover, [aria-expanded="true"]) { background: #eee8cf; }
.emote-options {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; padding: 5px;
  background: var(--card); border: 1px solid var(--edge); border-radius: 11px; box-shadow: var(--float-shadow);
}
.emote-options .button { padding: 0; min-height: 44px; background: #f1e8cb; font-size: 1.35rem; }
.emote-options .button:hover { background: #f3dcaa; }
.table-emotes {
  position: absolute; z-index: 4; inset: 0; pointer-events: none;
}
.table-emote {
  position: absolute; translate: -50% -50%;
  display: flex; align-items: center; gap: 7px; width: max-content; max-width: min(180px, 55%);
  padding: 3px 10px; background: var(--card); border: 1px solid var(--edge);
  border-radius: 999px; box-shadow: var(--float-shadow); font-size: .82rem;
}
.table-emote.at-camera-edge { border: 2px solid #2a6297; }
.table-emote > span:first-child { font-size: 1.3rem; }
.table-emote strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-links { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 8px; }
.newsbar { flex: 1; min-width: 0; }
.news-button {
  border: 0; border-radius: 8px; width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px;
  background: #e6eddd; color: var(--ink); padding: 6px 10px; text-align: left; font-size: .79rem;
}
.news-button:hover { background: #d7e6d4; }
.news-button strong { white-space: nowrap; }
.news-headline { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-button { min-height: 44px; font-size: .79rem; padding-inline: 10px; }

.action-panel {
  padding: 0 3px 3px; display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 0; background: transparent;
}
.action-panel > :first-child { flex: 1 1 145px; }
.turn-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px; min-width: 0; }
.turn-person { display: flex; min-width: 0; gap: 8px; align-items: center; }
.turn-person .avatar { --space: 43px; }
.turn-person h2 { overflow-wrap: anywhere; font-size: 1.1rem; }
.turn-person strong { color: var(--green); font-size: .8rem; display: block; margin-top: 2px; }
.dice { display: flex; flex: none; gap: 2px; align-items: center; }
.dice span { color: #5347a0; font: 1.48rem/1 sans-serif; }
.turn-context { flex: 1.55 1 205px; min-width: 0; }
.turn-context > p, .turn-actions > .waiting, .table-side > p { color: var(--muted); font-size: .8rem; line-height: 1.42; }
.turn-context .payment-note { margin-top: 5px; }
.turn-actions { flex: 1.4 1 200px; min-width: 0; }
.turn-actions button[data-command="roll"] { background: var(--red); border-color: #84232a; box-shadow: 0 4px 0 #701e26; min-height: 53px; }
.turn-actions button[data-command="roll"]:hover { background: var(--red-hover); }
.turn-actions > .button.text-button { min-height: 44px; padding-block: 5px; margin-top: 4px; }
.button.arrival-card {
  display: grid; width: 100%; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center;
  gap: 9px; text-align: left; background: #f4ead1; padding: 6px; min-height: 59px;
}
.button.arrival-card:hover { background: #f1e1bc; }
.arrival-icon { width: 62px; height: 45px; border-radius: 5px; }
.arrival-icon { display: grid; place-items: center; background: #e0ecd9; color: var(--green); font-size: 1.3rem; }
.arrival-card strong, .arrival-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrival-card small { color: var(--muted); font-size: .72rem; font-weight: 550; margin-top: 2px; }
.arrival-card > span:last-child { margin-right: 3px; color: var(--green); }
.table-side:has(.ranking) .action-panel { display: block; max-width: 440px; margin-inline: auto; }
.region-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px 10px; }
.region-intro > span { display: grid; place-items: center; width: 36px; height: 36px; background: #f2e8cb; border-radius: 8px; }
.region-intro strong { display: block; font-size: .92rem; }
.region-intro small { color: var(--muted); font-size: .76rem; }
.region-intro p { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.card-values { font-size: .84rem; gap: 0; margin-block: 9px; }
.card-values > div { padding-block: 6px; border-bottom: 1px solid #e7d9bb; }
.card-values:last-child { margin-bottom: 0; }
.rent-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; }
.rent-levels > div {
  display: grid; justify-items: center; gap: 3px; padding: 7px 2px;
  border: 1px solid var(--group); border-radius: 7px; background: color-mix(in srgb, var(--group) 8%, var(--card));
}
.rent-levels dt { font-size: .72rem; color: var(--muted); }
.rent-levels dd { margin: 0; font-size: clamp(.7rem, 3.2vw, .84rem); font-weight: 800; overflow-wrap: anywhere; }
.special-tile-rules { margin: 0; padding: 12px; border: 1px solid var(--edge); border-radius: 10px; background: #eaf4ff; font-size: .82rem; }
.special-tile-rules dd { max-width: 64%; }
.special-tile-outcome { padding: 9px 12px; border-radius: 8px; background: #d9f7ee; color: #086048; font-size: .84rem; font-weight: 750; }
.purchase-buttons { display: grid; gap: 6px; }
.purchase-buttons .button { min-width: 0; font-size: .8rem; padding-inline: 6px; }
.purchase-buttons small { display: block; font-size: .69rem; margin-top: 3px; font-weight: 550; }
.game-history { display: grid; gap: 6px; list-style: none; padding: 0; }
.game-history li { font-size: .86rem; line-height: 1.4; }
.ranking { display: grid; gap: 5px; margin: 10px 0; padding-left: 21px; font-size: .82rem; }
.ranking strong { float: right; }

dialog { width: min(465px, calc(100% - 28px)); max-height: 91dvh; border: 1px solid var(--edge); border-radius: 11px; background: var(--card); color: var(--ink);padding: 0; }
dialog::backdrop { background: #14292194; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 12px 15px; border-bottom: 1px solid var(--edge); }
.dialog-head h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.035em; }
.game-card-dialog { border-top: 5px solid var(--green); border-radius: 15px; box-shadow: 0 7px 0 #192c2a40, var(--float-shadow); overflow-wrap: anywhere; }
.game-card-dialog :is(.dialog-body, .dialog-footer) { min-width: 0; }
.game-card-dialog .field select { min-width: 0; max-width: 100%; }
.game-card-dialog .dialog-head { background: #f5eacb; }
.close-button { border: 0; background: #e9f0eb; color: var(--ink); border-radius: 6px; width: 44px; height: 44px; font-size: 1.42rem; }
.dialog-body { padding: 13px 15px 16px; }
.dialog-body > p { margin: 0 0 12px; line-height: 1.53; }
.dialog-body > .field + p { margin-top: 12px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.play-guide { display: grid; gap: 8px; }
.play-guide details { border: 1px solid var(--edge); border-radius: 10px; background: #fff; }
.play-guide summary { padding: 11px 12px; color: #184b98; font-size: .9rem; font-weight: 850; cursor: pointer; }
.play-guide details[open] summary { border-bottom: 1px solid var(--edge); background: #e8f2ff; border-radius: 10px 10px 0 0; }
.play-guide ul { display: grid; gap: 9px; padding: 11px 13px 13px 28px; font-size: .86rem; line-height: 1.5; }
.newspaper { border-left: 3px solid var(--red); padding: 6px 0 6px 12px; }
.newspaper h3 { font-size: 1.12rem; margin-bottom: 8px; }
.newspaper p { line-height: 1.51; }
.newspaper strong { display: block; margin-top: 6px; }
#toast:not(:empty) {
  position: fixed; z-index: 5; right: 12px; bottom: 12px; max-width: min(370px, calc(100% - 24px));
  padding: 11px 14px; border-radius: 8px; background: #1b4538; color: #fff; box-shadow: 0 3px 16px #1229222f; font-size: .91rem;
}

@media (max-width: 700px) {
  .header { min-height: 56px; padding-inline: 12px; }
  .welcome-stage { min-height: calc(100dvh - 56px); }
  .table-layout { padding-inline: 0; }
  .board-frame { min-height: 278px; }
  .table-side { width: 100%; }
  .balances { padding-inline: 9px; }
}

@media (max-width: 620px) {
  .welcome-stage { gap: clamp(12px, 3.5vh, 25px); }
  .hero-copy h1 { font-size: clamp(3rem, 13vw, 4.45rem); }
  .hero-copy p { margin-top: 11px; }
  .hero-pieces { width: min(100%, 375px); }
  .welcome-actions .text-button { padding-inline: 8px; }
  .flow { padding: 11px 12px 28px; }
  .flow-title { margin-bottom: 13px; }
  .setup-grid, .lobby-grid { grid-template-columns: 1fr; gap: 9px; }
  .table-tools, .table-top { gap: 5px; }
  .table .brand { min-width: 0; white-space: normal; font-size: .79rem; line-height: 1.1; gap: 6px; }
  .table-top h1 { font-size: .78rem; }
  #board { --board-center-y: 45%; }
  .action-panel { flex-wrap: wrap; gap: 6px; }
  .action-panel > :first-child { flex: 1 1 100%; }
  .action-panel.turn-ready > :first-child { flex: 1 1 125px; }
  .action-panel.turn-ready .turn-actions { flex: .95 1 113px; }
  .turn-arrived .turn-context, .turn-arrived .turn-actions { flex: 1 1 100%; }
}

@media (max-height: 500px) and (min-width: 621px) and (orientation: landscape) {
  .welcome-stage { min-height: 0; grid-template-columns: 1fr 1fr; column-gap: 12px; padding-block: 4px 16px; text-align: left; }
  .hero-pieces { grid-column: 2; grid-row: span 2; height: 167px; }
  .hero-copy h1 { font-size: clamp(2.45rem, 6.3vw, 4rem); }
  .hero-copy p { margin-top: 7px; }
  .hero-cta { justify-self: start; }
  .board-frame { min-height: 285px; }
}

.turn-person small { display: block; color: var(--muted); font-size: .71rem; margin-top: 2px; }
.drawn-card { display: grid; gap: 3px; border-radius: 8px; padding: 8px 10px; background: #f4ead1; }
.drawn-card small, .drawn-card span { color: var(--muted); font-size: .73rem; }
.drawn-card strong { font-size: .92rem; }
.turn-actions > .button + .button { margin-top: 5px; }
.chat-list { max-height: 42svh; overflow-y: auto; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; padding-top: 12px; }
.dialog-actions + .info-card { margin-top: 12px; }
.music-settings { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.music-settings .field { flex: 1 1 140px; }
.audio-slider > span { display: flex; justify-content: space-between; gap: 6px; }
.audio-slider output { color: var(--muted); font-variant-numeric: tabular-nums; }
#toast button { border: 0; padding: 0; color: inherit; background: transparent; font-weight: 650; }
@media (max-width: 390px) {
  .round-card { padding-inline: 4px; }
}

.flow { animation: flow-enter var(--enter-time) var(--spring) both; }
@keyframes flow-enter { from { opacity: 0; translate: 10px 0; } to { opacity: 1; translate: 0 0; } }
.setup-flow { max-width: 585px; }
.setup-flow .flow-title { margin-bottom: 16px; }
.wizard-panel { padding: 14px; box-shadow: 0 4px 0 #74603d1c; }
.wizard-panel fieldset { min-inline-size: 0; max-inline-size: 100%; }
.stepper { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.stepper-controls {
  display: grid; grid-template-columns: 44px 52px 44px; gap: 4px;
}
.stepper-controls button {
  min-width: 44px; min-height: 44px; border-radius: 9px; border: 1px solid var(--edge);
  background: #f4e7c8; color: var(--ink); font-size: 1.13rem; font-weight: 800;
}
.choice-chip input:checked + span { color: white; background: var(--green); border-color: var(--green); }
.result-detail { margin-top: 9px; border-top: 1px solid var(--edge); font-size: .84rem; }
.result-detail summary { padding-block: 11px; min-height: 44px; cursor: pointer; font-weight: 750; }
.setup-error { color: #882b31; font-size: .82rem; padding: 6px 1px 2px; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.field-hint { display: block; color: var(--muted); font-size: .72rem; margin-top: 4px; }
.choice-chip { position: relative; flex-shrink: 0; cursor: pointer; }
.choice-chip input { opacity: 0; position: absolute; width: 1px; height: 1px; }
.choice-chip span {
  display: inline-flex; gap: 5px; align-items: center; min-height: 44px; padding: 6px 9px;
  background: #f4e7c8; border: 1px solid var(--edge); border-radius: 9px; color: var(--ink); font-size: .76rem; font-weight: 750;
}
.choice-chip input:focus-visible + span { outline: 2px solid #216789; outline-offset: 1px; }
.form-footer {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px;
  margin-top: 16px; padding-bottom: env(safe-area-inset-bottom);
}
.form-footer .setup-error { grid-column: 1 / -1; }
.form-footer .primary { min-height: 53px; }
.sheet-grip {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0 auto; min-width: 132px; height: 44px; padding: 0 9px;
  border: 0; background: transparent; color: var(--green); font-size: .73rem; font-weight: 760; touch-action: none;
}
.sheet-grip::before { content: ""; position: absolute; top: 5px; width: 32px; height: 3px; border-radius: 6px; background: #af9c75; }
.sheet-grip .ui-icon { width: 15px; height: 15px; }
.sheet-grip[aria-expanded="true"] .ui-icon { rotate: 180deg; }
.sheet-details {
  position: absolute; inset-inline: -1px; bottom: calc(100% + 5px); z-index: 4; max-height: min(48dvh, 320px);
  overflow: auto; padding: 12px; border-radius: 15px; background: var(--card); border: 1px solid var(--edge);
  box-shadow: 0 -9px 24px #21443920; animation: sheet-enter var(--enter-time) var(--spring) both;
}
@keyframes sheet-enter { from { opacity: 0; translate: 0 19px; } to { opacity: 1; translate: 0 0; } }
.sheet-assets-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: .85rem; }
#sheet-assets p { font-size: .78rem; color: var(--muted); margin-block: 4px 9px; }
.asset-list { display: flex; gap: 7px; list-style: none; overflow-x: auto; padding: 3px 2px 6px; margin: 4px 0 0; }
.asset-list > li { flex: 0 0 83px; min-width: 0; }
.asset-card {
  display: grid; grid-template-rows: 30px auto auto; justify-items: center; gap: 3px; width: 100%; height: 100%;
  padding: 4px; border: 1px solid #a3c8e6; border-block-start: 3px solid var(--set-color);
  background: #f4faff; color: #102849; font-size: .7rem; box-shadow: 0 2px #20476935;
}
.asset-card strong { overflow-wrap: anywhere; }
.asset-card small { font-size: .67rem; color: #344f70; }
.asset-card:hover { background: #d9f1ff; }
.asset-icon { display: grid; place-items: center; width: 100%; height: 100%; color: var(--set-color); }
.asset-icon img { width: 100%; height: 30px; object-fit: contain; }
.board-index-card:hover { background: #f5ead1; }
.board-index-card > span { color: var(--green); width: 23px; flex: none; }
#turn-assets { min-width: 0; max-height: 93px; }
.sheet-details .table-links { flex-wrap: wrap; }
.sheet-details .newsbar { min-width: 125px; }
.board-list { display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 0; }
.board-index-card { display: flex; align-items: center; width: 100%; gap: 6px; text-align: left; }
.internship-id {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; overflow: hidden;
  padding: 0 14px 15px; border: 1px solid #8aa6e0; border-radius: 14px;
  background: #f0f5ff; color: #102849; box-shadow: inset 0 -4px 0 #d2def6;
}
.internship-id-heading {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 16px 12px 9px; margin-inline: -14px; background: #223a91; color: white;
}
.internship-id-heading > span { position: absolute; inset: 5px 0 auto; width: 41px; height: 5px; margin: auto; border-radius: 8px; background: #d7e6ff; }
.internship-status { border-radius: 7px; padding: 3px 6px; background: #d4ffe9; color: #125339; font-size: .71rem; font-weight: 800; }
.internship-id-person { display: flex; align-items: center; gap: 10px; }
.internship-id .internship-portrait { --space: clamp(48px, 16vw, 65px); border-width: 2px; border-radius: 10px; }
.internship-id-person h3 { font: 850 clamp(1.15rem, 4vw, 1.45rem)/1.15 var(--display); }
.internship-id-person p { margin-top: 3px; color: #415981; font-size: .86rem; }
.internship-id-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); gap: 8px; margin: 0; }
.internship-id-fields > div { min-width: 0; padding: 8px; border: 1px solid #b9cbf0; border-radius: 8px; background: white; }
.internship-id-fields dt { color: #415981; font-size: .73rem; }
.internship-id-fields dd { margin: 3px 0 0; font-weight: 850; }
.internship-id-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 5px; font-size: .8rem; }
.internship-id-progress progress { grid-column: 1 / -1; width: 100%; height: 10px; accent-color: #2857ca; }
.internship-id-note { color: #385675; font-size: .79rem; line-height: 1.45; }
.player-profile-dialog { width: min(440px, calc(100% - 24px)); }
.player-profile-dialog .dialog-head { position: sticky; top: 0; z-index: 2; background: #eaf4ff; padding-block: 5px; }
.player-profile-dialog .dialog-body { padding: 12px; }
.profile-layout { display: grid; gap: 10px; }
.profile-overview {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 12px; border: 1px solid var(--edge); border-inline-start: 4px solid var(--player-accent);
  border-radius: 12px; background: color-mix(in srgb, var(--player-accent), var(--card) 92%);
}
.profile-overview .avatar { --space: clamp(40px, 12vw, 52px); }
.profile-overview-stats { display: grid; gap: 7px; min-width: 0; }
.profile-wallet { display: grid; gap: 3px; }
.profile-wallet small, .profile-section-label, .profile-finished { color: var(--muted); font-size: .75rem; }
.profile-wallet strong { white-space: nowrap; font-size: clamp(.92rem, 4.6vw, 1.26rem); font-variant-numeric: tabular-nums; }
.profile-health { display: flex; align-items: center; gap: 7px; font-size: .74rem; }
.profile-health strong { flex: none; white-space: nowrap; }
.profile-health meter { min-width: 0; max-width: 95px; height: 8px; accent-color: var(--green); }
.profile-finished { grid-column: 1 / -1; }
.profile-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); gap: 7px; }
.profile-actions .button { min-width: 0; min-height: 44px; margin: 0; padding: 5px; font-size: .75rem; background: #e9f4fc; }
.profile-actions .ui-icon { flex: none; width: 16px; height: 16px; }
.profile-actions strong { margin-inline-start: 2px; color: #0d5676; }
.profile-actions .button span { white-space: nowrap; }
@media (max-width: 370px) {
  .profile-actions [data-command="luck-hand"] .ui-icon { display: none; }
}
.profile-profession { display: grid; gap: 5px; padding: 10px 12px; background: #f7fbff; }
.profile-profession h3 { font-size: .99rem; }
.profile-profession p { margin: 0; line-height: 1.4; }
.profile-profession p:not(.profile-section-label) { font-size: .8rem; }
.profile-income { justify-self: start; padding: 3px 6px; border-radius: 5px; background: #e0f7ed; color: #0e654d; font-size: .76rem; }
.news-button .ui-icon, .history-button .ui-icon { width: 17px; height: 17px; }
.history-button { background: #f0e5cb; }
.drawn-card { width: 100%; text-align: left; min-height: 54px; }

.property-dialog { --group: #387051; border: 1px solid #a89462; border-top: 7px solid var(--group); }
.property-dialog[open], .job-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.property-dialog[open], .place-dialog[open], .event-dialog[open], .job-dialog[open] { animation: deal-card 260ms cubic-bezier(.18,.74,.25,1) both; }
.property-dialog .dialog-head { flex: none; padding-block: 6px; background: #faebc7; }
.property-dialog .dialog-body, .job-dialog .dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.property-dialog .dialog-footer, .job-dialog .dialog-footer { flex: none; padding: 8px 15px 9px; border-top: 1px solid var(--edge); background: var(--card); }
.certificate-balance { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; font-size: .8rem; margin-bottom: 7px; }
.certificate-balance > span { min-width: 0; margin-inline-start: auto; text-align: right; }
.certificate-balance small { color: var(--muted); }
.certificate-actions > .text-button { margin-top: 3px; }
.certificate-actions .purchase-buttons { gap: 9px; }
.certificate-actions .purchase-buttons .button { min-height: 54px; font-size: .91rem; }
.building-choices { display: grid; gap: 9px; }
.building-choices h3 { font-size: 1rem; }
.building-choices { margin-top: 16px; padding: 12px; border: 1px solid var(--edge); border-radius: 9px; background: #e4f3ff; }
.building-choices small { color: var(--muted); font-size: .8rem; }
.land-sheet.job-dialog { width: min(660px, 95vw); }
.land-sheet.job-dialog:has(.job-option:only-child) { width: min(470px, 90vw); }
.job-choices { min-width: 0; }
.job-choices legend { margin-bottom: 9px; color: var(--muted); }
.job-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.job-grid:has(.job-option:only-child) { grid-template-columns: minmax(0, 1fr); }
.job-option { position: relative; display: grid; min-width: 0; }
.job-card {
  --job-edge: #a5bdb8; --job-paper: #fff; --job-label: #365a53; --job-glow: #bad9cb;
  position: relative; display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 6px 8px; padding: 8px;
  border: 1px solid var(--job-edge); border-radius: 11px; color: var(--ink);
  background: var(--job-paper); box-shadow: 0 2px 0 var(--job-edge); cursor: pointer;
}
.job-card[data-rarity="rare"] { --job-edge: #6ca9df; --job-paper: #f1f8ff; --job-label: #174c80; --job-glow: #8bc9ff; }
.job-card[data-rarity="special"] { --job-edge: #48af94; --job-paper: #edfcf6; --job-label: #16624f; --job-glow: #83e0c5; }
.job-card[data-rarity="epic"] { --job-edge: #9475e5; --job-paper: #f6efff; --job-label: #542aa0; --job-glow: #ba9bff; }
.job-card[data-rarity="legend"] { --job-edge: #c99a39; --job-paper: #fff6d9; --job-label: #754913; --job-glow: #ffda72; }
.job-card:is([data-rarity="epic"], [data-rarity="legend"]) {
  background: radial-gradient(ellipse at top, var(--job-glow), transparent 82%), var(--job-paper);
  box-shadow: 0 2px 0 var(--job-edge), 0 0 14px color-mix(in srgb, var(--job-glow) 55%, transparent);
}
.job-option { animation: luck-entry-card 300ms var(--job-delay, 30ms) cubic-bezier(.18,.86,.19,1) both; }
.job-option:nth-child(2) { --job-delay: 95ms; --entry-x: 8px; --entry-rotation: 2deg; }
.job-option:nth-child(3) { --job-delay: 160ms; --entry-x: -8px; --entry-rotation: -2deg; }
.job-card:is([data-rarity="epic"], [data-rarity="legend"])::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 34%, #fff9 49%, transparent 63%) 100% 0 / 250% 100%;
  animation: job-shine 820ms var(--job-delay, 30ms) ease-out both;
}
@keyframes job-shine {
  from { background-position: 100% 0; opacity: 0; }
  25% { opacity: 1; }
  to { background-position: 0 0; opacity: 0; }
}
.job-card .job-art { height: 43px; margin: 0; padding: 2px; }
.job-title { display: grid; justify-items: start; gap: 3px; }
.job-name { padding-inline-end: 14px; font: 820 .88rem/1.17 var(--display); overflow-wrap: anywhere; }
.job-rarity {
  padding: 2px 6px; border-radius: 5px; color: var(--job-label);
  background: color-mix(in srgb, var(--job-glow) 35%, #fff); font-size: .68rem; font-weight: 800;
}
.job-data { grid-column: 1 / -1; display: grid; gap: 5px; min-width: 0; }
.job-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.job-card .event-impact { min-width: 0; padding: 3px 5px; gap: 1px; border-left-width: 1px; border-radius: 6px; }
.job-card .event-impact small { font-size: .68rem; font-weight: 600; }
.job-card .event-impact .event-amount { font-size: .75rem; font-weight: 780; overflow-wrap: anywhere; }
.job-card .job-internship { font-size: .68rem; }
.job-summary { color: var(--muted); font-size: .73rem; line-height: 1.35; }
.job-internship { color: #7f2041; background: #ffe4eb; padding: 5px 6px; border-radius: 5px; font-size: .72rem; font-weight: 700; }
.job-card:not(:disabled):is(:hover, :focus-visible) {
  border-color: var(--job-label); box-shadow: 0 3px 0 var(--job-label);
}
.job-card:disabled { opacity: 1; cursor: default; }
.job-card:focus-visible { outline: 2px solid #276a9a; outline-offset: 2px; }
.job-current { font-size: .87rem; }
.job-dialog[data-must-choose] :is(.dialog-head form, .dialog-footer) { display: none; }
@media (max-width: 620px) {
  .job-card .job-values { grid-template-columns: minmax(0, 1fr); }
  .job-card .event-impact {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 5px;
  }
}
@media (max-width: 520px) {
  .job-grid { grid-template-columns: minmax(0, 1fr); }
  .job-card .job-art { grid-row: span 2; }
  .job-data { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .job-option, .job-card:is([data-rarity="epic"], [data-rarity="legend"])::before { animation: none; }
  .job-card::before { opacity: 0; }
}
.event-dialog { border: 2px solid #a97a44; border-top: 7px solid var(--red); }
.event-dialog .dialog-head { background: #faebc7; }
.event-art {
  --event-paper: #f3e8cf;
  --event-dot: #9678462b;
  display: block; width: 100%; height: min(18dvh, 124px); padding: 6px;
  margin-bottom: 10px; border-radius: 9px; object-fit: contain;
  background: radial-gradient(circle, var(--event-dot) 1px, transparent 1.2px) 0 0 / 9px 9px, var(--event-paper);
}
.event-art[data-kind="news"] { --event-paper: #d8eaff; --event-dot: #1353c042; }
.event-art[data-kind="penalty"] { --event-paper: #ffdeee; --event-dot: #bc145b42; }
.event-art[data-kind="wild"] { --event-paper: #d9fbef; --event-dot: #007b6342; }
.event-art[data-kind="hospital"] { --event-paper: #e4f1ee; --event-dot: #39766d38; }
.event-art[data-kind="place"] { --event-paper: #e4f1ff; --event-dot: #2860d53d; }
.event-art[data-kind="profession"] { --event-paper: #eaeaff; --event-dot: #5049d541; }
.event-report { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(8px, 2vw, 12px); }
.event-report .event-art { margin: 0; }
.event-id { color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .06em; }
.event-report h3 { font: 820 clamp(1.08rem, 3.7vw, 1.5rem)/1.19 var(--display); }
.event-report .event-story { font-size: .85rem; line-height: 1.4; }
.event-impact {
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 4px;
  container-type: inline-size; min-width: 0; border: 1px solid #a8c8ef; border-left-width: 4px;
  border-radius: 10px; padding: 11px 13px; background: #dfefff; color: #1a457a;
}
.event-impact.impact-gain { border-color: #83cfb5; background: #dcfaee; color: #076145; }
.event-impact.impact-loss { border-color: #eda9bd; background: #ffeaf0; color: #951d49; }
.event-impact small, .event-impact span { font-size: .78rem; font-weight: 750; line-height: 1.35; }
.event-impact .event-amount {
  font: 900 clamp(1.05rem, min(7vw, 13.5cqi), 2.55rem)/1.12 var(--display);
  max-width: 100%; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.job-values .event-amount { font-size: clamp(1.05rem, 13.5cqi, 2rem); }
.event-hp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.event-hp { display: inline-block; padding: 4px 8px; border-radius: 7px; font-size: 1.1rem; line-height: 1.2; }
.event-hp.hp-gain { color: #08543d; background: #b6f2db; }
.event-hp.hp-loss { color: #8a1740; background: #ffd1e1; }
.event-report .event-impact { padding: 6px 9px; gap: 3px; }
.event-report .event-amount { font-size: clamp(1.05rem, min(4.5vw, 12cqi), 1.7rem); }
.event-report .event-hp { padding: 2px 6px; font-size: .85rem; }
.event-targets { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--edge); }
.event-targets h4 { color: var(--muted); font-size: .82rem; }
.event-targets ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr)); gap: 7px; padding: 0; list-style: none; }
.event-targets li { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 6px; border-radius: 8px; background: #e3efff; }
.event-targets .avatar { --space: 29px; }
.event-targets strong { color: var(--ink); font-size: .95rem; line-height: 1.25; }
.action-clock { width: fit-content; padding: 2px 6px; border-radius: 6px; background: #dceaff; color: #1f488e; font-variant-numeric: tabular-nums; font-weight: 800; }
.action-clock:empty { display: none; }
.turn-person .action-clock { margin-top: 4px; color: #1f488e; }
.action-clock.action-clock-low { background: #ffe2e7; color: #9e1b43; }
.dialog-body > .dialog-clock { margin-bottom: 12px; font-size: .8rem; }
@keyframes deal-card {
  from { opacity: 0; transform: translate(6px, 14px) rotate(1.2deg); }
  65% { opacity: 1; }
  to { transform: none; }
}

.finished-game .table-stage, .finished-game #standings, .finished-game .sheet-grip, .finished-game .sheet-details { display: none; }
.finished-game .table-main { justify-content: center; padding: 12px; }
.finished-game .table-side { position: relative; padding: 0; background: none; border: 0; box-shadow: none; }
.finished-game #turn-panel { width: min(100%, 620px); margin-inline: auto; display: block; }
.results-screen { position: relative; text-align: center; padding: 6px 2px max(16px,env(safe-area-inset-bottom)); overflow: hidden; }
.results-screen h2 { font: 900 clamp(1.8rem, 7vw, 3rem)/1.1 var(--display); overflow-wrap: anywhere; }
.result-cup {
  margin: 0 auto 8px; display: grid; place-items: center; width: 52px; height: 52px;
  background: #f4d77e; color: #674710; box-shadow: 0 3px 0 #b78834; border-radius: 16px;
}
.result-cup svg { width: 29px; height: 29px; }
.podium { display: flex; justify-content: center; align-items: end; gap: 5px; list-style: none; padding: 0; margin: 17px auto 8px; }
.podium li { min-width: 0; flex: 0 1 32%; max-width: 146px; }
.podium-1 { order: 2; }
.podium-2 { order: 1; }
.podium-3 { order: 3; }
.podium-player { display: grid; justify-items: center; padding-bottom: 6px; font-size: .8rem; }
.podium-player strong { max-width: 100%; overflow-wrap: anywhere; }
.podium-player > span:last-child { font-size: .72rem; color: var(--muted); }
.podium-step {
  display: grid; place-items: center; min-height: 46px; font-size: 1.1rem; font-weight: 900;
  background: #cbd9c8; border: 1px solid #9cac91; border-radius: 12px 12px 2px 2px; animation: sheet-enter var(--enter-time) var(--spring) both;
}
.podium-1 .podium-step { min-height: 81px; background: #efd17a; border-color: #c19b43; }
.podium-3 .podium-step { min-height: 38px; background: #ecd2ad; border-color: #c7a780; }
.result-detail { text-align: left; }
.result-detail li { display: flex; justify-content: space-between; gap: 5px; }
.result-actions { display: flex; gap: 8px; }
.result-actions .button { flex: 1; }
.result-confetti { position: absolute; inset: 0; pointer-events: none; }
.result-confetti i {
  position: absolute; width: 6px; height: 12px; left: calc(var(--piece) * 8%); top: 4%;
  background: var(--red); border-radius: 2px; opacity: 0;
  animation: confetti 1100ms ease-out calc(var(--piece) * 43ms) both;
}
.result-confetti i:nth-child(2n) { background: #c6932c; }
.result-confetti i:nth-child(3n) { background: var(--green); }
@keyframes confetti { 12%, 70% { opacity: 1; } to { transform: translateY(240px) rotate(192deg); opacity: 0; } }

@media (max-width: 390px) {
  .table .header { gap: 4px; }
  .table .brand { max-width: 135px; }
  .welcome-actions .text-button { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-copy h1 span, .hero-copy em, .hero-copy p, .flow, .mode-option,
  .property-dialog[open], .place-dialog[open], .event-dialog[open], .job-dialog[open], .sheet-details { animation: none; }
}

/* Table palette and transaction sheets */
:root {
  --ink: #223d37;
  --muted: #4e6560;
  --paper: #f7f3e9;
  --card: #fffcf4;
  --edge: #d8cdb9;
  --green: #286759;
  --red: #a43b48;
  --red-hover: #87303d;
}
body { background: radial-gradient(ellipse at 55% 24%, #fffaf0, transparent 76%), linear-gradient(150deg, #eee9db, #e4ebdf); background-attachment: fixed; }
.page-pattern { opacity: .20; }
.table-stage { --felt: radial-gradient(ellipse at 55% 30%, #e0e9d9, #b4cbc4); }
.tile.roll-path { box-shadow: inset 0 0 0 4px #efd28c; }
.tile.roll-target { outline: 4px solid #edbd55; outline-offset: 2px; }
.internship-marker {
  position: absolute; z-index: 1; top: 5px; right: 4px; pointer-events: none;
  padding: 2px 4px; border-radius: 3px; background: #532c82; color: #fff;
  box-shadow: 0 0 0 1px #fff; font: 900 13px/1 var(--display);
}
.roll-result {
  position: absolute; z-index: 2; inset: var(--roll-center-y, var(--board-center-y)) auto auto 50%; translate: -50% -50%;
  display: grid; justify-items: center; min-width: 88px; padding: 8px 16px; border: 2px solid #f4dd92;
  border-radius: 15px; background: #244f46; color: #fff9e7; box-shadow: 0 5px 0 #12352e66;
  font-weight: 800; pointer-events: none; animation: roll-tally .24s ease-out both;
}
.roll-result strong { font-size: 1.65rem; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.board-dice:not([hidden]) + .roll-result { margin-top: 53px; padding: 6px 12px; }
.board-dice:not([hidden]) + .roll-result strong { font-size: 1.375rem; }
@keyframes roll-tally { from { scale: .8; opacity: 0; } }
.camera-controls [aria-pressed="true"] { background: #d9e9df; box-shadow: inset 0 0 0 1px var(--green); }
.balances li { padding: 0; }
.balance-button { border: 0; border-radius: inherit; background: transparent; display: flex; align-items: center; gap: 7px; padding: 5px 8px; width: 100%; color: inherit; text-align: left; }
.balance-button:hover { background: #e0ebe3; }
.table-side {
  background: transparent; border: 0; box-shadow: none;
  padding-inline: 10px;
}
.table-side .sheet-grip {
  position: relative; margin-block: 4px 5px; height: 30px; padding-top: 4px;
  border: 1px solid var(--edge); border-radius: 999px; background: var(--card);
}
.action-panel { justify-content: space-between; flex-wrap: nowrap; }
.action-panel .turn-head {
  flex: 0 1 auto; min-width: 0; border-inline-start: 3px solid var(--player-accent);
  background: color-mix(in srgb, var(--player-accent), var(--card) 95%);
  box-shadow: 0 2px 0 #d3c7b3;
}
.action-panel.turn-ready .turn-head { flex: 0 1 auto; }
.dice-trigger { flex: none; display: grid; place-items: center; width: 52px; height: 49px; padding: 0; border-radius: 12px; }
.dice-trigger svg { width: 28px; height: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.land-sheet { --group: var(--green); position: fixed; inset: auto 0 0; margin: 0 auto; width: min(470px, calc(100% - 20px)); max-height: min(94dvh, 825px); border-radius: 18px 18px 10px 10px; border-top-color: var(--group); }
.land-sheet[open] { display: flex; flex-direction: column; overflow: hidden; animation: deal-card 260ms cubic-bezier(.18,.74,.25,1) both; }
.land-sheet::before { content:""; flex: none; height: 6px; background: repeating-conic-gradient(from 45deg, var(--group) 0 25%, #ead8ad 0 50%) 0 0 / 12px 12px; }
.land-sheet .dialog-head { flex: none; padding-block: 5px; background: var(--card); }
.land-sheet .dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 7px; }
.land-sheet .dialog-footer { flex: none; padding: 7px 14px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid var(--edge); background: var(--card); }
.land-sheet:where(:not(.land-purchase)) .dialog-footer .button + .button { margin-top: 5px; }
.region-sheet, .event-dialog {
  --card: #f3f9ff; --ink: #102849; --muted: #385675; --edge: #afcdec;
  --green: #0753a5; --red: #144dc9; --red-hover: #1646ba;
  color: var(--ink); border-color: var(--edge); background: var(--card);
}
.region-sheet { --group: #1170d3; }
.region-sheet .dialog-head { padding: 9px 16px; background: #dcefff; }
.region-sheet.region-premium .dialog-head { background: #6722c9; color: #fff; }
.region-premium .dialog-head .watch-card-label { color: #fff; }
.region-premium .close-button { background: #fff3; color: #fff; }
.region-sheet .dialog-body { padding: 14px 16px 18px; }
.region-sheet .dialog-footer { padding: 11px 16px max(14px, env(safe-area-inset-bottom)); }
.region-sheet .certificate-balance { display: grid; justify-content: center; text-align: center; gap: 6px; margin-bottom: 10px; }
.region-sheet .certificate-balance > span { margin: 0; }
.region-card-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.region-card-content :is(.property-story, .price-focus, .building-level-note, .purchase-current, .ladder-help) { margin: 0; }
.region-price, .region-rent { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.region-card-content .property-story { line-height: 1.45; }
.region-sheet::before, .event-dialog::before {
  background: repeating-linear-gradient(135deg,var(--group) 0 6px,#6ee9ff 6px 12px);
}
.region-sheet .button.primary, .event-dialog .button.primary { border-color: #1145b7; box-shadow: 0 4px #10368d; }
.region-sheet .button.secondary, .event-dialog .button.secondary { background: #dcefff; }
.region-sheet .button.secondary:not(:disabled):hover, .event-dialog .button.secondary:not(:disabled):hover { background: #bce1ff; }
.button.sale-confirm { color: #fff; background: #ae253b; border-color: #86192c; }
.button.sale-confirm:not(:disabled):hover { background: #8f1c31; }
.watch-card-label { flex: none; margin-inline-start: auto; color: var(--muted); font-size: .7rem; font-weight: 750; }
@media (orientation: portrait) and (max-width: 760px) {
  .land-sheet:is(.region-sheet,.place-dialog) {
    inset: 0; margin: auto; width: 90vw; max-width: 90vw; height: 90dvh; max-height: 90dvh; border-radius: 18px;
  }
  .land-sheet.event-dialog { inset: 0; margin: auto; width: 90vw; max-width: 90vw; height: fit-content; max-height: 90dvh; border-radius: 18px; }
  .land-sheet:is(.region-sheet,.event-dialog,.place-dialog) .dialog-body { flex: 1 1 auto; }
  .event-dialog .event-report .event-art { height: clamp(76px, 14dvh, 115px); }
  .luck-intro .luck-draw { padding-block: clamp(22px, 7dvh, 65px); }
}
.certificate-banner {
  position: relative; height: clamp(145px, 29dvh, 248px); overflow: hidden; isolation: isolate;
  border: 2px solid var(--tier); border-bottom-width: 6px; border-radius: 11px; background: #263c36;
}
.certificate-banner::before {
  content: ""; position: absolute; inset: -15px;
  background: linear-gradient(#172c2a8c, #172c2ab8), var(--photo) center / cover no-repeat;
  filter: blur(13px);
}
.certificate-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.certificate-symbol {
  background: radial-gradient(circle, color-mix(in srgb, var(--tier) 28%, transparent) 1px, transparent 1.5px) 0 0 / 20px 20px,
    var(--tile-paper);
}
.certificate-symbol::before { display: none; }
.certificate-illustrated { height: auto; aspect-ratio: 16 / 9; }
.certificate-illustrated img { object-fit: cover; }
.city-illustration { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
.city-illustration svg { width: 39%; height: 58%; }
.banner-labels { display: flex; justify-content: space-between; align-items: start; gap: 5px; position: relative; padding: 7px; }
.banner-labels > span {
  padding: 5px 8px; border: 1px solid #ffffff3b; border-radius: 7px;
  background: #122622c7; backdrop-filter: blur(8px); color: #fffcf2;
  box-shadow: 0 2px 8px #0003; font-size: .7rem; font-weight: 800;
}
.banner-labels .ownership { max-width: 55%; overflow-wrap: anywhere; }
.banner-labels .is-owned { display: flex; align-items: center; gap: 5px; box-shadow: inset 4px 0 var(--owner), 0 2px 8px #0003; padding-left: 10px; }
.ownership-avatar { --space: 23px; flex: none; }
.property-story { color: var(--muted); font-size: .78rem; margin: 7px 0 5px; line-height: 1.32; }
.property-story strong { color: var(--ink); }
.price-focus { display: grid; grid-template-columns: minmax(0, 1fr); container-type: inline-size; gap: 2px; margin: 6px 0 7px; }
.price-focus small,.cash-meter { color: var(--muted); font-size: .75rem; }
.price-focus > strong { font: 900 clamp(1.05rem, min(6.8vw, 13.5cqi), 2.35rem)/1.12 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.rent-ladder > div { align-content: end; border-color: var(--edge); padding: 5px 1px; }
.region-sheet .rent-ladder > div { background: #e5f3ff; }
.rent-ladder .rent-active { border-color: #00797e; background: #c9f5ed; }
.region-sheet .rent-ladder .rent-active { background: #c9f5ed; }
.rent-ladder.rent-rows { grid-template-columns: minmax(0, 1fr); }
.region-sheet .rent-ladder.rent-rows > div {
  grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: stretch; gap: 8px; min-height: 39px;
  padding: 6px 9px; text-align: start;
}
.region-sheet .rent-ladder .rent-target { background: #eeebff; border-color: #896bee; }
.rent-rows dt { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; font-weight: 850; color: var(--ink); }
.rent-rows dt i { display: inline-flex; }
.rent-rows dt svg { width: 16px; height: 16px; color: #0d5972; }
.rent-level-label { color: #276057; font-size: .65rem; font-weight: 800; }
.rent-target .rent-level-label { color: #5835bf; }
.rent-ladder dd { white-space: nowrap; }
.rent-receipt { display: grid; gap: 5px; border: 1px solid #efb0c0; border-radius: 10px; padding: 10px 11px; background: #ffebf0; color: #8c1c44; }
.rent-receipt div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .83rem; }
.rent-receipt span { margin-inline-start: auto; font-weight: 850; }
.rent-receipt p { font-size: .76rem; }
.ladder-help { color: var(--muted); font-size: .71rem; margin-top: 5px; }
.purchase-current { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 8px; color: var(--muted); font-size: .75rem; }
.purchase-current strong { margin-inline-start: auto; }
.purchase-current strong,.cash-meter strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.land-buy-actions .button {
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: center;
  container-type: inline-size; gap: 3px;
}
.land-buy-actions .button strong { font-size: clamp(.78rem, 12.5cqi, 1rem); font-variant-numeric: tabular-nums; }
.cash-meter { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 7px; align-items: baseline; }
.cash-meter strong { text-align: right; }
.cash-track { grid-column: 1 / -1; height: 10px; background: #e8d3c9; border-radius: 20px; overflow: hidden; }
.cash-track i { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .25s ease; }
.cash-low .cash-track i { background: #b8794c; }
.cash-meter > small { grid-column: 1 / -1; color: #89542d; }
.region-set {
  padding: 8px 12px; border: 1px solid var(--edge); border-inline-start: 5px solid var(--set-color);
  border-radius: 10px; background: #e4f3ff;
}
.region-set summary { cursor: pointer; min-height: 24px; font-size: .86rem; font-weight: 800; }
.region-set summary strong { float: inline-end; margin-inline-start: 8px; font-size: .8rem; }
.region-set-content { display: grid; gap: 9px; margin-top: 8px; }
.set-card-row {
  display: flex; gap: 8px; max-width: 100%; padding: 2px 2px 7px; margin: 0; overflow-x: auto;
  scrollbar-width: thin; scroll-snap-type: x proximity; overscroll-behavior-inline: contain; list-style: none;
}
.set-mini-card {
  position: relative; display: grid; grid-template-rows: auto 1fr; align-content: start; gap: 5px;
  flex: 0 0 clamp(84px, 29%, 108px); min-width: 0; padding: 7px 6px 6px; scroll-snap-align: start;
  border: 1px solid #b1c9ee; border-top: 4px solid var(--set-color); border-radius: 9px; background: #fff;
  text-align: center; box-shadow: 0 2px 0 #a4c1e54f;
}
.set-mini-art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 5px; background: #ecf4ff; }
.set-mini-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.set-mini-card strong { font-size: .71rem; line-height: 1.22; }
.set-mini-card[aria-current="true"] { outline: 1px solid var(--set-color); }
.set-mini-card.set-owned { background: color-mix(in srgb, var(--set-color) 11%, white); }
.set-mini-owned { position: absolute; inset: 7px 5px auto auto; border-radius: 5px; padding: 1px 4px; background: var(--set-color); color: white; font-size: .72rem; font-weight: 850; }
.region-set p, .property-credit-note { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.mayor-badge { color: #1749a3; font-size: .79rem; }
.certificate-actions .quiet-skip { display: block; width: auto; margin: 13px auto 6px; font-weight: 600; color: var(--muted); padding-inline: 12px; }
/* Purchase decisions share one inset from the title through the payment controls. */
.land-sheet.region-sheet.land-purchase {
  --card: #fbfdff;
  height: fit-content; border: 1px solid var(--edge); border-radius: 16px;
}
.land-purchase::before { display: none; }
.land-purchase .dialog-head { padding: 8px 20px; gap: 12px; }
.land-purchase .dialog-head h2 { font-size: 1.25rem; }
.land-purchase .close-button { background: transparent; }
.land-purchase .dialog-body { padding: 20px; }
.land-purchase .region-card-content { gap: 24px; }
.land-purchase .certificate-banner {
  height: clamp(84px, 13dvh, 124px); aspect-ratio: auto;
  border-width: 1px; border-radius: 8px;
}
.land-purchase .banner-labels { padding: 8px; }
.land-purchase .region-price {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; align-items: start;
}
.land-purchase .price-focus, .land-purchase .purchase-current {
  display: grid; align-content: start; gap: 8px; font-size: .8125rem;
}
.land-purchase .price-focus small { font-size: inherit; }
.land-purchase .price-focus strong { font-size: clamp(1rem, 14cqi, 1.625rem); }
.land-purchase .purchase-current { justify-content: end; text-align: end; }
.land-purchase .purchase-current strong { font-size: 1rem; }
.land-purchase .region-price > :is(.building-level-note, .property-credit-note) { grid-column: 1 / -1; }
.land-purchase .region-rent { gap: 12px; }
.land-purchase .region-rent h3 { font-size: .875rem; }
.land-purchase .rent-ladder { gap: 8px; }
.land-purchase .rent-ladder > div { gap: 8px; padding: 12px 4px; }
.land-purchase .region-set { padding: 0; background: transparent; border-width: 1px 1px 1px 4px; }
.land-purchase .region-set summary { min-height: 48px; padding: 14px 12px; }
.land-purchase .region-set-content { margin: 0; padding: 0 12px 12px; min-width: 0; }
.land-purchase .dialog-footer { padding: 10px 16px max(10px, env(safe-area-inset-bottom)); }
.land-purchase .certificate-actions { display: grid; gap: 12px; }
.land-purchase .property-credit-note { line-height: 1.55; }
.purchase-options { display: grid; gap: 8px; }
.purchase-options .button {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px;
  min-width: 0; min-height: 44px; padding: 8px 12px; text-align: start;
}
.purchase-options .button span { font-size: .8125rem; }
.purchase-options .button strong { font-size: 1rem; line-height: 1.25; }
.land-purchase .purchase-options .button { margin: 0; box-shadow: none; }
.land-purchase .purchase-skip { margin: 0; color: var(--muted); }
.event-dialog { --group: #104cc2; }
.event-theme-news { --group: #0855bf; }
.event-theme-fate { --group: #007d8f; }
.event-theme-wild { --group: #007b63; }
.event-theme-place { --group: #215abf; }
.event-theme-profession { --group: #3f49bb; }
.event-theme-bank { --group: #2945ad; }
.event-art[data-kind="bank"] { --event-paper: #e4eaff; --event-dot: #2945ad46; }
.bank-overview { display: grid; gap: 8px; margin-bottom: 16px; }
.bank-intro {
  display: grid; grid-template-columns: minmax(74px, 1fr) minmax(0, 1.6fr); align-items: stretch; gap: 10px;
  padding: 10px; border: 1px solid #acbff9; border-radius: 13px; background: #e9efff;
}
.bank-intro .event-art { height: 100%; min-height: 108px; margin: 0; }
.bank-terms { display: grid; align-content: center; gap: 8px; margin: 0; }
.bank-terms div { padding: 7px 8px; border-radius: 8px; background: #f8faff; color: #233d8f; }
.bank-terms dt, .bank-offer small { font-size: .71rem; line-height: 1.25; }
.bank-terms dd { margin: 2px 0 0; font: 850 1.04rem/1.1 var(--display); }
.bank-options, .bank-options .certificate-actions { display: grid; gap: 8px; }
.bank-options h3 { font-size: .92rem; color: #233d8f; }
.button.bank-offer {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 18px; gap: 6px; align-items: center;
  width: 100%; border: 1px solid #b4c5f2; border-left: 4px solid #4264d5; border-radius: 10px;
  padding: 9px 8px; background: #fff; color: #203d91; text-align: left; overflow-wrap: anywhere;
}
.button.bank-offer:not(:disabled):is(:hover, :focus-visible) { border-color: #4264d5; background: #e9efff; }
.bank-principal, .bank-rate { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.bank-principal { container-type: inline-size; }
.bank-principal strong { font: 850 clamp(.82rem, min(4.15vw, 12.5cqi), 1.25rem)/1.1 var(--display); }
.bank-rate { border-left: 1px solid #d0daf6; padding-left: 7px; }
.bank-rate strong { font-size: .77rem; }
.bank-offer .ui-icon { width: 18px; height: 18px; }
.bank-overview p { color: var(--muted); font-size: .85rem; }
.profile-card { border: 1px solid var(--profile-edge); border-radius: 9px; background: var(--profile-paper); color: #182749; }
.profile-card summary { display: flex; gap: 7px; align-items: center; min-height: 44px; padding: 5px 9px; color: var(--profile-accent); cursor: pointer; }
.profile-card summary::-webkit-details-marker { display: none; }
.profile-card summary::after { content: '▸'; margin-inline-start: auto; }
.profile-card[open] summary::after { content: '▾'; }
.profile-card summary :is(svg, img) { flex: none; width: 24px; height: 24px; padding: 3px; border-radius: 5px; background: #fff; object-fit: contain; }
.profile-card summary strong { font-size: .83rem; }
.profile-card summary small { font-size: .72rem; line-height: 1.2; color: var(--muted); text-align: end; }
.profile-card-details { display: grid; gap: 7px; padding: 8px 10px; border-top: 1px solid var(--profile-edge); }
.profile-card :is(h3,p,dl) { margin: 0; }
.profile-card p { font-size: .85rem; line-height: 1.4; }
.profile-card-status { justify-self: start; border-radius: 9px; padding: 3px 8px; background: #fff; font-weight: 800; color: var(--profile-accent); }
.profile-skill { --profile-edge: #cab7f9; --profile-paper: #f4edff; --profile-accent: #5b28af; }
.profile-bpjs { --profile-edge: #a4dfce; --profile-paper: #e6fbf3; --profile-accent: #007153; }
.profile-loan { --profile-edge: #a9c4f1; --profile-paper: #e7f1ff; --profile-accent: #214ba0; }
.profile-assets { --profile-edge: #aacce4; --profile-paper: #eef7ff; --profile-accent: #1a577d; }
.penalty-sheet { --group: #bc145b; }
.event-dialog .dialog-head { background: var(--group); color: #fff; }
.event-dialog .dialog-head .watch-card-label, .event-dialog .dialog-head small { color: white; }
.event-dialog .dialog-head .close-button { color: #fff; background: #fff3; }
.event-dialog .dialog-body { padding: 18px clamp(15px, 4.6vw, 22px) 20px; }
.event-dialog .dialog-body:has(.event-report) { padding-block: 11px 13px; }
.event-dialog .dialog-body:has(.event-report) > .dialog-clock { margin-bottom: 7px; }
.event-dialog .dialog-footer { padding: 12px clamp(15px, 4.6vw, 22px) max(13px, env(safe-area-inset-bottom)); }
.luck-targets, .luck-target-list { display: grid; gap: 10px; }
.luck-targets h3 { font-size: .97rem; }
.button.luck-target { display: flex; align-items: center; gap: 10px; padding: 7px 11px; text-align: left; }
.luck-target .ui-icon { width: 18px; height: 18px; margin-inline-start: auto; }
.luck-draw-dialog { --group: #006b86; --rarity-glint: #65f4ff; }
.luck-draw-dialog.rarity-epic { --group: #4222a6; --rarity-glint: #b3b0ff; }
.event-dialog.rarity-legend { --group: #765108; --rarity-glint: #ffda62; --edge: #d9ae49; }
.event-dialog.rarity-legend::before { background: repeating-linear-gradient(135deg, #9c690d 0 6px, #fff2a1 6px 12px); }
.rarity-legend .rarity-badge { background: #ffe582; color: #512c00; }
.rarity-legend .luck-back {
  color: #532f00; border-color: #ffdf7f; box-shadow: 0 4px 0 #673908, inset 0 0 0 3px #fefaad8a;
  background: repeating-linear-gradient(135deg,#fff3ac55 0 2px,transparent 2px 13px),
    linear-gradient(150deg, #fbf0a4 2%, #dba127 37%, #fff2ad 60%, #cb8619 100%);
}
.rarity-legend .luck-back span { color: #6b3d00; }
.luck-intro.rarity-legend::backdrop { background: radial-gradient(ellipse at 50% 52%, #432500 0%, #110a03ef 68%, #060300fa); }
.luck-intro.rarity-legend .dialog-body { background: radial-gradient(ellipse at 50% 52%, #885708 0%, #442901 48%, #140a02 100%); }
.luck-draw, .luck-face { display: grid; justify-items: center; gap: 16px; padding-block: 8px; }
.luck-face .event-report { width: 100%; }
.rarity-badge {
  min-width: 84px; padding: 5px 12px; border-radius: 999px; background: var(--group);
  color: white; font-size: .8rem; letter-spacing: .1em; text-align: center; text-transform: uppercase;
}
.luck-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; width: 100%; max-width: 390px; }
.luck-back {
  display: grid; place-content: center; justify-items: center; gap: 6px; aspect-ratio: 2 / 3;
  border: 2px solid var(--rarity-glint); border-radius: 10px; color: #fff; padding: 5px;
  box-shadow: 0 4px 0 #081c56, inset 0 0 0 3px #ffffff27;
  background: radial-gradient(ellipse, #7599ff42, transparent 75%),
    repeating-linear-gradient(135deg,#bdd9ff18 0 2px,transparent 2px 13px),var(--group);
}
.luck-back span, .hidden-reward { color: var(--rarity-glint); font-size: clamp(26px, 13vw, 55px); line-height: 1; }
.luck-back small { font-weight: 800; font-size: .72rem; }
.luck-back:disabled { opacity: 1; }
.luck-back:not(:disabled):hover, .luck-back:focus-visible { filter: brightness(1.2); }
.land-sheet.luck-intro[open] { animation: deal-card 280ms cubic-bezier(.18,.78,.2,1) both; }
.luck-intro::backdrop {
  background: radial-gradient(ellipse at 50% 52%, #171344 0%, #05050eef 68%, #020209fa);
  animation: luck-darken 700ms ease-out both;
}
.luck-intro .dialog-body {
  position: relative; isolation: isolate;
  background: radial-gradient(ellipse at 50% 52%, color-mix(in srgb, var(--group), #b6a9ff 27%) 0%, #1a1746 50%, #070717 100%);
}
.luck-intro .rarity-badge { border: 1px solid var(--rarity-glint); box-shadow: 0 0 18px color-mix(in srgb, var(--rarity-glint) 50%, transparent); }
.luck-intro .luck-choices { z-index: 1; }
.luck-intro .luck-back { animation: luck-entry-card 300ms var(--entry-delay, 60ms) cubic-bezier(.18,.86,.19,1) both; }
.luck-intro .luck-back:first-child { --entry-delay: 100ms; --entry-x: 14px; --entry-rotation: 5deg; }
.luck-intro .luck-back:last-child { --entry-delay: 145ms; --entry-x: -14px; --entry-rotation: -5deg; }
.luck-entry-glints { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.luck-entry-glints::before {
  content: ""; position: absolute; left: 50%; top: 52%; width: min(74vw, 390px); aspect-ratio: 1;
  translate: -50% -50%; border: 2px solid var(--rarity-glint); border-radius: 50%;
  box-shadow: 0 0 60px var(--rarity-glint), inset 0 0 45px var(--rarity-glint);
  animation: luck-entry-ring 940ms 150ms cubic-bezier(.15,.65,.24,1) both;
}
.luck-entry-glints i {
  position: absolute; left: 50%; top: 52%; color: var(--rarity-glint); font: 900 19px/1 sans-serif;
  text-shadow: 0 0 15px var(--rarity-glint);
  animation: luck-entry-glint 1150ms calc(180ms + var(--spark-delay)) ease-out both;
}
@keyframes luck-darken { from, 30% { background: #020207fc; } }
@keyframes luck-entry-card {
  from { opacity: 0; transform: translate(var(--entry-x, 0), 12px) rotate(var(--entry-rotation, 0deg)); }
  to { opacity: 1; transform: none; }
}
@keyframes luck-entry-glint {
  from { opacity: 0; transform: rotate(var(--ray)) translateY(28px) scale(.3); }
  24% { opacity: .92; }
  to { opacity: 0; transform: rotate(var(--ray)) translateY(240px) scale(.45); }
}
@keyframes luck-entry-ring {
  from { opacity: 0; scale: .12; }
  24% { opacity: .82; }
  to { opacity: 0; scale: 1.85; }
}
.luck-draw-dialog[data-must-choose] .dialog-head form { visibility: hidden; }
.luck-revealed .luck-face { animation: luck-flip .42s cubic-bezier(.21,.8,.31,1.09) both; }
.luck-revealed:is(.rarity-epic,.rarity-legend) .luck-face {
  position: relative; isolation: isolate;
  animation: luck-flip .65s cubic-bezier(.21,.8,.31,1.09) both, luck-glow .86s ease-out both;
  border: 2px solid var(--rarity-glint); border-radius: 12px; padding: 12px;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--rarity-glint), white 53%), #f3f9ff 65%);
}
.luck-revealed.rarity-legend .luck-face { background: linear-gradient(155deg, #ffed9b, #fff8d8 40%, #ffd966 100%); }
.rarity-legend .event-art[data-kind="wild"] { --event-paper: #fff4c8; --event-dot: #9b671444; }
.luck-sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.luck-sparks i {
  position: absolute; left: 50%; top: 44%; color: var(--rarity-glint); font: 900 22px/1 sans-serif;
  text-shadow: 0 0 7px var(--group);
  animation: luck-spark .78s var(--spark-delay) ease-out both;
}
.luck-face .hidden-reward { color: var(--group); }
.luck-face > p { color: var(--muted); font-size: .83rem; text-align: center; }
.land-sheet.luck-pick-motion[open] { animation: none; }
.luck-revealed.luck-pick-motion .luck-face { animation: none; transform-origin: top left; }
.luck-choices[aria-busy="true"] { position: relative; }
.luck-intro .luck-choices[aria-busy="true"] .luck-back { animation: none; }
.luck-choices[aria-busy="true"] .luck-back:not(.luck-pick-selected) {
  opacity: .24; scale: .94; transition: opacity 180ms ease-out, scale 180ms ease-out;
}
.luck-back.luck-pick-selected { z-index: 1; }
.luck-back.luck-pick-face {
  position: relative; align-content: center; padding: 5px; color: #1e193c;
  background: color-mix(in srgb, var(--rarity-glint) 31%, white);
  box-shadow: 0 0 22px color-mix(in srgb, var(--rarity-glint) 64%, transparent);
  overflow: hidden;
}
.luck-pick-face .event-art { width: 100%; height: auto; max-height: 56px; margin: 0; background: none; border: 0; object-fit: contain; }
.luck-pick-face small { font-size: clamp(.58rem, 2.6vw, .73rem); line-height: 1.12; overflow-wrap: anywhere; }
.luck-pick-burst { position: absolute; z-index: 2; left: var(--burst-x); top: 50%; pointer-events: none; }
.luck-pick-burst b {
  position: absolute; top: 0; left: 0; width: 114px; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  border: 2px solid var(--rarity-glint); box-shadow: 0 0 26px var(--rarity-glint);
  animation: luck-entry-ring 320ms ease-out both;
}
.luck-pick-burst .luck-sparks { overflow: visible; }
.luck-pick-burst .luck-sparks i {
  --spark-distance: -95px;
  font-size: 17px; animation-duration: 300ms;
}
.rarity-name { color: #0753a5; font-weight: 800; }
.scene[data-reveal]::after {
  content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 4;
  background: radial-gradient(ellipse, transparent 18%, #56efffc9 77%, #2459f0be);
  animation: reveal-flash .58s ease-out both;
}
.scene[data-reveal="epic"]::after { background: radial-gradient(ellipse, transparent 15%, #9179ffea 71%, #2d1cb7e8); }
.scene[data-reveal="legend"]::after { background: radial-gradient(ellipse, transparent 15%, #ffed9be0 67%, #b97f15dc); }
.scene:is([data-reveal="attack"],[data-reveal="penalty"])::after {
  background: radial-gradient(ellipse, transparent 25%, #f046886b 75%, #b20e577a);
}
@keyframes luck-flip { from { transform: perspective(640px) rotateY(-48deg); opacity: .4; } }
@keyframes luck-glow { 35% { box-shadow: 0 0 25px 6px var(--rarity-glint), inset 0 0 20px var(--rarity-glint); } }
@keyframes luck-spark {
  from { transform: rotate(var(--ray)) translateY(16px) scale(.2); opacity: 0; }
  35% { opacity: 1; }
  to { transform: rotate(var(--ray)) translateY(var(--spark-distance, -160px)) scale(.4); opacity: 0; }
}
@keyframes reveal-flash { from { opacity: .13; } 35% { opacity: .28; } to { opacity: 0; } }
.bill-paid { display: inline-block; margin-top: 9px; padding: 4px 8px; border: 1px solid var(--edge); border-radius: 12px; font-size: .72rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .land-sheet[open], .land-sheet:is(.region-sheet,.event-dialog,.place-dialog)[open], .land-sheet.luck-intro[open],
  .roll-result, .luck-revealed .luck-face,
  .luck-revealed:is(.rarity-epic,.rarity-legend) .luck-face { animation: none; }
  .luck-intro::backdrop, .luck-intro .luck-back { animation: none; }
  .luck-sparks, .luck-entry-glints { display: none; }
}

/* Kartu publik dan efek transaksi di papan */
.turn-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.turn-controls [data-command="luck-hand"] { padding-inline: 8px; font-size: .78rem; }
.turn-controls [data-command="luck-hand"] svg { width: 17px; height: 17px; }
.luck-card { display: grid; gap: 12px; border-color: #b99463; }
.luck-card p { line-height: 1.5; }
.luck-card .event-art { height: 96px; margin: 0; }
.luck-card h3 { margin: 0; }
.luck-card.rarity-legend { background: #fff3bf; border-color: #cea54b; }
.luck-card.rarity-legend .rarity-name { color: #765108; }
.private-luck-flight {
  position: fixed; z-index: 60; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(80px, 25vw, 124px); aspect-ratio: 2 / 3; display: grid; place-items: center;
  border-radius: 12px; border: 2px solid #a7bcff; color: #eaedff; pointer-events: none;
  background: repeating-linear-gradient(135deg,#bfd0ff20 0 2px,transparent 2px 12px),
    radial-gradient(ellipse at center, #555ada, #202174);
  box-shadow: 0 8px 0 #111750, 0 14px 34px #28245068, inset 0 0 0 4px #d7e2ff36;
}
.private-luck-flight .ui-icon { width: 42%; height: auto; }
.building-level-note { margin: 4px 0; font-size: .76rem; font-weight: 800; color: var(--green); }
.public-card-slot {
  z-index: 20; display: flex; flex-direction: column;
  border: 1px solid var(--edge); background: var(--card); color: var(--ink);
  box-shadow: 0 7px 20px #17382e44; overflow: hidden; animation: deal-card 260ms ease-out both;
}
.public-card-slot::before { display: block; }
.public-card-slot header small { color: var(--muted); font-weight: 700; }
.public-card-slot .dialog-body { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.public-job-list { margin: 8px 0; padding-left: 19px; font-size: .8rem; }
.board-effects { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.board-effects > span { position: absolute; left: var(--fx-x); top: var(--fx-y); }
.cash-float {
  translate: -50% -108%; white-space: nowrap; font: 900 clamp(.78rem, 2.7vw, 1.3rem)/1 var(--display);
  font-variant-numeric: tabular-nums; padding: 4px 6px; border-radius: 7px; border: 1px solid currentColor;
  box-shadow: 0 2px 7px #102e2377; animation: money-float 1.4s ease-out both;
}
.cash-gain { color: #155b3a; background: #e0f4dc; }
.cash-loss { color: #8c2635; background: #ffe4e5; }
.cash-particle,.board-spark { animation-delay: var(--fx-delay); }
.cash-particle {
  display: grid; place-items: center; width: 23px; height: 14px; border-radius: 3px;
  translate: -50% -50%; background: #d6edaf; color: #315c34; border: 1px solid #4e783a; font-size: .58rem; font-weight: 900;
  animation: banknote-flight 740ms var(--fx-delay) cubic-bezier(.2,.7,.3,1) both;
}
.cash-evaporate { background: #f0ddd0; color: #863e37; border-color: #a68c75; }
.board-spark {
  translate: -50% -50%; font-size: 1rem; font-weight: 900; text-shadow: 0 0 4px #fff8d9;
  animation: spark-flight 710ms var(--fx-delay) ease-out both;
}
.spark-good { color: #d1961e; }
.spark-good:nth-child(odd) { color: #299764; }
.spark-bad { color: #a72f40; }
.spark-bad:nth-child(odd) { color: #553c68; }
@keyframes money-float {
  0% { opacity: 0; transform: translateY(8px) scale(.85); }
  18%, 72% { opacity: 1; }
  to { opacity: 0; transform: translateY(-37px); }
}
@keyframes banknote-flight {
  from { opacity: 0; transform: rotate(-12deg) scale(.75); }
  20% { opacity: 1; }
  75% { opacity: .9; }
  to { opacity: 0; transform: translate(var(--fx-dx), var(--fx-dy)) rotate(40deg) scale(.5); }
}
@keyframes spark-flight {
  from { opacity: 0; transform: scale(.35); }
  20% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--fx-dx), var(--fx-dy)) rotate(42deg) scale(.4); }
}
@media (max-width: 440px) {
  .turn-controls [data-command="luck-hand"] { font-size: .71rem; max-width: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .cash-float, .public-card-slot { animation: none; }
}

.debug-page { background: #e8f3ff; }
.debug-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); align-items: start;
  gap: 16px; width: min(100%, 1370px); margin-inline: auto; padding: 0 16px 16px;
}
.debug-layout .table-layout { padding: 0; width: 100%; }
.debug-layout .board-frame { min-height: clamp(220px, 57dvh, 610px); }
.debug-panel {
  display: flex; flex-direction: column; min-width: 0; gap: 11px; padding: 13px;
  background: #f8fcff; color: #102849; border: 1px solid #a9cbe9; border-radius: 15px;
}
.debug-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.debug-heading h1 { font-size: clamp(1.3rem, 4vw, 1.75rem); }
.debug-heading p { margin-top: 5px; color: #425c79; font-size: .8rem; }
.debug-heading a.button { padding-inline: 10px; border-color: #afcdec; background: #dcefff; text-decoration: none; white-space: nowrap; }
.debug-search { display: grid; gap: 4px; color: #26466a; font-size: .78rem; font-weight: 700; }
.debug-search input {
  width: 100%; min-height: 42px; padding: 7px 9px; border: 1px solid #9bbcdc; border-radius: 8px;
  background: white; color: #102849; font-size: .88rem;
}
.debug-categories { display: flex; flex-wrap: wrap; gap: 5px; }
.debug-tab {
  min-height: 34px; padding: 4px 9px; border: 1px solid #afcdec; border-radius: 8px; color: #164079;
  background: #e8f4ff; font-size: .78rem; font-weight: 780;
}
.debug-tab[aria-pressed="true"] { background: #164dc1; border-color: #164dc1; color: white; }
.debug-count { color: #425c79; font-size: .74rem; }
.debug-list {
  flex: 1 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start;
  min-height: 70px; max-height: min(61dvh, 610px); gap: 7px; overflow: auto; padding: 3px 4px 4px;
}
.debug-card-button {
  display: grid; gap: 4px; align-content: center; min-height: 66px; padding: 7px;
  border: 1px solid #aaccea; border-radius: 9px; background: white; color: #102849; text-align: left;
}
.debug-card-button:hover { border-color: #155bd4; background: #e6f2ff; }
.debug-card-button strong { font-size: .82rem; line-height: 1.13; overflow-wrap: anywhere; }
.debug-card-button small { color: #425c79; font-size: .7rem; line-height: 1.25; }
@media (max-width: 820px) {
  .debug-layout { display: flex; flex-direction: column; min-height: calc(100dvh - 64px); gap: 8px; padding: 0 7px 8px; }
  .debug-layout .table-layout { flex: 0 0 auto; }
  .debug-layout .table-side { position: static; padding-inline: 3px; }
  .debug-layout .board-frame { min-height: clamp(132px, 27dvh, 290px); }
  .debug-panel { width: 100%; gap: 7px; padding: 9px; }
  .debug-list { max-height: clamp(100px, 28dvh, 300px); }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 600px) {
  .land-sheet:is(.region-sheet, .place-dialog, .event-dialog, .job-dialog) {
    inset: 0; margin: auto; width: min(470px, calc(100% - 24px)); max-width: none;
    height: fit-content; max-height: 92dvh; border-radius: 14px;
  }
  .game-card-dialog .dialog-head { padding: 2px 14px; gap: 8px; }
  .game-card-dialog .dialog-head h2 { font-size: 1.125rem; line-height: 1.2; }
  .game-card-dialog .dialog-body { padding: 12px 14px; }
  .game-card-dialog .dialog-footer { padding: 8px 14px max(8px, env(safe-area-inset-bottom)); }
  .game-card-dialog .dialog-footer .button { min-height: 44px; padding-block: 8px; }
  .game-card-dialog .dialog-body > .dialog-clock { margin-bottom: 8px; font-size: .75rem; }

  .land-sheet .region-card-content { gap: 14px; }
  .land-sheet .certificate-banner {
    height: clamp(76px, 14dvh, 112px); aspect-ratio: auto;
    border-bottom-width: 2px; border-radius: 8px;
  }
  .land-purchase .certificate-banner { border-bottom-width: 1px; }
  .certificate-illustrated img { object-fit: contain; }
  .certificate-panorama img { object-fit: cover; object-position: center 56%; }
  .banner-labels, .land-purchase .banner-labels { padding: 5px; }
  .banner-labels > span { padding: 3px 5px; font-size: .65rem; }
  .land-purchase .region-price { gap: 6px 12px; }
  .land-purchase :is(.price-focus, .purchase-current) { gap: 4px; font-size: .75rem; }
  .land-purchase .price-focus strong { font-size: clamp(1rem, 13cqi, 1.2rem); }
  .land-purchase .purchase-current strong { font-size: .9375rem; }
  .land-purchase .region-rent { gap: 6px; }
  .land-purchase .rent-ladder > div { gap: 4px; padding-block: 7px; }
  .region-set { padding: 5px 8px; }
  .land-purchase .region-set summary { display: list-item; min-height: 44px; padding: 12px 10px; }
  .land-purchase .region-set-content { padding: 0 10px 10px; }
  .land-purchase .certificate-actions { gap: 6px; }
  .land-purchase .purchase-options .button { gap: 3px; padding: 8px 10px; }
  .purchase-options .button strong { font-size: .9375rem; }
  .land-purchase .property-credit-note { line-height: 1.35; }

  .event-dialog .event-report { gap: 8px; }
  .event-dialog .event-report .event-art { height: clamp(64px, 11dvh, 92px); }
  .event-dialog .event-report h3, .luck-card h3 { font-size: 1rem; }
  .event-dialog .event-report .event-story, .luck-card p { font-size: .8125rem; }
  .event-report .event-amount { font-size: 1rem; }
  .bank-intro .event-art { min-height: 78px; }
  .luck-draw, .luck-face { gap: 8px; padding-block: 4px; }
  .luck-intro .luck-draw { padding-block: 12px; }
  .luck-revealed:is(.rarity-epic,.rarity-legend) .luck-face { padding: 8px; }
  .luck-choices { max-width: 260px; }
  .luck-card { gap: 8px; }
  .luck-card .event-art { height: 70px; }
  .job-grid { gap: 6px; }
  .job-card { padding: 6px; }
  .internship-id .internship-portrait { --space: 46px; }
}

@media (max-width: 360px) and (max-height: 650px) {
  .land-purchase .dialog-body { padding-block: 10px; }
  .land-purchase .region-card-content { gap: 12px; }
  .land-purchase .purchase-options .button { padding-block: 5px; }
  .land-purchase .rent-ladder > div { padding-block: 6px; }
  .land-purchase .certificate-actions { gap: 4px; }
}

@media (max-width: 760px) and (min-height: 650px) and (orientation: portrait) {
  .land-purchase .dialog-head { padding: 4px 16px; }
  .land-purchase .dialog-body { padding: 16px; }
  .land-purchase .dialog-body > .dialog-clock { margin-bottom: 12px; }
  .land-purchase .region-card-content { gap: 20px; }
  .land-purchase .certificate-banner { height: clamp(86px, 15dvh, 124px); }
  .land-purchase :is(.price-focus, .purchase-current) { gap: 6px; }
  .land-purchase .region-rent { gap: 8px; }
  .land-purchase .dialog-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .land-purchase .certificate-actions { gap: 10px; }
}

/* Pion dan meja permainan */
.pawn-picker { border: 0; padding: 0; margin: 14px 0; }
.pawn-picker legend { font-size: .86rem; font-weight: 750; }
.pawn-colors { display: flex; flex-wrap: wrap; gap: 2px; }
.pawn-colors label { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.pawn-colors input { position: absolute; opacity: 0; }
.pawn-colors label > span { width: 29px; height: 29px; border-radius: 50%; background: var(--swatch); border: 2px solid #24365b33; }
.pawn-colors input:checked + span { outline: 2px solid #253b5a; outline-offset: 2px; }
.pawn-colors input:focus-visible + span { outline: 3px dashed #193e83; outline-offset: 3px; }
.pawn-colors .auto-color span { width: auto; height: auto; padding: 4px 6px; background: white; border-radius: 5px; font-size: .75rem; }

body.table:not(.debug-page) {
  --ink: #182e50; --muted: #485e76; --card: #fcfdff; --edge: #94b6d2; --green: #193e67;
  background: linear-gradient(156deg, #87d2ff, #c2ebff 54%, #e9f7ff);
}
.table:not(.debug-page) .page-pattern { display: none; }
.table-stage { background: linear-gradient(150deg, #94d9ff, #ddf3ff); border-color: #86bddc; }
.middle-inner { position: absolute; inset: 0; display: grid; place-content: center; pointer-events: none; }
.middle-inner strong { font: 900 clamp(38px, 5vw, 76px)/1 var(--display); letter-spacing: -.06em; color: #28638b; }
.middle-inner b { font-size: .58em; color: #177981; vertical-align: super; }
.board-middle {
  background: radial-gradient(circle, #82bdc280 1.7px, transparent 2px) 0 0 / 24px 24px, #e1f5ee;
  border: 4px double #8dc5c3; box-shadow: inset 0 0 0 10px #f4fff9; border-radius: 12px;
}
.board-floor { background: #22415a; border: 6px solid #f5d196; }
.tile {
  border: 2px solid color-mix(in srgb, var(--tile-accent), #142d4c 20%); border-radius: 9px;
  background: linear-gradient(150deg, #fff 10%, color-mix(in srgb, var(--tile-accent) 17%, white));
}
.tile-land { border-color: color-mix(in srgb, var(--land-set) 25%, #b8c7d1); background: linear-gradient(150deg, white, color-mix(in srgb, var(--land-set) 4%, white)); }
.tile-land:not(.owned)::before { background: color-mix(in srgb, var(--tile-accent) 34%, #e4edf0); }
.tile .tile-glyph { display: grid; place-items: center; width: 71px; height: 40px; border: 0; }
.tile.tile-special {
  padding: 2px 0 0; grid-template-rows: 1fr minmax(22px, auto); gap: 1px;
  border-width: 3px; background: color-mix(in srgb, var(--tile-accent) 30%, white);
}
.tile.tile-special::before {
  content: '✦'; display: grid; place-items: center; inset: 0 auto auto 0;
  width: 24px; height: 24px; border-radius: 0 0 9px 0;
  background: var(--tile-accent); color: white; font: 900 18px/1 system-ui; pointer-events: none;
}
.tile.tile-special .tile-glyph { align-self: center; width: 58px; height: 38px; }
.tile.tile-special .tile-name {
  align-self: stretch; width: 100%; display: grid; place-items: center; padding: 3px 2px;
  background: color-mix(in srgb, var(--tile-accent) 81%, #112342); color: #fff;
}
.tile-glyph > * { grid-area: 1 / 1; }
.tile-glyph img { width: 100%; height: 100%; min-height: 0; object-fit: contain; pointer-events: none; visibility: hidden; }
.tile-glyph img.tile-art-ready { visibility: visible; }
.tile-name { color: #112a49; }
.tile.current { outline-color: #ffd041; }
.pawn-name {
  display: none; position: absolute; left: 50%; top: 50%; width: max-content; max-width: 120px;
  align-items: center; gap: 4px; padding: 2px 6px 2px 3px; border-radius: 6px; background: #142741; color: white;
  font: 750 13px/1.15 var(--display);
  transform-origin: 0 0;
  transform: translateZ(calc(var(--pawn-label-height, 77px) - 14px)) rotateZ(calc(-1 * var(--angle))) rotateX(calc(-1 * var(--tilt))) translate(-50%, calc(-100% - 5px));
}
.pawn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pawn-avatar { --space: 17px; border-radius: 5px; border-width: 1px; }
.pawn.show-pawn-avatar .pawn-avatar { outline: 1px solid #ffda48; }
.active-pawn .pawn-name, .pawn.inspected-pawn .pawn-name { display: flex; }
.dice-anchor { position: absolute; width: 0; height: 0; pointer-events: none; }
#board[data-inspecting-opponent] .board-dice { visibility: hidden; }
.board-dice, .roll-result { left: var(--roll-center-x, 50%); }
.roll-result { border: 1px solid #8da6c8; background: #1b2e4b; color: white; white-space: nowrap; }
.board-dice:not([hidden]) + .roll-result { display: flex; align-items: center; gap: 8px; border-radius: 100px; min-width: 0; margin-top: 20px; font-size: .75rem; }
.board-dice:not([hidden]) + .roll-result strong { font-size: .85rem; border-left: 1px solid #ffffff70; padding-left: 8px; margin: 0; }
.turn-ribbon {
  position: absolute; z-index: 2; left: 50%; top: 9px; translate: -50% 0; max-width: calc(100% - 24px);
  pointer-events: none; display: flex; align-items: center; gap: 7px;
  background: #132e4b; color: white; border-radius: 100px; padding: 6px 12px; box-shadow: 0 3px 8px #18345624;
}
.turn-ribbon strong { font-size: .81rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turn-ribbon::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--player); box-shadow: 0 0 0 1px #fff8; }
.turn-ribbon .action-clock, .turn-ribbon .last-total { font-size: .72rem; white-space: nowrap; margin: 0; }
.turn-ribbon .action-clock { color: #e7f5ff; background: transparent; padding: 0 0 0 8px; border-left: 1px solid #8094a9; }
.turn-ribbon .action-clock-low { color: #ffdd82; }
.turn-ribbon .action-clock:empty { display: none; }
.last-total { display: inline-flex; align-items: center; gap: 3px; }
.last-total svg { width: 15px; height: 15px; }
.table:not(.finished-game) .dice-trigger { background: #ffd448; border: 2px solid #243956; border-radius: 50%; color: #20364f; box-shadow: 0 3px #243956; }
.table:not(.finished-game) .dice-trigger:not(:disabled):hover { background: #ffe477; }
.table:not(.finished-game) .dice-trigger:disabled { background: #e4eef5; }
.balances li { background: #fff; border-left: 4px solid var(--player); }
.balances .balance-value { color: #137454; }

@media (max-width: 760px) and (orientation: portrait) {
  .table:not(.debug-page,.finished-game) .header { padding: max(6px, env(safe-area-inset-top)) 10px 4px; min-height: 48px; }
  .table:not(.debug-page,.finished-game) .table-layout { width: 100%; padding: 0; }
  .table:not(.debug-page,.finished-game) .table-stage { background: transparent; border: 0; }
  .table:not(.debug-page,.finished-game) .board-frame { min-height: 285px; border-radius: 0; }
  .table:not(.debug-page,.finished-game) #board { --board-center-y: 49%; }
  .balances li { min-height: 40px; border-radius: 9px; }
  .balances .balance-button { min-height: 44px; padding: 3px 5px; gap: 4px; }
  .balances .avatar { --space: 24px; }
  .balances .balance-person strong { font-size: .7rem; }
  .balances .balance-person small { font-size: .65rem; }
  .camera-controls, .emote-toggle.button { border-color: #87adca; background: #f8fcff; border-radius: 12px; }
  .camera-controls { bottom: 6px; right: 9px; padding: 0; gap: 0; }
  .emote-controls { bottom: 6px; left: 9px; }
  .emote-toggle.button { min-height: 44px; }
  .table-side .sheet-grip { min-width: 0; min-height: 44px; padding: 0 9px; margin: 0 auto; border-color: #87adca; }
  .table-side .sheet-grip::before { display: none; }

  .table:not(.debug-page,.finished-game) .sheet-details { inset-inline: 8px; bottom: calc(100% + 54px); }
  .table:not(.debug-page,.finished-game) .table-side { padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
  .table:not(.finished-game) .action-panel {
    padding: 5px 7px; gap: 5px; background: #ffffffed; border: 1px solid #94b6d2; border-radius: 16px; box-shadow: 0 3px 10px #1a466321;
  }
  .action-panel .turn-head, .action-panel.turn-ready .turn-head { flex: 1 1 auto; padding: 3px 5px; background: transparent; box-shadow: none; border: 0; }
  .turn-head .turn-person { gap: 6px; }
  .turn-person > div { min-width: 0; }
  .turn-person .avatar { --space: 30px; flex: none; }
  .turn-person h2 { font-size: .86rem; }
  .turn-person :is(h2,strong) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .turn-person strong { font-size: .76rem; color: #116f55; }
  .turn-head .turn-label { display: none; }
  .turn-controls { flex-wrap: nowrap; gap: 4px; }
  .turn-controls [data-command="luck-hand"] { width: 44px; min-height: 44px; }
  .turn-controls [data-command="luck-hand"] span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  #turn-assets { display: none; }
}

/* Kartu wilayah memakai ilustrasi sebagai potret petak dan satu kolom identitas. */
.region-sheet .certificate-banner {
  display: grid; grid-template-columns: 44% minmax(0, 1fr); align-items: stretch;
  height: clamp(76px, 13dvh, 106px); aspect-ratio: auto; border: 1px solid #b4cede;
  background: #f4faff; border-radius: 10px;
}
.certificate-banner::before { display: none; }
.certificate-banner :is(img:not(.avatar), .city-illustration) {
  position: static; width: 100%; height: 100%; min-height: 0; object-fit: contain;
  background: radial-gradient(circle at 1px 1px, #accbdd 1px, transparent 1.2px) 0 0 / 11px 11px, var(--tile-paper);
}
.certificate-banner.certificate-panorama img { object-fit: cover; }
.certificate-banner .banner-labels {
  position: static; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; align-items: start; gap: 4px;
}
.banner-labels small { color: #4a637b; font: 750 .64rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .09em; }
.banner-labels > span { border: 0; box-shadow: none; padding: 0; color: #182d4b; background: transparent; backdrop-filter: none; font-size: .88rem; }
.banner-labels .ownership { font-size: .72rem; color: #23634e; max-width: 100%; }
.banner-labels .is-owned { padding: 0; box-shadow: none; }
.banner-labels .ownership-avatar { --space: 18px; }
.region-sheet .region-price { padding-block: 3px 10px; border-bottom: 1px dashed #acc6db; }
.region-sheet .region-card-content .price-focus > strong { font-size: 1.08rem; }
.region-sheet .region-rent h3 { font-size: .82rem; }
.region-sheet .dialog-head { border-bottom: 1px solid #c8dbea; }
.region-sheet .dialog-head h2 { font-size: 1.12rem; }
.event-dialog .event-report .event-art { border: 1px solid color-mix(in srgb, var(--group) 18%, white); border-radius: 9px; }
.event-dialog .event-report:not(.special-tile-report) { position: relative; }
.event-report .event-id {
  position: absolute; z-index: 1; right: 7px; top: 7px; padding: 3px 6px; border-radius: 5px;
  color: #234362; background: #fffffff0; font-size: .65rem;
}
.event-dialog .event-report > h3 { line-height: 1.25; }
.event-dialog .event-report > .event-story { line-height: 1.5; }
.event-report .event-impact { margin-top: 2px; border-radius: 8px; }

@media (max-width: 760px) and (orientation: portrait) {
  .land-sheet:is(.region-sheet, .event-dialog, .place-dialog) {
    width: min(356px, calc(100% - 36px)); max-height: min(86dvh, calc(100dvh - 32px));
    height: fit-content; border-radius: 16px; box-shadow: 0 6px 0 #162d4730, 0 14px 38px #132a4d40;
  }
  .region-sheet .dialog-body, .event-dialog .dialog-body:has(.event-report) { padding: 12px 14px 14px; }
  .region-sheet .dialog-head, .event-dialog .dialog-head { padding: 2px 8px 2px 14px; }
  .region-sheet .region-card-content { gap: 12px; }
  .region-sheet .dialog-footer { padding: 8px 14px max(8px, env(safe-area-inset-bottom)); }
  .region-sheet .region-price { gap: 5px 12px; }
  .region-sheet .region-price .purchase-current { font-size: .75rem; }
  .region-sheet .rent-ladder { gap: 5px; }
  .region-sheet .rent-ladder > div { gap: 3px; padding: 6px 2px; }
  .region-sheet .region-set summary { min-height: 42px; padding: 10px 8px; }
  .land-purchase .certificate-actions { gap: 6px; }
  .land-purchase .purchase-options .button { min-height: 44px; padding: 6px 8px; }
  .land-purchase .purchase-skip { justify-self: stretch; }
  .event-dialog .event-report { gap: 11px; }
  .event-dialog .event-report .event-art { height: clamp(85px, 17dvh, 138px); }
  .event-dialog .event-report h3 { font-size: 1.05rem; }
  .event-dialog .event-report .event-story { font-size: .85rem; }
  .event-dialog .event-impact { padding: 7px 10px; }
}

.board-tools {
  position: absolute; z-index: 3; inset: auto 8px 6px; display: flex; align-items: end;
  justify-content: space-between; gap: 4px; pointer-events: none;
}
.board-tools > * { pointer-events: auto; }
.board-tools .camera-controls, .board-tools .emote-controls { position: relative; inset: auto; }
.board-tools .sheet-grip {
  position: relative; margin: 0; min-width: 0; min-height: 44px; padding: 0 9px; white-space: nowrap;
  background: #f8fcff; border: 1px solid #87adca; border-radius: 12px;
}
.board-tools .sheet-grip::before { display: none; }
.table-side .sheet-details { bottom: calc(100% + 56px); }
.turn-ribbon .action-clock { border-radius: 0; }
.event-targets h4 { margin: 0; }
@media (max-width: 360px) {
  .board-tools .camera-toggle { font-size: 0; gap: 0; }
  .board-tools .camera-toggle svg { width: 19px; }
}

/* Langit pagi dan aksen mangga untuk langkah utama sebelum bermain. */
body:is(.welcome, .mode, .network-mode, .room-mode, .setup, .lobby, .countdown) {
  --ink: #182f4b; --muted: #465e72; --green: #086a6b; --sea: #146890;
  --red: #ce4050; --edge: #abc8d4; --card: #fff; --action: #ffd15a;
  background: radial-gradient(ellipse at 4% 4%, #c5f0ff, transparent 63%),
    linear-gradient(155deg, #d5f3ff 2%, #f4fbff 51%, #e1f7ee);
}
body:not(.table) .page-pattern { color: #559bad; opacity: .18; }
.header.flow-header { background: transparent; border: 0; }
.welcome-header .text-button, .flow .button.secondary, .flow .stepper-controls button, .flow .choice-chip span {
  background: #fff; border-color: var(--edge);
}
.flow .button.secondary:not(:disabled):hover, .flow .stepper-controls button:hover, .flow .text-button:hover { background: #e0f4fa; }
.welcome .hero-play, .flow .button.primary {
  background: var(--action); border: 1.5px solid #30465b; color: #20344a; box-shadow: 0 3px 0 #30465b;
}
.welcome .hero-play:not(:disabled):hover, .flow .button.primary:not(:disabled):hover { background: #ffdd7a; }
.hero-platform {
  border-color: #70c6bd; background: radial-gradient(ellipse at 45% 24%, #c7ffed, #87ddcb 75%);
  box-shadow: 0 8px 0 #419c98, 0 16px 24px #21587225;
}
.flow .panel { box-shadow: 0 3px 0 #42647828; }
.room-mode-actions { gap: 14px; }
.room-mode-option { border-top: 4px solid #37a9b4; padding: 18px; gap: 12px; }
.room-mode-host { border-top-color: #e9a634; background: #fff; }
.join-help summary, .lobby-rules summary { padding-block: 12px; font-weight: 750; cursor: pointer; }
.join-help summary { color: #225c77; font-size: .85rem; }
.join-help ol { margin: 0 0 10px; }
.lobby-flow { max-width: 790px; }
.lobby-grid { align-items: start; }
.lobby-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 16px; }
.lobby-actions .start-button { width: auto; margin: 0; padding-inline: 22px; }
.room-code { background: #fff4cd; border: 1px solid #e8cc84; border-radius: 12px; }
.room-code strong { color: #51401e; }
.lobby-rules .rule-list { font-size: .85rem; }
.room-info .screen-awake { border: 0; border-top: 1px solid var(--edge); border-radius: 0; margin: 0; padding: 12px 0 0; }
@media (max-width: 760px) {
  .mode-flow { padding-inline: clamp(13px, 4vw, 25px); }
  .room-info { padding-block: 3px 10px; }
}

/* Satu dialog menjaga fokus keyboard di dalam isi kartu dan tombol pilihan. */
:is(dialog[open], .public-card-slot).land-sheet.detached-actions {
  inset: 0; margin: auto; height: fit-content; max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border: 0; padding: 4px 4px 7px; border-radius: 0; box-shadow: none; background: transparent; gap: 16px;
  display: flex; flex-direction: column; overflow: hidden;
}
dialog.land-sheet.detached-actions { translate: 0 -8px; }
.land-sheet.detached-actions::before { display: none; }
dialog.detached-actions::backdrop { background: #17334bb5; backdrop-filter: blur(2px); }
dialog.detached-actions.job-featured-epic::backdrop { background: radial-gradient(ellipse, #4e3085dc, #151127ed 76%); }
dialog.detached-actions.job-featured-legend::backdrop { background: radial-gradient(ellipse, #674211e6, #1f140ded 76%); }
.job-featured { --job-stage: #dff6ef; }
.job-featured-rare { --job-stage: #e2f1ff; }
.job-featured-epic { --job-stage: #e3d5fd; }
.job-featured-legend { --job-stage: #ffefb7; }
.job-featured .dialog-body { background: radial-gradient(ellipse at 50% 38%, var(--job-stage), #fbfdff 90%); }
.job-card:not([data-rarity="common"]) {
  --rarity-glint: var(--job-glow);
  animation: luck-glow 980ms calc(var(--job-delay, 30ms) + 140ms) ease-out both;
}
.job-card .luck-sparks i {
  --spark-distance: -74px; color: var(--job-label); font-size: 15px; text-shadow: 0 0 10px var(--job-glow);
  animation-delay: calc(var(--job-delay, 30ms) + 235ms + var(--spark-delay));
}
.job-card[data-rarity="legend"] .luck-sparks i { --spark-distance: -114px; }
@media (prefers-reduced-motion: reduce) {
  .job-card:not([data-rarity="common"]) { animation: none; }
}
.card-face {
  display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--edge); background: var(--card);
  box-shadow: 0 3px 0 #142e465c;
}
.card-face .dialog-head { flex: none; }
.land-sheet.detached-actions .card-face .dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.card-face .certificate-balance, .sale-value {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px;
  padding-top: 10px; margin: 12px 0 0; border-top: 1px dashed var(--edge); color: var(--muted); font-size: .81rem;
}
.card-face > .dialog-body > .sale-value { margin-block-start: 8px; }
.land-sheet.detached-actions .dialog-footer {
  display: grid; gap: 8px; flex: none;
  border: 0; padding: 2px 4px 5px; background: transparent;
}
.land-sheet.detached-actions .dialog-footer .text-button {
  background: #f6efdc; border: 1px solid #c9b98f; border-radius: 10px;
  color: var(--ink); box-shadow: 0 2px 0 #c9b98f;
}
.detached-actions .dialog-footer .button {
  margin: 0; min-height: 44px; border: 1px solid #30485e; border-radius: 12px; box-shadow: 0 3px 0 #20344c;
}
.detached-actions .dialog-footer .button.primary { color: #20344c; background: #ffd15a; }
.detached-actions .dialog-footer .button.primary:not(:disabled):hover { background: #ffdd7a; }
.detached-actions .dialog-footer .button.secondary { color: #183e58; background: #e4f7ff; }
.detached-actions .dialog-footer .button.text-button { width: 100%; justify-self: stretch; background: #f8fcff; color: #2c485c; padding-inline: 18px; }
.detached-actions .dialog-footer .button:disabled { opacity: 1; background: #d4dce1; border-color: #84949e; color: #50606d; box-shadow: none; }
.detached-actions .certificate-actions { display: grid; gap: 8px; }
.detached-actions .dialog-footer .bank-offer { border-left: 4px solid #5065bb; }
.detached-actions .dialog-footer .button + .button { margin: 0; }
.detached-actions .dialog-footer button:focus-visible { outline: 2px solid #1681b2; outline-offset: -4px; }
.hand-entry { display: grid; gap: 8px; }
.hand-entry + .hand-entry { padding-top: 12px; border-top: 1px solid var(--edge); }

.public-card-slot.detached-actions { pointer-events: none; }
.public-card-slot.detached-actions :is(.card-face, .dialog-footer .button) { pointer-events: auto; }

.payday-slip { display: grid; gap: 12px; }
.payday-title, .payday-total, .payday-slip dl > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.payday-title { color: #253b66; font-size: .86rem; }
.payday-title > span { white-space: nowrap; color: var(--muted); }
.payday-slip dl > div { padding-block: 7px; border-bottom: 1px dashed var(--edge); font-size: .84rem; }
.payday-slip dd { flex: none; margin: 0; font-weight: 800; }
.payday-slip dt small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.payday-deductions { border: 1px solid var(--edge); border-radius: 8px; padding: 0 9px; }
.payday-deductions summary { min-height: 44px; display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .83rem; font-weight: 750; }
.payday-deductions summary::-webkit-details-marker { display: none; }
.payday-deductions summary::before { content: '▸'; }
.payday-deductions[open] summary::before { content: '▾'; }
.payday-deductions summary strong { margin-inline-start: auto; white-space: nowrap; }
.payday-deductions dl > div:last-child { border-bottom: 0; }
.payday-income { color: #116347; }
.payday-overdue, .payday-next { font-size: .81rem; line-height: 1.45; }
.payday-overdue { border-radius: 8px; padding: 8px 10px; background: #fff0d0; color: #663e12; }
.payday-total { border-radius: 9px; padding: 10px; background: #dbf4e8; color: #135943; font-size: .83rem; }
.payday-total strong { white-space: nowrap; font-size: .98rem; }
.payday-next { color: var(--muted); }

@media (max-width: 760px) and (orientation: portrait) {
  .region-sheet.detached-actions .certificate-banner { height: clamp(86px, 14dvh, 116px); }
}

/* Keep debits red even when they appear on a neutral receipt. */
.money-loss, .sale-value.money-loss strong, .special-tile-rules .money-loss,
.property-credit-note.money-loss, .payday-deductions summary, .payday-slip .money-loss small { color: #991b43; }
.payday-overdue { background: #ffe8ef; color: #8c1b40; }
.payday-with-deductions .dialog-head { background: #872141; }
.payday-deductions { border-color: #dfa5b9; background: #fff6f8; }
.job-card { width: 100%; text-align: start; }
.job-order { font-size: .74rem; color: #075978; }
.job-route-marker {
  position: absolute; z-index: 1; inset: auto 3px 3px auto; padding: 2px 4px;
  background: #065b7b; color: white; border-radius: 4px; font: 850 12px/1 var(--display);
}
.job-receipt { display: grid; gap: 9px; position: relative; }
.job-receipt p { font-size: .85rem; line-height: 1.4; }
.job-receipt .event-art { margin: 0; }
.job-accepted { --group: #265570; --rarity-glint: #90d3ff; }
.job-accepted.job-featured-special { --group: #026859; --rarity-glint: #81e8be; }
.job-accepted.job-featured-epic { --group: #593ca6; --rarity-glint: #b098ff; }
.job-accepted.job-featured-legend { --group: #724819; --rarity-glint: #ffdd75; }
.job-accepted:is(.job-featured-epic,.job-featured-legend) .job-receipt { animation: luck-glow .85s ease-out both; }

.event-report { position: relative; }
.event-rarity.rarity-badge {
  position: absolute; left: 7px; top: 7px; min-width: 0; z-index: 1;
  font-size: .65rem; padding: 4px 7px;
}
.event-report[data-rarity="rare"] { --rarity-glint: #85cfff; }
.event-report[data-rarity="special"] { --rarity-glint: #86e6c3; }
.event-report[data-rarity="epic"] { --rarity-glint: #ba9cff; }
.event-report[data-rarity="legend"] { --rarity-glint: #ffdd75; }
.event-report.event-adverse[data-rarity="common"] { --adverse: #a42a4d; --adverse-paper: #ffeaf1; }
.event-report.event-adverse[data-rarity="rare"] { --adverse: #85203e; --adverse-paper: #fbdde9; }
.event-report.event-adverse[data-rarity="special"] { --adverse: #6a234c; --adverse-paper: #f4d4ec; }
.event-report.event-adverse[data-rarity="epic"] { --adverse: #3b1a5d; --adverse-paper: #dec8f7; }
.event-report.event-adverse[data-rarity="legend"] { --adverse: #1b0d2f; --adverse-paper: #bd9de9; }
.event-adverse .event-rarity { background: var(--adverse); }
.event-adverse .event-art { --event-paper: var(--adverse-paper); --event-dot: #32144848; border: 1px solid var(--adverse); }
.event-adverse-dialog { --group: #95274b; }
.event-adverse-dialog.adverse-rare, .event-adverse-dialog[data-rarity="rare"] { --group: #80203d; }
.event-adverse-dialog.adverse-special, .event-adverse-dialog[data-rarity="special"] { --group: #69204f; }
.event-adverse-dialog.adverse-epic, .event-adverse-dialog[data-rarity="epic"] { --group: #391853; }
.event-adverse-dialog.adverse-legend, .event-adverse-dialog[data-rarity="legend"] { --group: #190d2a; }
dialog.detached-actions.event-adverse-dialog.adverse-epic::backdrop { background: radial-gradient(ellipse, #482365dc, #0d0718ef 77%); }
dialog.detached-actions.event-adverse-dialog.adverse-legend::backdrop { background: radial-gradient(ellipse, #341553ef, #09050ffc 72%); }
.event-asset-changes { margin: 0; padding-inline-start: 14px; font-size: .83rem; }
.event-asset-changes li { margin: 2px 0; }
.event-targets .money-loss { display: block; margin-top: 2px; font-size: .74rem; font-weight: 750; }
.card-lightning, .board-lightning {
  pointer-events: none; background: linear-gradient(#fff 4%, var(--bolt-color, #f67489) 54%, #fff 100%);
  clip-path: polygon(60% 0, 12% 58%, 47% 53%, 29% 100%, 91% 33%, 55% 39%, 78% 0);
  animation: lightning-strike 720ms ease-out both;
}

.table:not(.finished-game) .action-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px;
}
.luck-discard-dialog[data-must-choose] .dialog-head form { visibility: hidden; }
.luck-discard-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.luck-discard-card {
  display: flex; gap: 9px; align-items: center; width: 100%; min-height: 49px;
  text-align: start; padding: 4px 8px; background: #eff5fb; border: 1px solid #b3cde3;
}
.luck-discard-card .event-art { width: 34px; height: 34px; padding: 1px; margin: 0; flex: none; }
.luck-discard-card :is(strong,small) { display: block; }
.luck-discard-card small { font-size: .73rem; }
.luck-discard-card.new-luck-card { background: #fff2ca; border-color: #ca9c37; }
.board-lite .tile-special::after { animation: none; }
.board-lite .pawn::before { filter: none; }
.board-lite .board-floor, .board-lite .tile { box-shadow: none; }
.board-lite .board-model:not(.following-roll) { transition-duration: 100ms; }
body:has(#board.board-lite) dialog::backdrop { backdrop-filter: none; }
.table:has(#board.board-lite) .table-side, .table:has(#board.board-lite) .action-panel { box-shadow: none; }
@media (max-width: 760px) and (orientation: portrait) {
  .table:not(.debug-page,.finished-game) .board-frame { min-height: clamp(230px, 40dvh, 285px); }
}
.card-lightning { position: absolute; z-index: 1; inset: 5px 17% auto auto; width: 15px; height: 24px; }
.board-lightning {
  position: absolute; inset: 50% auto auto 50%; width: 17px; height: 23px;
  transform: translateZ(calc(var(--pawn-label-height, 77px) - 10px)) rotateZ(calc(-1 * var(--angle))) rotateX(calc(-1 * var(--tilt))) translate(-50%, -55%);
}
:is(.event-report, .board-lightning)[data-rarity="rare"] { --bolt-color: #4598ff; }
:is(.event-report, .board-lightning)[data-rarity="special"] { --bolt-color: #33c892; }
:is(.event-report, .board-lightning)[data-rarity="epic"] { --bolt-color: #9d68f5; }
:is(.event-report, .board-lightning)[data-rarity="legend"] { --bolt-color: #ffbe33; }
.scene:is([data-reveal^="penalty-"],[data-reveal^="strike-"])::after {
  background: radial-gradient(ellipse, #7946bd35 20%, #210a3ac9 84%);
}
.scene:is([data-reveal="strike-legend"],[data-reveal="penalty-legend"])::after {
  background: radial-gradient(ellipse, #ab60ff3d 14%, #0c051ff0 76%);
  animation: storm-glow .85s ease-out both;
}
@keyframes lightning-strike {
  0% { opacity: 0; scale: .75; }
  22% { opacity: 1; scale: 1; }
  50% { opacity: .64; }
  100% { opacity: 0; }
}
@keyframes storm-glow { 0% { opacity: .1; } 27% { opacity: .87; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .job-accepted .job-receipt { animation: none; }
  .card-lightning, .board-lightning { display: none; }
}

/* HUD menumpang di sudut papan agar perubahan isi koleksi tidak menggeser kamera. */
.table:not(.finished-game) .table-main { position: relative; }
.table:not(.finished-game) .table-side {
  position: absolute; inset: auto auto max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  width: auto; max-width: calc(100% - 86px); margin: 0; padding: 0; pointer-events: none;
}
.table:not(.finished-game) #turn-panel {
  display: block; position: relative; padding: 0; border: 0; background: transparent; box-shadow: none;
}
.player-chip {
  pointer-events: auto; max-width: 100%; min-height: 38px; gap: 6px; padding: 3px 7px;
  border: 1px solid #98b8cf; border-inline-start: 4px solid var(--player-accent); border-radius: 13px;
  background: #fcfeff; color: #162f48; text-align: start; box-shadow: 0 2px 5px #15334b24;
}
.player-chip .avatar { --space: 29px; flex: none; }
.player-chip > span:not(.avatar) { min-width: 0; }
.player-chip strong, .player-chip small {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.25; margin: 0;
}
.player-chip strong { color: #162f48; font-size: .72rem; }
.player-chip small { color: #136951; font-weight: 700; font-size: .68rem; }
.table:not(.finished-game) .board-tools {
  inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) auto;
  flex-direction: column; gap: 7px; align-items: flex-end;
}
.table:not(.finished-game) .emote-options { right: 0; left: auto; }
.table:not(.finished-game) .emote-toggle { min-width: 44px; padding-inline: 8px; }
.table:not(.finished-game) .dice-trigger { width: 50px; height: 50px; }

.settings-dialog[open] {
  display: flex; flex-direction: column; width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  overflow: hidden; border: 1px solid #95b8cc; border-radius: 17px; background: #fafdfd;
}
.settings-dialog .dialog-head { flex: none; padding: 5px 12px 5px 17px; background: #e2f5f5; }
.settings-dialog .dialog-body { min-height: 0; overflow: auto; padding: 12px; overscroll-behavior: contain; }
.settings-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; padding: 3px; background: #eaf1f4; border-radius: 11px; }
.settings-nav button { min-height: 42px; padding: 4px; color: #405873; background: transparent; border: 0; border-radius: 8px; font-size: .86rem; }
.settings-nav button[aria-pressed="true"] { color: white; background: #11676d; }
.settings-content { min-width: 0; padding-block-start: 12px; display: grid; gap: 12px; align-content: start; }
.settings-links { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr)); gap: 7px; }
.settings-row {
  display: flex; align-items: center; gap: 8px; min-height: 45px; padding: 7px 10px; border-radius: 9px;
  text-align: start; text-decoration: none; font: 700 .85rem/1.25 var(--display);
  border: 1px solid #bdd2de; background: #fff; color: #193b57;
}
.settings-row svg { flex: none; width: 17px; height: 17px; color: #137577; }
.settings-row:hover { background: #eff9fa; }
.settings-leave { border-top: 1px solid #d5e3eb; padding-top: 10px; }
.settings-leave button { color: #903346; background: #fff8f8; }
.settings-content .music-settings { display: grid; gap: 12px; }
.settings-content .music-settings > button { justify-self: start; }
.settings-content .audio-slider { min-width: 0; }
.settings-content .screen-awake { margin: 0; }
.event-report .event-condition { color: #405973; font-size: .76rem; line-height: 1.4; }
@media (min-width: 620px) {
  .settings-dialog .dialog-body { display: grid; grid-template-columns: 122px minmax(0,1fr); align-items: start; gap: 15px; padding: 16px; }
  .settings-nav { grid-template-columns: 1fr; }
  .settings-content { padding: 0; }
}
@media (orientation: landscape) and (max-height: 530px) {
  .table:not(.debug-page,.finished-game) .header { padding-block: 2px; min-height: 42px; }
  .settings-dialog[open], .game-card-dialog.detached-actions[open] { max-height: calc(100dvh - 16px); }
  .game-card-dialog.detached-actions[open] { inset: 0; margin: auto; translate: none; }
}

.table-overlay { display: flex; flex-direction: column; align-items: flex-start; }
.table-overlay .brand-name {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%);
}
.table-overlay .turn-ribbon { position: static; translate: none; align-self: center; margin-block-start: 9px; }
.table-overlay .header, .table-overlay #standings { max-width: 100%; }
.finished-game .table-overlay .turn-ribbon { display: none; }
.table:not(.debug-page,.finished-game) .table-layout { width: 100%; max-width: none; padding: 0; height: var(--game-height, 100dvh); }
.table:not(.debug-page,.finished-game) .table-main { display: flex; min-height: 0; }
.table:not(.debug-page,.finished-game) .table-stage { position: absolute; inset: 0; border: 0; border-radius: 0; }
.table:not(.debug-page,.finished-game) .board-frame { min-height: 0; border-radius: 0; }
.table:not(.debug-page,.finished-game) .table-overlay {
  --roster-width: clamp(132px, 31vw, 148px);
  position: absolute; z-index: 3; inset: 0 0 auto; pointer-events: none;
  display: grid; grid-template-columns: var(--roster-width) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
  gap: 5px 8px; align-items: start;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
.table-overlay .header { background: transparent; border: 0; box-shadow: none; }
.table-overlay :is(button, .screen-awake, .balances) { pointer-events: auto; }
.table:not(.debug-page,.finished-game) .table-overlay .header { grid-column: 1 / -1; }
.table:not(.debug-page,.finished-game) .table-overlay #standings {
  grid-area: 2 / 1 / 5 / 2; align-self: start; width: 100%; padding-inline-start: 6px;
}
.table-overlay .balances {
  display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0 0 2px;
  max-height: min(42dvh, calc(100dvh - 210px)); overflow: hidden auto; overscroll-behavior: contain;
}
.table-overlay .balances li { width: 100%; max-width: none; min-height: 0; }
.table-overlay .balances .balance-button { min-height: 36px; padding: 3px 5px; gap: 6px; }
.table-overlay .balances .balance-person { flex: 1; min-width: 0; }
.table-overlay .balances .balance-person strong { font-size: .7rem; line-height: 1.15; }
.table-overlay .balances .balance-person small { font-size: .65rem; line-height: 1.2; }
.table-overlay .balances .avatar, .player-chip .avatar { --space: 23px; }
.table-overlay .current-player .balance-button { min-height: 50px; padding-block: 5px; }
.table-overlay .current-player .balance-person { display: grid; gap: 2px; }
.table-overlay .opponent-balance { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.table-overlay .opponent-balance .balance-value { font-weight: 750; font-variant-numeric: tabular-nums; }
.table-overlay .balances .opponent-job { white-space: normal; overflow-wrap: anywhere; }
.balances li.eliminated-player, .player-chip.eliminated-player {
  filter: grayscale(1); opacity: .76; background: #e7edf2;
}
.table:not(.debug-page,.finished-game) .table-overlay .turn-ribbon {
  grid-area: 2 / 2; justify-self: start; max-width: calc(100% - 8px); margin-block-start: 17px;
}
.table:not(.debug-page,.finished-game) .table-overlay:has(#standings[hidden]) .turn-ribbon {
  grid-column: 1 / -1; justify-self: center;
}
.table-overlay .screen-awake { grid-area: 3 / 2; align-self: start; width: min(440px, calc(100% - 10px)); }
html[data-game-viewport],
html[data-game-viewport] :where(.balances, .pocket-cards, .debug-list, dialog, .dialog-body) {
  touch-action: pan-x pan-y;
}
html[data-game-viewport]:has(body.table:not(.debug-page,.finished-game)) {
  overflow: hidden; overscroll-behavior: none;
}
html[data-game-viewport] body.table:not(.debug-page,.finished-game),
html[data-game-viewport] .table:not(.debug-page,.finished-game) #app {
  height: var(--game-height, 100dvh); min-height: 0; overflow: hidden;
}
html[data-game-viewport] dialog :is(input[type="text"], input:not([type]), textarea, select) {
  font-size: max(1em, 16px);
}
@media (max-width: 380px) {
  .table-overlay .turn-ribbon { gap: 4px; padding-inline: 7px; flex-wrap: wrap; }
  .table-overlay .turn-ribbon strong { font-size: .74rem; }
  .table-overlay .turn-ribbon .action-clock { padding-inline-start: 4px; font-size: .67rem; }
}
@media (min-width: 620px) {
  .table:not(.debug-page,.finished-game) .table-overlay .turn-ribbon {
    justify-self: center; margin-inline-end: var(--roster-width);
  }
}
.table:not(.finished-game) #turn-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
#turn-panel > .player-chip { flex: none; }
.seat-portrait { position: relative; display: inline-flex; flex: none; }
.seat-portrait b {
  position: absolute; inset: auto -2px -2px auto; min-width: 12px; height: 12px; display: grid; place-items: center;
  border: 1px solid white; border-radius: 4px; background: #19314d; color: white; font: 800 9px/1 var(--display);
}
.debt-flag { flex: none; padding: 1px 3px; border-radius: 3px; background: #b62041; color: white; font: 750 .59rem/1.15 var(--display); }
.repeat-roll {
  position: absolute; z-index: 3; left: 50%; top: 38%; translate: -50% -50%; width: max-content; max-width: calc(100vw - 24px);
  border-radius: 99px; border: 1px solid white; padding: 7px 11px; background: #096341; color: white;
  font: 800 .8rem/1.2 var(--display); box-shadow: 0 2px 6px #103c3a38; pointer-events: none;
}
.table:has(#public-card-slot:not([hidden])) .repeat-roll { visibility: hidden; }
.table:not(.finished-game) .table-side { padding: 0; }
.chip-name { display: flex; align-items: center; gap: 4px; }
.chip-health { flex: none; font-size: .61rem; font-weight: 750; color: #a53053; }
.player-chip .chip-copy small { font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-pockets { display: flex; max-width: 100%; min-width: 0; gap: 5px; align-items: flex-end; }
.player-pockets:empty { display: none; }
.pocket-stack { pointer-events: auto; min-width: 0; max-width: 150px; }
.pocket-stack > small {
  display: flex; gap: 3px; width: fit-content; max-width: 100%; white-space: nowrap;
  margin: 0 auto; font-size: .62rem; line-height: 1.35; font-weight: 750; padding: 0 3px; border-radius: 4px; color: #193452; background: #fffffff2;
}
.pocket-stack > small span { overflow: hidden; text-overflow: ellipsis; }
.pocket-cards { display: flex; align-items: end; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; }
.pocket-cards::-webkit-scrollbar { display: none; }
.pocket-card {
  --trim: #437fa9; flex: 0 0 43px; height: 51px; position: relative; display: grid; align-content: space-between;
  border: 1px solid #254560; border-top: 4px solid var(--trim); border-radius: 6px;
  padding: 1px 3px; color: #193450; background: #f6fcff; box-shadow: 0 2px 1px #18395255;
}
.pocket-card + .pocket-card { margin-inline-start: -17px; }
.pocket-land .pocket-card + .pocket-card { margin-inline-start: -31px; }
.pocket-card:focus-visible { z-index: 1; outline-offset: -3px; }
.pocket-card span { text-align: start; font-size: .62rem; font-weight: 850; }
.pocket-card img { width: 32px; height: 27px; padding: 0; margin: 0; object-fit: contain; }
.pocket-luck .pocket-card { --trim: #596ba7; background: #f2efff; }
.pocket-luck .rarity-special { --trim: #16977d; }
.pocket-luck .rarity-epic { --trim: #864ac5; }
.pocket-luck .rarity-legend { --trim: #c48a17; background: #fff5d9; }
@media (max-width: 520px) {
  .table-side:has(.pocket-stack) .player-chip { max-width: min(146px, 47vw); }
  .table-side:has(.pocket-stack) .player-chip small { font-size: .69rem; }
  .table-side:has(.pocket-stack) .player-chip .avatar { --space: 24px; }
}
@media (orientation: landscape) and (max-height: 530px) {
  :is(dialog[open], .public-card-slot).land-sheet.detached-actions {
    width: min(760px, calc(100vw - 24px)); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center; gap: 12px; max-height: calc(100dvh - 16px);
  }
  .detached-actions .card-face { max-height: calc(100dvh - 36px); }
  .detached-actions .dialog-footer:has(> button:nth-child(5)) { grid-template-columns: 1fr 1fr; }
}
.room-qr, .qr-scanner { display: grid; justify-items: center; gap: 12px; text-align: center; }
.room-qr img { width: min(236px, 100%); image-rendering: pixelated; }
.room-qr strong { letter-spacing: .16em; }
.qr-scanner video { width: min(320px, 100%); max-height: 40dvh; }

.fate-throw { position: relative; display: grid; place-items: center; perspective: 420px; }
.fate-throw > * { grid-area: 1 / 1; }
.fate-throw .event-art { opacity: .22; }
.fate-cube { --die-size: 31px; transform-style: preserve-3d; }
.fate-cube .die { --resting-die: rotateX(-61deg) rotateY(14deg) rotateX(var(--die-x)) rotateY(var(--die-y)); }
@media (prefers-reduced-motion: no-preference) {
  .fate-cube .die { animation: fate-toss 820ms both; }
  .event-report:has(.fate-throw) .event-impact { animation: fate-outcome 140ms 820ms both; }
}
@keyframes fate-toss {
  0% { transform: translate(-28px, -22px) rotateZ(-28deg) rotateX(320deg) rotateY(-200deg) var(--resting-die); }
  52% { transform: translate(-7px, 6px) rotateZ(12deg) rotateX(83deg) rotateY(-45deg) var(--resting-die); }
  73% { transform: translate(2px, -7px) rotateZ(-6deg) rotateX(26deg) rotateY(-14deg) var(--resting-die); }
  100% { transform: var(--resting-die); }
}
@keyframes fate-outcome { from { opacity: 0; } to { opacity: 1; } }

dialog.luck-draw-dialog[open]:not(.detached-actions) {
  inset: 0; margin: auto; display: flex; flex-direction: column; height: fit-content;
  max-height: min(90dvh, 825px); overflow: hidden;
}


/* A modal with no enabled control is focused by Safari as a container. */
#dialog:focus { outline: none; }
#room-profile-form { display: grid; gap: 12px; }
.pawn-colors input:disabled + span { opacity: .3; cursor: not-allowed; }

.building-model-canvas {
  position: absolute; width: 84px; height: 120px; left: 0; top: 0;
  transform-origin: 0 0;
  transform: rotateZ(calc(-1 * var(--angle))) rotateX(calc(-1 * var(--tilt))) translate(-42px, -85px);
}
/* Board vertices and decal positions share the same zero-height contact plane. */
.solid-board { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.board-face { transform: none; }
.solid-ready .board-floor, .solid-ready .board-rim { display: none; }
.solid-ready .board-middle { border: 0; background: transparent; box-shadow: none; }

.board-solids { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.board-solids i { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.scene.zooming .board-model { transition: none; }
.board-model.board-printed .tile { background: transparent; }
.board-printed .tile > .tile-name, .board-printed .tile > .tile-glyph, .board-printed .tile::before { display: none; }
.tile.route-preview { box-shadow: inset 0 0 0 3px #efb52b; }
.cash-float { white-space: pre-line; text-align: center; line-height: 1.18; }
.payday-net { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; background: #edf2f5; }
.payday-net[data-sign="1"] { color: #135943; background: #dbf4e8; }
.payday-net[data-sign="-1"] { color: #932e3c; background: #ffe3e7; }

.building-shell { position: absolute; transform: rotateZ(var(--facade-heading)); transform-style: preserve-3d; }
.pawn::before, .pawn.active-pawn::after, .pawn.inspected-pawn::after { scale: var(--pawn-scale, 1); }

/* The textured board draws the visible tile edges and highlights in WebGL. */
.board-model.board-printed .tile {
  border-color: transparent;
  outline: none;
  box-shadow: none;
  animation: none;
  -webkit-tap-highlight-color: transparent;
}

.setup-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.setup-heading .button { min-height: 44px; }
.lineup .setup-heading { margin: 0 0 16px; }
.lineup .setup-heading h1 { font-size: clamp(1.45rem, 6vw, 2.45rem); }
.lineup .setup-heading .button { padding-inline: 9px; font-size: .8rem; }
.lobby-refresh { animation: none; }
.lineup-title { min-width: 0; }
.lineup-count { display: block; margin-top: 4px; color: var(--muted); font-size: .81rem; font-weight: 700; }
.lineup-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.lineup-seat {
  min-width: 0; min-height: 90px; display: flex; flex-direction: column; overflow: clip;
  border: 1px solid #94b4c6; border-radius: 10px; background: #fff;
}
.lineup-occupied { border-top: 3px solid var(--seat-color); }
.lineup-vacant { border-style: dashed; background: #f5fbffbd; }
.lineup-seat-main, .lineup-seat-extra { border: 0; color: var(--ink); background: transparent; }
.lineup-seat-main { display: flex; flex: 1; width: 100%; min-height: 53px; gap: 7px; align-items: center; padding: 7px 8px; text-align: start; }
.lineup-seat-main .avatar { --space: 34px; }
.lineup-seat-main strong, .lineup-seat-main small { display: block; overflow-wrap: anywhere; }
.lineup-seat-main strong { font-size: .9rem; }
.lineup-seat-main small { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.lineup-vacant .lineup-seat-main { justify-content: center; color: #245d7c; font-size: .82rem; font-weight: 800; }
.lineup-vacant .lineup-seat-main > span {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none;
  border-radius: 7px; font-size: 1.12rem; color: #215c76; background: #deeff8;
}
.lineup-vacant .lineup-seat-main .ui-icon { width: 15px; height: 15px; }
.lineup-seat-extra, .lineup-seat-status {
  min-height: 36px; border-top: 1px solid #dbe8ef; display: grid; place-items: center;
  padding: 4px 6px; color: #28536a; background: #f5fafc; font-size: .74rem; font-weight: 750;
}
.lineup-seat button:hover { background: #e6f5fc; }
.lineup-seat button:focus-visible { outline-offset: -4px; }
.lineup-seat .is-ready { background: #d8f5e7; color: #145943; }
.lineup-hint { margin: 10px 0 0; color: var(--muted); font-size: .81rem; }
.lobby-flow .room-code { justify-content: start; gap: 6px; margin: 0 0 14px; }
.lobby-flow .room-code div { flex: 1 0 auto; }
.lobby-flow .lobby-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.lobby-flow .lobby-actions { flex-wrap: wrap; }
.lobby-flow .lobby-actions .start-button { flex: 1; padding-inline: 12px; }
.lobby-capacity { margin-top: 14px; }
.lobby-capacity h2 { font-size: 1rem; margin: 0 0 8px; }
.lobby-capacity .stepper-controls output { min-width: 44px; text-align: center; font-weight: 800; }
.countdown-overlay { position: fixed; inset: 0; z-index: 4; background: #132c46c9; }
.countdown-overlay #countdown-number { color: #ffe592; text-shadow: 0 4px #553f2d; }
@media (min-width: 545px) {
  .lineup-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .lobby-flow .lobby-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The canvas renders world geometry. The DOM keeps labels and click targets. */
.plot-building.board-world-actor,
.board-world-actor > .pawn-piece,
.pawn.board-world-actor::before,
.pawn.board-world-actor::after { display: none; }
.pawn.board-world-actor { transition: none; }

.setup-options-panel {
  margin-top: 16px; background: var(--card); border: 1px solid var(--edge); border-radius: 12px;
}
.setup-options-panel .section-heading {
  align-items: center; padding: 8px 13px; border-bottom: 1px solid #d9e9ef;
}
.setup-options-panel h2 { font-size: 1.04rem; }
.setup-options-panel .section-heading .button { padding-inline: 12px; font-size: .83rem; }
.setup-rule {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, 38%); align-items: center;
  gap: 12px; padding: 8px 13px; font-size: .88rem; font-weight: 720;
}
.setup-rule + .setup-rule { border-top: 1px solid #e5eef3; }
.setup-rule small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; font-weight: 500; }
.setup-rule input { text-align: end; }
.setup-rule :is(select, input) { font-variant-numeric: tabular-nums; }
.setup-options-panel :is(h2, input) { scroll-margin-block: 14px; }
.setup-advanced { border-top: 1px solid #d9e9ef; }
.setup-advanced summary {
  min-height: 44px; padding: 12px 13px; color: #225c77; cursor: pointer; font-size: .86rem; font-weight: 750;
}
.setup-advanced .switch { align-items: center; min-height: 44px; margin: 0; padding: 0 13px; font-size: .85rem; }
.setup-advanced .switch input { margin-top: 0; }
.setup-testing { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-advanced .setup-testing { border-top: 1px solid #e5eef3; padding: 12px 13px; }
.setup-testing .button { min-height: 44px; flex: 1 1 auto; padding-inline: 9px; font-size: .8rem; }
.setup-testing .button { text-decoration: none; }

.character-cycle {
  min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 7px 9px; text-align: left;
}
.character-cycle strong, .character-cycle small { display: block; overflow-wrap: anywhere; }
.character-cycle strong { font-size: .8rem; }
.character-cycle small { color: var(--muted); font-size: .73rem; margin-top: 2px; }
.character-cycle .ui-icon { flex-shrink: 0; width: 15px; height: 15px; }

.dialog-fixed-status {
  flex: none; padding: 8px 14px; margin: 0; background: #d8f7e7; color: #145846;
  font-size: .83rem; font-weight: 750; border-bottom: 1px solid #99cfbc;
}

.board-model.route-preview-camera { transition-duration: 180ms; }
.board-pawn-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.board-pawn-label {
  position: absolute; top: 0; left: 0; max-width: 98px; padding: 2px 6px;
  border: 1px solid #fff; border-left: 5px solid var(--pawn-label-color); border-radius: 5px;
  background: #edf6ff; color: #142a45; font: 800 11px/1.12 var(--display);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.board-pawn-label.active-pawn-label { background: #172f4a; color: #fff; }
.pawn.board-world-actor .pawn-name { display: none; }
.pawn:not(.board-world-actor) .pawn-name { display: flex; }
.board-printed .tile.tile-land.owned::after { display: none; }
.board-dice:not([hidden]) + .roll-result { display: grid; gap: 4px; max-width: min(94%, 360px); text-align: center; }
.roll-summary { display: flex; align-items: center; justify-content: center; gap: 8px; }
.roll-destination { font-size: .75rem; font-weight: 650; color: #fff2ce; white-space: normal; overflow-wrap: anywhere; }
.board-model:not(.board-printed) .tile.route-preview { outline: 3px dotted #efb52b; outline-offset: -6px; }
.board-dice:not([hidden]) + .roll-result.with-route { translate: -50% 0; margin-top: 12px; min-width: min(260px, 88%); }
