/* Магнати — стиль: спокійна темна тема порталу, один акцент, кольори галузей лише на полі */
:root { --bg: #0c0e16; --s1: #141826; --s2: #1b2032; --s3: #242a40; --line: rgba(255, 255, 255, 0.09); --line2: rgba(255, 255, 255, 0.16); --txt: #eceef6; --dim: #9aa1b8; --dim2: #6c7288; --acc: #8b7bff; --acc2: #a597ff; --ok: #4ade80; --bad: #ff5a7a; --gold: #ffd23f; --S: 600px; --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--txt); font-family: 'Rubik', system-ui, sans-serif; font-size: 14px; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
header.top { flex: none; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(12, 14, 22, 0.9); }
header.top h1 { margin: 0; font-size: 18px; font-weight: 900; letter-spacing: 0.04em; }
header.top h1 span { color: var(--gold); }
.back { padding: 7px 12px; white-space: nowrap; border-radius: 10px; background: var(--s2); font-weight: 700; font-size: 13px; color: var(--dim); text-decoration: none; }
.back:hover { background: var(--s3); color: var(--txt); }
.grow { flex: 1; }
.conn { font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim2); }
.conn.on i { background: var(--ok); } .conn.off i { background: var(--bad); } .conn.local i { background: var(--gold); }
.who { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--acc2); max-width: 190px; }
.who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { flex: 1; min-height: 0; position: relative; }
.screen { position: absolute; inset: 0; overflow-y: auto; }

/* ---------- кнопки, картки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-weight: 800; font-size: 14px; white-space: nowrap; transition: background 0.12s, transform 0.08s; }
.btn:hover:not(:disabled) { background: var(--s3); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.pri { background: var(--acc); border-color: var(--acc2); color: #fff; }
.btn.pri:hover:not(:disabled) { background: var(--acc2); }
.btn.ok { background: #1f6f45; border-color: #2f9a62; }
.btn.warn { background: #6b2433; border-color: #9a3347; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.xs { min-height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.btn.full { width: 100%; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 900; }
.card h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.note { color: var(--dim); font-size: 13px; line-height: 1.5; margin: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--dim); font-weight: 700; }
.inp { height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line2); outline: none; }
.inp:focus { border-color: var(--acc); }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.seg button { flex: 1; height: 32px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--dim); }
.seg button.on { background: var(--s3); color: var(--txt); }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); cursor: pointer; }

/* ---------- лобі ---------- */
.lobby { max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.hero { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 18px; background: linear-gradient(120deg, #1a1830, #121626); border: 1px solid var(--line); }
.hero h2 { margin: 0 0 4px; font-size: 22px; font-weight: 900; }
.hero svg { flex: none; width: 74px; height: 74px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rcard { background: var(--s2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rcard b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard .meta { font-size: 12px; color: var(--dim); }
.empty { padding: 26px 10px; text-align: center; color: var(--dim); font-size: 13px; }
@media (max-width: 820px) { .lobby { grid-template-columns: 1fr; } .hero svg { display: none; } }

/* ---------- кімната ---------- */
.roomv { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.code { font-family: ui-monospace, monospace; font-size: 13px; padding: 4px 8px; border-radius: 8px; background: var(--bg); color: var(--dim); }
.plist { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); }
.prow .tok { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 2px solid rgba(255, 255, 255, 0.7); }
.prow .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .st { font-size: 12px; color: var(--dim); }
.prow .st.ok { color: var(--ok); }
.chat { display: flex; flex-direction: column; gap: 8px; }
.msgs { height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.msgs .sys { color: var(--dim2); font-size: 12px; text-align: center; }
.msgs .m b { color: var(--acc2); }
@media (max-width: 820px) { .roomv { grid-template-columns: 1fr; } }

/* ---------- гра ---------- */
.game { position: absolute; inset: 0; display: flex; gap: 12px; padding: 10px; }
.boardWrap { flex: none; display: flex; align-items: center; justify-content: center; }
.board { position: relative; width: var(--S); height: var(--S); display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(7, minmax(0, 1fr)) minmax(0, 1.4fr); grid-template-rows: minmax(0, 1.4fr) repeat(7, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 2px; padding: 2px; border-radius: 14px; background: #070910; border: 1px solid var(--line2); user-select: none; }
.cell { position: relative; background: var(--s1); border-radius: 5px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2px; font-size: max(8.5px, calc(var(--S) * 0.0145)); line-height: 1.15; }
.cell:hover { background: var(--s2); }
.cell .stripe { position: absolute; background: var(--gc, transparent); }
.cell.bot .stripe { left: 0; right: 0; top: 0; height: 18%; }
.cell.top .stripe { left: 0; right: 0; bottom: 0; height: 18%; }
.cell.lft .stripe { top: 0; bottom: 0; right: 0; width: 18%; }
.cell.rgt .stripe { top: 0; bottom: 0; left: 0; width: 18%; }
.cell .nm { font-weight: 700; color: var(--txt); padding: 0 2px; word-break: break-word; }
.cell .pr { color: var(--dim); font-size: 0.92em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cell .ic { width: calc(var(--S) * 0.04); height: calc(var(--S) * 0.04); opacity: 0.85; }
.cell.corner { background: var(--s2); }
.cell.corner .nm { font-size: 1.15em; }
.cell .own { position: absolute; width: calc(var(--S) * 0.022); height: calc(var(--S) * 0.022); border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.85); }
.cell.bot .own { bottom: 3px; right: 3px; } .cell.top .own { top: 3px; right: 3px; } .cell.lft .own { top: 3px; left: 3px; } .cell.rgt .own { top: 3px; right: 3px; }
.cell .lv { position: absolute; display: flex; gap: 2px; }
.cell.bot .lv { top: 2px; left: 50%; transform: translateX(-50%); } .cell.top .lv { bottom: 2px; left: 50%; transform: translateX(-50%); }
.cell.lft .lv { right: 2px; top: 50%; transform: translateY(-50%); flex-direction: column; } .cell.rgt .lv { left: 2px; top: 50%; transform: translateY(-50%); flex-direction: column; }
.cell .lv i { width: calc(var(--S) * 0.012); height: calc(var(--S) * 0.012); border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.cell .lv i.hq { width: calc(var(--S) * 0.022); background: var(--gold); }
.cell.mort { opacity: 0.55; } .cell.mort::after { content: 'ЗАСТАВА'; position: absolute; inset: auto 0 38% 0; font-size: 0.8em; font-weight: 900; color: var(--bad); letter-spacing: 0.06em; }
/* компанії: легкий відтінок галузі; куплена — рамка кольору власника, оренда його кольором */
.cell.co { background: color-mix(in srgb, var(--gc, #fff) 10%, var(--s1)); }
.cell.co:hover { background: color-mix(in srgb, var(--gc, #fff) 18%, var(--s2)); }
.cell.owned { box-shadow: inset 0 0 0 max(2px, calc(var(--S) * 0.0055)) var(--oc); }
.cell.owned .pr { color: var(--oc); font-weight: 800; }
.cell.owned .own { display: none; }
.cell.here { outline: 2px solid var(--acc2); outline-offset: -5px; }
.center { grid-column: 2 / 9; grid-row: 2 / 9; position: relative; min-height: 0; min-width: 0; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #1a1d33, #0f1220 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; gap: calc(var(--S) * 0.016); padding: calc(var(--S) * 0.02); overflow: hidden; }
.logo { font-weight: 900; font-size: calc(var(--S) * 0.05); letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.08); position: absolute; top: 8%; }
.turnline { font-weight: 800; font-size: calc(var(--S) * 0.024); display: flex; align-items: center; gap: 9px; }
.turnline .dot { width: 12px; height: 12px; border-radius: 50%; }
.auclead { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.auclead .ad-av { --fi: -2px; --fw: 2px; }
.timer { width: 60%; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--acc); border-radius: 5px; }
.timer.low i { background: var(--bad); }
.dice { display: flex; gap: calc(var(--S) * 0.016); }
.die { width: calc(var(--S) * 0.075); height: calc(var(--S) * 0.075); border-radius: 18%; background: #f6f3ea; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 6px 14px rgba(0, 0, 0, 0.4); position: relative; }
.die i { position: absolute; width: 18%; height: 18%; border-radius: 50%; background: #1b1d2b; transform: translate(-50%, -50%); }
.dice.rolling .die { animation: dshake 0.17s linear infinite; }
.dice.rolling .die:last-child { animation-delay: -0.08s; }
@keyframes dshake { 0% { transform: rotate(-14deg) translateY(-3px); } 50% { transform: rotate(14deg) translateY(3px) scale(1.06); } 100% { transform: rotate(-14deg) translateY(-3px); } }
.diceRow { position: relative; display: flex; justify-content: center; }
.dsum { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: calc(var(--S) * 0.018); display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; white-space: nowrap; }
.dsum b { font-size: calc(var(--S) * 0.042); font-weight: 900; color: var(--txt); }
.dsum small { font-size: calc(var(--S) * 0.017); font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.dsum.in { animation: sumIn 0.3s ease-out; }
@keyframes sumIn { from { opacity: 0; transform: translateY(-50%) scale(1.6); } }
.acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 92%; }
.acts .btn { min-height: calc(var(--S) * 0.062); font-size: calc(var(--S) * 0.022); }
.info { font-size: calc(var(--S) * 0.02); color: var(--dim); text-align: center; max-width: 88%; line-height: 1.4; }
.info b { color: var(--txt); }
/* стрічка останніх подій у центрі поля */
.feed { display: flex; flex-direction: column; gap: 3px; width: 94%; max-width: 94%; min-height: 3.2em; font-size: calc(var(--S) * 0.0185); line-height: 1.35; }
.lg { display: flex; gap: 6px; align-items: flex-start; color: var(--dim); text-align: left; }
.lg .li { flex: none; display: flex; padding-top: 0.1em; opacity: 0.8; }
.lg .li .ic { width: 1.15em; height: 1.15em; }
.lg b { font-weight: 800; }
.lg b.amt { color: var(--txt); }
.feed .lg:last-child { color: var(--txt); animation: feedIn 0.35s ease-out; }
@keyframes feedIn { from { opacity: 0; transform: translateY(6px); } }
.lg.k-mono { color: var(--gold) !important; } .lg.k-mono .li { color: var(--gold); opacity: 1; }
.lg.k-bank .li, .lg.k-debt .li { color: var(--bad); opacity: 1; }
.lg.k-bank { color: #ffb4c2 !important; }
.lg.hurt .li { color: var(--bad); opacity: 1; } .lg.hurt b.amt { color: #ff8da3; }
.lg.k-buy .li, .lg.k-build .li { color: var(--ok); }
/* фішки */
.tokens { position: absolute; inset: 0; pointer-events: none; }
.token { position: absolute; width: calc(var(--S) * 0.042); height: calc(var(--S) * 0.042); margin: calc(var(--S) * -0.021) 0 0 calc(var(--S) * -0.021); border-radius: 50%; border: 2px solid var(--pc, #fff); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6); transition: left var(--hop, 150ms) ease-in-out, top var(--hop, 150ms) ease-in-out, opacity 0.5s, scale 0.5s; display: flex; align-items: center; justify-content: center; font-size: calc(var(--S) * 0.017); font-weight: 900; color: #10121c; overflow: visible; padding: 0; }
.token .tok-av { --fi: -2.5px; --fw: 2.1px; }
.token.me { box-shadow: 0 0 0 3px rgba(139, 123, 255, 0.7), 0 3px 8px rgba(0, 0, 0, 0.6); }
.token.jail::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px dashed var(--bad); }
/* чий хід — пульсує кільце; у русі — над усіма, з підскоком на коній клітинці */
.token.cur::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid #fff; animation: ring 1.5s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: 0.85; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.5); } }
.token.moving { z-index: 3; }
.token.hop { animation: hop var(--hop, 150ms) ease-out; }
@keyframes hop { 50% { transform: translateY(-42%) scale(1.18); } }
.token.tele { animation: tele 0.45s ease-out; }
@keyframes tele { 0% { opacity: 0; transform: scale(0.2); } 100% { opacity: 1; transform: scale(1); } }
.token.gone { opacity: 0; scale: 0.3; }
/* клітинки спалахують: дійшли, купили, збудували, заклали, зібрали галузь */
.cell.fl-land { animation: flLand 0.6s ease-out; }
@keyframes flLand { 0% { filter: brightness(1.9); } 100% { filter: none; } }
.cell.fl-own { animation: flOwn 1.1s ease-out; z-index: 2; }
@keyframes flOwn { 0% { transform: scale(1.18); filter: brightness(2); } 60% { transform: scale(1.04); } 100% { transform: scale(1); filter: none; } }
.cell.fl-bld { animation: flBld 1.1s ease-out; z-index: 2; }
@keyframes flBld { 0% { transform: scale(1.15); box-shadow: 0 0 0 3px var(--gold), 0 0 18px var(--gold); } 100% { transform: scale(1); } }
.cell.fl-mort { animation: flMort 1s ease-out; }
@keyframes flMort { 0%, 40% { box-shadow: inset 0 0 0 3px var(--bad); } }
.cell.fl-jail { animation: flMort 1.2s ease-out; }
.cell.fl-glow { animation: flGlow 0.65s ease-in-out 2 alternate; z-index: 2; }
@keyframes flGlow { to { transform: scale(1.08); box-shadow: 0 0 0 3px var(--gc), 0 0 22px var(--gc); filter: brightness(1.4); } }
/* шар ефектів: суми, що злітають, і монетки, що летять */
#fxLayer { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; }
.fxPop { position: fixed; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 8px; background: rgba(10, 12, 20, 0.88); font-weight: 900; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; animation: popUp 1.45s ease-out forwards; }
.fxPop.good { color: var(--ok); } .fxPop.bad { color: #ff7d95; }
.fxPop.big { font-size: 19px; padding: 4px 11px; border: 1px solid currentColor; }
.fxPop.card { font-size: 13px; }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.coin { position: fixed; display: flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-radius: 999px; background: linear-gradient(#ffe68a, #f2b53a); color: #3a2603; font-weight: 900; font-size: 13px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55); transform: translate(-50%, -50%); }
.coin i { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; background: #fff3c4; box-shadow: inset 0 0 0 2px #d99a1e; }
/* табличка в центрі: монополія, банкрутство, угода, великий платіж */
.banner { position: absolute; z-index: 6; left: 50%; bottom: 5%; transform: translateX(-50%); width: 88%; padding: calc(var(--S) * 0.018) calc(var(--S) * 0.024); border-radius: 14px; background: rgba(18, 20, 36, 0.97); border: 2px solid var(--bc, var(--acc)); box-shadow: 0 0 24px color-mix(in srgb, var(--bc, var(--acc)) 35%, transparent), 0 14px 32px rgba(0, 0, 0, 0.6); text-align: center; font-weight: 900; font-size: max(13px, calc(var(--S) * 0.026)); line-height: 1.3; cursor: pointer; animation: bannerIn 0.35s cubic-bezier(.2, 1.4, .4, 1); }
.banner small { display: block; margin-top: 3px; font-weight: 600; font-size: 0.72em; color: var(--dim); }
@keyframes bannerIn { from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.92); } }
/* панель збоку */
.side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.players { display: flex; flex-direction: column; gap: 6px; }
.pcard { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); border-left: 3.5px solid var(--pc, var(--line)); cursor: pointer; }
.pcard.cur { border-color: var(--acc); border-left-color: var(--pc, var(--acc)); background: #1a1934; }
.pcard.out { opacity: 0.4; }
.phead { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.pcard .tok { width: 20px; height: 20px; border-radius: 50%; flex: none; border: 2px solid rgba(255, 255, 255, 0.8); }
.pcard .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .nm small { display: block; font-weight: 500; font-size: 11px; color: var(--dim); }
.pcard .cash { font-weight: 800; font-variant-numeric: tabular-nums; }
.pcard .cash.flash { animation: cashflash 0.8s; }
@keyframes cashflash { 0% { color: var(--gold); transform: scale(1.12); } 100% { color: inherit; transform: scale(1); } }
.tabs { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--s1); border: 1px solid var(--line); flex: none; }
.tabs button { flex: 1; height: 34px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--dim); position: relative; }
.tabs button.on { background: var(--s3); color: var(--txt); }
.tabs button .bdg { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; }
.pane { flex: 1; min-height: 0; overflow-y: auto; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); padding: 10px; }
.log { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; }
.log .lg:last-child { color: var(--txt); }
.log .lg .li .ic { width: 15px; height: 15px; }
.grp { margin-bottom: 10px; }
.grp h4 { margin: 0 0 5px; font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--dim); }
.grp h4 i { width: 10px; height: 10px; border-radius: 3px; }
.prop { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: var(--s2); margin-bottom: 4px; cursor: pointer; font-size: 13px; }
.prop .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop .tag { font-size: 11px; color: var(--dim); }
.prop.m { opacity: 0.6; }
.offer { padding: 10px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; line-height: 1.5; }
.offer .row { margin-top: 8px; }
.chatbox { display: flex; gap: 6px; margin-top: 8px; }
.chatbox .inp { flex: 1; min-width: 0; }

/* ---------- вікна ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 12, 0.6); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 14px; }
.mbox { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: var(--s1); border: 1px solid var(--line2); border-radius: 18px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); animation: pop 0.16s ease-out; }
.mbox.wide { width: min(680px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.mbox h2 { margin: 0 0 4px; font-size: 19px; font-weight: 900; }
.deed { border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); margin: 10px 0; }
.deed .hd { padding: 12px; text-align: center; font-weight: 900; font-size: 17px; color: #10121c; }
.deed .hd small { display: block; font-size: 11px; font-weight: 700; opacity: 0.7; letter-spacing: 0.1em; text-transform: uppercase; }
.deed table { width: 100%; border-collapse: collapse; font-size: 13px; }
.deed td { padding: 6px 12px; border-top: 1px solid var(--line); } .deed td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.deed tr.now td { background: rgba(139, 123, 255, 0.14); }
.tcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tcol h3 { margin: 0 0 6px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.tlist { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; margin-bottom: 8px; }
.tlist label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: var(--s2); font-size: 13px; cursor: pointer; }
.tlist label i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tlist label.dis { opacity: 0.4; cursor: default; }
@media (max-width: 520px) { .tcols { grid-template-columns: 1fr; } }
.newsCard { position: absolute; z-index: 5; left: 50%; top: 5%; transform: translateX(-50%); width: 82%; padding: calc(var(--S) * 0.026); border-radius: 14px; background: linear-gradient(160deg, #fff6d8, #f2dca0); color: #2a1d06; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6); text-align: center; font-weight: 700; font-size: max(12.5px, calc(var(--S) * 0.023)); line-height: 1.4; animation: newsIn 0.25s ease-out; cursor: pointer; }
@keyframes newsIn { from { opacity: 0; transform: translate(-50%, -8px); } }
.newsCard small { display: block; font-size: 0.7em; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; }
.newsCard.good { background: linear-gradient(160deg, #e2ffe9, #b6efc6); color: #0c2a17; }
/* підказки в центрі */
.warnTxt { color: #ffb4c2; }
.goodTxt { color: var(--ok); }
/* угоди: хто збере галузь */
.onote { font-size: 12px; margin-top: 4px; font-weight: 700; }
.onote.bad { color: #ffb4c2; } .onote.good { color: var(--ok); }
/* борг */
.debtbar { position: relative; height: 28px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line2); overflow: hidden; margin: 12px 0 10px; }
.debtbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6b2433, #ff5a7a); transition: width 0.4s; }
.debtbar.ok i { background: linear-gradient(90deg, #1f6f45, #4ade80); }
.debtbar span { position: relative; display: block; text-align: center; line-height: 28px; font-weight: 800; font-size: 13px; }
.dlist { display: flex; flex-direction: column; gap: 5px; max-height: 38vh; overflow-y: auto; margin: 12px 0 4px; }
.dopt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); text-align: left; font-size: 13px; font-weight: 700; }
.dopt:hover { background: var(--s3); }
.dopt span small { display: block; font-weight: 500; font-size: 11.5px; color: var(--dim); margin-top: 1px; }
.dopt b { flex: none; color: var(--ok); font-variant-numeric: tabular-nums; }
/* банкрутство: куди пішли гроші */
.lhd { margin: 14px 0 6px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.ledger { display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; font-size: 13px; padding: 10px 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); margin-bottom: 8px; }
.ledger b { font-variant-numeric: tabular-nums; text-align: right; }
.ledger .p { color: var(--ok); } .ledger .m { color: #ff8da3; }
.tip { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(139, 123, 255, 0.1); border: 1px solid rgba(139, 123, 255, 0.3); font-size: 13px; line-height: 1.5; }
.ldet { margin: 0 0 12px; }
.ldet summary { cursor: pointer; font-weight: 800; font-size: 13px; color: var(--acc2); margin-bottom: 8px; }
.auc { position: absolute; z-index: 4; inset: 8%; border-radius: 14px; background: rgba(15, 17, 32, 0.96); border: 1px solid var(--acc); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--S) * 0.014); padding: 12px; text-align: center; }
.auc .big { font-size: calc(var(--S) * 0.05); font-weight: 900; font-variant-numeric: tabular-nums; }
#toasts { position: fixed; z-index: 60; top: 62px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toasts div { padding: 9px 16px; border-radius: 12px; background: rgba(27, 32, 50, 0.97); border: 1px solid var(--line2); font-size: 13px; font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); animation: pop 0.2s; max-width: 92vw; text-align: center; }
.rank { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.rank .prow b { font-variant-numeric: tabular-nums; }

/* ---------- телефон: поле згори, панель знизу ---------- */
.game.tall { flex-direction: column; padding: 6px; gap: 6px; }
.game.tall .side { min-height: 0; gap: 6px; }
/* усі гравці в один рядок, без прокрутки: кружечок, ім'я, гроші під ним */
.game.tall .players { display: grid; grid-template-columns: repeat(var(--np, 4), minmax(0, 1fr)); gap: 4px; flex: none; }
.game.tall .pcard { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 5px 5px 5px 7px; border-radius: 10px; border-left: 4px solid var(--pc, var(--line)); }
.game.tall .phead { gap: 5px; }
.game.tall .pcard .ad-av { --as: 20px !important; --fi: -2px; --fw: 1.8px; }
.game.tall .pcard .ad-av-dot { display: none; }
.game.tall .pcard .tok { display: none; }
.game.tall .pcard .nm { font-size: 11.5px; }
.game.tall .pcard .nm small { display: none; }
.game.tall .pcard .cash { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game.tall .pcard.cur { box-shadow: 0 0 0 1px var(--acc); }
/* поле: назви сховано (тап — картка компанії), ціни й оренда читабельні */
.game.tall .cell .nm { display: none; }
.game.tall .cell .pr { font-size: max(9.5px, calc(var(--S) * 0.023)); font-weight: 700; margin-top: 0; }
.game.tall .cell .ic { width: max(13px, calc(var(--S) * 0.04)); height: max(13px, calc(var(--S) * 0.04)); }
.game.tall .cell.corner .nm { display: block; font-size: max(8px, calc(var(--S) * 0.019)); white-space: nowrap; }
.game.tall .token { width: max(20px, calc(var(--S) * 0.054)); height: max(20px, calc(var(--S) * 0.054)); margin: calc(max(20px, calc(var(--S) * 0.054)) / -2) 0 0 calc(max(20px, calc(var(--S) * 0.054)) / -2); font-size: max(9px, calc(var(--S) * 0.022)); }
/* центр: текст і кнопки під палець */
.game.tall .logo { display: none; }
.game.tall .center { gap: 7px; padding: 8px 6px; }
.game.tall .turnline { font-size: 15px; }
.game.tall .timer { width: 70%; }
.game.tall .die { width: 34px; height: 34px; }
.game.tall .info { font-size: 12.5px; max-width: 98%; line-height: 1.35; }
.game.tall .acts { gap: 6px; max-width: 100%; }
.game.tall .acts .btn { min-height: 40px; font-size: 14px; padding: 0 12px; }
.game.tall .acts .btn.sm { min-height: 34px; font-size: 12.5px; }
.game.tall .feed { font-size: 11.5px; min-height: 0; width: 100%; max-width: 100%; gap: 2px; }
.game.tall .dsum b { font-size: 20px; } .game.tall .dsum small { font-size: 9.5px; }
.game.tall .banner { font-size: 13.5px; padding: 8px 10px; width: 94%; bottom: auto; top: 2%; }
.game.tall .banner small { font-size: 0.78em; }
.game.tall .token.cur::before { inset: -5px; }
.game.tall .newsCard { width: 92%; padding: 10px 12px; }
.game.tall .auc { inset: 2%; gap: 6px; padding: 8px; }
.game.tall .auc .big { font-size: 22px; }
.game.tall .auc .acts .btn { min-height: 38px; font-size: 13px; padding: 0 10px; }
.game.tall .tabs button { height: 32px; font-size: 12.5px; }
.game.tall .log { font-size: 12.5px; }

@media (max-width: 560px) { header.top { gap: 8px; padding: 0 10px; } .conn span { display: none; } .who { max-width: 110px; } header.top h1 { font-size: 16px; } }
