:root {
  --bg: #15202a; --bg-2: #1b2733; --panel: #203040; --panel-2: #283b4d; --line: #33485c;
  --text: #e9eef2; --muted: #9db0c0; --accent: #f0b43c; --accent-ink: #2a1d00;
  --ok: #2fa774; --danger: #d9534a; --info: #4aa3df;
  --paper: #fbf6ea; --paper-2: #f2e8d3; --paper-line: #c9b994; --ink: #2b2620; --ink-2: #6b5f4f;
  --brick: #7a2e1d; --szansa: #e07a1f; --ryzyko: #23847f;
  --radius: 12px; --shadow: 0 10px 34px rgba(0, 0, 0, .38);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 var(--font); color: var(--text); min-height: 100vh;
  background: radial-gradient(1200px 700px at 25% -10%, #24394d 0%, var(--bg) 60%) fixed, var(--bg);
}
h2 { font: 700 18px/1.2 var(--font); margin: 0 0 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center-t { text-align: center; }
.err { color: #ff8a80; min-height: 1.2em; margin: 10px 0 0; font-size: 14px; }

/* ---------- przyciski / formularze ---------- */
.btn {
  appearance: none; border: 0; border-radius: 10px; padding: .62em 1.05em; cursor: pointer;
  font: 600 14px/1.15 var(--font); background: var(--panel-2); color: var(--text);
  transition: transform .08s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.sm { padding: .45em .8em; font-size: 13px; white-space: nowrap; }
.btn.wide { width: 100%; padding: .8em; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.linkbtn { background: none; border: 0; color: var(--info); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font: 15px var(--font);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 38px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.tight { padding: 12px 14px; }
.card-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }

/* ---------- górny pasek ---------- */
.topbar {
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: rgba(0, 0, 0, .22); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px);
}
.brand { font: 800 22px/1 var(--display); color: var(--accent); white-space: nowrap; }
.brand-ico { font-size: 20px; }
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-info { font: 14px/1.2 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: 0; padding: 6px 8px; border-radius: 8px; cursor: pointer; max-width: 260px; }
.me-info:empty { display: none; }
.me-info:hover { background: rgba(255, 255, 255, .06); }
.me-info:focus-visible { outline: 2px solid var(--accent); }
.me-info b { color: var(--text); }
.conn { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 8px 16px; border-radius: 999px; z-index: 60; font-weight: 600; }
/* podgląd stołu przez administratora (tylko do odczytu) */
.watch-bar { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  background: #1e293b; color: #fff; border: 2px solid var(--accent, #f0b43c); padding: 6px 7px 6px 15px; border-radius: 999px; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); font-size: 14px; }
.watch-bar .wb-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-bar .btn { flex: none; }
body.watching .chat-form { display: none !important; }
.online-h { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.online-h h4 { margin: 0; flex: 1; }
.online-list { display: grid; gap: 6px; margin-bottom: 16px; }
.on-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; }
.on-row .on-main { flex: 1; min-width: 0; }
.on-row .on-nm { font-weight: 700; }
.on-row .on-sub { font-size: 12.5px; color: var(--muted, #6b7280); margin-top: 2px; }
.on-row .on-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; flex: none; }
.on-row .on-dot.off { background: #9ca3af; }
.on-row .btn { flex: none; text-decoration: none; }
@media (max-width: 560px) { .on-row { flex-wrap: wrap; } .on-row .on-main { flex-basis: calc(100% - 20px); } }
body.watching #rack { display: none; }

/* ---------- logowanie ---------- */
.auth { max-width: 400px; margin: 7vh auto 40px; padding: 28px; }
.auth-logo { font: 800 40px/1 var(--display); color: var(--accent); text-align: center; margin-bottom: 10px; }
.tabs { display: flex; background: var(--bg-2); border-radius: 10px; padding: 4px; margin: 18px 0; }
.tabs button { flex: 1; background: none; border: 0; color: var(--muted); padding: 9px; border-radius: 8px; font: 600 14px var(--font); cursor: pointer; }
.tabs button.on { background: var(--panel-2); color: var(--text); }
.auth-done { background: rgba(47, 167, 116, .14); border: 1px solid rgba(47, 167, 116, .5); color: #c9f2dc; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.5; }
.req { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); margin-bottom: 8px; }
.req-main { flex: 1; min-width: 0; }
.req-nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-mail { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* RODO, potwierdzanie e-maila, Moje konto */
.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; margin: 4px 0 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; accent-color: var(--accent); }
.check a, .auth-foot a, .privacy a { color: var(--accent); }
.auth-foot { margin: 14px 0 0; }
.copy { margin: 6px 16px 18px; font-size: 12px; }
.copy a { color: var(--accent); }
.privacy { font-size: 14px; line-height: 1.55; }
.privacy h4 { margin: 16px 0 4px; font-size: 14px; }
.privacy p, .privacy ul { margin: 0 0 6px; }
.privacy ul { padding-left: 20px; }
.privacy .controller { white-space: pre-line; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.acc-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0 0 16px; }
.acc-grid dt { color: var(--muted); }
.acc-grid dd { margin: 0; overflow-wrap: anywhere; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.danger-zone { border: 1px solid rgba(217, 83, 74, .55); border-radius: 10px; padding: 12px 14px; }
.danger-zone h4 { margin: 0 0 6px; color: #ff9b93; font-size: 14px; }
.danger-zone .row { display: flex; gap: 8px; margin-top: 10px; }
.danger-zone .row input { flex: 1; min-width: 0; }
.verify-box { text-align: center; padding: 8px 4px 4px; }
.verify-box .big { font-size: 42px; line-height: 1; margin-bottom: 10px; }
/* panel administratora */
#btn-admin { position: relative; }
#btn-admin .cnt { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font: 800 11px/19px var(--font); box-shadow: 0 0 0 2px var(--bg); }
.modal.admin-modal { width: min(680px, 100%); }
.admin-tabs { margin: 0 0 14px; }
.users-wrap { overflow-x: auto; }
.users-table td:nth-child(2) { color: var(--muted); }
.users-table td.acts { white-space: nowrap; text-align: right; }
.users-table td.acts .btn { margin-left: 4px; }
.adm-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.warn-t { color: var(--accent); font-weight: 600; }
.set-form h4 { margin: 18px 0 8px; font-size: 14px; }
.set-form h4:first-child { margin-top: 0; }
.set-grid { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.set-grid .field { margin: 0; }
.set-form .field { margin-bottom: 10px; }
.set-form textarea { min-height: 70px; resize: vertical; font: inherit; }
.mail-status { border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 10px; }
.mail-status.on { background: rgba(47, 167, 116, .14); border: 1px solid rgba(47, 167, 116, .5); }
.mail-status.off { background: rgba(217, 83, 74, .12); border: 1px solid rgba(217, 83, 74, .5); }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.set-actions input { flex: 1; min-width: 160px; }
.inline-row { display: flex; gap: 8px; }
.inline-row input { flex: 1; min-width: 0; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { text-align: left; }
.seat-count { margin: 16px 0 0; }

/* ---------- lobby ---------- */
.lobby { max-width: 1100px; margin: 24px auto; padding: 0 16px; display: grid; grid-template-columns: 370px 1fr; gap: 20px; align-items: start; }
.lobby-right { display: grid; gap: 20px; }
.tbl { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); margin-bottom: 8px; }
.tbl-main { flex: 1; min-width: 0; }
.tbl-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-meta { font-size: 13px; color: var(--muted); }
.tbl-pl { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pchip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); border-left: 4px solid var(--c, #888); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.badge.wait { background: rgba(47, 167, 116, .2); color: #6fe0ae; }
.badge.play { background: rgba(240, 180, 60, .18); color: var(--accent); }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.stat b { display: block; font-size: 26px; font-family: var(--display); color: var(--accent); }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- poczekalnia ---------- */
.room { max-width: 820px; margin: 24px auto; padding: 0 16px; display: grid; gap: 16px; }
.room-title { font: 800 28px/1.1 var(--display); margin: 0 0 4px; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 18px 0; }
.seat { border-radius: 12px; padding: 14px; background: var(--panel-2); border: 2px solid transparent; display: flex; align-items: center; gap: 10px; min-height: 64px; }
.seat.free { background: transparent; border: 2px dashed var(--line); color: var(--muted); justify-content: center; }
.seat .tokdot { width: 34px; height: 34px; font-size: 15px; }
.seat-nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.invite { display: flex; gap: 8px; margin-top: 10px; }
.invite input { font-size: 13px; }
.room-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.room-feed .feed { height: 180px; }

/* ---------- układ gry ---------- */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 16px; padding: 12px 16px; height: calc(100vh - 56px); }
.board-wrap { display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.feed-card { flex: 1; display: flex; flex-direction: column; min-height: 220px; }
.feed { flex: 1; overflow: auto; font-size: 13px; padding-right: 4px; min-height: 120px; }
.feed > div { padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.f-turn { color: var(--accent); font-weight: 600; padding-top: 7px !important; }
.f-chat { color: #fff; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; }
.chat-form input { padding: 8px 10px; font-size: 14px; }

/* gracze */
.pl { padding: 8px 8px; border-radius: 10px; margin-bottom: 4px; border: 1px solid transparent; }
.pl.cur { background: rgba(240, 180, 60, .1); border-color: rgba(240, 180, 60, .45); }
.pl.out { opacity: .5; }
.pl-top { display: flex; align-items: center; gap: 8px; }
.pl-nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-nm em { font-style: normal; color: var(--muted); font-weight: 400; }
.pl-cash { font-weight: 700; font-variant-numeric: tabular-nums; }
.pl.out .pl-cash { color: var(--danger); }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.tag.warn { background: rgba(217, 83, 74, .2); color: #ff9d94; }
.tokdot {
  width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid #fff; flex: none;
  display: grid; place-items: center; color: #fff; font: 800 12px/1 var(--font); text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.chips { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0 0 34px; }
.chip {
  width: 16px; height: 20px; border-radius: 3px; background: var(--c); border: 0; padding: 0; cursor: pointer;
  font: 800 10px/20px var(--font); color: #fff; text-align: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.chip.m { background: repeating-linear-gradient(45deg, var(--c) 0 3px, #555 3px 6px); opacity: .7; }
.myactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.myactions .btn { flex: 1; }

/* wymiany */
.trade { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.trade.in { border-left: 4px solid var(--accent); }
.trade-h { font-weight: 700; margin-bottom: 4px; }
.trade-row { display: flex; gap: 6px; }
.trade-row > span:first-child { color: var(--muted); min-width: 74px; flex: none; }
.trade-note { font-style: italic; color: #d6e3ee; margin-top: 4px; }
.trade-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.trade-btns .btn { flex: 1; white-space: nowrap; padding: .5em .55em; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 4px; vertical-align: -1px; }

/* ---------- plansza ---------- */
/* scena: kontener jednostek cqw + perspektywa dla widoku 3D */
.stage {
  --tilt: 0deg;
  position: relative; width: min(100%, calc(100vh - 56px - 24px)); container-type: inline-size;
  perspective: 1500px; perspective-origin: 50% 20%;
}
.stage.is3d { --tilt: 30deg; }
.board {
  --U: 12.2;
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  display: grid; grid-template-columns: 1.6fr repeat(9, 1fr) 1.6fr; grid-template-rows: 1.6fr repeat(9, 1fr) 1.6fr;
  gap: 1px; background: var(--paper-line); border: 3px solid #3a2f24; border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5); color: var(--ink);
  user-select: none; transform-style: preserve-3d; transform-origin: 50% 55%;
  transition: transform .7s cubic-bezier(.3, .7, .3, 1), box-shadow .7s;
}
.stage.is3d .board {
  transform: translateY(-3%) rotateX(var(--tilt)) scale(.9);
  box-shadow: 0 .7cqw 0 #5a4634, 0 1.5cqw 0 #3a2f24, 0 2.2cqw 0 #2a2118, 0 6cqw 6cqw rgba(0, 0, 0, .6);
}
.c-br { border-bottom-right-radius: 5px; } .c-bl { border-bottom-left-radius: 5px; }
.c-tl { border-top-left-radius: 5px; } .c-tr { border-top-right-radius: 5px; }
.cell { position: relative; background: var(--paper); display: flex; overflow: hidden; min-width: 0; min-height: 0; }
.cell.ownable { cursor: pointer; }
.cell.ownable:hover { background: #fff; }
.cell.side-b { flex-direction: column; }
.cell.side-t { flex-direction: column-reverse; }
.cell.side-l { flex-direction: row-reverse; }
.cell.side-r { flex-direction: row; }
.band { flex: 0 0 22%; display: flex; align-items: center; justify-content: center; gap: .3cqw; border-color: rgba(0, 0, 0, .25); border-style: solid; border-width: 0; }
.side-b .band { border-bottom-width: 1px; } .side-t .band { border-top-width: 1px; }
.side-l .band { border-left-width: 1px; flex-direction: column; } .side-r .band { border-right-width: 1px; flex-direction: column; }
.body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: .55cqw .35cqw; min-width: 0; min-height: 0; }
.nm { font-size: 1.22cqw; font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; hyphens: auto; }
.pr { font-size: 1.1cqw; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.ico { font-size: 2.5cqw; line-height: 1; }
.side-l .ico, .side-r .ico { font-size: 2cqw; }
.q { width: 3.2cqw; height: 3.2cqw; border-radius: 50%; display: grid; place-items: center; font: 800 2.3cqw/1 var(--display); color: #fff; background: var(--szansa); box-shadow: 0 .2cqw 0 rgba(0, 0, 0, .2); }
.q.r { background: var(--ryzyko); }
.side-l .q, .side-r .q { width: 2.6cqw; height: 2.6cqw; font-size: 1.8cqw; }
/* domki i hotele (kształt z dachem) */
.hs, .ht { display: block; filter: drop-shadow(0 .12cqw 0 rgba(0, 0, 0, .35)); }
.hs::before, .ht::before { content: ''; display: block; width: 100%; height: 100%; clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); }
.hs { width: 1.45cqw; height: 1.45cqw; }
.hs::before { background: linear-gradient(90deg, #2f9e57 0 50%, #23803f 50%); }
.ht { width: 2.8cqw; height: 1.7cqw; position: relative; }
.ht::before { clip-path: polygon(50% 0, 100% 35%, 100% 100%, 0 100%, 0 35%); background: linear-gradient(90deg, #e0524a 0 50%, #b8352e 50%); }
.ht::after { content: 'H'; position: absolute; left: 0; right: 0; bottom: .1cqw; text-align: center; color: #fff; font: 800 .95cqw/1 var(--font); }
.side-l .ht, .side-r .ht { width: 1.7cqw; height: 2.8cqw; }
.band i.drop { animation: houseDrop .5s cubic-bezier(.3, .8, .4, 1.4); }
@keyframes houseDrop { from { transform: translateY(-3cqw) scale(1.4); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
.cell.pulse { animation: cellPulse 1s ease-out; }
@keyframes cellPulse { 0% { box-shadow: inset 0 0 0 .5cqw var(--accent); background: #fff3c4; } 100% { box-shadow: inset 0 0 0 0 transparent; } }
.cell.glow { animation: cellGlow 1.9s ease-in-out; z-index: 2; }
@keyframes cellGlow { 0%, 100% { box-shadow: none; } 25%, 75% { box-shadow: inset 0 0 0 .4cqw #fff, 0 0 2.4cqw .6cqw #ffd54f; background: #fff8de; } }
.cell.wiggle .ico { animation: wiggle .22s ease-in-out 5; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg) scale(1.15); } 75% { transform: rotate(16deg) scale(1.15); } }

.cell.owned::after { content: ''; position: absolute; background: var(--own); }
.side-b.owned::after { left: 0; right: 0; bottom: 0; height: .8cqw; }
.side-t.owned::after { left: 0; right: 0; top: 0; height: .8cqw; }
.side-l.owned::after { top: 0; bottom: 0; left: 0; width: .8cqw; }
.side-r.owned::after { top: 0; bottom: 0; right: 0; width: .8cqw; }
.cell.mortgaged .body { opacity: .4; }
.cell.mortgaged::before {
  content: 'ZASTAW'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); z-index: 1;
  font: 800 1.05cqw/1 var(--font); color: #b3261e; border: .2cqw solid #b3261e; padding: .2cqw .4cqw; background: rgba(255, 255, 255, .85); border-radius: .3cqw;
}
.cell.hl { box-shadow: inset 0 0 0 .35cqw var(--accent); background: #fff6dc; }

.corner { background: var(--paper-2); flex-direction: column !important; align-items: center; justify-content: center; text-align: center; gap: .4cqw; padding: .6cqw; }
.corner .ico { font-size: 4.2cqw; }
.corner .nm { font: 800 1.55cqw/1.1 var(--display); color: var(--brick); }
.corner .pr { font-size: 1.15cqw; white-space: normal; }
.t-start .ico { color: var(--brick); font-weight: 800; }
.t-jail { display: block; padding: 0; }
.jailbox {
  position: absolute; top: 0; right: 0; width: 68%; height: 68%; border-left: .25cqw solid #3a2f24; border-bottom: .25cqw solid #3a2f24;
  background: repeating-linear-gradient(90deg, #e8dcc2 0 1.1cqw, #6b5f4f 1.1cqw 1.4cqw); display: grid; place-items: center;
}
.jailbox span { background: var(--paper); font: 800 1.35cqw/1 var(--display); color: var(--brick); padding: .4cqw .5cqw; border-radius: .3cqw; }
.visit { position: absolute; left: 0; bottom: 0; width: 100%; padding: .5cqw; font-size: 1.05cqw; font-weight: 600; color: var(--ink-2); text-align: left; line-height: 1.15; }

/* ---------- grafika pełna: zabudowa pól, rogi, środek planszy, film budowy ----------
   html.gfx-lite = grafika prosta (jak przed zmianą, lżejsza) — przełącznik 🏙️ w górnym pasku, osobno na każdym urządzeniu */
.lvl, .cimg, .fimg { display: none; }
/* ulica: wolna — działka z klimatem dzielnicy (--dz), kupiona — poziom zabudowy (--lvl); pola specjalne — ilustracja (.fimg) */
.lvl { --lvl: var(--dz); }
html:not(.gfx-lite) .cell .lvl, html:not(.gfx-lite) .cell .fimg {
  display: block; flex: 1 1 0; width: 112%; min-height: 0; margin: .1cqw -6% -.25cqw;
  background: var(--lvl, var(--img)) center / contain no-repeat; filter: drop-shadow(0 .15cqw .2cqw rgba(60, 40, 20, .25));
}
html:not(.gfx-lite) .cell .fimg { background-image: var(--img); }
html:not(.gfx-lite) .cell .fimg + .ico, html:not(.gfx-lite) .cell .fimg + .q { display: none; }
html:not(.gfx-lite) .cell:not(.built) .lvl { opacity: .92; }
html:not(.gfx-lite) .cell.built .pr { display: none; }
.pc-art { text-align: center; margin: -2px 0 8px; }
.pc-art img { width: 130px; height: 130px; object-fit: contain; }
.lvl[data-l="0"] { --lvl: url(img/poziom0.webp?v=1); }
.lvl[data-l="1"] { --lvl: url(img/poziom1.webp?v=1); }
.lvl[data-l="2"] { --lvl: url(img/poziom2.webp?v=1); }
.lvl[data-l="3"] { --lvl: url(img/poziom3.webp?v=1); }
.lvl[data-l="4"] { --lvl: url(img/poziom4.webp?v=1); }
.lvl[data-l="5"] { --lvl: url(img/poziom5.webp?v=1); }
.lvl.grow { animation: lvlGrow .75s cubic-bezier(.3, .8, .4, 1.45); }
@keyframes lvlGrow { from { transform: translateY(35%) scale(.25); opacity: 0; } 55% { opacity: 1; } to { transform: none; } }
/* rogi: ilustracja zamiast emoji, napisy na dole */
html:not(.gfx-lite) .corner:not(.t-jail) { justify-content: flex-end; gap: .2cqw; padding-bottom: .9cqw; }
html:not(.gfx-lite) .corner .cimg { display: block; position: absolute; inset: 3% 6% 26%; background: var(--img) center / contain no-repeat; }
html:not(.gfx-lite) .corner .cimg + .ico { display: none; }
html:not(.gfx-lite) .corner .nm, html:not(.gfx-lite) .corner .pr { position: relative; text-shadow: 0 0 .5cqw var(--paper-2), 0 0 .3cqw var(--paper-2); }
html:not(.gfx-lite) .jailbox {
  background: url(img/rog-areszt.webp?v=1) center 38% / 84% no-repeat, linear-gradient(160deg, #f1e7d0, #e3d3b2);
  place-items: end center; padding-bottom: .7cqw;
}
/* środek: akwarela rynku, przygaszona pod logo i przyciskami */
html:not(.gfx-lite) .center {
  background: radial-gradient(ellipse 60% 56% at 50% 50%, rgba(251, 246, 234, .94) 0%, rgba(251, 246, 234, .84) 52%, rgba(242, 232, 211, .3) 100%),
    url(img/srodek.webp?v=1) center / cover, var(--paper-2);
}
html:not(.gfx-lite) .center .skyline { display: none; }
html:not(.gfx-lite) .logo { text-shadow: 0 .2cqw 0 #fff, 0 0 1.4cqw rgba(255, 250, 240, .9); }
/* film budowy nad polem */
.fx-build { position: absolute; transform: translate(-50%, -58%); display: flex; flex-direction: column; align-items: center; animation: fxBuildIn .35s cubic-bezier(.3, .8, .4, 1.3); transition: opacity .35s, transform .35s; }
.fx-build video { width: 17cqw; height: 17cqw; border-radius: 50%; object-fit: cover; background: #f7e7c8; box-shadow: 0 0 0 .45cqw #fff, 0 1.2cqw 2.6cqw rgba(0, 0, 0, .45); }
.fx-build b { margin-top: -1.5cqw; background: var(--brick); color: #fff; font: 800 max(10px, 1.35cqw)/1 var(--font); padding: .5cqw 1cqw; border-radius: 99px; box-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .3); white-space: nowrap; }
.fx-build.out { opacity: 0; transform: translate(-50%, -58%) scale(.6); }
@keyframes fxBuildIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.3); } }
/* karta pola: rozwój pola */
.pc-levels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin: 0 -8px 12px; }
.pcl { text-align: center; border-radius: 8px; padding: 3px 1px 4px; opacity: .5; filter: saturate(.55); }
.pc-levels:not(:has(.on)) .pcl { opacity: .95; filter: none; }
.pcl img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.pcl span { display: block; font-size: 10px; line-height: 1.1; color: var(--ink-2); font-weight: 600; }
.pcl.on { opacity: 1; filter: none; background: #fff1c9; box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---------- szybkie reakcje (obie gry) ---------- */
.react-bar { display: flex; gap: 4px; margin-top: 8px; }
.rx { appearance: none; flex: 1 1 0; min-width: 0; border: 1px solid var(--line); background: var(--bg-2); border-radius: 9px; padding: 4px 0; font-size: 18px; line-height: 1.15; cursor: pointer; transition: transform .1s, background .15s; }
.rx:hover { background: var(--panel-2); transform: translateY(-1px); }
.rx:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rx.sent { animation: rxSent .45s ease-out; }
@keyframes rxSent { 40% { transform: scale(1.35); } }
.rx-float { position: fixed; z-index: 95; font-size: 40px; line-height: 1; pointer-events: none; transform: translate(-50%, -50%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); animation: rxFloat 2.2s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes rxFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  15% { opacity: 1; transform: translate(-50%, -95%) scale(1.2); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -270%) scale(.9); }
}
.rx-bub { display: inline-block; margin-left: 4px; font-size: 17px; line-height: 1; animation: rxBub 2.6s ease-out forwards; }
@keyframes rxBub { 0% { transform: scale(0); } 12% { transform: scale(1.3); } 22% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
.calm .rx-float { animation-duration: 1.4s; }

.center {
  grid-row: 2 / 11; grid-column: 2 / 11; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #fffaf0 0%, var(--paper-2) 75%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5cqw; padding: 2.2cqw;
}
.skyline { width: 34cqw; height: auto; opacity: .9; }
.logo { font: 800 5.4cqw/1 var(--display); color: var(--brick); letter-spacing: .02em; text-align: center; margin-top: -1cqw; }
.logo small { display: block; font: 600 1.25cqw/1 var(--font); letter-spacing: .35em; color: var(--ink-2); margin-top: .8cqw; text-transform: uppercase; }
.turninfo { display: flex; align-items: center; gap: .8cqw; font-size: max(11px, 1.7cqw); }
.turninfo .tokdot { width: 2.6cqw; height: 2.6cqw; font-size: 1.2cqw; }
.turnsub { font-size: max(10.5px, 1.4cqw); color: var(--ink-2); text-align: center; margin-top: -.8cqw; max-width: 60cqw; }
/* kostki 3D */
.dice { display: flex; gap: 2.4cqw; padding: .6cqw 0 1cqw; }
.die3d { position: relative; width: 6cqw; height: 6cqw; perspective: 32cqw; }
.cube { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.15, .7, .25, 1); }
.cube > .face {
  position: absolute; inset: 0; border-radius: 1.05cqw; padding: .85cqw; backface-visibility: hidden;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  background: radial-gradient(circle at 30% 25%, #fff 0%, #fbf7ee 55%, #e9dfcb 100%);
  box-shadow: inset 0 0 0 .1cqw rgba(0, 0, 0, .1), inset 0 0 .9cqw rgba(120, 90, 40, .18);
}
.cube > .f1 { transform: translateZ(3cqw); }
.cube > .f6 { transform: rotateY(180deg) translateZ(3cqw); }
.cube > .f2 { transform: rotateY(90deg) translateZ(3cqw); }
.cube > .f5 { transform: rotateY(-90deg) translateZ(3cqw); }
.cube > .f3 { transform: rotateX(90deg) translateZ(3cqw); }
.cube > .f4 { transform: rotateX(-90deg) translateZ(3cqw); }
.pip { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; place-self: center; visibility: hidden; background: radial-gradient(circle at 40% 35%, #5a4c3c, #1d1712); box-shadow: inset 0 .1cqw .15cqw rgba(0, 0, 0, .6); }
.f1 .pip.on { background: radial-gradient(circle at 40% 35%, #e0524a, #8f1f19); width: 1.5cqw; height: 1.5cqw; }
.pip.on { visibility: visible; }
.die-shadow { position: absolute; left: 4%; right: 4%; bottom: -1.3cqw; height: 1.5cqw; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 25, 5, .38), transparent); }
.dice.dbl .cube > .face { box-shadow: inset 0 0 0 .3cqw var(--accent), inset 0 0 .9cqw rgba(240, 180, 60, .4); }
.dice.idle .die3d { opacity: .75; }

/* link do Literowni w lobby */
.game-link { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.game-link:hover { border-color: #6fcfb6; transform: translateY(-1px); }
.gl-tiles { display: flex; gap: 4px; flex: 0 0 auto; }
.gl-tiles i { position: relative; width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; font: 700 19px/1 var(--display); font-style: normal; color: #2b2118;
  background: linear-gradient(160deg, #fbf3df, #ecdcb6); box-shadow: inset 0 -3px 0 rgba(120, 90, 40, .32), 0 2px 5px rgba(0, 0, 0, .3); }
.gl-tiles sub { position: absolute; right: 3px; bottom: 3px; font: 700 8px/1 var(--font); }
.gl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gl-main b { font: 700 18px/1.1 var(--display); color: #6fcfb6; }
.gl-main span { font-size: 13px; color: var(--muted); }
.gl-go { font-weight: 700; color: #6fcfb6; white-space: nowrap; }
@media (max-width: 560px) { .gl-tiles i:nth-child(n+2) { display: none; } .gl-go { display: none; } }

/* wsparcie autora (KRS + darowizna) — wspólne z Literownią */
.wsparcie { font-size: 12px; line-height: 1.45; color: var(--ink-2); text-align: center; text-wrap: balance; }
.wsparcie .ws-heart { margin-right: .3em; }
.wsparcie .ws-link { margin-left: .6em; }
.wsparcie b { color: var(--ink); font-weight: 700; }
.wsparcie .ws-krs { user-select: all; letter-spacing: .02em; }
.ws-heart { color: #c2413a; font-size: 1.15em; }
.ws-link { color: var(--brick); font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; white-space: nowrap; }
.ws-link:hover { color: #c2413a; }
@media (max-width: 560px) { .wsparcie.on-board .ws-lead, .wsparcie.on-board .ws-heart { display: none; } .wsparcie.on-board { padding: .5cqw .8cqw; } }
.wsparcie.on-board {
  position: absolute; left: 2cqw; right: 2cqw; bottom: 1.3cqw; z-index: 1;
  font-size: max(10px, 1.2cqw); padding: .7cqw 1.2cqw; border-radius: .9cqw;
  background: rgba(255, 250, 240, .78); border: 1px solid var(--paper-line);
}

.ctl {
  position: relative; z-index: 2; /* przykrywa pasek wsparcia, gdy na małej planszy brakuje miejsca */
  background: #fff; border: 1px solid var(--paper-line); border-radius: 1.3cqw; padding: 1.6cqw 2cqw;
  box-shadow: 0 .6cqw 1.8cqw rgba(60, 40, 10, .15); width: min(100%, 52cqw);
  display: flex; flex-direction: column; gap: 1.1cqw; align-items: center; text-align: center; font-size: max(11px, 1.45cqw);
}
.ctl:empty { display: none; }
.ctl .btn { font-size: max(11px, 1.5cqw); padding: .6em 1em; }
.ctl .btn:not(.primary):not(.ok):not(.danger) { background: #efe5d0; color: var(--ink); }
.ctl .row { display: flex; gap: .8cqw; flex-wrap: wrap; justify-content: center; }
.ctl input { width: 10em; background: #fff; color: var(--ink); border: 1px solid var(--paper-line); padding: .45em .6em; font-size: max(12px, 1.45cqw); }
.ctl .hint { font-size: max(10px, 1.2cqw); color: var(--ink-2); }
/* sterowanie klawiaturą: wyraźnie widać, który przycisk jest wybrany strzałkami */
.ctl .btn:focus-visible, .modal-back .btn:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(37, 99, 235, .22); }
.ctl #bid-input { font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ctl #bid-input:focus { outline: 3px solid #2563eb; outline-offset: 1px; }
.ctl .kbd-hint { opacity: .8; font-size: max(9.5px, 1.05cqw); }
.mini { display: flex; align-items: center; gap: 1cqw; border: 1px solid var(--paper-line); border-radius: .8cqw; padding: .6cqw 1cqw .6cqw .6cqw; background: var(--paper); cursor: pointer; }
.mini-sw { width: 1.6cqw; align-self: stretch; border-radius: .4cqw; background: var(--c); min-height: 3cqw; }
.mini-nm { font-weight: 800; }
.mini-pr { color: var(--ink-2); font-size: .9em; }
.au-bid { font: 800 3.2cqw/1 var(--display); color: var(--brick); }
.au-bar { width: 100%; height: .6cqw; background: #efe5d0; border-radius: 1cqw; overflow: hidden; }
.au-bar i { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.debt-amt { font: 800 2.6cqw/1 var(--display); color: var(--danger); }

.drawn {
  position: absolute; left: 50%; top: 50%; width: 46cqw; z-index: 6; cursor: pointer;
  transform: translate(-50%, -50%); perspective: 110cqw; animation: pop .4s ease-out;
}
/* karta odwracana w 3D: najpierw rewers, potem obrót na awers */
.card3d { position: relative; transform-style: preserve-3d; animation: cardFlip .85s .3s cubic-bezier(.3, .6, .3, 1.15) both; }
@keyframes cardFlip { from { transform: rotateY(-180deg) translateZ(4cqw); } 55% { transform: rotateY(-60deg) translateZ(8cqw) scale(1.05); } to { transform: rotateY(0); } }
.card3d > .face { backface-visibility: hidden; border-radius: 1.6cqw; box-shadow: 0 1.2cqw 4cqw rgba(40, 20, 0, .35); }
.card3d > .front { background: #fff; padding: 2.2cqw 2.4cqw; border-top: 1.2cqw solid var(--dc); }
.card3d > .back {
  position: absolute; inset: 0; transform: rotateY(180deg); color: #fff; display: grid; place-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .12) 0 1cqw, transparent 1cqw 2cqw), var(--dc);
  border: .5cqw solid #fff; outline: .2cqw solid var(--dc);
}
.card3d > .back span { font: 800 10cqw/1 var(--display); text-shadow: 0 .5cqw 0 rgba(0, 0, 0, .2); }
.card3d > .back small { font: 800 2cqw/1 var(--display); letter-spacing: .2em; text-transform: uppercase; }
.drawn .deck { font: 800 2.6cqw/1 var(--display); color: var(--dc); margin-bottom: 1cqw; display: flex; align-items: center; gap: 1cqw; }
.drawn .who { font-size: max(10px, 1.25cqw); color: var(--ink-2); margin-bottom: .6cqw; }
.drawn .txt { font-size: max(12px, 1.9cqw); line-height: 1.35; }
.drawn.fade { opacity: 0; transition: opacity .5s; }
@keyframes pop { from { transform: translate(-50%, -40%) scale(.85); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* pionki: w 2D krążek, w 3D stojąca figurka zwrócona do gracza */
.tokens { position: absolute; inset: 0; pointer-events: none; z-index: 4; transform-style: preserve-3d; transform: translateZ(1px); }
.tok { position: absolute; width: 0; height: 0; transform-style: preserve-3d; transition: left .11s linear, top .11s linear; }
.tok .sh { display: none; }
.pawn {
  position: absolute; left: -1.65cqw; top: -1.65cqw; width: 3.3cqw; height: 3.3cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .5), transparent 48%), var(--c);
  border: .32cqw solid #fff; box-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .45);
  display: grid; place-items: center; transform-origin: 50% 100%;
  transition: transform .7s cubic-bezier(.3, .7, .3, 1);
}
.pawn b { color: #fff; font: 800 1.5cqw/1 var(--font); text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.tok.cur::after { content: ''; position: absolute; left: -2.5cqw; top: -2.5cqw; width: 5cqw; height: 5cqw; border-radius: 50%; border: .3cqw solid var(--c); animation: ring 1.4s ease-out infinite; }
.stage.is3d .tok .sh { display: block; position: absolute; left: -1.7cqw; top: -1.7cqw; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: radial-gradient(closest-side, rgba(20, 10, 0, .55), transparent); }
.stage.is3d .pawn {
  left: -1.45cqw; top: -4.9cqw; width: 2.9cqw; height: 4.9cqw; border: 0; border-radius: 0; background: none; box-shadow: none;
  transform: rotateX(calc(-1 * var(--tilt)));
}
.stage.is3d .pawn::before, .stage.is3d .pawn::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); }
.stage.is3d .pawn::before { /* głowa */
  top: 0; width: 1.85cqw; height: 1.85cqw; border-radius: 50%; border: .16cqw solid #fff;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .85), transparent 40%), radial-gradient(circle at 60% 70%, rgba(0, 0, 0, .35), transparent 70%), var(--c);
}
.stage.is3d .pawn b { /* tułów */
  position: absolute; top: 1.45cqw; left: .25cqw; right: .25cqw; bottom: .55cqw; display: grid; place-items: center; padding-top: .9cqw;
  border-radius: 46% 46% 14% 14% / 62% 62% 12% 12%; border: .16cqw solid #fff; font-size: 1.15cqw;
  background: linear-gradient(90deg, rgba(0, 0, 0, .32), transparent 30%, rgba(255, 255, 255, .45) 46%, transparent 62%, rgba(0, 0, 0, .38)), var(--c);
}
.stage.is3d .pawn::after { /* podstawka */
  bottom: 0; width: 2.9cqw; height: 1.05cqw; border-radius: 50%; border: .16cqw solid #fff;
  background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%, rgba(0, 0, 0, .4)), var(--c);
}
@keyframes ring { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }

/* ---------- okna ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 10, 15, .62); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.modal-h h3 { margin: 0; font: 700 18px/1.2 var(--font); }
.modal-b { padding: 16px 18px 18px; }
.xbtn { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }

.modal.propcard { width: min(360px, 100%); background: var(--paper); color: var(--ink); border: 0; }
.pc-head { background: var(--c); color: #fff; padding: 16px 18px 14px; text-align: center; position: relative; }
.pc-head.light { color: var(--ink); }
.pc-kind { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; font-weight: 700; }
.pc-name { font: 800 22px/1.15 var(--display); margin-top: 4px; }
.pc-head .xbtn { position: absolute; right: 8px; top: 6px; color: inherit; opacity: .8; }
.pc-body { padding: 14px 20px 18px; }
.pc-rows { width: 100%; border-collapse: collapse; font-size: 14px; }
.pc-rows td { padding: 4px 2px; border-bottom: 1px dashed #dccfb2; }
.pc-rows td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-rows tr.now td { background: #fff1c9; }
.pc-foot { font-size: 13px; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }
.pc-status { margin-top: 12px; padding: 10px 12px; background: #fff; border-radius: 10px; font-size: 14px; border: 1px solid #e3d6b8; }
.pc-actions { display: grid; gap: 8px; margin-top: 12px; }
.pc-actions .btn:not(.primary):not(.ok):not(.danger) { background: #e9dec6; color: var(--ink); }
.pc-why { font-size: 12px; color: var(--ink-2); text-align: center; }

.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trade-col h4 { margin: 0 0 8px; font-size: 14px; }
.tp-list { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--bg-2); margin-bottom: 10px; }
.tp { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.tp:hover { background: var(--panel-2); }
.tp input { width: auto; margin: 0; }
.tp-nm { flex: 1; min-width: 0; }
.tp-nm em { color: var(--muted); font-style: normal; font-size: 12px; }
.tp-pr { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tp.dis { opacity: .45; cursor: not-allowed; }
.tp-empty { color: var(--muted); font-size: 13px; padding: 10px; text-align: center; }
.trade-col .field { margin-bottom: 8px; }
.trade-col .field label { font-size: 11px; }

.rules h4 { margin: 16px 0 6px; color: var(--accent); }
.rules ul { padding-left: 20px; margin: 0; }
.rules li { margin-bottom: 6px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th, .price-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.price-table th:first-child, .price-table td:first-child { text-align: left; white-space: normal; }
.price-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.cards-list { display: grid; gap: 6px; }
.cards-list div { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; border-left: 4px solid var(--dc); }
.over-win { text-align: center; font: 800 30px/1.15 var(--display); color: var(--accent); margin: 6px 0 14px; }
.rank { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); margin-bottom: 6px; }
.rank b { flex: 1; }

#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: #10181f; border: 1px solid var(--line); border-left: 4px solid var(--info); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: fadein .2s; }
.toast.error { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }

/* ---------- telefon / wąskie ekrany ---------- */
@media (max-width: 1000px) {
  .game-layout { grid-template-columns: 1fr; height: auto; padding: 8px; }
  .stage { width: 100%; }
  .side { overflow: visible; }
  .feed-card { min-height: 300px; }
}
@media (max-width: 820px) {
  .lobby { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand { font-size: 18px; }
  .topbar { padding: 0 10px; }
  .top-right { gap: 6px; }
  .btn.tgl { min-width: 36px; padding: .45em .55em; }
  .me-info, .hide-sm { display: none; }
  .logo small, .skyline { display: none; }
  .trade-grid, .row2 { grid-template-columns: 1fr; }
  .ctl { width: 100%; padding: 1.4cqw; }
}

/* ---------- przełączniki w pasku ---------- */
.btn.tgl { min-width: 40px; font-weight: 800; }
.btn.tgl.on { border-color: var(--accent); color: var(--accent); }

/* ---------- gotówka: błysk przy zmianie ---------- */
.pl-cash { display: inline-block; }
.pl-cash.up { animation: cashUp .9s ease-out; }
.pl-cash.down { animation: cashDown .9s ease-out; }
@keyframes cashUp { 0% { color: #5cf0a2; transform: scale(1.18); } 100% { transform: none; } }
@keyframes cashDown { 0% { color: #ff7a70; transform: scale(1.18); } 100% { transform: none; } }

/* ---------- efekty ---------- */
.fx-board { position: absolute; inset: 0; pointer-events: none; z-index: 6; transform-style: preserve-3d; transform: translateZ(2px); }

/* kraty aresztu */
.fx-bars { position: absolute; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; border-radius: 10px; }
.fx-bars::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(10, 14, 20, .25), rgba(5, 8, 12, .7)); animation: fadein .3s; }
.bars-grid, .bars-x { position: absolute; animation: barsDown .55s cubic-bezier(.55, 0, .7, 1) both; }
.bars-grid { inset: 0; display: flex; justify-content: space-around; padding: 0 2%; }
.bars-grid i {
  width: 2.3%; height: 100%; border-radius: 1cqw;
  background: linear-gradient(90deg, #22272b 0%, #6f7a83 18%, #e7edf2 40%, #ffffff 46%, #98a3ab 62%, #3a4146 85%, #1b1f22 100%);
  box-shadow: .6cqw 0 1.2cqw rgba(0, 0, 0, .55);
}
.bars-x { left: 0; right: 0; top: 14%; height: 3.2%; background: linear-gradient(180deg, #22272b, #9aa5ad 25%, #f4f7f9 45%, #7d878f 70%, #1b1f22); box-shadow: 0 .6cqw 1.2cqw rgba(0, 0, 0, .55); }
.bars-x.b2 { top: 82%; }
@keyframes barsDown {
  0% { transform: translateY(-105%); } 72% { transform: translateY(1.8%); } 84% { transform: translateY(-1.2%); }
  92% { transform: translateY(.5%); } 100% { transform: translateY(0); }
}
.bars-plate {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 2;
  background: linear-gradient(#fdf4dc, #eadbb6); color: var(--brick); border: .6cqw solid #3a2f24; border-radius: 1.4cqw;
  padding: 1.6cqw 4cqw; box-shadow: 0 1.4cqw 3cqw rgba(0, 0, 0, .55); animation: plateIn .45s .5s cubic-bezier(.3, .8, .4, 1.5) both;
}
.bars-plate b { display: block; font: 800 7cqw/1 var(--display); letter-spacing: .04em; }
.bars-plate span { display: block; font: 700 2.2cqw/1.2 var(--font); color: var(--ink); margin-top: .6cqw; }
@keyframes plateIn { from { transform: translate(-50%, -50%) scale(.3) rotate(-12deg); opacity: 0; } to { transform: translate(-50%, -50%) scale(1) rotate(-3deg); opacity: 1; } }
.fx-bars.up .bars-grid, .fx-bars.up .bars-x { animation: barsUp .45s ease-in both; }
.fx-bars.up .bars-plate, .fx-bars.up::before { animation: fadeout .35s both; }
@keyframes barsUp { from { transform: translateY(0); } to { transform: translateY(-105%); } }
@keyframes fadeout { to { opacity: 0; } }

/* koguty policyjne */
.fx-siren { position: absolute; inset: -1%; z-index: 29; pointer-events: none; border-radius: 12px; animation: siren .32s linear 4; }
@keyframes siren {
  0%, 49% { box-shadow: inset 0 0 7cqw 1.5cqw rgba(255, 35, 35, .75), 0 0 5cqw 1cqw rgba(255, 35, 35, .5); background: radial-gradient(circle at 0% 0%, rgba(255, 40, 40, .35), transparent 55%); }
  50%, 100% { box-shadow: inset 0 0 7cqw 1.5cqw rgba(40, 110, 255, .75), 0 0 5cqw 1cqw rgba(40, 110, 255, .5); background: radial-gradient(circle at 100% 0%, rgba(40, 110, 255, .35), transparent 55%); }
}

/* dymek, napisy, monety, pieczątki */
.fx-bubble {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; z-index: 3;
  background: #fff; color: var(--ink); font: 800 2.4cqw/1 var(--display); padding: 1cqw 1.6cqw; border-radius: 2cqw;
  border: .3cqw solid #1d2a36; box-shadow: 0 .6cqw 1.6cqw rgba(0, 0, 0, .35); animation: bubble 1.2s ease-out both;
}
@keyframes bubble {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  25%, 45%, 65% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 35%, 55% { transform: translate(-50%, -50%) scale(1.05) rotate(4deg); }
  85% { opacity: 1; } 100% { transform: translate(-50%, -70%) scale(1); opacity: 0; }
}
.fx-float {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; z-index: 2;
  font: 800 2.3cqw/1 var(--display); color: #fff; animation: floatUp 1.5s ease-out both;
  text-shadow: 0 0 .3cqw #000, 0 .2cqw .2cqw rgba(0, 0, 0, .7);
}
.fx-float.plus { color: #49e38f; } .fx-float.minus { color: #ff5d52; } .fx-float.gold { color: #ffd54f; }
.fx-float.big { font-size: 3.6cqw; }
@keyframes floatUp { 0% { transform: translate(-50%, -20%) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -260%) scale(1); opacity: 0; } }
.fx-coin {
  position: absolute; width: 2.3cqw; height: 2.3cqw; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 35% 30%, #fffbe0 0%, #ffd94a 35%, #d79b12 72%, #9c6a00 100%);
  border: .2cqw solid #8a5d00; box-shadow: 0 .3cqw .5cqw rgba(0, 0, 0, .35), inset 0 0 0 .25cqw rgba(255, 240, 170, .55);
}
.fx-stamp {
  position: absolute; transform: translate(-50%, -50%) rotate(-14deg); white-space: nowrap; z-index: 2;
  font: 800 2cqw/1 var(--font); letter-spacing: .08em; color: var(--sc); border: .35cqw solid var(--sc);
  padding: .5cqw 1cqw; border-radius: .7cqw; background: rgba(255, 255, 255, .9); animation: stampIn 1.5s ease-out both;
}
@keyframes stampIn {
  0% { transform: translate(-50%, -50%) rotate(-14deg) scale(2.8); opacity: 0; } 16% { transform: translate(-50%, -50%) rotate(-14deg) scale(.9); opacity: 1; }
  24% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 0; }
}

/* baner „Twoja tura!” */
.fx-banner {
  position: absolute; left: 50%; top: 42%; z-index: 31; pointer-events: none; white-space: nowrap;
  font: 800 5.2cqw/1 var(--display); color: #fff; background: var(--bc); padding: 1.6cqw 4.5cqw; border-radius: 1.8cqw;
  border: .5cqw solid #fff; box-shadow: 0 1.4cqw 4cqw rgba(0, 0, 0, .5); text-shadow: 0 .3cqw 0 rgba(0, 0, 0, .3);
  animation: banner 1.7s cubic-bezier(.3, .8, .3, 1) both;
}
@keyframes banner {
  0% { transform: translate(-50%, -50%) perspective(60cqw) rotateX(80deg) scale(.6); opacity: 0; }
  18% { transform: translate(-50%, -50%) perspective(60cqw) rotateX(-10deg) scale(1.08); opacity: 1; }
  28%, 80% { transform: translate(-50%, -50%) perspective(60cqw) rotateX(0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) perspective(60cqw) rotateX(0) scale(.95); opacity: 0; }
}

/* konfetti / fajerwerki */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 55; }

/* efekty wyłączone (localStorage kam_anim = 0) */
.calm .board, .calm .pawn, .calm .cube { transition: none !important; }
.calm .fx-bubble, .calm .fx-float, .calm .fx-stamp, .calm .fx-banner, .calm .card3d, .calm .drawn, .calm .band i.drop,
.calm .cell.pulse, .calm .cell.glow, .calm .cell.wiggle .ico, .calm .tok.cur::after { animation: none !important; }

/* ---------- znajomi, ranking, profil (social.js) ---------- */
#btn-social { position: relative; }
#btn-social .cnt { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font: 800 11px/19px var(--font); box-shadow: 0 0 0 2px var(--bg); }
.modal.soc-modal { width: min(640px, 100%); }
.soc-tabs { margin-top: 0; }
.av { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); font: 700 16px/1 var(--font); color: var(--text); }
.av.sm { width: 24px; height: 24px; font-size: 13px; vertical-align: middle; }
.av.big { width: 64px; height: 64px; font-size: 34px; }
.av-wrap { position: relative; flex: none; display: inline-flex; }
.av-wrap .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #5b6b78; box-shadow: 0 0 0 2px var(--panel); }
.frow.online .dot { background: var(--ok); }
.on-t { color: var(--ok); font-weight: 600; }
.soc-h { margin: 18px 0 8px; font: 700 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.soc-h .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.soc-add { display: flex; gap: 8px; }
.soc-add input { flex: 1; min-width: 0; }
.frow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); margin-bottom: 6px; }
.frow.in { box-shadow: inset 3px 0 0 var(--accent); }
.f-main { flex: 1; min-width: 0; }
.f-sub { font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plink { color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; }
.plink:hover { text-decoration: underline; color: var(--accent); }
[data-profile] { cursor: pointer; }
.soc-note { margin: 14px 0 0; }
.soc-rk { margin-bottom: 12px; }
.soc-table td.who { text-align: left; white-space: nowrap; }
.soc-table td.pos { width: 34px; text-align: center; }
.soc-table th:nth-child(2) { text-align: left; }
.soc-table tr.me td { background: rgba(240, 180, 60, .12); }
.soc-table tr.gap td { text-align: center; color: var(--muted); }
.soc-table .num { text-align: right; }
.av-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.av-pick button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-size: 21px; cursor: pointer; color: var(--text); }
.av-pick button:hover { border-color: var(--muted); }
.av-pick button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.av-pick button.none { font: 700 16px var(--font); }
.soc-pw { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.soc-pw input:first-of-type { grid-column: 1 / -1; }
.soc-pw .btn { justify-self: start; }
.soc-pw .err { grid-column: 1 / -1; margin: 0; }
.pr-head { display: flex; align-items: center; gap: 14px; }
.pr-name { font: 700 20px/1.2 var(--font); }
.pr-games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pr-game { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.pr-g { font-size: 13px; color: var(--muted); font-weight: 600; }
.pr-r { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.pr-r b { font: 800 24px/1 var(--font); }
.pr-r span, .pr-st { font-size: 12px; color: var(--muted); }
.hrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--panel-2); margin-bottom: 5px; font-size: 13px; }
.hrow.win { box-shadow: inset 3px 0 0 var(--accent); }
.h-ico { font-size: 18px; }
.h-main { flex: 1; min-width: 0; }
.h-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.h-d { font-weight: 800; min-width: 38px; text-align: right; }
.d-up { color: var(--ok); }
.d-down { color: var(--danger); }
.soc-invite { text-align: center; }
.soc-invite p { margin: 10px 0 0; font-size: 16px; }
.pl-avatar { margin-right: 2px; }
.rematch-by { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .soc-add { flex-direction: column; }
  .pr-games, .soc-pw { grid-template-columns: 1fr; }
  .frow .btn.sm { padding: 6px 8px; }
}
.temp-pw { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 4px 0 14px; }
.temp-pw code { font: 700 26px/1.2 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .08em; background: var(--bg-2); border: 1px dashed var(--accent); border-radius: 10px; padding: 8px 14px; user-select: all; }

/* ---------- panel admina: kopia danych (server/kopia.js) ---------- */
.kopia-box { padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid rgba(127, 127, 127, .25); }
.kopia-box code { word-break: break-all; }
