/* © 2026 Ardent Realty Group, LLC. All rights reserved. */
/* Uptown Heirs — warm, easy-to-read styling with large type and big buttons */
:root {
  --bg: #f8f1e3; --card: #fffdf8; --ink: #22304a; --muted: #5d6b82; --line: #e6dcc6;
  --gold: #d9a441; --gold-dark: #b07d1f; --teal: #1f8a83; --good: #2a9d58; --bad: #c0443a; --info: #3a6fb8;
  --radius: 18px; --shadow: 0 6px 22px rgba(60, 45, 20, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 19px; line-height: 1.45; color: var(--ink);
  background: radial-gradient(circle at 20% 0%, #fff7e6 0, var(--bg) 45%, #f1e4c9 100%) fixed; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h2 { font-size: 1.35rem; margin-top: 1.2em; }
h3 { font-size: 1.2rem; }
.sub { font-size: .8em; color: var(--muted); font-weight: 500; }
.hint { color: var(--muted); margin: -.2em 0 .6em; }
.screen { display: none; }
.screen.active { display: block; }

/* buttons */
.btn { font: inherit; font-weight: 700; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 14px; padding: .55em 1.1em; cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .choice:focus-visible { outline: 4px solid #ffd23f; outline-offset: 2px; }
.btn.primary { background: linear-gradient(#f2c25a, var(--gold)); border-color: var(--gold-dark); color: #2b1d05; }
.btn.secondary { background: #eef4fb; border-color: #c5d6ec; }
.btn.good { background: linear-gradient(#45b873, var(--good)); border-color: #1f7a44; color: #fff; }
.btn.bad { background: #fff; border-color: #e3b2ad; color: var(--bad); }
.btn.small { font-size: .9rem; padding: .4em .8em; }
.btn.big { font-size: 1.1rem; padding: .7em 1.3em; }
.btn.huge { font-size: 1.4rem; padding: .7em 1.6em; border-radius: 18px; }
.choice { font: inherit; font-weight: 700; min-width: 3.2em; padding: .5em .9em; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.choice.selected { background: var(--teal); color: #fff; border-color: #146660; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; }
.btn-row input[type=number] { font: inherit; width: 5em; padding: .45em; border-radius: 12px; border: 2px solid var(--line); }

/* setup */
.setup-hero { position: relative; height: 300px; overflow: hidden; }
.setup-art { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); }
.setup-art div { background-size: cover; background-position: center; }
.setup-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,25,40,.1), rgba(20,25,40,.75)); }
.setup-title { position: absolute; z-index: 2; left: 0; right: 0; bottom: 22px; text-align: center; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.setup-title h1 { font-size: 3.2rem; }
.tagline { font-size: 1.25rem; max-width: 900px; margin: 0 auto; }
.setup-card { max-width: 1000px; margin: 20px auto 40px; position: relative; z-index: 3; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 34px 30px; }
.player-rows { display: grid; gap: 10px; margin-top: 14px; }
.prow { display: grid; grid-template-columns: 2.2em 1fr auto auto; gap: 12px; align-items: center; background: #fbf6ea; border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.prow .num { font-weight: 800; width: 1.8em; height: 1.8em; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.prow input[type=text] { font: inherit; padding: .45em .6em; border: 2px solid var(--line); border-radius: 10px; width: 100%; }
.swatches { display: flex; gap: 5px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; padding: 0; }
.swatch.sel { box-shadow: 0 0 0 3px var(--ink); }
.swatch.taken { opacity: .25; cursor: not-allowed; }
.ai-toggle { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ai-toggle input { width: 24px; height: 24px; accent-color: var(--teal); }
.setup-actions { display: flex; justify-content: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }

/* game layout */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #24324d; color: #fff; position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.brand { font-size: 1.5rem; font-weight: 800; }
.year-pill, .turn-pill { background: var(--gold); color: #2b1d05; font-weight: 800; padding: .25em .9em; border-radius: 999px; font-size: 1.15rem; }
.turn-pill { background: #e9eef7; }
.spacer { flex: 1; }
.layout { display: grid; grid-template-columns: minmax(560px, 1fr) 440px 380px; gap: 16px; padding: 16px; align-items: start; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 16px; border: 1px solid #efe4cc; }
.map-card { padding: 10px; }
.map-svg { width: 100%; height: auto; display: block; }
.map-title { font-size: 22px; font-weight: 800; fill: #2c4a66; opacity: .75; }
.inset-label { font-size: 15px; font-weight: 700; fill: #2c5d73; }
.city-label { font-size: 13px; font-weight: 800; fill: #fff; letter-spacing: .02em; }
.map-tower { cursor: pointer; }
.map-tower .tower-hl { fill: transparent; }
.map-tower:hover .tower-body { filter: brightness(1.2); }
.map-tower.hl .tower-hl { fill: #ffd23f; animation: pulse 0.9s ease-in-out infinite alternate; }
.map-tower.selected .tower-hl { fill: #2b3a4a; }
.city.hl .city-card-bg { stroke: #ffb800; stroke-width: 6; }
.map-event .ev-bg { stroke: #fff; stroke-width: 3; }
.map-event.benefit .ev-bg { fill: #d6f2df; stroke: #2a9d58; }
.map-event.challenge .ev-bg { fill: #f8dcd8; stroke: #c0443a; }
.ev-icon { font-size: 20px; }
.map-event.hl { filter: url(#glow); }
.map-event.hl .ev-bg { animation: pulse 0.9s ease-in-out infinite alternate; stroke-width: 5; }
@keyframes pulse { from { opacity: 1; } to { opacity: .45; } }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); padding: 6px 8px 0; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.lg.tower { background: #3a78c2; } .lg.good { background: #d6f2df; border: 2px solid var(--good); border-radius: 50%; }
.lg.bad { background: #f8dcd8; border: 2px solid var(--bad); border-radius: 50%; }
.lg.dots { background: radial-gradient(circle, #d64545 40%, transparent 42%); }

/* tower detail */
.tdetail { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.tdetail img, .result-img { width: 100%; border-radius: 12px; display: block; aspect-ratio: 4/3; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stat { background: #f7f0e1; border-radius: 10px; padding: 6px 10px; }
.stat b { display: block; font-size: 1.1rem; }
.stat span { font-size: .82rem; color: var(--muted); }
.owners { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #f1ead9; border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: .92rem; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }

/* wheel */
.wheel-card { text-align: center; }
.wheel-wrap { width: 100%; max-width: 420px; margin: 0 auto; }
#wheel { width: 100%; aspect-ratio: 1; display: block; }
.spin { margin-top: 10px; width: 100%; }
.result-card { min-height: 220px; }
.result-card h2 { margin-top: 0; font-size: 1.5rem; }
.badge { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .06em; padding: .15em .7em; border-radius: 999px; color: #fff; vertical-align: middle; }
.badge.good { background: var(--good); } .badge.bad { background: var(--bad); } .badge.prop { background: var(--info); }
.big-icon { font-size: 3rem; line-height: 1; }
.impact { margin: .5em 0; padding-left: 1.1em; }
.impact li { margin: .2em 0; }
.buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.buy-grid .btn { text-align: left; font-size: 1rem; padding: .5em .7em; }
.buy-grid .btn small { display: block; font-weight: 500; font-size: .85rem; }
.result-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; }
.thinking { color: var(--muted); font-style: italic; }

/* sidebar */
.current { border: 3px solid var(--gold); }
.current .who { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 800; }
.current .who .dot { width: 22px; height: 22px; }
.money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.money div { background: #f7f0e1; border-radius: 12px; padding: 6px 10px; }
.money b { display: block; font-size: 1.25rem; }
.money span { font-size: .85rem; color: var(--muted); }
.board { width: 100%; border-collapse: collapse; font-size: .95rem; }
.board th { text-align: left; color: var(--muted); font-weight: 600; font-size: .82rem; border-bottom: 2px solid var(--line); padding: 4px; }
.board td { padding: 6px 4px; border-bottom: 1px solid #f0e8d6; }
.board tr.me td { background: #fff4d6; font-weight: 700; }
.board td.num, .board th.num { text-align: right; }
.hold { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid #f0e8d6; font-size: .95rem; }
.hold .meta { color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); font-style: italic; }
.log-card ol { list-style: none; padding: 0; margin: 0; max-height: 340px; overflow-y: auto; font-size: .92rem; }
.log-card li { padding: 6px 8px; border-left: 5px solid var(--info); background: #f8f4ea; border-radius: 6px; margin-bottom: 6px; }
.log-card li.good { border-color: var(--good); } .log-card li.bad { border-color: var(--bad); }
.log-card li.buy { border-color: var(--gold); } .log-card li.year { border-color: #8e44ad; background: #f4eefa; }
.log-card li .yr { font-weight: 800; color: var(--muted); margin-right: 4px; }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(20, 25, 40, .55); display: grid; place-items: center; z-index: 50; }
.modal.hidden { display: none; }
.modal-box { background: var(--card); border-radius: 22px; max-width: 760px; width: 92vw; max-height: 88vh; overflow: auto; padding: 26px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-box ul { padding-left: 1.2em; } .modal-box li { margin: .35em 0; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(120px); background: #24324d; color: #fff; padding: 14px 24px; border-radius: 14px; font-size: 1.15rem; font-weight: 700; transition: transform .3s; z-index: 60; box-shadow: var(--shadow); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* end */
.end-card { max-width: 980px; margin: 40px auto; text-align: center; padding: 30px 36px; }
.trophy { font-size: 5rem; }
.end-card h1 { font-size: 2.6rem; }
.board.final { font-size: 1.1rem; margin-top: 20px; text-align: left; }
.board.final td { padding: 10px 6px; }

@media (max-width: 1500px) { .layout { grid-template-columns: 1fr 400px; } .col-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; } .col-side .card { margin-bottom: 0; } }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } .tdetail { grid-template-columns: 1fr; } .prow { grid-template-columns: 2.2em 1fr; } }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.res-head { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; }
.res-head img { width: 100%; border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; display: block; }
.result-card .stats { grid-template-columns: repeat(3, 1fr); }
.event-res { display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.event-res .big-icon { font-size: 4rem; text-align: center; }
@media (max-width: 1250px) { .res-grid { grid-template-columns: 1fr; } }

/* mortgages */
.rate-pill { background: #d9ecff; }
.money .wide { grid-column: 1 / -1; }
.money .hi { background: #fff0c2; }
.hold .loanline { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.fin { background: #eef4fb; border: 2px solid #c5d6ec; border-radius: 12px; padding: 8px 10px; margin-top: 4px; }
.fin .btn-row { margin: 6px 0 4px; }
.fin .choice { padding: .35em .7em; }
.netflow.pos { color: #0d5c2c; font-weight: 800 !important; }
.netflow.neg { color: #8a1c13; font-weight: 800 !important; }
.btn.good .netflow.pos { color: #eaffef; }
.btn.good .netflow.neg { color: #ffe0dc; background: rgba(120,20,10,.35); border-radius: 6px; padding: 0 4px; }
.loanbox { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 10px 0; background: #fffaf0; }
.lb-now { margin: 4px 0 6px; }
.buy-grid .btn small + small { margin-top: 1px; }
.buy-grid.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.buy-grid.wide .btn small { font-size: .9rem; }
.fin { margin-top: 10px; }

/* trading & buy anywhere */
.turn-tools { margin-top: 10px; background: #f7f0e1; border-radius: 14px; padding: 10px 12px; }
.turn-tools .result-actions { margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 200px 1fr; gap: 12px 14px; align-items: center; margin: 10px 0; }
.form-grid > label { font-weight: 700; }
.form-grid select { font: inherit; padding: .45em .6em; border: 2px solid var(--line); border-radius: 10px; width: 100%; background: #fff; }
.form-grid .btn-row { margin-top: 6px; }
.money-in { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.money-in input, .counter input { font: inherit; width: 7em; padding: .4em .5em; border: 2px solid var(--line); border-radius: 10px; }
.summary-box { background: #fffaf0; border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 10px 0; }
.deal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.deal h3 { margin: 0 0 4px; }
.deal ul { margin: 0; padding-left: 1.1em; }
.deal li { margin: .3em 0; }
.bottom-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.bottom-line div { background: #f7f0e1; border-radius: 10px; padding: 6px 10px; }
.bottom-line span { display: block; font-size: .82rem; color: var(--muted); }
.bottom-line b { font-size: 1.15rem; }
.bottom-line .up { background: #dff3e6; } .bottom-line .down { background: #fbe2de; }
.warn { color: var(--bad); font-weight: 700; }
.pass-device { text-align: center; padding: 20px 0; }
.pass-device h2 { font-size: 2rem; }
.pass-device .big-icon { font-size: 5rem; }
.modal-actions.answer .btn { flex: 1; }
.counter { background: #eef4fb; border: 2px solid #c5d6ec; border-radius: 12px; padding: 10px 12px; }
.any-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.btn.any { text-align: left; font-size: 1rem; }
.btn.any small { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); }
.log-card li.trade { border-color: #16a3a3; background: #e9f7f6; }
.log-card li.loan { border-color: #3a6fb8; background: #eef4fb; }
.modal-box { max-width: 900px; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } .deal { grid-template-columns: 1fr; } .bottom-line { grid-template-columns: 1fr 1fr; } }

/* ---- Turn timer ring (v4) ---- */
.timer { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: .5em;
  background: #fffdf7; border: 3px solid #2e7d32; border-radius: 999px; padding: .25em 1em .25em .3em; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.timer.hidden { display: none; }
.timer svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.timer .t-bg { fill: none; stroke: #e6e0d0; stroke-width: 5; }
.timer .t-fg { fill: none; stroke: #2e7d32; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .2s linear, stroke .3s; }
.timer .t-num { position: absolute; left: .3em; width: 58px; text-align: center; font-size: 1.35rem; font-weight: 800; color: #2e7d32; }
.timer .t-label { font-size: 1.15rem; font-weight: 700; color: #333; }
.timer.mid { border-color: #e69500; } .timer.mid .t-fg { stroke: #e69500; } .timer.mid .t-num { color: #b36b00; }
.timer.warn { border-color: #c62828; animation: tpulse 1s infinite; } .timer.warn .t-fg { stroke: #c62828; } .timer.warn .t-num { color: #c62828; }
@keyframes tpulse { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.07); } }
.pause-btn { font-size: .95rem; padding: .25em .6em; white-space: nowrap; }
.board tr.paused td { opacity: .6; }
.board .tag { background: #eee3c4; border-radius: 6px; padding: 0 .35em; font-size: .85em; }
.sub { font-size: .7em; font-weight: 500; color: #666; }
#customUnit { font-size: 1.1rem; padding: .3em .4em; border-radius: 8px; }
.recurring { margin: .4em 0 0; padding: .3em .6em; border-radius: 8px; font-size: 1rem; }
.recurring.neg { background: #fdecea; color: #8e2a22; } .recurring.pos { background: #e7f5ec; color: #1e6b3c; }
