/* ===== Мафия онлайн — нуар / ар-деко ===== */
:root {
  --ink: #0c0a09;
  --ink-2: #171311;
  --panel: rgba(16, 12, 10, .9);
  --line: rgba(214, 177, 106, .28);
  --gold: #d6b16a;
  --gold-2: #f3d99b;
  --blood: #a3202a;
  --blood-2: #e0434f;
  --paper: #f1e6cf;
  --muted: #a89c88;
  --felt: #0f4a37;
  --felt-2: #07261c;
  --sky-day-1: #f3c98b;
  --sky-day-2: #8fb0c4;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; }
html { font-size: clamp(16px, calc(0.62vw + 7px), 24px); }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--sans); color: var(--paper); background: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Сцена: день и ночь ---------- */
#scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transition: opacity 1.8s var(--ease); }
.bg-day {
  background-image: url(/sprites/bg-day.webp),
    linear-gradient(180deg, #86a9bd 0%, #e9c79a 55%, #c48a5a 78%, #3b2a22 100%);
}
.bg-night {
  opacity: 0;
  background-image: url(/sprites/bg-night.webp),
    radial-gradient(ellipse at 70% 10%, #24355e 0%, transparent 55%),
    linear-gradient(180deg, #050913 0%, #0c1630 55%, #1a1626 80%, #0b0808 100%);
}
.is-night .bg-night { opacity: 1; }
.stars { position: absolute; inset: 0 0 35% 0; opacity: 0; transition: opacity 3s; background-image:
  radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent), radial-gradient(1px 1px at 30% 8%, #fff 50%, transparent),
  radial-gradient(1.5px 1.5px at 52% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 70% 30%, #fff 50%, transparent),
  radial-gradient(1px 1px at 85% 12%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 18% 40%, #fff 50%, transparent),
  radial-gradient(1px 1px at 92% 44%, #fff 50%, transparent), radial-gradient(1px 1px at 40% 34%, #fff 50%, transparent),
  radial-gradient(1px 1px at 62% 6%, #fff 50%, transparent), radial-gradient(1px 1px at 5% 6%, #fff 50%, transparent);
}
.is-night .stars { opacity: .8; }
.orbit { position: absolute; left: 50%; top: 5vh; width: 160vmax; height: 160vmax; margin-left: -80vmax; transition: transform 3.2s var(--ease); pointer-events: none; }
.is-night .orbit { transform: rotate(180deg); }
.sun, .moon { position: absolute; left: 50%; width: 13vmin; height: 13vmin; margin-left: -6.5vmin; border-radius: 50%; }
.sun { top: -4vmin; background: radial-gradient(circle, #fff6d8 0%, #ffd27a 45%, #f0a24a 70%, transparent 72%); box-shadow: 0 0 80px 30px rgba(255, 196, 110, .35); }
.moon { bottom: -4vmin; transform: rotate(180deg); background: radial-gradient(circle at 35% 35%, #fffbea 0%, #e7e1c9 50%, #b9b29a 70%, transparent 72%); box-shadow: 0 0 60px 18px rgba(200, 215, 255, .25); }
.moon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 70% 30%, rgba(0, 0, 0, .18) 0 8%, transparent 9%), radial-gradient(circle at 45% 65%, rgba(0, 0, 0, .12) 0 10%, transparent 11%); }
.fog { position: absolute; left: -20%; right: -20%; bottom: 0; height: 40%; opacity: .0; transition: opacity 3s; background: radial-gradient(ellipse at 30% 100%, rgba(170, 180, 210, .25), transparent 60%), radial-gradient(ellipse at 75% 100%, rgba(170, 180, 210, .2), transparent 55%); }
.is-night .fog { opacity: 1; }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(0, 0, 0, .55) 80%, rgba(0, 0, 0, .85)); transition: background 3s; }
.is-night .vignette { background: radial-gradient(ellipse at 50% 58%, transparent 25%, rgba(0, 0, 0, .7) 70%, rgba(0, 0, 0, .95)); }

.screen { position: relative; z-index: 1; height: 100%; }

/* ---------- Кнопки и поля ---------- */
.btn { cursor: pointer; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); padding: .6em 1.1em; border-radius: 10px; font-weight: 600; letter-spacing: .02em; transition: transform .15s, background .2s, box-shadow .2s, opacity .2s; }
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, #f0d391, #b98d43); color: #1b1309; border-color: #f6e0aa; box-shadow: 0 6px 24px rgba(214, 177, 106, .25), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { background: linear-gradient(180deg, #f8e0a6, #c89a4d); }
.btn-red { background: linear-gradient(180deg, #c3313c, #7d141c); border-color: #e0606a; color: #fff; }
.btn-ghost { background: transparent; }
.btn-big { width: 100%; padding: .9em 1.2em; font-size: 1.05rem; }
.btn-small { padding: .35em .7em; font-size: .85rem; border-radius: 8px; }
.icon-btn { cursor: pointer; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); display: inline-grid; place-items: center; font-size: 1rem; transition: background .2s; }
.icon-btn:hover { background: rgba(214, 177, 106, .2); }
input, select, textarea { background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: 10px; padding: .65em .8em; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 177, 106, .15); }

/* ---------- Вход ---------- */
#login { display: grid; place-items: center; padding: 20px; }
.login-card { width: min(27rem, 100%); padding: 38px 34px 28px; background: linear-gradient(180deg, rgba(20, 15, 12, .88), rgba(10, 8, 7, .92)); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); position: relative; animation: rise .9s var(--ease) both; }
.login-card::before { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(214, 177, 106, .14); border-radius: 16px; pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.logo { text-align: center; margin-bottom: 22px; }
.logo h1 { font-family: var(--serif); font-weight: 900; font-size: 4rem; margin: 0; line-height: 1; letter-spacing: .04em; background: linear-gradient(180deg, #fff1c9, #d6b16a 60%, #8e6a2c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 30px rgba(214, 177, 106, .2); }
.logo-small { font-size: .72rem; letter-spacing: .5em; text-transform: uppercase; color: var(--muted); }
.logo-rule { display: block; width: 140px; height: 10px; margin: 10px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent) center/100% 1px no-repeat; position: relative; }
.logo-rule::after { content: '♦'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); color: var(--blood-2); font-size: .7rem; }
#loginForm { display: grid; gap: 14px; }
#loginForm label { display: grid; gap: 6px; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
#loginForm input { font-size: 1rem; text-transform: none; letter-spacing: 0; }
.hint { color: var(--muted); font-size: .82rem; text-align: center; margin: 4px 0 0; line-height: 1.5; }
.err { color: var(--blood-2); text-align: center; min-height: 1.2em; margin: 0; font-weight: 600; }

/* ---------- Игровой экран ---------- */
#game { display: grid; grid-template-rows: auto 1fr auto; height: 100%; overflow: hidden; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 16px; background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent); }
.tb-left, .tb-right { display: flex; gap: 10px; align-items: center; }
.tb-right { justify-content: flex-end; }
.room-chip, .mode-chip { padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.room-chip b { color: var(--gold-2); letter-spacing: .1em; }
.room-chip .icon-btn { width: 26px; height: 26px; font-size: .8rem; }
.mode-chip { padding-right: 14px; }
.mode-chip.host { color: var(--gold-2); border-color: var(--gold); }
.tb-center { text-align: center; }
.phase-name { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; letter-spacing: .03em; text-shadow: 0 2px 20px rgba(0, 0, 0, .8); }
.phase-sub { font-size: .85rem; color: var(--muted); min-height: 1.1em; }
.timer { position: relative; width: 4.2rem; height: 4.2rem; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.tr-bg { fill: rgba(0, 0, 0, .5); stroke: rgba(255, 255, 255, .1); stroke-width: 6; }
.tr-fg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 276.46; transition: stroke-dashoffset .25s linear, stroke .3s; }
#timerText { position: relative; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.timer.low .tr-fg { stroke: var(--blood-2); }
.timer.low #timerText { color: var(--blood-2); animation: pulse .5s ease-in-out infinite alternate; }
.timer.paused { opacity: .6; }
.timer.paused #timerText::after { content: ' ❚❚'; font-size: .55rem; }
@keyframes pulse { to { transform: scale(1.15); } }

.stage { position: relative; display: flex; min-height: 0; overflow: hidden; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin: 8px; overflow: auto; }
.side-panel { width: 21rem; display: flex; flex-direction: column; overflow: hidden; transition: margin .4s var(--ease), opacity .3s; }
.side-panel.closed { margin-right: -22rem; opacity: 0; pointer-events: none; }
.host-panel { width: 22rem; padding: 1rem; }

/* ---------- Стол ---------- */
.table-wrap { position: relative; flex: 1; min-width: 0; }
.table { position: absolute; left: 50%; top: 50%; width: var(--tw, 600px); height: var(--th, 340px); transform: translate(-50%, -50%); border-radius: 50%; }
.table::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(ellipse at 50% 30%, #6b4426, #3a2213 60%, #1e1109); box-shadow: 0 40px 80px rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 220, 170, .25), inset 0 -6px 12px rgba(0, 0, 0, .5); }
.table::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(214, 177, 106, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); pointer-events: none; }
.table-felt { position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background-image: url(/sprites/table.webp), radial-gradient(ellipse at 50% 45%, #1c6b50 0%, var(--felt) 45%, var(--felt-2) 100%);
  background-size: 100% 100%, cover; box-shadow: inset 0 0 60px rgba(0, 0, 0, .65); }
.table-felt::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(243, 217, 155, .18); }
.table-felt::before { content: ''; position: absolute; inset: 0; background: #020611; opacity: 0; transition: opacity 2.5s; z-index: 1; }
.is-night .table-felt::before { opacity: .45; }
.lamp { position: absolute; left: 50%; top: 50%; width: calc(var(--tw, 600px) * 1.25); height: calc(var(--th, 340px) * 1.5); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 223, 150, .22), transparent 65%); pointer-events: none; transition: opacity 2.5s; }
.is-night .lamp { background: radial-gradient(ellipse, rgba(120, 160, 255, .12), transparent 65%); }
.table-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.center-msg { position: absolute; top: 64%; left: 50%; transform: translateX(-50%); width: 70%; text-align: center; font-family: var(--serif); font-size: 1.05rem; color: rgba(243, 217, 155, .85); text-shadow: 0 2px 8px #000; }
.deck { position: relative; width: 70px; height: 105px; transition: opacity .5s; }
.deck .card { position: absolute; inset: 0; }

/* ---------- Карты ---------- */
.card { border-radius: 9px; background-color: #1a1210; background-size: cover; background-position: center;
  background-image: url(/sprites/card-back.webp), url(/sprites/fallback/card-back.svg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(214, 177, 106, .5); }
.card.face { background-color: #f1e6cf; }
.fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.fly-layer .card { position: absolute; width: 70px; height: 105px; left: 0; top: 0; will-change: transform; }

/* ---------- Места игроков ---------- */
.seats { position: absolute; inset: 0; z-index: 10; }
.seat { position: absolute; width: 7.4rem; transform: translate(-50%, -50%); text-align: center; transition: left .7s var(--ease), top .7s var(--ease), opacity .4s; }
.seat .ava-wrap { position: relative; width: 4.6rem; height: 4.6rem; margin: 0 auto; }
.seat .ava { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.45rem; color: #fff; border: 2px solid rgba(214, 177, 106, .7); box-shadow: 0 6px 18px rgba(0, 0, 0, .6), inset 0 -8px 16px rgba(0, 0, 0, .35); background-size: cover; position: relative; overflow: hidden; transition: box-shadow .3s, border-color .3s, transform .3s; }
.seat .num { position: absolute; left: -.4rem; top: -.3rem; min-width: 1.6rem; height: 1.6rem; padding: 0 .25rem; border-radius: .8rem; background: #0c0a09; border: 1px solid var(--gold); color: var(--gold-2); font-size: .75rem; font-weight: 700; display: grid; place-items: center; z-index: 2; }
.seat .net { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #3fbf6f; border: 2px solid #0c0a09; z-index: 2; }
.seat.offline .net { background: #777; }
.seat.offline .ava { filter: grayscale(.6) brightness(.7); }
.seat .name { margin-top: .35rem; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px #000; }
.seat.me .name { color: var(--gold-2); }
.seat .role-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .06em; }
.seat .tag { white-space: nowrap; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-height: 1em; }
.seat .fouls { display: flex; gap: 3px; justify-content: center; margin-top: 3px; min-height: 6px; }
.seat .fouls i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.seat .fouls i.on { background: #f0b23a; box-shadow: 0 0 6px #f0b23a; }
.seat .mini { position: absolute; width: 30px; height: 45px; border-radius: 5px; top: 50%; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); left: var(--cx, 50%); transition: transform .5s; box-shadow: 0 3px 8px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(214, 177, 106, .5); }
.seat .mini.face { background-color: #f1e6cf; }
.seat .role-label { font-size: .78rem; font-weight: 700; color: var(--gold-2); }
.seat .role-label.mafia { color: var(--blood-2); }
.seat.speaking .ava { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(243, 217, 155, .25), 0 0 28px 6px rgba(243, 217, 155, .55); animation: speak 1.4s ease-in-out infinite; }
@keyframes speak { 50% { transform: scale(1.06); } }
.seat.speaking::before { content: '🎙'; position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 1rem; animation: bob 1s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translate(-50%, -4px); } }
.seat.nominated .ava { border-color: var(--blood-2); }
.seat .badge { position: absolute; right: -10px; top: -6px; background: var(--blood); color: #fff; font-size: .62rem; padding: 2px 6px; border-radius: 8px; font-weight: 700; z-index: 3; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.seat .votes { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); display: flex; gap: 2px; }
.seat .voted-mark { position: absolute; left: -10px; bottom: 0; font-size: .9rem; z-index: 3; }
.seat.dead { filter: grayscale(1); opacity: .55; }
.seat.dead .ava::after { content: ''; position: absolute; inset: 0; background: linear-gradient(45deg, transparent 46%, var(--blood-2) 47% 53%, transparent 54%), linear-gradient(-45deg, transparent 46%, var(--blood-2) 47% 53%, transparent 54%); opacity: .85; }
.is-night .seat:not(.dead) .ava { filter: brightness(.65) saturate(.7); }
.is-night .seat.awake .ava { filter: none; border-color: #8fb3ff; box-shadow: 0 0 20px 4px rgba(143, 179, 255, .4); }
.seat.targetable { cursor: pointer; }
.seat.targetable .ava { animation: tgt 1.6s ease-in-out infinite; }
.seat.targetable:hover .ava { transform: scale(1.08); border-color: #fff; }
@keyframes tgt { 50% { transform: scale(1.05); } }
.seat.selected .ava { border-color: var(--blood-2) !important; box-shadow: 0 0 0 4px rgba(224, 67, 79, .35), 0 0 30px rgba(224, 67, 79, .7) !important; animation: none; }
.seat.selected.good .ava { border-color: #6fd3a0 !important; box-shadow: 0 0 0 4px rgba(111, 211, 160, .35), 0 0 30px rgba(111, 211, 160, .6) !important; }
.seat .marks { position: absolute; right: -14px; bottom: -2px; display: flex; flex-direction: column; gap: 2px; z-index: 3; font-size: .8rem; }
.seat.just-died { animation: died 1.4s var(--ease); }
@keyframes died { 0% { transform: translate(-50%, -50%) scale(1); } 20% { transform: translate(-50%, -50%) scale(1.15); } 100% { transform: translate(-50%, -50%) scale(1); } }

/* ---------- Нижняя панель ---------- */
.dock { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding: .6rem 1.2rem 1rem; background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .0)); min-height: 8.5rem; }
.my-card { width: 5.2rem; height: 7.8rem; border-radius: 9px; position: relative; cursor: pointer; perspective: 600px; user-select: none; -webkit-user-select: none; touch-action: none; }
.my-card:empty { visibility: hidden; }
.my-card .flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s var(--ease); }
.my-card.peek .flip { transform: rotateY(180deg); }
.my-card .flip > div { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.my-card .flip .f { transform: rotateY(180deg); }
.my-card::after { content: 'удерживайте'; position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: .6rem; color: var(--muted); letter-spacing: .1em; }
.dock-main { min-width: 0; display: grid; gap: 8px; justify-items: center; text-align: center; }
.dock-prompt { font-family: var(--serif); font-size: 1.35rem; }
.dock-prompt small { display: block; font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: 2px; }
.dock-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dock-know { max-width: 18rem; font-size: .88rem; display: grid; gap: 4px; }
.dock-know .k { padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); }
.dock-know .k b.bad { color: var(--blood-2); }
.dock-know .k b.good { color: #6fd3a0; }

/* ---------- Журнал и чат ---------- */
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; color: var(--muted); font-weight: 600; position: relative; }
.tab.active { color: var(--gold-2); }
.tab.active::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 2px; background: var(--gold); }
.tab .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blood-2); margin-left: 6px; vertical-align: middle; }
.tab-body { flex: 1; overflow: auto; padding: 10px 12px; min-height: 0; }
#chatBox { display: flex; flex-direction: column; padding: 0; }
.chat-list { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: .5em .7em; }
.chat-form select { padding: .4em; max-width: 92px; }
.msg { font-size: .92rem; line-height: 1.4; }
.msg b { color: var(--gold-2); }
.msg.mafia { color: #ffb0b5; }
.msg.mafia b::before { content: '🔪 '; }
.msg.ghost { color: #aab8d6; font-style: italic; }
.msg.ghost b::before { content: '👻 '; }
.log-item { font-size: .92rem; line-height: 1.45; padding: 6px 0 6px 12px; border-left: 2px solid rgba(255, 255, 255, .1); margin-bottom: 4px; animation: slidein .4s var(--ease); }
.log-item time { color: var(--muted); font-size: .72rem; margin-right: 6px; }
.log-item.night { border-color: #5671b8; color: #c8d4f5; }
.log-item.day { border-color: #f0b23a; }
.log-item.death { border-color: var(--blood-2); color: #ffc7cb; }
.log-item.vote { border-color: #c77dff; }
.log-item.end { border-color: var(--gold); color: var(--gold-2); font-weight: 700; }
.log-item.announce { border-color: var(--gold); color: var(--gold-2); }
.log-item.foul { border-color: #f0b23a; color: #ffe0a3; }
@keyframes slidein { from { opacity: 0; transform: translateX(10px); } }

/* ---------- Панель ведущего / настройки ---------- */
.hp-title { font-family: var(--serif); font-size: 1.2rem; color: var(--gold-2); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.hp-sec { border-top: 1px solid var(--line); padding: 12px 0; }
.hp-sec:first-of-type { border-top: none; }
.hp-sec h4 { margin: 0 0 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.hp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hp-row + .hp-row { margin-top: 6px; }
.hp-players { display: grid; gap: 4px; }
.hp-p { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: 6px; align-items: center; padding: 5px 6px; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: .82rem; }
.hp-p.dead { opacity: .5; }
.hp-p.speaking { background: rgba(243, 217, 155, .12); }
.hp-p .n { color: var(--gold-2); font-weight: 700; text-align: center; }
.hp-p .r { font-size: .7rem; color: var(--muted); }
.hp-p .r.mafia { color: var(--blood-2); }
.hp-p .acts { display: flex; gap: 3px; }
.hp-p .acts button { width: 1.7rem; height: 1.7rem; border-radius: 6px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); cursor: pointer; font-size: .72rem; padding: 0; }
.hp-p .acts button:hover { background: rgba(214, 177, 106, .25); }
.night-board { display: grid; gap: 4px; font-size: .82rem; }
.night-board div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; background: rgba(0, 0, 0, .3); border-radius: 6px; }
.night-board span:last-child { color: var(--gold-2); font-weight: 600; }
.set-grid { display: grid; grid-template-columns: 1fr 72px; gap: 6px 10px; align-items: center; font-size: .84rem; }
.set-grid input[type=number] { padding: .35em .5em; width: 100%; }
.switch { display: flex; align-items: center; gap: 8px; font-size: .84rem; cursor: pointer; margin: 4px 0; }
.switch input { accent-color: var(--gold); width: 16px; height: 16px; }
textarea.notes { width: 100%; min-height: 80px; resize: vertical; font-size: .84rem; }

/* ---------- Баннер фазы ---------- */
.banner { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.banner.show { animation: banner 2.4s var(--ease) forwards; }
.banner-inner { text-align: center; padding: 30px 80px; background: radial-gradient(ellipse, rgba(0, 0, 0, .75), transparent 70%); }
.banner small { display: block; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); font-size: .8rem; margin-bottom: 8px; }
.banner strong { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 900; line-height: 1; background: linear-gradient(180deg, #fff6dc, #d6b16a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.banner.blood strong { background: linear-gradient(180deg, #ffd0d3, #c3313c); -webkit-background-clip: text; background-clip: text; }
.banner.night strong { background: linear-gradient(180deg, #ffffff, #8fb3ff); -webkit-background-clip: text; background-clip: text; }
@keyframes banner { 0% { opacity: 0; transform: scale(1.12); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.98); } }

/* ---------- Открытие роли ---------- */
.reveal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; align-content: center; gap: 22px; background: radial-gradient(ellipse at center, rgba(20, 12, 8, .75), rgba(0, 0, 0, .94)); animation: fadein .5s; }
@keyframes fadein { from { opacity: 0; } }
.reveal-card { width: min(300px, 70vw); aspect-ratio: 2/3; perspective: 1200px; }
.card3d { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); transform: rotateY(0) scale(.85); }
.reveal.flipped .card3d { transform: rotateY(180deg) scale(1); }
.card3d .face { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; background-size: cover; background-position: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .8), inset 0 0 0 2px rgba(214, 177, 106, .7); }
.card3d .back { background-image: url(/sprites/card-back.webp), url(/sprites/fallback/card-back.svg); background-color: #1a1210; }
.card3d .front { transform: rotateY(180deg); overflow: hidden; }
.role-face { position: absolute; inset: 0; background-size: cover; background-position: center; }
.role-face .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px; text-align: center; background: linear-gradient(0deg, rgba(10, 6, 4, .95), rgba(10, 6, 4, .7) 60%, transparent); }
.role-face .cap h3 { margin: 0; font-family: var(--serif); font-size: 1.6rem; color: var(--gold-2); }
.role-face.team-mafia .cap h3 { color: #ff8a92; }
.role-face .cap p { margin: 6px 0 0; font-size: .82rem; color: #e3d6bb; line-height: 1.4; }
.my-card .role-face .cap { padding: 14px 4px 5px; }
.my-card .role-face .cap h3 { font-size: .68rem; }
.my-card .role-face .cap p { display: none; }
.reveal-hint { color: var(--muted); margin: 0; opacity: 0; transition: opacity .5s 1s; }
.reveal.flipped .reveal-hint { opacity: 1; }
.reveal .btn { opacity: 0; transition: opacity .5s 1.2s; }
.reveal.flipped .btn { opacity: 1; }
.shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%); transform: translateX(-100%); animation: shine 2.5s 1.2s ease-in-out; pointer-events: none; }
@keyframes shine { to { transform: translateX(100%); } }

/* ---------- Модалка и тосты ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0, 0, 0, .7); padding: 20px; animation: fadein .25s; }
.modal-box { position: relative; width: min(640px, 100%); max-height: 85vh; overflow: auto; padding: 26px 28px; background: #15110f; border: 1px solid var(--line); border-radius: 18px; line-height: 1.55; }
.modal-box h2 { font-family: var(--serif); color: var(--gold-2); margin-top: 0; }
.modal-box h3 { font-family: var(--serif); margin-bottom: 4px; }
.modal-x { position: absolute; right: 12px; top: 10px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.roles-grid .rc { aspect-ratio: 2/3; position: relative; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.roles-grid .rc .role-face .cap { padding: 26px 8px 8px; }
.roles-grid .rc .role-face .cap h3 { font-size: 1rem; }
.roles-grid .rc .role-face .cap p { font-size: .7rem; }
.toasts { position: fixed; right: 18px; top: 86px; justify-items: end; z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 12px; background: rgba(15, 11, 9, .95); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: toast 4s var(--ease) forwards; font-size: .9rem; max-width: 90vw; }
.toast.err { border-color: var(--blood-2); color: #ffc7cb; }
.toast.gold { border-color: var(--gold); color: var(--gold-2); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- Финал ---------- */
.end-box { text-align: center; }
.end-box .win { font-family: var(--serif); font-size: 2.6rem; margin: 4px 0; }
.end-box .win.mafia { color: #ff8a92; }
.end-box .win.town { color: #a8e6c4; }
.end-box .win.maniac { color: #c9a0ff; }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 65; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .side-panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 40; }
  .host-panel { position: absolute; left: 0; top: 0; bottom: 0; z-index: 40; width: 300px; }

}
@media (max-width: 700px) {
  .topbar { grid-template-columns: 1fr auto; padding: 8px 10px; gap: 6px; }
  .tb-right { gap: 6px; }
  .icon-btn { width: 2.1rem; height: 2.1rem; font-size: .85rem; }
  .timer { width: 3.4rem; height: 3.4rem; }
  .room-chip { font-size: 0; padding-left: 10px; gap: 4px; }
  .room-chip b { font-size: .85rem; }
  .sun, .moon { width: 22vmin; height: 22vmin; margin-left: -11vmin; }
  .dock { gap: 10px; padding: 8px 10px 12px; min-height: 0; }
  .my-card { width: 3.6rem; height: 5.4rem; }
  .dock-prompt { font-size: 1rem; }
  .dock-actions .btn { padding: .5em .8em; font-size: .85rem; }
  .seat .tag, .seat .role-label { font-size: .58rem; }
  .seat .fouls { display: none; }
  .toasts { right: 10px; left: 10px; top: 120px; justify-items: center; }
  .tb-center { grid-column: 1 / -1; grid-row: 2; }
  .mode-chip { display: none; }
  .phase-name { font-size: 1.3rem; }
  .seat { width: 5rem; }
  .seat .ava-wrap { width: 3rem; height: 3rem; }
  .seat .ava { font-size: 1rem; }
  .seat .name { font-size: .78rem; }
  .seat .mini { display: none; }
  .dock { grid-template-columns: auto 1fr; }
  .dock-know { grid-column: 1 / -1; max-width: none; }
  .host-panel { width: 100%; }
  .side-panel { width: 100%; }
  .side-panel.closed { margin-right: 8px; transform: translateX(110%); }
}

.host-panel.collapsed { bottom: auto !important; max-height: 58px; overflow: hidden; width: 240px !important; }
.host-panel.collapsed [data-collapse] { transform: rotate(-90deg); }
.hp-title .icon-btn { width: 28px; height: 28px; font-size: .8rem; }

/* Когда есть картинки города, своё солнце и луна не нужны — они уже нарисованы */
.has-bg .sun, .has-bg .moon { opacity: 0; }
.has-bg .orbit { display: none; }
.has-bg .stars { inset: 0 0 60% 0; opacity: 0; }
.has-bg.is-night .stars { opacity: .5; }

/* Выбор при входе: игроком или ведущим */
.seat-role { border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem .6rem; margin: 0; display: grid; gap: 6px; }
.seat-role legend { padding: 0 .4rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.host-toggle { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; font-size: .9rem !important; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer; color: var(--muted); }
.host-toggle input { accent-color: var(--gold); width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ===== Экран входа: столы, рейтинг, аватары ===== */
#login { overflow-y: auto; }
.login-wrap { display: flex; gap: 1.4rem; align-items: stretch; justify-content: center; flex-wrap: wrap; width: 100%; max-width: 62rem; }
.lobby-card { width: min(27rem, 100%); display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(20, 15, 12, .9), rgba(10, 8, 7, .94)); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; animation: rise .9s .1s var(--ease) both; min-height: 22rem; max-height: 40rem; }
.ltab-body { flex: 1; overflow: auto; padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; min-height: 0; }
.tables-list { display: grid; gap: .5rem; }
.table-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem .8rem; padding: .7rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.table-item:hover { border-color: var(--line); background: rgba(214, 177, 106, .08); transform: translateY(-1px); }
.table-item.sel { border-color: var(--gold); background: rgba(214, 177, 106, .12); }
.table-item b { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-2); letter-spacing: .05em; }
.table-item .meta { grid-column: 1; font-size: .82rem; color: var(--muted); }
.table-item .seats-n { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 700; }
.table-item .seats-n small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.table-item .live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3fbf6f; margin-right: 6px; vertical-align: middle; }
.table-item.playing .live { background: #f0b23a; }
.btn-new-table { margin-top: auto; }
.muted-note { color: var(--muted); font-size: .88rem; text-align: center; margin: .6rem 0; }
.muted-note.small { font-size: .76rem; line-height: 1.5; margin-top: auto; }
.top-row { display: grid; grid-template-columns: 2rem 1fr auto auto; gap: .6rem; align-items: center; padding: .45rem .6rem; border-radius: 10px; font-size: .9rem; }
.top-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.top-row .pl { color: var(--gold-2); font-weight: 700; text-align: center; }
.top-row:nth-child(1) .pl { color: #ffd76a; } .top-row:nth-child(2) .pl { color: #d9dee6; } .top-row:nth-child(3) .pl { color: #e0a36a; }
.top-row .rt { font-weight: 700; font-variant-numeric: tabular-nums; }
.top-row .gm { color: var(--muted); font-size: .78rem; }
.ava-pick-row { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: end; }
.ava-pick-row .grow { min-width: 0; }
.ava-pick-row .grow input { width: 100%; min-width: 0; box-sizing: border-box; }
.ava-current { width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 2px solid var(--gold); background: #222 center/cover; cursor: pointer; padding: 0; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); position: relative; transition: transform .2s; }
.ava-current:hover { transform: scale(1.06); }
.ava-current::after { content: '✎'; position: absolute; right: -4px; bottom: -4px; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--gold); color: #1b1309; font-size: .7rem; display: grid; place-items: center; }
.ava-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; padding: .6rem; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); animation: fadein .25s; }
.ava-grid button { aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; background: #222 center/cover; cursor: pointer; padding: 0; transition: transform .15s, border-color .15s, opacity .2s; }
.ava-grid button:hover { transform: scale(1.1); border-color: var(--gold-2); }
.ava-grid button.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 177, 106, .3); }
.ava-grid button.taken { opacity: .35; }
.modal .ava-grid { grid-template-columns: repeat(6, 1fr); }
.seat.me.can-edit .ava-wrap { cursor: pointer; }
.seat.me.can-edit .ava-wrap::after { content: '✎'; position: absolute; right: -2px; top: -4px; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--gold); color: #1b1309; font-size: .75rem; display: grid; place-items: center; z-index: 4; }
.seat .rating { font-size: .7rem; color: var(--gold); opacity: .85; }

/* ===== Путана: без голоса ===== */
.seat .badge.muted { background: #a8326e; }
.seat.muted .ava { box-shadow: 0 0 0 3px rgba(232, 90, 160, .5), 0 6px 18px rgba(0, 0, 0, .6); }

/* ===== Прожектор на говорящем ===== */
.spotlight { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .6s; }
.spotlight.on { opacity: 1; }
.spotlight .beam { position: absolute; left: 0; top: 0; width: 18rem; height: 10px; transform-origin: 50% 0; transition: transform .8s var(--ease), height .8s var(--ease);
  background: linear-gradient(180deg, rgba(255, 236, 190, .0), rgba(255, 236, 190, .08) 40%, rgba(255, 236, 190, .17) 92%, rgba(255, 236, 190, 0));
  clip-path: polygon(47% 0, 53% 0, 82% 100%, 18% 100%); mix-blend-mode: screen; filter: blur(6px); }
.spotlight .pool { position: absolute; width: 11rem; height: 5.5rem; border-radius: 50%; transform: translate(-50%, -30%); transition: left .8s var(--ease), top .8s var(--ease);
  background: radial-gradient(ellipse, rgba(255, 236, 190, .32), rgba(255, 236, 190, .08) 55%, transparent 70%); mix-blend-mode: screen; }
.is-night .spotlight { display: none; }

/* ===== Выстрел ===== */
.flash { position: fixed; inset: 0; z-index: 75; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgba(255, 245, 210, .95), rgba(255, 170, 80, .45) 12%, rgba(120, 0, 0, .25) 35%, transparent 60%); }
.flash.go { animation: flash .55s ease-out; }
@keyframes flash { 0% { opacity: 0; } 8% { opacity: 1; } 100% { opacity: 0; } }
.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); } }
.bullet-hole { position: absolute; width: 1.6rem; height: 1.6rem; margin: -.8rem 0 0 -.8rem; border-radius: 50%; z-index: 12; pointer-events: none;
  background: radial-gradient(circle, #050302 0 28%, #3a1a10 34%, rgba(90, 30, 10, .6) 46%, transparent 62%); animation: hole 2.4s ease-out forwards; }
@keyframes hole { 0% { transform: scale(.2); opacity: 0; } 10% { transform: scale(1.25); opacity: 1; } 70% { opacity: .9; } 100% { opacity: 0; transform: scale(1); } }

/* ===== Монета при ничьей ===== */
.coin-stage { position: fixed; inset: 0; z-index: 72; display: grid; place-items: center; align-content: center; gap: 1.2rem; pointer-events: none; background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 60%); animation: fadein .3s; }
.coin { width: 9rem; height: 9rem; position: relative; transform-style: preserve-3d; animation: coinflip 1.9s cubic-bezier(.2, .7, .3, 1) forwards; }
.coin-face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; background: url(/sprites/coin.webp) center/cover, radial-gradient(circle at 35% 30%, #fff1c2, #d6b16a 45%, #8e6a2c 75%); box-shadow: 0 0 0 3px #8e6a2c, 0 14px 40px rgba(0, 0, 0, .6); }
.coin-face.back { transform: rotateY(180deg); filter: hue-rotate(-12deg) brightness(.92); }
@keyframes coinflip { 0% { transform: translateY(40vh) rotateY(0) scale(.6); } 45% { transform: translateY(-14vh) rotateY(1440deg) scale(1.1); } 100% { transform: translateY(0) rotateY(2160deg) scale(1); } }
.coin-text { font-family: var(--serif); font-size: 1.8rem; color: var(--gold-2); text-shadow: 0 2px 14px #000; opacity: 0; animation: fadein .4s 1.5s forwards; }

/* ===== Итоги: изменение рейтинга ===== */
.rc .delta { position: absolute; top: .5rem; right: .5rem; z-index: 3; font-weight: 800; font-size: .85rem; padding: .15rem .45rem; border-radius: 8px; background: rgba(0, 0, 0, .7); }
.rc .delta.up { color: #7ee2a8; } .rc .delta.down { color: #ff8a92; }
.rc.won { box-shadow: inset 0 0 0 2px var(--gold); }

@media (max-width: 900px) { .login-wrap { flex-direction: column; align-items: center; } .lobby-card { max-height: none; } #login { place-items: start center; } }
@media (max-width: 700px) { .ava-grid { grid-template-columns: repeat(6, 1fr); gap: .3rem; padding: .4rem; } }
.set-grid select { grid-column: 1 / -1; padding: .4em .5em; width: 100%; }

/* ===== Главное меню ===== */
#menu { overflow-y: auto; display: grid; place-items: center; padding: 2rem 1.2rem; }
.menu-wrap { width: min(70rem, 100%); }
.menu-head { text-align: center; margin-bottom: 2rem; animation: rise .8s var(--ease) both; }
.menu-head h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: .3rem 0 0; background: linear-gradient(180deg, #fff1c9, #d6b16a 60%, #8e6a2c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu-head .logo-rule { margin: .7rem auto 0; }
.menu-head h1.brand-logo { background: none; margin: 0 0 .6rem; line-height: 0; }
.menu-head .logo-small { text-shadow: 0 1px 8px rgba(0, 0, 0, .9); color: #d9cfbd; }
.android-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem; padding: .5rem 1.1rem; border-radius: 999px; background: rgba(12, 10, 9, .72); border: 1px solid rgba(255, 106, 26, .55); color: #ffb27a; font-weight: 700; font-size: .9rem; text-decoration: none; backdrop-filter: blur(6px); transition: background .2s, color .2s, border-color .2s; }
.android-link:hover { background: #ff6a1a; color: #140a00; border-color: #ff6a1a; }
.menu-head h1.brand-logo img { width: min(34rem, 86vw); height: auto; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.6rem; }
.game-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, rgba(20, 15, 12, .92), rgba(10, 8, 7, .96)); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(0, 0, 0, .6); transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; animation: rise .8s var(--ease) both; }
.game-card:nth-child(2) { animation-delay: .1s; } .game-card:nth-child(3) { animation-delay: .2s; } .game-card:nth-child(4) { animation-delay: .3s; } .game-card:nth-child(5) { animation-delay: .4s; } .game-card:nth-child(6) { animation-delay: .5s; }
.game-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px var(--gold), 0 0 50px rgba(214, 177, 106, .15); }
.g-hands:hover { border-color: #ff4d57; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #ff4d57, 0 0 50px rgba(255, 77, 87, .2); }
.g-art { position: relative; height: 15rem; overflow: hidden; }
.g-bg { position: absolute; inset: 0; background: center 35%/cover; transition: transform .8s var(--ease); }
.game-card:hover .g-bg { transform: scale(1.06); }
.g-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 8, 7, 1), transparent 60%); }
.g-fan { position: absolute; left: 50%; bottom: -1.5rem; z-index: 2; display: flex; transform: translateX(-50%); }
.g-fan i { width: 5.6rem; height: 8.4rem; border-radius: 9px; background: center/cover; box-shadow: 0 10px 26px rgba(0, 0, 0, .8); margin: 0 -1rem; transition: transform .4s var(--ease); border: 1px solid rgba(255, 255, 255, .2); }
.g-fan i:nth-child(1) { transform: rotate(-14deg) translateY(10px); } .g-fan i:nth-child(2) { transform: translateY(-6px); z-index: 2; } .g-fan i:nth-child(3) { transform: rotate(14deg) translateY(10px); }
.game-card:hover .g-fan i:nth-child(1) { transform: rotate(-22deg) translate(-14px, 4px); } .game-card:hover .g-fan i:nth-child(2) { transform: translateY(-16px) scale(1.05); } .game-card:hover .g-fan i:nth-child(3) { transform: rotate(22deg) translate(14px, 4px); }
.g-hands .g-fan i { height: 9.6rem; }
.g-new { position: absolute; right: 1rem; top: 1rem; z-index: 3; background: #ff4d57; color: #fff; font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 8px; box-shadow: 0 4px 14px rgba(255, 77, 87, .5); }
.g-body { padding: 2.2rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; position: relative; z-index: 3; }
.g-body h2 { font-family: var(--serif); font-size: 2rem; margin: 0; color: var(--gold-2); text-align: center; }
.g-hands h2 { color: #ff8f88; }
.g-body p { margin: 0; color: #d8ccb6; line-height: 1.5; text-align: center; flex: 1; }
.g-meta { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; font-size: .82rem; }
.g-meta span { padding: .25rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted); }
.g-meta .g-live { color: #7ee2a8; border-color: rgba(126, 226, 168, .3); }
.g-hands .btn-gold { background: linear-gradient(180deg, #e2463f, #7d1015); color: #fff; border-color: #ff7a72; }
.back-link { position: absolute; left: 1.2rem; top: 1rem; color: var(--muted); text-decoration: none; font-size: .85rem; z-index: 2; }
.back-link:hover { color: var(--gold-2); }
a.icon-btn { text-decoration: none; color: inherit; }

/* карточка «Лжеца» в меню */
.g-liar:hover { border-color: #e8b45c; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e8b45c, 0 0 50px rgba(232, 180, 92, .22); }
.g-liar h2 { color: #f3c879; }
.g-liar .btn-gold { background: linear-gradient(180deg, #e7b75c, #8a5a1c); color: #1a0f04; border-color: #ffd98c; }
.g-liar .g-new { background: #e8a33c; color: #1a0f04; box-shadow: 0 4px 14px rgba(232, 163, 60, .5); }
.g-props i { background-size: contain !important; background-repeat: no-repeat !important; background-position: center bottom !important; border: 0 !important; box-shadow: none !important; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .85)); width: 6rem !important; height: 7rem !important; }
.g-props i:nth-child(1) { width: 4.4rem !important; }

/* четыре игры в ряд на широком экране */
.menu-wrap { width: min(88rem, 100%); }
.games { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.3rem; }
.g-mono:hover { border-color: #e9bd5e; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e9bd5e, 0 0 50px rgba(233, 189, 94, .22); }
.g-mono h2 { color: #f0cd7c; }
.g-mono .g-new { background: #2fa85a; color: #fff; box-shadow: 0 4px 14px rgba(47, 168, 90, .5); }

/* карточка «Одна!» в меню */
.g-uno:hover { border-color: #ff6bd5; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #ff6bd5, 0 0 50px rgba(255, 107, 213, .25); }
.g-uno h2 { background: linear-gradient(90deg, #ff2e4d, #ffc300, #22d47a, #2e8bff); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; }
.g-uno .btn-gold { background: linear-gradient(180deg, #ff6bd5, #8a1fb0); color: #fff; border-color: #ffb0ee; }
.g-uno .g-new { background: #ff6bd5; color: #fff; box-shadow: 0 4px 14px rgba(255, 107, 213, .5); }
.g-ucards i { display: grid; place-items: center; background: radial-gradient(ellipse, #2a1240, #0a0612) !important; border: 3px solid var(--k) !important; box-shadow: 0 0 16px var(--k), 0 10px 26px rgba(0, 0, 0, .8) !important; }
.g-ucards i.r { --k: #ff2e4d; } .g-ucards i.b { --k: #2e8bff; } .g-ucards i.w { --k: #ff6bd5; }
.g-ucards b { font-family: var(--serif); font-style: italic; font-size: 2.6rem; color: #fff; text-shadow: 0 0 8px var(--k), 0 0 20px var(--k); }
/* карточка «Улик» в меню */
.g-cl:hover { border-color: #d8b878; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #d8b878, 0 0 50px rgba(216, 184, 120, .22); }
.g-cl h2 { color: #ecd7a6; letter-spacing: .08em; }
.g-cl .btn-gold { background: linear-gradient(180deg, #d9b56b, #7a5522); color: #1a1008; border-color: #f0d79b; }
.g-cl .g-new { background: #9b2a20; color: #fff; box-shadow: 0 4px 14px rgba(155, 42, 32, .5); }
.g-clcards i { display: grid; grid-template-rows: 1fr 1fr; place-items: center; width: 4.2rem !important; height: 7rem !important; border-radius: 7px !important; font-size: 1.9rem; line-height: 1;
  border: 0 !important; box-shadow: 0 0 0 1px rgba(60, 35, 10, .6), inset 0 0 18px rgba(120, 80, 30, .35), 0 10px 26px rgba(0, 0, 0, .8) !important; }
.g-clcards i::before { content: attr(data-a); filter: sepia(.5); } .g-clcards i::after { content: attr(data-b); filter: sepia(.5); }
.g-clcards i:not(.art) { background: linear-gradient(180deg, #eadcbc, #cdb486) !important; }
.g-clcards i.su-clue:not(.art) { background: linear-gradient(180deg, #ead3b4, #b98a5c) !important; } .g-clcards i.su-sea:not(.art) { background: linear-gradient(180deg, #d7e6dc, #7fb0a6) !important; }
.g-clcards i::before { font-family: var(--serif, serif); font-weight: 900; color: #2b1d12; }
.g-clcards i.sp:not(.art) { background: radial-gradient(ellipse, #3a2a18, #150d07 80%) !important; }
.g-clcards i.sp { grid-template-rows: 1fr; box-shadow: 0 0 0 2px #e6c77d, 0 10px 26px rgba(0, 0, 0, .8) !important; font-size: 2.4rem; }
.g-clcards i.sp::after { display: none; }
.g-clcards i.art::before, .g-clcards i.art::after { display: none; }
.g-clcards i.art { background-repeat: no-repeat !important; background-size: 62% auto !important; background-position: center 12%, center 88% !important; }
.g-clcards i.art:not(.sp) { background-color: #e3d3ad !important; }
.g-clcards i.sp.art { background-size: 90% auto !important; background-position: center !important; background-color: #1d140b !important; }
.g-clcards i.art.full, .g-clcards i.sp.art.full { background-size: cover !important; background-position: center !important; }
/* игры: на широком экране — по три в ряд */
@media (min-width: 1100px) { .games { grid-template-columns: repeat(3, 1fr); } }

/* карточка «Виселицы» */
.g-hang:hover { border-color: #e9a95a; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e9a95a, 0 0 50px rgba(233, 169, 90, .22); }
.g-hang h2 { color: #f0b46a; }
.g-hang .btn-gold { background: linear-gradient(180deg, #e9a95a, #8c4f1c); color: #1b0d03; border-color: #ffd29a; }
.g-hang .g-new { background: #d9532e; color: #fff; box-shadow: 0 4px 14px rgba(217, 83, 46, .5); }
.g-hang .g-props i:nth-child(2) { width: 2.4rem !important; }

/* карточка «Последнего патрона» */
.g-shot:hover { border-color: #d0283a; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #d0283a, 0 0 50px rgba(208, 40, 58, .25); }
.g-shot h2 { color: #e6eed0; letter-spacing: .02em; }
.g-shot .btn-gold { background: linear-gradient(180deg, #c4363c, #6e0f16); color: #fff2ee; border-color: #ff8a8a; }
.g-shot .g-new, .g-21 .g-new { background: #d0283a; color: #fff; box-shadow: 0 4px 14px rgba(208, 40, 58, .5); }
.g-pw:hover { border-color: #e2c27a; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e2c27a, 0 0 50px rgba(226, 194, 122, .25); }
.g-pw h2 { color: #f6e8c4; }
.g-pw .btn-gold { background: linear-gradient(180deg, #b8402a, #5e1a10); color: #fff0e0; border-color: #f0a070; }
.g-pw .g-new { background: #b8402a; box-shadow: 0 4px 14px rgba(184, 64, 42, .5); }
.g-pwcards i { width: 4.6rem; height: 6.9rem; }
.g-pwcards i.bk { background: url(/sprites/pw-back.webp) center / cover, repeating-linear-gradient(45deg, rgba(226, 194, 122, .14) 0 4px, transparent 4px 10px), linear-gradient(180deg, #2a2016, #120c08); border-color: rgba(226, 194, 122, .5); }
.g-pwcards i.lv { background-size: cover; background-position: center; background-repeat: no-repeat; }
/* «Карта сокровищ» */
.g-ts .g-bg { background-color: #0d2a30; background-image: radial-gradient(ellipse at 50% 40%, #1b4a50, #05090b 75%); }
.g-ts:hover { border-color: #7fd6c8; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #7fd6c8, 0 0 50px rgba(127, 214, 200, .22); }
.g-ts h2 { color: #f6e8c4; }
.g-ts .btn-gold { background: linear-gradient(180deg, #2f8a86, #12403f); color: #effbf6; border-color: #8fe0d2; }
.g-ts .g-new { background: #2f8a86; box-shadow: 0 4px 14px rgba(47, 138, 134, .5); }
.g-tscards i { width: 4.6rem; height: 6.9rem; display: grid; place-items: center; font-size: 2rem; border-color: rgba(226, 194, 122, .5); background: center / cover no-repeat, linear-gradient(180deg, #1c3a40, #0c1c1f); }
.g-tscards i.t1 { background-image: url(/sprites/tr-role-sailor.webp), linear-gradient(180deg, #1d5f5a, #0a2422); }
.g-tscards i.t2 { background-image: url(/sprites/tr-treasure.webp), linear-gradient(180deg, #8a6a24, #2a1a08); }
.g-tscards i.t3 { background-image: url(/sprites/tr-role-traitor.webp), linear-gradient(180deg, #6a1a10, #200805); }
body.ts-art .g-tscards i b { display: none; }
.g-sgun { position: absolute; left: 50%; bottom: .4rem; z-index: 2; width: 19rem; height: 8rem; transform: translateX(-50%); }
.g-sgun i { position: absolute; background: center / contain no-repeat; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .85)); transition: transform .5s var(--ease); }
.g-sgun .gun { left: 0; right: 0; top: 0; height: 5rem; transform: rotate(-8deg); }
.g-sgun .sh { bottom: 0; width: 1.5rem; height: 3.6rem; left: 6.6rem; transform: rotate(-12deg); }
.g-sgun .sh.b { left: 8.6rem; transform: rotate(4deg); } .g-sgun .sh:nth-child(4) { left: 10.6rem; transform: rotate(16deg); }
.game-card:hover .g-sgun .gun { transform: rotate(-14deg) translateX(-6px); }
.game-card:hover .g-sgun .sh { transform: translateY(-8px) rotate(-18deg); } .game-card:hover .g-sgun .sh.b { transform: translateY(-12px); } .game-card:hover .g-sgun .sh:nth-child(4) { transform: translateY(-8px) rotate(20deg); }

/* карточка «21» */
.g-21:hover { border-color: #e3b866; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e3b866, 0 0 50px rgba(227, 184, 102, .25); }
.g-21 h2 { font-size: 2.6rem; background: linear-gradient(180deg, #fff3d6, #e3b866 55%, #7a4a12); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-21 .btn-gold { background: linear-gradient(180deg, #c4363c, #6e0f16); color: #fff2ee; border-color: #ffb0a0; }
.g-tcards i { border: 0 !important; }
.g-tcards i.num { display: grid; place-items: center; background: url(/sprites/to-face.webp) center / cover !important; }
.g-tcards i.num b { font-family: var(--serif); font-size: 2.6rem; font-weight: 900; color: #6a0a10; }

/* карточка «Пиратского улова» */
.g-pir:hover { border-color: #d9b36a; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #d9b36a, 0 0 50px rgba(127, 224, 208, .2); }
.g-pir h2 { color: #f3e6c4; }
.g-pir .btn-gold { background: linear-gradient(180deg, #e0a848, #7a4a12); color: #1a0d02; border-color: #ffd98a; }
.g-pir .g-new { background: #1a7a7a; color: #fff; box-shadow: 0 4px 14px rgba(26, 122, 122, .5); }
.g-pcards i { border: 0 !important; border-radius: 7px !important; }

/* карточка «Бюро» */
.g-bk:hover { border-color: #e8c22a; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e8c22a, 0 0 50px rgba(168, 224, 90, .2); }
.g-bk h2 { background: linear-gradient(180deg, #fffbe0, #e8c22a 55%, #6a4a0a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-bk .btn-gold { background: linear-gradient(180deg, #e8c24a, #7a5a10); color: #1a1202; border-color: #ffe48a; }
.g-bk .g-new { background: #6a8a1a; color: #fff; box-shadow: 0 4px 14px rgba(106, 138, 26, .5); }
.g-kt .g-bg { background-color: #2a1a3a; background-image: radial-gradient(circle at 30% 30%, #ff9ad5 0, transparent 45%), radial-gradient(circle at 75% 60%, #7ad0ff 0, transparent 45%); }
.g-kt:hover { border-color: #ff9ad5; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #ff9ad5, 0 0 50px rgba(255, 154, 213, .25); }
.g-kt h2 { background: linear-gradient(180deg, #fff, #ffb3df 50%, #8a3fd0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-kt .btn-gold { background: linear-gradient(180deg, #ff8fd0, #8a3fd0); color: #fff; border-color: #ffc4e8; }
.g-kt .g-new { background: #8a3fd0; color: #fff; box-shadow: 0 4px 14px rgba(138, 63, 208, .5); }
.g-ktcards i { background-color: #fff3fa; border: 3px solid #fff7fb !important; }
.g-dk .g-bg { background-color: #0f2a1b; background-image: radial-gradient(ellipse at 50% 40%, #2b7a4f 0, #13402a 45%, #0a1f14 80%); }
.g-dk:hover { border-color: #e9c46a; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px #e9c46a, 0 0 50px rgba(233, 196, 106, .2); }
.g-dk h2 { background: linear-gradient(180deg, #fff6d8, #e9c46a 55%, #8a5a14); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-dk .btn-gold { background: linear-gradient(180deg, #f0cf74, #9c6a1c); color: #1b1206; border-color: #ffe7a6; }
.g-dk .g-new { background: #1f5a3a; color: #ffe7a6; }
.g-dkcards i { position: relative; background: linear-gradient(160deg, #fffdf6, #efe6d2) !important; color: #16120c; }
.g-dkcards i.r { color: #c2182b; }
.g-dkcards i::before { content: attr(data-c) '\A' attr(data-s); white-space: pre; position: absolute; left: .45rem; top: .35rem; font: 900 1.05rem/1 Georgia, serif; text-align: center; }
.g-dkcards i::after { content: attr(data-s); position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; }
.g-kcards i { border: 0 !important; border-radius: 8px !important; background-position: center top !important; }

/* боты: блок в панели создателя и значок на месте */
.bot-add { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bot-lv { display: flex; gap: 3px; }
.bot-lv button { width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: inherit; font-weight: 800; cursor: pointer; }
.bot-lv button.on { border-color: var(--gold); background: rgba(214, 177, 106, .2); color: var(--gold-2); box-shadow: 0 0 10px rgba(214, 177, 106, .3); }
.bot-tag { font-size: .72rem; padding: 0 .35rem; border-radius: 6px; background: rgba(120, 180, 255, .16); color: #b8d4ff; white-space: nowrap; }
.bot-badge { font-size: .62rem; letter-spacing: .04em; color: #b8d4ff; margin-top: 1px; white-space: nowrap; }

/* меню: сортировка и подбор игр */
.g-tools { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .45rem; width: fit-content; max-width: 100%; margin: -.6rem auto 1.4rem; padding: .55rem .8rem; border-radius: 999px; background: rgba(12, 9, 7, .82); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); backdrop-filter: blur(6px); animation: rise .8s var(--ease) .1s both; }
.gt-label { color: #b9a988; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-right: .2rem; }
.g-tools button { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: #e8dcc6; font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.g-tools button:hover { border-color: var(--gold); transform: translateY(-1px); }
.g-tools button.on { border-color: var(--gold); background: linear-gradient(180deg, #e3c27a, #a67c34); color: #1a1003; font-weight: 700; box-shadow: 0 0 14px rgba(214, 177, 106, .25); }
.gt-we { display: inline-flex; align-items: center; gap: .4rem; margin-left: .6rem; color: #e8dcc6; font-size: .9rem; }
.gt-we select { padding: .4rem .6rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 15, 12, .85); color: #f3e6c4; font: inherit; font-size: .9rem; }
.gt-note { width: fit-content; margin: -.8rem auto 1.2rem; padding: .3rem .9rem; border-radius: 999px; background: rgba(12, 9, 7, .78); color: #e8dcc6; font-size: .88rem; text-align: center; }
.games.resort .game-card { animation: resort .45s var(--ease) both; }
@keyframes resort { from { opacity: .35; transform: translateY(10px) scale(.985); } }
.game-card[hidden] { display: none !important; }
/* закрытые игры (data-role): видны только тем, кому открыты — app.js ставит .role-ok */
.game-card[data-role]:not(.role-ok) { display: none !important; }
/* игры, скрытые админкой для этого посетителя (app.js ставит .vis-off и body.lock-<мини-игра>) */
.game-card.vis-off { display: none !important; }
body.lock-tower .mc-item[href="/tower.html"], body.lock-wordle .mc-item[href="/wordle.html"], body.lock-hold .mc-item[href="/hold.html"], body.lock-fishing .mc-item[href="/fishing.html"] { display: none !important; }
.g-meta .g-role { color: #e8c77a; border-color: rgba(232, 199, 122, .4); background: rgba(232, 199, 122, .08); }
.g-diff i { font-style: normal; letter-spacing: -.05em; color: #ffd76a; } .g-diff em { font-style: normal; color: rgba(255, 255, 255, .18); }
.g-diff.d4 i, .g-diff.d5 i { color: #ff9a6a; } .g-diff.d1 i, .g-diff.d2 i { color: #9fe08a; }
@media (max-width: 760px) { .g-tools { border-radius: 18px; } .gt-label { width: 100%; text-align: center; } .gt-we { margin-left: 0; } .g-tools button { padding: .4rem .7rem; font-size: .82rem; } }

.g-ck .g-bg { background:#16342d url('/sprites/checkers-cover.webp') center/cover; }
.g-pk .g-bg { background-color:#123a28; background-image:url('/sprites/pk-cover.webp'), radial-gradient(ellipse at 50% 60%, #1f6b47 0%, #12402b 55%, #0b2419 100%); background-size:cover; background-position:center; }
.g-pk:hover { border-color:#e2b35c; }
.g-pk h2 { color:transparent; background:linear-gradient(#fff1c9,#d79b3c); background-clip:text; }
.g-pk .g-new { background:#5a1d14; color:#ffd98a; }
.g-pkcards i { position:relative; background:#f7f1e3; display:grid; place-items:center; }
.g-pkcards i::after { content:attr(data-c); font:700 2rem/1 Georgia, serif; color:#1d1a17; }
.g-pkcards i.red::after { color:#b3261e; }
.g-ck:hover { border-color:#d8bb83; }
.g-ck h2 { color:transparent; background:linear-gradient(#ffedce,#caa165); background-clip:text; }
.g-ck .btn-gold { background:linear-gradient(#f0d39c,#ae854a); color:#261b0c; }
.g-ck .g-new { background:#20463f; color:#f2d7a1; }
.g-ck .g-fan { bottom:.35rem; }
.g-ck .g-fan i { width:5.3rem; height:5.3rem; background:transparent center/contain no-repeat; box-shadow:none; border:0; filter:drop-shadow(0 4px 5px #000b); }
.g-ck .g-fan i:first-child { background-image:url('/sprites/ck-black.webp'); }
.g-ck .g-fan i:nth-child(2) { background-image:url('/sprites/ck-white-king.webp'); }
.g-ck .g-fan i:last-child { background-image:url('/sprites/ck-black-king.webp'); }
/* ===== главная: колонка «Сейчас играют» и случайная игра ===== */
.menu-wrap { width: min(104rem, 100%); }
.menu-body { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.live-col { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; gap: .6rem; padding: 1rem .9rem; border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 15, 12, .92), rgba(10, 8, 7, .95)); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(0, 0, 0, .55); animation: rise .8s var(--ease) both; }
.lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.lc-head h3 { margin: 0; font-family: var(--serif); font-size: 1.15rem; color: var(--gold-2, #f3e3bd); display: flex; align-items: center; gap: .5rem; }
.lc-head small { color: var(--muted); font-size: .8rem; }
.lc-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #4bd37b; box-shadow: 0 0 0 0 rgba(75, 211, 123, .6); animation: lcPulse 1.8s ease-out infinite; }
@keyframes lcPulse { 70% { box-shadow: 0 0 0 .5rem rgba(75, 211, 123, 0); } 100% { box-shadow: 0 0 0 0 rgba(75, 211, 123, 0); } }
.lc-list { overflow: auto; display: grid; gap: .4rem; padding-right: .15rem; scrollbar-width: thin; }
.lc-list h4 { margin: .5rem 0 .1rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lc-list h4 small { letter-spacing: 0; text-transform: none; font-weight: 500; opacity: .8; }
.lc-list h4:first-child { margin-top: 0; }
.lc-item { display: grid; grid-template-columns: .55rem 1fr auto; grid-template-areas: 'dot g go' 'dot code go' 'dot meta go'; column-gap: .55rem; align-items: center; padding: .5rem .6rem; border-radius: 12px; text-decoration: none; color: inherit;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); transition: border-color .15s, background .15s, transform .15s; }
.lc-item:hover { border-color: var(--dot); background: color-mix(in srgb, var(--dot) 10%, transparent); transform: translateX(2px); }
.lc-item > i { grid-area: dot; align-self: stretch; width: .3rem; border-radius: 4px; background: var(--dot); box-shadow: 0 0 10px color-mix(in srgb, var(--dot) 60%, transparent); }
.lc-g { grid-area: g; font-weight: 700; font-size: .9rem; line-height: 1.15; }
.lc-code { grid-area: code; font-size: .78rem; color: var(--dot); letter-spacing: .06em; }
.lc-item small { grid-area: meta; font-size: .72rem; color: var(--muted); }
.lc-go { grid-area: go; font-size: .74rem; font-weight: 800; padding: .28rem .55rem; border-radius: 999px; border: 1px solid var(--dot); color: var(--dot); white-space: nowrap; }
.lc-item.lobby .lc-go, .lc-item.end .lc-go { background: var(--dot); color: #140e06; }
.lc-empty { margin: .3rem 0; font-size: .85rem; line-height: 1.45; color: var(--muted); text-align: center; }
.lc-random { width: 100%; margin-top: .2rem; }
.gt-random { padding: .45rem 1rem !important; border-color: var(--gold) !important; background: linear-gradient(180deg, #e3c27a, #a67c34) !important; color: #1a1003 !important; font-weight: 800 !important; margin-right: .4rem; }
.gt-random:hover { box-shadow: 0 0 18px rgba(214, 177, 106, .45); }
/* «рулетка» по карточкам */
body.g-rolling .game-card:not(.g-roll) { filter: brightness(.45) saturate(.7); transform: none !important; }
.game-card.g-roll { transform: translateY(-6px) scale(1.02); border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 50px rgba(214, 177, 106, .45); transition-duration: .08s; }
.game-card.g-win { animation: gWin .6s var(--ease) 2; }
@keyframes gWin { 50% { transform: translateY(-10px) scale(1.05); box-shadow: 0 0 0 3px #fff2c8, 0 0 80px rgba(255, 220, 140, .7); } }
.g-wintag { position: absolute; left: 50%; top: 50%; z-index: 5; transform: translate(-50%, -50%) rotate(-6deg); padding: .4rem 1.1rem; border-radius: 12px; font: 900 1.6rem var(--serif); color: #1a1003; background: linear-gradient(180deg, #ffe7a6, #c9932e); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: tagIn .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes tagIn { from { transform: translate(-50%, -50%) scale(2.2) rotate(-6deg); opacity: 0; } }
@media (min-width: 1100px) { .menu-main .games { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1099px) {
  .menu-body { grid-template-columns: 1fr; }
  .live-col { position: static; max-height: none; }
  .lc-list { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); max-height: 22rem; }
  .lc-list h4 { grid-column: 1 / -1; }
  .lc-random { display: none; }
}
