:root {
  --ink: #14101a;
  --ink-2: #1e1726;
  --wine: #7a2438;
  --brass: #d2a94f;
  --bone: #eee6d5;
  --smoke: #9a91a6;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--ink); color: var(--bone); font: 400 1rem/1.6 "Manrope", system-ui, sans-serif; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
h2 { font: 700 clamp(2rem, 5vw, 3rem)/1.1 "Cormorant Garamond", serif; margin-bottom: 1.25rem; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* навигация */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 1rem clamp(1.25rem, 4vw, 3rem); background: linear-gradient(var(--ink), transparent); }
.logo { font: 700 1.6rem "Cormorant Garamond", serif; text-decoration: none; letter-spacing: .04em; }
.nav-link { text-decoration: none; color: var(--brass); font-weight: 500; transition: opacity .3s; }
.nav-link:hover { opacity: .7; }

/* герой: заголовок подсвечивается «лампой» под курсором */
.hero { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 1.5rem; text-align: center;
  padding: 6rem 1.25rem 4rem; background: radial-gradient(70% 55% at 50% 110%, rgba(122, 36, 56, .45), transparent 70%); }
.title { --x: 50%; --y: 50%; font: 700 clamp(4.5rem, 20vw, 14rem)/.9 "Cormorant Garamond", serif; letter-spacing: .03em;
  background: radial-gradient(circle 240px at var(--x) var(--y), var(--brass) 0%, rgba(238, 230, 213, .55) 45%, rgba(238, 230, 213, .09) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { text-shadow: 0 2px 20px #14101a, 0 0 6px rgba(20, 16, 26, .8); color: #b7aec2; font-size: clamp(1.05rem, 2.4vw, 1.4rem); max-width: 30ch; }
/* фон героя: ночной город, туман */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > * { position: relative; z-index: 1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(ellipse 55% 42% at 50% 64%, rgba(20, 16, 26, .8), transparent 75%), url("../img/hero.svg?v=2") center bottom / cover no-repeat; animation: bgIn 2.2s var(--ease) both; }
.hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 45% 40% at 25% 85%, rgba(238, 230, 213, .09), transparent 70%),
              radial-gradient(ellipse 40% 35% at 75% 95%, rgba(238, 230, 213, .08), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate; }
@keyframes bgIn { from { opacity: 0; transform: scale(1.04); } }
@keyframes drift { from { transform: translateX(-5%); } to { transform: translateX(5%); } }
.hero > * { animation: rise .9s var(--ease) both; }
.hero > .lead { animation-delay: .25s; }
.hero > .countdown { animation-delay: .4s; }
.hero > .host { animation-delay: .45s; }
.host { display: inline-flex; align-items: center; gap: 1rem; padding: .7rem .75rem .7rem .7rem; text-decoration: none; text-align: left;
  border: 1px solid rgba(210, 169, 79, .5); border-radius: 22px;
  background: linear-gradient(135deg, rgba(122, 36, 56, .6), rgba(20, 16, 26, .82));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 24px 50px -22px #000, inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: border-color .3s, box-shadow .4s var(--ease); }
.host:hover { border-color: var(--brass); box-shadow: 0 24px 60px -18px rgba(210, 169, 79, .45), inset 0 1px 0 rgba(255, 255, 255, .1); }
.host-ava { flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #a3324b, var(--wine) 70%); color: var(--bone);
  font: 700 1.7rem/1 "Cormorant Garamond", serif; box-shadow: 0 0 0 2px var(--brass), 0 0 22px rgba(210, 169, 79, .35); }
.host-txt { display: grid; line-height: 1.15; padding-right: .4rem; }
.host-role { font-size: .85rem; color: var(--brass); font-weight: 500; }
.host-name { font: 700 1.6rem/1.2 "Cormorant Garamond", serif; color: var(--bone); }
.host-vk { flex: none; padding: .55rem 1rem; border-radius: 999px; background: var(--brass); color: var(--ink);
  font-weight: 700; font-size: .85rem; transition: background .3s, transform .35s var(--ease); }
.host:hover .host-vk { background: #e4be62; transform: translateX(2px); }
@media (max-width: 480px) { .host { flex-wrap: wrap; justify-content: center; text-align: center; } .host-txt { padding: 0; } }
.reg-info .ask { margin-bottom: 1.25rem; }
.reg-info .ask a { color: var(--brass); }
.hero > .btn, .hero > .closed { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.countdown { display: flex; gap: 1.25rem; font-variant-numeric: tabular-nums; }
.countdown div { min-width: 4.2rem; }
.countdown b { display: block; font: 700 2.2rem/1 "Cormorant Garamond", serif; color: var(--brass); }
.countdown span { font-size: .8rem; color: var(--smoke); }

/* кнопки */
.btn { display: inline-block; padding: .95rem 1.8rem; border: 0; border-radius: 999px; font: 700 1rem "Manrope", sans-serif;
  text-decoration: none; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-brass { background: var(--brass); color: var(--ink); box-shadow: 0 0 0 0 rgba(210, 169, 79, .5); }
.btn-brass:hover { box-shadow: 0 10px 40px -8px rgba(210, 169, 79, .6); }
.btn-wine { background: var(--wine); color: var(--bone); width: 100%; margin-top: .5rem; }
.btn-wine:hover { background: #8f2b42; }
.btn-wine.loading { opacity: .6; pointer-events: none; }
.btn-ghost { border: 1px solid var(--brass); color: var(--brass); }
.btn-ghost:hover { background: var(--brass); color: var(--ink); }
.closed { color: #b7aec2; text-shadow: 0 2px 16px #14101a; }

/* факты об игре */
.facts { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid rgba(238, 230, 213, .14); }
.fact { padding: 2rem 1.5rem; border-left: 1px solid rgba(238, 230, 213, .14); display: grid; gap: .4rem; align-content: start; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-label { color: var(--smoke); font-size: .9rem; }
.fact strong { font: 700 1.6rem/1.2 "Cormorant Garamond", serif; }
.fact small { font-size: 1rem; color: var(--smoke); }
.gold { color: var(--brass); }

/* стол игроков */
.table-sec { padding-block: clamp(4rem, 9vw, 7rem) 2rem; }
.bar { height: 4px; background: var(--ink-2); border-radius: 4px; overflow: hidden; margin-bottom: 2rem; }
.bar i { display: block; height: 100%; background: var(--brass); transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .3s; }
.in .bar i { transform: scaleX(1); }
.seats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.seat { display: grid; gap: .1rem; padding: .9rem 1rem; border: 1px dashed rgba(238, 230, 213, .2); border-radius: 14px;
  color: var(--smoke); opacity: 0; transform: scale(.94); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s, background .3s;
  transition-delay: calc(var(--i) * 45ms); }
.in .seat { opacity: 1; transform: none; }
.seat.taken { border: 1px solid var(--brass); color: var(--bone); background: rgba(210, 169, 79, .08); }
.seat-n { font-size: .8rem; color: var(--smoke); }
.seat.taken .seat-n { color: var(--brass); }
.seat-nick { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* правила игры */
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .4rem 1.5rem; }
.nav-link.host-link { padding: .25rem .95rem; border: 1px solid rgba(210, 169, 79, .55); border-radius: 999px; transition: background .3s, color .3s; }
.nav-link.host-link:hover { opacity: 1; background: var(--brass); color: var(--ink); }
.nav-link.muted { color: var(--bone); }
.rules { padding-block: clamp(4rem, 9vw, 7rem) 1rem; }
.sub { color: var(--smoke); max-width: 52ch; margin-bottom: 2.5rem; }
.rules h3 { font: 700 1.7rem/1.1 "Cormorant Garamond", serif; }
.teams { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; margin-bottom: 4rem; }
.team { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 18px; display: grid; gap: 1.1rem; align-content: start; }
.team.red { background: linear-gradient(160deg, rgba(122, 36, 56, .55), rgba(122, 36, 56, .15)); border: 1px solid rgba(180, 70, 90, .45); }
.team.black { background: #0c090f; border: 1px solid rgba(238, 230, 213, .22); }
.team-goal { color: var(--smoke); margin-top: -.6rem; }
.role { display: grid; gap: .15rem; padding-top: 1rem; border-top: 1px solid rgba(238, 230, 213, .14); }
.role b { font-size: 1.05rem; }
.role span { color: rgba(238, 230, 213, .72); font-size: .95rem; }

.tabs { display: inline-flex; padding: .3rem; gap: .2rem; border-radius: 999px; background: var(--ink-2); margin-bottom: 1.25rem; }
.tab { border: 0; background: transparent; color: var(--smoke); padding: .6rem 1.6rem; border-radius: 999px; cursor: pointer;
  font: 700 1rem "Manrope", sans-serif; transition: background .4s var(--ease), color .4s; }
.tab[aria-selected="true"] { background: var(--brass); color: var(--ink); }
.phase-card { border-radius: 18px; padding: clamp(1.5rem, 4vw, 2.75rem); transition: background .8s var(--ease), border-color .8s;
  border: 1px solid rgba(238, 230, 213, .14); }
.phase-card[data-mode="day"] { background: linear-gradient(160deg, rgba(210, 169, 79, .22), rgba(210, 169, 79, .04)); border-color: rgba(210, 169, 79, .4); }
.phase-card[data-mode="night"] { background: linear-gradient(160deg, #1b1f3a, #0d0b16); border-color: rgba(120, 130, 220, .3); }
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.6rem; max-width: 760px; animation: rise .7s var(--ease) both; }
.steps[hidden] { display: none; }
.steps li { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 1rem; counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--brass);
  display: grid; place-items: center; font: 700 1.2rem "Cormorant Garamond", serif; color: var(--brass); }
.steps b { font-size: 1.1rem; }
.steps span { color: rgba(238, 230, 213, .78); }

.ends { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 4rem; }
.end { padding: 1.75rem; border-radius: 18px; border: 1px solid rgba(238, 230, 213, .18); }
.end:first-child { border-color: rgba(180, 70, 90, .6); }
.end p { color: var(--smoke); margin-top: .4rem; }
.notes { list-style: none; padding: 0; margin-top: 2.5rem; display: grid; gap: .7rem; color: rgba(238, 230, 213, .8); max-width: 70ch; }
.notes li { padding-left: 1.4rem; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: .7em; width: .6rem; height: 1px; background: var(--brass); }
@media (max-width: 860px) { .teams, .ends { grid-template-columns: 1fr; } .nav-links { gap: .4rem 1rem; font-size: .9rem; } }



/* итоги игры */
.results { padding-block: clamp(4rem, 9vw, 7rem) 1rem; }
.verdict { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1.5rem; border-radius: 24px; margin-bottom: 3rem; position: relative; overflow: hidden;
  border: 1px solid rgba(210, 169, 79, .5); --g: rgba(214, 70, 100, .5);
  background: radial-gradient(80% 120% at 50% 0%, rgba(122, 36, 56, .75), rgba(20, 16, 26, .95)); }
.verdict[data-team="black"] { --g: rgba(238, 230, 213, .35); border-color: rgba(238, 230, 213, .45);
  background: radial-gradient(80% 120% at 50% 0%, #38333f, #07050a); }
.verdict::after { content: ""; position: absolute; inset: auto 20% -60% 20%; height: 70%; background: radial-gradient(closest-side, var(--g), transparent);
  animation: pulseGlow 4s ease-in-out infinite alternate; pointer-events: none; }
@keyframes pulseGlow { from { opacity: .4; } to { opacity: 1; } }
.verdict-label { color: var(--brass); font-size: .95rem; }
.verdict h2 { font-size: clamp(2.6rem, 8vw, 5.5rem); margin: .4rem 0 .6rem; text-shadow: 0 0 40px var(--g); }
.verdict p { color: rgba(238, 230, 213, .8); max-width: 52ch; margin-inline: auto; position: relative; z-index: 1; }
.verdict-note { margin-top: 1rem; color: var(--bone); }
.results-title { margin-bottom: 1.25rem; }
.results-title small { font: 500 .9rem "Manrope", sans-serif; color: var(--smoke); }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; }
.tile { perspective: 900px; aspect-ratio: 4 / 5.2; }
.tile-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.tile.flipped .tile-inner { transform: rotateY(180deg); }
.tile-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .7rem; text-align: center; }
.tile-back { background: repeating-linear-gradient(45deg, #2a1420 0 8px, #36182a 8px 16px); border: 1px solid rgba(210, 169, 79, .6); }
.tile-back b { font-size: .95rem; word-break: break-word; }
.tile-back span { font: 700 2.4rem "Cormorant Garamond", serif; color: var(--brass); }
.tile-front { transform: rotateY(180deg); border: 1px solid var(--brass);
  background: radial-gradient(120% 90% at 50% 0%, #8f2b42, #3b0f1b); }
.tile[data-team="black"] .tile-front { background: radial-gradient(120% 90% at 50% 0%, #34303d, #07050a); border-color: var(--bone); }
.tile.win .tile-front { box-shadow: 0 0 34px -4px rgba(210, 169, 79, .65); }
.tile-front img { width: 52%; }
.tile-front strong { font: 700 1.15rem/1.1 "Cormorant Garamond", serif; }
.tile-nick { font-size: .8rem; color: rgba(238, 230, 213, .75); word-break: break-word; }
.tile-front em { font-style: normal; font-size: .7rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; background: var(--brass); color: var(--ink); }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .tile-inner { transform: rotateY(180deg); } }


/* командный чат */
.chat-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30; display: flex; align-items: center; gap: .6rem; padding: .85rem 1.4rem;
  border: 1px solid var(--brass); border-radius: 999px; cursor: pointer; background: linear-gradient(135deg, #7a2438, #2a1420); color: var(--bone);
  font: 700 .95rem "Manrope", sans-serif; box-shadow: 0 16px 40px -12px #000, 0 0 30px -8px rgba(210, 169, 79, .5);
  animation: rise .7s var(--ease) both; transition: transform .35s var(--ease); }
.chat-fab:hover { transform: translateY(-3px); }
.chat-fab[hidden], .chat-panel[hidden] { display: none; }
.chat-badge { min-width: 1.4rem; padding: .05rem .4rem; border-radius: 999px; background: var(--brass); color: var(--ink); font-size: .8rem; text-align: center; }
.chat-badge[hidden] { display: none; }
.chat-panel { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: min(380px, calc(100% - 2.5rem)); height: min(560px, calc(100% - 2.5rem));
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--ink-2); border: 1px solid rgba(210, 169, 79, .4);
  box-shadow: 0 40px 100px -30px #000; opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.chat-panel.show { opacity: 1; transform: none; }
.chat-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem .8rem; border-bottom: 1px solid rgba(238, 230, 213, .12);
  background: linear-gradient(135deg, rgba(122, 36, 56, .55), transparent); }
.chat-title { font: 700 1.5rem/1.1 "Cormorant Garamond", serif; }
.chat-members { color: var(--smoke); font-size: .8rem; margin-top: .15rem; }
.chat-x { border: 0; background: none; color: var(--smoke); font-size: 1.7rem; line-height: 1; cursor: pointer; align-self: flex-start; }
.chat-list { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: .55rem .8rem; border-radius: 14px 14px 14px 4px; background: #2a2236; animation: rise .35s var(--ease) both; }
.msg.pending { opacity: .55; }
.msg.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: #6a2133; }
.msg-who { display: block; font-size: .72rem; color: var(--brass); margin-bottom: .1rem; }
.msg p { word-break: break-word; font-size: .95rem; line-height: 1.4; }
.chat-note { padding: .5rem 1rem; text-align: center; font-size: .85rem; color: #ffb4a9; background: rgba(179, 38, 30, .15); }
.chat-form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid rgba(238, 230, 213, .12); }
.chat-form input { flex: 1; min-width: 0; padding: .65rem .9rem; border-radius: 999px; border: 1px solid rgba(238, 230, 213, .25); background: #14101a;
  color: var(--bone); font: 500 .95rem "Manrope", sans-serif; }
.chat-form input:focus { outline: none; border-color: var(--brass); }
.chat-form .btn { padding: .65rem 1.1rem; font-size: .9rem; }
@media (max-width: 480px) { .chat-panel { right: .6rem; bottom: .6rem; width: calc(100% - 1.2rem); height: calc(100% - 1.2rem); } }


/* панель ведущего */
.hostpage .hp-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(238, 230, 213, .12); }
.hp-head h1 { font: 700 2rem "Cormorant Garamond", serif; }
.hp-head .logo { color: var(--brass); font-size: 1rem; }
.hp-actions { display: flex; align-items: center; gap: 1.25rem; }
.hp-actions .btn { padding: .6rem 1.2rem; font-size: .9rem; }
.hp-players { padding-block: 2rem 1rem; }
.hp-players h2, .hc h2 { font-size: 1.8rem; margin-bottom: .8rem; }
.hp-players ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hp-players li { list-style: none; }
.hp-pl { display: flex; gap: .6rem; align-items: baseline; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--brass); background: rgba(122, 36, 56, .45);
  color: var(--bone); font: inherit; cursor: pointer; transition: opacity .3s, transform .3s var(--ease); }
.hp-pl:hover { transform: translateY(-2px); }
.hp-pl[data-team="black"] { border-color: var(--bone); background: #0c090f; }
.hp-pl span { font-size: .8rem; color: var(--smoke); }
.hp-pl.out { opacity: .4; text-decoration: line-through; }
.hp-pl.out span::after { content: " · выбыл"; }
.hp-hint { margin-bottom: .8rem; }
.hp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-block: 1rem; }
.hc { display: flex; flex-direction: column; min-height: 0; padding: 1.1rem; border-radius: 18px; background: var(--ink-2); border: 1px solid rgba(238, 230, 213, .12); }
.hc-list { height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; scroll-behavior: smooth; }
.hc-empty { color: var(--smoke); font-size: .9rem; }
.hc .msg { max-width: 100%; }
.hp-note { margin-top: .5rem; padding-bottom: 3rem; }
@media (max-width: 860px) { .hp-cols { grid-template-columns: 1fr; } .hc-list { height: 38vh; } }

.msg.host { background: rgba(210, 169, 79, .16); border: 1px solid rgba(210, 169, 79, .55); }
.msg.host .msg-who { font-weight: 700; }
.hc-form { display: flex; gap: .5rem; margin-top: .8rem; }
.hc-form input { flex: 1; min-width: 0; padding: .6rem .9rem; border-radius: 999px; border: 1px solid rgba(238, 230, 213, .25); background: #14101a;
  color: var(--bone); font: 500 .9rem "Manrope", sans-serif; }
.hc-form input:focus { outline: none; border-color: var(--brass); }
.hc-form .btn { padding: .6rem 1.1rem; font-size: .85rem; white-space: nowrap; }
.hp-broadcast { margin: .5rem 0 1rem; }

/* получение роли */
.role-sec { padding-block: 2rem 1rem; }
.role-box { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 22px; border: 1px solid rgba(210, 169, 79, .4);
  background: linear-gradient(135deg, rgba(122, 36, 56, .4), rgba(20, 16, 26, .9) 70%); transition: border-color .4s; }
.role-box.locked { border-color: rgba(238, 230, 213, .14); background: var(--ink-2); }
.role-copy h2 { margin-bottom: .5rem; }
.role-copy p { color: var(--smoke); max-width: 46ch; }
.btn:disabled { background: transparent; border: 1px dashed rgba(238, 230, 213, .3); color: var(--smoke); cursor: not-allowed; box-shadow: none; transform: none; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; opacity: 0; transition: opacity .35s var(--ease); }
.modal[hidden] { display: none; }
.modal.show { opacity: 1; }
.modal-bg { position: absolute; inset: 0; background: rgba(8, 6, 12, .85); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(420px, 100%); max-height: 100%; overflow: auto; padding: 2rem 1.75rem; border-radius: 22px; text-align: center;
  background: var(--ink-2); border: 1px solid rgba(210, 169, 79, .35); box-shadow: 0 40px 100px -30px #000;
  transform: translateY(24px) scale(.97); transition: transform .5s var(--ease); }
.modal.show .modal-card { transform: none; }
.modal-x { position: absolute; top: .6rem; right: .9rem; border: 0; background: none; color: var(--smoke); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.modal-card h3 { font: 700 2rem "Cormorant Garamond", serif; }
.rm-sub { color: var(--smoke); margin-bottom: 1.5rem; }
.modal .field { text-align: left; }
.modal .field input { color: var(--bone); border-bottom-color: rgba(238, 230, 213, .35); }
.modal .field input:focus { border-color: var(--brass); }
.modal .field input::placeholder { color: rgba(238, 230, 213, .3); }
.modal .btn { width: 100%; margin-top: .4rem; }
.rm-err { color: #ff8a80; font-size: .9rem; margin-bottom: .8rem; }
.rm-err.shake { animation: shake .4s; }
.rm-reveal[hidden], .rm-ask[hidden] { display: none; }

.card3d { position: relative; perspective: 1100px; width: min(280px, 100%); margin: .5rem auto 1.25rem; }
.card-inner { position: relative; aspect-ratio: 5 / 7.4; transform-style: preserve-3d; transition: transform 1.3s var(--ease); }
.card3d.flip .card-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.1rem; }
.face.back { background: repeating-linear-gradient(45deg, #2a1420 0 10px, #36182a 10px 20px); border: 2px solid var(--brass);
  box-shadow: 0 20px 60px -20px #000; }
.face.back span { font: 700 5rem "Cormorant Garamond", serif; color: var(--brass); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }
.face.front { transform: rotateY(180deg); --c1: #8f2b42; --c2: #3b0f1b; --glow: rgba(214, 70, 100, .55);
  background: radial-gradient(120% 90% at 50% 0%, var(--c1), var(--c2)); border: 2px solid var(--brass);
  box-shadow: 0 0 60px -6px var(--glow), 0 30px 60px -25px #000; }
.face.front[data-team="black"] { --c1: #34303d; --c2: #07050a; --glow: rgba(238, 230, 213, .35); border-color: var(--bone); }
.emblem { width: 62%; margin-bottom: .4rem; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5)); }
.rr-team { font-size: .8rem; color: var(--brass); }
.rr-name { font: 700 1.9rem/1.1 "Cormorant Garamond", serif; margin: .25rem 0 .5rem; }
.rr-desc { font-size: .82rem; line-height: 1.45; color: rgba(238, 230, 213, .8); }
.rr-chat { margin-bottom: .8rem; animation: rise .8s var(--ease) both; }
.rr-chat[hidden] { display: none; }
.rr-note { color: var(--smoke); font-size: .85rem; margin-bottom: 1rem; }
.card3d.flip .face.front { animation: glow 2.4s ease-in-out .9s 2; }
@keyframes glow { 50% { box-shadow: 0 0 110px 6px var(--glow), 0 30px 60px -25px #000; } }
.sparks { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.sparks i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); opacity: 0;
  animation: spark 1.4s var(--ease) forwards; }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } }
@media (max-width: 860px) { .role-box { flex-direction: column; align-items: flex-start; } }

/* заявка */
.reg { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; padding-block: 5rem 7rem; }
.reg-info p { color: var(--smoke); max-width: 38ch; margin-bottom: 1.75rem; }
.dossier { background: var(--bone); color: var(--ink); border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.field { display: block; margin-bottom: 1.4rem; }
.field span { display: block; font-size: .9rem; font-weight: 700; margin-bottom: .2rem; }
.field input { width: 100%; padding: .6rem 0; border: 0; border-bottom: 2px solid rgba(20, 16, 26, .25); background: transparent;
  font: 500 1.05rem "Manrope", sans-serif; color: var(--ink); transition: border-color .3s; }
.field input:focus { outline: none; border-color: var(--wine); }
.field input::placeholder { color: rgba(20, 16, 26, .35); }
.field.bad input { border-color: #b3261e; animation: shake .4s; }
.help { display: block; margin-top: .3rem; font-size: .8rem; color: rgba(20, 16, 26, .6); }
.err { display: block; color: #b3261e; font-size: .85rem; font-style: normal; margin-top: .3rem; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.dossier .closed.dark { color: var(--ink); }

/* уведомления */
.toasts { position: fixed; top: 4.5rem; right: 1.25rem; z-index: 20; display: grid; gap: .6rem; }
.toast { padding: .9rem 1.2rem; border-radius: 10px; background: var(--ink-2); border-left: 4px solid var(--brass); box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  animation: slide .6s var(--ease) both; transition: opacity .5s, transform .5s; }
.toast.error { border-color: #e0574d; }
.toast.hide { opacity: 0; transform: translateX(30px); }
@keyframes slide { from { opacity: 0; transform: translateX(40px); } }

.foot { text-align: center; color: var(--smoke); padding: 2rem; border-top: 1px solid rgba(238, 230, 213, .1); font-size: .9rem; }

/* появление секций */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(238, 230, 213, .14); }
  .fact:last-child { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
  .seats { grid-template-columns: repeat(2, 1fr); }
  .reg { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal], .seat { opacity: 1; transform: none; }
  .bar i { transform: none; }
}

/* ---------- ночные ходы ---------- */
.night-fab { bottom: 1.25rem; background: linear-gradient(135deg, #1d2a4f, #14101a); }
.night-panel { z-index: 41; }
.night-body { flex: 1; overflow-y: auto; padding: 1rem; display: grid; gap: 1.2rem; align-content: start; }
.night-act h4 { font: 700 1.2rem "Cormorant Garamond", serif; color: var(--brass); }
.night-cur { color: var(--smoke); font-size: .85rem; margin: .1rem 0 .6rem; }
.night-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.night-opt { padding: .4rem .85rem; border-radius: 999px; border: 1px solid rgba(238, 230, 213, .25); background: #14101a; color: var(--bone);
  font: 500 .85rem "Manrope", sans-serif; cursor: pointer; transition: background .25s, border-color .25s, transform .3s var(--ease); }
.night-opt:hover:not(:disabled) { border-color: var(--brass); transform: translateY(-2px); }
.night-opt.on { background: var(--brass); border-color: var(--brass); color: var(--ink); font-weight: 700; }
.night-opt:disabled { opacity: .5; cursor: not-allowed; }
.night-res p { font-size: .9rem; padding: .3rem 0; border-bottom: 1px solid rgba(238, 230, 213, .1); }
.night-note[hidden], .night-fab[hidden], .night-panel[hidden] { display: none; }

/* панель ведущего: ночь */
.hp-night { margin: 1.5rem 0 .5rem; padding: 1.25rem; border-radius: 18px; background: var(--ink-2); border: 1px solid rgba(210, 169, 79, .35); }
.hp-night-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.hp-night-head h2 { font-size: 1.8rem; }
.hp-night-head .btn { padding: .6rem 1.2rem; font-size: .9rem; }
.hn-night { padding: .8rem 0; border-top: 1px solid rgba(238, 230, 213, .12); }
.hn-night h3 { font: 700 1.2rem "Cormorant Garamond", serif; color: var(--brass); margin-bottom: .3rem; }
.hn-moves { list-style: none; padding: 0; display: grid; gap: .25rem; font-size: .92rem; }
.hn-moves b { color: var(--brass); }
.hn-out { margin-top: .5rem; padding: .5rem .8rem; border-radius: 10px; background: rgba(122, 36, 56, .35); font-weight: 600; }
.hn-wait { margin-top: .4rem; color: #ffb4a9; font-size: .85rem; }
.hp-night-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.hn-don { margin: .4rem 0 1rem; padding: .8rem 1rem; border-radius: 12px; background: rgba(210, 169, 79, .12); border: 1px solid var(--brass); }
.hn-don[hidden] { display: none; }
.hn-don-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.hn-don-row .btn { padding: .45rem 1rem; font-size: .85rem; }
.rr-chat[hidden], .rr-chat-note[hidden] { display: none; }
.rr-chat { margin-top: .6rem; }
.hp-night { margin-bottom: 3rem; }

/* ---------- архив игр ---------- */
.fact-link { text-decoration: none; transition: color .3s; }
.fact-link:hover { color: var(--brass); }
.ar-wrap { display: grid; gap: 1.25rem; padding-block: 1.5rem 4rem; }
.ar-game { padding: 1.5rem; border-radius: 18px; background: var(--ink-2); border: 1px solid rgba(238, 230, 213, .12); animation: rise .6s var(--ease) both; }
.ar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.ar-head h2 { font-size: 2rem; }
.ar-meta { color: var(--smoke); font-size: .9rem; }
.ar-win { padding: .35rem 1rem; border-radius: 999px; background: var(--brass); color: var(--ink); font-weight: 700; font-size: .85rem; }
.ar-game[data-team="black"] .ar-win { background: var(--bone); }
.ar-text { margin-top: .8rem; max-width: 70ch; }
.ar-players { list-style: none; padding: 0; margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.ar-players li { display: flex; gap: .5rem; align-items: baseline; padding: .35rem .85rem; border-radius: 999px; border: 1px solid rgba(238, 230, 213, .2); background: rgba(122, 36, 56, .3); }
.ar-players li[data-team="black"] { background: #0c090f; }
.ar-players li.win { border-color: var(--brass); }
.ar-players li span { font-size: .8rem; color: var(--smoke); }

/* панель ведущего: ходы ночи */
.hn-night.current { padding: 1rem; border-radius: 14px; border: 1px solid var(--brass); background: rgba(210, 169, 79, .06); }
.hn-nhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.hn-nhead h3 { margin: 0; font-size: 1.5rem; }
.hn-progress { padding: .25rem .8rem; border-radius: 999px; background: rgba(179, 38, 30, .25); font-size: .85rem; font-weight: 700; }
.hn-progress.all { background: rgba(60, 140, 90, .35); }
.hn-body { display: grid; gap: .9rem; }
.hn-group h4 { font: 700 1rem "Manrope", sans-serif; color: var(--brass); margin-bottom: .35rem; }
.hn-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; padding: .45rem .8rem; border-radius: 10px; background: #14101a; margin-bottom: .3rem; }
.hn-who { font-weight: 700; }
.hn-role { font-size: .8rem; color: var(--smoke); }
.hn-arrow { color: var(--brass); }
.hn-target { font-weight: 700; }
.hn-result { margin-left: auto; padding: .1rem .7rem; border-radius: 999px; background: var(--brass); color: var(--ink); font-size: .8rem; font-weight: 700; }
.hn-line.pending { opacity: .85; border: 1px dashed rgba(255, 180, 169, .5); }
.hn-line.pending .hn-target { color: #ffb4a9; font-weight: 500; }
.hn-out { padding: .7rem 1rem; border-radius: 12px; font-weight: 700; background: rgba(238, 230, 213, .08); }
.hn-out.dead { background: rgba(179, 38, 30, .35); }
.hn-out.saved { background: rgba(60, 140, 90, .35); }
.hn-night.past summary { cursor: pointer; color: var(--smoke); font-size: .92rem; padding: .3rem 0; }
.hn-night.past[open] summary { color: var(--bone); margin-bottom: .6rem; }
.night-cancel { margin-left: .4rem; padding: .1rem .6rem; border-radius: 999px; border: 1px solid #ffb4a9; background: none; color: #ffb4a9;
  font: 500 .75rem "Manrope", sans-serif; cursor: pointer; }
.night-cancel:hover { background: rgba(179, 38, 30, .25); }
.night-found { padding: .6rem .8rem; border-radius: 12px; background: rgba(210, 169, 79, .15); border: 1px solid var(--brass); font-size: .9rem; }

/* панель ведущего: завершение игры */
.hp-finish { margin: 1.5rem 0 3rem; padding: 1.25rem; border-radius: 18px; background: var(--ink-2); border: 1px solid rgba(238, 230, 213, .18); display: grid; gap: .9rem; }
.hp-finish h2 { font-size: 1.8rem; }
.hf-pick { display: flex; gap: .6rem; flex-wrap: wrap; }
.hp-finish textarea { width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1px solid rgba(238, 230, 213, .25); background: #14101a;
  color: var(--bone); font: 500 .95rem "Manrope", sans-serif; resize: vertical; }
.hp-finish textarea:focus { outline: none; border-color: var(--brass); }
.hp-finish #hf-go { justify-self: start; }
.hf-done a { color: var(--brass); }
.hp-finish .chat-note[hidden] { display: none; }

/* ---------- маньяк (нейтральная роль) ---------- */
.verdict[data-team="maniac"] { --g: rgba(160, 90, 220, .45); border-color: rgba(160, 90, 220, .6);
  background: radial-gradient(80% 120% at 50% 0%, #3c1d57, #0a0610); }
.tile[data-team="maniac"] .tile-front { background: radial-gradient(120% 90% at 50% 0%, #4a2670, #0a0610); border-color: #a05adc; }
.hp-pl[data-team="maniac"] { border-color: #a05adc; background: #1a0f26; }
.face.front[data-team="maniac"] { --c1: #4a2670; --c2: #0a0610; --glow: rgba(160, 90, 220, .4); border-color: #a05adc; }
.ar-game[data-team="maniac"] .ar-win { background: #a05adc; }
.ar-players li[data-team="maniac"] { background: #1a0f26; }

/* ---------- ночные ходы в архиве ---------- */
.ar-nights { margin-top: 1.1rem; border-top: 1px solid rgba(238, 230, 213, .12); padding-top: .8rem; }
.ar-nights summary { cursor: pointer; color: var(--brass); font-weight: 700; }
.ar-night { margin-top: .9rem; }
.ar-night h3 { font: 700 1.2rem "Cormorant Garamond", serif; color: var(--brass); }
.ar-night ul { list-style: none; padding: 0; display: grid; gap: .25rem; margin-top: .3rem; }
.ar-night li { font-size: .9rem; padding: .3rem .6rem; border-left: 2px solid rgba(238, 230, 213, .2); }
.ar-night li[data-kind="kill"], .ar-night li[data-kind="slay"] { border-left-color: #b3261e; }
.ar-night li[data-kind="vote"] { border-left-color: #8a4a52; }
.ar-night li[data-kind="heal"] { border-left-color: #3f9d5b; }
.ar-night li[data-kind="check"] { border-left-color: #5a7fd6; }
.ar-night small { color: var(--smoke); }
.ar-night em { color: var(--bone); font-style: normal; font-weight: 700; }
.ar-out { margin-top: .4rem; color: var(--smoke); font-size: .9rem; }


/* чаты команд (WebSocket) */
.team-fab { bottom: 4.9rem; background: linear-gradient(135deg, #3a2d57, #14101a); }
.hostpage .team-fab { bottom: 1.25rem; }
.team-panel { z-index: 42; }
.team-fab[hidden], .team-panel[hidden], .chat-tabs[hidden], .chat-form[hidden] { display: none; }
.chat-tabs { display: flex; gap: .35rem; padding: .55rem .8rem 0; overflow-x: auto; border-bottom: 1px solid rgba(238, 230, 213, .12); }
.chat-tab { flex: none; display: flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1px solid transparent; border-bottom: 0;
  border-radius: 10px 10px 0 0; background: none; color: var(--smoke); font: 700 .82rem "Manrope", sans-serif; cursor: pointer; }
.chat-tab.on { background: #2a2236; color: var(--bone); border-color: rgba(210, 169, 79, .35); }
.chat-tab b { min-width: 1.1rem; border-radius: 999px; background: var(--brass); color: var(--ink); font-size: .7rem; text-align: center; }
.chat-tab b:empty { display: none; }
.chat-empty { margin: auto; max-width: 17rem; text-align: center; color: var(--smoke); font-size: .9rem; line-height: 1.45; }
.msg.hostmsg { background: #3b2c10; border: 1px solid rgba(210, 169, 79, .5); }
.msg.hostmsg.mine { background: #4a3611; }
.msg-time { font-style: normal; color: var(--smoke); margin-left: .2rem; }
.chat-form input:disabled, .chat-form .btn:disabled { opacity: .5; cursor: not-allowed; }
.chat-note[hidden] { display: none; }

/* ночь: пометки проверок рядом с ником, наблюдение за ходами */
.night-opt { display: inline-flex; align-items: center; gap: .4rem; }
.night-mark { font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: rgba(238, 230, 213, .12); color: var(--smoke); }
.night-opt.hit { border-color: #b3261e; background: rgba(179, 38, 30, .22); }
.night-opt.hit .night-mark { background: #b3261e; color: #fff; }
.night-opt.clear .night-mark { background: rgba(63, 157, 91, .22); color: #8fd6a4; }
.night-opt.on .night-mark { background: rgba(20, 16, 26, .2); color: var(--ink); }
.night-obs p { font-size: .9rem; padding: .3rem 0; border-bottom: 1px solid rgba(238, 230, 213, .1); }

/* окна «Ночь» и «Чат»: кнопки всегда на виду поверх окон, окна стоят над кнопками и не закрывают друг друга */
:root { --dock: 8.6rem; }
.hostpage { --dock: 4.9rem; }
.chat-fab { z-index: 60; }
.chat-panel { bottom: var(--dock); height: min(560px, calc(100% - var(--dock) - .8rem));
  transition: opacity .35s var(--ease), transform .45s var(--ease), right .35s var(--ease), width .35s var(--ease), height .35s var(--ease); }
@media (min-width: 861px) {
  body.chat-open .night-panel { right: calc(1.25rem + min(380px, 100% - 2.5rem) + 1rem); }
}
@media (max-width: 860px) {
  body.chat-open.night-open .night-panel { top: .6rem; bottom: auto; right: .6rem; width: calc(100% - 1.2rem); height: calc(50% - var(--dock) / 2 - .3rem); }
  body.chat-open.night-open .team-panel { top: auto; bottom: var(--dock); right: .6rem; width: calc(100% - 1.2rem); height: calc(50% - var(--dock) / 2 - .3rem); }
}
@media (max-width: 480px) {
  .chat-panel { right: .6rem; width: calc(100% - 1.2rem); height: calc(100% - var(--dock) - .6rem); }
}
/* таймер ночи и служебные сообщения */
.night-status.urgent, #hn-title.urgent { color: #ff8a7a; font-weight: 700; }
.msg.sysmsg { align-self: center; max-width: 92%; text-align: center; background: rgba(61, 90, 160, .22); border: 1px solid rgba(110, 140, 220, .4); border-radius: 12px; }
.msg.sysmsg .msg-who { color: #9db4f0; }
#hn-extend[hidden] { display: none; }

/* стол: удаление заявки ведущим и уход игрока */
.seat { position: relative; }
.seat-x { position: absolute; top: .35rem; right: .45rem; width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: rgba(179, 38, 30, .85);
  color: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.seat-x:hover { background: #b3261e; }
.seat-hint { margin-top: .8rem; font-size: .85rem; }
.leave { margin-top: 1.2rem; }
.leave summary { cursor: pointer; color: var(--smoke); font-size: .9rem; width: fit-content; }
.leave summary:hover { color: var(--bone); }
.leave-form { display: grid; gap: .8rem; max-width: 24rem; margin-top: .8rem; }
.leave-form .field { margin-bottom: 0; }
.leave-form .field span { color: var(--bone); }
.leave-form .field input { padding: .75rem 1rem; border: 1px solid rgba(238, 230, 213, .45); border-radius: 12px; background: #1d1726; color: var(--bone); font: 500 1rem "Manrope", sans-serif; }
.leave-form .field input:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(210, 169, 79, .25); }
.leave-form .field input::placeholder { color: rgba(238, 230, 213, .4); }
.leave-form .btn { background: var(--brass); color: var(--ink); border: 0; width: 100%; }
.leave-form .btn:hover { filter: brightness(1.1); }
.leave summary { color: var(--bone); font-weight: 700; padding: .5rem 1rem; border: 1px solid var(--brass); border-radius: 999px; }
.leave summary:hover { background: var(--brass); color: var(--ink); }
.leave[open] summary { background: rgba(210, 169, 79, .15); }

/* кнопка Discord в шапке */
.discord-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; margin-left: .4rem; border-radius: 50%;
  background: #5865f2; color: #fff; box-shadow: 0 8px 24px -8px rgba(88, 101, 242, .8); transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .3s; }
.discord-btn svg { width: 1.4rem; height: 1.4rem; }
.discord-btn:hover { transform: translateY(-3px) scale(1.06); filter: brightness(1.12); box-shadow: 0 14px 30px -8px rgba(88, 101, 242, .95); }

/* чёрный список (панель ведущего) */
.hp-black { padding-block: 1.5rem; }
.hp-black h2 { font-size: 1.8rem; margin-bottom: .8rem; }
.hb-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .8rem; }
.hb-form input { flex: 1 1 12rem; min-width: 0; padding: .65rem .9rem; border-radius: 12px; border: 1px solid rgba(238, 230, 213, .35); background: #1d1726;
  color: var(--bone); font: 500 .95rem "Manrope", sans-serif; }
.hb-form input:focus { outline: none; border-color: var(--brass); }
.hb-form .btn { padding: .65rem 1.4rem; font-size: .9rem; }
.hb-list { list-style: none; padding: 0; display: grid; gap: .4rem; margin-top: .6rem; }
.hb-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem .9rem; border-radius: 12px;
  border: 1px solid rgba(179, 38, 30, .55); background: rgba(179, 38, 30, .12); }
.hb-who { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; min-width: 0; }
.hb-who b { font-weight: 700; }
.hb-vk { color: var(--brass); font-size: .9rem; overflow-wrap: anywhere; }
.hb-who em { color: var(--smoke); font-size: .85rem; font-style: normal; }
.hb-del { flex: none; width: 1.7rem; height: 1.7rem; border: 0; border-radius: 50%; background: rgba(238, 230, 213, .12); color: var(--bone); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.hb-del:hover { background: #b3261e; }

/* состав команды в чате */
.chat-team { padding: .5rem 1rem; font-size: .82rem; line-height: 1.5; color: var(--smoke); border-bottom: 1px solid rgba(238, 230, 213, .12); background: rgba(238, 230, 213, .04); }
.chat-team[hidden] { display: none; }
.chat-team b { color: var(--bone); }
.chat-team .tm { color: var(--bone); font-weight: 700; }
.chat-team .tm.me { color: var(--brass); }
.chat-team .tm.out { text-decoration: line-through; opacity: .6; }
.chat-team i { font-style: normal; }

/* ===== Modern seats ===== */
.seats { gap: 1rem; }
.seat { grid-template-columns: auto 1fr; align-items: center; column-gap: .8rem; padding: .85rem 1rem; min-height: 4.2rem;
  border: 1px solid rgba(238, 230, 213, .09); border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.01));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.seat-n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: rgba(238, 230, 213, .07); font-size: .8rem; font-weight: 700; color: var(--smoke); }
.seat-nick { color: var(--smoke); font-weight: 500; font-size: .95rem; }
.seat.taken { border-color: rgba(210, 169, 79, .55);
  background: linear-gradient(145deg, rgba(210,169,79,.2), rgba(122,36,56,.22));
  box-shadow: 0 8px 26px rgba(122,36,56,.35), 0 0 0 1px rgba(210,169,79,.12), inset 0 1px 0 rgba(255,210,120,.18); }
.seat.taken .seat-n { background: linear-gradient(135deg, #e6c36e, #b98a2e); color: #1b1220; }
.seat.taken .seat-nick { color: var(--bone); font-weight: 700; font-size: 1rem; }
.seat.taken:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(122,36,56,.5), 0 0 0 1px rgba(210,169,79,.3); }
.seat:not(.taken) .seat-nick { opacity: .55; }
.seat-x { top: 50%; right: .6rem; transform: translateY(-50%); }
@media (max-width: 700px) { .seat { padding: .7rem .8rem; } }

/* seats: long nicks fit */
.seat { column-gap: .65rem; padding: .8rem .85rem; }
.seat-n { width: 1.8rem; height: 1.8rem; font-size: .75rem; }
.seat-nick { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; font-size: .95rem; }
.seat.taken .seat-nick { font-size: .95rem; }
.seat-x { top: -.45rem; right: -.45rem; transform: none; width: 1.4rem; height: 1.4rem; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.5); }

/* ===== Role card art ===== */
.face.front.art { padding: 0; border: 0; background: none; box-shadow: 0 0 60px -6px var(--glow), 0 30px 60px -25px #000; }
.face.front.art .emblem { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 18px; filter: none; }
.face.front.art .rr-team, .face.front.art .rr-name, .face.front.art .rr-desc { display: none; }
.rr-desc-out { font-size: .9rem; line-height: 1.45; color: rgba(238, 230, 213, .85); margin: 0 auto 1rem; max-width: 34ch; text-align: center; }
.rr-desc-out[hidden] { display: none; }
.tile-front.art { padding: 0; border: 0; background: none; }
.tile-front.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.tile-front.art strong, .tile-front.art .tile-nick, .tile-front.art em { position: absolute; left: 6%; right: 6%; z-index: 2; text-shadow: 0 1px 6px #000; }
.tile-front.art strong { display: none; }
.tile-front.art .tile-nick { bottom: 4%; background: rgba(10,6,14,.82); border-radius: 8px; padding: .25rem .4rem; font-weight: 700; color: var(--bone); }
.tile-front.art em { top: 3%; width: max-content; margin: 0 auto; }

/* ===== Game table ===== */
.gtable { position: relative; max-width: 1020px; margin: 2.5rem auto 1rem; aspect-ratio: 16 / 10; }
.gt-lamp { position: absolute; inset: -6% 10% 20%; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(255, 214, 140, .22), transparent 70%); animation: lampSway 7s ease-in-out infinite alternate; }
@keyframes lampSway { to { opacity: .65; transform: scale(1.04); } }
.gt-rim { position: absolute; inset: 15% 13%; border-radius: 50%; z-index: 1;
  background: linear-gradient(160deg, #6b3f22, #2b150b 60%, #4a2a16);
  box-shadow: 0 40px 70px -20px #000, 0 0 0 3px rgba(210, 169, 79, .35), inset 0 2px 6px rgba(255, 220, 160, .25); padding: 14px; }
.gt-felt { position: relative; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, #1e7050, #0f3d2d 60%, #082519);
  box-shadow: inset 0 0 0 2px rgba(210, 169, 79, .45), inset 0 0 60px rgba(0, 0, 0, .6); }
.gt-felt::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px dashed rgba(210, 169, 79, .35); }
.gtable.is-night .gt-felt { background: radial-gradient(ellipse 70% 60% at 50% 35%, #173a4f, #0c2234 60%, #060f1a); }
.gtable.is-night .gt-lamp { background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(120, 130, 255, .2), transparent 70%); }
.gt-center { text-align: center; display: grid; gap: .25rem; padding: 0 1rem; z-index: 1; }
.gt-phase { font: 700 clamp(1.5rem, 4vw, 2.6rem)/1 "Cormorant Garamond", serif; color: var(--brass); text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.gt-sub { font-size: clamp(.7rem, 1.4vw, .9rem); color: rgba(238, 230, 213, .8); }
.gt-alive { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(238, 230, 213, .65); }
.gt-alive b { color: var(--bone); }
.gt-ring { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; }
.gt-seat { --rx: 44%; --ry: 43%; position: absolute; left: calc(50% + var(--rx) * cos(var(--a))); top: calc(50% + var(--ry) * sin(var(--a)));
  transition: left .9s var(--ease), top .9s var(--ease);
  transform: translate(-50%, -50%); width: clamp(84px, 12.5%, 128px); display: grid; justify-items: center; gap: .2rem; text-align: center;
  opacity: 0; animation: seatIn .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes seatIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%); } }
.gt-n { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #1b1220;
  background: linear-gradient(135deg, #f0d085, #b98a2e); box-shadow: 0 4px 12px rgba(0, 0, 0, .55), 0 0 0 3px rgba(20, 16, 26, .7); }
.gt-nick { max-width: 100%; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.2; color: var(--bone);
  background: rgba(20, 16, 26, .86); border: 1px solid rgba(210, 169, 79, .4); box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
  overflow-wrap: anywhere; }
.gt-you { position: absolute; top: -.9rem; font-style: normal; font-size: .65rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px;
  background: var(--brass); color: var(--ink); }
.gt-seat.me .gt-n { box-shadow: 0 0 0 3px var(--brass), 0 0 22px 4px rgba(210, 169, 79, .75); animation: meGlow 2.2s ease-in-out infinite; }
.gt-seat.me .gt-nick { border-color: var(--brass); }
@keyframes meGlow { 50% { box-shadow: 0 0 0 3px var(--brass), 0 0 32px 8px rgba(210, 169, 79, .5); } }
.gt-skull { display: none; position: absolute; top: -.3rem; right: 18%; font-size: 1.15rem; filter: drop-shadow(0 2px 4px #000); }
.gt-seat.out .gt-n, .gt-seat.out .gt-nick { filter: grayscale(1) brightness(.6); }
.gt-seat.out .gt-nick { text-decoration: line-through; }
.gt-seat.out .gt-skull { display: block; }
#game-table.welcome .gt-rim { animation: tableWelcome 1.4s ease-in-out 2; }
@keyframes tableWelcome { 50% { box-shadow: 0 40px 70px -20px #000, 0 0 0 3px var(--brass), 0 0 60px 10px rgba(210, 169, 79, .5); } }
@media (max-width: 720px) {
  .gtable { aspect-ratio: auto; }
  .gt-lamp { display: none; }
  .gt-rim { position: relative; inset: auto; width: 74%; margin: 0 auto 1.25rem; aspect-ratio: 1; padding: 9px; }
  .gt-ring { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .gt-seat { position: relative; left: auto; top: auto; transform: none; width: auto; grid-template-columns: auto 1fr; justify-items: start; align-items: center;
    column-gap: .6rem; padding: .5rem .6rem; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(210, 169, 79, .2); animation: none; opacity: 1; }
  .gt-nick { background: none; border: 0; box-shadow: none; padding: 0; text-align: left; }
  .gt-you { position: static; grid-column: 2; }
  .gt-skull { top: .4rem; right: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .gt-seat { opacity: 1; animation: none; } }

/* ===== Game page ===== */
.gamepage .gp-main { width: min(1100px, 100% - 2rem); margin: 0 auto; padding-bottom: 6rem; }
.gp-role { display: grid; grid-template-columns: 210px 1fr; gap: 1.6rem; align-items: center; margin: 1.5rem 0 .5rem; padding: 1.2rem;
  border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); border: 1px solid rgba(210, 169, 79, .25);
  box-shadow: 0 14px 40px -14px #000; }
.gp-card img { width: 100%; display: block; border-radius: 16px; box-shadow: 0 16px 40px -12px #000, 0 0 40px -8px rgba(210, 169, 79, .4); transition: filter .4s; }
.gp-card img.gp-emblem { width: 70%; margin: 0 auto; box-shadow: none; }
.gp-label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--smoke); }
.gp-info h2 { font: 700 clamp(1.9rem, 4vw, 2.8rem)/1.05 "Cormorant Garamond", serif; margin: .2rem 0; }
.gp-team { color: var(--brass); font-weight: 700; margin-bottom: .6rem; }
.gp-desc { color: rgba(238, 230, 213, .85); line-height: 1.5; max-width: 52ch; margin-bottom: 1rem; }
.gp-out { color: #ff8a8a; font-weight: 700; margin-bottom: 1rem; }
.gp-role.is-hidden .gp-card img { filter: blur(22px) brightness(.5); }
.gp-role.is-hidden .gp-info h2, .gp-role.is-hidden .gp-team, .gp-role.is-hidden .gp-desc { filter: blur(9px); user-select: none; }
.gp-table { margin-top: 1rem; }
@media (max-width: 720px) { .gp-role { grid-template-columns: 1fr; justify-items: center; text-align: center; } .gp-card { width: 62%; } }
.gamepage .hp-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(238, 230, 213, .12); }
.gp-role { grid-template-columns: 150px 1fr; gap: 1.2rem; padding: .9rem 1.1rem; margin-bottom: 0; }
.gp-info h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.gp-desc { margin-bottom: .7rem; }
.gp-table { margin-top: 0; }
.gtable { margin-top: 1rem; }
@media (max-width: 720px) { .gp-role { grid-template-columns: 1fr; } .gp-card { width: 46%; } }

/* ===== Game table: fouls, speech, vote, journal, host tools ===== */
.gt-pips { display: flex; gap: .22rem; justify-content: center; margin-top: .05rem; }
.gt-pips i { width: .5rem; height: .5rem; border-radius: 50%; background: rgba(238, 230, 213, .18); box-shadow: inset 0 0 0 1px rgba(238, 230, 213, .25); transition: background .3s, box-shadow .3s; }
.gt-pips i.on { background: #e5483b; box-shadow: 0 0 8px 1px rgba(229, 72, 59, .8); }
.gt-seat.foul4 .gt-pips i { background: #7a1414; }
.gt-seat.nom .gt-nick { border-color: #b78bff; box-shadow: 0 0 14px rgba(183, 139, 255, .6); }
.gt-seat.nom::after { content: "выдвинут"; position: absolute; top: -.95rem; font-size: .6rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; background: #b78bff; color: #14101a; }
.gt-seat.nom.me::after { display: none; }
.gt-seat.speak .gt-n { box-shadow: 0 0 0 3px #5ee0a0, 0 0 26px 6px rgba(94, 224, 160, .7); animation: speakPulse 1.2s ease-in-out infinite; }
.gt-seat.speak .gt-nick { border-color: #5ee0a0; }
@keyframes speakPulse { 50% { box-shadow: 0 0 0 3px #5ee0a0, 0 0 38px 12px rgba(94, 224, 160, .45); } }
.gt-seat.voted .gt-n::after { content: "✓"; position: absolute; right: 22%; margin-top: -1.9rem; font-size: .8rem; color: #5ee0a0; }
.gt-seat.sel .gt-nick { background: var(--brass); color: var(--ink); }
#game-table[data-host="1"] .gt-seat { cursor: pointer; }
.gt-timer { display: grid; gap: .1rem; justify-items: center; }
.gt-timer[hidden] { display: none; }
.gt-tnick { font-size: .95rem; color: #5ee0a0; }
.gt-tleft { font: 700 clamp(2.2rem, 6vw, 3.6rem)/1 "Cormorant Garamond", serif; font-style: normal; color: var(--bone); text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }
.gt-tleft.low { color: #ffb347; animation: speakPulse 1s steps(2) infinite; }
.gt-tleft.done { color: #ff6b5e; }

.gp-hostbar { margin: 1rem 0 0; padding: .9rem 1rem; border-radius: 18px; border: 1px solid rgba(210, 169, 79, .3); background: rgba(255, 255, 255, .04); display: grid; gap: .7rem; }
.hb-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.hb-note input { flex: 1; min-width: 200px; padding: .65rem .9rem; border-radius: 12px; border: 1px solid rgba(238, 230, 213, .25); background: rgba(10, 6, 14, .6); color: var(--bone); font: inherit; }
.gp-hint { color: var(--smoke); font-size: .82rem; margin: 0; }

.gp-vote { margin: 1.2rem 0 0; padding: 1.1rem 1.2rem; border-radius: 20px; border: 1px solid rgba(183, 139, 255, .4);
  background: linear-gradient(145deg, rgba(183, 139, 255, .12), rgba(255, 255, 255, .02)); }
.gp-vote[hidden] { display: none; }
.gp-vote h3 { font: 700 1.5rem "Cormorant Garamond", serif; margin-bottom: .3rem; }
.gv-note { color: rgba(238, 230, 213, .8); font-size: .9rem; margin-bottom: .6rem; }
.gv-note.ok { color: #5ee0a0; }
.gv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gv-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .8rem; border-radius: 14px; background: rgba(10, 6, 14, .55); border: 1px solid rgba(238, 230, 213, .12); }
.gv-list li.mine { border-color: #5ee0a0; }
.gv-list b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gv-n { font: 700 1.3rem "Cormorant Garamond", serif; color: var(--brass); }
.gv-list small { width: 100%; color: var(--smoke); }
.gv-list em { font-style: normal; font-size: .75rem; color: #5ee0a0; }
.gv-list .btn { padding: .4rem .9rem; font-size: .85rem; }
.gv-result { margin: .6rem 0 0; font-weight: 700; color: var(--bone); }

.gp-log { margin: 1.2rem 0 0; padding: 1rem 1.2rem; border-radius: 20px; border: 1px solid rgba(238, 230, 213, .12); background: rgba(255, 255, 255, .03); }
.gp-log h3 { font: 700 1.4rem "Cormorant Garamond", serif; margin-bottom: .5rem; }
.gp-log ol { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; display: grid; gap: .35rem; }
.gp-log li { display: flex; gap: .7rem; font-size: .92rem; line-height: 1.35; padding: .3rem 0; border-bottom: 1px dashed rgba(238, 230, 213, .08); }
.gp-log time { color: var(--brass); font-weight: 700; flex: none; }
.gp-log li.empty { color: var(--smoke); }

.gp-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; justify-content: center; padding: .6rem; pointer-events: none; }
.gp-sheet[hidden] { display: none; }
.gp-sheet-in { pointer-events: auto; width: min(560px, 100%); padding: .8rem 1rem 1rem; border-radius: 20px; border: 1px solid rgba(210, 169, 79, .5);
  background: rgba(20, 16, 26, .96); box-shadow: 0 20px 60px #000; backdrop-filter: blur(10px); }
.gp-sheet header { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; }
.sh-nick { font-size: 1.1rem; }
.sh-info { color: var(--smoke); font-size: .85rem; flex: 1; }
.sh-x { background: none; border: 0; color: var(--bone); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.sh-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.sh-btns button { flex: 1 1 auto; padding: .6rem .9rem; border-radius: 12px; border: 1px solid rgba(210, 169, 79, .5); background: rgba(210, 169, 79, .12); color: var(--bone); font: 700 .9rem inherit; font-family: inherit; cursor: pointer; }
.sh-btns button:hover { background: rgba(210, 169, 79, .28); }
.sh-btns button:disabled { opacity: .4; cursor: default; }
.sh-btns .danger { border-color: rgba(229, 72, 59, .6); background: rgba(229, 72, 59, .15); }
#gp-toast { position: fixed; left: 50%; top: 1rem; transform: translate(-50%, -150%); z-index: 90; padding: .7rem 1.1rem; border-radius: 12px; background: #8f2b42; color: #fff; font-weight: 700; transition: transform .3s var(--ease); max-width: 92vw; }
#gp-toast.show { transform: translate(-50%, 0); }
body.gamepage:has(.gp-sheet:not([hidden])) .gp-main { padding-bottom: 12rem; }
.btn-danger { background: #b3382c; color: #fff; border-color: #b3382c; }
.gv-cancel { margin-left: .5rem; padding: .3rem .8rem; font-size: .8rem; }

/* иконки-карточки проверок над игроком */
.gt-check { position: absolute; top: -1.35rem; left: 50%; transform: translateX(-50%) rotate(-6deg); width: 1.35rem; height: 1.8rem; border-radius: .25rem;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800; line-height: 1; box-shadow: 0 3px 8px rgba(0, 0, 0, .6); pointer-events: auto; z-index: 3; }
.gt-check.hit { background: linear-gradient(160deg, #f0d085, #b98a2e); color: #2a1010; border: 2px solid #8c1c1c; }
.gt-check.clear { background: #3a3544; color: #bdb5c8; border: 2px solid #5a5368; }

/* логотип «Мафия» на сукне стола */
.gt-logo { position: absolute; left: 50%; top: 50%; height: 92%; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .3; pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.gt-center { text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.gt-felt::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .02) 0 2px, transparent 2px 5px); mix-blend-mode: overlay; }
.gtable.is-night .gt-logo { opacity: .22; }
@media (max-width: 700px) { .gt-logo { height: 96%; opacity: .26; } }

/* логотип как на главной: слово «Мафия» и пика */
.gt-logo { opacity: .12; }
.gt-brand { display: grid; justify-items: center; gap: .1rem; margin-bottom: .35rem; }
.gt-brand .logo { font-size: clamp(1.7rem, 4.6vw, 3rem); color: var(--brass); letter-spacing: .08em; text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }
.gt-brand i { font-style: normal; font-size: clamp(.9rem, 1.8vw, 1.2rem); color: var(--brass); opacity: .8; }
.gt-phase { font-size: clamp(1.1rem, 2.6vw, 1.7rem); }
.gt-brand .logo { background: linear-gradient(180deg, var(--brass) 0%, rgba(238, 230, 213, .8) 60%, rgba(238, 230, 213, .35) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .7)); }
.gtable .gt-logo, .gtable.is-night .gt-logo { opacity: .1; }

/* логотип игры на сукне: полупрозрачный, под текстом */
img.gt-logo { height: 86%; width: auto; aspect-ratio: 1; object-fit: contain; opacity: .38; filter: saturate(.9) drop-shadow(0 6px 18px rgba(0, 0, 0, .55));
  -webkit-mask-image: radial-gradient(circle, #000 62%, transparent 72%); mask-image: radial-gradient(circle, #000 62%, transparent 72%); }
.gtable img.gt-logo, .gtable.is-night img.gt-logo { opacity: .38; }
.gt-phase, .gt-alive, .gt-sub { text-shadow: 0 2px 8px #000, 0 0 18px #000; }
@media (max-width: 700px) { img.gt-logo { height: 90%; } }

/* возврат за игровой стол */
.return-box { display: grid; gap: 1.2rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 800px) { .return-box { grid-template-columns: 1.1fr 1fr; } }
.return-form { margin-top: 0; max-width: none; }

/* роли, которые играют сегодня */
.gp-roles { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.gp-roles-t { font-size: .8rem; color: var(--smoke); margin-right: .2rem; }
.gp-rl { font-size: .78rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; border: 1px solid rgba(238, 230, 213, .25); background: rgba(238, 230, 213, .06); color: var(--bone); }
.gp-rl b { color: var(--brass); font-weight: 700; }
.gp-rl.black { border-color: rgba(190, 70, 80, .55); }
.gp-rl.red { border-color: rgba(210, 169, 79, .45); }
.gp-rl.maniac { border-color: rgba(150, 120, 220, .55); }

/* логотип «Mafia Evolve» (прямоугольный, без круга) */
img.gt-logo, .gtable img.gt-logo, .gtable.is-night img.gt-logo { width: 66%; height: auto; max-height: 80%; aspect-ratio: auto; opacity: .5; -webkit-mask-image: none; mask-image: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)); }
@media (max-width: 700px) { img.gt-logo, .gtable img.gt-logo { width: 74%; } }

/* управление игрой прямо на игровом столе (для ведущего) */
.gp-tools { max-width: 1100px; margin: 1.5rem auto 4rem; padding: 0 clamp(1rem, 3vw, 2rem); }
.gpt-top { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(238, 230, 213, .15); padding-bottom: .8rem; }
.gpt-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.gpt-tab { padding: .5rem 1rem; border-radius: 999px; border: 1px solid rgba(238, 230, 213, .25); background: transparent; color: var(--smoke); font: inherit; font-weight: 600; cursor: pointer; }
.gpt-tab.on { background: var(--brass); color: #1b1410; border-color: var(--brass); }
.gpt-btns { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gpt-body > section { padding: 1.2rem 0 0; }
.gpt-body .hp-players, .gpt-body .hp-night { padding-block: 1.2rem 0; }

/* Зал славы: спонсоры */
.sponsors { padding-block: 3rem; }
.sp-frame { position: relative; text-align: center; padding: clamp(1.6rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem); border-radius: 26px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(210, 169, 79, .16), transparent 60%), linear-gradient(180deg, #1b1520, #110d16);
  border: 1px solid rgba(210, 169, 79, .45); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), inset 0 0 0 6px rgba(20, 16, 26, .9), inset 0 0 0 7px rgba(210, 169, 79, .25); }
.sp-frame::before { content: ""; position: absolute; inset: -40% -10% auto; height: 70%; background: conic-gradient(from 180deg at 50% 100%, transparent, rgba(210, 169, 79, .12), transparent 30%, rgba(210, 169, 79, .1), transparent 60%);
  pointer-events: none; opacity: .8; animation: sp-rays 14s ease-in-out infinite alternate; }
@keyframes sp-rays { to { transform: translateX(8%) rotate(4deg); opacity: .5; } }
.sp-kicker { position: relative; letter-spacing: .5em; text-transform: uppercase; font-size: .78rem; color: var(--brass); margin: 0 0 .6rem; }
.sp-title { position: relative; font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 0 0 .6rem; background: linear-gradient(180deg, #f6e0a0, #c9a24a 60%, #8a6a22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-lead { position: relative; max-width: 560px; margin: 0 auto 2rem; color: var(--smoke); }
.sp-tier { position: relative; margin-top: 1.8rem; }
.sp-tier-t { display: flex; align-items: center; gap: 1rem; font: 600 .85rem Manrope, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: var(--brass); margin: 0 0 1rem; }
.sp-tier-t::before, .sp-tier-t::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(210, 169, 79, .55)); }
.sp-tier-t::after { transform: scaleX(-1); }
.sp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.sp-card { position: relative; display: grid; justify-items: center; gap: .15rem; padding: .8rem 1.4rem; border-radius: 16px; min-width: 150px;
  background: linear-gradient(160deg, rgba(238, 230, 213, .09), rgba(238, 230, 213, .02)); border: 1px solid rgba(238, 230, 213, .2); transition: transform .25s, box-shadow .25s; }
.sp-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(210, 169, 79, .5); }
.sp-ico { font-size: 1.1rem; color: var(--brass); line-height: 1; }
.sp-nick { font-family: "Cormorant Garamond", serif; font-size: 1.35rem; color: var(--bone); letter-spacing: .02em; }
.sp-note { font-style: normal; font-size: .78rem; color: var(--smoke); max-width: 220px; }
.sp-legend .sp-card { min-width: min(100%, 280px); padding: 1.3rem 2.2rem; border-color: rgba(246, 224, 160, .7); overflow: hidden;
  background: linear-gradient(160deg, rgba(246, 224, 160, .22), rgba(201, 162, 74, .06)); box-shadow: 0 0 40px -8px rgba(210, 169, 79, .5); }
.sp-legend .sp-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 244, 205, .28) 50%, transparent 65%); transform: translateX(-120%); animation: sp-shine 4.5s ease-in-out infinite; }
@keyframes sp-shine { 55%, 100% { transform: translateX(120%); } }
.sp-legend .sp-ico { font-size: 1.8rem; }
.sp-legend .sp-nick { font-size: clamp(1.8rem, 4vw, 2.4rem); background: linear-gradient(180deg, #fff1c4, #d2a94f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-patron .sp-card { border-color: rgba(210, 169, 79, .5); }
.sp-patron .sp-nick { font-size: 1.6rem; color: #f0d98e; }
.sp-friend .sp-card { min-width: 0; padding: .55rem 1.1rem; }
.sp-ghost { border-style: dashed; border-color: rgba(210, 169, 79, .5); opacity: .8; }
.sp-cta { position: relative; margin-top: 2.2rem; display: grid; gap: .9rem; justify-items: center; color: var(--smoke); }
.sp-cta p { margin: 0; max-width: 520px; }
@media (prefers-reduced-motion: reduce) { .sp-frame::before, .sp-legend .sp-card::after { animation: none; } }

/* кнопка «Стать спонсором» */
.sp-btn { position: relative; display: inline-flex; align-items: center; gap: .8rem; padding: 1rem 2.2rem; border-radius: 999px; overflow: hidden; text-decoration: none;
  font: 700 1.05rem Manrope, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #231808;
  background: linear-gradient(180deg, #fbe7a7, #d2a94f 55%, #a67c2a); box-shadow: 0 10px 30px -8px rgba(210, 169, 79, .6), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .2s, box-shadow .2s; }
.sp-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 38px -8px rgba(210, 169, 79, .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
.sp-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-130%); animation: sp-shine 3.8s ease-in-out infinite; }
.sp-btn-ico { font-size: 1.3rem; line-height: 1; }
.sp-btn i { font-style: normal; transition: transform .2s; }
.sp-btn:hover i { transform: translateX(5px); }
@media (prefers-reduced-motion: reduce) { .sp-btn::after { animation: none; } }

/* лучший игрок */
.sp-best .sp-tier-t { color: #f0d98e; }
.bp-card { position: relative; display: grid; justify-items: center; gap: .3rem; max-width: 460px; margin: 0 auto; padding: 1.6rem 2.4rem; border-radius: 22px; overflow: hidden;
  background: radial-gradient(100% 120% at 50% 0%, rgba(240, 217, 142, .3), rgba(122, 36, 56, .3) 70%), #1a121b; border: 1px solid rgba(246, 224, 160, .75);
  box-shadow: 0 0 50px -10px rgba(210, 169, 79, .6), inset 0 0 0 4px rgba(20, 16, 26, .8), inset 0 0 0 5px rgba(210, 169, 79, .3); }
.bp-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 244, 205, .22) 50%, transparent 65%); transform: translateX(-130%); animation: sp-shine 5s ease-in-out infinite; pointer-events: none; }
.bp-crown { font-size: 2.4rem; line-height: 1; color: #f0d98e; filter: drop-shadow(0 0 12px rgba(240, 217, 142, .8)); }
.bp-nick { font-family: "Cormorant Garamond", serif; font-size: clamp(2rem, 5vw, 2.8rem); background: linear-gradient(180deg, #fff1c4, #d2a94f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bp-game { font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; color: var(--brass); }
.bp-note { font-style: normal; color: var(--bone); opacity: .85; max-width: 340px; }
.bp-ghost { border-style: dashed; opacity: .8; }
.bp-prev-t { margin: 1.4rem 0 .8rem; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--smoke); }
@media (prefers-reduced-motion: reduce) { .bp-card::after { animation: none; } }

/* компактнее: лучший игрок, кнопка под спонсорами */
.sp-cta { margin-top: 1.8rem; }
.sp-best { margin-top: 2.2rem; }
.bp-card { max-width: 340px; padding: .9rem 1.6rem; gap: .1rem; border-radius: 18px; }
.bp-crown { font-size: 1.5rem; }
.bp-nick { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.bp-note { font-size: .82rem; }
.bp-prev-t { margin: .9rem 0 .5rem; font-size: .7rem; }
.sp-best .sp-card { padding: .4rem .9rem; min-width: 0; }
.sp-best .sp-nick { font-size: 1.1rem; }

/* маленькое окошко «Лучший игрок»: отдельно от спонсоров, красное с белым */
.bestwin { padding-block: 0 3rem; display: flex; justify-content: center; }
.bw-box { position: relative; display: grid; justify-items: center; gap: .25rem; width: min(100%, 340px); padding: 1.1rem 1.6rem 1.3rem; border-radius: 20px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, rgba(214, 60, 80, .38), rgba(60, 12, 24, .9) 75%); border: 1px solid rgba(240, 120, 130, .6);
  box-shadow: 0 18px 40px -18px rgba(214, 60, 80, .7), inset 0 0 0 4px rgba(20, 8, 14, .85), inset 0 0 0 5px rgba(240, 120, 130, .25); }
.bw-box::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .14) 50%, transparent 65%); transform: translateX(-130%); animation: sp-shine 5.5s ease-in-out infinite; pointer-events: none; }
.bw-label { margin: 0; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: #ff9aa6; }
.bw-label span { color: #ffd2d8; }
.bw-nick { font-family: "Cormorant Garamond", serif; font-size: 1.9rem; line-height: 1.1; color: #fff; text-shadow: 0 0 18px rgba(255, 120, 135, .5); }
.bw-ghost { opacity: .7; }
.bw-game { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: #ffb3bc; }
.bw-note { font-style: normal; font-size: .84rem; color: #ffe7ea; opacity: .9; }
.bw-prev { margin: .5rem 0 0; font-size: .74rem; color: #d99aa3; }
@media (prefers-reduced-motion: reduce) { .bw-box::before { animation: none; } }

/* лучший игрок внутри Зала славы */
.sp-best-in { position: relative; margin-top: 2.2rem; }
.sp-best-in .bw-box { margin: 0 auto; }

/* выдвинутый или говорящий последнее слово игрок плавно выходит с края стола в круг */
.gt-seat.in-circle { --rx: 27%; --ry: 24%; z-index: 5; }
.gt-seat.in-circle .gt-n { box-shadow: 0 0 0 3px #b78bff, 0 0 26px 6px rgba(183, 139, 255, .6); }
.gt-seat.last .gt-n { box-shadow: 0 0 0 3px #ff6b6b, 0 0 28px 6px rgba(255, 107, 107, .65); animation: speakPulse 1.2s ease-in-out infinite; }
.gt-seat.last .gt-nick { border-color: #ff6b6b; }
.gt-seat.last.out .gt-n, .gt-seat.last.out .gt-nick { filter: none; }
.gt-seat.last.out .gt-nick { text-decoration: none; }
.gt-seat.last.out .gt-skull { display: none; }
.gt-info { max-width: 100%; font-size: .62rem; font-weight: 700; line-height: 1.2; padding: .1rem .45rem; border-radius: 999px; color: var(--bone);
  background: rgba(20, 16, 26, .8); border: 1px solid rgba(238, 230, 213, .18); overflow-wrap: anywhere; }
.gt-info[hidden] { display: none; }
.gt-seat.last .gt-info { background: #8c1c2e; border-color: #ff6b6b; }
.gt-seat.t-red .gt-info { background: rgba(214, 60, 80, .85); border-color: #ff9aa6; color: #fff; }
.gt-seat.t-black .gt-info { background: #0b0a10; border-color: #6b6577; color: #eee6d5; }
.gt-seat.t-maniac .gt-info { background: rgba(120, 80, 200, .85); border-color: #b78bff; color: #fff; }
.gt-mode { display: block; margin-bottom: .2rem; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); opacity: .9; }
.gv-nom { margin-bottom: 1.2rem; padding: .9rem 1rem; border-radius: 16px; background: rgba(183, 139, 255, .1); border: 1px solid rgba(183, 139, 255, .45); }
.gv-nom-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.gv-nom-list .btn { padding: .4rem .9rem; font-size: .85rem; }
.gv-list .gv-by { color: #c9aaff; }
@media (max-width: 700px) {
  .gt-seat.in-circle { order: -1; border-color: #b78bff; box-shadow: 0 0 18px rgba(183, 139, 255, .35); }
  .gt-seat.last { border-color: #ff6b6b; box-shadow: 0 0 18px rgba(255, 107, 107, .4); }
  .gt-info { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .gt-seat { transition: none; } }

/* кнопка «Присоединиться к беседе» под основной кнопкой героя */
.hero-chat { display: inline-flex; align-items: center; gap: .6rem; margin-top: .9rem; padding: .8rem 1.8rem; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--bone);
  background: rgba(20, 16, 26, .55); border: 1px solid rgba(238, 230, 213, .4); backdrop-filter: blur(6px); transition: transform .2s, border-color .2s, background .2s; }
.hero-chat:hover { transform: translateY(-2px); border-color: var(--brass); background: rgba(210, 169, 79, .16); }
.hero-chat-ico { color: var(--brass); font-size: 1.1rem; line-height: 1; }
