:root {
  --ink: #1d2433;
  --paper: #fffaf0;
  --paper-2: #f4ecd9;
  --coral: #ff5a4e;
  --gold: #ffc928;
  --teal: #12b3a2;
  --blue: #3a86ff;
  --muted: #6b7386;
  --shadow: 0 4px 0 var(--ink);
  --r: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bfe3f7; color: var(--ink); font-family: var(--body); font-weight: 700; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
.hidden { display: none !important; }
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-bottom-right { bottom: calc(2px + var(--safe-b)); opacity: .75; }
.maplibregl-ctrl-attrib { font-size: 10px; font-weight: 500; }

/* ───────── HUD ───────── */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > *, #hud .hud-top > *, #hud .hud-sub > *, .dock > * { pointer-events: auto; }
#hud .hud-top, #hud .hud-sub, #hud .dock { pointer-events: none; }
.hud-top { position: absolute; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; }
.chip { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; min-width: 0; }
.chip:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--c, var(--gold)); border: 2.5px solid var(--ink); }
.me-meta { display: flex; flex-direction: column; min-width: 0; text-align: left; line-height: 1.1; }
.me-meta b { font-family: var(--display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.me-meta small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.xp { height: 5px; width: 100%; min-width: 70px; background: #e4dcc8; border-radius: 9px; overflow: hidden; margin: 2px 0; }
.xp i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .5s; }
.cash-chip { padding: 3px 16px; flex-direction: column; align-items: flex-end; gap: 0; line-height: 1.05; }
.cash-chip b { font-family: var(--display); font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cash-chip small { font-size: 11px; color: #0b8f80; }
.cash-chip.bump b { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.18); color: #0b8f80; } }

.hud-sub { position: absolute; top: calc(66px + var(--safe-t)); left: 10px; right: 64px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: rgba(29, 36, 51, .88); color: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; max-width: 62vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px); }
.pill.jackpot { background: #1f7a3f; }
.ticker { position: absolute; top: calc(96px + var(--safe-t)); left: 10px; right: 64px; font-size: 12px; pointer-events: none !important; }
.ticker span { display: inline-block; background: rgba(255, 250, 240, .92); border-radius: 8px; padding: 3px 9px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: tick 7s forwards; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
@keyframes tick { 0% { opacity: 0; transform: translateY(-6px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.fabs { position: absolute; right: 10px; top: calc(70px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; }
.fabs button, .fab-solo { width: 44px; height: 44px; border-radius: 14px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 20px; position: relative; display: grid; place-items: center; }
.fabs button:active, .fab-solo:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.badge { position: absolute; top: -7px; right: -7px; background: var(--coral); color: #fff; font-style: normal; font-size: 10px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; border: 2px solid var(--ink); padding: 0 3px; }
.fab-solo { position: absolute; left: 10px; bottom: calc(22px + var(--safe-b)); font-size: 22px; font-weight: 800; }
.zoom-hint { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); background: rgba(29,36,51,.85); color: #fff; padding: 8px 14px; border-radius: 12px; font-size: 13px; pointer-events: none !important; }
.banner { position: absolute; left: 50%; top: calc(128px + var(--safe-t)); transform: translateX(-50%); background: var(--gold); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 6px 14px; font-family: var(--display); font-size: 16px; white-space: nowrap; animation: pop .3s; }
.coach { position: absolute; left: 50%; bottom: calc(112px + var(--safe-b)); transform: translateX(-50%); width: min(330px, 88vw); background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: 14px; text-align: center; line-height: 1.3; animation: pop .3s; pointer-events: none !important; }
.coach::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.coach b { color: var(--gold); }
@keyframes pop { from { transform: translateX(-50%) scale(.8); opacity: 0; } }

.dock { position: absolute; left: 0; right: 0; bottom: calc(14px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.roll { display: flex; align-items: center; gap: 10px; background: var(--coral); color: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 8px 26px 8px 16px; min-width: 190px; transition: transform .08s, box-shadow .08s, background .2s; }
.roll:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.roll .die-ico { font-size: 38px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.roll-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.roll-txt b { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.roll-txt small { font-size: 12px; opacity: .92; margin-top: 2px; }
.roll.empty { background: #8d93a3; }
.roll.pending { background: var(--gold); color: var(--ink); }
.roll.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.collect { display: flex; align-items: center; gap: 8px; background: var(--teal); color: #fff; border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); padding: 6px 16px 6px 8px; font-size: 14px; }
.collect:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.collect b { font-family: var(--display); font-size: 17px; }
.collect.full { animation: pulse 1.2s infinite; background: #0d9a53; }
.vault { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff; overflow: hidden; position: relative; }
.vault i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--gold); height: 0%; transition: height .6s; }

/* ───────── deed sheet ───────── */
.sheet { position: fixed; z-index: 8; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); max-width: 430px; margin: 0 auto; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; animation: rise .25s cubic-bezier(.2, 1.2, .4, 1); max-height: 72vh; display: flex; flex-direction: column; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.deed-head { background: var(--tier, #888); color: #fff; padding: 10px 46px 10px 14px; position: relative; text-shadow: 0 1px 0 rgba(0,0,0,.25); border-bottom: 3px solid var(--ink); }
.deed-head.light { color: var(--ink); text-shadow: none; }
.deed-head small { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; opacity: .95; display: block; }
.deed-head h2 { font-family: var(--display); font-size: 22px; line-height: 1.1; margin: 1px 0; font-weight: 800; }
.deed-head p { margin: 0; font-size: 12.5px; opacity: .95; }
.deed-head .lm { position: absolute; right: 44px; top: 8px; font-size: 34px; }
.x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.28); color: #fff; font-size: 16px; display: grid; place-items: center; }
.deed-body { padding: 10px 14px 12px; overflow-y: auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.stat { background: var(--paper-2); border-radius: 12px; padding: 6px 8px; text-align: center; line-height: 1.15; }
.stat small { display: block; font-size: 10.5px; color: var(--muted); }
.stat b { font-family: var(--display); font-size: 17px; }
.stat i { display: block; font-style: normal; font-size: 10px; color: var(--muted); font-weight: 500; }
.owner-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 13.5px; }
.owner-row .avatar { width: 30px; height: 30px; font-size: 16px; }
.owner-row .grow { flex: 1; min-width: 0; }
.tag-s { font-size: 10.5px; background: var(--ink); color: #fff; border-radius: 6px; padding: 1px 6px; }
.tag-s.gold { background: var(--gold); color: var(--ink); }
.ladder { display: flex; gap: 3px; margin: 6px 0 2px; }
.ladder div { flex: 1; text-align: center; font-size: 10px; background: var(--paper-2); border-radius: 8px; padding: 3px 0; color: var(--muted); line-height: 1.2; }
.ladder div b { display: block; font-size: 11px; color: var(--ink); }
.ladder div.on { background: var(--ink); color: #cfd6e6; }
.ladder div.on b { color: #fff; }
.blockbar { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 6px 0; }
.blockbar .pips { display: flex; gap: 3px; }
.blockbar .pips i { width: 14px; height: 14px; clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); background: #d9d0bb; }
.blockbar .pips i.on { background: var(--teal); }
.blockbar .pips i.other { background: var(--coral); }
.note { font-size: 12.5px; color: var(--muted); margin: 6px 0; font-weight: 500; line-height: 1.35; }
.note b { color: var(--ink); }
.actions { display: flex; gap: 8px; margin-top: 8px; }
.btn { flex: 1; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 9px 10px; font-family: var(--display); font-size: 17px; font-weight: 700; background: #fff; line-height: 1.1; text-align: center; }
.btn small { display: block; font-family: var(--body); font-size: 11px; font-weight: 700; opacity: .85; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--coral); color: #fff; }
.btn.gold { background: var(--gold); }
.btn.teal { background: var(--teal); color: #fff; }
.btn.ghost { flex: 0 0 auto; box-shadow: none; border-color: transparent; background: var(--paper-2); font-size: 15px; padding: 9px 12px; }
.btn[disabled] { filter: grayscale(1); opacity: .55; pointer-events: none; }
.slider-row { margin: 8px 0 2px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 12.5px; }
.slider-row label b { font-family: var(--display); font-size: 15px; }
input[type=range] { width: 100%; accent-color: var(--coral); height: 28px; margin: 0; }
.slider-hint { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-weight: 500; }

/* ───────── modal ───────── */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(20, 26, 40, .55); display: grid; place-items: center; padding: 14px; backdrop-filter: blur(3px); }
.modal-card { background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink); width: min(440px, 100%); max-height: min(86vh, 720px); display: flex; flex-direction: column; overflow: hidden; animation: zoom .25s cubic-bezier(.2, 1.3, .4, 1); position: relative; }
@keyframes zoom { from { transform: scale(.85); opacity: 0; } }
.modal-head { padding: 12px 48px 8px 16px; font-family: var(--display); font-size: 22px; font-weight: 800; border-bottom: 2.5px solid var(--ink); background: var(--gold); }
.modal-head .x { background: var(--ink); }
.modal-body { padding: 12px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-body p { margin: 6px 0; font-weight: 500; line-height: 1.4; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { flex: 1; padding: 6px; border-radius: 10px; background: var(--paper-2); font-size: 13px; }
.tabs button.on { background: var(--ink); color: #fff; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 9px; background: var(--paper-2); border-radius: 12px; padding: 7px 10px; text-align: left; width: 100%; font-size: 13.5px; }
.row .avatar { width: 32px; height: 32px; font-size: 17px; }
.row .grow { flex: 1; min-width: 0; line-height: 1.2; }
.row .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .grow small { color: var(--muted); font-weight: 500; font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .num { font-family: var(--display); font-size: 16px; text-align: right; line-height: 1.1; }
.row .num small { display: block; font-family: var(--body); font-size: 10.5px; color: var(--muted); }
.row .rank { width: 22px; font-family: var(--display); font-size: 16px; color: var(--muted); text-align: center; }
.row.me { outline: 2.5px solid var(--ink); background: #fff3c4; }
.row .swatch { width: 10px; align-self: stretch; border-radius: 6px; background: var(--tier); }
.city-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.city { background: #fff; border: 2.5px solid var(--ink); border-radius: 13px; box-shadow: 0 3px 0 var(--ink); padding: 7px 10px; text-align: left; line-height: 1.15; }
.city:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.city b { font-family: var(--display); font-size: 16px; display: block; }
.city small { font-size: 11px; color: var(--muted); }
.search { width: 100%; border: 2.5px solid var(--ink); border-radius: 12px; padding: 9px 12px; font: inherit; background: #fff; margin: 8px 0; outline: none; }
.center { text-align: center; }
.big-emoji { font-size: 64px; line-height: 1; margin: 6px 0; animation: wob 1.2s infinite alternate ease-in-out; display: inline-block; }
@keyframes wob { from { transform: rotate(-6deg); } to { transform: rotate(6deg) scale(1.06); } }
.amount { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; }
.amount.plus { color: #0b8f80; }
.amount.minus { color: var(--coral); }
.help li { margin: 7px 0; font-weight: 500; line-height: 1.35; }
.help ul { padding-left: 4px; list-style: none; margin: 4px 0; }
.help li b { font-weight: 800; }

/* twist card flip */
.flip { perspective: 900px; width: 230px; height: 300px; margin: 6px auto 10px; }
.flip-in { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.flip.open .flip-in { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border: 3px solid var(--ink); border-radius: 18px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; text-align: center; box-shadow: 0 6px 0 var(--ink); }
.flip-front { background: repeating-linear-gradient(45deg, var(--coral) 0 14px, #ff7a6f 14px 28px); color: #fff; font-family: var(--display); font-size: 110px; text-shadow: 0 4px 0 var(--ink); }
.flip-back { background: #fff; transform: rotateY(180deg); }
.flip-back h3 { font-family: var(--display); font-size: 20px; margin: 4px 0; line-height: 1.1; }
.flip-back p { font-size: 13px; font-weight: 500; margin: 2px 0 8px; color: var(--muted); }

/* ───────── dice ───────── */
.dice { position: fixed; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center; gap: 34px; pointer-events: none; perspective: 700px; }
.die { width: 74px; height: 74px; position: relative; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2, .9, .3, 1.05); }
.die i { position: absolute; inset: 0; background: #fff; border: 3px solid var(--ink); border-radius: 14px; background-repeat: no-repeat; }
.dice.out { opacity: 0; transition: opacity .35s .1s; }
.dice.drop .die { animation: drop .45s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes drop { from { margin-top: -60vh; } }
.die .f1 { transform: translateZ(37px); }
.die .f6 { transform: rotateY(180deg) translateZ(37px); }
.die .f2 { transform: rotateY(90deg) translateZ(37px); }
.die .f5 { transform: rotateY(-90deg) translateZ(37px); }
.die .f3 { transform: rotateX(90deg) translateZ(37px); }
.die .f4 { transform: rotateX(-90deg) translateZ(37px); }
.die i { --p: radial-gradient(circle, var(--ink) 0 6.5px, transparent 7.5px); background-size: 20px 20px; }
.die .f1 { background-image: var(--p); background-position: 50% 50%; }
.die .f2 { background-image: var(--p), var(--p); background-position: 20% 20%, 80% 80%; }
.die .f3 { background-image: var(--p), var(--p), var(--p); background-position: 18% 18%, 50% 50%, 82% 82%; }
.die .f4 { background-image: var(--p), var(--p), var(--p), var(--p); background-position: 20% 20%, 80% 20%, 20% 80%, 80% 80%; }
.die .f5 { background-image: var(--p), var(--p), var(--p), var(--p), var(--p); background-position: 18% 18%, 82% 18%, 50% 50%, 18% 82%, 82% 82%; }
.die .f6 { background-image: var(--p), var(--p), var(--p), var(--p), var(--p), var(--p); background-position: 22% 16%, 22% 50%, 22% 84%, 78% 16%, 78% 50%, 78% 84%; }

/* ───────── toasts ───────── */
.toasts { position: fixed; z-index: 30; top: calc(124px + var(--safe-t)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 14px; font-size: 13.5px; max-width: min(92vw, 420px); text-align: center; animation: toast 4.2s forwards; box-shadow: 0 4px 14px rgba(0,0,0,.3); line-height: 1.3; }
.toast.good { background: #0b8f80; }
.toast.bad { background: #c9362c; }
.toast.gold { background: var(--gold); color: var(--ink); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px) scale(.9); } 6%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* ───────── pawns on the map ───────── */
.pawn { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c, #fff); border: 2.5px solid var(--ink); display: grid; place-items: center; box-shadow: -3px 3px 0 rgba(0,0,0,.25); }
.pawn span { transform: rotate(45deg); font-size: 17px; line-height: 1; }
.pawn.me { width: 46px; height: 46px; border-width: 3px; }
.pawn.me span { font-size: 24px; }
.pawn-wrap { pointer-events: none; }
.pawn-wrap.hop .pawn { animation: hop .16s ease-out; }
@keyframes hop { 50% { margin-top: -16px; } }
.pawn-wrap.me::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 30px; height: 10px; margin-left: -15px; border-radius: 50%; background: rgba(29,36,51,.28); animation: shadow 1.6s infinite; }
@keyframes shadow { 50% { transform: scale(1.6); opacity: .1; } }
.pawn-name { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; font-size: 10px; background: rgba(29,36,51,.8); color: #fff; padding: 0 5px; border-radius: 6px; white-space: nowrap; }

/* ───────── welcome ───────── */
.welcome { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 14px; background: radial-gradient(circle at 50% 30%, rgba(20,26,40,.05), rgba(20,26,40,.55)); }
.welcome-card { background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 9px 0 var(--ink); padding: 18px 18px 16px; width: min(440px, 100%); max-height: 92vh; overflow-y: auto; animation: zoom .35s cubic-bezier(.2, 1.3, .4, 1); }
.logo { font-family: var(--display); font-weight: 800; font-size: 52px; line-height: .95; text-align: center; letter-spacing: -1px; }
.logo span { display: inline-block; }
.logo .tw { color: var(--coral); transform: rotate(-5deg) translateY(4px); text-shadow: 3px 3px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); }
.tag { text-align: center; font-weight: 500; margin: 8px 0 12px; }
.field { display: block; margin: 8px 0; font-size: 12.5px; color: var(--muted); }
.field input { display: block; width: 100%; border: 2.5px solid var(--ink); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 17px; background: #fff; margin-top: 3px; outline: none; color: var(--ink); }
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.picker button { width: 38px; height: 38px; border-radius: 11px; background: var(--paper-2); font-size: 20px; border: 2.5px solid transparent; }
.picker button.on { border-color: var(--ink); background: #fff; box-shadow: 0 2px 0 var(--ink); }
.picker.colors button { width: 28px; height: 28px; border-radius: 50%; }
.steps { display: flex; gap: 8px; margin: 10px 0 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.steps div { flex: 1; background: var(--paper-2); border-radius: 12px; padding: 7px 6px; text-align: center; line-height: 1.2; }
.steps div b { display: block; font-size: 22px; }

@media (min-width: 860px) {
  .sheet { left: 16px; right: auto; bottom: 16px; width: 400px; margin: 0; }
  .me-meta b { max-width: 220px; }
  .hud-top { left: 16px; right: 16px; }
  .cash-chip b { font-size: 24px; }
  .fabs { right: 16px; }
  .fab-solo { left: auto; right: 16px; bottom: 30px; }
}
@media (max-height: 620px) {
  .sheet { max-height: 80vh; }
  .ladder { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01s !important; }
}

#map.far .pawn-name { display: none; }
#map.far .pawn-wrap:not(.me) .pawn { width: 24px; height: 24px; border-width: 2px; }
#map.far .pawn-wrap:not(.me) .pawn span { font-size: 12px; }
@media (max-width: 859px) {
  body.sheet-open .dock, body.sheet-open #btn-recenter { display: none; }
}

/* marker over the selected building */
.sel-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--coral, #ff5a4e); border: 2.5px solid #1d2433; transform: translateY(-14px) rotate(-45deg); box-shadow: 0 3px 0 rgba(29,36,51,.25); animation: sel-bob 1s ease-in-out infinite alternate; pointer-events: none; }
.sel-pin::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
@keyframes sel-bob { from { margin-top: 0; } to { margin-top: -7px; } }

/* ── playing together ── */
.drop-pin { display: flex; flex-direction: column; align-items: center; cursor: pointer; animation: sel-bob .7s ease-in-out infinite alternate; filter: drop-shadow(0 3px 0 rgba(29,36,51,.3)); }
.drop-pin span { font-size: 34px; line-height: 1; }
.drop-pin b { font: 800 12px var(--display, system-ui); background: #12b3a2; color: #fff; border: 2px solid #1d2433; border-radius: 9px; padding: 0 6px; margin-top: -4px; }
.pill.drop { background: #12b3a2; color: #fff; }
.ask-pop .maplibregl-popup-content { border: 2.5px solid #1d2433; border-radius: 14px; padding: 8px; background: #fffaf0; box-shadow: 0 4px 0 rgba(29,36,51,.25); font: inherit; text-align: center; }
.ask-pop .maplibregl-popup-content p { margin: 0 0 6px; font-size: 13px; }
.ask-pop .btn { width: 100%; font-size: 14px; padding: 6px 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c9c3b4; margin-right: 5px; }
.dot.on { background: #2fbf5b; box-shadow: 0 0 0 3px rgba(47,191,91,.25); }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.chat .msg { align-self: flex-start; max-width: 88%; background: var(--paper-2, #f3ead8); border-radius: 12px 12px 12px 3px; padding: 5px 9px; font-size: 14px; line-height: 1.25; word-break: break-word; }
.chat .msg.me { align-self: flex-end; background: #1d2433; color: #fff; border-radius: 12px 12px 3px 12px; }
.chat .msg small { display: block; opacity: .65; font-size: 11px; }
.chat-row { display: flex; gap: 6px; margin-top: 8px; }
.chat-row input { flex: 1; min-width: 0; border: 2.5px solid #1d2433; border-radius: 12px; padding: 8px 10px; font: inherit; background: #fff; outline: none; }
.emotes { display: flex; gap: 4px; margin-top: 6px; }
.emotes button { flex: 1; font-size: 20px; padding: 3px 0; border-radius: 10px; background: var(--paper-2, #f3ead8); }
.row .mini { flex: none; font-size: 13px; padding: 5px 10px; }
.tabs.five button { font-size: 12px; padding: 6px 2px; position: relative; }
.tabs .pip { position: absolute; top: -5px; right: -3px; background: #ff5a4e; color: #fff; border-radius: 8px; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 3px; }
.money-in { width: 100%; border: 2.5px solid #1d2433; border-radius: 12px; padding: 10px 12px; font: 800 20px var(--display, system-ui); background: #fff; outline: none; margin: 6px 0; }
