/* Bünzliland (js/boardui.js): a bright, rounded board floating on a deep ocean, neon accents, the
   little house bobbing in the centre. Layered on tableui.css. */
.tb { --accent: #14b8a6; --ink: #0f172a; --paper: #ffffff; --paper2: #f1f5f9; --sea: #0b1530; --sea2: #13224a; --hot: #f43f5e; --sun: #facc15;
	background:
		radial-gradient(700px 420px at 12% 8%, rgba(20, 184, 166, .28), transparent 70%),
		radial-gradient(640px 420px at 92% 18%, rgba(168, 85, 247, .26), transparent 70%),
		radial-gradient(800px 500px at 50% 110%, rgba(244, 63, 94, .2), transparent 70%),
		linear-gradient(180deg, var(--sea2), var(--sea)); }
.tb-title h1, .bd-logo, .bd-deed h3 { font-family: 'Bricolage Grotesque', 'Nunito', sans-serif; }
.tb-title h1 { background: linear-gradient(90deg, #5eead4, #a78bfa 55%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-btn.go { background: linear-gradient(135deg, #14b8a6, #0ea5e9); border-color: transparent; color: #fff; }
.tb-btn.go:hover:not([disabled]) { background: linear-gradient(135deg, #0d9488, #0284c7); }
.tb-card, .tb-rules, .tb-lobby { border-radius: 24px; }

.tb-bar { padding: 6px 14px; }
.bd-overlay, .bd-compose { position: absolute; width: 0; height: 0; }
.bd { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: minmax(0, 1fr); gap: 16px; padding: 12px; height: calc(100dvh - var(--op-bar, 56px) - 46px); box-sizing: border-box; min-height: 480px; }
.bd-boardwrap { min-width: 0; min-height: 0; display: grid; place-items: center; container-type: size; }
.bd-board { position: relative; width: min(100cqw, 100cqh); aspect-ratio: 1; container-type: inline-size; border-radius: 3cqw; padding: .8cqw; box-sizing: border-box;
	background: linear-gradient(135deg, #5eead4, #818cf8 50%, #f472b6); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .25) inset; }
.bd-tiles { position: absolute; inset: .8cqw; display: grid; gap: .45cqw;
	grid-template-columns: 1.6fr repeat(9, 1fr) 1.6fr; grid-template-rows: 1.6fr repeat(9, 1fr) 1.6fr; }

.tb .bd-t { position: relative; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 1cqw; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2cqw;
	background: var(--paper); color: var(--ink); font: 800 1.2cqw/1.05 'Nunito', sans-serif; text-align: center; cursor: pointer; transition: transform .14s, box-shadow .14s;
	box-shadow: 0 .25cqw 0 rgba(15, 23, 42, .12); }
.bd-t:hover { transform: translateY(-.3cqw) scale(1.04); z-index: 3; box-shadow: 0 .8cqw 1.6cqw rgba(15, 23, 42, .3); }
.bd-t:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.bd-t .nm { overflow-wrap: anywhere; hyphens: auto; padding: 0 .15cqw; }
.bd-t .pr { color: #64748b; font-weight: 800; font-size: 1.05cqw; }
.bd-t .ic { display: block; width: 3cqw; height: 3cqw; color: #6366f1; }
.bd-t .ic svg { width: 100%; height: 100%; display: block; }
.bd-t .band { position: absolute; background: var(--g); display: flex; align-items: center; justify-content: center; gap: .25cqw; }
.bd-t .band i { width: .9cqw; height: .9cqw; border-radius: .25cqw; background: #fff; box-shadow: 0 .1cqw .2cqw rgba(0, 0, 0, .35); }
.bd-t .band i.hotel { width: 2.1cqw; height: 1.1cqw; background: var(--hot); }
.bd-t.s, .bd-t.n { padding-block: 2.1cqw .3cqw; }
.bd-t.s .band { inset: 0 0 auto 0; height: 1.8cqw; }
.bd-t.n { padding-block: .3cqw 2.1cqw; }
.bd-t.n .band { inset: auto 0 0 0; height: 1.8cqw; }
.bd-t.e { padding-inline: 2.1cqw .3cqw; }
.bd-t.e .band { inset: 0 auto 0 0; width: 1.8cqw; flex-direction: column; }
.bd-t.w { padding-inline: .3cqw 2.1cqw; }
.bd-t.w .band { inset: 0 0 0 auto; width: 1.8cqw; flex-direction: column; }
.bd-t:not(.street) { padding: .3cqw; }
.bd-t.owned::after { content: ''; position: absolute; pointer-events: none; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 .38cqw var(--o); }
.bd-t.owned { background: color-mix(in srgb, var(--o) 13%, #fff); }
.bd-t.mort { background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 .6cqw, #cbd5e1 .6cqw, #cbd5e1 1.2cqw); color: #64748b; }
.bd-t.buildable .band { animation: bd-glow 1.2s infinite; }
.bd-t.hot { outline: .35cqw solid var(--sun); outline-offset: -.35cqw; z-index: 2; animation: bd-bob 1s ease-in-out infinite; }
@keyframes bd-glow { 50% { filter: brightness(1.35) saturate(1.3); } }
@keyframes bd-bob { 50% { transform: translateY(-.35cqw); } }
.tb .bd-t.corner { font-size: 1.4cqw; gap: .4cqw; background: linear-gradient(160deg, #fff, #e0e7ff); }
.bd-t.corner .ic { width: 4.6cqw; height: 4.6cqw; }
.bd-t.start { --c1: #14b8a6; }
.tb .bd-t.start { background: linear-gradient(160deg, #ccfbf1, #5eead4); }
.bd-t.start .ic { color: #0f766e; }
.tb .bd-t.rest { background: linear-gradient(160deg, #fef9c3, #fde047); }
.bd-t.rest .ic { color: #a16207; animation: bd-spin 8s linear infinite; }
@keyframes bd-spin { to { transform: rotate(360deg); } }
.tb .bd-t.jail, .tb .bd-t.gotojail { background: linear-gradient(160deg, #f1f5f9, #cbd5e1); }
.bd-t.gotojail .ic, .bd-t.jail .ic { color: #334155; }
.bd-t.tax .ic { color: var(--hot); }
.bd-t.card .ic { color: #a855f7; }
.bd-t.port .ic { color: #f59e0b; }
.bd-t.mill .ic { color: #0ea5e9; }

.bd-centre { position: absolute; inset: 13.4%; border-radius: 2.4cqw; background:
		radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .78) 60%),
		linear-gradient(135deg, #ccfbf1, #e0e7ff 50%, #fce7f3);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw; text-align: center; color: var(--ink); padding: 1cqw; overflow: hidden; }
.bd-centre::before { content: ''; position: absolute; inset: auto -10% -30% -10%; height: 45%; background: radial-gradient(ellipse at 50% 0, rgba(14, 165, 233, .25), transparent 70%); pointer-events: none; }
.bd-logo { position: relative; font-size: 6.4cqw; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.bd-logo b { background: linear-gradient(90deg, #0d9488, #6366f1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bd-logo .fin { position: absolute; left: -7cqw; top: -.6cqw; font-size: 5cqw; animation: bd-swim 3.5s ease-in-out infinite; }
@keyframes bd-swim { 50% { transform: translate(1cqw, -.6cqw) rotate(-8deg); } }
.bd-round { font-size: 1.4cqw; font-weight: 900; color: #64748b; letter-spacing: .1em; text-transform: uppercase; }
.bd-pot { padding: .5cqw 1.4cqw; border-radius: 999px; background: #fff; border: 2px solid #fde047; font-weight: 800; font-size: max(11px, 1.5cqw); color: #854d0e; }
.bd-pot.full { background: linear-gradient(90deg, #fef08a, #fde047); animation: bd-pulse 1.6s ease-in-out infinite; }
@keyframes bd-pulse { 50% { box-shadow: 0 0 0 .6cqw rgba(250, 204, 21, .25); } }
.bd-dice { display: flex; gap: 1.6cqw; margin: .4cqw 0; }
.bd-die { width: 6.6cqw; height: 6.6cqw; padding: .8cqw; box-sizing: border-box; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); border-radius: 1.5cqw; background: #fff;
	box-shadow: 0 .45cqw 0 #c7d2fe, 0 1cqw 1.6cqw rgba(15, 23, 42, .25); }
.bd-die i { border-radius: 50%; margin: 12%; }
.bd-die i.on { background: var(--ink); }
.bd-die:last-child i.on { background: var(--hot); }
.bd-die.roll { animation: bd-roll .55s cubic-bezier(.2, 1.3, .5, 1); }
.bd-die.roll:last-child { animation-delay: .06s; }
@keyframes bd-roll { 0% { transform: translateY(-5cqw) rotate(-260deg) scale(.6); } 70% { transform: translateY(.4cqw) rotate(14deg) scale(1.08); } 100% { transform: none; } }
.bd-event { display: flex; align-items: center; gap: 1cqw; max-width: 56cqw; padding: 1cqw 1.4cqw; border-radius: 1.6cqw; background: #fff; border: 2px solid #c4b5fd; box-shadow: 0 .6cqw 1.4cqw rgba(99, 102, 241, .2);
	font-weight: 800; font-size: max(12px, 1.55cqw); text-align: left; animation: bd-popin .35s cubic-bezier(.2, 1.4, .4, 1); }
.bd-event svg { width: 3cqw; min-width: 18px; height: auto; color: #a855f7; flex: none; }
@keyframes bd-popin { from { transform: scale(.6) rotate(-4deg); opacity: 0; } }
.bd-prompt { margin: 0; max-width: 58cqw; font-weight: 800; font-size: max(13px, 1.85cqw); }
.bd-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bd-centre .tb-btn:not(.go), .bd-deed .tb-btn:not(.go) { color: var(--ink); border-color: #cbd5e1; background: #fff; }
.bd-centre .tb-btn:not(.go):hover:not([disabled]), .bd-deed .tb-btn:not(.go):hover:not([disabled]) { background: #f1f5f9; }
.bd-centre .tb-btn { padding: max(7px, .9cqw) max(14px, 1.8cqw); font-size: max(13px, 1.6cqw); }
.bd-clock { width: 30cqw; max-width: 100%; height: 6px; border-radius: 3px; background: rgba(15, 23, 42, .1); overflow: hidden; }
.bd-clock i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #6366f1, #f43f5e); transform-origin: left; animation: bd-clock linear forwards; }
@keyframes bd-clock { from { transform: scaleX(var(--from, 1)); } to { transform: scaleX(0); } }

.bd-pawns, .bd-fx { position: absolute; inset: 0; pointer-events: none; }
.bd-fx { overflow: hidden; border-radius: inherit; z-index: 6; }
.bd-pawn { --c: #999; position: absolute; width: 3.6cqw; height: 3.6cqw; min-width: 18px; min-height: 18px; margin: max(-1.8cqw, -16px); display: grid; place-items: center; border-radius: 50%;
	background: #fff; font-size: 2.2cqw; line-height: 1; border: .35cqw solid var(--c); box-shadow: 0 .4cqw .9cqw rgba(15, 23, 42, .45); transition: left .14s ease-out, top .14s ease-out; z-index: 4; }
.bd-pawn.turn { animation: bd-hop .7s ease-in-out infinite; z-index: 5; box-shadow: 0 0 0 .4cqw rgba(255, 255, 255, .8), 0 .4cqw .9cqw rgba(15, 23, 42, .45); }
@keyframes bd-hop { 50% { transform: translateY(-.7cqw); } }
.bd-money { position: absolute; transform: translate(-50%, -100%); font: 900 max(13px, 2cqw) 'Nunito', sans-serif; padding: .2cqw .9cqw; border-radius: 999px; white-space: nowrap;
	animation: bd-float 1.6s ease-out forwards; box-shadow: 0 .4cqw 1cqw rgba(0, 0, 0, .25); }
.bd-money.up { background: #22c55e; color: #fff; }
.bd-money.down { background: var(--hot); color: #fff; }
@keyframes bd-float { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -120%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -320%); } }
.bd-emote { position: absolute; transform: translate(-50%, -100%); font-size: max(30px, 5cqw); line-height: 1; text-align: center; animation: bd-emote 2.2s ease-out forwards; filter: drop-shadow(0 .4cqw .6cqw rgba(0, 0, 0, .35)); }
.bd-emote small { display: block; font: 800 max(10px, 1.2cqw) 'Nunito', sans-serif; color: #fff; background: rgba(15, 23, 42, .75); border-radius: 999px; padding: .1cqw .7cqw; margin-top: .3cqw; }
@keyframes bd-emote { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 15% { opacity: 1; transform: translate(-50%, -110%) scale(1.25); } 30% { transform: translate(-50%, -120%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -400%) rotate(12deg); } }
.bd-confetti { position: absolute; top: -3%; left: var(--x); width: 1cqw; height: 1.6cqw; border-radius: .2cqw; animation: bd-fall var(--d) ease-in forwards; }
@keyframes bd-fall { to { transform: translateY(110cqw) rotate(var(--r)); opacity: .3; } }

.bd-side { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.bd-players { display: flex; flex-direction: column; gap: 7px; flex: none; }
.bd-p { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: rgba(255, 255, 255, .06);
	border: 1.5px solid rgba(255, 255, 255, .06); transition: background .2s, border-color .2s; }
.bd-p.turn { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.bd-p.out { opacity: .4; filter: grayscale(1); }
.bd-p .dot { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 3px solid var(--c); box-sizing: border-box; font-size: 19px; }
.bd-p .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.bd-p .own { display: flex; flex-wrap: wrap; gap: 3px; min-height: 16px; font-size: 11px; color: #94a3b8; align-items: center; }
.bd-p .own i { min-width: 15px; height: 15px; padding: 0 3px; box-sizing: border-box; display: grid; place-items: center; border-radius: 5px; background: var(--g, #64748b); color: #fff; font: 800 10px 'Nunito', sans-serif; opacity: .75; }
.bd-p .own i.full { opacity: 1; box-shadow: 0 0 0 1.5px #fff; }
.bd-p .own em { font-style: normal; color: var(--sun); }
.bd-p .cash { font-weight: 900; font-size: 15px; color: #5eead4; font-variant-numeric: tabular-nums; }
.bd-p .tb-btn { padding: 4px 10px; font-size: 12px; }

.bd-emotes { display: flex; justify-content: space-between; gap: 4px; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
.tb .bd-emotes button { flex: 1; min-width: 0; padding: 4px 0; border: 0; border-radius: 10px; background: transparent; font-size: 22px; line-height: 1.2; transition: transform .12s, background .12s; }
.tb .bd-emotes button:hover { background: rgba(255, 255, 255, .12); transform: scale(1.2) rotate(-6deg); }
.tb .bd-emotes button:active { transform: scale(.9); }

.bd-feed { flex: 1; min-height: 140px; display: flex; flex-direction: column; border-radius: 18px; background: rgba(0, 0, 0, .25); overflow: hidden; }
.bd-feed ul { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 10px 12px; list-style: none; font-size: 13px; color: #94a3b8; display: flex; flex-direction: column; gap: 3px; }
.bd-feed li.chat { color: #f1f5f9; }
.bd-chat { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.bd-chat input { flex: 1; min-width: 0; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: #fff; font: 700 14px 'Nunito', sans-serif; }

.bd-modal { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 14px; background: rgba(11, 21, 48, .6); backdrop-filter: blur(4px); animation: tb-fade .15s; }
.bd-deed { width: min(350px, 100%); max-height: calc(100dvh - 28px); overflow-y: auto; box-sizing: border-box; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
	display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; animation: bd-popin .3s cubic-bezier(.2, 1.4, .4, 1); }
.bd-deed header { margin: 0 -18px; padding: 18px; background: var(--g, linear-gradient(135deg, #14b8a6, #6366f1)); color: #fff; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.bd-deed h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.bd-deed small { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.bd-deed p { margin: 0; font-weight: 700; font-size: 14px; }
.bd-deed .quip { text-align: center; font-style: italic; color: #6366f1; }
.bd-deed .meta { text-align: center; }
.bd-deed table { width: 100%; border-collapse: collapse; font-weight: 800; font-size: 14px; }
.bd-deed td { padding: 5px 10px; border-bottom: 1px solid #e2e8f0; }
.bd-deed td:last-child { text-align: right; }
.bd-deed tr.now td { background: #ccfbf1; }
.bd-high { font-size: 30px !important; font-weight: 900 !important; text-align: center; }
.bd-high small { font-size: 14px; text-transform: none; letter-spacing: 0; }
.bd-deed .bd-clock { width: 100%; }
.bd-deed.trade { width: min(600px, 100%); }
.bd-swap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bd-swap > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.bd-swap small { color: #64748b; }
.bd-swap .cash { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.bd-swap .cash input { width: 90px; padding: 6px 9px; border-radius: 10px; border: 1px solid #cbd5e1; background: #f8fafc; font: 800 14px 'Nunito', sans-serif; }
.bd .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.bd .chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 9px; background: #f1f5f9; color: var(--ink); border-left: 5px solid var(--g); font-weight: 800; font-size: 13px; }
.bd label.chip { cursor: pointer; }
.bd .chip.off { opacity: .45; cursor: not-allowed; }
.bd-wait { position: fixed; left: 50%; bottom: 16px; z-index: 20; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--sea2); border: 1px solid var(--accent); font-weight: 800; white-space: nowrap; }

@media (max-width: 960px) {
	.bd { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; height: auto; padding: 6px; }
	.bd-boardwrap { container-type: inline-size; }
	.bd-board { width: 100cqw; }
	.bd-t .pr { display: none; }
	.tb .bd-t { font-size: 1.7cqw; }
	.bd-t .ic { width: 3.6cqw; height: 3.6cqw; }
	.bd-logo, .bd-round { display: none; }
	.bd-centre { gap: 5px; padding: 0; }
	.bd-pot { font-size: 11px; }
	.bd-event { font-size: 11px; max-width: 72cqw; }
	.bd-prompt { max-width: 72cqw; font-size: 12px; }
	.bd-centre .tb-btn { padding: 5px 10px; font-size: 12px; }
	.bd-feed { height: 240px; flex: none; }
	.bd-swap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.bd-pawn.turn, .bd-t.hot, .bd-logo .fin, .bd-t.rest .ic, .bd-pot.full { animation: none; }
}
