@font-face { font-family: Jost; src: url(fonts/jost.woff2) format('woff2'); font-weight: 100 900; font-display: block; }

:root {
  --brown: #8b4d2e; --lblue: #a9dcf3; --pink: #d0378c; --orange: #f4901e; --red: #e1262c; --yellow: #f8e43a; --green: #1f9d55; --dblue: #1667ae;
  --paper: #f6f1e1; --ink: #161310; --mint: #cfe5d1; --wood: #4a3626; --felt: #2c4a35;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--wood); color: var(--ink); font-family: Jost, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 50% 45%, transparent 55%, rgba(12,7,3,.55)); }
[hidden] { display: none !important; }

/* ---------- the box lid (loader) ---------- */
#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 40%, #6b4d34, #2f2117 75%); perspective: 1400px; transition: background .9s ease .5s; }
#loader.open { background: transparent; pointer-events: none; }
.lid { width: min(78vmin, 560px); aspect-ratio: 1; transform-style: preserve-3d; transition: transform 1.25s cubic-bezier(.6,.02,.3,1), opacity .6s ease .9s; }
#loader.open .lid { transform: translate3d(0, -120vh, 300px) rotateX(38deg) rotateZ(-8deg); opacity: 0; }
.lid-face { position: relative; width: 100%; height: 100%; background: var(--paper); border-radius: 6px; box-shadow: 0 30px 60px rgba(0,0,0,.55), inset 0 0 0 10px var(--paper), inset 0 0 0 13px var(--ink); display: grid; place-items: center; overflow: hidden; }
.lid-face::before { content: ""; position: absolute; inset: 22px; background: var(--mint); border: 2px solid var(--ink); }
.lid-banner { position: relative; transform: rotate(-34deg); background: var(--red); padding: .32em .7em; border: 3px solid var(--ink); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 6px var(--ink); font-size: min(6.2vmin, 48px); }
.lid-banner span { display: block; font-weight: 900; color: #fff; letter-spacing: .02em; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.lid-chips { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.lid-chips i { width: min(5.6vmin, 38px); height: min(3.2vmin, 22px); border: 2px solid var(--ink); background: var(--paper); transition: background .25s; }
.lid-chips i.on { background: var(--c); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
#roll { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 10px 20px 10px 12px; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 5px 0 var(--ink), 0 12px 24px rgba(0,0,0,.35); font-weight: 800; font-size: 20px; letter-spacing: .08em; transition: transform .12s, box-shadow .12s, opacity .3s; }
#roll:hover { transform: translateX(-50%) translateY(-2px); }
#roll:active { transform: translateX(-50%) translateY(4px); box-shadow: 0 1px 0 var(--ink), 0 6px 12px rgba(0,0,0,.3); }
#roll[disabled] { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }
#roll.again b::after { content: " AGAIN"; }
.die { width: 26px; height: 26px; background: #fbf8ef; border: 2px solid var(--ink); border-radius: 6px; position: relative; display: inline-block; flex: none; }
.die::before { content: ""; position: absolute; inset: 0; background-repeat: no-repeat; }
.die[data-v="1"]::before { background-image: radial-gradient(circle, var(--ink) 2.6px, transparent 3.2px); background-size: 100% 100%; }
.die[data-v="2"]::before { background-image: radial-gradient(circle at 28% 28%, var(--ink) 2.6px, transparent 3.2px), radial-gradient(circle at 72% 72%, var(--ink) 2.6px, transparent 3.2px); }
.die[data-v="3"]::before { background-image: radial-gradient(circle at 26% 26%, var(--ink) 2.4px, transparent 3px), radial-gradient(circle, var(--ink) 2.4px, transparent 3px), radial-gradient(circle at 74% 74%, var(--ink) 2.4px, transparent 3px); }
.die[data-v="4"]::before { background-image: radial-gradient(circle at 28% 28%, var(--ink) 2.4px, transparent 3px), radial-gradient(circle at 72% 28%, var(--ink) 2.4px, transparent 3px), radial-gradient(circle at 28% 72%, var(--ink) 2.4px, transparent 3px), radial-gradient(circle at 72% 72%, var(--ink) 2.4px, transparent 3px); }
.die[data-v="5"]::before { background-image: radial-gradient(circle at 26% 26%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 74% 26%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 26% 74%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 74% 74%, var(--ink) 2.3px, transparent 2.9px); }
.die[data-v="6"]::before { background-image: radial-gradient(circle at 28% 22%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 72% 22%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 28% 50%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 72% 50%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 28% 78%, var(--ink) 2.3px, transparent 2.9px), radial-gradient(circle at 72% 78%, var(--ink) 2.3px, transparent 2.9px); }

#sound { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(246,241,225,.7); background: rgba(30,20,12,.45); display: grid; place-items: center; }
#sound svg { width: 22px; height: 22px; fill: none; stroke: var(--paper); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#sound svg path:first-child { fill: var(--paper); }
#sound[aria-pressed="true"] .off, #sound[aria-pressed="false"] .on { display: none; }

#hand { position: absolute; left: 14px; bottom: calc(14px + var(--safe-b)); width: 120px; height: 120px; border: 0; background: none; padding: 0; }
#hand:empty { display: none; }
/* before you own a deed the pile stays out of sight, but the keyboard can still reach every deed through it */
#hand.none { opacity: 0; pointer-events: none; }
#hand.none:focus-visible { opacity: 1; }
#hand .mini.back { background: #fffdf7; }
#hand .mini.back .band { margin: auto 0; background: #fff; }
#hand:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 6px; }
#hand .mini { position: absolute; left: 10px; bottom: 0; width: 64px; height: 88px; transform-origin: 50% 120%; transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
#hand:hover .mini { transform: rotate(var(--r2)) translateY(-6px); }

/* tiny deed used in the hand and the lot */
.mini { background: #fff; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,.35); padding: 4px; display: flex; flex-direction: column; overflow: hidden; }
.mini .band { display: block; background: var(--g, #fff); border: 1px solid var(--ink); text-align: center; font-weight: 800; font-size: 7px; line-height: 1.05; padding: 3px 2px; text-transform: uppercase; letter-spacing: .02em; }
.mini .band.dark { color: #fff; }
.mini img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; margin-top: 3px; }

/* ---------- layers ---------- */
.layer { position: fixed; inset: 0; z-index: 20; }
.btn { border: 3px solid var(--ink); border-radius: 10px; padding: 10px 26px; font-weight: 800; font-size: 18px; letter-spacing: .1em; box-shadow: 0 4px 0 var(--ink); background: var(--paper); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.buy { background: var(--green); color: #fff; }

/* the title deed */
#deed { display: grid; place-items: center; pointer-events: none; perspective: 1600px; }
#deed .deed-wrap { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; transform: translateX(var(--dx, 22vw)); max-height: 100%; padding: 14px 0; }
.deed-card { position: relative; width: min(340px, 84vw); transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.25,.5,1); }
#deed.in .deed-card { transform: rotateY(0) translateY(0); }
#deed .deed-card { transform: rotateY(180deg) translateY(30px); }
.deed-front, .deed-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fffdf7; border-radius: 8px; box-shadow: 0 24px 50px rgba(0,0,0,.5); padding: 14px; }
.deed-back { position: absolute; inset: 0; transform: rotateY(180deg); display: grid; place-items: center; }
.deed-back::before { content: ""; position: absolute; inset: 14px; border: 1.5px solid var(--ink); }
.deed-inner { border: 1.5px solid var(--ink); padding: 8px 10px 10px; max-height: min(66vh, 600px); overflow-y: auto; overscroll-behavior: contain; }
.deed-head { background: var(--g); border: 1.5px solid var(--ink); text-align: center; padding: 6px 6px 8px; margin-bottom: 8px; }
.deed-head small { display: block; font-size: 10px; letter-spacing: .22em; font-weight: 600; }
.deed-head h2 { margin: 2px 0 0; font-size: 21px; line-height: 1.02; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.deed-head.dark { color: #fff; }
.deed-head.rail { background: #fff; }
.deed-art { display: block; width: 62%; margin: 0 auto 6px; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.rows { margin: 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.35; }
.rows li { display: flex; gap: 6px; align-items: baseline; padding: 1px 0; }
.rows li b { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.rows li i { flex: 1; border-bottom: 1.5px dotted rgba(22,19,16,.55); transform: translateY(-3px); min-width: 14px; }
.rows li span { text-align: right; max-width: 68%; }
.fine { font-size: 11.5px; line-height: 1.4; text-align: center; margin: 9px 2px 0; font-style: italic; }
.deed-tap { display: block; margin: 10px auto 0; }

/* chance / community chest card */
#draw { display: grid; place-items: center; background: rgba(20,12,6,.25); }
.drawn-card { width: min(420px, 86vw); aspect-ratio: 1.6; border: 0; border-radius: 10px; padding: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.5); transform: rotateZ(-4deg) scale(.6); opacity: 0; transition: transform .55s cubic-bezier(.3,1.4,.5,1), opacity .25s; display: grid; }
#draw.in .drawn-card { transform: rotateZ(-2deg) scale(1); opacity: 1; }
.drawn-card .in { border: 2px solid var(--ink); border-radius: 4px; display: grid; grid-template-columns: 30% 1fr; align-items: center; gap: 10px; padding: 10px; text-align: left; }
.drawn-card.chance { background: #f4a23a; }
.drawn-card.chest { background: #f9e27a; }
.drawn-card .glyph { font-size: min(88px, 20vw); font-weight: 900; line-height: 1; text-align: center; color: var(--red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.drawn-card.chest .glyph svg { width: 100%; height: auto; }
.drawn-card h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: .25em; font-weight: 700; }
.drawn-card p { margin: 0; font-size: clamp(18px, 4.4vw, 24px); font-weight: 800; line-height: 1.12; text-transform: uppercase; }

/* sheets (case study, jail, parking) */
.sheet { background: #3b2a1c; background-image: repeating-linear-gradient(92deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px), repeating-linear-gradient(88deg, rgba(0,0,0,.08) 0 1px, transparent 1px 23px), radial-gradient(120% 80% at 50% 0%, #5c4330, #2b1d12); animation: sheetIn .35s ease; }
@keyframes sheetIn { from { opacity: 0; } }
.sheet .scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 64px 16px calc(40px + var(--safe-b)); }
.close { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); font-size: 30px; line-height: 1; box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; padding: 0 0 4px; }

.table-top { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; align-items: start; }
.pinned { position: sticky; top: 0; }
.pinned .deed-front { transform: rotate(-2.5deg); box-shadow: 0 18px 30px rgba(0,0,0,.45); }
.pinned .deed-inner { max-height: none; }
.work { background: var(--paper); border-radius: 4px; box-shadow: 0 20px 40px rgba(0,0,0,.45); padding: 26px 30px 34px; min-width: 0; }
.work-head { border-bottom: 3px solid var(--ink); padding-bottom: 12px; margin-bottom: 14px; display: flex; gap: 12px; align-items: stretch; }
.work-head .swatch { width: 14px; flex: none; background: var(--g); border: 2px solid var(--ink); }
.work-head h1 { margin: 0; font-size: clamp(28px, 4.6vw, 48px); line-height: 1; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.work-head p { margin: 6px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .2em; }
/* the kit's real work, set in the board's type */
.work .kit { --ab-fg: var(--ink); --ab-muted: #4a3f33; --ab-accent: var(--ink); --ab-chrome: 140px; }
.work .ab-lede { font-size: clamp(17px, 2vw, 20px); line-height: 1.45; max-width: 46em; }
.work .ab-heading { font-size: 13px; letter-spacing: .2em; font-weight: 700; text-transform: uppercase; margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.work .ab-heading::after { content: ""; flex: 1; border-top: 1.5px solid var(--ink); }
.work .ab-text { font-size: 16px; line-height: 1.5; max-width: 46em; }
.work .ab-frame { border: 2px solid var(--ink); border-radius: 3px; background: #111; }
.work .ab-media figcaption { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink); }
.work .ab-image img { background: #e9e3cf; border: 2px solid var(--ink); border-radius: 2px; }
.work .ab-audio { background: #efe8d2; border: 2px solid var(--ink); border-radius: 6px; padding: 8px 10px; }
.work .ab-audio figcaption { margin: 0 0 6px; }
.work .ab-credits { border-top: 1.5px solid var(--ink); padding-top: 10px; font-size: 13px; letter-spacing: .02em; }
.next-up { margin-top: 30px; display: flex; justify-content: flex-end; }

/* jail = about */
.jail-card { max-width: 640px; margin: 0 auto; background: var(--paper); border-radius: 6px; box-shadow: 0 20px 40px rgba(0,0,0,.45); padding: 16px; }
.jail-card .in { border: 2px solid var(--ink); padding: 0 0 22px; }
.jail-bars { background: var(--orange); border-bottom: 2px solid var(--ink); height: 120px; position: relative; display: grid; place-items: center; background-image: repeating-linear-gradient(90deg, transparent 0 26px, var(--ink) 26px 32px); }
.jail-bars span { background: var(--orange); border: 2px solid var(--ink); padding: 4px 14px; font-weight: 800; font-size: 26px; letter-spacing: .12em; }
.jail-card h1 { text-align: center; margin: 18px 12px 2px; font-size: clamp(30px, 7vw, 46px); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.jail-card .role { text-align: center; margin: 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.jail-card .bio { text-align: center; margin: 14px auto 0; max-width: 30em; font-size: 17px; line-height: 1.45; padding: 0 16px; }
.jail-card .rows { max-width: 420px; margin: 18px auto 0; padding: 0 16px; font-size: 15px; }
.jail-card .rows a { color: var(--ink); }
.jail-card h4 { text-align: center; margin: 24px 0 6px; font-size: 12px; letter-spacing: .24em; }

/* free parking = every deed */
.lot { max-width: 1100px; margin: 0 auto; }
.lot-head { text-align: center; color: var(--paper); margin: 0 0 18px; }
.lot-head svg { width: 92px; height: auto; }
.lot-head h1 { margin: 4px 0 0; font-weight: 800; letter-spacing: .1em; font-size: 26px; }
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.lot-grid .mini { height: auto; padding: 6px; cursor: pointer; transition: transform .2s; border-radius: 6px; }
.lot-grid .mini:hover { transform: translateY(-4px) rotate(-1deg); }
.lot-grid .mini .band { font-size: 11px; padding: 6px 4px; }
.lot-grid .mini .cl { font-size: 10px; text-align: center; letter-spacing: .14em; font-weight: 600; margin-top: 4px; text-transform: uppercase; }
.lot-grid .mini { position: relative; }
.lot-grid .mini.owned { outline: 3px solid var(--paper); outline-offset: 2px; }


@media (max-width: 760px) {
  #deed { align-items: end; }
  #deed .deed-wrap { transform: none; padding-bottom: calc(16px + var(--safe-b)); }
  .deed-inner { max-height: 52vh; }
  .deed-head h2 { font-size: 19px; }
  .deed-art { width: 46%; }
  .table-top { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pinned { display: none; }
  .work { padding: 18px 14px 24px; }
  #roll { font-size: 18px; padding: 9px 16px 9px 10px; }
  #hand { width: 96px; height: 100px; }
  #hand .mini { width: 52px; height: 72px; }
  .lot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
/* phone: the side of the board you're on, laid out big under the board */
#strip { display: none; }
@media (max-width: 760px) {
  #strip { display: flex; position: absolute; left: 0; right: 0; top: 60%; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 6px 16px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; transition: opacity .3s; touch-action: pan-x; }
  #strip::-webkit-scrollbar { display: none; }
  #strip.off { opacity: 0; pointer-events: none; }
  #strip .mini { flex: none; width: 104px; height: auto; padding: 5px; border-radius: 6px; scroll-snap-align: start; cursor: pointer; }
  #strip .mini .band { font-size: 9px; padding: 4px 3px; min-height: 2.6em; display: grid; place-items: center; }
  #strip .mini.here { outline: 3px solid #fff; outline-offset: 2px; }
  #hand { bottom: calc(86px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; animation-duration: .01s !important; } }

#peek { position: fixed; left: 0; top: 0; z-index: 15; width: 170px; pointer-events: none; }
#peek .mini { padding: 7px; border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 16px 30px rgba(0,0,0,.45); }
#peek .mini .band { font-size: 12px; padding: 6px 4px; }
#peek .mini .cl { font-size: 10px; text-align: center; letter-spacing: .14em; font-weight: 600; margin-top: 4px; }

button:focus:not(:focus-visible) { outline: none; }
.close:focus:not(:focus-visible) { outline: none; }
#deed .fine { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
button.mini { font: inherit; color: var(--ink); text-align: inherit; margin: 0; -webkit-appearance: none; appearance: none; }
button.mini:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
.mini .cl { display: block; }
