/* Главная, подключение, лобби + общие анимации */
.hz { color: var(--hazard); }
.ok { color: var(--ok) !important; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* кнопки как в оригинале */
.btn.big { padding: 13px 26px; font-size: 15px; font-weight: 700; border-radius: 10px; }
.btn.w { min-width: 220px; }
.btn.green { background: #2f8a2f; border-color: #2f8a2f; color: #fff; }
.btn.green:hover { background: #38a238; box-shadow: 0 6px 24px -6px rgba(56,162,56,.7); }
.btn.red { background: #b32a25; border-color: #b32a25; color: #fff; }
.btn.red:hover { background: #cc332d; box-shadow: 0 6px 24px -6px rgba(204,51,45,.7); }
.btn.outline-green { background: transparent; border: 2px solid #2f8a2f; color: #fff; }
.btn.primary:hover { box-shadow: 0 6px 24px -6px rgba(245,163,59,.7); }
.btn { transition: background .15s, box-shadow .2s, border-color .15s, transform .08s; }

/* сцена-фон */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.scene .hero-art { width: 100%; height: 100%; animation: kenburns 40s ease-in-out infinite alternate; }
.scene.dim::after { content: ''; position: absolute; inset: 0; background: rgba(5,5,5,.72); }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }

/* главная */
.home2 { max-width: 1050px; margin: 0 auto; padding: 120px 20px 60px; }
.home-title { text-align: center; margin-bottom: 30px; }
.home-title h1 { font-size: clamp(48px, 8vw, 88px); margin: 0; text-shadow: 0 6px 40px rgba(0,0,0,.7); letter-spacing: .02em; }
.home-title p { font-size: 18px; color: #e3e3e3; text-shadow: 0 2px 10px #000; }
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 820px) { .home-grid { grid-template-columns: 1fr; } }
.glass { background: rgba(12,12,12,.78); backdrop-filter: blur(10px); border: 1px solid #2c2c2c; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.glass h2 { margin: 0; }
.modes { display: grid; gap: 8px; }
.mode { text-align: left; background: #151515; border: 1px solid #2c2c2c; border-radius: 12px; padding: 12px 14px; color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.mode b { display: block; }
.mode small { color: var(--muted); }
.mode.on { border-color: var(--hazard); background: #22180a; }
.mode:hover { border-color: #555; }
.codein { text-transform: uppercase; letter-spacing: .3em; font-size: 22px; font-weight: 800; text-align: center; }

/* подключение */
.join { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 100px 20px 40px; }
.join h1 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 18px; text-shadow: 0 4px 30px #000; }
.join p { font-size: 18px; text-shadow: 0 2px 10px #000; margin: 6px 0; }
.join-info { margin: 10px 0 16px; padding: 8px 16px; border-radius: 10px; background: rgba(0,0,0,.6); }
.join-name { max-width: 320px; text-align: center; font-size: 17px; margin: 6px 0 8px; background: rgba(0,0,0,.65); }
.join .row { margin-top: 16px; }

/* лобби */
.lobby2 { max-width: 1500px; margin: 0 auto; padding: 84px 22px 120px; }
@media (min-width: 901px) { .lobby2 { padding-left: 84px; padding-right: 84px; } }
.lob-hero { text-align: center; padding: 50px 0 30px; }
.lob-hero h1 { font-size: clamp(30px, 4vw, 46px); margin: 0 0 26px; }
.cands { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cand { width: 280px; text-align: left; padding: 14px 18px; background: rgba(12,12,12,.85); border: 1px solid #262626; border-radius: 12px; }
.cand small { display: block; font-weight: 700; font-size: 12px; margin-bottom: 8px; }
.invite { margin: 26px auto 0; max-width: 760px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.inv-links { word-break: break-all; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.coll { padding: 28px 34px; margin-top: 20px; }
.two .coll { margin-top: 0; }
.coll-head { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.coll-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); }
.chev { font-size: 22px; transition: transform .25s; display: inline-block; line-height: 1; }
.coll.closed .chev { transform: rotate(180deg); }
.coll-body { margin-top: 22px; display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease, margin .3s; }
.coll-body > * { overflow: hidden; min-height: 0; }
.coll.closed .coll-body { grid-template-rows: 0fr; margin-top: 0; }
.coll-body { overflow: hidden; }
.prow { display: flex; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #2a2a2a; font-size: 16px; }
.prow span { color: #cfcfcf; }
.prow b { font-weight: 800; }
.pack { padding: 14px 18px; border: 1px solid #2a2a2a; border-radius: 10px; background: rgba(255,255,255,.02); font-weight: 700; font-size: 17px; margin-top: 6px; }
.lob-btns { justify-content: center; gap: 12px; margin: 26px 0 6px; }
.ready-cnt { font-size: 17px; }
.plist2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .plist2 { grid-template-columns: 1fr; } }
.pl { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border: 1px solid #262626; border-radius: 12px; background: #0e0e0e; position: relative; }
.pl.me { border-color: var(--hazard); box-shadow: 0 0 0 1px var(--hazard-dim); }
.pl-n { font-size: 26px; font-weight: 800; width: 34px; padding-right: 16px; border-right: 1px solid #2a2a2a; }
.pl-name b { display: block; font-size: 19px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; border: 1px solid #ddd; border-radius: 6px; padding: 1px 10px; margin-top: 4px; }
.role { background: #4a3510; border: 1px solid var(--hazard); color: var(--hazard); padding: 6px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.rdy { font-weight: 800; font-size: 17px; transition: color .3s; }
.rdy.ok { color: var(--ok); }
.rdy.no { color: var(--rust); }
.pl-adm { position: absolute; top: 6px; right: 8px; display: none; gap: 4px; }
.pl:hover .pl-adm { display: flex; }
@media (hover: none) { .pl-adm { display: flex; position: static; } }

/* ---------- анимации ---------- */
.fx-in { animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) both; }
.fx-in:nth-child(2) { animation-delay: .06s; } .fx-in:nth-child(3) { animation-delay: .12s; } .fx-in:nth-child(4) { animation-delay: .18s; }
.fx-in:nth-child(5) { animation-delay: .24s; } .fx-in:nth-child(6) { animation-delay: .3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.toast { animation: toastIn .3s cubic-bezier(.2,.8,.2,1); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.modal-bg { animation: fade .2s; }
.modal-bg .modal { animation: pop .25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body:has(.scene) { background: none; }

/* ---------- игровая страница: дополнения ---------- */
.ctab .sub, .who .sub { color: var(--muted); font-size: 11.5px; }
.ctab .hid { display: block; min-height: 18px; }
.ctab td, .ctab th { font-weight: 700; }
.ctab thead th .tip { margin-left: 6px; }
.bk-line { margin: -12px 0 18px; color: #d6d6d6; } .bk-line span { color: var(--muted); }

/* подсказки ⓘ */
.tip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #3a3a3a; color: #eee; font-size: 12px; font-weight: 800; font-style: normal; margin-left: 6px; cursor: help; position: relative; vertical-align: middle; flex: none; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: pre-line; width: max-content; max-width: 300px;
  background: #3a3a3a; color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; text-align: center; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: pop .18s; pointer-events: none; }

/* информация о тебе */
.mecard { padding-bottom: 0; overflow: hidden; }
.mi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 80px; }
@media (max-width: 900px) { .mi-grid { grid-template-columns: 1fr; } }
.mi, .ma { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 14px; align-items: center; padding: 18px 0; border-bottom: 1px dashed #333; }
.mi-k { color: #cfcfcf; font-size: 14px; display: flex; align-items: center; }
.mi-v { font-weight: 800; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.mi.open .mi-v { color: #fff; }
.mi:not(.open) .mi-v { color: #d8ccb0; }
.lock { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #d33a2c; cursor: pointer; transition: transform .15s, color .2s, border-color .2s; }
.lock:hover:not(:disabled) { transform: scale(1.12); border-color: #555; }
.lock.is-open { color: #3fae3f; }
.lock:disabled { opacity: .35; cursor: not-allowed; }
.lock.static { cursor: default; }
.lock.pulse { animation: lockPulse 1.6s ease-in-out infinite; }
@keyframes lockPulse { 50% { transform: scale(1.15); filter: drop-shadow(0 0 6px #ff6a4d); } }
.ma-block { margin: 26px -44px 0; padding: 10px 44px 20px; background: #0b1f0b; border-top: 1px solid #173a17; }
@media (max-width: 760px) { .ma-block { margin: 20px -20px 0; padding: 10px 20px 16px; } .mi, .ma { grid-template-columns: 1fr auto; } .mi-v { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; text-align: left; } }
.ma { border-bottom-color: #1f3a1f; }
.ma .mi-v { font-weight: 600; }
.ma.used { opacity: .55; }
.ma-btns { display: flex; gap: 6px; align-items: center; }

/* переворот открытой карты */
.flip { animation: flipIn .7s cubic-bezier(.2,.8,.2,1); transform-origin: center; }
td.flip { animation: flipIn .7s cubic-bezier(.2,.8,.2,1), glowCell 2.2s ease-out; }
@keyframes flipIn { 0% { transform: perspective(600px) rotateX(-90deg); opacity: 0; } 60% { transform: perspective(600px) rotateX(12deg); opacity: 1; } 100% { transform: none; } }
@keyframes glowCell { 0%, 30% { background-color: rgba(245,163,59,.28); } 100% { background-color: transparent; } }

/* заметки */
.notes { min-height: 170px; resize: vertical; background: #141414; border: 1px solid #262626; border-radius: 10px; padding: 16px; font-size: 14px; }

/* голосование: анимированные полоски */
.barrow { animation: fadeUp .5s both; animation-delay: var(--d); }
.bf { width: var(--w); animation: grow 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--d) + .2s); }
@keyframes grow { from { width: 0; } }
.vcard.on { animation: votePulse .45s; }
@keyframes votePulse { 50% { transform: scale(1.06); } }
.dice-chip { display: inline-flex; gap: 4px; align-items: center; padding: 1px 10px; border-radius: 999px; background: #2a1e0e; border: 1px solid var(--hazard-dim); margin-left: 6px; }

/* hero: летящие искры */
.embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #ffb35a; box-shadow: 0 0 6px 2px rgba(255,140,40,.6); opacity: 0; animation: ember 9s linear infinite; }
.embers i:nth-child(odd) { background: #ffd28a; }
.embers i:nth-child(1) { left: 32%; animation-delay: 2.7s; animation-duration: 11.3s; }
.embers i:nth-child(2) { left: 63%; animation-delay: 1.4s; animation-duration: 7.4s; }
.embers i:nth-child(3) { left: 53%; animation-delay: 4.9s; animation-duration: 8.7s; }
.embers i:nth-child(4) { left: 9%; animation-delay: 2.0s; animation-duration: 10.2s; }
.embers i:nth-child(5) { left: 37%; animation-delay: 7.0s; animation-duration: 12.0s; }
.embers i:nth-child(6) { left: 35%; animation-delay: 1.9s; animation-duration: 12.6s; }
.embers i:nth-child(7) { left: 84%; animation-delay: 7.3s; animation-duration: 11.8s; }
.embers i:nth-child(8) { left: 26%; animation-delay: 1.5s; animation-duration: 8.7s; }
.embers i:nth-child(9) { left: 95%; animation-delay: 8.6s; animation-duration: 12.1s; }
.embers i:nth-child(10) { left: 49%; animation-delay: 0.8s; animation-duration: 10.6s; }
.embers i:nth-child(11) { left: 87%; animation-delay: 3.5s; animation-duration: 8.5s; }
.embers i:nth-child(12) { left: 33%; animation-delay: 4.3s; animation-duration: 7.5s; }
.embers i:nth-child(13) { left: 72%; animation-delay: 7.6s; animation-duration: 7.0s; }
.embers i:nth-child(14) { left: 39%; animation-delay: 5.2s; animation-duration: 12.3s; }
.embers i:nth-child(15) { left: 67%; animation-delay: 1.8s; animation-duration: 9.5s; }
.embers i:nth-child(16) { left: 38%; animation-delay: 3.9s; animation-duration: 8.0s; }
.embers i:nth-child(17) { left: 41%; animation-delay: 2.3s; animation-duration: 11.8s; }
.embers i:nth-child(18) { left: 12%; animation-delay: 0.4s; animation-duration: 10.8s; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(-60px, -95vh); opacity: 0; } }
.hero-art { animation: kenburns 50s ease-in-out infinite alternate; }

/* панель ведущего */
.hpanel { position: fixed; top: 74px; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 36px)); z-index: 46; overflow-y: auto; transform: translateX(calc(100% + 40px)); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  background: linear-gradient(180deg, #111, #070707); border: 1px solid #2b2b2b; border-radius: 16px; padding: 22px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.7); scrollbar-width: thin; }
.hpanel.open { transform: none; }
.hp-x { position: absolute; top: 12px; right: 12px; }
.hp-in > * + * { margin-top: 10px; }
.tbtn { width: 52px; height: 44px; border-radius: 8px; border: 1px solid #2a2a2a; background: #1a1a1a; color: var(--text); font-weight: 700; cursor: pointer; }
.tbtn:hover { border-color: var(--hazard); }
.hbtn { display: block; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #3a3a3a; background: #050505; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; margin-top: 8px; }
.hbtn:hover:not(:disabled) { border-color: var(--hazard); background: #120c04; }
.hbtn:disabled { opacity: .4; cursor: not-allowed; }
.hbtn.red { border-color: #6b1f1b; color: #ffb3a8; }
.hbtn.grow { flex: 1; }
.hrow { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.pm { width: 30px; height: 30px; border-radius: 6px; border: 0; color: #fff; font-weight: 800; cursor: pointer; margin-left: 6px; }
.pm.red { background: #b32a25; } .pm.green { background: #2f8a2f; }
.accs { margin-top: 8px; }
.acc { border-bottom: 1px solid #1f1f1f; }
.acc-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; cursor: pointer; font-size: 14px; }
.acc-h:hover b { color: var(--hazard); }
.acc .chev { transition: transform .25s; font-size: 20px; }
.acc.open .chev { transform: rotate(180deg); }
.acc-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.acc-b > div { overflow: hidden; }
.acc.open .acc-b { grid-template-rows: 1fr; }
.acc.open .acc-b > div { padding-bottom: 14px; }
.hsel, .hin { margin-top: 8px; background: #0d0d0d; border: 1px solid #2a2a2a; }
.hl { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.hbtn .tip { margin-left: 8px; }

/* всплывающее подтверждение */
.popc { position: absolute; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #13301a, #0d1a10); border: 1px solid #2a4a30; box-shadow: 0 14px 40px rgba(0,0,0,.6); max-width: 380px; animation: pop .2s; }
.popc span { font-weight: 700; font-size: 14px; }

/* ---------- оверлеи событий ---------- */
.fxo { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; pointer-events: auto; animation: fade .3s; }
.fxo.out { animation: fadeOut .5s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.fx-c { position: relative; text-align: center; z-index: 2; }
.fx-c h1 { font-size: clamp(40px, 7vw, 84px); margin: 6px 0; text-shadow: 0 6px 40px #000; animation: slam .6s cubic-bezier(.2,.9,.3,1.3) both .25s; }
.fx-c p { font-size: 20px; margin: 0; animation: fadeUp .5s both .55s; }
@keyframes slam { from { transform: scale(2.4); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: none; } }
.fx-exile { background: radial-gradient(circle, rgba(120,10,0,.55), rgba(0,0,0,.92)); }
.fx-exile .skull { font-size: 70px; animation: pop .5s both .1s; }
.door { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(90deg, #262019 0 40px, #2e271f 40px 80px); box-shadow: inset 0 0 80px #000; z-index: 1; }
.door::after { content: ''; position: absolute; top: 50%; width: 30px; height: 120px; margin-top: -60px; background: #4a3f30; border-radius: 6px; }
.door.l { left: 0; animation: doorL .7s cubic-bezier(.6,0,.4,1) both 1.6s; transform: translateX(-100%); }
.door.r { right: 0; animation: doorR .7s cubic-bezier(.6,0,.4,1) both 1.6s; transform: translateX(100%); }
.door.l::after { right: 20px; } .door.r::after { left: 20px; }
.door.slow { animation-duration: 1.6s; animation-delay: 2.2s; }
@keyframes doorL { to { transform: none; } }
@keyframes doorR { to { transform: none; } }
.fx-end { background: radial-gradient(circle, rgba(40,25,5,.7), rgba(0,0,0,.95)); }
.fx-dice { background: rgba(0,0,0,.75); }
.die { width: 150px; height: 150px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 800; color: #160f04;
  background: linear-gradient(135deg, #ffd38a, var(--hazard)); border-radius: 26px; box-shadow: 0 20px 60px rgba(245,163,59,.5); animation: roll 1.3s cubic-bezier(.2,.7,.3,1) both; }
.die.d20 { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); border-radius: 0; }
.die.done { animation: roll 1.3s cubic-bezier(.2,.7,.3,1) both, landed .4s ease-out 1.3s; }
@keyframes roll { 0% { transform: rotate(-540deg) scale(.3); } 100% { transform: none; } }
@keyframes landed { 50% { transform: scale(1.18); box-shadow: 0 0 90px rgba(245,163,59,.9); } }
.fx-card { background: rgba(0,0,0,.55); }
.card3d { width: 320px; height: 210px; position: relative; transform-style: preserve-3d; animation: cardFlip 1s cubic-bezier(.2,.8,.2,1) both .1s; }
.card3d > div { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.c-front { background: repeating-linear-gradient(45deg, #2b2417 0 10px, #231d12 10px 20px); border: 2px solid var(--hazard-dim); font-size: 60px; }
.c-back { background: linear-gradient(160deg, #1d3a1d, #0b1f0b); border: 2px solid #3fae3f; transform: rotateY(180deg); gap: 6px; }
.c-back b { font-size: 20px; color: #f3cf8f; }
.c-back p { margin: 0; font-size: 13px; }
@keyframes cardFlip { from { transform: rotateY(0) scale(.6); } to { transform: rotateY(180deg); } }
.fx-ann { background: rgba(0,0,0,.4); align-items: flex-start; padding-top: 110px; }
.ann { max-width: 640px; padding: 20px 26px; border-radius: 14px; background: #0f1b24; border: 1px solid var(--blue); box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: dropIn .5s cubic-bezier(.2,.9,.3,1.2); }
.ann small { color: var(--blue); font-weight: 700; } .ann p { margin: 6px 0 0; font-size: 18px; }
@keyframes dropIn { from { transform: translateY(-60px); opacity: 0; } }
.fx-flash { background: rgba(0,0,0,.6); animation: flash .6s; }
@keyframes flash { 0% { background: rgba(255,200,120,.9); } }
.fxo { backdrop-filter: blur(7px); }
.fx-exile { background: radial-gradient(circle, rgba(95,8,0,.9), rgba(0,0,0,.97)); }
.fx-end { background: radial-gradient(circle, rgba(45,28,6,.92), rgba(0,0,0,.98)); }
.fx-dice, .fx-flash { background: rgba(0,0,0,.85); }
.fx-card { background: rgba(0,0,0,.75); }
@media (max-width: 640px) {
  .cands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cand { width: auto; padding: 10px; } .cand .ava { width: 30px !important; height: 30px !important; }
  .coll { padding: 20px 16px; } .pl { padding: 10px 12px; gap: 10px; } .pl-n { font-size: 18px; width: 22px; padding-right: 10px; } .pl-name b { font-size: 16px; } .rdy { font-size: 14px; }
  .btn.w { min-width: 0; flex: 1; } .lob-btns { flex-wrap: wrap; }
}

/* таблицы на ПК целиком помещаются по ширине — без горизонтальной прокрутки */
@media (min-width: 1000px) {
  #s-players, #s-spec { max-width: 1900px; }
  .tbl-wrap { overflow-x: visible; }
  .ctab, .ctab.spec { table-layout: fixed; width: 100%; min-width: 0; }
  .ctab .who { width: 210px; min-width: 0; position: static; }
  .ctab th, .ctab td { padding: 12px 9px; font-size: 13px; line-height: 1.35; overflow-wrap: break-word; word-break: normal; hyphens: manual; }
  .ctab thead th { padding: 14px 9px; font-size: 12.5px; position: static; }
  .ctab thead th .tip { margin-left: 4px; width: 18px; height: 18px; }
  .ctab .hctl { left: 4px; right: 4px; justify-content: center; }
  .who-in { gap: 8px; }
  .who .nm { overflow-wrap: anywhere; }
  .who .row { flex-wrap: wrap; }
}
@media (min-width: 1000px) and (max-width: 1350px) {
  .ctab .who { width: 170px; }
  .ctab th, .ctab td { padding: 10px 6px; font-size: 12px; }
  .ctab thead th { font-size: 11.5px; }
  .who .ava { width: 32px !important; height: 32px !important; font-size: 14px !important; }
}

/* ---------- правила ---------- */
.rules-btn { border-color: var(--hazard-dim); white-space: nowrap; }
.rules-btn i { font-style: normal; font-size: 11px; background: var(--rust); color: #fff; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.rules-btn.glow { animation: rulesGlow 1.4s ease-in-out infinite; border-color: var(--hazard); }
@keyframes rulesGlow { 50% { box-shadow: 0 0 0 4px rgba(245,163,59,.25), 0 0 22px rgba(245,163,59,.45); } }
.rsheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.rsheet-bg.open { opacity: 1; pointer-events: auto; }
.rsheet { position: fixed; top: 0; left: 0; bottom: 0; width: min(640px, 100vw); z-index: 81; overflow-y: auto; padding: 24px 26px 40px; background: linear-gradient(180deg, #121212, #080808); border-right: 1px solid #2b2b2b; box-shadow: 30px 0 80px rgba(0,0,0,.6); transform: translateX(-105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.rsheet.open { transform: none; }
.rules h3 { color: var(--hazard); text-transform: none; letter-spacing: 0; font-size: 18px; margin: 0 0 10px; }
.rules-note { padding: 10px 14px; border-radius: 10px; background: #1f160a; border: 1px solid var(--hazard-dim); font-size: 14px; margin-bottom: 18px; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rl { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed #2a2a2a; font-size: 14.5px; line-height: 1.45; }
.rl-i { font-size: 18px; text-align: center; }
.rl-t b { color: #fff; }
.rsheet.open .rl { animation: fadeUp .4s both; }
.rsheet.open .rl:nth-child(1) { animation-delay: 0.03s; }
.rsheet.open .rl:nth-child(2) { animation-delay: 0.06s; }
.rsheet.open .rl:nth-child(3) { animation-delay: 0.09s; }
.rsheet.open .rl:nth-child(4) { animation-delay: 0.12s; }
.rsheet.open .rl:nth-child(5) { animation-delay: 0.15s; }
.rsheet.open .rl:nth-child(6) { animation-delay: 0.18s; }
.rsheet.open .rl:nth-child(7) { animation-delay: 0.21s; }
.rsheet.open .rl:nth-child(8) { animation-delay: 0.24s; }
.rsheet.open .rl:nth-child(9) { animation-delay: 0.27s; }
.rsheet.open .rl:nth-child(10) { animation-delay: 0.30s; }
.rsheet.open .rl:nth-child(11) { animation-delay: 0.33s; }
.rsheet.open .rl:nth-child(12) { animation-delay: 0.36s; }
.rsheet.open .rl:nth-child(13) { animation-delay: 0.39s; }
.rnum { width: 64px; padding: 3px 6px; display: inline-block; text-align: center; font-weight: 700; margin: 0 2px; }
.sw { position: relative; display: inline-block; width: 46px; height: 26px; cursor: pointer; flex: none; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: #3a3a3a; transition: background .2s; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .22s cubic-bezier(.3,.9,.3,1.3); }
.sw input:checked + i { background: #2f8a2f; }
.sw input:checked + i::after { transform: translateX(20px); }
.sw input:focus-visible + i { box-shadow: 0 0 0 2px var(--hazard); }
.rules-ta { min-height: 200px; resize: vertical; line-height: 1.6; font-size: 14px; }
.crules { margin: 0; padding-left: 22px; } .crules li { margin: 8px 0; line-height: 1.5; }
.rules-ann { border-color: var(--hazard) !important; } .rules-ann small { color: var(--hazard) !important; }
@media (max-width: 760px) { .rules-btn { padding: 4px 8px; } .rules-btn i { display: none; } }

/* ---------- поиск ---------- */
.hsearch { position: sticky; top: -24px; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 0 0 12px; border-radius: 12px; background: #161616; border: 1px solid #333; box-shadow: 0 8px 20px rgba(0,0,0,.5); transition: border-color .15s, box-shadow .15s; }
.hsearch:focus-within { border-color: var(--hazard); box-shadow: 0 0 0 3px rgba(245,163,59,.18), 0 8px 20px rgba(0,0,0,.5); }
.hsearch input { border: 0; background: transparent; padding: 4px 2px; flex: 1; min-width: 0; font-size: 14.5px; }
.hsearch input:focus { border: 0; }
.hs-clear { border: 0; background: #2a2a2a; color: var(--text); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; flex: none; font-size: 12px; }
.hs-clear:hover { background: #3a3a3a; }
.hpanel .hsearch { top: -22px; }
mark { background: rgba(245,163,59,.35); color: #fff; border-radius: 3px; padding: 0 1px; }
.hs-hide { display: none !important; }
.hs-hint { display: none; padding: 10px 12px; margin-top: 8px; border: 1px dashed #3a3a3a; border-radius: 10px; background: #0e0e0e; }
.searching .hs-hint:not(.hs-hide) { display: block; animation: fadeUp .25s both; }
.searching .hs-foot { display: none; }
.hs-empty { padding: 14px; border-radius: 10px; background: #141414; color: var(--muted); font-size: 13.5px; text-align: center; margin: 8px 0; }
.searching .acc:not(.hs-hide), .searching .rl:not(.hs-hide) { animation: fadeUp .25s both; }

/* ---------- исправления визуальных багов ---------- */
/* таймер в полосе фазы, а не поверх контента */
.ftimer { display: none !important; }
.pb-timer { text-align: center; flex: none; }
.pb-timer small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-timer .timer { display: inline-block; font-size: 24px; font-weight: 700; padding: 4px 16px; min-width: 96px; border-radius: 10px; border: 1px solid var(--hazard); background: #0b0b0b; }
.pb-timer .timer.low { color: var(--rust); border-color: var(--rust); }
/* голосование: карточки по центру и на всю ширину */
.vgrid { grid-template-columns: repeat(auto-fit, minmax(160px, 210px)); justify-content: center; }
.vote-head { text-align: left; }
/* лобби */
.rdy, .ready-cnt { white-space: nowrap; }
.coll-head { flex-wrap: wrap; row-gap: 6px; }
.searching .hide-on-search { display: none; }
/* телефон: компактная полоса фазы, меньше плавающих кнопок */
@media (max-width: 760px) {
  .pbar-wrap { position: fixed; top: 64px; left: 0; right: 0; padding: 6px 6px 0; }
  .pbar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-radius: 12px; }
  .pb-text { flex: 1 1 60%; }
  .pb-title { font-size: 14.5px; }
  .pb-body { font-size: 12.5px; line-height: 1.35; }
  .order { display: none; }
  .pb-timer small { display: none; }
  .pb-timer .timer { font-size: 17px; padding: 3px 10px; min-width: 64px; }
  .pb-btns { width: 100%; justify-content: flex-start; gap: 6px; }
  .pb-btns .btn { padding: 6px 10px; font-size: 13px; }
  .land { padding-top: var(--barh, 200px); }
  .hero { padding-top: 30px; }
  #upBtn, #downBtn { display: none; }
  .fbtns { gap: 6px; }
  .ibtn.big { width: 42px; height: 42px; font-size: 18px; }
  .vgrid { grid-template-columns: 1fr 1fr; }
  .vcard { padding: 14px 8px 12px; }
  .sec-title { font-size: 24px; }
}
.pl-name { min-width: 0; flex: 1 1 auto; }
.pl-name b { overflow-wrap: anywhere; }
.pl .grow { flex: 0 1 0; }
@media (max-width: 640px) {
  .pl { flex-wrap: nowrap; gap: 10px; padding: 10px 12px; }
  .pl .role { display: none; }
  .pl .grow { display: none; }
  .pl .ava { width: 40px !important; height: 40px !important; font-size: 17px !important; }
  .role { padding: 3px 8px; font-size: 12px; }
  .rdy { margin-left: auto; }
  .tag { font-size: 10px; padding: 1px 6px; }
}
.pl-name b { overflow-wrap: break-word; }
@media (max-width: 640px) { .pl-name b { font-size: 15px; } .pl-n { font-size: 16px; width: 18px; padding-right: 8px; } }

/* ---------- паки, раунды, способности, угрозы ---------- */
.rules-row { justify-content: center; margin: 22px 0 20px; position: relative; z-index: 1; }
.packs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .packs2 { grid-template-columns: 1fr; } }
.pbox { border: 1px solid #2c2c2c; border-radius: 14px; padding: 16px 18px; background: rgba(0,0,0,.35); }
.pbox h4 { margin: 0 0 12px; font-size: 16px; }
.plist3 { display: flex; flex-direction: column; gap: 10px; }
.plist3.scroll { max-height: 190px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.pck { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.pck input { position: absolute; opacity: 0; width: 0; height: 0; }
.pck i { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #555; flex: none; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.pck input:checked + i { background: linear-gradient(135deg, #ffb347, var(--hazard)); border-color: var(--hazard); }
.pck input:checked + i::after { content: '✓'; color: #1a1205; font-weight: 900; font-size: 14px; }
.pck input:checked ~ span { color: var(--hazard); }
.pck input:focus-visible + i { box-shadow: 0 0 0 3px rgba(245,163,59,.35); }
.revs { display: flex; flex-wrap: wrap; gap: 8px; }
.rev { display: flex; flex-direction: column; gap: 4px; width: 92px; }
.rev span { font-size: 12px; color: var(--muted); }
.rev input { text-align: center; font-weight: 700; }
.rrevs { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rrev { display: inline-flex; align-items: center; gap: 3px; }
.rrev small { color: var(--muted); font-size: 11px; }
.rrev .rnum { width: 48px; }
.abl { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; border-radius: 50%; background: #3a2a0c; color: var(--hazard); font-size: 12px; cursor: help; position: relative; vertical-align: middle; }
.abl.used { filter: grayscale(1); opacity: .5; }
.abl:hover::after, .abl:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 280px; white-space: normal;
  background: #3a2a0c; border: 1px solid var(--hazard-dim); color: #fff; padding: 9px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: pop .18s; pointer-events: none; }
.ma.prof { background: linear-gradient(90deg, rgba(245,163,59,.10), transparent 70%); border-radius: 8px; padding-left: 10px; padding-right: 10px; }
.ma.prof .mi-k { color: var(--hazard); font-weight: 700; }
td.profab { background: rgba(245,163,59,.04); }
td.profab.used { opacity: .55; }
.thr { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; margin-top: 6px; border-radius: 10px; background: #160c09; border: 1px solid #3a1d14; }
.thr.on { border-color: var(--rust); }
.fx-threat { background: radial-gradient(circle, rgba(140,40,10,.85), rgba(0,0,0,.97)); }
.fx-threat .warn { font-size: 80px; color: var(--rust); animation: warnPulse .8s ease-in-out 3; }
.fx-threat p { max-width: 640px; margin: 10px auto 0; font-size: 17px; }
@keyframes warnPulse { 50% { transform: scale(1.25); filter: drop-shadow(0 0 24px #ff5a2a); } }
