:root {
  --wood-0: #1d130c; --wood-1: #2a1b11; --wood-2: #3b2717; --wood-3: #5a3c22;
  --paper: #f1e2c2; --paper-2: #e6d0a3; --paper-3: #d4b77f; --ink: #2b1d12; --ink-2: #5c4430;
  --brass: #c99a3d; --brass-2: #f0c96b; --red: #a8322a; --green: #3f6b3a; --blue: #2c5d8f;
  --danger: #c0392b; --ok: #4c8a3f;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --r: 10px;
  --font-title: 'Rye', 'Georgia', serif;
  --font-text: 'PT Serif', Georgia, serif;
  --font-ui: 'Roboto Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at top, #3b2717 0%, #1d130c 70%) fixed, var(--wood-0);
  color: var(--paper); font-family: var(--font-ui); font-size: 15px; -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font-ui); cursor: pointer; }
input, select { font-family: var(--font-ui); font-size: 15px; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; letter-spacing: .02em; margin: 0; }
a { color: var(--brass-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #00000066; border-radius: 8px; padding: 9px 16px; font-size: 15px; font-weight: 600;
  background: linear-gradient(#e2b45a, #b07f2b); color: #2a1a08; box-shadow: inset 0 1px 0 #fff6, 0 2px 0 #0006;
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--paper); border-color: #ffffff33; box-shadow: none; }
.btn.red { background: linear-gradient(#c9483e, #8e2920); color: #fff; }
.btn.green { background: linear-gradient(#5f9a50, #3d6a32); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; }

.panel { background: linear-gradient(var(--paper), var(--paper-2)); color: var(--ink); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid #7a5a3555; }
.wood { background: linear-gradient(180deg, var(--wood-2), var(--wood-1)); border: 1px solid #00000080; border-radius: var(--r); box-shadow: inset 0 1px 0 #ffffff12, var(--shadow); }

/* ─────────── экраны вне игры ─────────── */
.screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 32px 16px; gap: 24px; }
.brand { text-align: center; }
.brand h1 { font-size: clamp(30px, 6vw, 56px); color: var(--brass-2); text-shadow: 0 3px 0 #000, 0 0 30px #c99a3d55; }
.brand p { color: var(--paper-3); font-family: var(--font-text); font-style: italic; margin: 6px 0 0; }
.card-form { width: min(420px, 100%); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.card-form label { font-weight: 600; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.card-form input, .field { padding: 10px 12px; border-radius: 8px; border: 1px solid #8a6a45; background: #fffaf0; color: var(--ink); }
.err { color: var(--danger); font-weight: 600; min-height: 1em; }
.topbar { width: 100%; max-width: 1100px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.games { width: 100%; max-width: 1100px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.game-tile { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.game-tile .cover { height: 150px; background: radial-gradient(circle at 70% 30%, #f0c96b 0 40px, transparent 41px), linear-gradient(180deg, #e89a4f, #9c3d1f 70%, #3b1b0e); position: relative; }
.game-tile .cover::after { content: '🤠'; position: absolute; left: 20px; bottom: 6px; font-size: 64px; filter: drop-shadow(0 4px 4px #0008); }
.game-tile .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.game-tile h3 { font-size: 20px; color: var(--ink); }
.muted { color: var(--ink-2); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.join-box { width: 100%; max-width: 1100px; padding: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.join-box input { flex: 1; min-width: 200px; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; }

table.users { width: 100%; border-collapse: collapse; font-size: 14px; }
table.users th, table.users td { padding: 8px; border-bottom: 1px solid #00000022; text-align: left; vertical-align: middle; }
.admin-wrap { width: 100%; max-width: 1100px; padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-x: auto; }

/* ─────────── лобби ─────────── */
.lobby { width: 100%; max-width: 1100px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
@media (max-width: 860px) { .lobby { grid-template-columns: 1fr; } }
.lobby section { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.code-big { font-family: var(--font-title); font-size: 40px; letter-spacing: .15em; color: var(--red); }
.seat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #fff6; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #0006; flex: none; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #00000022; }
.seg { display: inline-flex; border: 1px solid #8a6a45; border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fffaf0; padding: 6px 10px; color: var(--ink); font-weight: 600; }
.seg button.on { background: var(--red); color: #fff; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.chat { height: 140px; overflow-y: auto; background: #fff8; border-radius: 8px; padding: 8px; font-size: 13px; }

/* ─────────── игровой стол ─────────── */
.table {
  height: 100vh; display: grid; overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: 56px minmax(0, 1fr) auto;
  grid-template-areas: "top top" "board side" "mat mat";
  background: repeating-linear-gradient(90deg, #2b1c11 0 120px, #2f1f13 120px 240px), var(--wood-1);
}
.t-top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: linear-gradient(#1a110a, #24180f); border-bottom: 2px solid #000; }
.t-top .title { font-family: var(--font-title); color: var(--brass-2); font-size: 20px; white-space: nowrap; }
.t-top .pill { background: #0006; border: 1px solid #ffffff22; border-radius: 999px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.t-top .spacer { flex: 1; }
.clock { font-family: var(--font-title); font-size: 18px; padding: 3px 12px; border-radius: 8px; background: #000a; border: 1px solid #ffffff22; min-width: 86px; text-align: center; }
.clock.low { color: #ff6b5b; animation: pulse 1s infinite; }
.clock.paused { color: #aaa; }
@keyframes pulse { 50% { opacity: .5; } }

.t-board { grid-area: board; position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.board-wrap { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.board-wrap svg { width: 100%; height: 100%; max-height: 100%; filter: drop-shadow(0 12px 24px #000a); }
.terr { transition: fill .2s; }
.terr.sel { cursor: pointer; animation: glow 1.2s ease-in-out infinite; }
.terr.sel:hover { fill: #ffd76a !important; }
@keyframes glow { 50% { fill-opacity: .55; } }
.piece { transition: none; cursor: default; }
.piece .ring { stroke: #000; stroke-width: 2; }
.reg-label { font-family: var(--font-title); fill: #4a2c17; opacity: .75; pointer-events: none; }

.t-side { grid-area: side; overflow-y: auto; padding: 8px 8px 8px 0; display: flex; flex-direction: column; gap: 8px; }
.opp { padding: 8px 10px; display: grid; grid-template-columns: 40px 1fr; gap: 8px; position: relative; }
.opp.active { outline: 3px solid var(--brass-2); }
.opp .ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-size: 15px; border: 3px solid; color: #fff; text-shadow: 0 1px 2px #000; }
.opp .nm { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 4px; }
.opp .ch { font-size: 12px; color: var(--ink-2); font-family: var(--font-text); font-style: italic; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; margin-top: 4px; }
.stats span { white-space: nowrap; }
.opp .items { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.thinking { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: var(--red); font-weight: 700; animation: pulse 1.2s infinite; }
.off { opacity: .5; }

.t-mat { grid-area: mat; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 8px 12px 10px; background: linear-gradient(#2a1b11, #1a110a); border-top: 2px solid #000; }
.mat-char { padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.mat-char .name { font-family: var(--font-title); font-size: 17px; color: var(--ink); }
.ability { font-family: var(--font-text); font-size: 12.5px; line-height: 1.3; padding: 6px 8px; border-radius: 6px; background: #0000000d; border: 1px dashed #00000044; color: #6d5a49; }
.ability.on { background: linear-gradient(#fff3c4, #f0d27a); border: 1px solid var(--brass); color: var(--ink); box-shadow: 0 0 16px #f0c96b99; }
.ability .lock { font-weight: 700; font-family: var(--font-ui); font-size: 11px; display: block; margin-bottom: 2px; }
.mat-mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.prompt-bar { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; min-height: 52px; }
.prompt-bar .ttl { font-weight: 700; color: var(--brass-2); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.prompt-bar .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-group { display: flex; flex-wrap: wrap; gap: 6px; padding-right: 8px; margin-right: 4px; border-right: 1px solid #ffffff1a; }
.opt-group:last-child { border-right: 0; }
.timebar { height: 4px; background: #ffffff1a; border-radius: 2px; overflow: hidden; }
.timebar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6b5b, #f0c96b); transition: width 1s linear; }
.hand { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding: 4px 2px 2px; min-height: 140px; }
.mat-right { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; }
.res { padding: 8px 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; font-size: 13.5px; }
.res b { font-size: 16px; }
.track { display: flex; gap: 2px; margin-top: 2px; }
.track i { width: 14px; height: 10px; border-radius: 2px; background: #0002; }
.track i.on { background: var(--blue); }
.track.out i.on { background: var(--red); }
.wounds i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #0002; margin-right: 2px; }
.wounds i.on { background: var(--danger); }

/* карты */
.pcard {
  width: 92px; height: 132px; flex: none; border-radius: 8px; background: linear-gradient(#fffaf0, #f2e3c4); color: var(--ink);
  border: 1px solid #00000055; box-shadow: 0 3px 8px #0007; position: relative; padding: 5px 6px; display: flex; flex-direction: column; gap: 2px;
  transition: transform .15s, box-shadow .15s; cursor: default; user-select: none;
}
.pcard .rk { font-family: var(--font-title); font-size: 18px; line-height: 1; display: flex; justify-content: space-between; }
.pcard.red .rk { color: #b22a20; }
.pcard .nm { font-weight: 700; font-size: 11px; line-height: 1.05; text-transform: uppercase; }
.pcard .tp { font-size: 9.5px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .03em; }
.pcard .tx { font-family: var(--font-text); font-size: 9.2px; line-height: 1.15; color: #3d2a1a; overflow: hidden; }
.pcard.big { width: 150px; height: 214px; padding: 9px 10px; }
.pcard.big .rk { font-size: 28px; } .pcard.big .nm { font-size: 15px; } .pcard.big .tp { font-size: 12px; } .pcard.big .tx { font-size: 12.5px; }
.pcard.back { background: repeating-linear-gradient(45deg, #7a1f17 0 6px, #8e2a20 6px 12px); border: 3px solid #f2e3c4; }
.pcard.back * { display: none; }
.hand .pcard:hover { transform: translateY(-14px) scale(1.06); z-index: 3; box-shadow: 0 10px 20px #000a; }
.pcard.pick { cursor: pointer; outline: 3px dashed #f0c96b; }
.pcard.chosen { transform: translateY(-18px); outline: 3px solid #4cff7a; box-shadow: 0 0 20px #4cff7a99; }
.combat-card { background: linear-gradient(#f4e9d2, #e2cfa8); }
.combat-card .rk::after { content: ' ▮'; color: #6b1d16; font-size: 12px; }

.item { padding: 5px 8px; border-radius: 7px; background: #fff8; border: 1px solid #0003; font-size: 12px; color: var(--ink); line-height: 1.2; }
.item.active { border: 2px solid var(--brass); background: #fff3c4; }
.item.legend { background: linear-gradient(#fff3c4, #f6dc8f); border: 1px solid #b8862b; }
.item b { font-size: 12.5px; }
.goal { padding: 6px 8px; border-radius: 7px; background: #fbf3df; border-left: 4px solid var(--red); font-family: var(--font-text); font-size: 12px; color: var(--ink); }
.goal.done { border-left-color: var(--ok); text-decoration: line-through; opacity: .7; }

/* сюжеты */
.stories { display: flex; gap: 8px; }
.story { width: 230px; padding: 6px 9px; font-size: 12px; line-height: 1.25; cursor: pointer; }
.story .cond { font-weight: 700; color: var(--ink); }
.story .mk { display: flex; gap: 4px; margin-top: 4px; }
.story .mk i { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed #0005; }
.story .mk i.f { border: 2px solid #000; }

/* оверлеи и модалки */
.overlay { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 50; animation: fade .2s; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(720px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.modal h2 { color: var(--ink); font-size: 22px; }
.modal .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.char-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.char-card { padding: 14px; border-radius: 10px; background: #fff8; border: 2px solid #0002; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform .15s; }
.char-card:hover { transform: translateY(-3px); border-color: var(--red); }
.char-card h3 { color: var(--ink); font-size: 20px; }
.monogram { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-size: 24px; color: #fff; background: radial-gradient(circle at 30% 30%, #b57b3b, #5a3518); border: 3px solid var(--brass); text-shadow: 0 2px 2px #000; }

#toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; padding: 10px 16px; border-radius: 10px; background: #1a110aee; border: 1px solid var(--brass); color: var(--paper); box-shadow: var(--shadow); max-width: min(560px, 92vw); animation: toastIn .3s; font-size: 14px; }
.toast.gold { background: linear-gradient(#fff3c4, #e8c56a); color: var(--ink); font-weight: 600; }
.toast.red { border-color: var(--danger); }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } }

/* сцена схватки */
.fight { position: fixed; inset: 0; z-index: 60; background: radial-gradient(ellipse at center, #5a2a14ee, #0d0805f5); display: grid; grid-template-rows: auto 1fr auto; place-items: center; padding: 24px; animation: fade .25s; }
.fight h2 { color: var(--brass-2); font-size: clamp(26px, 4vw, 44px); text-shadow: 0 3px 0 #000; }
.fight .arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(12px, 4vw, 60px); width: min(980px, 100%); }
.fighter { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fighter .portrait { width: clamp(90px, 14vw, 150px); height: clamp(90px, 14vw, 150px); border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-size: clamp(30px, 5vw, 52px); color: #fff; border: 5px solid; text-shadow: 0 2px 4px #000; background: radial-gradient(circle at 30% 30%, #9c6a3a, #3b2212); position: relative; }
.fighter .fname { font-family: var(--font-title); font-size: 20px; color: var(--paper); text-align: center; }
.fighter .val { font-family: var(--font-title); font-size: 46px; color: #fff; min-height: 56px; }
.fighter.win .portrait { box-shadow: 0 0 40px #f0c96b; }
.fighter.lose { filter: grayscale(.7) brightness(.7); }
.fighter .slot { perspective: 800px; min-height: 214px; }
.flip { transition: transform .6s; transform-style: preserve-3d; }
.vs { font-family: var(--font-title); font-size: clamp(36px, 6vw, 70px); color: var(--red); text-shadow: 0 0 20px #000; }
.mods { min-height: 24px; color: #ffcf6b; font-weight: 700; text-align: center; font-size: 14px; }
.flash { position: fixed; inset: 0; background: #fff8d6; z-index: 70; pointer-events: none; animation: flash .35s forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translate(-8px, 4px); } 40% { transform: translate(6px, -5px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -2px); } }
.result-banner { font-family: var(--font-title); font-size: clamp(22px, 4vw, 36px); color: var(--brass-2); text-shadow: 0 2px 0 #000; min-height: 50px; text-align: center; }

.dice-row { display: flex; gap: 20px; }
.die { width: 96px; height: 96px; border-radius: 16px; background: linear-gradient(#2b2b2b, #0e0e0e); border: 2px solid #c99a3d; display: grid; place-items: center; font-size: 42px; color: var(--brass-2); box-shadow: 0 8px 20px #000; }
.die.roll { animation: roll .25s linear infinite; }
@keyframes roll { 25% { transform: rotate(90deg) scale(.9); } 50% { transform: rotate(180deg); } 75% { transform: rotate(270deg) scale(1.05); } 100% { transform: rotate(360deg); } }

/* памятка */
.ref-tab { position: fixed; left: 0; top: 40%; z-index: 30; writing-mode: vertical-rl; transform: rotate(180deg); padding: 12px 6px; background: linear-gradient(#e2b45a, #b07f2b); color: #2a1a08; border-radius: 0 8px 8px 0; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.ref { position: fixed; left: 10px; top: 64px; bottom: 230px; width: 340px; z-index: 31; overflow-y: auto; padding: 14px; font-size: 13px; line-height: 1.35; }
.ref.big { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(900px, 95vw); max-height: 88vh; font-size: 15px; columns: 2 320px; column-gap: 24px; }
.ref h3 { color: var(--red); font-size: 17px; margin: 8px 0 4px; break-after: avoid; }
.ref ul { margin: 0 0 6px; padding-left: 18px; }
.ref .tools { display: flex; gap: 6px; justify-content: flex-end; position: sticky; top: -14px; background: var(--paper); padding: 4px 0; column-span: all; }

.log { position: fixed; right: 290px; bottom: 236px; width: 330px; max-height: 40vh; overflow-y: auto; z-index: 25; padding: 8px 10px; font-size: 12.5px; display: none; }
.log.open { display: block; }
.log div { padding: 2px 0; border-bottom: 1px solid #0001; }
.log .k-turn { font-weight: 700; color: var(--red); margin-top: 4px; }
.log .k-fight { color: #8e2a20; } .log .k-ability, .log .k-legendary, .log .k-goal { color: #8a6418; font-weight: 700; }

.sheriff-pop { width: min(460px, 92vw); padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; border: 4px solid var(--brass); animation: popIn .35s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes popIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.sheriff-pop .badge { font-size: 80px; filter: drop-shadow(0 6px 6px #0006); }
.sheriff-pop h2 { color: var(--red); font-size: 26px; }
.sheriff-pop p { font-family: var(--font-text); font-size: 17px; color: var(--ink); margin: 0; }

.results { width: min(640px, 95vw); padding: 20px; }
.results .line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.results .pl { padding: 10px 0; border-bottom: 1px solid #0002; }
.results .pl h3 { color: var(--ink); display: flex; justify-content: space-between; }

@media (max-width: 1100px) {
  .table { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(320px, 1fr) auto auto; grid-template-areas: "top" "board" "side" "mat"; height: auto; min-height: 100vh; overflow: visible; }
  .t-side { flex-direction: row; overflow-x: auto; padding: 8px; }
  .opp { min-width: 230px; }
  .t-mat { grid-template-columns: 1fr; }
  .log { right: 10px; bottom: 10px; }
  .ref { bottom: 10px; width: min(340px, 90vw); }
  .stories { display: none; }
}

/* ─────────── карты-картинки ─────────── */
.pcard.img { padding: 0; overflow: hidden; background: #f2e3c4; }
.pcard.img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 7px; pointer-events: none; }
.pcard { width: 100px; height: 140px; }
.pcard.big { width: 170px; height: 238px; }
.hand { gap: 0; padding-left: 6px; }
.hand .pcard { margin-left: -14px; }
.hand .pcard:first-child { margin-left: 0; }
.muted2 { color: #b9a07a; font-size: 12px; }
.icard { width: 92px; height: 129px; border-radius: 7px; overflow: hidden; position: relative; flex: none; background: #f2e3c4; box-shadow: 0 3px 8px #0008; border: 1px solid #0006; }
.icard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icard.active { outline: 3px solid var(--brass-2); box-shadow: 0 0 14px #f0c96b; }
.icard .act { position: absolute; left: 0; right: 0; bottom: 0; background: #c99a3dee; color: #2a1a08; font-size: 10px; font-weight: 700; text-align: center; text-transform: uppercase; }
.icard.mini { width: 34px; height: 48px; border-radius: 4px; box-shadow: 0 1px 3px #0008; }
.icard.toastcard, .ccard.toastcard { width: 70px; height: 98px; }
.drawn { height: 100%; display: flex; flex-direction: column; background: linear-gradient(#fbf3df, #ead6aa); color: var(--ink); font-size: 10px; }
.drawn .hd { background: linear-gradient(#b8894a, #8a5b2a); color: #fff3d6; font-family: var(--font-title); font-size: 11px; padding: 4px 4px; text-align: center; position: relative; }
.drawn .price { position: absolute; left: 2px; top: -1px; font-family: var(--font-ui); font-weight: 700; background: #2a1a08; border-radius: 6px; padding: 1px 3px; font-size: 9px; }
.drawn .ic { font-size: 34px; text-align: center; padding: 6px 0; }
.drawn .tx { padding: 0 5px; font-family: var(--font-text); line-height: 1.15; }
.ccard { width: 130px; height: 182px; border-radius: 8px; overflow: hidden; flex: none; box-shadow: 0 4px 12px #000a; border: 1px solid #0007; background: #f2e3c4; }
.ccard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard.mini { width: 46px; height: 64px; border-radius: 5px; }
.ccard.big { width: 200px; height: 280px; }

/* ─────────── личный планшет (как в коробке) ─────────── */
.mat-board { --pc: #c0392b; display: grid; grid-template-columns: auto auto 230px 210px; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: radial-gradient(ellipse at 30% 20%, #8a5a33 0%, #6b4226 40%, #4a2c17 100%); border: 3px solid #2a170b; box-shadow: inset 0 0 0 2px var(--pc), inset 0 0 30px #0009, 0 8px 20px #000a; position: relative; }
.mat-board::before { content: ''; position: absolute; inset: 5px; border: 1px dashed #e8c99055; border-radius: 9px; pointer-events: none; }
.mat-left { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.mat-left .ability { width: 130px; padding: 3px 6px; text-align: center; }
.mat-slots { display: grid; grid-template-columns: repeat(5, auto); gap: 8px; align-items: start; }
.slot { width: 100px; min-height: 160px; border-radius: 9px; background: #3a2213aa; border: 2px solid #1e1108; box-shadow: inset 0 3px 10px #000a; padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.slot-lbl { font-family: var(--font-title); font-size: 11px; color: #e8c990; letter-spacing: .08em; }
.slot .empty { color: #c9a57288; font-size: 11px; margin-top: 40px; text-align: center; }
.stack { display: flex; flex-direction: column; }
.stack .icard + .icard { margin-top: -105px; }
.stack .icard:hover { z-index: 3; transform: translateY(-8px); }
.mat-res { display: flex; flex-direction: column; gap: 4px; color: #f6ead0; font-size: 12px; }
.mat-res .lbl, .mat-goals .lbl { font-family: var(--font-title); font-size: 11px; color: #e8c990; letter-spacing: .05em; display: block; }
.money, .lp { display: flex; align-items: baseline; gap: 8px; background: #1e1108aa; border-radius: 8px; padding: 3px 8px; border: 1px solid #e8c99033; }
.money b, .lp b { font-family: var(--font-title); font-size: 22px; color: #9bff8a; }
.lp b { color: var(--brass-2); }
.money .max, .lp .max { font-size: 11px; color: #c9a572; }
.nug { display: flex; gap: 3px; } .nug i { width: 16px; height: 13px; border-radius: 40% 55% 45% 50%; background: #0005; display: inline-block; }
.nug i.on { background: radial-gradient(circle at 35% 30%, #fff1a8, #e2a92a 55%, #8a5d12); box-shadow: 0 0 4px #f0c96b; }
.wounds-trk i { font-style: normal; opacity: .2; font-size: 15px; } .wounds-trk i.on { opacity: 1; }
.roles .role { font-weight: 700; font-size: 12px; } .role.marshal { color: #8ec5ff; } .role.outlaw { color: #ff8a7a; }
.trk { display: flex; gap: 2px; margin: 2px 0; } .trk i { width: 19px; height: 15px; font-size: 9px; font-style: normal; text-align: center; line-height: 15px; border-radius: 3px; background: #0005; color: #c9a57288; }
.trk.m i.on { background: #2c6fbb; color: #fff; } .trk.o i.on { background: #a8322a; color: #fff; }
.cattle { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip { display: flex; gap: 4px; align-items: center; padding: 2px 6px; border-radius: 999px; font-size: 11px; color: #fff; border: 2px dashed #fff8; max-width: 210px; }
.chip.green { background: #3f6b3a; } .chip.blue { background: #2c5d8f; }
.misc2 { font-size: 11px; color: #c9a572; }
.mat-goals { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.mat-goals .goal { font-size: 11px; }
.mat-mid { min-width: 0; }

/* соперники */
.opp { grid-template-columns: 48px 1fr; }
.ava-card { position: relative; } .ava-card .cdot { position: absolute; left: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--pc); border: 2px solid #000; }
.opp .items { display: flex; flex-wrap: wrap; gap: 3px; }

/* выбор персонажа и магазин */
.char-card { flex-direction: row; align-items: flex-start; }
.char-card > div:last-child { display: flex; flex-direction: column; gap: 6px; }
.modal.wide { width: min(1100px, 100%); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 6px; border-radius: 10px; color: var(--ink); }
.shop-item:hover { background: #0000000f; }
.shop-item .icard { width: 140px; height: 196px; }
.shop-item .cap { display: flex; flex-direction: column; align-items: center; font-size: 12px; }
.shop-item.dis { opacity: .4; cursor: not-allowed; }
.fighter .portrait { background-size: cover; background-position: center 18%; }

@media (max-width: 1400px) { .mat-board { grid-template-columns: auto auto 210px; } .mat-goals { display: none; } }
@media (max-width: 1100px) { .mat-board { grid-template-columns: 1fr; } .mat-slots { grid-template-columns: repeat(5, auto); overflow-x: auto; } }

/* ═════════════ v2: карта по центру, я слева, игроки и действия справа ═════════════ */
.table.v2 { grid-template-columns: 390px minmax(0, 1fr) 320px; grid-template-rows: 66px minmax(0, 1fr); grid-template-areas: "top top top" "left board right";
  background: radial-gradient(ellipse at 50% 40%, #3a2616 0%, #1a100a 75%), #1a100a; }
.v2 .t-top { height: 66px; }
.v2 .stories { gap: 10px; }
.v2 .story { width: 250px; padding: 6px 10px; font-size: 14px; line-height: 1.25; max-height: 58px; overflow: hidden; }
.v2 .story .cond { font-size: 14px; }
.v2 .story .mk i { width: 16px; height: 16px; }
.t-left { grid-area: left; min-height: 0; overflow-y: auto; padding: 8px 6px 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.t-right { grid-area: right; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px 10px 8px 6px; }
.v2 .t-board { grid-area: board; display: flex; flex-direction: column; gap: 6px; padding: 8px 4px; min-height: 0; }
.board-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; perspective: 1400px; }
.board-stage .board-wrap { transition: transform .6s ease; transform-origin: 50% 60%; }
.board-stage.tilt .board-wrap { transform: rotateX(28deg) scale(.96); }
.board-wrap svg { border-radius: 6px; }

/* моя панель */
.me-panel { --pc: #c0392b; border-radius: 12px; padding: 10px; color: #f6ead0;
  background: radial-gradient(ellipse at 30% 20%, #8a5a33 0%, #6b4226 45%, #4a2c17 100%); border: 3px solid #2a170b; box-shadow: inset 0 0 0 2px var(--pc), inset 0 0 30px #0009, 0 8px 20px #000a; display: flex; flex-direction: column; gap: 8px; }
.me-top { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.me-char .ccard { width: 112px; height: 157px; cursor: zoom-in; }
.me-char.ab-on .ccard { box-shadow: 0 0 0 3px #f0c96b, 0 0 22px #f0c96b; animation: abglow 2s ease-in-out infinite; }
@keyframes abglow { 50% { box-shadow: 0 0 0 3px #fff3c4, 0 0 34px #f0c96b; } }
.me-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.me-name { font-family: var(--font-title); font-size: 16px; color: #ffe7b0; line-height: 1.1; }
.me-name small { display: block; font-family: var(--font-text); font-style: italic; font-size: 13px; color: #e8c990; }
.me-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mslot { background: #2a170b99; border: 1px solid #1e1108; border-radius: 6px; box-shadow: inset 0 2px 6px #000a; padding: 2px; display: flex; flex-direction: column; align-items: center; min-height: 82px; }
.mslot .slot-lbl { font-size: 8.5px; letter-spacing: .02em; }
.mcards { display: flex; flex-direction: column; align-items: center; }
.mcards .icard + .icard { margin-top: -50px; }
.icard.sm { width: 46px; height: 64px; border-radius: 4px; cursor: zoom-in; }
.icard.sm:hover { transform: scale(1.08); z-index: 3; }
.icard.sm.active { outline: 2px solid var(--brass-2); }
.mslot .empty { font-size: 10px; color: #c9a57299; margin-top: 18px; }
.me-right .ability { font-size: 12px; padding: 4px 6px; cursor: zoom-in; color: #e8d6b4; background: #0003; border-color: #ffffff33; max-height: 52px; overflow: hidden; }
.me-right .ability.on { color: var(--ink); }
.me-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.me-res .r { background: #1e1108bb; border: 1px solid #e8c99033; border-radius: 8px; padding: 3px 7px; display: flex; flex-direction: column; line-height: 1.1; }
.me-res .lbl, .me-goals .lbl, .cattle .lbl, .hand-wrap .lbl { font-family: var(--font-title); font-size: 10.5px; color: #e8c990; letter-spacing: .05em; }
.me-res b { font-family: var(--font-title); font-size: 21px; color: #fff; font-weight: 400; }
.me-res b.money { color: #9bff8a; } .me-res b.gold { color: #ffd23a; } .me-res b.red { color: #ff8a7a; } .me-res b.lp { color: var(--brass-2); }
.me-res small { font-size: 11px; color: #c9a572; }
.me-res .wd { font-style: normal; font-size: 13px; opacity: .2; } .me-res .wd.on { opacity: 1; }
.gn { display: inline-block; width: 14px; height: 12px; margin: 0 2px -1px 0; border-radius: 38% 55% 42% 50%; transform: rotate(-12deg);
  background: radial-gradient(circle at 35% 30%, #fff3a8, #f2b92c 50%, #9a6a10); box-shadow: 0 0 4px #f0c96b99, inset -1px -1px 0 #6b4a0a; }
.gn.off { background: #0006; box-shadow: inset 0 0 0 1px #e8c99033; }
.gn.big { width: 46px; height: 38px; }
.nug { display: flex; gap: 1px; margin-top: 2px; }
.me-role { display: flex; flex-direction: column; gap: 4px; }
.me-role .role { font-size: 14px; font-weight: 700; color: #f6ead0; }
.me-role .role.marshal { color: #8ec5ff; } .me-role .role.outlaw { color: #ff8a7a; }
.chip { font-size: 12.5px; max-width: 100%; cursor: zoom-in; }
.me-goals { display: flex; flex-direction: column; gap: 4px; }
.me-goals .goal { font-size: 14px; line-height: 1.3; cursor: zoom-in; }

/* треки */
#tracks { display: flex; flex-direction: column; gap: 6px; }
.trkrow { background: linear-gradient(var(--paper), var(--paper-2)); border-radius: 8px; padding: 4px 6px; color: var(--ink); box-shadow: 0 4px 12px #0008; }
.trkrow .tname { font-family: var(--font-title); font-size: 12px; }
.trkrow.m .tname { color: var(--blue); } .trkrow.o .tname { color: var(--red); }
.trkrow .cells { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.trkrow .cell { border: 1px solid #0003; border-radius: 4px; min-height: 40px; display: flex; flex-direction: column; align-items: center; padding: 1px; background: #fff6; }
.trkrow .cell.rowend { border-right: 3px solid #0006; }
.trkrow .n { font-weight: 700; font-size: 12px; } .trkrow .rw { font-size: 9.5px; color: var(--ink-2); white-space: nowrap; }
.ds { display: flex; flex-wrap: wrap; gap: 1px; justify-content: center; }
.tdot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #000; display: inline-block; box-shadow: 0 1px 2px #0008; }
.tdot.big { width: 14px; height: 14px; }

/* рука */
.hand-wrap { margin-top: auto; }
.v2 .hand { min-height: 112px; padding: 18px 2px 2px; overflow: visible; flex-wrap: nowrap; }
.v2 .hand .pcard { width: 74px; height: 104px; margin-left: -22px; cursor: zoom-in; }
.v2 .hand .pcard:first-child { margin-left: 0; }
.v2 .hand .pcard:hover { transform: translateY(-16px) scale(1.25); z-index: 5; }

/* трек ОЛ под полем */
.lptrack { display: flex; gap: 2px; align-items: stretch; background: linear-gradient(#c9a26a, #a87f45); border: 2px solid #4a2c17; border-radius: 6px; padding: 3px 4px; overflow-x: auto; flex: none; }
.lptrack .tname { font-family: var(--font-title); font-size: 11px; color: #2a1a08; writing-mode: horizontal-tb; align-self: center; padding-right: 6px; white-space: nowrap; }
.lpc { min-width: 26px; flex: 1; background: #f1e2c2; border-radius: 3px; display: flex; flex-direction: column; align-items: center; padding: 1px; min-height: 36px; }
.lpc span { font-size: 11px; font-weight: 700; color: var(--ink); }
.lpc.five { background: #ffe9a0; box-shadow: inset 0 0 0 2px var(--brass); }
.lpc.goal { background: #f3b8a8; box-shadow: inset 0 0 0 2px var(--red); }

/* игроки справа — гармошка */
.opps { display: flex; flex-direction: column; gap: 6px; flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: visible; padding-left: 26px; }
.v2 .opp { grid-template-columns: 62px 1fr; padding: 7px 9px; transition: transform .35s, margin .35s, box-shadow .35s; border-left: 6px solid var(--pc); }
.v2 .opp .ccard.mini { width: 62px; height: 87px; cursor: zoom-in; }
.v2 .opp .nm { font-size: 15px; } .v2 .opp .olp { color: var(--red); font-family: var(--font-title); }
.v2 .opp .ch { font-size: 13.5px; } .v2 .opp .abil { color: #8a6418; font-style: normal; }
.v2 .stats { font-size: 14px; gap: 3px 10px; } .r-m { color: var(--blue); font-weight: 700; } .r-o { color: var(--red); font-weight: 700; }
.v2 .opp .icard.mini { width: 36px; height: 50px; cursor: zoom-in; }
.v2 .opp.me { background: linear-gradient(#fff4d6, #ead3a0); }
.v2 .opp.active { outline: 3px solid var(--brass-2); transform: translateX(-22px); z-index: 4; box-shadow: 0 0 24px #f0c96baa, var(--shadow); }
.opps.accordion .opp { margin-top: -64px; }
.opps.accordion .opp:first-child { margin-top: 0; }
.opps.accordion .opp.active { margin-bottom: 64px; }
.opps.accordion .opp:hover { transform: translateX(-12px); z-index: 5; }
.opps-toggle { align-self: flex-end; color: var(--paper); }
.v2 .prompt-bar { margin-top: auto; flex: none; max-height: 58vh; overflow-y: auto; font-size: 14px; }
.v2 .prompt-bar .ttl { font-size: 15px; }
.v2 .prompt-bar .opts { flex-direction: column; align-items: stretch; }
.v2 .prompt-bar .opt-group { border-right: 0; border-bottom: 1px solid #ffffff1a; padding: 0 0 6px; margin: 0; }
.v2 .prompt-bar .btn.sm { font-size: 14px; padding: 7px 10px; }

/* подсказка при наведении и крупный просмотр */
.ztip { position: fixed; z-index: 97; display: none; gap: 10px; width: 460px; padding: 10px; border-radius: 10px; background: linear-gradient(var(--paper), var(--paper-2)); color: var(--ink); box-shadow: 0 14px 40px #000c; border: 2px solid var(--brass); pointer-events: none; }
.ztip.on { display: flex; }
.ztip img { width: 180px; border-radius: 8px; box-shadow: 0 4px 10px #0007; flex: none; align-self: flex-start; }
.ztip b { font-family: var(--font-title); font-size: 18px; } .ztip p { font-family: var(--font-text); font-size: 15px; line-height: 1.35; margin: 6px 0; } .ztip small { color: var(--ink-2); }
.overlay.zoom { cursor: zoom-out; }
.zoombox { display: flex; gap: 20px; align-items: center; max-width: 94vw; flex-wrap: wrap; justify-content: center; }
.zoombox img { max-height: 82vh; max-width: 60vw; border-radius: 14px; box-shadow: 0 20px 60px #000; }
.zoombox .panel { max-width: 420px; padding: 18px; } .zoombox h2 { color: var(--ink); } .zoombox p { font-family: var(--font-text); font-size: 18px; line-height: 1.4; }

/* сюжет крупно */
.story-big { width: min(640px, 94vw); padding: 26px 30px; display: flex; flex-direction: column; gap: 10px; border: 4px double #6b4226; animation: popIn .4s; }
.story-big h2 { color: var(--ink); font-size: 30px; } .story-big p { font-family: var(--font-text); font-size: 20px; line-height: 1.4; color: var(--ink); margin: 0; }
.sb-cond { color: var(--red); font-weight: 700; font-size: 15px; } .sb-meta { font-size: 15px; color: var(--ink-2); }

/* представление персонажей */
.intro { background: radial-gradient(ellipse at center, #3a2414f2, #0b0604fa); }
.intro-box { width: min(1400px, 98vw); max-height: 94vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.intro h1 { text-align: center; color: var(--brass-2); font-size: clamp(26px, 3.4vw, 46px); text-shadow: 0 3px 0 #000; }
.intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.intro-card { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: linear-gradient(var(--paper), var(--paper-2)); color: var(--ink); border-left: 8px solid var(--pc); box-shadow: var(--shadow); animation: introIn .7s both; }
@keyframes introIn { from { opacity: 0; transform: translateY(30px) scale(.95); } }
.intro-card .ccard.big { width: 130px; height: 182px; }
.ic-txt .pl { font-weight: 700; color: var(--pc); font-size: 15px; text-shadow: 0 0 1px #0006; } .ic-txt h3 { font-size: 21px; }
.ic-txt .st { font-size: 13px; color: var(--ink-2); margin: 4px 0; } .ic-txt .ab { font-family: var(--font-text); font-size: 14.5px; line-height: 1.3; }

@media (max-width: 1250px) { .table.v2 { grid-template-columns: 340px minmax(0, 1fr) 280px; } .v2 .story { width: 200px; } }
@media (max-width: 1000px) {
  .table.v2 { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; grid-template-areas: "top" "board" "right" "left"; height: auto; overflow: visible; }
  .v2 .t-top { height: auto; flex-wrap: wrap; } .board-stage { min-height: 60vw; }
}

/* ═════════════ главный экран и лобби в ковбойском стиле ═════════════ */
body:not(:has(.table)) { background: linear-gradient(#120a05cc, #120a05ee), url(/assets/board.jpg) center / cover fixed, #1a100a; }
body:not(:has(.table))::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 40%, #000c 100%); z-index: 0; }
.screen { position: relative; z-index: 1; }
.brand h1 { font-size: clamp(36px, 7vw, 76px); color: #f0c96b; text-shadow: 0 4px 0 #3b1b0e, 0 0 40px #e2a92a66; letter-spacing: .04em; }
.brand h1::before, .brand h1::after { content: '★'; font-size: .45em; vertical-align: middle; margin: 0 .5em; color: #c99a3d; }
.brand p { font-size: 18px; color: #e8c990; }
.game-tile .cover { height: 190px; background: linear-gradient(transparent 40%, #000c), url(/assets/board.jpg) center 40% / cover; }
.game-tile .cover::after { content: 'Легенды Дикого Запада'; font-family: var(--font-title); font-size: 26px; color: #f0c96b; left: 16px; bottom: 12px; text-shadow: 0 2px 0 #000; filter: none; }
.panel { background: linear-gradient(#f4e6c6, #e2c995); border: 1px solid #6b4226; box-shadow: inset 0 0 40px #a87f4533, var(--shadow); }
.card-form, .lobby section, .join-box, .admin-wrap { border: 3px double #6b4226; }
.code-big { text-shadow: 0 2px 0 #fff8; }
@media (min-width: 1001px) { .table.v2 { height: 100vh; min-height: 0; overflow: hidden; } .v2 .stories { display: flex; } }
@media (min-width: 1451px) { .table.v2 { grid-template-columns: 440px minmax(0, 1fr) 340px; } }
.me-top { grid-template-columns: 116px 1fr; }
.me-slots { gap: 3px; } .mslot .slot-lbl { font-size: 8px; letter-spacing: 0; }
.v2 .hand .pcard { width: 92px; height: 129px; margin-left: -26px; }
.v2 .hand { min-height: 140px; }
.v2 .ref { left: 450px; bottom: 20px; }
@media (min-width: 1001px) and (max-width: 1450px) { .table.v2 { grid-template-columns: 410px minmax(0, 1fr) 300px; } }
.v2 .hand .pcard { width: 82px; height: 115px; margin-left: -22px; }
.v2 .hand { min-height: 122px; padding-top: 6px; }
.trkrow .cell { min-height: 34px; }
.t-left { scrollbar-width: thin; }

/* ───── v3 (11.10): графика пользователя ───── */
/* звук */
.snd-wrap { position: relative; }
.snd-pop { display: none; position: absolute; right: 0; top: 110%; z-index: 80; width: 230px; padding: 12px; flex-direction: column; gap: 10px; color: var(--ink); }
.snd-pop.open { display: flex; }
.snd-pop label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; }
.snd-pop input { width: 100%; accent-color: #b07f2b; }
/* фигурки: ходящий крупнее и мигает */
.piece.fig .sc { transform-box: view-box; transform-origin: 0 0; transition: transform .25s; }
.piece.fig image { filter: drop-shadow(0 2px 2px #000a); }
.piece.fig.turn .sc { transform: scale(1.45); animation: figBlink .8s ease-in-out infinite; }
@keyframes figBlink { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px #ffd76a) drop-shadow(0 0 14px #ffb300); } 50% { opacity: .35; filter: none; } }
/* магазин */
.shop-ov { z-index: 52; background: linear-gradient(#0009, #000d), url(/assets/scene/store.jpg) center / cover; display: grid; place-items: center; }
.shop-ov.enter { animation: shopIn .5s both; }
.shop-ov.leave { animation: fade .35s reverse both; }
@keyframes shopIn { from { background-color: #000; opacity: 0; } to { opacity: 1; } }
.shop-box { width: min(1200px, 96vw); max-height: 94vh; display: flex; flex-direction: column; gap: 14px; }
.shop-head { display: flex; align-items: center; gap: 16px; }
.shop-head h2 { color: var(--brass-2); font-size: 40px; text-shadow: 0 3px 0 #000; flex: 1; }
.shop-money { color: #f6ead0; font-size: 20px; } .shop-money b { color: #9bff8a; font-size: 26px; }
.shop-ov .shop-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; overflow-y: auto; padding: 22px 8px 8px; }
.shop-ov .shop-item { color: #f6ead0; padding: 0; transition: transform .2s; }
.shop-ov .shop-item:hover { background: none; }
.shop-ov .shop-item .icard { width: 165px; height: 231px; transition: transform .2s, box-shadow .2s; }
.shop-ov .shop-item:not(.dis):hover .icard { transform: translateY(-16px) scale(1.06); box-shadow: 0 0 0 3px #f0c96b, 0 0 30px #f0c96bcc, 0 18px 30px #000; }
.shop-ov .shop-item.up .cap b { color: #ffd76a; }
.shop-ov .shop-item .cap { font-size: 14px; text-shadow: 0 2px 2px #000; }
.shop-ov .shop-item.dis { opacity: .35; }
.shop-ov .timebar { background: #0008; }
.icard.flying { position: fixed; z-index: 120; transition: all .7s cubic-bezier(.5,-.2,.6,1); pointer-events: none; }
/* сцена локации */
.scene-show { position: fixed; inset: 0; z-index: 48; pointer-events: none; display: grid; place-items: center; animation: fade .35s; }
.scene-show .sc-img { position: absolute; inset: 0; background: center / cover; filter: brightness(.9); animation: kenburns 2.4s ease-out both; }
.scene-show.out { opacity: 0; transition: opacity .5s; }
.scene-show .sc-cap { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; background: #000b; padding: 10px 30px; border: 2px solid #c99a3d; border-radius: 10px; }
.scene-show .sc-cap b { font-family: var(--font-title); color: var(--brass-2); font-size: 38px; font-weight: 400; }
.scene-show .sc-cap span { color: #f6ead0; font-size: 16px; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
/* схватка: кадры на фоне */
.fight { background: #000; }
.fight .fbg { position: absolute; inset: 0; background: center / cover; opacity: 0; transition: opacity .6s; z-index: 0; }
.fight .fbg.on { opacity: 1; animation: kenburns 3s ease-out both; }
.fight::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#0007, #0002 35%, #0002 55%, #000c); z-index: 0; pointer-events: none; }
.fight > :not(.fbg) { position: relative; z-index: 1; }
/* кубик старателя: чёрный с золотом */
.die { background: radial-gradient(circle at 30% 25%, #3a3a3a, #050505 70%); border: 2px solid #8a6a2a; color: #e6b64a; text-shadow: 0 0 6px #e6b64a88; }
.die b { font-size: 50px; } .die small { font-size: 26px; margin-left: -4px; }
/* жетоны */
.bull { flex: none; vertical-align: middle; filter: drop-shadow(0 1px 2px #000a); }
.chip { border: 0; background: #0005 !important; }
.gn { clip-path: polygon(10% 40%, 28% 8%, 62% 0, 92% 22%, 100% 60%, 78% 94%, 38% 100%, 4% 78%); border-radius: 0;
  background: radial-gradient(circle at 32% 28%, #fffbd0 0, #ffd84a 22%, #e0a21c 55%, #8a5a0c 100%); }
/* интро: карты персонажей (лицо + оборот) */
.intro { background: linear-gradient(#000c, #000e), url(/assets/scene/intro.jpg) center / cover; }
.intro-grid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.intro-card { flex-direction: column; align-items: center; background: #0007; border: 2px solid var(--pc); border-left-width: 2px; color: #f6ead0; }
.intro-card .pl { font-family: var(--font-title); font-size: 20px; color: var(--pc); text-shadow: 0 2px 0 #000; }
.ic-pair { display: flex; gap: 10px; }
.ic-img { width: 150px; height: 210px; border-radius: 8px; overflow: hidden; cursor: zoom-in; box-shadow: 0 6px 16px #000; transition: transform .2s; }
.ic-img:hover { transform: scale(1.04); }
.ic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char-card .ccard.big { width: 150px; height: 210px; }
/* итоги */
.results-ov { background-size: cover; background-position: center; }
/* сюжет крупно — на фоне книги */
.story-show { background: linear-gradient(#000a, #000c), url(/assets/scene/story.jpg) center / cover !important; }
/* памятка как в коробке */
.ref { background: #efe6d2 url() ; color: #1e1610; }
.ref.big { columns: auto; width: min(1100px, 96vw); }
.memo-page { background: linear-gradient(#f3ead6, #e9dcc0); border: 1px solid #b9a27a; border-radius: 6px; padding: 14px 18px; margin-bottom: 14px; box-shadow: inset 0 0 40px #c9b48a66; }
.memo-h { font-family: 'Lobster', var(--font-title); text-align: center; color: #1e1610; font-size: 28px; margin: 6px 0 10px; border-bottom: 2px solid #1e1610; padding-bottom: 4px; }
.memo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ref:not(.big) .memo-cols { grid-template-columns: 1fr; }
.memo-page h4 { margin: 8px 0 3px; font-size: 14px; } .memo-page h5 { margin: 8px 0 2px; font-size: 15px; text-decoration: underline; }
.memo-page ul { padding-left: 16px; margin: 0; } .memo-page i { color: #4a3a2a; }
.memo-t { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.memo-t td, .memo-t th { border: 1px solid #5a4a36; padding: 3px 6px; vertical-align: top; } .memo-t th { background: #d8c7a3; }
.memo-t.combos td.ex { white-space: nowrap; } .rs { color: #b22a20; }
.loc { display: flex; gap: 8px; margin: 8px 0; } .loc h5 { margin: 0 0 2px; text-decoration: none; font-size: 16px; }
.mi { width: 34px; height: 34px; flex: none; }
.memo-job .mi { width: 26px; height: 26px; }
.memo-job { border: 1px solid #5a4a36; padding: 6px 8px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .memo-job span { display: flex; gap: 2px; flex-wrap: wrap; }
.mdice { display: flex; gap: 8px; margin-top: 6px; }
.mdie { display: flex; flex-direction: column; align-items: center; width: 70px; font-size: 11px; text-align: center; font-weight: 700; }
.mdie i { width: 38px; height: 38px; background: #111; color: #e6b64a; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 22px; font-weight: 700; margin-bottom: 3px; }
.memo-lead { text-align: center; font-weight: 700; margin: 0 0 6px; }
/* главный экран и лобби — на фоне заставки */
body:not(:has(.table)) { background: linear-gradient(#120a05aa, #120a05ee), url(/assets/scene/intro.jpg) center / cover fixed, #1a100a; }
.game-tile .cover { background: linear-gradient(transparent 40%, #000c), url(/assets/scene/intro.jpg) center 40% / cover; }
/* цели — карточки на пергаменте */
.me-goals .goal { background: linear-gradient(#f3ead6, #e3d3b0); color: #2a1a0c; border-radius: 6px; padding: 6px 8px; border: 1px solid #8a6a3a; box-shadow: 0 2px 6px #0007; }
.me-goals .goal.done { opacity: .6; text-decoration: line-through; }
.stories .story { background: linear-gradient(#f3ead6, #e3d3b0); }
.char-pick .char-card { flex-wrap: wrap; }
.char-pick .char-card > div:last-child { flex: 1 1 100%; }
.board-stage .board-wrap svg { background: transparent; }

/* ───── v3.1 (11.10): крупнее карты, приближение карты, магазин с переворотом, фоны ───── */
/* рука и карты в схватках/выборе — крупнее */
.v2 .hand { min-height: 190px; padding-top: 20px; }
.v2 .hand .pcard { width: 124px; height: 174px; margin-left: -46px; }
.v2 .hand .pcard:first-child { margin-left: 0; }
.v2 .hand .pcard:hover { transform: translateY(-40px) scale(1.7); z-index: 9; }
.pcard.big { width: 230px; height: 322px; }
.fighter .slot { min-height: 330px; }
.modal .row .pcard, .modal .opts .pcard { width: 150px; height: 210px; }
.modal .pcard.big { width: 230px; height: 322px; }
.overlay .row .pcard.pick { width: 150px; height: 210px; }
/* приближение карты */
.board-wrap { overflow: hidden; touch-action: none; }
.board-wrap svg { transform-origin: 0 0; transition: transform .12s ease-out; }
.board-wrap.zoomed { cursor: grab; } .board-wrap.zoomed:active { cursor: grabbing; }
.zoom-ctl { position: absolute; right: 14px; top: 14px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.zoom-ctl button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid #000; background: linear-gradient(#f3e3bd, #d3b77d); color: #2a1a08; font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 3px 8px #000a; }
.zoom-ctl button:hover { background: #ffe9b5; }
/* фигурки: свой персонаж — чуть больше (без мигания), NPC без подсветки */
.piece.fig.mine:not(.turn) .sc { transform: scale(1.18); }
/* магазин: крупнее, карточка крупно с переворотом */
.shop-ov .shop-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
.shop-ov .shop-item .icard { width: 200px; height: 280px; }
.shop-ov .shop-item.dis { opacity: .45; }
.shop-detail { position: absolute; inset: 0; background: #000b; display: grid; place-items: center; z-index: 3; animation: fade .2s; }
.sd-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: popIn .3s; }
.sd-x { position: absolute; right: -54px; top: -6px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #c99a3d; background: #1a100a; color: #f6ead0; font-size: 22px; cursor: pointer; }
.sd-x:hover { background: #8a2a1a; }
.flip { width: 340px; height: 476px; perspective: 1400px; }
.flip-in { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.flip.flipped .flip-in { transform: rotateY(180deg); }
.flip .icard.face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 14px; box-shadow: 0 0 0 3px #f0c96b, 0 0 40px #f0c96b88, 0 20px 40px #000; }
.flip .icard.face.back { transform: rotateY(180deg); }
.sd-btns { display: flex; gap: 12px; }
.sd-btns .btn { font-size: 18px; padding: 10px 20px; }
.sd-btns .btn.ghost { color: #f6ead0; border-color: #c99a3d; }
/* экраны: главный, комната, стол, текстуры */
body:not(:has(.table)) { background: linear-gradient(#120a0566, #120a05cc), url(/assets/ui/menu_bg.jpg) center / cover fixed, #1a100a; }
body:has(.lobby) { background: linear-gradient(#120a0566, #120a05cc), url(/assets/ui/lobby_bg.jpg) center / cover fixed, #1a100a; }
.game-tile .cover { height: 230px; background: url(/assets/ui/game_cover.jpg) center / cover; }
.game-tile .cover::after { content: none; }
body:has(.table) { background: linear-gradient(#0008, #000a), url(/assets/ui/table.jpg) center / 600px repeat, #1a100a; }
.table.v2 { background: transparent; }
.panel { background-image: linear-gradient(#f6ecd6e6, #e6d4abe6), url(/assets/ui/parchment.jpg); background-size: auto, 500px; }
.me-panel, .wood { background-image: linear-gradient(#2a170bd9, #1a0e06e6), url(/assets/ui/leather.jpg) !important; background-size: auto, 400px !important; }
.memo-page { background: linear-gradient(#f3ead6dd, #e9dcc0dd), url(/assets/ui/parchment.jpg) center / 600px; }

.v2 .t-top .title { font-size: 0; width: 150px; height: 58px; background: url(/assets/ui/logo.png) center / contain no-repeat; flex: none; }
.intro h1 { font-size: 0; height: 170px; background: url(/assets/ui/logo.png) center / contain no-repeat; }
/* рука — под полем, крупно */
.board-bottom { display: flex; align-items: flex-end; gap: 14px; width: 100%; flex: none; padding: 0 6px; }
.board-bottom .hand-wrap { flex: 1 1 auto; min-width: 0; }
.board-bottom .lptrack { flex: none; margin: 0; }
.board-bottom .hand-wrap .lbl { color: #e8c990; font-size: 12px; letter-spacing: .1em; }
.v2 .board-bottom .hand { min-height: 0; padding-top: 4px; overflow: visible; }
.v2 .board-bottom .hand .pcard { width: 112px; height: 157px; margin-left: -12px; }
.v2 .board-bottom .hand .pcard:first-child { margin-left: 0; }
.v2 .board-bottom .hand .pcard:hover { transform: translateY(-90px) scale(1.9); z-index: 20; }
.v2 .board-stage { flex: 1 1 auto; min-height: 0; }

/* приближение: карта плоская и на всю ширину центральной колонки; рука при наведении не обрезается */
.v2 .board-stage { overflow: hidden; width: 100%; }
.board-stage.zoomed .board-wrap, .board-stage.tilt.zoomed .board-wrap { transform: none; }
.v2 .t-board { overflow: visible; z-index: 2; }
.v2 .board-bottom .hand .pcard { transform-origin: 50% 100%; position: relative; }
.v2 .board-bottom .hand .pcard:first-child { transform-origin: 0 100%; }
.v2 .board-bottom .hand .pcard:hover { transform: translateY(-10px) scale(1.9); }
/* сюжеты сверху — выше, текст и маркеры целиком */
.table.v2 { grid-template-rows: 92px minmax(0, 1fr); }
.v2 .t-top { height: 92px; }
.v2 .story { width: 300px; max-height: 84px; padding: 6px 10px 4px; overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.v2 .story .cond { font-size: 14px; line-height: 1.2; }
.v2 .story .mk { flex: none; }
/* выбор персонажа: лицо и оборот рядом, крупно; ниже — главное */
.modal:has(.char-pick) { width: min(1250px, 96vw); max-height: 94vh; }
.char-pick { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 18px; overflow-y: auto; }
.char-pick .char-card { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.char-pick .char-card > div:last-child { flex: none; }
.cc-pair { display: flex; gap: 12px; justify-content: center; }
.cc-pair .ccard.big { width: 205px; height: 287px; }
.char-card:hover .cc-pair .ccard { box-shadow: 0 0 0 3px #f0c96b, 0 10px 24px #000a; }
.cc-info { width: 100%; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.cc-info h3 { font-size: 26px; text-align: center; }
.cc-start { font-size: 16px; line-height: 1.35; }
.cc-info .ability { font-size: 16px; line-height: 1.35; }
.cc-info .btn { align-self: center; font-size: 17px; padding: 8px 28px; }

/* ходящий — без мигания: крупнее остальных и ярко светится цветом своей фишки */
.piece.fig.turn .sc { transform: scale(1.45); animation: none; }
.piece.fig.turn image { filter: drop-shadow(0 0 3px var(--pc)) drop-shadow(0 0 8px var(--pc)) drop-shadow(0 0 16px var(--pc)) drop-shadow(0 0 26px var(--pc)) !important; }
.piece.fig.turn ellipse:nth-of-type(2) { filter: drop-shadow(0 0 8px var(--pc)); }
/* на одном компьютере: передача хода */
.handoff { background: linear-gradient(#000c, #000e), url(/assets/ui/menu_bg.jpg) center / cover; display: grid; place-items: center; }
.ho-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ho-ava img { height: 260px; filter: drop-shadow(0 0 10px var(--pc)) drop-shadow(0 0 26px var(--pc)); }
.ho-box h2 { color: var(--pc); font-size: 44px; text-shadow: 0 3px 0 #000; }
.ho-box p { color: #f6ead0; font-size: 18px; margin: 0; }
.ho-box .btn { font-size: 20px; padding: 12px 30px; }
.hs-list { display: flex; flex-direction: column; gap: 6px; }
.hs-p { display: flex; align-items: center; gap: 8px; } .hs-p .field { flex: 1; }
.hs-cols { display: flex; gap: 4px; } .hs-cols .dot { width: 18px; height: 18px; cursor: pointer; border: 2px solid #0004; } .hs-cols .dot.on { outline: 3px solid #2a1a08; outline-offset: 1px; }
.hs-list .field { padding: 6px 8px; font-size: 14px; }

/* левая панель: сверху оружие, скакун, способность; ниже 3 предмета — крупно */
.me-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.me-cards .mslot { min-height: 0; padding: 3px; }
.me-cards .mslot .slot-lbl { font-size: 10.5px; letter-spacing: .05em; }
.me-cards .mcards { display: flex; justify-content: center; gap: 2px; width: 100%; }
.me-cards .icard.sm, .me-cards .ccard { width: 100%; max-width: 118px; height: auto; aspect-ratio: 5 / 7; cursor: zoom-in; }
.me-cards .mcards .icard.sm + .icard.sm { margin-left: -60%; }
.me-cards .empty { aspect-ratio: 5 / 7; width: 100%; max-width: 118px; display: grid; place-items: center; margin: 0; border: 1px dashed #c9a57244; border-radius: 6px; font-size: 12px; }
.abil-slot:not(.ab-on) .ccard { filter: grayscale(.6) brightness(.75); }
.abil-slot.ab-on .ccard { box-shadow: 0 0 0 3px #f0c96b, 0 0 22px #f0c96b; }
.me-name { margin-bottom: 4px; }
/* подсветка шерифа и бандитов ярче */
.piece.npc image { opacity: 1; }
.char-pick .char-card { cursor: default; }
.char-pick .char-card.picked { outline: 4px solid #3f8a3a; box-shadow: 0 0 24px #4cff7a88; }
.char-pick .char-card .ccard { cursor: zoom-in; }
.cc-confirm { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 10px; }
.cc-confirm .cc-msg { flex: 1; font-size: 18px; font-weight: 700; color: var(--ink); }
.cc-confirm .btn { font-size: 18px; padding: 10px 26px; }
.cc-confirm .btn.ghost { color: var(--ink); }
/* выбор сюжета для маркера */
.sm-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.sm-card { width: 260px; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 10px; border: 2px solid #8a6a3a; background: linear-gradient(#f3ead6, #e3d3b0); color: var(--ink); cursor: pointer; text-align: left; box-shadow: 0 6px 16px #0006; transition: transform .15s; }
.sm-card:hover { transform: translateY(-6px); box-shadow: 0 0 0 3px #f0c96b, 0 10px 22px #0008; }
.sm-lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a6418; font-weight: 700; }
.sm-cond { font-family: var(--font-text); font-size: 19px; font-weight: 700; line-height: 1.25; }
.sm-card .mk { display: flex; gap: 5px; } .sm-card .mk i { width: 20px; height: 20px; border-radius: 50%; border: 2px dashed #6b4a2a; } .sm-card .mk i.f { border-style: solid; border-color: #000; }
.sm-note { font-size: 14px; color: #6b2a1a; min-height: 18px; }
.sm-card .btn { align-self: stretch; text-align: center; }
/* итоги сюжета */
.sr-row { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-left: 5px solid var(--pc); background: #0000000d; border-radius: 6px; }
.sr-row img { height: 56px; filter: drop-shadow(0 0 4px var(--pc)); }
.sr-row b { font-size: 17px; color: var(--ink); } .sr-row small { color: #8a6418; font-weight: 400; }
.sr-l { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 3px; }
.sr-l span { font-size: 15px; padding: 2px 8px; border-radius: 999px; }
.sr-l .pos { background: #2f6b2a22; color: #1f5a1a; font-weight: 700; } .sr-l .neg { background: #a0282022; color: #8a1e18; font-weight: 700; }
.story-big { width: min(820px, 94vw); }
.story-big .sb-cond { font-size: 15px; } .story-big h2 { font-size: 34px; }
.sr-row b { font-size: 20px; } .sr-l span { font-size: 17px; } .story-big .sb-meta { font-size: 17px; }
/* фигурки: при наведении — прозрачные, видно, что под ними */
.piece.fig { transition: opacity .15s; }
.piece.fig:hover { opacity: .25; }
/* крупные уведомления */
.bignote { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; background: #0007; animation: fade .25s; cursor: pointer; }
.bn-box { width: min(720px, 94vw); padding: 22px 26px; border: 3px solid var(--pc); box-shadow: 0 0 40px var(--pc), 0 20px 50px #000; animation: popIn .35s; color: var(--ink); }
.bn-box h2 { font-size: 30px; color: var(--ink); margin: 4px 0 8px; } .bn-box p { font-family: var(--font-text); font-size: 18px; margin: 4px 0; }
.bn-k { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: #8a6418; font-weight: 700; }
.bn-why { color: #6b2a1a; font-size: 16px !important; font-style: italic; }
.bn-l { display: flex; gap: 18px; align-items: center; } .bn-card { width: 170px !important; height: 238px !important; flex: none; }
/* стопка оружия/скакунов: активная сверху, остальные выглядывают снизу полосками; клик по подписи — раскрыть */
.me-cards .mcards.stack { flex-direction: column; align-items: center; gap: 0; }
.me-cards .mcards.stack .icard.sm { position: relative; }
.me-cards .mcards.stack .icard.sm:nth-child(1) { z-index: 5; } .me-cards .mcards.stack .icard.sm:nth-child(2) { z-index: 4; } .me-cards .mcards.stack .icard.sm:nth-child(3) { z-index: 3; }
.me-cards .mcards.stack .icard.sm + .icard.sm { margin: calc(-140% + 22px) 0 0 0; }
.stack-slot .slot-lbl { cursor: pointer; }
.stack-slot.open .mcards.stack .icard.sm + .icard.sm { margin-top: 6px; }
/* выбор снаряжения */
.gear-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.gear-opt { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--ink); font-weight: 700; }
.gear-opt .icard { width: 170px; height: 238px; transition: transform .15s; }
.gear-opt:hover .icard { transform: translateY(-8px); box-shadow: 0 0 0 3px #f0c96b, 0 0 24px #f0c96b; }
.shop-ov.browse { z-index: 60; }
.shop-ov .shop-detail { position: fixed; }
/* итог покера */
.poker-box { width: min(1100px, 96vw); max-height: 94vh; overflow-y: auto; }
.pk-win { font-size: 22px; font-weight: 700; color: #1f5a1a; background: #2f6b2a1f; border: 2px solid #3f8a3a; border-radius: 8px; padding: 8px 12px; }
.pk-tie { font-size: 15px; font-weight: 400; color: #6b2a1a; margin-top: 4px; }
.pk-flop .pcard, .pk-hand .pcard { width: 110px; height: 154px; }
.pk-hands { display: flex; gap: 14px; flex-wrap: wrap; }
.pk-hand { flex: 1 1 260px; padding: 10px; border-radius: 10px; border: 2px solid #8a6a3a; background: #0000000d; color: var(--ink); }
.pk-hand.win { border-color: #3f8a3a; box-shadow: 0 0 18px #4cff7a66; background: #2f6b2a14; }
.pk-hand.lose { opacity: .85; }
.pk-who { font-size: 18px; font-weight: 700; } .pk-combo { font-family: var(--font-title); font-size: 22px; color: var(--red); margin: 2px 0 6px; }
.pk-prize { margin-top: 6px; font-size: 15px; font-weight: 700; } .pk-hand.win .pk-prize { color: #1f5a1a; } .pk-hand.lose .pk-prize { color: #8a1e18; }
.story-big .sb-text { font-size: 20px; line-height: 1.45; }
.story-big .sb-meta { display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.story-show { cursor: default; }
.sr-row .ccard.mini, .sb-part .ccard.mini, .pk-who .ccard.mini { width: 54px; height: 76px; flex: none; box-shadow: 0 0 0 2px var(--pc, #c99a3d), 0 3px 8px #0008; }
.sr-ch { font-size: 14px; font-style: italic; color: #6b4a2a; }
.sb-parts { display: flex; flex-wrap: wrap; gap: 10px; }
.sb-part { display: flex; gap: 8px; align-items: center; padding: 4px 10px 4px 4px; border-left: 4px solid var(--pc); background: #0000000d; border-radius: 6px; }
.pk-who { display: flex; gap: 8px; align-items: center; }
.pk-who .ccard.mini { box-shadow: 0 3px 8px #0008; }

/* ── Ожидание выбора персонажей ── */
.wait-ov { background: linear-gradient(#000b, #000d), url(/assets/scene/intro.jpg) center / cover; }
.wait-box { width: min(520px, 94vw); text-align: center; color: #f6ead0; }
.wait-box h2 { font-family: var(--font-title); color: var(--brass-2); font-size: clamp(24px, 4vw, 36px); text-shadow: 0 3px 0 #000; animation: waitPulse 1.6s ease-in-out infinite; }
.wait-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; text-align: left; }
.wait-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #0008; border-left: 6px solid var(--pc); }
.wait-row i { width: 14px; height: 14px; border-radius: 50%; background: var(--pc); flex: none; }
.wait-row b { flex: 1; }
.wait-row span { color: #b9a07a; font-size: 14px; }
.wait-row.ok span { color: #9bff8a; }
@keyframes waitPulse { 50% { opacity: .55; } }

/* ── Вход / регистрация / заявки ── */
.auth-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.auth-tabs button { flex: 1; padding: 8px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-2); font: 600 15px var(--font-ui); cursor: pointer; }
.auth-tabs button.on { color: var(--ink); border-color: var(--brass); }
.card-form .ok-msg { color: var(--ok); font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font: inherit; }
.status-box { max-width: 520px; text-align: center; color: var(--ink); }
.status-box h2 { margin-bottom: 8px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.admin-tabs .btn.on { outline: 3px solid var(--brass-2); }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #0000000d; color: var(--ink); }
.req .who { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.req .who small { display: block; color: var(--ink-2); }
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--red); color: #fff; font: 700 12px var(--font-ui); text-align: center; }
.tag-ok { color: var(--ok); } .tag-no { color: var(--danger); }
/* ── Лобби: имя и цвет, места, порядок ── */
.profile-box { padding: 12px; border-radius: 10px; background: #c99a3d26; border: 2px dashed var(--brass); margin: 10px 0; color: var(--ink); }
.profile-box .cols { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.profile-box .cols .dot { width: 30px; height: 30px; cursor: pointer; border: 3px solid transparent; }
.profile-box .cols .dot.on { border-color: var(--ink); transform: scale(1.12); }
.profile-box .cols .dot.taken { opacity: .2; cursor: not-allowed; }
.seat .st { margin-left: auto; font-size: 13px; }
.seat.empty { opacity: .6; }
.start-why { color: var(--danger); font-weight: 600; }
/* журнал — в правой колонке под игроками */
.t-right .log { position: static; width: auto; max-height: 34vh; flex: 0 1 auto; min-height: 80px; z-index: auto; }
