:root {
  --bg: #0d2219; --felt: #17432f; --felt2: #1d5139; --ink: #eef5f0; --muted: #9db8a8;
  --wood: #6b4423; --wood2: #4e2f16; --tile: #fdf6e3; --tile2: #efe3c4;
  --c0: #111827; --c1: #d62828; --c2: #1d4ed8; --c3: #e07800;
  --accent: #f6c445; --good: #34d399; --bad: #ef4444; --sel: #38bdf8;
  --tw: 40px; --th: 52px; --rw: 44px; --rh: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 9px 14px;
  background: #2c5c45; transition: transform .08s, background .15s; }
button:active { transform: scale(.96); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: #1b1300; font-weight: 700; }
button.soft { background: rgba(255,255,255,.08); }
button.danger { background: #7f1d1d; }
button.link { background: none; padding: 4px 6px; color: var(--muted); text-decoration: underline; }
button.icon { background: rgba(255,255,255,.08); padding: 6px 10px; font-size: 18px; position: relative; }
input, select { font: inherit; color: var(--ink); background: #0b1d15; border: 1px solid #2f5a46; border-radius: 10px; padding: 10px 12px; }
.hidden { display: none !important; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--muted); }
.pill.on { color: var(--ink); background: rgba(52,211,153,.18); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #64748b; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--good); }

/* стартовая страница: название фишками на подставке, вход, игра без аккаунта */
.login { position: relative; isolation: isolate; max-width: 380px; min-height: 100vh; min-height: 100dvh; box-sizing: border-box; margin: 0 auto;
  padding: calc(clamp(24px, 6vh, 64px) + var(--safe-t)) 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse 140% 60% at 50% 0%, var(--felt2), var(--bg) 62%); pointer-events: none; }
.wordmark { margin: 0; width: min(330px, 100%); padding: 14px 0 12px; border-radius: 16px; background: linear-gradient(var(--wood), var(--wood2));
  box-shadow: 0 8px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wordmark .row { display: flex; gap: 4px; }
.lt { width: 48px; height: 62px; border-radius: 7px; background: linear-gradient(var(--tile), var(--tile2)); box-shadow: inset 0 1px 0 #fff, 0 3px 5px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; position: relative; font-size: 30px; font-weight: 800; line-height: 1; flex: 0 0 auto; }
.lt::after { content: ""; position: absolute; bottom: 9%; left: 50%; width: 16%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 1.5px solid currentColor; opacity: .5; }
.lt.c0 { color: var(--c0); } .lt.c1 { color: var(--c1); } .lt.c2 { color: var(--c2); } .lt.c3 { color: var(--c3); }
@media (max-width: 350px) { .lt { width: 42px; height: 55px; font-size: 26px; } }
@media (prefers-reduced-motion: no-preference) {
  .wordmark.anim .lt { animation: ltsort .9s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
  @keyframes ltsort { from { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } to { transform: none; } }
  .livepill i { animation: livedot 2s ease-out infinite; }
  @keyframes livedot { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }
}
.tagline { margin: 2px 0 0; max-width: 310px; font-size: 15px; line-height: 1.4; color: #d3e6da; text-wrap: balance; }
.livepill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: 13px; color: #cfe3d6; }
.livepill i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: 0 0 auto; }
.livepill i.down { background: var(--bad); animation: none; }
.authwait { margin: 0; padding: 22px 0; text-align: center; font-size: 15px; }
.authcard { width: 100%; box-sizing: border-box; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); text-align: left; }
.login form { display: grid; gap: 12px; }
.login label.fl { display: grid; gap: 5px; font-size: 13px; color: #b9d0c2; }
.login label.fl input { width: 100%; min-width: 0; box-sizing: border-box; height: 46px; font-size: 17px; }
.login input::placeholder { color: #7f9d8c; }
.login label.fl input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246,196,69,.18); }
.login form button.primary { height: 50px; font-size: 17px; border-radius: 14px; }
.login .err { color: #fca5a5; min-height: 20px; font-size: 14px; }
.login .err:empty { min-height: 0; margin-top: -12px; }
.noacc { width: 100%; display: grid; gap: 8px; }
.noacc > .sub { text-align: center; }
.tilebtns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tilebtns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tilebtn { min-height: 58px; border-radius: 12px; background: linear-gradient(var(--tile), var(--tile2)); box-shadow: inset 0 1px 0 #fff, 0 3px 6px rgba(0,0,0,.4);
  color: #14231b; font-weight: 700; font-size: 14px; line-height: 1.2; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; }
.tilebtn svg { flex: 0 0 auto; }
.login .docs { margin-top: auto; padding-top: 6px; text-align: center; }
.login .langs { text-align: center; }

/* свои столы — переключатель сверху; лобби всегда под рукой */
.tabs-bar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: calc(5px + var(--safe-t)) 8px 5px; background: #08150f; -webkit-overflow-scrolling: touch; flex: 0 0 auto; }
.tabs-bar::-webkit-scrollbar { display: none; }
.tabs-bar:not(.hidden) + .gh { padding-top: 5px; }
.lobby > .tabs-bar { position: sticky; top: 0; z-index: 5; margin: calc(-10px - var(--safe-t)) -12px 6px; }
.tab { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; max-width: 220px; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.07); font-size: 13px; line-height: 18px; white-space: nowrap; }
.tab .tn { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.tab.on { background: #2c5c45; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); font-weight: 600; }
.tab .ts { font-size: 12px; color: var(--muted); }
.tab.my .ts { color: #1b1300; background: var(--accent); border-radius: 99px; padding: 0 7px; font-weight: 700; }
.tab .tt { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.tab .tt:empty { display: none; }
.tab .tt.low { color: var(--bad); font-weight: 700; }
.tab .tv { font-size: 12px; }
.tab .ub { min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 11px; line-height: 16px; padding: 0 4px; text-align: center; }
.tab.my:not(.on) { box-shadow: 0 0 0 1.5px var(--accent); animation: tabpulse 1.6s ease-out infinite; }
@keyframes tabpulse { 0% { box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 0 rgba(246,196,69,.6); } 70%, 100% { box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 9px rgba(246,196,69,0); } }
@media (prefers-reduced-motion: reduce) { .tab.my:not(.on) { animation: none; } }
/* «ваш ход за другим столом» */
.turnbar { position: fixed; left: 50%; top: calc(46px + var(--safe-t)); transform: translate(-50%, -16px); opacity: 0; pointer-events: none; z-index: 60; transition: transform .25s cubic-bezier(.16,1,.3,1), opacity .2s; max-width: calc(100vw - 20px); }
.turnbar.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.turnbar button { display: flex; align-items: center; gap: 5px; max-width: 100%; background: var(--accent); color: #1b1300; box-shadow: 0 6px 18px rgba(0,0,0,.45); border-radius: 99px; padding: 10px 16px; white-space: nowrap; }
.turnbar .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vbtn.away { opacity: .55; }

/* лобби */
.lobby { max-width: 640px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 12px calc(30px + var(--safe-b)); }
.lobby header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 10px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .4px; }
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.card h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.card .row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 13px; color: var(--muted); flex: 1 1 140px; min-width: 0; }
.card label select, .card label input { width: 100%; min-width: 0; }
.tcard { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); }
.tcard > div:first-child { flex: 1 1 190px; min-width: 0; }
.tcard button { white-space: nowrap; }
.tcard:first-of-type { border-top: 0; }
.empty { color: var(--muted); padding: 6px 0; }
.prow { padding: 6px 0; }
.rules p { margin: 6px 0; font-size: 14px; }
.rules summary { cursor: pointer; color: var(--muted); }
.wait-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* игра */
.game { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gh { display: flex; align-items: center; gap: 8px; padding: calc(5px + env(safe-area-inset-top, 0px)) 8px 5px; background: #0a1a13; }
/* игроки — списком друг под другом, все видны сразу */
.players { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; max-width: 520px; }
.pl { display: flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 7px; background: rgba(255,255,255,.05); font-size: 13px; line-height: 19px; white-space: nowrap; border: 1.5px solid transparent; }
.pl .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pl.turn { border-color: var(--accent); background: rgba(246,196,69,.16); }
.pl.turn .nm::before { content: "▶ "; color: var(--accent); font-size: 10px; }
.pl .cnt { flex: 0 0 auto; min-width: 22px; text-align: center; font-weight: 700; background: var(--tile); color: #222; border-radius: 4px; padding: 0 4px; font-size: 12px; line-height: 16px; }
.pl .dot { margin-right: 0; flex: 0 0 auto; }
.pl.me .nm { font-weight: 700; }
.gh .hr { flex: 0 0 auto; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.gh .hbtns { display: flex; gap: 6px; }
.gh .icon { padding: 3px 9px; font-size: 17px; }
.pool { font-size: 12px; color: var(--muted); white-space: nowrap; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 11px; line-height: 16px; padding: 0 4px; display: none; }
.badge.on { display: block; }
.status { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 14px; min-height: 30px; background: #0f271c; }
.status .msg { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status .msg.mine { color: var(--accent); font-weight: 600; }
.status .msg.ok { color: var(--good); font-weight: 600; }
.status .timer { font-variant-numeric: tabular-nums; color: var(--muted); }
.status .timer.low { color: var(--bad); font-weight: 700; }
.status .zoom { display: flex; gap: 4px; flex: 0 0 auto; }
.status .zoom button { padding: 2px 0; width: 30px; font-size: 16px; line-height: 22px; background: rgba(255,255,255,.08); border-radius: 8px; }
.status .zoom button.on { background: rgba(246,196,69,.25); }

.boardWrap { flex: 1 1 auto; overflow: auto; touch-action: pan-x pan-y; background: radial-gradient(ellipse at center, var(--felt2), var(--felt)); padding: 6px; -webkit-overflow-scrolling: touch; }
.grid { display: grid; gap: 0; margin: 0 auto; }
.board { grid-template-columns: repeat(var(--bc, 14), var(--tw)); width: max-content; }
.board .cell { width: var(--tw); height: var(--th); padding: 1px; border-radius: 4px; outline: 1px solid rgba(255,255,255,.035); outline-offset: -1px; }
.rackWrap { flex: 0 0 auto; max-height: 40vh; overflow: auto; padding: 6px 6px calc(8px + var(--safe-b)); background: linear-gradient(var(--wood), var(--wood2)); box-shadow: 0 -2px 8px rgba(0,0,0,.4); }
.rack { grid-template-columns: repeat(var(--rc, 12), var(--rw)); width: max-content; }
.rack .cell { width: var(--rw); height: var(--rh); padding: 1.5px; border-radius: 5px; outline: 1px solid rgba(0,0,0,.12); outline-offset: -1px; }
.cell.hover { background: rgba(246,196,69,.35); }
.controls { display: flex; gap: 6px; padding: 6px 8px; background: #0a1a13; align-items: center; flex-wrap: wrap; }
.controls .sp { flex: 1; }
.controls button { padding: 9px 12px; }
.controls .sort button { padding: 7px 9px; font-size: 13px; background: rgba(255,255,255,.07); }

.tile { width: 100%; height: 100%; border-radius: 5px; background: linear-gradient(var(--tile), var(--tile2));
  box-shadow: 0 1px 0 #fff inset, 0 2px 3px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center;
  position: relative; font-weight: 800; letter-spacing: -1px; }
.board .tile { font-size: calc(var(--tw) * .52); }
.rack .tile { font-size: calc(var(--rw) * .52); }
.tile.c0 { color: var(--c0); } .tile.c1 { color: var(--c1); } .tile.c2 { color: var(--c2); } .tile.c3 { color: var(--c3); }
.tile::after { content: ""; position: absolute; bottom: 12%; left: 50%; width: 18%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; }
.tile.joker { color: var(--c1); font-size: calc(var(--tw) * .62); }
.rack .tile.joker { font-size: calc(var(--rw) * .62); }
.tile.joker::after { display: none; }
.tile.mv { touch-action: none; cursor: grab; }
.tile.fresh { box-shadow: 0 0 0 2px var(--accent), 0 2px 3px rgba(0,0,0,.35); }
.tile.last { box-shadow: 0 0 0 2px rgba(56,189,248,.55), 0 2px 3px rgba(0,0,0,.35); }
.tile.bad { background: linear-gradient(#ffe4e4, #f8c9c9); box-shadow: 0 0 0 2px var(--bad), 0 2px 3px rgba(0,0,0,.35); }
.tile.drawn { box-shadow: 0 0 0 2px var(--good), 0 2px 3px rgba(0,0,0,.35); }
.tile.sel { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--sel), 0 4px 6px rgba(0,0,0,.4); }
.tile.dragging { opacity: .25; }
.ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; display: flex; gap: 2px; will-change: transform; }
.ghost .tile { width: var(--gw); height: var(--gh); font-size: calc(var(--gw) * .52); box-shadow: 0 8px 16px rgba(0,0,0,.5); }
.ghost .tile.joker { font-size: calc(var(--gw) * .62); }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 75vh; display: flex; flex-direction: column; background: #0b1d15; border-top: 1px solid #2f5a46; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.5); padding-bottom: var(--safe-b); }
.sheet .sh { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sheet .sb { overflow: auto; padding: 8px 14px; flex: 1; }
.feed .it { padding: 3px 0; font-size: 14px; }
.feed .it.sys { color: var(--muted); font-size: 13px; }
.feed .it b { color: var(--accent); }
.chatform { display: flex; gap: 8px; padding: 8px 14px 10px; }
.chatform input { flex: 1; min-width: 0; }
.scores { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.scores td, .scores th { padding: 6px 4px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.scores th { color: var(--muted); font-weight: 500; font-size: 12px; }
.scores .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--good); } .minus { color: #fca5a5; }
.minirack { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.minirack .tile { width: 20px; height: 26px; font-size: 12px; letter-spacing: -.5px; }
.minirack .tile::after { display: none; }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
.modal { background: #0f271c; border: 1px solid #2f5a46; border-radius: 16px; padding: 16px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0 0 8px; }
.modal .btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.toast { position: fixed; left: 50%; top: calc(56px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -20px); z-index: 60; background: #f8fafc; color: #111; padding: 9px 14px; border-radius: 10px; font-size: 14px; max-width: 92vw; box-shadow: 0 6px 20px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #fee2e2; color: #7f1d1d; }
.net { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #7f1d1d; color: #fff; text-align: center; padding: 6px calc(6px + var(--safe-b)); font-size: 13px; }

@media (hover: hover) { .tile.mv:hover { filter: brightness(1.04); } }
@media (min-width: 900px) { .rackWrap { max-height: 34vh; } }

/* зритель: без подставки и кнопок хода */
.game.spect .rackWrap, .game.spect .controls { display: none; }

/* голосовой чат */
.vbtn.on { background: rgba(52,211,153,.28); }
.vbtn.muted { background: rgba(239,68,68,.28); }
.vbtn.wait { background: rgba(246,196,69,.25); animation: vpulse 1.2s ease-in-out infinite; }
@keyframes vpulse { 50% { opacity: .55; } }
.pl .vm { display: none; font-size: 11px; }
.pl.invoice .vm { display: inline; }
.pl.talk { box-shadow: 0 0 0 2px var(--good), 0 0 10px rgba(52,211,153,.6); }

/* вход и регистрация */
.tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; background: rgba(0,0,0,.25); border-radius: 12px; }
.tabs button { flex: 1; background: none; padding: 9px 10px; color: #b9d0c2; font-weight: 600; }
.tabs button.on { background: #2c5c45; color: #fff; }
.login .authcard .sub { text-align: left; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* лобби: рейтинг и турниры */
.lobby header .me { color: var(--ink); text-decoration: none; padding: 4px 2px; }
#myr { color: var(--accent); font-weight: 600; }
.scores.lb tr[data-act], .prow[data-act], .click { cursor: pointer; }
.scores tr.me td { background: rgba(246,196,69,.10); }
.scores.lb td:nth-child(2) { width: 60%; }
.tbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }
.tnew { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 10px; }
.tnew summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.tnew input { width: 100%; }
.card details.rules { margin-top: 8px; }

/* окна турнира и профиля — поверх любого экрана */
.lov { z-index: 45; align-items: flex-start; overflow: auto; }
.modal.wide { max-width: 560px; max-height: none; margin: auto 0; }
.modal .mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal .mh h2 { margin: 0; font-size: 19px; }
.modal h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 16px 0 4px; font-weight: 600; }
.modal .tour { margin: 6px 0 10px; }
.modal .tour .tcard:first-of-type { border-top: 1px solid rgba(255,255,255,.06); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.stats > div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.stats b.big { font-size: 24px; color: var(--accent); }
.stats span { font-size: 12px; color: var(--muted); }

/* приглашение за стол */
.invhint { background: rgba(246,196,69,.14); border: 1px solid rgba(246,196,69,.35); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; text-align: left; }
.invrow { display: flex; gap: 8px; }
.invrow input { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.prow .kick { float: right; padding: 0 6px; }

/* ---- без интернета: на одном телефоне и рядом по Bluetooth ---- */
.offline { margin-top: 26px; }
.lobby .offline .wait-actions { margin-top: 4px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.handoff { position: fixed; inset: 0; z-index: 45; background: radial-gradient(circle at 50% 30%, var(--felt2), var(--bg) 75%); display: flex; align-items: center; justify-content: center; padding: calc(20px + var(--safe-t)) 20px calc(20px + var(--safe-b)); text-align: center; }
.hcard { max-width: 360px; width: 100%; }
.hcard h2 { font-size: 28px; margin: 6px 0 10px; }
.hcard .hpl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 22px; }
.hcard .hpl span { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.07); color: var(--muted); }
.hcard .hpl span.on { color: #1b1300; background: var(--accent); font-weight: 600; }
.hcard button.big { width: 100%; font-size: 18px; padding: 16px; }
.hcard .link { margin-top: 18px; }
.game.hs [data-act="feed"] { display: none; }
.qr { background: #fff; border-radius: 12px; padding: 10px; width: min(260px, 70vw); margin: 4px auto 6px; line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; }
.center { text-align: center; }
.pinbig { font-size: 26px; letter-spacing: 4px; color: var(--accent); }
input.pin { width: 76px; text-align: center; letter-spacing: 3px; }
.tbtns { align-items: center; }

/* правила, жалобы, блокировка */
label.chk { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 14px; line-height: 1.35; margin: 6px 0 2px; cursor: pointer; }
label.chk input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: #2e7d4f; }
label.chk a, .docs a { color: inherit; text-decoration: underline; }
.docs { margin-top: 14px; line-height: 1.7; }
.langs { margin-top: 2px; line-height: 1.7; }
.langs a { color: inherit; text-decoration: underline; }
.langs b { color: var(--fg, inherit); }
.feed .rep, .prow .rep { font-size: 13px; opacity: .55; padding: 0 4px; margin-left: 2px; text-decoration: none; }
.feed .rep:hover, .prow .rep:hover { opacity: 1; }
.feed b.click { cursor: pointer; }
#menuPeers .prow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
#menuPeers .prow .nm { flex: 1 1 auto; }

/* игра с ботами и обучение */
.tilebtns.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tilebtns.three .tilebtn { flex-direction: column; gap: 4px; font-size: 13px; padding: 8px 6px; }
.learnbtn { display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(255,255,255,.04); color: var(--ink); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; min-height: 46px; font-weight: 600; font-size: 14px; }
.learnbtn svg, .learn2 svg { color: var(--accent); flex: 0 0 auto; }
.learn2 { display: flex; align-items: center; gap: 10px; width: 100%; background: none; color: var(--ink); text-align: left; padding: 2px 0; font-weight: 600; }
.game.solo .hbtns { display: none; }
.fld { display: grid; gap: 6px; margin: 0 0 12px; }
.fld .fl { font-size: 13px; color: var(--muted); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.seg button { background: rgba(255,255,255,.05); border: 1px solid #2f5a46; border-radius: 10px; padding: 10px 6px; color: var(--ink); font-weight: 700; }
.seg button.on { background: rgba(246,196,69,.14); border-color: var(--accent); color: var(--accent); }
.seg.lv { grid-auto-flow: row; }
.seg.lv button { display: grid; gap: 2px; text-align: left; padding: 9px 12px; }
.seg.lv button span { font-weight: 400; font-size: 12px; color: var(--muted); }
.coach { flex: 0 0 auto; background: #12341f; border-bottom: 1px solid rgba(246,196,69,.35); padding: 7px 12px 9px; font-size: 14px; line-height: 1.35; }
.coach .ch { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; }
.coach .ch .sub { flex: 1; }
.coach .ch .x { margin-left: auto; text-decoration: none; padding: 0 4px; font-size: 16px; }
.coach .ch .skip { padding: 0 2px; font-size: 13px; white-space: nowrap; }
.coach p { margin: 3px 0 0; }
.coach .cb { display: flex; gap: 8px; margin-top: 7px; align-items: center; }
.tile.hint { animation: hintpulse 1.2s ease-in-out infinite; }
@keyframes hintpulse { 0%, 100% { box-shadow: 0 0 0 2px var(--accent), 0 2px 3px rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 5px rgba(246,196,69,.35), 0 2px 3px rgba(0,0,0,.35); } }
button.hint { animation: btnpulse 1.2s ease-in-out infinite; }
@keyframes btnpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(246,196,69,0); } 50% { box-shadow: 0 0 0 5px rgba(246,196,69,.45); } }
@media (prefers-reduced-motion: reduce) { .tile.hint, button.hint { animation: none; box-shadow: 0 0 0 3px var(--accent); } }

/* ---- лобби с вкладками снизу, комната ожидания, меню стола, лист правил, подтверждение (10.11.2026) ---- */
.lb2 { max-width: 560px; padding: calc(14px + var(--safe-t)) 16px calc(100px + var(--safe-b)); }
.lb2 .lmain { display: flex; flex-direction: column; gap: 18px; }
.lhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.lhead h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.lsec { display: flex; flex-direction: column; gap: 8px; }
.lsec h2 { margin: 0; font-size: 15px; font-weight: 700; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.lrow2 { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 64px; padding: 10px 12px 10px 14px; border-radius: 16px; background: var(--felt); color: var(--ink); text-align: left; font: inherit; }
.lrow2.tw { flex-wrap: wrap; }
.lrow2 .rt { display: flex; flex-direction: column; gap: 3px; flex: 1 1 180px; min-width: 0; }
.lrow2 .rt b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow2 .rt > span { font-size: 13px; color: #cfe3d6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow2 .rt .pill { align-self: flex-start; margin-top: 2px; }
.lrow2 > svg { flex: 0 0 auto; color: #9db8a8; }
.lrow2.my { background: #1f5038; box-shadow: inset 0 0 0 1.5px var(--accent); }
.lrow2 .tt { font-variant-numeric: tabular-nums; }
.lrow2 .tt.low { color: var(--bad); font-weight: 700; }
.mypill { flex: 0 0 auto; display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: #1b1300; font-size: 13px; font-weight: 700; white-space: nowrap; }
.mypill .tt.low { color: #9b1c1c; }
.lrow2 .ub { flex: 0 0 auto; min-width: 18px; height: 18px; box-sizing: border-box; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; padding: 0 5px; text-align: center; }
.lrow2 button.sm, .lrow2 .tbtns button { height: 40px; padding: 0 16px; border-radius: 12px; flex: 0 0 auto; }
.lrow2 .pill { flex: 0 0 auto; }
.newt { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 14px; font-size: 17px; }
.offtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.offtiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.offt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 8px 4px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; }
.lwho { margin: 0; }
.lb2 .empty { padding: 4px 2px; }
.lb2 details.rules { padding: 0 2px; }
.lb2 .tnew { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--felt); border: 0; }
.lb2 .tnew .row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lb2 .tnew label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); flex: 1 1 140px; min-width: 0; }
.lb2 .tnew select, .lb2 .tnew input { width: 100%; min-width: 0; }
/* нижние вкладки */
.ltabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 6px 8px calc(6px + var(--safe-b)); background: #0a1a13; border-top: 1px solid rgba(255,255,255,.08); }
.ltb { position: relative; flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; background: none; border-radius: 10px; color: #9db8a8; font-size: 11px; font-weight: 600; }
.ltb.on { color: var(--accent); }
.ltb:active { transform: none; background: rgba(255,255,255,.05); }
.ltb-dot { position: absolute; top: 2px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px #0a1a13; }
/* списки-группы, как настройки в телефоне */
.grp { border-radius: 14px; background: var(--felt); overflow: hidden; }
.gi { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px; border-radius: 0; background: none; color: var(--ink); font-size: 16px; text-align: left; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07); }
.gi:last-child { border-bottom: 0; }
.gi:active { transform: none; background: rgba(255,255,255,.05); }
.gi > svg { flex: 0 0 auto; color: #9db8a8; }
.gi .gv { margin-left: auto; color: #9db8a8; font-size: 15px; }
.gi.red { color: #f87171; }
.gbadge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 99px; background: var(--bad); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
details.gi { display: block; padding: 0; }
details.gi > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; box-sizing: border-box; cursor: pointer; list-style: none; }
details.gi > summary::-webkit-details-marker { display: none; }
details.gi > summary svg { flex: 0 0 auto; color: #9db8a8; }
details.gi > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid #9db8a8; border-bottom: 2px solid #9db8a8; transform: rotate(45deg); transition: transform .2s; }
details.gi[open] > summary::after { transform: rotate(-135deg); }
.gbody { padding: 0 14px 12px; }
.gbody p { margin: 6px 0; font-size: 14px; line-height: 1.45; color: #d9e8df; }
.glang .langs2 { margin-left: auto; font-size: 15px; color: #9db8a8; }
.glang .langs2 a { color: inherit; }
.glang .langs2 b { color: var(--ink); }
.ghd { margin: 2px 0 -10px 14px; font-size: 13px; font-weight: 600; color: #9db8a8; }
.gnote { margin: -6px 4px 0; }
.sw { position: relative; flex: 0 0 auto; margin-left: auto; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.18); transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.sw.on { background: var(--good); }
.sw.on::after { transform: translateX(20px); }
.tgl .tl { display: flex; flex-direction: column; gap: 2px; }
.tgl .tl small { font-size: 13px; color: #9db8a8; }
/* профиль и аватарки-фишки */
.ava { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(var(--tile), var(--tile2)); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(0,0,0,.35); }
.ava.c0 { color: var(--c0); } .ava.c1 { color: var(--c1); } .ava.c2 { color: var(--c2); } .ava.c3 { color: var(--c3); }
.mecard { display: flex; align-items: center; gap: 14px; width: 100%; padding: 4px 2px; background: none; color: var(--ink); text-align: left; }
.mecard:active { transform: none; }
.mecard .mt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mecard .mt b { font-size: 19px; }
.mecard .mt span { font-size: 14px; color: #cfe3d6; }
.mecard > svg { color: #9db8a8; flex: 0 0 auto; }
#lme .stats { margin: 12px 0 0; }
#lme .stats > div { background: var(--felt); }
/* рейтинг: тройка лидеров фишками на подставке */
#lrating { gap: 14px; }
.podium { display: flex; align-items: flex-end; gap: 8px; padding: 16px 8px 14px; border-radius: 18px; background: linear-gradient(var(--wood), var(--wood2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.pod { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; padding: 0; color: var(--ink); }
.pod.p1 { padding-bottom: 14px; }
.pod b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod > span:last-child { font-size: 13px; color: #f1e2cc; font-variant-numeric: tabular-nums; }
.ptile { width: 46px; height: 60px; border-radius: 8px; background: linear-gradient(var(--tile), var(--tile2)); box-shadow: inset 0 1px 0 #fff, 0 3px 5px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.pod.p1 .ptile { width: 54px; height: 70px; font-size: 32px; }
.ptile.c1 { color: var(--c1); } .ptile.c2 { color: var(--c2); } .ptile.c3 { color: var(--c3); }
.mycard { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 16px; background: #1f5038; box-shadow: inset 0 0 0 1.5px var(--accent); text-align: left; color: var(--ink); }
.mycard .mct { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.mycard .mct b { font-size: 16px; }
.mycard .mct span { font-size: 13px; color: #cfe3d6; }
.mycard b.big { font-size: 24px; font-weight: 800; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 0; background: none; color: var(--ink); font-size: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); }
.lrow:last-child { border-bottom: 0; }
.lrow:active { transform: none; background: rgba(255,255,255,.05); }
.lrow .n { width: 24px; color: #9db8a8; font-variant-numeric: tabular-nums; }
.lrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .r { font-variant-numeric: tabular-nums; }
.lrow.me { background: rgba(246,196,69,.10); }
#lrating > .link { align-self: flex-start; }
/* переключатель столов: первая кнопка — назад в лобби */
.tab.home { gap: 3px; padding-left: 8px; color: var(--accent); font-weight: 600; }
.tab.home svg { flex: 0 0 auto; }
/* комната ожидания */
.wait2 { display: flex; flex-direction: column; gap: 18px; max-width: 560px; padding-bottom: calc(150px + var(--safe-b)); }
.wait2 > .tabs-bar { margin-bottom: -10px; }
.whead h1 { margin: 6px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.whead .sub { margin: 4px 0 0; font-size: 14px; }
.seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seat { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; box-sizing: border-box; padding: 8px 10px; border-radius: 14px; background: var(--felt); color: var(--ink); cursor: pointer; }
.seat .ava { width: 38px; height: 38px; font-size: 17px; }
.seat .dot { position: absolute; left: 39px; top: 38px; margin: 0; box-shadow: 0 0 0 2px var(--felt); }
.seat .st { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.seat .st b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .st span { font-size: 12px; color: #cfe3d6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .kick { flex: 0 0 auto; padding: 6px 8px; color: #9db8a8; text-decoration: none; }
.seat.empty { justify-content: center; gap: 6px; background: none; border: 1.5px dashed rgba(255,255,255,.22); color: #cfe3d6; font-size: 14px; font-weight: 600; cursor: default; }
button.seat.empty { cursor: pointer; }
.sech { display: flex; align-items: baseline; justify-content: space-between; }
.ylink { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; padding: 4px 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills .pill { font-size: 13px; padding: 6px 11px; color: #e2efe7; background: rgba(255,255,255,.07); }
.wshare { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border-radius: 14px; font-size: 16px; font-weight: 600; background: rgba(255,255,255,.1); }
#winvbox { display: flex; flex-direction: column; gap: 8px; }
#winvbox .sub { margin: 0; }
.wfeed { max-height: 22vh; overflow: auto; }
.wait2 .chatform { padding: 2px 0 0; }
.wbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 560px; margin: 0 auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px calc(10px + var(--safe-b)); background: linear-gradient(180deg, rgba(13,34,25,0), #0a1a13 30%); }
.wbar #wstart { height: 54px; border-radius: 14px; font-size: 18px; }
.wbar #wstart:disabled { opacity: 1; background: rgba(255,255,255,.08); color: var(--muted); font-size: 15px; font-weight: 600; }
.wbar2 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
button.plain { height: 46px; background: none; font-size: 15px; font-weight: 600; color: var(--ink); }
button.plain.red { color: #f87171; }
/* меню стола: выйти — отдельно и красным */
.sheet .shh { min-width: 0; display: grid; gap: 2px; }
.sheet .sb .grp { margin: 6px 0 10px; background: rgba(255,255,255,.06); }
.mdanger { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 8px; }
.mdanger button { height: 50px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.mdanger .dz { background: rgba(239,68,68,.15); color: #f87171; }
.mdanger .sub { margin: -2px 0 0; text-align: center; }
button.round { width: 36px; height: 36px; padding: 0; border-radius: 50%; flex: 0 0 auto; }
/* лист «Новый стол» / «Правила стола» */
.tsh { position: fixed; inset: 0; z-index: 46; }
.tsh-back { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.tsh-card { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92vh; overflow: auto; box-sizing: border-box; padding: 8px 18px calc(18px + var(--safe-b)); border-radius: 22px 22px 0 0; background: #112d21; box-shadow: 0 -10px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 16px; }
.grab { align-self: center; width: 40px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.25); flex: 0 0 auto; }
.tsh-h { display: flex; align-items: center; justify-content: space-between; margin-top: -4px; }
.tsh-h h2 { margin: 0; font-size: 20px; font-weight: 800; }
.tsh .fld { margin: 0; }
.tsh .fld .fl { font-size: 14px; font-weight: 600; color: #cfe3d6; }
.tsh .fld .sub { margin: 2px 0 0; }
.tsh .seg button { padding: 10px 2px; white-space: nowrap; }
.tsh .seg button:disabled { opacity: .3; }
.tsh .grp { background: rgba(255,255,255,.06); }
.tsh button.big { height: 54px; border-radius: 14px; font-size: 18px; flex: 0 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .tsh-card { animation: shup .28s cubic-bezier(.16,1,.3,1); }
  @keyframes shup { from { transform: translateY(48px); opacity: .5; } to { transform: none; opacity: 1; } }
  .dlg-card { animation: dlgin .2s cubic-bezier(.16,1,.3,1); }
  @keyframes dlgin { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
}
/* подтверждение */
.dlg { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dlg-card { width: 100%; max-width: 300px; border-radius: 18px; background: #16372a; box-shadow: 0 20px 50px rgba(0,0,0,.55); overflow: hidden; text-align: center; }
.dlg-b { padding: 20px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.dlg-b b { font-size: 18px; }
.dlg-b p { margin: 0; font-size: 14px; line-height: 1.4; color: #cfe3d6; }
.dlg-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.1); }
.dlg-btns button { height: 50px; border-radius: 0; background: none; font-size: 17px; font-weight: 600; }
.dlg-btns button + button { border-left: 1px solid rgba(255,255,255,.1); }
.dlg-btns .red { color: #f87171; }
.dlg-btns .y { color: var(--accent); font-weight: 700; }
.modal .mfl { display: grid; gap: 6px; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.modal .mfl input { width: 100%; box-sizing: border-box; }
.dlg-btns button { padding: 0 8px; }
#lme .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#lme .stats > div { padding: 8px; }
#lme .stats b { font-size: 17px; }
#lme .stats span { font-size: 11px; line-height: 1.25; }
.glang .langs2 { margin-top: 0; line-height: inherit; }

/* ---- масштаб и друзья (10.11.2026): быстрая игра, фильтр, рейтинг с поиском, друзья, переписка ---- */
.playbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.playbtns span { white-space: nowrap; }
.playbtns button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 14px; font-size: 17px; }
.playbtns .newt { background: rgba(255,255,255,.1); font-weight: 600; font-size: 16px; height: 54px; }
.seg.mini { display: inline-grid; grid-auto-columns: auto; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.07); }
.seg.mini button { min-width: 34px; height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: none; color: #cfe3d6; font-size: 13px; font-weight: 700; }
.seg.mini button.on { background: var(--accent); color: #1b1300; border-color: transparent; }
.sech { gap: 10px; align-items: center; }
.livebtn > svg:first-child { color: var(--accent); }
.livebtn .rt b { font-size: 15px; }
.tsecs { display: flex; flex-direction: column; gap: 18px; }
#lrating > .link, #ltables > .link { align-self: flex-start; padding: 4px 2px; color: var(--accent); text-decoration: none; font-weight: 600; }
input.lsearch { width: 100%; box-sizing: border-box; height: 44px; border-radius: 12px; font-size: 16px; padding: 0 14px; }
.ava.sm { width: 40px; height: 40px; font-size: 18px; }
.avaw { position: relative; flex: 0 0 auto; display: inline-flex; }
.avaw .dot { position: absolute; right: -1px; bottom: 0; margin: 0; width: 11px; height: 11px; box-shadow: 0 0 0 2px var(--felt); }
.lrow2.fr.un .rt b { color: var(--ink); }
.lrow2.fr.un .rt > span { color: var(--ink); font-weight: 600; }
.lrow2 .sq { width: 40px; padding: 0; }
.plainbtn { background: none; padding: 0; color: inherit; text-align: left; font: inherit; }
.plainbtn:active { transform: none; }
.tab.home { position: relative; }
.tab.home .hdot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.tsh .lsearch { flex: 0 0 auto; }
#tshlist { min-height: 60px; }
#tshlist .wshare { margin-top: 4px; }
/* переписка */
.dmv { height: 100vh; height: 100dvh; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; }
.dmh { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: calc(6px + var(--safe-t)) 8px 8px; background: #0a1a13; border-bottom: 1px solid rgba(255,255,255,.06); }
.dmh .nb { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px 0 2px; background: none; color: var(--accent); font-weight: 600; }
.dmwho { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; padding: 2px 4px; color: var(--ink); text-align: left; }
.dmwho:active { transform: none; }
.dmt { display: flex; flex-direction: column; min-width: 0; }
.dmt b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmt span { font-size: 12px; color: #9db8a8; }
.dmlist { flex: 1; overflow: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.dmday { align-self: center; margin: 8px 0 2px; padding: 2px 10px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: 12px; color: #9db8a8; }
.dmm { display: flex; }
.dmm.me { justify-content: flex-end; }
.dmb { max-width: 80%; padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: var(--felt); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.dmm.me .dmb { border-radius: 16px 16px 4px 16px; background: #3a5f2c; }
.dmtime { align-self: flex-end; font-size: 11px; color: #9db8a8; }
.dmtime .rep { font-size: 11px; padding: 0 2px; }
.dminv { display: flex; flex-direction: column; gap: 4px; }
.dminv button { margin-top: 4px; height: 38px; border-radius: 10px; }
.dmform { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 10px calc(8px + var(--safe-b)); background: #0a1a13; border-top: 1px solid rgba(255,255,255,.06); }
.dmform input { flex: 1; min-width: 0; height: 44px; box-sizing: border-box; border-radius: 22px; padding: 0 16px; font-size: 16px; }
.dmform button { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.dmlist .empty, .dmlist .sub { margin: auto 0; }
@media (max-width: 360px) { .ltb { font-size: 10px; } .playbtns { grid-template-columns: 1fr 1fr; } }

/* ===== 10.11.2026, после разбора четырёх критиков: иерархия, доступность, игровой характер ===== */
/* фокус с клавиатуры, границы полей заметнее (3:1) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { border-color: #4f7d66; }
.vh { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
h1, h2, .tsh-h h2 { text-wrap: balance; }
.ic { display: inline-flex; vertical-align: -2px; margin-right: 5px; color: #cfe3d6; }

/* контраст: красный текст и бейджи */
.gi.red, button.plain.red, .dlg-btns .red { color: #fca5a5; }
.badge, .tab .ub, .lrow2 .ub { background: #dc2626; }
.status .timer.low, .tab .tt.low, .lrow2 .tt.low { color: #f87171; }

/* главная кнопка — объёмная, как фишка; «ещё нельзя» — контуром, а не полупрозрачной */
button.primary:not(.sm):not(.wait):not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 0 #a8801a, 0 6px 14px rgba(0,0,0,.25); }
button.primary:not(.sm):not(.wait):not(:disabled):active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 #a8801a; }
button.primary.wait { background: none; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
button.join, .lrow2 button.join { background: none; color: var(--accent); box-shadow: inset 0 0 0 1.5px rgba(246,196,69,.6); font-weight: 700; }

/* выбранный вариант — кремовая фишка; жёлтый остаётся только у действий */
.seg button.on, .seg.mini button.on, .tabs button.on {
  background: linear-gradient(var(--tile), var(--tile2)); color: #14231b; border-color: transparent; box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(0,0,0,.35); }
.tsh .seg button { white-space: normal; line-height: 1.2; }
.lrow.me { background: rgba(255,255,255,.07); }
.lrow.me .nm, .lrow.me .r { color: var(--accent); font-weight: 700; }
.lrow .avaw .ava.sm { width: 30px; height: 30px; font-size: 14px; }

/* типографика: заголовок раздела крупнее строки */
.lsec h2 { font-size: 17px; }
.lrow2 .rt b { font-weight: 600; }
.whead h1 { font-size: 30px; letter-spacing: -.02em; }
.modal h3, .card h2 { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700; color: var(--ink); }

/* всплывашка — тёмная; в лобби и переписке у нижнего края над вкладками, в партии — над доской; закрывается касанием */
.toast { background: #1f4a36; color: var(--ink); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.5); padding: 11px 16px; line-height: 1.35; text-align: center; }
.toast.on { pointer-events: auto; cursor: pointer; }
.toast.err { background: #4a1d1d; color: #fecaca; }
.toast[data-scr="low"] { top: auto; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 16px); }
.toast[data-scr="low"].on { transform: translate(-50%, 0); }
.toast[data-scr="game"] { top: calc(118px + var(--safe-t)); }
/* «нет связи» — сверху, не закрывает вкладки и кнопки */
.net { top: 0; bottom: auto; padding: calc(6px + var(--safe-t)) 6px 6px; }

/* плашка сверху: значок линией */
.turnbar button svg { flex: 0 0 auto; }
.turnbar button b + .nm { margin-left: 4px; font-weight: 400; }

/* нижние вкладки: у выбранной — «пилюля» под значком */
.ltb svg { box-sizing: content-box; padding: 3px 16px; border-radius: 99px; transition: background .2s; }
.ltb.on svg { background: rgba(246,196,69,.16); }
.ltb-dot { top: 0; left: calc(50% + 12px); }
.ltb-dot.y, #ldot_tours { background: var(--accent); }

/* верхние вкладки столов — выше, удобнее попадать */
.tab { min-height: 36px; box-sizing: border-box; }
.tab .ic { margin-right: 0; }
.tab .ts svg { vertical-align: -2px; }

/* партия: шапка */
.gh .icon { position: relative; min-width: 44px; min-height: 40px; padding: 0 8px; display: grid; place-items: center; color: #cfe3d6; font-size: 17px; }
.pl.click { cursor: pointer; }
.pl .vm svg { vertical-align: -1px; }
.pool { display: inline-flex; align-items: center; gap: 3px; }
.pool::before { content: ""; display: inline-block; width: 9px; height: 12px; border-radius: 2px; background: var(--tile); box-shadow: 2px -2px 0 var(--tile2), 4px -4px 0 #cdbf9c; margin: 4px 9px 0 0; }

/* строка статуса: до двух строк, выход «0/30» отдельной плашкой, таймер крупнее на своём ходу, полоска времени */
.status { position: relative; min-height: 34px; }
.status .msg { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.status .need { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; background: linear-gradient(var(--tile), var(--tile2)); color: #1b1300; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.status .need small { font-size: 11px; font-weight: 600; opacity: .75; }
.status .timer { flex: none; }
.status::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--tp, 0) * 100%); background: var(--accent); opacity: .85; transition: width 1s linear; }
.game.myturn .status { background: linear-gradient(90deg, rgba(246,196,69,.18), transparent 75%), #0f271c; }
.game.myturn .status .timer { color: var(--accent); font-size: 17px; font-weight: 700; }
.game.myturn .status .timer.low { color: #f87171; }
.game.myturn .rackWrap { box-shadow: inset 0 2px 0 var(--accent), 0 -2px 8px rgba(0,0,0,.4); }

/* стол: размер — плавающими кнопками в правом нижнем углу (щипок тоже работает) */
.boardBox { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.boardBox .boardWrap { flex: 1 1 auto; min-height: 0; }
.zoomf { position: absolute; right: 10px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.zoomf button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(10,26,19,.8); color: #cfe3d6; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.zoomf button.on { color: var(--accent); }

/* управление: кнопки не меньше 44 px */
.controls { gap: 6px; }
.controls button { min-height: 44px; padding: 0 12px; }
.controls .undo { width: 44px; padding: 0; display: grid; place-items: center; }
.controls .sortb { display: flex; align-items: center; gap: 5px; padding: 0 10px; font-size: 13px; font-weight: 700; }
@media (max-width: 400px) { .controls .sortb svg { display: none; } .controls button { padding: 0 8px; } .controls { gap: 4px; padding-left: 5px; padding-right: 5px; } .controls .sp { min-width: 0; } }

/* последний ход соперника — пунктиром (не путать со своим выбором) */
.tile.last { box-shadow: 0 2px 3px rgba(0,0,0,.35); outline: 2px dashed rgba(125,211,252,.95); outline-offset: 1px; }

/* фишки для дальтоников: у каждого цвета свой знак под числом */
html.cb { --c3: #c26a00; }
html.cb .tile::after { opacity: .9; }
html.cb .tile.c0::after { border-radius: 1px; }
html.cb .tile.c1::after { background: currentColor; }
html.cb .tile.c2::after { border-radius: 1px; transform: translateX(-50%) rotate(45deg); width: 15%; }
html.cb .tile.c3::after { border: 0; border-radius: 0; background: currentColor; width: 22%; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
html.cb .minirack .tile::after { display: block; bottom: 8%; }
/* крупный текст: лобби, профили, переписка */
html.big .lmain, html.big .whead, html.big .wait2 > .lsec, html.big .dmlist, html.big #lov .modal { zoom: 1.12; }

/* окно подтверждения: «безопасная» кнопка слева, действие справа; чипы причин, поле, галочка */
.dlg-card.rich { max-width: 340px; text-align: left; }
.dlg-card.rich .dlg-b b { text-align: center; }
.dlg-card.rich .dlg-b p { text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { min-height: 36px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 14px; font-weight: 600; }
.chip.on { background: linear-gradient(var(--tile), var(--tile2)); color: #14231b; }
#dlgIn { width: 100%; box-sizing: border-box; resize: none; font: inherit; font-size: 15px; color: var(--ink); background: #0b1d15; border: 1px solid #4f7d66; border-radius: 10px; padding: 10px; }
.dlg-card .chk { color: #cfe3d6; }

/* жалоба ⚑ — попасть пальцем */
.rep { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; margin: -8px 0; padding: 0; opacity: .85; vertical-align: middle; color: #9db8a8; }
.feed .rep, .prow .rep { opacity: .85; padding: 0; }

/* лобби: первый запуск, новичок, друзья в сети, кнопки с подписями */
.firstrun { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 6px; }
.firstrun button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border-radius: 14px; font-size: 17px; }
.playbtns button { height: 64px; }
.pbt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.pbt small { font-size: 12px; font-weight: 500; opacity: .8; }
.nbcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 48px 14px 14px; border-radius: 16px; background: #1f5038; }
.nbt { display: flex; flex-direction: column; gap: 3px; }
.nbt span { font-size: 13px; color: #cfe3d6; }
.nbb { display: flex; gap: 8px; flex-wrap: wrap; }
.nbb button { height: 40px; padding: 0 16px; border-radius: 12px; }
.nbx { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; background: none; color: #9db8a8; }
.frstrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.frstrip::-webkit-scrollbar { display: none; }
.frchip { flex: 0 0 auto; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0; background: none; font-size: 12px; color: #cfe3d6; }
.frchip > span:last-child { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frchip .avaw .dot { box-shadow: 0 0 0 2px var(--bg); }
.dot.play { background: var(--accent); }
.sto { color: var(--good); }
.stp { color: var(--accent); }

/* открытые столы — одним списком; места — мини-фишками */
.olist { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--felt); }
.olist .lrow2 { border-radius: 0; background: none; border-bottom: 1px solid rgba(255,255,255,.06); }
.olist .lrow2:last-child { border-bottom: 0; }
.otl { display: flex !important; align-items: center; gap: 8px; }
.otl > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pips { display: inline-flex; gap: 3px; flex: 0 0 auto; }
.pips i { width: 8px; height: 11px; border-radius: 2px; box-shadow: inset 0 0 0 1.2px rgba(253,246,227,.5); }
.pips i.on { background: var(--tile); box-shadow: none; }

/* пустые места — мини-подставка с фишками */
.emptyst { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; text-align: center; color: #cfe3d6; }
.emptyst p { margin: 0; max-width: 34ch; font-size: 14px; line-height: 1.4; }
.minirack.wood { margin: 0; gap: 3px; padding: 5px 7px; border-radius: 8px; background: linear-gradient(var(--wood), var(--wood2)); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.emptyst .minirack .tile { width: 24px; height: 31px; font-size: 14px; }

/* комната ожидания: поиск соперников, низ без шва */
.wsearch { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: #1f5038; box-shadow: inset 0 0 0 1.5px rgba(246,196,69,.5); }
.wsearch .sub { margin: 0; }
.wsr { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.wsr .wt { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
.spin { flex: 0 0 auto; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; border: 2.5px solid rgba(246,196,69,.3); border-top-color: var(--accent); }
.wbots { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wbots span { flex: 1 1 160px; font-size: 14px; }
.wbots button { height: 40px; padding: 0 16px; border-radius: 12px; }
.wbar { padding-top: 32px; background: linear-gradient(180deg, rgba(13,34,25,0), #0d2219 45%); }
#winvbox .link { display: block; margin: 4px auto 0; }

/* итоги партии */
.modal.res { text-align: center; }
.modal.res .scores { text-align: left; }
.modal.res h2 { font-size: 24px; margin: 4px 0 6px; }
.rdelta { display: flex; flex-direction: column; align-items: center; margin: 0 0 6px; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rdelta small { font-size: 13px; font-weight: 500; color: var(--muted); }
.rbtns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rbtns button.big { height: 50px; border-radius: 14px; font-size: 17px; }
.wintiles { display: flex; justify-content: center; gap: 6px; margin: 2px 0 10px; }
.wintiles .lt { width: 34px; height: 44px; font-size: 24px; position: relative; }
.wintiles .lt::after, .ptile::after { content: ""; position: absolute; bottom: 9%; left: 50%; width: 16%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; }
.ptile { position: relative; }
.nmb { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }

/* профиль игрока */
.phead { display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; }
.ava.big { width: 60px; height: 60px; font-size: 28px; }
.phead .pt { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; color: #cfe3d6; }
.phead .bad { color: #fca5a5; }
.stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pextra { margin: 4px 0 12px; }
#lov .grp { margin: 10px 0; }
.gi.y { color: var(--accent); font-weight: 700; }
.gi .link { margin-left: auto; }
.modal .mh .round { flex: 0 0 auto; }

/* вкладка «Профиль»: язык переключателем */
.glang .langs2.seg.mini { margin-left: auto; font-size: 13px; }
.glang .langs2.seg.mini button { height: 32px; }

/* переписка: своё облачко не в оливу, время читается */
.dmm.me .dmb { background: #245a40; }
.dmm.me .dmtime { color: #cfe3d6; }
.dmh #dmplay { margin-left: auto; flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 12px; }

/* движение: только новое и редкое, кривая ease-out; при «уменьшить движение» — ничего */
@media (prefers-reduced-motion: no-preference) {
  .tile.land { animation: rkland .26s cubic-bezier(.16,1,.3,1); }
  .rack .tile.land { animation: rkdraw .3s cubic-bezier(.16,1,.3,1); }
  @keyframes rkland { from { transform: translateY(-10px) scale(1.06); box-shadow: 0 10px 16px rgba(0,0,0,.45); } }
  @keyframes rkdraw { from { transform: translateY(-28px); opacity: 0; } }
  .status.turnin { animation: rkturn .7s ease-out; }
  @keyframes rkturn { from { box-shadow: inset 0 0 0 999px rgba(246,196,69,.45); } }
  button.primary.ready { animation: rkready .24s cubic-bezier(.16,1,.3,1); }
  @keyframes rkready { 50% { transform: scale(1.05); } }
  .badge.on, .ltb-dot:not(.hidden), .lrow2 .ub { animation: rkpop .22s cubic-bezier(.16,1,.3,1); }
  @keyframes rkpop { from { transform: scale(.5); opacity: 0; } }
  .wintiles.anim .lt { animation: rkwin .7s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i) * 60ms + 80ms); }
  @keyframes rkwin { from { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
  .spin { animation: rkspin 1s linear infinite; }
  @keyframes rkspin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* после проверки: низ комнаты ожидания непрозрачный под кнопкой, крупный текст на 360 px, окно уже не тесное */
.wbar { background: linear-gradient(180deg, rgba(13,34,25,0), #0d2219 30px); }
.wbar #wstart:disabled { background: #1d3a2d; color: #9db8a8; opacity: 1; }
html.big .playbtns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
html.big .playbtns span, html.big .pbt { white-space: normal; }
.dlg-card { max-width: 320px; }
.dlg-btns button { font-size: 16px; }
.selurl { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #0b1d15; font-size: 13px; word-break: break-all; user-select: all; -webkit-user-select: all; color: var(--ink); }

/* 10.11.2026, Bluetooth-стол: окно с QR-кодом посреди партии */
.dlg-btns.one { grid-template-columns: 1fr; }
.dlg-b .qr { width: min(220px, 60vw); }
.dlg-b .relink { display: block; margin: 8px auto 0; font-size: 13px; }

/* 11.11.2026: заставка при запуске у того, кто уже входил (вместо мелькания стартовой страницы) */
.splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 24px; }
.sload { display: flex; gap: 9px; height: 20px; align-items: flex-end; }
.sload i { width: 11px; height: 11px; border-radius: 3px; background: currentColor; opacity: .8; }
.sload i.c1 { color: var(--c1); } .sload i.c2 { color: var(--c2); } .sload i.c3 { color: var(--c3); }
@media (prefers-reduced-motion: no-preference) {
  .sload i { animation: sload 1.1s cubic-bezier(.45,0,.55,1) infinite; animation-delay: calc(var(--k, 0) * 140ms + 500ms); opacity: .6; }
  .sload i.c2 { --k: 1; } .sload i.c3 { --k: 2; }
  @keyframes sload { 0%, 60%, 100% { transform: translateY(0); opacity: .6; } 30% { transform: translateY(-8px); opacity: 1; } }
}

/* шифрование личных сообщений, фото, пересылка (12.11.2026) */
.dmform .att { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #cfe3d6; }
.dmform.busy .att { opacity: .45; pointer-events: none; }
.dmsec { align-self: center; max-width: 92%; margin: 2px 0 6px; padding: 6px 12px; border-radius: 12px; background: rgba(246,196,69,.08); color: #e8d9a8; font-size: 12px; line-height: 1.35; text-align: center; }
.dmsys { align-self: center; max-width: 92%; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: 12px; color: #9db8a8; text-align: center; }
.dmenc { color: #9db8a8; font-style: italic; }
.dmfw { font-size: 12px; color: #9db8a8; }
.dmwarn { font-size: 11px; color: #fca5a5; }
.dmtime { display: inline-flex; align-items: center; gap: 4px; }
.dmimg { display: block; width: 220px; max-width: 100%; padding: 0; margin: 2px 0; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.25); }
.dmimg:active { transform: none; }
.dmimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dmimg span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 13px; color: #9db8a8; }
.dmlockbar { flex: 0 0 auto; padding: 8px 10px calc(8px + var(--safe-b)); background: #0a1a13; border-top: 1px solid rgba(255,255,255,.06); }
.dmlock { padding: 16px; border-radius: 16px; background: #16372a; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.dmlock b { font-size: 17px; }
.dmlock p { margin: 0; font-size: 14px; line-height: 1.4; color: #cfe3d6; }
.dmlock > button { height: 46px; border-radius: 12px; }
.dmlock button.link { height: auto; padding: 6px; background: none; color: #fca5a5; font-size: 14px; }
.dmlock.sm { text-align: left; }
.dmlock.nag button.link { color: var(--muted); }
.dmlock .row2 { display: flex; align-items: center; gap: 12px; }
.dmlock .row2 .primary { height: 40px; padding: 0 18px; border-radius: 12px; }
.lcode { font-size: 30px !important; font-weight: 800; letter-spacing: 3px; color: var(--accent) !important; font-variant-numeric: tabular-nums; margin: 2px 0 !important; text-align: center; }
.pwin { width: 100%; height: 44px; box-sizing: border-box; border-radius: 12px; padding: 0 14px; font-size: 16px; }
.pwerr { min-height: 18px; font-size: 13px !important; color: #fca5a5 !important; }
.pv { position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.94); }
.pv-in { width: 100%; height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: calc(56px + var(--safe-t)) 8px calc(12px + var(--safe-b)); }
.pv-in img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.pv > .round { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; }
.lrow2.pick { width: 100%; text-align: left; }
.lrow2.pick .ck { flex: 0 0 auto; width: 26px; height: 26px; margin-left: auto; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #0d2219; }
.lrow2.pick.on .ck { background: var(--accent); border-color: var(--accent); }
