/* Пульс: двухкрасочная ризография. Одна светлая тема осознанно: так выглядят макеты на холсте. */
:root {
  --paper: #F3F4F0;      /* тетрадный лист */
  --grid: #D9DFEC;       /* клетка */
  --card: #FFFFFF;
  --ink: #16171C;
  --pink: #FF3D8B;
  --blue: #2F4BFF;
  --muted: #5A5E6B;      /* 5,6:1 на бумаге */
  --line: #C9CCD4;
  --on-dark-muted: #B7BBC7; /* 9,3:1 на чернилах */
  --edge-dark: #6B7080;  /* 3,6:1 на чернилах, рамки контролов */
  --good: #1B7A3D;
  --bad: #B3261E;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
/* Основа: лист тетради в клетку, вырезки, скотч и чернила. */
body { margin: 0; color: var(--ink); font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px; }
.cut { background: var(--card); box-shadow: 3px 4px 0 rgba(22, 23, 28, .18); position: relative; }
.cut.tape::before { content: ""; position: absolute; top: -10px; left: 50%; width: 84px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(255, 61, 139, .35); mix-blend-mode: multiply; }
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1deg); }
.ink-u { text-decoration: underline wavy var(--blue) 2px; text-underline-offset: 6px; }

/* Темы комнат: фон берётся из assets/themes/<id>/bg.jpg, без картинки рисуется узор CSS. */
.stage { background-size: cover; background-position: center; }
[data-theme="notebook"] .stage { background-color: #F7F7F2; background-image: url(assets/themes/notebook/bg.jpg), linear-gradient(#cdd6ea 1px, transparent 1px), linear-gradient(90deg, #cdd6ea 1px, transparent 1px); background-size: cover, 24px 24px, 24px 24px; }
[data-theme="ink"] .stage { background-color: #E9ECF5; background-image: url(assets/themes/ink/bg.jpg), radial-gradient(circle at 20% 30%, rgba(47, 75, 255, .18) 0 60px, transparent 61px), radial-gradient(circle at 80% 70%, rgba(22, 23, 28, .12) 0 40px, transparent 41px); }
[data-theme="knit"] .stage { background-color: #F6EFEA; background-image: url(assets/themes/knit/bg.jpg), repeating-linear-gradient(45deg, rgba(255, 61, 139, .10) 0 6px, transparent 6px 12px), repeating-linear-gradient(-45deg, rgba(255, 61, 139, .10) 0 6px, transparent 6px 12px); }
[data-theme="moodboard"] .stage { background-color: #F3F1EC; background-image: url(assets/themes/moodboard/bg.jpg), linear-gradient(90deg, #FF3D8B 0 8%, transparent 8% 92%, #2F4BFF 92%); background-size: cover, 100% 8px; background-position: center, top; background-repeat: no-repeat; }
[data-theme="medieval"] .stage { background-color: #F1E8D6; background-image: url(assets/themes/medieval/bg.jpg), radial-gradient(circle at 50% 50%, rgba(224, 168, 0, .12), transparent 70%); }
[data-theme="cinema"] .stage { background-color: #2A1C22; background-image: url(assets/themes/cinema/bg.jpg), radial-gradient(circle at 50% 0%, rgba(255, 61, 139, .25), transparent 60%); }
[data-theme="anime"] .stage { background-color: #EDEBFA; background-image: url(assets/themes/anime/bg.jpg), linear-gradient(180deg, rgba(255, 61, 139, .15), rgba(47, 75, 255, .15)); }
/* На узком экране — вертикальные версии фонов. */
@media (max-width: 700px) {
  [data-theme="notebook"] .stage { background-image: url(assets/themes/notebook/bg-mobile.jpg), linear-gradient(#cdd6ea 1px, transparent 1px), linear-gradient(90deg, #cdd6ea 1px, transparent 1px); }
  [data-theme="ink"] .stage { background-image: url(assets/themes/ink/bg-mobile.jpg); }
  [data-theme="knit"] .stage { background-image: url(assets/themes/knit/bg-mobile.jpg); }
  [data-theme="moodboard"] .stage { background-image: url(assets/themes/moodboard/bg-mobile.jpg); background-size: cover; }
  [data-theme="anime"] .stage { background-image: url(assets/themes/anime/bg-mobile.jpg); }
  [data-theme="medieval"] .stage { background-image: url(assets/themes/medieval/bg-mobile.jpg); }
  [data-theme="cinema"] .stage { background-image: url(assets/themes/cinema/bg-mobile.jpg); }
}
.stage .corner { position: absolute; width: 120px; height: 120px; pointer-events: none; }
.stage .corner.c1 { left: 0; top: 0; }
.stage .corner.c2 { right: 0; bottom: 0; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; background: url(assets/textures/grain.png); opacity: .06; mix-blend-mode: multiply; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.boot { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding: 48px 24px calc(48px + env(safe-area-inset-bottom)); background: var(--paper) url(assets/brand/loading.jpg) center / cover no-repeat; font-family: var(--display); overflow: hidden; }
.boot-logo { position: relative; width: min(320px, 70vw); aspect-ratio: 2 / 1; background: url(assets/brand/logo@600.png) center / contain no-repeat; }
.boot p { position: relative; margin: 0; padding: 6px 14px; background: var(--card); border: 2px solid var(--ink); animation: bootpulse 1.4s ease-in-out infinite; }
@keyframes bootpulse { 50% { opacity: .55; } }
@media (min-aspect-ratio: 1/1) { .boot { background-image: url(assets/brand/loading-wide.jpg); } }
@media (prefers-reduced-motion: reduce) { .boot p { animation: none; } }

#app { min-height: 100%; display: flex; flex-direction: column; }
.main { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ---------- верхняя панель ---------- */
.topbar { background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 14px; padding: 10px max(14px, env(safe-area-inset-left)) 10px max(14px, env(safe-area-inset-right)); padding-top: calc(10px + env(safe-area-inset-top)); flex-wrap: wrap; }
.logo { font: 900 20px/1 var(--display); letter-spacing: -.03em; position: relative; }
.logo::before, .logo::after { content: "ПУЛЬС"; position: absolute; inset: 0; z-index: -1; }
.logo { isolation: isolate; text-shadow: 3px 2px 0 var(--pink), -2px -1px 0 var(--blue); }
.topbar .room-title { display: flex; flex-direction: column; line-height: 1.2; }
.topbar .room-title small { color: var(--on-dark-muted); font: 500 12px var(--mono); }
.pulse { display: flex; align-items: center; gap: 8px; }
.pulse .cells { display: flex; gap: 2px; }
.pulse .cells i { width: 6px; height: 16px; background: #3A3C45; display: block; }
.pulse .cells i.on { background: var(--paper); }
.pulse .cells i.hot { background: var(--pink); }
.pulse b { font: 700 14px var(--mono); color: var(--pink); }
.topbar .spacer { flex: 1; }
.purse { display: flex; align-items: center; gap: 12px; font: 600 14px var(--mono); background: none; border: 0; color: var(--paper); min-height: 44px; padding: 0 4px; }
.purse span { display: inline-flex; align-items: center; gap: 5px; }
.purse small { font: 500 12px var(--body); color: var(--on-dark-muted); }
.purse:hover small { color: var(--paper); text-decoration: underline; }
.coin { width: 14px; height: 14px; border-radius: 50%; background: var(--pink); box-shadow: inset 0 0 0 3px var(--pink), inset 0 0 0 5px var(--ink); display: inline-block; }
.chip { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #8FA0FF; display: inline-block; }
.btn { min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.pink { background: var(--pink); border-color: var(--pink); color: var(--ink); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ghost-dark { background: transparent; border-color: var(--edge-dark); color: var(--paper); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.lvl { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; font: 700 12px var(--display); }

/* ---------- лобби ---------- */
.lobby { padding: 28px max(16px, env(safe-area-inset-left)) 40px max(16px, env(safe-area-inset-right)); max-width: 1100px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.lobby h1 { font: 900 clamp(32px, 6vw, 56px)/1 var(--display); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.lobby h2 { font: 700 22px var(--display); margin: 0; }
.lead { font-size: 17px; max-width: 60ch; margin: 8px 0 0; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.room-card { position: relative; text-align: left; min-height: 150px; padding: 18px; border: 2px solid var(--ink); background: var(--card); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; overflow: hidden; }
.room-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.room-card > * { position: relative; }
.room-card b { font: 700 20px var(--display); }
.room-card span { color: var(--muted); }
.room-card:hover { box-shadow: 3px 4px 0 var(--blue); }
.room-card .online { font-size: 12px; color: var(--good); }
.leader-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 2px solid var(--ink); text-align: left; flex-wrap: wrap; }
.leader-card span:first-child { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.leader-card small { color: var(--muted); font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.leader-card b { font: 700 20px var(--display); }
.leader { font: 600 11px var(--mono); background: var(--pink); color: var(--ink); padding: 1px 6px; vertical-align: middle; }
.lobby-foot { display: flex; gap: 18px; font-size: 13px; }
.lobby-foot a, .note a { color: var(--muted); }
.daily-card { background: var(--blue); color: #fff; padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.daily-card .days { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.daily-card .days li { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font: 700 13px var(--mono); border: 1.5px solid rgba(255,255,255,.7); }
.daily-card .days li.done { background: #fff; color: var(--blue); }
.daily-card .days li.next { background: var(--pink); color: var(--ink); border-color: var(--pink); }
.onboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.onboard article { background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.onboard img, .onboard .ph { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper); }
.onboard h3 { margin: 0; font: 700 17px var(--display); }
.onboard p { margin: 0; }

/* ---------- комната ---------- */
.room { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.stage-wrap { display: flex; flex-direction: column; min-width: 0; }
.player { background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.player .now { flex: 1; min-width: 160px; display: flex; flex-direction: column; line-height: 1.25; }
.player .now small { color: var(--on-dark-muted); font-size: 12px; }
.player .now b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.player-frame { width: 100%; }
.react-btn { min-width: 44px; min-height: 44px; border: 0; background: var(--pink); color: var(--ink); font-weight: 700; padding: 0 12px; }
.react-btn.meh { background: transparent; color: var(--paper); border: 2px solid var(--edge-dark); }
.react-btn[aria-pressed="true"] { outline: 3px solid var(--paper); }
.stage { position: relative; flex: 1; min-height: 420px; }
.seat { position: absolute; transform: translate(-50%, -50%); width: 92px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; }
.avatar { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 22px var(--display); position: relative; background: var(--card); }
.avatar img.frame { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); pointer-events: none; }
.seat .nm { font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
.seat .tag { font: 500 11px var(--mono); background: var(--ink); color: var(--paper); padding: 1px 6px; }
.seat .lvl { position: absolute; top: -6px; right: 6px; height: 20px; min-width: 26px; font-size: 11px; }
.seat.me .avatar { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--blue); }
.seat.target .avatar { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--pink); }
.seat.empty .avatar { border-style: dashed; color: var(--muted); background: transparent; }
.verified { position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 2px solid var(--paper); }
.verified::after { content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(300px, 46%); min-height: 210px; border: 0; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; }
.center h2 { margin: 0; font: 700 18px var(--display); }
.center p { margin: 0; color: var(--muted); font-size: 14px; }
.center .timer { font: 700 26px var(--mono); }
.center .row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.center input { width: 100%; min-height: 44px; border: 2px solid var(--ink); padding: 0 10px; background: var(--card); }
.center .answers { display: flex; flex-direction: column; gap: 6px; width: 100%; max-height: 160px; overflow: auto; }
.center .answers button { min-height: 40px; border: 1.5px solid var(--ink); background: var(--card); text-align: left; padding: 6px 10px; }
.center .answers button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.bottle { width: 180px; height: 90px; margin: -6px auto 0; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.bottle-img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.bottle-ph { width: 120px; height: 22px; border-radius: 11px; background: var(--blue); position: relative; }
.bottle-ph::after { content: ""; position: absolute; right: -34px; top: 5px; width: 36px; height: 12px; background: var(--blue); border-radius: 3px; }
.go { width: 120px; height: 120px; border-radius: 50%; border: 0; background: var(--pink); font: 900 22px var(--display); color: var(--ink); }
.go.wait { background: #DADDE3; color: var(--muted); }
.next-bar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; flex-wrap: wrap; border-top: 1.5px solid var(--line); }
.next-bar .lotto-cta { margin-left: auto; }

.chat { background: var(--card); border-left: 2px solid var(--ink); display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 64px); }
.chat .log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.chat .msg b { margin-right: 6px; }
.chat .sys { background: var(--paper); padding: 6px 9px; font-size: 13px; }
.chat .gift { background: var(--ink); color: var(--paper); padding: 6px 9px; font-size: 13px; }
.chat form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat input { flex: 1; min-width: 0; min-height: 44px; border: 2px solid var(--ink); padding: 0 10px; }
.chat .send { width: 44px; min-height: 44px; border: 0; background: var(--blue); color: #fff; font-weight: 700; }

/* ---------- листы ---------- */
.sheet { border: 0; padding: 0; width: min(560px, 100vw); max-height: min(92vh, 900px); background: var(--paper); color: var(--ink); box-shadow: 12px 12px 0 var(--ink); }
.sheet::backdrop { background: rgba(22, 23, 28, .55); }
.sheet .head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 1; }
.sheet .head h2 { margin: 0; font: 700 20px var(--display); flex: 1; }
.sheet .close { width: 44px; height: 44px; border: 2px solid var(--edge-dark); background: transparent; color: var(--paper); font-size: 20px; }
.sheet .body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.sheet h3 { margin: 0; font: 700 16px var(--display); }
.sheet .note { color: var(--muted); font-size: 13px; margin: 0; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); }
.tabs2 button { min-height: 44px; border: 0; background: transparent; font-weight: 700; }
.tabs2 button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.grid25 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.grid25 button { position: relative; height: 52px; border: 2px solid var(--ink); background: var(--card); font: 700 18px var(--display); }
.grid25 button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.grid25 button.win { background: var(--pink); }
.grid25 .heat { position: absolute; top: 2px; right: 4px; font: 700 10px var(--mono); color: var(--bad); }
.grid25 button[aria-pressed="true"] .heat { color: var(--pink); }
.prize-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; background: var(--card); }
.prize-row div { padding: 8px 4px; display: flex; flex-direction: column; }
.prize-row small { font: 500 12px var(--mono); color: var(--muted); }
.tickets { display: flex; flex-direction: column; gap: 6px; }
.ticket { display: flex; gap: 6px; align-items: center; background: var(--card); padding: 8px 10px; font: 600 14px var(--mono); }
.ticket .kind { margin-left: auto; font: 600 12px var(--body); color: var(--muted); }
.hash { font: 500 11px var(--mono); color: var(--muted); word-break: break-all; }
.list { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.list > * { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list .grow small { color: var(--muted); }
.gift-img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.gift-ph { width: 36px; height: 36px; flex: none; background: var(--pink); border-radius: 50%; }
.wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wall div { background: var(--card); border: 1.5px solid var(--ink); min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; text-align: center; padding: 4px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); }
.kv div { padding: 10px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.kv div:last-child { border-right: 0; }
.kv b { font: 700 18px var(--mono); }
.kv small { color: var(--muted); }
.progress { height: 10px; background: var(--card); border: 1.5px solid var(--ink); }
.progress i { display: block; height: 100%; background: var(--blue); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field select { min-height: 44px; border: 2px solid var(--ink); padding: 0 10px; background: var(--card); }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }

/* ---------- аватары ---------- */
.seat { width: 100px; }
.avatar { width: 68px; height: 68px; font-size: 26px; }
.seat .lvl { right: 10px; }
.seat.ring .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ring); }
.seat.me.ring .avatar, .seat.target .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--blue); }
.seat.shine .avatar::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, .9) 78%, transparent 86%); animation: spin 6s linear infinite; pointer-events: none; mix-blend-mode: screen; }
@keyframes spin { to { transform: rotate(1turn); } }
.bet { font: 600 12px var(--mono); background: var(--card); border: 1.5px solid var(--ink); padding: 0 6px; display: inline-flex; align-items: center; min-height: 20px; }
.bet .coin { width: 10px; height: 10px; box-shadow: inset 0 0 0 2px var(--pink), inset 0 0 0 4px var(--ink); }
.bet.free { color: var(--muted); border-color: var(--line); }
.bet.win { background: var(--good); color: #fff; border-color: var(--good); }

/* Полосы прокрутки: тонкие и спокойные. В ленте мест полосы нет вовсе, край затухает. */
* { scrollbar-width: thin; scrollbar-color: #C9CCD4 transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #C9CCD4; border-radius: 3px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- «Шар» в центре комнаты ---------- */
.center.lotto { width: min(400px, 60%); min-height: 0; border-radius: 18px; border-style: solid; border-color: var(--ink); background: rgba(255, 255, 255, .94); padding: 14px 16px; gap: 10px; }
.lhead { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
.lhead b { font: 700 18px var(--display); }
.lhead .mono { font-weight: 700; }
.seg { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); }
.seg button { min-height: 44px; border: 0; background: transparent; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 4px; }
.seg button small { font: 500 11px var(--body); opacity: .8; }
.seg button:disabled { color: var(--muted); cursor: not-allowed; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(22, 23, 28, .05) 6px 12px); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mults { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mults button { min-height: 40px; border: 1.5px solid var(--ink); background: var(--card); font: 700 15px var(--display); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.mults button small { font: 500 11px var(--mono); color: var(--muted); }
.mults button[aria-pressed="true"] { background: var(--pink); }
.mults button[aria-pressed="true"] small { color: var(--ink); }
.grid25.small { width: 100%; gap: 4px; touch-action: none; user-select: none; }
.grid25.small button { height: 38px; font-size: 15px; border-width: 1.5px; }
.note.mini { font-size: 12px; margin: 0; }
.link-dark { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
.balls { display: flex; gap: 8px; justify-content: center; }
.ball { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed #8A8E9B; display: flex; align-items: center; justify-content: center; font: 700 18px var(--display); }
.ball.in { border: 2px solid var(--ink); background: var(--card); animation: ballin .25s ease-out; }
.ball.hit { background: var(--pink); }
@keyframes ballin { from { transform: translateY(-8px); opacity: 0; } }
.rtickets { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.rticket { display: flex; gap: 4px; justify-content: center; align-items: center; }
.rticket span { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font: 600 13px var(--mono); border: 1.5px solid var(--line); background: var(--card); transition: background .2s; }
.rticket span.hit { background: var(--pink); border-color: var(--ink); }
.rticket small { font: 600 11px var(--mono); color: var(--muted); margin-left: 4px; }
.center.jackpot { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink); }
.flycoin { position: fixed; z-index: 45; width: 16px; height: 16px; animation: coinfly 1s ease-in forwards; }
@keyframes coinfly { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: .2; } }
.xpfloat { position: fixed; transform: translateX(-50%); font: 700 13px var(--mono); color: var(--blue); background: rgba(255, 255, 255, .9); padding: 1px 6px; animation: xpup 1.3s ease-out forwards; z-index: 44; white-space: nowrap; }
@keyframes xpup { from { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -22px); } }

/* ---------- карточка игрока у аватара ---------- */
.pop { position: fixed; z-index: 60; background: var(--card); border: 2px solid var(--ink); padding: 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: 4px 5px 0 rgba(22, 23, 28, .25); animation: pop .15s ease-out; }
.pop-head { display: flex; align-items: center; gap: 8px; }
.pop-head b, .pop-title { font: 700 15px var(--display); }
.pop-note { margin: 0; font-size: 12px; color: var(--muted); }
.pop-stack { display: flex; flex-direction: column; }
.pop-item { min-height: 44px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; padding: 0 4px; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pop-item:hover { background: var(--paper); }
.pop-item.accent { color: #C2185B; }
.pop-item.muted { color: var(--muted); font-weight: 500; }
.cost-mini .cost { font-size: 12px; }
.pop-reasons { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pop-reasons label, .pop-check { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.pop-check { font-size: 13px; }
.pop-row { display: flex; gap: 6px; justify-content: flex-end; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.verified.inline { position: static; display: inline-block; flex: none; }
.kickme { position: fixed; z-index: 61; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(360px, calc(100vw - 24px)); padding: 14px; border: 2px solid var(--bad); display: flex; flex-direction: column; gap: 6px; }
.kickme b { font: 700 16px var(--display); }
.kickme p { margin: 0; font-size: 14px; }
.seat.kicking .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--bad); }
.seat.kicking .tag { background: var(--bad); }
.st-badge { position: absolute; left: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-style: normal; border: 2px solid var(--paper); }
.st-host { background: #E0A800; color: var(--ink); }
.st-star { background: var(--blue); color: #fff; }
.st-generous { background: var(--pink); color: var(--ink); }

/* ---------- профиль, сообщения, уведомления ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: #DADDE3; display: inline-flex; align-items: center; justify-content: center; font: 700 16px var(--display); overflow: hidden; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 28px; height: 28px; font-size: 12px; border-width: 1.5px; }
.av.xl { width: 84px; height: 84px; font-size: 34px; background: var(--pink); }
.mini-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mini-av { overflow: hidden; }
.pname { margin: 0; font: 700 22px var(--display); display: flex; align-items: center; gap: 6px; }
.me-head .grow { flex: 1; min-width: 0; }
.me-head .note { margin: 2px 0 6px; }
.about { margin: 0; font-size: 15px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips span { background: var(--card); border: 1.5px solid var(--ink); padding: 2px 10px; font-size: 13px; font-weight: 600; }
.links { display: flex; gap: 14px; margin: 0; font-size: 14px; }
.links a { color: var(--blue); }
.where { display: flex; gap: 12px; align-items: center; padding: 12px; flex-wrap: wrap; }
.where .grow { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.where small { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.where b { font: 700 16px var(--display); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos > p { grid-column: 1 / -1; }
.photos figure { margin: 0; position: relative; background: var(--card); border: 1.5px solid var(--ink); }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photos figcaption { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 2px 6px; }
.photos .like { position: absolute; right: 6px; bottom: 6px; min-height: 32px; padding: 0 10px; border: 0; background: rgba(255, 255, 255, .92); font-weight: 700; }
.photos .like.on { background: var(--pink); }
.upload { align-self: flex-start; }
.cform { display: flex; gap: 6px; }
.cform input { flex: 1; min-width: 0; min-height: 40px; border: 2px solid var(--ink); padding: 0 10px; }
.comments { display: flex; flex-direction: column; gap: 6px; }
.comment { background: var(--card); padding: 8px 10px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.comment small { color: var(--muted); font-size: 12px; margin-left: auto; }
.link-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.guests { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.guest { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; min-width: 64px; font-size: 12px; }
.guest small { color: var(--muted); font-size: 11px; }
details.edit { background: var(--card); padding: 10px 12px; }
details.edit[open] { display: flex; flex-direction: column; gap: 10px; }
.icon-btn { position: relative; width: 40px; padding: 0; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: var(--ink); font: 700 11px var(--mono); display: flex; align-items: center; justify-content: center; }
.dm-row .badge { position: static; }
.dm-list, .notes { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.dm-row, .note-row { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.dm-row .grow, .note-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-row small, .note-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-row.new { background: #FFF1F7; }
.ni { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; background: var(--card); border: 1.5px solid var(--ink); flex: none; }
.ni-like, .ni-match { background: var(--pink); }
.ni-gift { background: #E0A800; }
.dm-log { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.bubble { align-self: flex-start; max-width: 80%; background: var(--card); border: 1.5px solid var(--line); padding: 6px 10px; font-size: 15px; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bubble small { font-size: 11px; opacity: .7; align-self: flex-end; }
.dm-form { display: flex; gap: 6px; }
.dm-form input { flex: 1; min-width: 0; min-height: 44px; border: 2px solid var(--ink); padding: 0 10px; }
/* Новые раунды: «Этот или тот», вопрос с вариантами, реакции бутылочки */
.tot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; width: 100%; max-width: 360px; }
.tot-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; min-height: 120px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.tot-card img { width: 72px; height: 72px; object-fit: contain; }
.tot-card .tot-letter { width: 72px; height: 72px; display: grid; place-items: center; font: 700 32px var(--display, inherit); background: var(--paper); }
.tot-card.mine { background: var(--ink); color: var(--paper); }
.tot-card:disabled { cursor: default; }
.tot-or { font-weight: 700; opacity: .7; }
.opts { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 340px; }
.opt { min-height: 44px; padding: 6px 12px; border: 2px solid var(--ink); background: var(--card); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.opt.mine { background: var(--ink); color: var(--paper); }
.opt-res { position: relative; display: flex; justify-content: space-between; gap: 8px; min-height: 40px; align-items: center; padding: 4px 10px; border: 2px solid var(--line); background: var(--card); overflow: hidden; }
.opt-res i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--pink) 22%, transparent); }
.opt-res span, .opt-res small { position: relative; }
.opt-res.mine { border-color: var(--ink); font-weight: 700; }
.reacts { gap: 6px; }
.react-btn { min-width: 52px; min-height: 40px; border: 2px solid var(--ink); background: var(--card); font: inherit; cursor: pointer; }
.react-btn:disabled { opacity: .6; cursor: default; }
.pair { font-size: 18px; }
.kickbar { top: auto; bottom: 84px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Лобби: кнопка «Играть», строка бонуса, задания */
.lobby-hero { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.btn.big { min-height: 56px; padding: 0 32px; font-size: 20px; }
.daily-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 16px; background: var(--card); border: 2px solid var(--ink); }
.quests { padding: 14px 16px; background: var(--card); border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 8px; }
.quests h2 { margin: 0; font-size: 18px; }
.quests ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quests li { display: flex; gap: 10px; align-items: center; }
.quests li .grow { display: flex; flex-direction: column; gap: 2px; }
.quests li.claimed { opacity: .6; }
.quests .weekly { border-top: 1px dashed var(--line); padding-top: 8px; }
.qbar { display: block; height: 4px; background: var(--paper); }
.qbar i { display: block; height: 100%; background: var(--pink); }
/* Рамки за фишки (пока цветом; картинки рамок появятся на этапе картинок) */
.frame-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--ink); }
.fr-mint .avatar, .frame-dot.fr-mint { box-shadow: 0 0 0 3px #7fd6b4; }
.fr-sunset .avatar, .frame-dot.fr-sunset { box-shadow: 0 0 0 3px #ff8a5c; }
.fr-ink .avatar, .frame-dot.fr-ink { box-shadow: 0 0 0 3px #16171c, 0 0 0 5px #f3f4f0; }
.fr-gold .avatar, .frame-dot.fr-gold { box-shadow: 0 0 0 3px #d9a930, 0 0 0 5px #fff1c2; }
.frame-dot.fr-mint { background: #7fd6b4; } .frame-dot.fr-sunset { background: #ff8a5c; } .frame-dot.fr-ink { background: #16171c; } .frame-dot.fr-gold { background: #d9a930; }
.q-img { width: 96px; height: 96px; object-fit: contain; }
/* Этап 5: фото из VK, галочка, предложения */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs button { min-height: 40px; padding: 0 12px; border: 2px solid var(--ink); background: var(--card); font: inherit; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.vkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 50vh; overflow-y: auto; }
.vkph { padding: 0; border: 2px solid transparent; background: var(--paper); aspect-ratio: 1; cursor: pointer; }
.vkph:hover, .vkph:focus-visible { border-color: var(--pink); }
.vkph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gesture { font-size: 18px; }
.gesture-img { width: 160px; height: 160px; object-fit: contain; }
.offer, .invite { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: var(--card); border: 2px solid var(--ink); }
.offer .grow, .invite .grow { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.danger-link { color: #b3261e; margin-top: 12px; }
.dm-form .attach { width: 44px; min-height: 44px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.dm-form .attach[aria-disabled="true"] { opacity: .45; }
.bubble.ph { padding: 4px; position: relative; max-width: min(260px, 75%); min-width: 160px; }
.bubble.ph img { display: block; width: 100%; max-height: 320px; object-fit: cover; cursor: zoom-in; background: var(--paper); }
.bubble.ph.blurred { overflow: hidden; }
.bubble.ph.blurred img { filter: blur(22px) saturate(.6); transform: scale(1.1); cursor: default; }
.bubble.ph .reveal { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 700; cursor: pointer; white-space: nowrap; }
.bubble.ph .ph-del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; background: rgba(22, 23, 28, .7); color: #fff; font-size: 18px; cursor: pointer; }
.bubble.ph small { padding: 2px 4px 0; }
.bubble.gone i { opacity: .7; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 14, .92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; background: var(--paper); color: var(--ink); font-size: 24px; }
@media (prefers-reduced-motion: no-preference) { .bubble.ph img { transition: filter .25s ease; } }
.dm-form .send { width: 44px; min-height: 44px; border: 0; background: var(--blue); color: #fff; font-weight: 700; }
.dm-hint { background: #FFF1F7; padding: 8px 10px; }
.back-btn { background: none; border: 0; color: var(--paper); font-size: 20px; min-width: 32px; min-height: 32px; }
.list.tops > div { flex-wrap: wrap; }
.list.tops .grow small { color: var(--muted); font-size: 12px; }

/* ---------- избранные и действия в переписке ---------- */
.favs h3 { margin: 0 0 8px; }
.fav-strip { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.fav-strip::-webkit-scrollbar { display: none; }
.fav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; font-size: 12px; text-align: center; }
.fav-item .nm { font-weight: 600; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-item small { color: var(--muted); font-size: 11px; }
.fav-item.off .av { opacity: .55; }
.fav-av { position: relative; background: none; border: 0; padding: 0; }
.fav-av .av { width: 52px; height: 52px; font-size: 20px; }
.fav-av .dot { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--good); border: 2px solid var(--paper); }
.danger-text { color: var(--bad) !important; font-weight: 700; }
.dm-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.dm-actions .link-dark { color: var(--ink); font-size: 13px; }
.fav-btn { display: inline-flex; align-items: center; gap: 6px; }
.fav-btn[aria-pressed="true"] svg { color: #E0A800; }
.pop-item.fav-btn { justify-content: flex-start; }

/* ---------- список комнат ---------- */
.rooms-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rooms-head h2 { margin: 0; }
.room-list { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.room-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.room-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.room-row small { color: var(--muted); }
.mini-avs { display: flex; }
.mini-av { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card); background: #DADDE3; margin-left: -6px; display: flex; align-items: center; justify-content: center; font: 700 11px var(--display); }
.mini-av:first-child { margin-left: 0; }
.mini-av.me { background: var(--blue); color: #fff; }
.mini-more { font: 600 11px var(--mono); color: var(--muted); align-self: center; margin-left: 6px; }

/* ---------- мелкие элементы ---------- */
.cost { display: inline-flex; align-items: center; gap: 5px; font: 600 14px var(--mono); }
.me-btn { gap: 8px; }
.link-btn { background: none; border: 0; color: var(--paper); text-decoration: underline; font-size: 12px; min-height: 32px; padding: 0 4px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.grow-btn { flex: 1; }
.me-head { display: flex; gap: 14px; align-items: center; }
.avatar.big { width: 72px; height: 72px; font-size: 30px; background: var(--pink); }
.ans { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.player iframe.audio { aspect-ratio: auto; height: 180px; }
details summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-weight: 600; }
details.report summary { color: var(--bad); }
.list.tops > div.mine { background: #FFF1F7; }
.list.tops .place { width: 22px; text-align: center; font-weight: 700; }
.list.tops .prize { min-width: 56px; text-align: right; }
.sheet h3 .note { font: 400 13px var(--body); margin-left: 6px; }
.chat .msg.mention { background: #FFF1F7; box-shadow: -3px 0 0 var(--pink); padding-left: 6px; }
/* Имя в чате: зона нажатия выше строки, сама строка не растёт. */
.chat .msg b[data-act] { cursor: pointer; display: inline-block; padding: 12px 4px; margin: -12px -4px; }
.chat .msg b.at { color: #C2185B; margin-right: 0; }
/* Знакомство с комнатой: слоем поверх комнаты, внизу, чтобы места и раунд оставались видны. */
.coach { position: fixed; left: calc(50% - 160px); bottom: 24px; transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; z-index: 55; border: 2px solid var(--ink); box-shadow: 4px 5px 0 var(--pink); }
.coach small { color: var(--muted); }
.coach b { font: 700 17px var(--display); }
.coach p { margin: 0; }
.coach .row { display: flex; gap: 8px; justify-content: flex-end; }
.sound-btn { width: 40px; padding: 0; }

/* ---------- тосты и эффекты ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 14px; box-shadow: 4px 4px 0 var(--pink); display: flex; gap: 10px; align-items: center; animation: pop .25s ease-out; }
.toast.err { box-shadow: 4px 4px 0 var(--bad); }
.toast button { margin-left: auto; }
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.fx .fly { position: absolute; width: 96px; height: 96px; animation: fly 1.6s ease-out forwards; }
.fx .fly.big { width: 220px; height: 220px; }
.fx .fly .gift-ph { width: 100%; height: 100%; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
/* Спокойное движение: подарок поднимается и тает, без резкого увеличения. */
@keyframes fly { 0% { transform: translate(-50%, 16px); opacity: 0; } 20% { opacity: 1; } 75% { transform: translate(-50%, -24px); opacity: 1; } 100% { transform: translate(-50%, -36px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.sync-row { width: 100%; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.sync-status { font-size: 12px; color: var(--on-dark-muted); }
.sync-status[data-s="ok"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7BE39B; margin-right: 6px; }
.sync-status[data-s="blocked"] { color: var(--pink); }
.ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.ctl input[type=range] { width: 180px; accent-color: var(--pink); }

/* ---------- Кинозал ---------- */
.room.kino .player iframe { max-height: 62vh; }
/* В Кинозале главное видео: места лентой, раунд компактной карточкой. */
.room.kino .stage { min-height: 0; display: flex; flex-direction: column; }
.room.kino #seats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 6px; padding: 16px 12px 8px; justify-items: center; }
.room.kino .seat { position: relative; transform: none; left: auto !important; top: auto !important; width: 76px; }
.room.kino .avatar { width: 50px; height: 50px; font-size: 19px; }
.room.kino .center, .room.kino .center.lotto { position: static; transform: none; width: auto; min-height: 0; margin: 4px 12px 12px; border-radius: 18px; padding: 12px 16px; background: rgba(255, 255, 255, .9); }
.room.kino .stage .corner { display: none; }
.room.no-chat { grid-template-columns: 1fr; }
.room.no-chat .chat { display: none; }
.room.no-games .center, .room.no-games .seat .tag { display: none; }
.room.no-votes [data-act="skipvote"], .room.no-votes [data-act="clipvote"] { display: none; }
.view-toggles { display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; }
.view-toggles .check { min-height: 44px; font-size: 14px; }
.vt-label { font-size: 13px; color: var(--on-dark-muted); }

/* ---------- этап 6: интерфейс и тексты ---------- */
.mob { display: none !important; }
.ui-ic { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-style: normal; }
img.ui-ic { width: 1.2em; height: 1.2em; object-fit: contain; }
.player { display: block; padding: 0; }
.prow { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
.pmore { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 10px; border-top: 1px solid #34363F; padding-top: 10px; }
.pmore[hidden] { display: none; }
.pmore .ctl { margin-left: 0; }
.menu { width: 250px; padding: 4px 10px; gap: 0; }
.menu .pop-item:first-child { border-top: 0; }
.pulse-bar { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.pulse-bar small { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pulse-bar > i { display: block; width: 72px; height: 8px; background: var(--line); }
.pulse-bar > i > i { display: block; height: 100%; background: var(--ink); }
.pulse-bar > i > i.hot { background: var(--pink); }
.room-strip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--card); border-bottom: 1.5px solid var(--line); font-size: 14px; }
.room-strip b { font: 700 15px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.room-strip .leader { white-space: nowrap; flex: none; }
.room-strip .pulse-bar > i { width: 48px; }
.room-strip small { color: var(--muted); font: 500 12px var(--mono); white-space: nowrap; }
.heat-note { color: var(--bad) !important; }
.heat-note[hidden] { display: none; }
.prize-tbl { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; }
.prize-tbl th { text-align: left; font: 600 12px var(--mono); color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--ink); }
.prize-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prize-tbl td:last-child, .prize-tbl th:last-child { text-align: right; font-family: var(--mono); }
.rticket { flex-wrap: wrap; }
.rticket .rkind { flex-basis: 100%; text-align: center; margin: 0 0 2px; font: 600 11px var(--body); color: var(--blue); }
.club { padding: 14px 16px; border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 8px; background: #F4F2FF; }
.club ul { margin: 0; padding-left: 18px; }
.club .btn { align-self: flex-start; }
.list.tops .trow { flex-wrap: wrap; }
.list.tops .score { white-space: nowrap; }
.list.tops .prize { min-width: 64px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.list.tops .prize small { font: 600 10px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wall div b { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall div small { color: var(--muted); font-size: 11px; }
/* Меню «…» в профиле и переписке */
details.more { position: relative; }
details.more > summary { list-style: none; min-width: 44px; }
details.more > summary::-webkit-details-marker, .more-sub > summary::-webkit-details-marker { display: none; }
.more-pop { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); width: 260px; padding: 4px 10px; border: 2px solid var(--ink); display: flex; flex-direction: column; }
.more-pop > .pop-item:first-child, .more-pop > details:first-child > summary { border-top: 0; }
.more-sub > summary { list-style: none; min-height: 44px; }
.more-sub[open] > summary { color: var(--bad); }
.more-sub .pop-stack { padding-left: 10px; }
.more-sub .note { font-size: 12px; padding: 4px 0 8px; }
.dm-actions { display: flex; gap: 8px; align-items: center; }
.dm-actions .more-pop { left: 44px; right: auto; bottom: 0; top: auto; }
.notes .ntext { display: block; }
.st-badge.inline { position: static; flex: none; width: 30px; height: 30px; font-size: 15px; }
.err-text.bad { color: var(--bad); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gift-foot { align-items: center; justify-content: space-between; }
.ban .btn { align-self: flex-start; text-decoration: none; }
.rooms .room-card .quiet { color: var(--muted); }
.chat-head { align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.peek { align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 12px; border: 0; border-top: 1.5px solid var(--line); background: var(--paper); text-align: left; font-size: 13px; color: var(--muted); }
.peek span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-btn { width: 44px; min-height: 44px; border: 2px solid var(--ink); background: var(--card); display: grid; place-items: center; justify-content: center; align-items: center; flex: none; }
.lotto-cta.live { animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 4px rgba(255, 61, 139, .35); } }
.sheet .kv b .coin, .sheet .kv b .chip { vertical-align: -1px; }
/* Компьютер: шапка в один ряд, «Шар» в центре компактнее, чтобы не закрывать имена мест */
.topbar { flex-wrap: nowrap; }
.topbar .room-title b { white-space: nowrap; }
.me-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center.lotto { gap: 6px; padding: 10px 14px; top: 54%; }
.center.lotto .link-dark { min-height: 32px; }
.grid25.small button { height: 34px; }

/* ---------- телефон ---------- */
@media (max-width: 820px) {
  .mob { display: flex !important; }
  .desk, .desk-inline { display: none !important; }
  .btn.small { min-height: 44px; }
  /* Шапка в один ряд */
  .topbar { flex-wrap: nowrap; gap: 4px; padding: 6px max(8px, env(safe-area-inset-left)) 6px max(8px, env(safe-area-inset-right)); padding-top: calc(6px + env(safe-area-inset-top)); }
  .logo { font-size: 16px; }
  .purse { gap: 8px; font-size: 13px; padding: 0 2px; }
  .topbar .icon-btn { width: 44px; min-height: 44px; }
  .me-btn { min-width: 44px; min-height: 44px; padding: 0 6px; }
  .me-name { display: none; }
  /* Комната: внизу закреплённая панель, чат шторкой над ней */
  .room { grid-template-columns: 1fr; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border: 0; max-height: none; min-height: 0; background: transparent; }
  .chat .log { display: none; }
  .chat.open .log { display: flex; height: min(55vh, 440px); background: var(--card); }
  .chat:not(.open) .chat-head { display: none !important; }
  .chat.open .peek { display: none !important; }
  .chat.open { box-shadow: 0 -8px 0 rgba(22, 23, 28, .12); border-top: 2px solid var(--ink); }
  .chat form { background: var(--card); border-top: 2px solid var(--ink); padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right)); gap: 6px; }
  .chat form .lotto-cta { padding: 0 10px; white-space: nowrap; flex: none; }
  .room.no-chat .chat { display: block; }
  .room.no-chat .chat .log, .room.no-chat .chat .peek { display: none !important; }
  /* Места лентой сверху, своё место первым */
  .stage, .room.kino .stage { min-height: 0; display: flex; flex-direction: column; }
  #seats, .room.kino #seats { display: flex; gap: 6px; overflow-x: auto; padding: 24px 12px 8px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  #seats::-webkit-scrollbar { display: none; }
  .seat.me { order: -1; }
  .seat.empty { order: 1; }
  .center.lotto { width: auto; min-height: 300px; }
  .seat { position: relative; transform: none; left: auto !important; top: auto !important; width: 64px; flex: none; scroll-snap-align: start; }
  .avatar { width: 46px; height: 46px; font-size: 18px; }
  .seat .nm { font-size: 12px; max-width: 64px; }
  .seat .lvl { right: 2px; }
  .seat .bet { font-size: 11px; max-width: 64px; white-space: nowrap; overflow: hidden; }
  /* Карточка раунда постоянной высоты: смена раунда не двигает экран */
  .center { position: static; transform: none; width: auto; min-height: 300px; margin: 8px 12px 12px; border-radius: 18px; padding: 16px; }
  .room.kino .center { min-height: 0; }
  /* Мест по кругу на телефоне нет: бутылочка не поворачивается в пустоту, итог видно строкой «Кто → кому». */
  .center .bottle { transform: none !important; width: 120px; height: 60px; }
  .stage .corner { display: none; }
  .player .btn.small, .react-btn { min-height: 44px; }
  .grid25.small button { height: 44px; }
  .next-bar { padding: 6px 12px; }
  .room.kino .next-bar:not(:has(.mono)) { display: none; }
  /* Полоса с мини-плеером на телефоне — сразу под строкой комнаты. */
  .room-strip { order: -2; }
  .room:not(.kino) .next-bar { order: -1; border-top: 0; border-bottom: 1.5px solid var(--line); background: var(--card); padding: 4px 12px; }
  .kickme { bottom: calc(104px + env(safe-area-inset-bottom)); }
  .kickbar { bottom: calc(104px + env(safe-area-inset-bottom)); }
  /* Тосты сверху, чтобы не закрывать нижнюю панель с «Шаром» */
  .toasts { top: calc(62px + env(safe-area-inset-top)); bottom: auto; }
  .coach { left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); }
  .sheet { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; box-shadow: none; }
  /* Лобби: комнаты в две колонки */
  .lobby { gap: 20px; padding-top: 20px; }
  .rooms { grid-template-columns: 1fr 1fr; gap: 8px; }
  .room-card { min-height: 104px; padding: 12px; }
  .room-card b { font-size: 16px; }
  .room-card .rnote { font-size: 12px; line-height: 1.3; }
  .tabs button { min-height: 44px; }
  .list.tops .join { margin-left: 34px; }
}
@media (max-width: 360px) {
  .purse .chip, .purse span + span { display: none; }
}

.a-coin .coin { background: url(assets/ui/coin@96.png) center / contain no-repeat; box-shadow: none; border-radius: 0; width: 16px; height: 16px; vertical-align: -3px; }
.a-chip .chip { background: url(assets/ui/chip@96.png) center / contain no-repeat; border: 0; border-radius: 0; width: 16px; height: 16px; vertical-align: -3px; }
.a-ball .ball.in { background: url(assets/lotto/ball@256.png) center / contain no-repeat; border: 0; }
.a-ball .ball.hit { background-image: url(assets/lotto/ball-pink@256.png); color: var(--ink); }
.sheet-art { display: block; width: 120px; height: 120px; object-fit: contain; margin: -8px auto 4px; }
/* Половины стола: сверху девушки, снизу парни. Пустое место подписано и подкрашено. */
.seat.empty.side-f .avatar { border-color: var(--pink); color: var(--pink); }
.seat.empty.side-m .avatar { border-color: var(--blue); color: var(--blue); }
/* В ленте (телефон) и в сетке Кинозала: сначала места девушек (9–11, 0–2), потом парней (3–8). */
.seat.at-9, .seat.at-10, .seat.at-11 { order: 0; }
.seat.side-f { order: 1; }
.seat.side-m { order: 2; }
.seat.at-9.side-f, .seat.at-10.side-f, .seat.at-11.side-f { order: 0; }
.topbar img.ui-ic { width: 26px; height: 26px; }
/* У картинок-наклеек поля вокруг предмета: немного увеличиваем, чтобы предмет читался. */
.topbar img.ui-ic { transform: scale(1.4); }
@media (prefers-reduced-motion: reduce) { .bottle { transition: none; } }
.a-verified .verified { background: url(assets/ui/verified@96.png) center / 140% no-repeat; border: 0; width: 22px; height: 22px; }
.empty-art { display: block; width: min(220px, 60%); height: auto; margin: 8px auto 0; }
.frame-thumb { width: 40px; height: 40px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.send img.ui-ic, .menu-btn img.ui-ic { width: 26px; height: 26px; transform: scale(1.4); }
.a-verified .verified::after { display: none; }
/* Уровень — сверху справа, галочка — снизу справа, поверх рамки. Монеты и фишки в шапке крупнее. */
.avatar .verified { z-index: 3; }
.a-coin .purse .coin, .a-chip .purse .chip { width: 24px; height: 24px; vertical-align: -6px; }
.a-coin .purse .coin, .a-chip .purse .chip { transform: scale(1.25); }
/* Центр раунда не уходит под места: компактные варианты в две колонки, карточка поверх мест. */
.center { z-index: 5; }
@media (min-width: 701px) {
  .center .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 380px; }
  .center .opt { min-height: 38px; padding: 4px 10px; font-size: 14px; }
  .center:has(.opts) { width: min(400px, 52%); border-radius: 22px; background: rgba(255, 255, 255, .9); padding: 12px 14px; gap: 6px; }
  .center .q-img { max-height: 90px; width: auto; }
  .center:has(.opts) .timer { font-size: 22px; }
}
/* Кнопки покупки в списках одной ширины, а не «пирамидой» по длине текста. */
.sheet .list > div > .btn { min-width: 13.6em; justify-content: center; flex: none; }
@media (max-width: 420px) { .sheet .list > div > .btn { min-width: 10.5em; } }
/* Раунд бутылочки: три строки, верх и низ равной высоты — бутылочка точно в центре стола. */
.center.is-bottle { display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; align-items: center; gap: 6px; min-height: 300px; width: min(340px, 50%); }
.center.is-bottle .b-top { align-self: end; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.center.is-bottle .b-bot { align-self: start; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.center.is-bottle .bottle { margin: 0; z-index: 6; }
@media (max-width: 700px) { .center.is-bottle { min-height: 0; width: auto; } }
/* Шары-картинки: номер сидит в светлом кружке в середине шара (кружок на картинке чуть левее и выше центра). */
.a-ball .ball.in { width: 58px; height: 58px; font: 700 13px var(--display); letter-spacing: -.5px; padding: 0 3px 3px 0; color: var(--ink); }
.a-ball .center.lotto .ball { width: 58px; height: 58px; }
.a-ball .balls { gap: 10px; }
.a-ball .ball.in { background-size: 165%; font-size: 16px; padding: 0 7px 6px 0; }
@media (max-width: 700px) { .a-ball .ball.in, .a-ball .center.lotto .ball { width: 48px; height: 48px; font-size: 14px; } .a-ball .balls { gap: 6px; } }

/* ===== Аватары и уровни (v2) =====
   Аватар крупнее, рамка ступени тонкая и прилегает вплотную, цифры уровня всегда в одном месте:
   сверху справа на аватаре. Свечение рамки еле заметно «дышит». */
.seat { width: 104px; }
.avatar { width: 76px; height: 76px; border: 0; background: var(--card); overflow: visible; }
.avatar .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar .letter { position: relative; font: 700 28px var(--display); }
.av-square .avatar { border-radius: 16px; }
/* Свободное место: тонкий сплошной круг цвета половины стола и полупрозрачная бумага, без пунктира. */
.seat.empty .avatar { border: 1.5px solid var(--muted); background: rgba(255, 255, 255, .45); font-weight: 500; }
.seat .avatar, .seat.me .avatar, .seat.target .avatar, .seat.kicking .avatar, .seat.ring .avatar { box-shadow: none; }
.lv-ring { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); overflow: visible; pointer-events: none; z-index: 1; }
.avatar img.frame { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); pointer-events: none; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .seat:not(.tier-0) .lv-ring { animation: ringGlow 4.2s ease-in-out infinite alternate; }
  .seat.at-1 .lv-ring, .seat.at-4 .lv-ring, .seat.at-7 .lv-ring, .seat.at-10 .lv-ring { animation-delay: -1.4s; }
  .seat.at-2 .lv-ring, .seat.at-5 .lv-ring, .seat.at-8 .lv-ring, .seat.at-11 .lv-ring { animation-delay: -2.8s; }
  .lv-ring .shim { transform-origin: 50px 50px; animation: spin 7s linear infinite; }
}
@keyframes ringGlow { from { filter: drop-shadow(0 0 0 var(--tc)); } to { filter: drop-shadow(0 0 3.5px var(--tc)); } }
/* Кому выпала бутылочка, кого исключают, свой аватар: подсветка рамкой, без лишних колец. */
.seat.target .lv-ring, .seat.target .avatar img.frame { filter: drop-shadow(0 0 4px var(--pink)) drop-shadow(0 0 2px var(--pink)); animation: none; }
.seat.kicking .lv-ring, .seat.kicking .avatar img.frame { filter: drop-shadow(0 0 4px var(--bad)) drop-shadow(0 0 2px var(--bad)); animation: none; }
.seat .nm { margin-top: 4px; }
/* Значки на аватаре: уровень сверху справа, галочка снизу справа, статус снизу слева. */
.avatar .lvl { position: absolute; top: -10px; right: -14px; z-index: 3; }
.avatar .verified { position: absolute; bottom: -4px; right: -4px; z-index: 3; }
.a-verified .avatar .verified { width: 26px; height: 26px; }
.avatar .st-badge { z-index: 3; }
.lvl { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 6px; font: 700 12px var(--display); border-radius: 11px; }
.lvl .digits { position: relative; z-index: 1; display: inline-flex; align-items: center; }
.lvl.lvl-img { background: none !important; padding: 0; min-width: 0; height: 30px; border-radius: 0; }
.lvl.lvl-img .digits img { width: 26px; height: 26px; object-fit: contain; transform: scale(1.4); margin: 0 -1px; }
.topbar .lvl.lvl-img { height: 26px; }
.topbar .lvl.lvl-img .digits img { width: 22px; height: 22px; }
/* Ускоритель: цифры горят. Три языка пламени мерцают с разной скоростью, искры поднимаются. */
.lvl.fire { overflow: visible; }
.lvl .flame { position: absolute; left: 50%; bottom: 2px; width: 150%; min-width: 34px; height: 210%; transform: translateX(-50%); z-index: 0; overflow: visible; pointer-events: none; }
.lvl:not(.lvl-img).fire { box-shadow: 0 0 0 2px #FF9A2E; }
.flame path { transform-box: fill-box; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .flame .fl1 { animation: flick1 1.3s ease-in-out infinite; }
  .flame .fl2 { animation: flick2 .9s ease-in-out infinite; }
  .flame .fl3 { animation: flick3 .7s ease-in-out infinite; }
  .flame .em { animation: ember 1.8s ease-out infinite; }
  .flame .e2 { animation-delay: .6s; }
  .flame .e3 { animation-delay: 1.2s; }
}
@keyframes flick1 { 0%, 100% { transform: scale(1, 1) skewX(0); } 25% { transform: scale(.96, 1.06) skewX(-3deg); } 50% { transform: scale(1.03, .95) skewX(2deg); } 75% { transform: scale(.98, 1.08) skewX(-1deg); } }
@keyframes flick2 { 0%, 100% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.94, 1.1) skewX(3deg); } 60% { transform: scale(1.04, .93) skewX(-2deg); } }
@keyframes flick3 { 0%, 100% { transform: scale(1, 1); opacity: .95; } 40% { transform: scale(.9, 1.12); opacity: .8; } 70% { transform: scale(1.05, .92); opacity: 1; } }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-3px, -18px); opacity: 0; } }

/* Окно нового уровня */
.levelup { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(22, 23, 28, .45); padding: 16px; }
.lu-card { width: min(340px, 100%); background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 0 0 4px var(--tc), 8px 8px 0 rgba(22, 23, 28, .25); padding: 22px 20px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lu-ring { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.lu-ring .lv-ring { inset: 0; width: 100%; height: 100%; animation: ringGlow 1.6s ease-in-out infinite alternate; }
.lu-ring .lvl { transform: scale(1.6); }
.lu-card h2 { margin: 4px 0 0; font: 900 26px var(--display); }
.lu-tier { margin: 0; color: var(--muted); }
.lu-tier b { color: var(--tc); }
.lu-rew { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.coin.present { background: #F3C74F; box-shadow: inset 0 0 0 3px #F3C74F, inset 0 0 0 5px var(--ink); }
@media (prefers-reduced-motion: no-preference) { .lu-card { animation: luIn .35s cubic-bezier(.2, .9, .3, 1.3); } }
@keyframes luIn { from { transform: scale(.85) rotate(-2deg); opacity: 0; } }

/* Шапка: значки-картинки без квадратных рамок, крупнее. */
.topbar .icon-btn { border: 0; background: transparent; width: 46px; min-height: 46px; }
.topbar .icon-btn:hover, .topbar .icon-btn:focus-visible { background: rgba(255, 255, 255, .08); }
.topbar img.ui-ic { width: 32px; height: 32px; transform: scale(1.35); }
.topbar .icon-btn .badge { top: 2px; right: 2px; }
/* Реакции в раундах: картинка крупнее, на телефоне ещё крупнее. */
.react-btn img.ui-ic { width: 30px; height: 30px; transform: scale(1.35); }
.center .react-btn { border: 0; background: transparent; min-width: 52px; min-height: 52px; }
@media (max-width: 820px) {
  .seat { width: 76px; }
  .avatar { width: 58px; height: 58px; }
  .avatar .letter { font-size: 22px; }
  .seat .nm { max-width: 76px; }
  .lv-ring { inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); }
  .avatar .lvl { top: -9px; right: -10px; }
  .lvl.lvl-img .digits img { width: 22px; height: 22px; }
  #seats, .room.kino #seats { gap: 10px; padding-top: 18px; }
  .react-btn img.ui-ic { width: 36px; height: 36px; }
  .center .react-btn { min-width: 60px; min-height: 60px; }
  .topbar img.ui-ic { width: 30px; height: 30px; }
}
/* Плашка уровня: фон на самих цифрах, чтобы огонь горел позади и не закрывал число. */
.lvl.plate { background: none !important; padding: 0; min-width: 0; height: auto; }
.lvl.plate .digits { background: var(--tbg); color: var(--tink); min-width: 26px; height: 22px; padding: 0 6px; border-radius: 11px; justify-content: center; font: 700 12px var(--display); }
.lvl.plate.fire .digits { box-shadow: 0 0 0 2px #FF9A2E, 0 0 8px 1px rgba(255, 122, 31, .7); }
.lvl:not(.lvl-img).fire { box-shadow: none; }
.lvl .flame { bottom: 6px; height: 230%; width: 120%; min-width: 30px; }
/* Новый уровень — компактная карточка сверху, комнату не закрывает и не затемняет. */
.levelup { inset: auto; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: none; padding: 0; pointer-events: none; }
.lu-card { pointer-events: auto; width: min(300px, calc(100vw - 24px)); padding: 14px 16px 12px; gap: 4px; flex-direction: row; flex-wrap: wrap; justify-content: center; text-align: left; }
.lu-ring { width: 64px; height: 64px; flex: none; }
.lu-ring .lvl { transform: scale(1.2); }
.lu-head { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lu-card h2 { font-size: 20px; margin: 0; }
.lu-rew { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; margin: 6px 0 2px; }
.lu-card .note { width: 100%; margin: 0; font-size: 12px; }
.lu-card .btn { display: none; }
.present-ic { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #F3C74F; box-shadow: inset 0 0 0 2px var(--ink); vertical-align: -2px; }
.lu-rew .coin, .lu-rew .chip { width: 18px; height: 18px; vertical-align: -4px; }
/* «Шар» на компьютере. Где места хватает, он в центре стола. Где не хватает (окно игры VK, ноутбук),
   уходит в колонку чата справа, чтобы не закрывать аватары: выбор чисел — ниже 1400×850, выпадение шаров — ниже 760 по высоте. */
@media (min-width: 821px) {
  .room:not(.kino) .center.lotto .balls { flex-wrap: wrap; }
}
@media (min-width: 821px) and (max-width: 1399px), (min-width: 821px) and (max-height: 849px) {
  .room:not(.kino) .center.lotto-pick { position: fixed; top: 66px; right: 0; left: auto; transform: none; width: 320px; max-height: calc(100vh - 66px - 72px); overflow: auto; border-radius: 0; border: 0; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--card); padding: 14px 16px; z-index: 25; box-shadow: -6px 6px 0 rgba(22, 23, 28, .08); }
}
@media (min-width: 821px) and (max-height: 759px) {
  .room:not(.kino) .center.lotto-draw { position: fixed; top: 66px; right: 0; left: auto; transform: none; width: 320px; max-height: calc(100vh - 66px - 72px); overflow: auto; border-radius: 0; border: 0; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--card); padding: 14px 16px; z-index: 25; box-shadow: -6px 6px 0 rgba(22, 23, 28, .08); }
  .a-ball .room:not(.kino) .center.lotto-draw .ball { width: 50px; height: 50px; }
}
/* Размер аватара подстраивается под окно: в окне игры VK (около 1000×650) меньше, на большом экране крупнее. */
:root { --av: clamp(50px, min(9.6vh, 6.2vw), 96px); }
@media (min-width: 821px) {
  .seat { width: calc(var(--av) + 30px); }
  .avatar { width: var(--av); height: var(--av); }
  .avatar .letter { font-size: calc(var(--av) * .36); }
  .seat .nm { font-size: 12px; max-width: calc(var(--av) + 30px); }
}
/* Ставки и выигрыши у аватаров: без плашек — монетка и число с мягким светлым ореолом, читается на любом фоне. */
.seat .bet { background: none; border: 0; padding: 0; min-height: 0; gap: 3px; font: 700 13px var(--display); color: var(--ink); text-shadow: 0 0 2px var(--paper), 0 0 5px var(--paper), 0 0 8px var(--paper); }
.seat .bet .coin { width: 16px; height: 16px; filter: drop-shadow(0 0 2px var(--paper)); }
.seat .bet.free { color: var(--muted); }
.seat .bet.free img.ui-ic { width: 26px; height: 26px; transform: scale(1.3); filter: drop-shadow(0 0 2px var(--paper)); }
.seat .bet.win { background: none; color: #12733A; border: 0; }

/* Рамки для фото и смайлики: витрина в магазине и окно в чате. */
.avatar img.frame.cf { inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); }
.ftiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.ftile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; background: var(--card); border: 1.5px solid var(--line); text-align: center; }
.ftile.worn { border-color: var(--ink); }
.ftile.locked { opacity: .55; }
.ftile b { font-size: 13px; }
.ftile small { color: var(--muted); font-size: 11px; }
.ftile.r-rare small { color: var(--blue); }
.ftile.r-epic small { color: #7B2FF7; }
.ftile.r-legend small { color: #B88600; font-weight: 700; }
.ft-av { width: 56px; height: 56px; margin: 6px 0; }
.ft-av .letter { font-size: 20px; }
.ft-lock { font: 600 11px var(--mono); color: var(--muted); }
.ftile .btn.small { min-height: 34px; padding: 0 10px; font-size: 13px; }
.stiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.stile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; background: var(--card); border: 1.5px solid var(--line); }
.stile.locked img { filter: grayscale(1); opacity: .5; }
.stile img { width: 40px; height: 40px; object-fit: contain; }
.stile .btn.small { min-height: 28px; padding: 0 6px; font-size: 11px; }
.sm-ph { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: #FFE7A8; align-items: center; justify-content: center; font: 700 14px var(--display); }
#chatform { position: relative; }
.smile-btn { flex: none; width: 44px; min-height: 44px; border: 0; background: transparent; padding: 0; font-size: 22px; }
.smile-btn img { width: 30px; height: 30px; transform: scale(1.3); }
.smilepop { position: absolute; bottom: calc(100% + 6px); right: 8px; width: min(296px, calc(100vw - 16px)); max-height: 220px; overflow: auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 4px 4px 0 rgba(22, 23, 28, .15); z-index: 40; }
.smilepop button { border: 0; background: transparent; padding: 2px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.smilepop button img { width: 36px; height: 36px; object-fit: contain; }
.smilepop button.locked img, .smilepop button.locked .sm-ph { filter: grayscale(1); opacity: .4; }
img.smile { width: 22px; height: 22px; vertical-align: -6px; object-fit: contain; transform: scale(1.25); }
.log .gone { opacity: 0; transition: opacity .35s ease; }
/* Карточка раунда вместо пунктирного овала: светлая бумага (assets/cards/round.jpg, когда будет), мягкая тень.
   Одна и та же на всех размерах: на телефоне фон стола не просвечивает сквозь карточку.
   В бутылочке карточки нет: бутылка лежит прямо на столе, надписи на светлых плашках. */
.center { background: rgba(255, 255, 255, .94) url(assets/cards/round.jpg) center / cover; box-shadow: 0 8px 0 rgba(22, 23, 28, .1), 0 0 0 1.5px rgba(22, 23, 28, .12); }
.center.is-bottle { background: none; box-shadow: none; padding: 0; }
@media (min-width: 821px) {
  .center { min-height: 0; padding: 18px 20px; }
  .center.is-bottle .b-top, .center.is-bottle .b-bot { background: rgba(255, 255, 255, .9); border-radius: 14px; padding: 8px 14px; box-shadow: 0 0 0 1.5px rgba(22, 23, 28, .1); }
  .center.is-bottle .b-bot:empty { display: none; }
  .center.lotto { background-image: url(assets/cards/lotto.jpg); }
}
/* Бутылочка: кнопки выбора крупнее, реакции заметнее. */
.center.is-bottle .row .btn { min-height: 48px; padding: 0 18px; font-size: 16px; }
.center.is-bottle .react-btn { min-width: 58px; min-height: 58px; }
.center.is-bottle .react-btn img.ui-ic { width: 38px; height: 38px; }
.fly-kiss { position: fixed; left: 0; top: 0; width: 56px; height: 40px; z-index: 60; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(22, 23, 28, .2)); } .fly-kiss img, .fly-kiss svg { width: 100%; height: 100%; object-fit: contain; }

/* Подарок в полёте и на аватаре: небольшой, как наклейка; приклеивается снизу слева и держится несколько минут. */
.fly-gift { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 45; filter: drop-shadow(0 2px 0 rgba(22, 23, 28, .25)); }
.fly-gift img, .fly-gift .gift-ph { width: 100%; height: 100%; object-fit: contain; }
.avatar .stuck { position: absolute; left: -10px; bottom: -8px; width: calc(var(--av, 76px) * .42); height: calc(var(--av, 76px) * .42); min-width: 26px; min-height: 26px; z-index: 3; transform: rotate(-8deg); filter: drop-shadow(0 1px 0 rgba(22, 23, 28, .3)); pointer-events: none; }
.avatar .stuck img, .avatar .stuck .gift-ph { width: 100%; height: 100%; object-fit: contain; }
.avatar .st-badge { left: auto; right: -6px; bottom: auto; top: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .avatar.got-gift .stuck { animation: stickOn .45s cubic-bezier(.3, 1.6, .5, 1); }
  .avatar.got-gift { animation: gotGift .5s ease-out; }
}
@keyframes stickOn { from { transform: scale(1.6) rotate(-20deg); opacity: .4; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
@keyframes gotGift { 40% { transform: scale(1.06); } }
/* Новый уровень — ещё компактнее: полоса сверху, ничего не закрывает. */
.lu-card { width: min(260px, calc(100vw - 24px)); padding: 10px 12px 8px; gap: 2px 10px; }
.lu-ring { width: 46px; height: 46px; }
.lu-ring .lvl { transform: scale(1); }
.lu-card h2 { font-size: 16px; }
.lu-tier { font-size: 12px; }
.lu-rew { font-size: 12px; gap: 2px 10px; margin: 4px 0 0; }
.lu-rew .coin, .lu-rew .chip { width: 14px; height: 14px; vertical-align: -3px; }
.lu-card .note { display: none; }
.lu-card { box-shadow: 0 0 0 3px var(--tc), 5px 5px 0 rgba(22, 23, 28, .2); }
/* Подписи на столе читаются на любом фоне: в светлых темах тёмный текст со светлым ореолом,
   в тёмных («Ночь», «Кинотеатр») — светлый текст с тёмным ореолом. Без плашек. */
.stage { --nm-ink: var(--ink); --nm-halo: rgba(243, 241, 236, .95); }
[data-theme="ink"] .stage, [data-theme="cinema"] .stage { --nm-ink: #F3F1EC; --nm-halo: rgba(14, 16, 24, .9); }
.seat .nm { color: var(--nm-ink); text-shadow: 0 0 2px var(--nm-halo), 0 0 5px var(--nm-halo), 0 0 9px var(--nm-halo); font-weight: 700; }
.seat.empty .nm { color: var(--nm-ink); opacity: .75; }
.seat .bet { color: var(--nm-ink); text-shadow: 0 0 2px var(--nm-halo), 0 0 5px var(--nm-halo), 0 0 8px var(--nm-halo); }
.seat .bet.win { color: #12733A; }
[data-theme="ink"] .seat .bet.win, [data-theme="cinema"] .seat .bet.win { color: #2FD27A; }
[data-theme="ink"] .seat.empty .avatar, [data-theme="cinema"] .seat.empty .avatar { background: rgba(14, 16, 24, .35); }
/* Карточка раунда: ширина и масштаб — от размера стола (fitCenter в app.js), чтобы не налезать на места. */
@media (min-width: 821px) {
  .room:not(.kino) .center:not(.lotto-pick) { width: min(var(--cw, 400px), 92%); transform: translate(-50%, -50%) scale(var(--fit, 1)); }
  .room:not(.kino) .center.lotto-draw { width: min(var(--cw, 400px), 92%); }
  .center:has(.opts) { width: min(var(--cw, 400px), 92%); }
  .tot { gap: 8px; }
  .tot-card img, .tot-letter { max-height: 96px; }
}
@media (min-width: 821px) and (min-width: 1400px) and (min-height: 850px) {
  .room:not(.kino) .center.lotto-pick { width: min(var(--cw, 400px), 92%); transform: translate(-50%, -50%) scale(var(--fit, 1)); }
}

/* Бутылочка: только бутылка в центре, верх и низ равной высоты — она точно в центре стола. */
.center.is-bottle { grid-template-rows: 70px auto 70px; min-height: 0; width: auto; padding: 0; }
.center.is-bottle .b-top { display: none; }
.center.is-bottle::before { content: ""; grid-row: 1; }
.center.is-bottle .bottle { grid-row: 2; }
.center.is-bottle .b-bot { grid-row: 3; background: none !important; box-shadow: none !important; padding: 0 !important; }
.b-spin { min-height: 46px; padding: 0 22px; font-size: 16px; }
.b-choice { display: flex; gap: 10px; }
.b-ch { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 8px; box-shadow: 0 3px 0 rgba(22, 23, 28, .25); }
.b-ch img, .b-ch svg { width: 100%; height: 100%; object-fit: contain; }
.b-ch.b-kiss { border-color: var(--pink); }
.b-ch.b-hug { border-color: var(--blue); }
.b-ch.b-skip { color: var(--muted); width: 46px; height: 46px; align-self: center; }
.b-ch:hover { transform: translateY(-2px); }
.b-done { width: 60px; height: 60px; filter: drop-shadow(0 2px 0 rgba(22, 23, 28, .25)); }
.b-done img, .b-done svg { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) { .b-done { animation: stickOn .45s cubic-bezier(.3, 1.6, .5, 1); } }
.center.is-bottle .reacts { gap: 6px; }
.center.is-bottle .react-btn { background: rgba(255, 255, 255, .85); border-radius: 50%; min-width: 48px; min-height: 48px; padding: 4px; box-shadow: 0 0 0 1.5px rgba(22, 23, 28, .15); }
.center.is-bottle .react-btn img.ui-ic { width: 30px; height: 30px; }
/* Кто крутит — голубое свечение рамки, на кого выпало — розовое (класс target). */
.seat.spinner .lv-ring, .seat.spinner .avatar img.frame { filter: drop-shadow(0 0 4px var(--blue)) drop-shadow(0 0 2px var(--blue)); animation: none; }
@media (prefers-reduced-motion: no-preference) { .seat.target .avatar { animation: gotGift .6s ease-out; } }
.wait-note { margin: 0; font-weight: 600; }
@media (min-width: 821px) { .center:has(.wait-note) { padding: 10px 16px; } }

/* ===== Дизайн-ревью (24.11.2026) =====
   Шапка без прокрутки вбок, мини-плеер, компактные окна, подарки плиткой, читаемость на тёмных темах.
   Отчёт: docs/audit/design-review.md. */

/* Шапка на компьютере в один ряд при любой ширине окна. «Топ», «Комнаты» и своё имя — только на широком экране,
   иначе они в меню «…». Свой уровень — без рамки-коробки вокруг значка. */
.topbar .room-title { min-width: 0; }
.topbar .room-title b { overflow: hidden; text-overflow: ellipsis; }
.topbar .room-title small { white-space: nowrap; }
.topbar .me-btn { border: 0; background: transparent; padding: 0 6px; }
.topbar .me-btn:hover { background: rgba(255, 255, 255, .08); }
.topbar .icon-btn svg { width: 24px; height: 24px; }
@media (min-width: 821px) and (max-width: 1439px) {
  .topbar { gap: 8px; }
  .topbar .desk[data-act="tops"], .topbar .desk[data-act="lobby"], .me-name { display: none; }
}
@media (min-width: 821px) and (max-width: 1099px) { .purse small { display: none; } }
@media (min-width: 821px) and (max-width: 959px) { .topbar .pulse { display: none !important; } }

/* Мини-плеер: одна строка в середине нижней полосы (на телефоне — под строкой комнаты).
   Меню «…» — тёмным окном над строкой, видео по желанию — окном 320 точек вверху колонки чата (стол не закрывает). */
.next-bar { flex-wrap: nowrap; min-height: 52px; }
.next-bar .nb-l, .next-bar .nb-r { display: flex; gap: 8px; align-items: center; flex: none; }
.next-bar .nb-r { margin-left: auto; }
.player.mini { position: relative; flex: 0 1 460px; min-width: 0; margin: 0 auto; padding: 0; background: none; color: var(--ink); }
.player.mini .prow { height: 36px; padding: 0 3px 0 12px; gap: 2px; flex-wrap: nowrap; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; }
.pm-ic { display: inline-flex; flex: none; color: #C2185B; margin-right: 4px; }
.pm-now { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-now b { font-weight: 600; }
.pm-btn { flex: none; min-height: 28px; padding: 0 10px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pm-btn:hover { background: var(--paper); }
.pm-btn.strong { background: var(--ink); color: var(--paper); }
.pm-btn[aria-pressed="true"] { color: #C2185B; }
.pm-btn:disabled { color: var(--muted); cursor: default; }
.pm-btn img.ui-ic { width: 20px; height: 20px; }
.player.mini .pmore { position: absolute; z-index: 27; left: 0; right: 0; bottom: calc(100% + 8px); padding: 10px 12px; border: 0; background: var(--ink); color: var(--paper); box-shadow: 0 6px 18px rgba(22, 23, 28, .25); }
.player.mini .player-frame:empty { display: none; }
.player.mini .player-frame { position: fixed; z-index: 26; right: 0; top: var(--top-h, 66px); width: 320px; background: #000; box-shadow: -4px 4px 0 rgba(22, 23, 28, .12); }
@media (max-width: 820px) {
  .player.mini { flex: 1 1 auto; margin: 0; }
  .player.mini .prow { height: 44px; border-radius: 22px; }
  .pm-btn { min-height: 38px; border-radius: 19px; }
  .player.mini .pmore { position: fixed; z-index: 31; left: 8px; right: 8px; top: auto; bottom: calc(104px + env(safe-area-inset-bottom)); }
  .player.mini .player-frame { position: static; width: 100%; margin-bottom: 6px; box-shadow: none; }
}

/* Окна: компактнее и легче. На компьютере в комнате окно встаёт справа поверх колонки чата —
   стол с местами остаётся виден. На телефоне — шторка снизу не выше 80% экрана. */
.sheet { width: min(460px, calc(100vw - 24px)); max-height: min(82vh, 760px); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(22, 23, 28, .3); }
.sheet::backdrop { background: rgba(22, 23, 28, .35); }
.sheet .head { padding: 8px 8px 8px 16px; }
.sheet .head h2 { font-size: 17px; }
.sheet .close { width: 40px; height: 40px; border: 0; font-size: 24px; }
.sheet .close:hover { background: rgba(255, 255, 255, .1); }
.sheet .body { padding: 14px 16px 16px; gap: 12px; }
@media (min-width: 821px) {
  body[data-theme] .sheet { position: fixed; margin: 0; inset: var(--top-h, 66px) 0 auto auto; width: clamp(320px, 30vw, 400px); max-height: calc(100vh - var(--top-h, 66px)); border-width: 0 0 2px 2px; box-shadow: -6px 6px 0 rgba(22, 23, 28, .12); }
  body[data-theme] .sheet::backdrop { background: rgba(22, 23, 28, .12); }
}
@media (max-width: 820px) {
  .sheet { max-height: 80vh; border: 0; border-radius: 16px 16px 0 0; }
  .sheet .head { border-radius: 16px 16px 0 0; }
}

/* Подарки плиткой: картинка, название, цена. На что не хватает монет — бледнее. */
.gtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.gtile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; text-align: center; }
.gtile:hover, .gtile:focus-visible { border-color: var(--ink); }
.gtile .gift-img { width: 56px; height: 56px; margin-bottom: 2px; }
.gtile .gift-ph { width: 44px; height: 44px; }
.gtile b { font-size: 13px; line-height: 1.2; }
.gtile small { font-size: 11px; color: var(--muted); }
.gtile .cost { font-size: 13px; margin-top: 2px; }
.gtile.short { opacity: .5; }
.gtile.short:hover { opacity: .8; }

/* Места. Телефон: своё место первым в ленте (правило половин стола его перебивало).
   Ставки в одну строку. Значок статуса — сверху слева, чтобы не лежать на галочке. */
@media (max-width: 820px) { #seats .seat.me { order: -1; } }
.seat .bet { white-space: nowrap; }
.avatar .st-badge { left: -4px; right: auto; top: -4px; bottom: auto; }
/* Цифры уровня — от размера аватара: в окне игры VK они не больше трети аватара. */
@media (min-width: 821px) { .seat .lvl.lvl-img .digits img { width: calc(var(--av) * .27); height: calc(var(--av) * .27); } }
@media (max-width: 820px) { .seat .lvl.lvl-img .digits img { width: 19px; height: 19px; } }
/* Тёмные темы: тёмные цифры (6, 8) и тонкие рамки получают светлый контур. */
[data-theme="ink"] .stage .lvl-img .digits img, [data-theme="cinema"] .stage .lvl-img .digits img { filter: drop-shadow(0 0 1px rgba(243, 241, 236, .95)) drop-shadow(0 0 2px rgba(243, 241, 236, .5)); }

/* Строка комнаты на телефоне: название важнее счётчика, подпись «Пульс» на узком экране не нужна. */
.room-strip b { flex: none; max-width: 58%; }
.room-strip small { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.room-strip .pulse-bar { flex: none; }
@media (max-width: 420px) { .room-strip .pulse-bar small { display: none; } .room-strip .pulse-bar > i { width: 36px; } }
/* Поле чата на телефоне шире: кнопка «Отправить» появляется, когда есть текст (Enter тоже отправляет). */
@media (max-width: 820px) { #chatform:has(#chatinput:placeholder-shown) .send { display: none; } }

/* Лобби: подписи карточек комнат на светлой подложке, картинка видна сверху. */
.room-card img { opacity: .6; z-index: 0; }
.room-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, .93) 60%); pointer-events: none; }
.room-card > *:not(img) { z-index: 2; }
/* Пустые экраны: картинка меньше, чтобы не шуметь. */
.empty-art { width: min(140px, 45%); }
/* «Шар» в колонке справа (окно ниже 760 по высоте): карточка закреплена у края, сдвиг к центру стола ей не нужен.
   Раньше общее правило карточки сдвигало её на полширины вверх-влево — она наезжала на шапку и аватары. */
@media (min-width: 821px) and (max-height: 759px) { .room:not(.kino) .center.lotto-draw { transform: none; width: 320px; } }
/* Подарок в нижней панели телефона — значок без квадратной рамки. */
.gift-btn { border: 0; background: transparent; }
.gift-btn img.ui-ic { width: 30px; height: 30px; transform: scale(1.3); }
/* Фоны «Тетради» и «Кинотеатра» сгенерированы с чёрными полями по краям: увеличиваем, чтобы поля ушли за край стола.
   Уберём, когда придут спокойные фоны bg-calm.jpg из batch2. */
@media (min-width: 701px) {
  [data-theme="notebook"] .stage { background-size: auto 128%, 24px 24px, 24px 24px; }
  [data-theme="cinema"] .stage { background-size: auto 128%, cover; }
}
/* Новый уровень не налезает на места: на компьютере — над колонкой чата справа, на телефоне — над нижней панелью. */
@media (min-width: 821px) { .levelup { left: auto; right: 12px; transform: none; top: calc(var(--top-h, 66px) + 10px); } }
@media (max-width: 820px) { .levelup { top: auto; bottom: calc(112px + env(safe-area-inset-bottom)); } }
/* В узком окне (колонка справа, телефон) кнопки в строках не растягиваем до общей ширины. */
.sheet .list.tops > div > .btn { min-width: 0; }
@media (min-width: 821px) and (max-width: 1299px) { body[data-theme] .sheet .list > div > .btn { min-width: 10.5em; } }
/* Тосты в комнате на компьютере — в колонке чата над полем ввода: не закрывают стол и мини-плеер. */
@media (min-width: 821px) { body[data-theme] .toasts { left: auto; right: 8px; transform: none; width: 304px; bottom: 72px; } }
/* Поле чисел «Шара» легче: тонкая серая линия и скругление, выбранные — чернилами. */
.grid25.small button { border: 1.5px solid #8A8E9B; border-radius: 8px; background: var(--card); }
/* Выбранное число — тёмное: правило выше задаёт всем клеткам белый фон и без этого перебивало выбор (белые цифры на белом). */
.grid25.small button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
/* Окно 701–820 точек (маленькое окно игры VK на компьютере): карточка раунда по центру, полосы ниже,
   карточка по высоте содержимого — тогда раунд целиком виден в окне 800×600 без прокрутки. */
@media (min-width: 701px) and (max-width: 820px) {
  .center, .center:has(.opts) { width: calc(100% - 24px); max-width: 560px; align-self: center; margin-left: 0; margin-right: 0; }
  .player.mini .prow { height: 36px; }
  .pm-btn { min-height: 28px; }
  .room:not(.kino) .next-bar { min-height: 0; padding: 3px 12px; }
  #seats, .room.kino #seats { padding-top: 14px; }
}
@media (min-width: 701px) and (max-width: 820px) and (max-height: 700px) { .center { min-height: 0; } }
/* Запасной символ реакции (пока нет картинки) — крупно, как картинка. */
.react-btn span.ui-ic { font-size: 22px; }
/* Узкий телефон: шапка помещается и с двузначными фишками (раньше «…» уходило за край, страница ездила вбок). */
@media (max-width: 420px) {
  .logo { font-size: 14px; }
  .purse { gap: 6px; font-size: 12px; }
  .topbar .icon-btn { width: 38px; }
  .topbar img.ui-ic { width: 26px; height: 26px; }
  .topbar .me-btn { min-width: 36px; padding: 0 2px; }
}
/* Карточка игрока на компьютере ниже: пункты по 38 точек (на телефоне остаются 44). */
@media (min-width: 821px) and (pointer: fine) { .pop .pop-item { min-height: 34px; } .pop { padding: 6px 10px; gap: 4px; } }
/* Шары второй очереди (lotto/ball2*): чистый шар с белой меткой в середине — номер сидит ровно по центру.
   Старый шар (lotto/ball.png) похож на моток верёвки, номер на нём читается хуже. */
.a-ball2 .ball.in { background-image: url(assets/lotto/ball2@256.png); background-size: 122%; background-position: center; padding: 0; font-size: 15px; }
.a-ball2 .ball.hit { background-image: url(assets/lotto/ball2-hit@256.png); }
/* Своя обложка комнаты (cards/room-<тип>.jpg, batch4): предмет справа, слева пусто под текст — подложка не нужна. */
.room-card.has-cover img { opacity: 1; }
.room-card.has-cover::after { background: linear-gradient(90deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); }
/* Варианты ответа и карточки «Этот или тот» — тонкая серая линия и скругление вместо жирной чёрной рамки. */
.opt, .tot-card, .center .answers button, .opt-res { border: 1.5px solid #8A8E9B; border-radius: 10px; }
.opt:hover:not(:disabled), .tot-card:hover:not(:disabled) { border-color: var(--ink); }
.opt.mine, .tot-card.mine, .opt-res.mine { border-color: var(--ink); }
/* Меню «…» мини-плеера на компьютере — в колонке чата над полем ввода, как окна и тосты: нижний ряд мест остаётся виден. */
@media (min-width: 821px) { .player.mini .pmore { position: fixed; left: auto; right: 0; width: 320px; bottom: 66px; } }
/* Чат: уровень — число цвета ступени без плашки. Пульс при нуле — слово «тихо». */
.lv-num { display: inline-block; min-width: 1.6em; font: 700 11px var(--mono); color: var(--tc); filter: saturate(1.1) brightness(.85); text-align: right; margin-right: 2px; }
.pulse.quiet { font: 500 12px var(--mono); color: var(--on-dark-muted, #8A8E9B); letter-spacing: .5px; }
/* Карточка игрока на телефоне: действия в две колонки, карточка ниже вдвое. */
@media (max-width: 820px) {
  #pop.pop { width: min(300px, calc(100vw - 16px)) !important; padding: 10px 10px 8px; }
  #pop .pop-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  #pop .pop-item { min-height: 40px; padding: 6px 8px; font-size: 13px; justify-content: center; text-align: center; }
  #pop .pop-item.accent, #pop .pop-item.muted { grid-column: 1 / -1; }
  #pop .pop-note { margin: 2px 0 6px; font-size: 12px; }
}
/* Кинозал без видео: тонкая светлая строка вместо большой тёмной панели. */
.room.kino .player.empty { background: rgba(255, 255, 255, .9); color: var(--ink); border-bottom: 1.5px solid var(--line); }
.room.kino .player.empty .player-frame, .room.kino .player.empty .pmore { display: none; }
.room.kino .player.empty .prow { display: flex; align-items: center; gap: 12px; padding: 6px 12px; min-height: 0; }
.room.kino .player.empty .now b { display: none; }
.room.kino .player.empty .now small { font-weight: 600; color: var(--ink); opacity: .8; }
.room.kino .player.empty .btn.ghost-dark { color: var(--ink); border-color: var(--ink); }
/* Вкладки магазина в одну строку, кнопки покупки короче. */
.shop-tabs { flex-wrap: nowrap; }
.shop-tabs button { flex: 1; min-height: 36px; padding: 0 6px; font-size: 13px; white-space: nowrap; }
.sheet .list > div > .btn { min-width: 8.5em; }
/* Свёрнутые блоки в окнах: строка со стрелкой, раскрывается по нажатию. */
details.fold { border-top: 1px solid var(--line); }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 6px; transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
@media (max-width: 820px) { #pop.pop { left: 50% !important; transform: translateX(-50%); } }

/* ---------- Картинки из догенерации (ноябрь 2026) ----------
   Значок раунда слева от заголовка (rounds/*), фон чата (ui/chat-bg.jpg) и покадровые анимации (fx/sheet-*). */
.center h2.r-title { display: flex; align-items: center; justify-content: center; gap: 8px; }
.r-ic { width: 34px; height: 34px; object-fit: contain; flex: none; margin: -4px 0; }
/* Бумажный фон колонки чата на светлых темах компьютера. На тёмных (ink, cinema) и на телефоне остаётся прежний. */
@media (min-width: 821px) {
  html.a-chatbg body:not([data-theme="ink"]):not([data-theme="cinema"]) .chat { background: var(--card) url(assets/ui/chat-bg.jpg) top center / cover; }
}
/* Лист 3×2: шесть кадров, один проход. Размер кадра задаёт место показа. */
.sheet-fx { position: absolute; pointer-events: none; background-repeat: no-repeat; background-size: 300% 200%; animation: sheet6 .72s steps(1, end) forwards; }
@keyframes sheet6 {
  0% { background-position: 0 0; } 16.667% { background-position: 50% 0; } 33.333% { background-position: 100% 0; }
  50% { background-position: 0 100%; } 66.667% { background-position: 50% 100%; } 83.333% { background-position: 100% 100%; }
  100% { background-position: 100% 100%; opacity: 0; }
}
/* Вспышка нового уровня под рамкой и цифрами: они остаются видны. */
.lu-ring { isolation: isolate; }
.lu-ring .sheet-fx { inset: -45%; z-index: -1; }
.sheet-fx.at-point { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; z-index: 61; }
.sheet-fx.at-point.big { width: 170px; height: 170px; margin: -85px 0 0 -85px; animation-duration: .9s; }

/* ---------- Карточка раунда: бумага с рамкой по размеру карточки ----------
   cards/round-paper.jpg — карточка, вырезанная из фото без серого стола. Рамка «из девяти кусков» (border-image):
   уголки с крестиками не тянутся и не обрезаются, края растягиваются под любой размер, текст стоит внутри синей рамки. */
.center:not(.lotto):not(.is-bottle) {
  background: none; border-radius: 0; box-shadow: none;
  border: 0 solid transparent;
  border-image: url(assets/cards/round-paper.jpg) 120 fill / 40px stretch;
  filter: drop-shadow(0 6px 0 rgba(22, 23, 28, .1));
  padding: 30px 30px 34px;
}

/* «Этот или тот» без белых боксов: наклейка и подпись прямо на бумаге. Выбранная — крупнее, подпись розовая,
   вторая бледнеет. */
.center .tot-card { border: 0; background: none; box-shadow: none; padding: 2px 4px; min-height: 0; border-radius: 0; transition: transform .15s, opacity .2s; }
/* В картинках вокруг наклейки много пустого поля: увеличиваем саму картинку, место в карточке остаётся прежним. */
.center .tot-card img { width: 96px; height: 96px; max-height: none; transform: scale(1.3); margin: 6px 0 10px; filter: drop-shadow(0 3px 0 rgba(22, 23, 28, .18)); }
.center .tot-card .tot-letter { background: none; }
.center .tot-card:hover:not(:disabled) { transform: translateY(-3px); }
.center .tot-card.mine { background: none; color: var(--pink); transform: scale(1.06); }
.center .tot:has(.mine) .tot-card:not(.mine) { opacity: .5; }

/* Бутылочка: реакции и выбор (поцелуй, объятие) — крупные наклейки без белых кружков.
   Счётчик реакций с ореолом, как подписи у мест: читается и на тёмных темах. */
.center.is-bottle .react-btn { background: none; border-radius: 0; box-shadow: none; padding: 0; min-width: 64px; min-height: 64px; display: inline-flex; align-items: center; gap: 2px; color: var(--nm-ink); font-weight: 700; text-shadow: 0 0 2px var(--nm-halo), 0 0 5px var(--nm-halo), 0 0 9px var(--nm-halo); }
/* У картинок реакций поле вокруг наклейки: увеличиваем саму картинку, кнопка остаётся прежней. */
.center.is-bottle .reacts { gap: 18px; }
.center.is-bottle .react-btn img.ui-ic { width: 56px; height: 56px; transform: scale(1.45); filter: drop-shadow(0 3px 0 rgba(22, 23, 28, .22)); transition: transform .15s; }
.center.is-bottle .react-btn:hover:not(:disabled) img.ui-ic { transform: scale(1.45) translateY(-3px); }
.center.is-bottle .react-btn:disabled { opacity: 1; }
.center.is-bottle .b-choice { gap: 18px; }
.center.is-bottle .b-ch { width: 76px; height: 76px; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 0; filter: drop-shadow(0 3px 0 rgba(22, 23, 28, .22)); }
.center.is-bottle .b-ch:not(.b-skip) img { transform: scale(1.3); }
.center.is-bottle .b-ch.b-skip { width: 40px; height: 40px; color: var(--nm-ink); filter: drop-shadow(0 0 3px var(--nm-halo)); }
.center.is-bottle .b-done { width: 76px; height: 76px; }
@media (max-width: 700px) {
  .center.is-bottle .react-btn img.ui-ic { width: 48px; height: 48px; }
  .center.is-bottle .b-ch { width: 62px; height: 62px; }
}

/* «Быстрые руки»: надпись помещается в круг («Жмите!», «Фальстарт», «Призы разобрали»), с полями по краям. */
.center .go { width: 128px; height: 128px; padding: 0 14px; font-size: 17px; line-height: 1.1; overflow-wrap: anywhere; box-shadow: 0 4px 0 rgba(22, 23, 28, .18); }
.center .go.wait { font-size: 15px; }

/* ---------- Меню подарков: вкладки «Подарки / Маски / Мелочь» ---------- */
.seg.gift-tabs { grid-template-columns: repeat(3, 1fr); margin: 2px 0 8px; }
.seg.gift-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.gift-counts { display: flex; gap: 6px; margin: 0 0 6px; }
.gift-counts button { flex: 1; min-height: 40px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font: 700 15px var(--mono); }
.gift-counts button[aria-checked="true"] { border-color: var(--pink); background: var(--pink); color: var(--ink); }
.gtiles.gt-mask, .gtiles.gt-small { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }

/* Маска поверх аватара. Над головой — шире аватара и выше него; на лице — по центру; на щеке — снизу справа. */
.avatar .mask { position: absolute; z-index: 4; pointer-events: none; display: block; filter: drop-shadow(0 2px 0 rgba(22, 23, 28, .2)); }
.avatar .mask img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar .mask.spot-top { left: 8%; right: 8%; top: -42%; height: 62%; }
.avatar .mask.spot-face { left: 12%; right: 12%; top: 22%; height: 56%; }
.avatar .mask.spot-cheek { right: -14%; bottom: -6%; width: 52%; height: 52%; }
@media (prefers-reduced-motion: no-preference) { .avatar.got-gift .mask { animation: stickOn .45s cubic-bezier(.3, 1.6, .5, 1); } }

/* ---------- «Шар» на столе: бумажный билет с рамкой по размеру ----------
   cards/lotto-paper.jpg — билет, вырезанный из фото без стола. Рамка «из девяти кусков», как у карточки раунда:
   звёздочки в углах и розовая линия целые при любом размере, шары и билеты внутри рамки.
   В колонке справа (окно игры VK) «Шар» остаётся простой панелью — там рамка не нужна. */
.center.lotto {
  background: none; border-radius: 0; box-shadow: none;
  border: 0 solid transparent;
  border-image: url(assets/cards/lotto-paper.jpg) 110 fill / 36px stretch;
  filter: drop-shadow(0 6px 0 rgba(22, 23, 28, .1));
  padding: 30px 30px 32px;
}
.center.lotto.jackpot { filter: drop-shadow(0 0 0 var(--pink)) drop-shadow(0 0 6px var(--pink)); }
@media (min-width: 821px) and (max-width: 1399px), (min-width: 821px) and (max-height: 849px) {
  .room:not(.kino) .center.lotto-pick { border-image: none; filter: none; }
}
@media (min-width: 821px) and (max-height: 759px) {
  .room:not(.kino) .center.lotto-draw { border-image: none; filter: none; }
}

/* ---------- Карточки комнат в лобби: текст не налезает на картинку ----------
   На обложке (cards/room-*.jpg) предмет справа. Раскладку выбирает сама карточка по своей ширине:
   узкая — предмет сверху справа, текст снизу во всю ширину; широкая — текст слева, предмет справа.
   Картинка не перекрывается подложкой, а сама растворяется к тексту (mask), фон карточки — цвета бумаги. */
.room-card.has-cover { container-type: inline-size; background: #FAF6EC; }
.room-card.has-cover::after { display: none; }
.room-card.has-cover img { inset: 0 0 auto auto; width: 100%; height: 50%; object-fit: cover; object-position: right center;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.room-card.has-cover { min-height: 210px; }
@container (min-width: 320px) {
  .room-card.has-cover img { inset: 0 0 0 auto; width: 62%; height: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
  .room-card.has-cover > *:not(img) { max-width: 52%; }
}
@media (max-width: 820px) { .room-card.has-cover { min-height: 178px; } .room-card.has-cover img { height: 44%; } }
