:root{color-scheme:dark;--blue:#102344;--deep:#091831;--line:#395171;--gold:#f7cf80;--cream:#fff2d9;--muted:#c5d4e8;font:16px/1.4 system-ui,sans-serif;background:var(--deep);color:var(--cream)}
*{box-sizing:border-box}
:root{--side-min:310px;--board-size:min(100dvh,calc(100vw - var(--side-min)))}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
main{height:100dvh;display:flex;align-items:center;justify-content:center;overflow:hidden}
#board{position:relative;flex:none;width:var(--board-size);aspect-ratio:1;isolation:isolate}
#board>img{display:block;width:100%;height:100%;user-select:none}
#squares,#markers{position:absolute;inset:0;pointer-events:none}
.square{position:absolute;pointer-events:auto;background:transparent;border:0;border-radius:0;padding:0;min-height:0}
.square:hover,.square:focus-visible{background:#ffd47255;outline:3px solid #32210c;outline-offset:-4px}
.marker{position:absolute;translate:-50% -50%;display:grid;place-items:center;width:clamp(14px,3cqw,44px);aspect-ratio:1;border:2px solid #fff1bd;border-radius:50%;background:radial-gradient(ellipse at 32% 19%,#ffffffbd 0%,#ffffff45 22%,transparent 53%),var(--piece);color:white;font-weight:900;font-size:clamp(9px,2.15cqw,26px);box-shadow:0 2px 5px #040b1a,inset 0 -3px 4px #0006;text-shadow:0 1px 2px #102344;line-height:1}
.marker.active{border-color:white;outline:2px solid #3e2616;box-shadow:0 0 8px 2px #fff3bc,0 2px 5px #040b1a,inset 0 -3px 4px #0006;z-index:1}
#board{container-type:inline-size}
.deed-marker{position:absolute;translate:-50% -50%;border-radius:4px;padding:1px 3px;line-height:1.1;background:var(--piece);color:#fff;border:1px solid #fff0bb;font-size:clamp(8px,1.5cqw,19px);font-weight:800;white-space:nowrap}
aside{align-self:stretch;min-width:var(--side-min);flex:1;display:flex;flex-direction:column;background:radial-gradient(ellipse at top right,#273d62,var(--blue) 42%,var(--deep));border-left:1px solid #57749c;min-height:0}
header{display:flex;align-items:center;gap:.55rem;padding:clamp(.7rem,2.2vw,1.8rem);border-bottom:1px solid var(--line)}
header div{margin-right:auto}
h1,h2,h3,p{margin:0}
h1,h2,h3{font-family:Georgia,serif}
h1{font-size:clamp(1.35rem,2.8vw,3rem);line-height:1}
header p{color:var(--gold);font-family:Georgia,serif;font-style:italic;margin-top:.25rem}
button,input,select{font:inherit}
button{cursor:pointer;background:#223a5e;color:#fff6e4;border:1px solid #597293;border-radius:9px;padding:.55rem .8rem;min-height:42px}
button:hover{background:#31517b}
button:disabled{opacity:.48;cursor:default}
button.primary{background:var(--gold);color:#23160a;border-color:var(--gold);font-weight:750}
button.primary:hover{background:#ffe2a5}
button.warn{border-color:#e88979;color:#ffd0c8}
button[aria-pressed=true]{outline:2px solid var(--gold);outline-offset:-2px;background:#345580}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #ffdc8e;outline-offset:2px}
#sidebar{padding:clamp(.65rem,2.2vw,1.8rem);overflow:auto;flex:1;scrollbar-color:#58749b #102344}
#storage:not(:empty){color:#ffd0ab;padding:.5rem .9rem}
.turn{border:1px solid #536b8f;border-radius:16px;background:#102440;padding:clamp(.75rem,1.6vw,1.35rem);margin-bottom:1rem}
.turn h2{font-size:clamp(1.25rem,2.15vw,2.05rem);line-height:1.1}
.turn p{margin-top:.5rem}
.eyebrow{color:var(--gold);font-size:.77rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}
.meta,.muted,small{color:var(--muted)}
.line{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem;margin-top:.75rem}
.spread{justify-content:space-between}
.dice{display:grid;grid-template-columns:repeat(3,1fr);gap:.45rem;margin:.9rem 0 .6rem}
.dice button{padding:.4rem .15rem;min-width:0}
.dice strong{display:block;font-size:1.25rem}
.wide{width:100%}
details{border:1px solid #385273;border-radius:10px;margin:.45rem 0;background:#142b4a}
summary{cursor:pointer;min-height:44px;padding:.65rem .75rem;font-weight:700}
details>div,details>ol{padding:0 .75rem .75rem}
details ol{margin-left:1.35rem}
details ul,ul.portfolio{padding-left:1.2rem}
li+li{margin-top:.3rem}
.cash{color:var(--gold);margin-left:.35rem;white-space:nowrap}
.badge{display:inline-grid;place-items:center;border-radius:50%;width:1.55em;height:1.55em;background:var(--piece);color:white;border:1px solid #fce2a4;margin-right:.3em}
h3{font-size:1.15rem;margin:.85rem 0 .35rem}
dialog{--ink:#25160d;background:linear-gradient(125deg,#fff3d5,#f1d8ab);border:1px solid #9a7338;color:var(--ink);border-radius:18px;padding:0;width:min(660px,calc(100vw - 24px));max-height:94dvh;overflow:auto;box-shadow:0 18px 70px #0008;color-scheme:light}
dialog.settings{margin:0 0 0 auto;border-radius:15px 0 0 15px;height:100dvh;max-height:100dvh;width:max(310px,calc(100vw - 100dvh));max-width:min(100vw,610px)}
dialog::backdrop{background:#080f1e9e}
dialog.settings::backdrop{background:#080f1e38}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem 1.15rem;border-bottom:1px solid #a8834d66;background:#eed5a6}
#close{min-width:44px;font-size:1.4rem;line-height:1}
#panel-body{padding:1rem 1.15rem 1.2rem}
#panel-body p+p{margin-top:.6rem}
dialog .primary{background:#8b440e;color:white;border-color:#8b440e}
dialog .primary:hover{background:#72340a}
dialog .muted,dialog small{color:#574331}
dialog a{color:#163f70}
label{display:block}
label+label{margin-top:.75rem}
input:not([type=checkbox]):not([type=radio]),select{width:100%;min-height:42px;background:#fff8ea;color:#261909;border:1px solid #8d714b;border-radius:7px;padding:.4rem .55rem}
input[type=checkbox],input[type=radio]{width:1.1em;height:1.1em;vertical-align:middle;accent-color:#85450e}
fieldset{border:1px solid #ac895b;border-radius:10px;margin:.85rem 0;padding:.65rem}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}
.form-grid label+label{margin:0}
.contract{display:flex;gap:1rem;align-items:flex-start}
.contract img{width:min(47%,270px);height:auto}
.contract p{font-size:1rem}
.card-art{display:block;width:min(100%,510px);margin:.65rem auto;border-radius:8px}
.question{font-size:clamp(1.15rem,2.5vw,1.55rem);line-height:1.4;margin-bottom:1rem}
.solution{padding:.75rem;border-radius:8px;background:#fff6db;margin-top:.65rem}
.ok{color:#186138}.wrong{color:#9b2525}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:690px) and (orientation:portrait){
  main{flex-direction:column;justify-content:flex-start}
  :root{--board-size:min(100vw,57dvh)}
  aside{min-width:0;min-height:0;border-left:0;border-top:1px solid #57749c}
  header{padding:.55rem .75rem}
  header p{display:none}
  dialog.settings{width:min(100vw,460px)}
}
@media(max-height:500px) and (orientation:landscape){
  :root{--side-min:255px}
}
@media(prefers-reduced-motion:no-preference){
 .marker{transition:left 110ms ease,top 110ms ease}
}
.dialog-head{position:sticky;top:0;z-index:1}
.dice:has(button:nth-child(2):last-child){grid-template-columns:repeat(2,1fr)}
.dice strong{display:flex;align-items:center;justify-content:center;gap:2px;min-height:44px}
.dice img{width:min(36px,47%);height:auto}
.dice-result{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem}
.dice-result img{width:28px;height:28px}
.dice-result strong{padding:.2rem .55rem;border-radius:6px;background:var(--gold);color:#23160a}
.construct{margin-top:.45rem}
details ul.wallet{list-style:none;padding:0;margin:.6rem 0 0}
.wallet-property{display:flex;align-items:center;gap:.4rem}
.property-label{flex:1;min-width:0;padding:.19rem .55rem;border-radius:5px;background:var(--property);color:var(--property-ink);font-weight:700}
.buildings{display:inline-flex;align-items:end;gap:.06em;vertical-align:middle;font-size:1.1rem;filter:drop-shadow(0 1px 1px #000b)}
.building{position:relative;display:block;width:1em;height:1em;--shade:color-mix(in srgb,var(--piece),#000 40%);--light:color-mix(in srgb,var(--piece),#fff 42%)}
.building::before,.building::after,.building i{content:"";position:absolute;inset:0}
.building::before{background:var(--piece);clip-path:polygon(5% 47%,61% 58%,61% 96%,5% 82%)}
.building::after{background:var(--shade);clip-path:polygon(61% 58%,96% 34%,96% 72%,61% 96%)}
.building i{background:var(--light);clip-path:polygon(5% 47%,41% 24%,96% 34%,61% 58%)}
.villa i{clip-path:polygon(5% 48%,31% 18%,68% 1%,96% 35%,61% 61%)}
.villa::before{clip-path:polygon(5% 48%,31% 18%,61% 61%,61% 96%,5% 82%)}
.cube{width:1.19em;height:1.19em}
.complex{width:1.36em;height:1.19em}
.complex::before{clip-path:polygon(4% 40%,32% 65%,67% 62%,67% 92%,32% 98%,4% 74%)}
.complex::after{clip-path:polygon(67% 62%,96% 39%,88% 73%,67% 92%)}
.complex i{clip-path:polygon(4% 40%,23% 14%,71% 8%,96% 39%,67% 62%,32% 65%)}
.deed-marker.built{background:none;border:0;padding:0}
.deed-marker .buildings{font-size:clamp(11px,2.15cqw,29px)}
.deed-marker.side-1 .buildings,.deed-marker.side-3 .buildings{flex-direction:column;gap:0}

.deed-marker:not(.built){
  display:grid;place-items:center;width:clamp(16px,5.6cqw,67px);height:clamp(8px,1.6cqw,19px);
  padding:0;border-radius:2px;border-color:#fff5d8;box-shadow:0 1px 3px #0009;
}
.deed-marker:not(.built):is(.side-1,.side-3){
  width:clamp(8px,1.6cqw,19px);height:clamp(16px,5.6cqw,67px);
}
dialog:not(.settings){
  inset:8px 8px auto auto;margin:0;
  width:min(660px,calc(100vw - var(--board-size) - 16px));
  max-height:calc(100dvh - 16px);
}
dialog:not(.settings)::backdrop{background:transparent}
@media(max-width:690px) and (orientation:portrait){
  dialog:not(.settings){
    inset:calc(var(--board-size) + 6px) 6px auto auto;
    width:min(660px,calc(100vw - 12px));
    max-height:calc(100dvh - var(--board-size) - 12px);
  }
}
