/* Полосы прокрутки («крутилка» справа) скрыты ВЕЗДЕ и навсегда: прокрутка работает, полосы не видно.
   Не добавлять полосы ни в одном разделе — так попросил владелец. */
*, *::before, *::after { scrollbar-width: none !important; }
*::-webkit-scrollbar, *::-webkit-scrollbar-thumb, *::-webkit-scrollbar-track { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; -webkit-appearance: none !important; }
/* «Я чел» — стили. Темы: black / white / pickme / pickme-dark / build (+ system) */
:root {
  --bg: #000; --bg2: #121214; --card: #1c1c1f; --card2: #26262a; --line: #2e2e33;
  --text: #f4f4f6; --muted: #8e8e96; --accent: #6c7cff; --accent-text: #fff;
  --danger: #ff453a; --ok: #30d158; --warn: #ffd60a; --heart: #ff375f;
  --tab-bg: rgba(28,28,31,.92); --shadow: 0 8px 30px rgba(0,0,0,.5);
  --r: 14px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="white"] {
  --bg: #f2f2f7; --bg2: #e9e9ef; --card: #fff; --card2: #f0f0f4; --line: #dcdce2;
  --text: #111114; --muted: #6c6c74; --tab-bg: rgba(255,255,255,.94); --shadow: 0 8px 30px rgba(0,0,0,.12);
  color-scheme: light;
}
:root[data-theme="pickme"] {
  --bg: #fff0f6; --bg2: #ffe3ef; --card: #fff; --card2: #ffe8f1; --line: #ffc6dc;
  --text: #4a1630; --muted: #b0668a; --accent: #ff4f9a; --tab-bg: rgba(255,255,255,.94);
  --shadow: 0 8px 30px rgba(255,79,154,.2); --heart: #ff2d7a;
  color-scheme: light;
}
/* «Пикми» тёмная: ночная розовая */
/* «Разработка»: стройка и ремонт — бетон, чертёж, сигнальный оранжевый, оградительная лента */
:root[data-theme="build"] {
  --bg: #e7e3da; --bg2: #ddd8cc; --card: #faf8f3; --card2: #efebe1; --line: #cfc8b8;
  --text: #24221d; --muted: #7a7466; --accent: #e8620c; --accent-text: #fff; --heart: #e8620c;
  --tab-bg: rgba(250,248,243,.95); --shadow: 0 8px 26px rgba(60,45,20,.18); --ok: #2f9e44; --warn: #ffc21a;
  --hz: repeating-linear-gradient(-45deg, #ffc21a 0 10px, #1f1f1f 10px 20px); /* оградительная лента */
  color-scheme: light;
}
:root[data-theme="pickme-dark"] {
  --bg: #1a0b13; --bg2: #24101b; --card: #2b1220; --card2: #3a1a2b; --line: #4d2239;
  --text: #ffe6f1; --muted: #c98aa8; --accent: #ff5fa8; --tab-bg: rgba(43,18,32,.92);
  --shadow: 0 8px 30px rgba(0,0,0,.5); --heart: #ff4f9a;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --bg: #f2f2f7; --bg2: #e9e9ef; --card: #fff; --card2: #f0f0f4; --line: #dcdce2;
    --text: #111114; --muted: #6c6c74; --tab-bg: rgba(255,255,255,.94); --shadow: 0 8px 30px rgba(0,0,0,.12);
    color-scheme: light;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; touch-action: manipulation; -webkit-text-size-adjust: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; overscroll-behavior: none; }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; -webkit-user-select: none; user-select: none; }
input, textarea, select { font: inherit; font-size: 16px; /* меньше 16px — iPhone увеличивает страницу при вводе */ color: var(--text); background: var(--card2); border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; width: 100%; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
input[type=range] { padding: 0; background: none; accent-color: var(--accent); }
input[type=color] { padding: 0; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
a { color: var(--accent); }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }

/* ---------- каркас ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
#view { flex: 1; overflow: hidden; position: relative; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: calc(var(--safe-t) + 8px) 16px calc(110px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.screen.noscroll { overflow: hidden; padding-bottom: 0; }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.topbar h1 { font-size: 30px; font-weight: 800; margin: 0; flex: 1; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar h2 { font-size: 18px; margin: 0; flex: 1; text-align: center; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--card); flex: none; }
.iconbtn.ghost { background: none; }
.iconbtn:active { transform: scale(.94); }

/* ---------- таб-бар ---------- */
#tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); display: flex; justify-content: space-around; background: var(--tab-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 26px; padding: 6px; box-shadow: var(--shadow); z-index: 20; max-width: 560px; margin: 0 auto; border: 1px solid var(--line); }
#tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 6px 2px; border-radius: 20px; min-width: 0; }
#tabbar button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#tabbar button.on { color: var(--text); background: var(--card2); }
#tabbar .badge { position: absolute; margin-left: 18px; margin-top: -2px; background: var(--danger); color: #fff; border-radius: 9px; font-size: 10px; min-width: 16px; padding: 0 4px; line-height: 16px; }
body.editing #tabbar, body.hide-tabbar #tabbar { display: none; }

/* ---------- списки/карточки ---------- */
.group { background: var(--card); border-radius: var(--r); overflow: hidden; margin: 10px 0 18px; }
.group-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 18px 4px 6px; display: flex; align-items: center; justify-content: space-between; }
.group-title.big { text-transform: none; font-size: 18px; color: var(--text); font-weight: 700; letter-spacing: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 48px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.item:last-child { border-bottom: 0; }
button.item:active, .item.tap:active { background: var(--card2); }
.item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item .val { color: var(--muted); font-size: 14px; white-space: nowrap; }
.item .chev { color: var(--muted); width: 16px; height: 16px; }
.item .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--card2); flex: none; }
.pro { font-size: 10px; font-weight: 800; font-style: italic; background: linear-gradient(90deg,#5b5bff,#a259ff); color: #fff; padding: 2px 6px; border-radius: 6px; letter-spacing: .3px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 15px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 26px; height: 26px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.seg { display: flex; background: var(--card2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; padding: 7px 6px; border-radius: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 18px; background: var(--card2); font-size: 13px; border: 1px solid transparent; }
.chip.on { background: var(--accent); color: var(--accent-text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 22px; background: var(--card2); font-weight: 600; min-height: 46px; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.green { background: var(--ok); color: #fff; }
.btn.block { width: 100%; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }
.field { margin: 10px 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px 4px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---------- модальные окна ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--bg2); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 22px 22px 0 0; overflow: auto; padding: 8px 16px calc(16px + var(--safe-b)); animation: up .25s cubic-bezier(.2,.9,.3,1); }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet.full { height: 100%; max-height: 100%; border-radius: 0; padding-top: calc(var(--safe-t) + 8px); }
.sheet-head { display: flex; align-items: center; gap: 8px; position: sticky; top: -8px; background: var(--bg2); z-index: 2; padding: 6px 0; }
.sheet-head h3 { flex: 1; text-align: center; margin: 0; font-size: 18px; }
.sheet-foot { position: sticky; bottom: calc(-16px - var(--safe-b)); background: var(--bg2); padding: 10px 0 calc(6px); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
.popover { position: fixed; z-index: 60; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 180px; animation: fade .15s; border: 1px solid var(--line); }
.popover button { display: flex; width: 100%; padding: 10px 12px; border-radius: 8px; gap: 10px; align-items: center; }
.popover button:active { background: var(--card2); }
.page { position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow-y: auto; padding: calc(var(--safe-t) + 8px) 16px calc(40px + var(--safe-b)); animation: slidein .25s cubic-bezier(.2,.9,.3,1); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 14px); background: var(--card); color: var(--text); padding: 10px 16px; border-radius: 20px; box-shadow: var(--shadow); z-index: 100; font-size: 14px; animation: fade .2s; border: 1px solid var(--line); max-width: 90vw; }
.netbadge { position: fixed; top: calc(var(--safe-t) + 4px); right: 12px; z-index: 30; font-size: 11px; background: var(--warn); color: #000; padding: 2px 8px; border-radius: 10px; }
@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(100%) } }
@keyframes slidein { from { transform: translateX(100%) } }

/* ---------- Ещё ---------- */
.profile { display: flex; align-items: center; gap: 14px; background: var(--card); padding: 14px; border-radius: var(--r); margin-top: 6px; width: 100%; text-align: left; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,#6a5cff,#ff5ca8); display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; overflow: hidden; flex: none; background-size: cover; background-position: center; }
.avatar.sm { width: 40px; height: 40px; font-size: 16px; }
.plan-badge { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: var(--card2); color: var(--muted); }
.plan-badge.prem { background: linear-gradient(90deg,#ffb800,#ff6a00); color: #000; font-weight: 700; }
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 10px; }
.tile { background: var(--card); border-radius: var(--r); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }

/* ---------- календарь ---------- */
.cal-head { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--safe-t) + 8px) 12px 0; background: var(--bg); z-index: 5; }
.cal-head .sub { font-size: 13px; color: var(--muted); margin-top: -4px; }
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; color: var(--muted); text-align: center; padding: 6px 0 4px; }
.cal-scroll { position: absolute; left: 0; right: 0; bottom: 0; overflow-y: auto; scroll-snap-type: y mandatory; padding: 0 8px; overscroll-behavior: contain; }
.cal-scroll.free { scroll-snap-type: none; }
.month { scroll-snap-align: start; scroll-snap-stop: always; padding-bottom: 8px; }
.month-title { font-size: 15px; font-weight: 700; padding: 8px 4px 4px; color: var(--muted); }
.year .month-title { font-size: 22px; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; } /* колонки ровно по 1/7 — длинные плашки их не раздвигают */
.day { min-height: var(--dayh, 92px); border-radius: 8px; padding: 3px 2px; position: relative; display: flex; flex-direction: column; gap: 2px; overflow: hidden; background: transparent; text-align: left; }
.day.other { opacity: .35; }
.day.other.hidec .chip-s, .day.other.hidec .dots { display: none; }
.day .num { font-size: 13px; text-align: center; height: 22px; line-height: 22px; font-weight: 500; }
.day.today .num span { background: var(--danger); color: #fff; border-radius: 11px; padding: 1px 6px; font-weight: 700; }
.day.today.big .num { font-size: 17px; }
.day.today.big .num span { padding: 2px 8px; }
.day.weekend .num { color: var(--muted); }
.day.hol-frame { box-shadow: inset 0 0 0 1.5px var(--holc); }
.day.hol-fill { background: color-mix(in srgb, var(--holc) 22%, transparent); }
.day.sel { background: var(--card2); }
.editing .day .slot { border: 1px dashed var(--line); border-radius: 6px; min-height: 20px; }
.editing .day:active { background: var(--card); }
.chip-s { font-size: 9.5px; line-height: 1.15; border-radius: 4px; padding: 2px 3px; color: #111; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.chip-s .t { font-weight: 400; display: block; font-size: 9px; opacity: .85; }
.chip-s.partner { outline: 1.5px dashed var(--heart); outline-offset: -1.5px; }
.dots { display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ev-line { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.fab { position: fixed; right: 18px; bottom: calc(96px + var(--safe-b)); width: 52px; height: 52px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 15; border: 1px solid var(--line); }
.fab:active { transform: scale(.94); }
.heart-btn svg { transition: transform .2s; }
.heart-btn.on { background: color-mix(in srgb, var(--heart) 20%, var(--card)); color: var(--heart); }
.heart-btn.on svg { fill: var(--heart); }
.heart-btn.pop svg { animation: heartpop .5s; }
@keyframes heartpop { 0% { transform: scale(1) } 30% { transform: scale(1.45) } 60% { transform: scale(.9) } 100% { transform: scale(1) } }
.heart-btn.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--heart) 50%, transparent) } 50% { box-shadow: 0 0 0 6px transparent } }
/* неделя */
.week { scroll-snap-align: start; padding: 6px 0 10px; }
.week-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-bottom: 1px solid var(--line); min-height: 52px; }
.week-row .d { width: 40px; text-align: center; flex: none; }
.week-row .d b { display: block; font-size: 18px; }
.week-row .d small { color: var(--muted); font-size: 11px; }
.week-row.today .d b { color: var(--danger); }
.week-row .items { flex: 1; display: flex; flex-direction: column; gap: 4px; }
/* год */
.year { scroll-snap-align: start; padding-bottom: 14px; }
.year-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.mini h4 { margin: 0 0 4px; font-size: 13px; color: var(--danger); }
.mini .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; font-size: 8.5px; text-align: center; }
.mini .g span { border-radius: 3px; padding: 1px 0; }
/* панель редактирования */
.edit-bar { position: fixed; left: 8px; right: 8px; bottom: calc(10px + var(--safe-b)); background: var(--tab-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 24px; padding: 8px; z-index: 25; box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); max-width: 640px; margin: 0 auto; }
.edit-bar .scroller { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.edit-bar .scroller::-webkit-scrollbar { display: none; }
.tpl-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 6px 6px; border-radius: 14px; font-size: 11px; gap: 3px; position: relative; flex: none; }
.tpl-btn.on { background: var(--card2); outline: 2px solid var(--accent); }
.tpl-btn .sym { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.tpl-btn .tm { font-size: 9.5px; color: var(--muted); }
.edit-close { position: fixed; right: 16px; bottom: calc(92px + var(--safe-b)); z-index: 26; }
.edit-hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); z-index: 26; background: var(--card); border-radius: 14px; padding: 6px 12px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; }
/* повестка */
.agenda-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; }
.agenda-item .bar { width: 4px; align-self: stretch; border-radius: 2px; }
.agenda-item .l1 { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.agenda-item .l2 { font-size: 12px; color: var(--muted); margin-top: 2px; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; flex: none; }
.color-dot.on { border-color: var(--text); }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px,1fr)); gap: 8px; }
.sym-grid button { height: 40px; border-radius: 50%; background: var(--card2); font-size: 18px; }
.sym-grid button.on { outline: 2px solid var(--accent); }
.rot-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rot-cell { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 14px; position: relative; }
.rot-cell small { position: absolute; top: -10px; font-size: 9px; color: var(--muted); }
/* печать */
.paper-wrap { background: var(--card2); border-radius: var(--r); padding: 12px; display: flex; justify-content: center; margin: 8px 0 14px; }
.paper-wrap canvas { width: 100%; max-width: 420px; height: auto; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); border-radius: 2px; }

/* ---------- чат ---------- */
.chat-item { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.chat-item .meta { flex: 1; min-width: 0; }
.chat-item .name { font-weight: 600; }
.chat-item .last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-online { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); position: absolute; margin: 30px 0 0 30px; }
.unread { background: var(--accent); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 7px; }
.chat-page { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; animation: slidein .25s; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 8px) 10px 8px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.msgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 18px; background: var(--card); align-self: flex-start; word-wrap: break-word; position: relative; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; }
.msg .tm { font-size: 10px; opacity: .65; margin-left: 8px; float: right; margin-top: 6px; }
.msg.pending { opacity: .6; }
.msg.circle { background: none !important; padding: 0; }

.msg.voice { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.wave { flex: 1; height: 24px; display: flex; align-items: center; gap: 2px; }
.wave i { flex: 1; background: currentColor; opacity: .55; border-radius: 1px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--bg2); border-top: 1px solid var(--line); }
.composer textarea { resize: none; max-height: 120px; border-radius: 20px; padding: 10px 14px; min-height: 40px; }
.circle-rec { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.circle-rec video { width: 260px; height: 260px; border-radius: 50%; object-fit: cover; transform: scaleX(-1); border: 4px solid var(--danger); }
.call-screen { position: fixed; inset: 0; z-index: 80; background: #0b0b0f; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 40px) 20px calc(var(--safe-b) + 40px); }
.call-screen video.remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call-screen video.local { position: absolute; right: 16px; top: calc(var(--safe-t) + 16px); width: 110px; height: 160px; object-fit: cover; border-radius: 14px; z-index: 2; transform: scaleX(-1); }
.call-screen .info, .call-screen .acts { z-index: 3; text-align: center; }
.call-screen .acts { display: flex; gap: 22px; }
.call-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); color: #fff; }
.call-btn.red { background: var(--danger); }
.call-btn.green { background: var(--ok); }
.call-btn.off { background: #fff; color: #000; }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: 4px; background: var(--card2); padding: 10px 16px; border-radius: 12px; text-align: center; }
.car-logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #0a3a8a; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.car-stats { display: flex; gap: 12px; }
.car-stats > div { flex: 1; background: var(--card); border-radius: var(--r); padding: 12px; }
.car-stats b { font-size: 22px; }
.rec { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.rec .amt { margin-left: auto; text-align: right; font-size: 12px; white-space: nowrap; }
.rec .amt b { display: inline-block; border: 1px solid var(--line); border-radius: 10px; padding: 2px 8px; font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.donut-wrap { display: flex; justify-content: center; padding: 16px 0; }
.legend-row { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }

/* ---------- экран блокировки ---------- */
.lock-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lock-preset { border-radius: 20px; overflow: hidden; position: relative; background: var(--card); padding: 6px; text-align: center; font-size: 12px; }
.lock-preset canvas { width: 100%; border-radius: 16px; display: block; }
.lock-preset.on { outline: 3px solid var(--ok); }
.lock-preview { display: flex; justify-content: center; margin: 4px 0 10px; }
.lock-preview canvas { height: 46vh; max-height: 440px; border-radius: 26px; box-shadow: var(--shadow); }
.bg-list { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; }
.bg-list button { width: 72px; height: 110px; border-radius: 12px; flex: none; background-size: cover; background-position: center; border: 3px solid transparent; }
.bg-list button.on { border-color: var(--text); }
.pal { display: flex; gap: 12px; overflow-x: auto; padding: 8px 6px; }
.pal button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; }
.pal button i { width: 42px; height: 42px; border-radius: 50%; display: block; border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); transition: box-shadow .2s; }
.pal button.on i { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.el-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }

/* ---------- пейвол ---------- */
.plans { display: grid; gap: 10px; margin: 14px 0; }
.plan { border: 2px solid var(--line); border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); }
.plan.on { border-color: var(--accent); }
.plan .price { margin-left: auto; font-weight: 800; font-size: 18px; white-space: nowrap; }
.plan .tag { font-size: 10px; background: var(--ok); color: #000; border-radius: 6px; padding: 2px 6px; margin-left: 6px; font-weight: 700; }
.feat-list { margin: 8px 0; padding-left: 0; list-style: none; }
.feat-list li { padding: 6px 0; display: flex; gap: 8px; align-items: center; }
.drag-handle { cursor: grab; touch-action: none; color: var(--muted); padding: 4px; }
.dragging { opacity: .6; background: var(--card2); }
.social { display: flex; gap: 10px; }
.social a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; background: var(--card); border-radius: var(--r); color: var(--text); text-decoration: none; font-size: 12px; }
.social a i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; }
.lockscreen-guard { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }

@media (min-width: 900px) {
  .screen, .page { padding-left: max(16px, calc(50% - 360px)); padding-right: max(16px, calc(50% - 360px)); }
  .cal-head, .cal-scroll { padding-left: max(8px, calc(50% - 420px)); padding-right: max(8px, calc(50% - 420px)); }
}
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; inset: 0; }
}

/* ---------- экран блокировки: «Команды» ---------- */
.update-banner { position: fixed; left: 12px; right: 12px; bottom: calc(86px + var(--safe-b)); z-index: 18; display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.guide { padding-left: 18px; margin: 8px 0; font-size: 14px; line-height: 1.5; }
.guide li { margin-bottom: 6px; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row .ck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; flex: none; }
.task-row.done .ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.task-row.done .tt { text-decoration: line-through; color: var(--muted); }
.task-row .late { color: var(--danger); }

/* ---------- ассистент ---------- */
.ai-log { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.iconbtn.mic.rec { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.ai-typing { display: flex; gap: 4px; padding: 12px 14px; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s } .ai-typing i:nth-child(3) { animation-delay: .3s }
@keyframes dot { 50% { opacity: .3 } }
.chip-s.friend { outline: 1.5px solid var(--fc); outline-offset: -1.5px; }
.friends-btn { position: relative; }
.friends-btn .cnt { position: absolute; top: -2px; right: -2px; background: var(--accent); color: #fff; font-size: 10px; border-radius: 8px; min-width: 16px; line-height: 16px; text-align: center; }
.friends-btn.on { color: var(--accent); }
.fab.ai-fab { left: 18px; right: auto; font-size: 22px; }
/* календарь: один месяц на экран, листается свайпом */
.cal-scroll.single { overflow: hidden; scroll-snap-type: none; touch-action: pan-x; }
.cal-scroll.single .month-title { display: none; }
.cal-scroll.single .month { animation: none; }
.cal-scroll.single .month.in-up { animation: inUp .28s cubic-bezier(.2,.9,.3,1); }
.cal-scroll.single .month.in-down { animation: inDown .28s cubic-bezier(.2,.9,.3,1); }
@keyframes inUp { from { transform: translateY(40%); opacity: 0 } }
@keyframes inDown { from { transform: translateY(-40%); opacity: 0 } }
/* авто: подсказки */
.ac-wrap { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 70; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 220px; overflow-y: auto; margin-top: 4px; }
.ac-list button { display: block; width: 100%; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ac-list button:last-child { border-bottom: 0; }
.ac-list button:active, .ac-list button.hl { background: var(--card2); }
.ac-list b { color: var(--accent); }
.ai-title { padding: 4px 8px; font-weight: 700; background: var(--card); margin: 2px 0; }

/* ---------- настройка нижней панели ---------- */
.tb-preview { display: flex; gap: 2px; background: var(--tab-bg); border: 1px solid var(--line); border-radius: 24px; padding: 6px; margin-top: 6px; box-shadow: var(--shadow); }
.tb-pv { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 6px 2px; border-radius: 18px; }
.tb-pv span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pv.home { color: var(--text); background: var(--card2); }
.group-title span { text-transform: none; letter-spacing: 0; font-size: 12px; }
.tb-row { position: relative; background: var(--card); transition: transform .15s; touch-action: pan-y; }
.tb-row.lifting { z-index: 5; box-shadow: var(--shadow); transition: none; border-radius: 12px; }
.tb-minus, .tb-plus { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; line-height: 1; flex: none; }
.tb-minus { background: var(--danger); }
.tb-plus { background: var(--ok); }
.tb-plus.dis { background: var(--line); }
.tb-row .drag-handle { padding: 8px; margin: -8px -6px -8px 0; touch-action: none; cursor: grab; }

/* ---------- затемнение под нижней панелью ---------- */
#app::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(120px + var(--safe-b)); pointer-events: none; z-index: 19;
  background: linear-gradient(to bottom, transparent, var(--bg));
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 70%, transparent) 45%, var(--bg)); }
body.editing #app::after { height: calc(140px + var(--safe-b)); }
#tabbar { backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); }

/* ---------- адаптация под размеры экрана ---------- */
/* маленькие телефоны (iPhone SE, 320–375px) */
@media (max-width: 375px) {
  html, body { font-size: 14px; }
  .screen, .page { padding-left: 12px; padding-right: 12px; }
  .topbar h1 { font-size: 26px; }
  .iconbtn { width: 36px; height: 36px; }
  #tabbar { left: 6px; right: 6px; padding: 4px; }
  #tabbar button { font-size: 9px; padding: 5px 1px; }
  #tabbar svg.i { width: 20px; height: 20px; }
  .chip-s { font-size: 8.5px; padding: 1px 2px; }
  .chip-s .t { display: none; }
  .day .num { font-size: 12px; }
  .tilegrid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tile { padding: 10px 4px; font-size: 12px; }
  .tile .ico { width: 38px; height: 38px; }
  .car-stats { gap: 8px; } .car-stats b { font-size: 18px; }
  .btn { padding: 11px 14px; }
  .edit-bar .tpl-btn { min-width: 56px; }
}
/* очень узкие (Galaxy Fold закрытый, 280–319px) */
@media (max-width: 319px) {
  #tabbar button span { display: none; }
  .topbar h1 { font-size: 22px; }
  .wdays { font-size: 9px; }
}
/* телефон в горизонтальном положении: ниже высота */
@media (orientation: landscape) and (max-height: 500px) {
  .screen { padding-bottom: calc(80px + var(--safe-b)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  #tabbar { bottom: calc(4px + var(--safe-b)); max-width: 520px; padding: 3px; }
  #tabbar button { flex-direction: row; gap: 6px; padding: 6px 4px; }
  .fab { bottom: calc(64px + var(--safe-b)); width: 44px; height: 44px; }
  .sheet { max-height: 96vh; }
  .lock-preview canvas { height: 70vh; }
  #app::after { height: 70px; }
  .topbar { min-height: 40px; } .topbar h1 { font-size: 22px; }
  .cal-head { padding-top: calc(var(--safe-t) + 2px); }
  .wdays { padding: 2px 0; }
  .day { padding: 1px; gap: 1px; }
  .day .num { height: 16px; line-height: 16px; font-size: 12px; }
  .chip-s { font-size: 8px; padding: 0 2px; } .chip-s .t, .ev-line { display: none; }
  .fab { width: 40px; height: 40px; }
}
/* планшеты (iPad и т. п.) */
@media (min-width: 700px) {
  .screen, .page { padding-left: max(24px, calc(50% - 380px)); padding-right: max(24px, calc(50% - 380px)); }
  .tilegrid { grid-template-columns: repeat(4, 1fr); }
  .lock-presets { grid-template-columns: repeat(4, 1fr); }
  .overlay { align-items: center; }
  .sheet { border-radius: 22px; max-height: 86vh; max-width: 600px; }
  .sheet.full { max-width: 760px; height: 92vh; border-radius: 22px; }
  .chip-s { font-size: 11px; padding: 3px 5px; }
  .chip-s .t { font-size: 10px; }
  .day .num { font-size: 15px; }
  .ev-line { font-size: 11px; }
  .fab { right: max(18px, calc(50% - 420px)); }
  .fab.ai-fab { left: max(18px, calc(50% - 420px)); }
  .tb-preview { max-width: 520px; margin-left: auto; margin-right: auto; }
}
/* большие экраны (ноутбук, ПК) */
@media (min-width: 1100px) {
  .cal-head, .cal-scroll { padding-left: max(8px, calc(50% - 520px)); padding-right: max(8px, calc(50% - 520px)); }
  .chip-s { font-size: 12px; }
  .tilegrid { grid-template-columns: repeat(6, 1fr); }
  #tabbar { max-width: 640px; }
  #tabbar button { font-size: 11px; }
}
/* мышь: подсветка при наведении */
@media (hover: hover) {
  button.item:hover, .tile:hover, .chip:hover, .day:hover { filter: brightness(1.08); }
  #tabbar button:hover { color: var(--text); }
}
/* меньше анимаций, если пользователь отключил их в системе */
/* «Уменьшение движения» в настройках телефона. Раньше здесь все анимации сокращались до 0,01 мс — на iPhone с этой
   настройкой переходы становились резкими, КНБ замирал, а качающиеся торт и снеговик бешено дёргались. Теперь
   переходы и анимации работают как обычно — они короткие и плавные. */
.sc-step { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.sc-step.done .step { background: var(--ok); }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.consent-box { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 14px; font-size: 13px; line-height: 1.45; cursor: pointer; }
.consent-box input { margin-top: 2px; flex: none; width: 22px; height: 22px; }
.consent-box a { color: var(--accent); }
.consent-box.shake { animation: shake .4s; border-color: var(--danger); }
@keyframes shake { 20%, 60% { transform: translateX(-6px) } 40%, 80% { transform: translateX(6px) } }

/* =================== обновлённый вид: спокойные цвета и анимации =================== */
:root { --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.56,.64,1); }
/* иконки разделов: мягкий тон вместо ярких плашек */
.tile .ico, .item .ico.tint, .tb-row .ico { background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent) !important; color: var(--c, var(--accent)) !important; }
.tile { border: 1px solid var(--line); transition: transform .2s var(--ease), background .2s; }
.tile .ico svg { width: 24px; height: 24px; }
.profile, .group, .sc-step, .car-stats > div { border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }

/* переходы между разделами */
.screen { animation: screenIn .22s var(--ease); }
@keyframes screenIn { from { opacity: 0 } }
/* списки появляются вместе со страницей (без поочерёдного «выезда» — иначе кнопки мелькали раньше пунктов) */
@keyframes itemIn { from { opacity: 0; transform: translateY(8px) } }
/* нижние листы и страницы: плавно открываются и закрываются */
.overlay { animation: fade .25s var(--ease); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.overlay.closing { animation: fadeOut .22s var(--ease) forwards; }
.overlay.closing .sheet { animation: sheetOut .22s var(--ease) forwards; }
.sheet { animation: sheetIn .34s cubic-bezier(.2,.8,.2,1); } /* выезжает снизу плавно, без подскока */
@keyframes sheetOut { to { transform: translateY(100%) } }
@keyframes fadeOut { to { opacity: 0 } }
.page { animation: slidein .34s var(--ease); }
.page.closing { animation: slideout .24s var(--ease) forwards; }
@keyframes slideout { to { transform: translateX(100%); opacity: .6 } }
@media (min-width: 700px) { .sheet { animation: pop .3s var(--spring); } .overlay.closing .sheet { animation: popOut .2s var(--ease) forwards; } }
@keyframes pop { from { transform: scale(.94); opacity: 0 } } @keyframes popOut { to { transform: scale(.95); opacity: 0 } }
/* уведомления */
.toast { animation: toastIn .35s var(--spring); }
.toast.closing { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -16px) scale(.96) } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -12px) } }
/* нажатия */
button, .btn, .chip, .tile, .item.tap, .iconbtn, .fab { transition: transform .15s var(--ease), background-color .2s, color .2s, opacity .2s; }
.btn:active, .chip:active, .tile:active, .iconbtn:active, .fab:active { transform: scale(.95); }
button.item:active, a.item:active { transform: scale(.99); }
/* нижняя панель: мягкое переключение и «подпрыгивание» иконки */
#tabbar button { transition: background-color .25s var(--ease), color .25s; }

@keyframes tabPop { 40% { transform: scale(1.18) translateY(-1px) } }
.popover { animation: pop .2s var(--spring); transform-origin: top center; }
.seg button { transition: background .25s var(--ease), color .25s, box-shadow .25s; }
.switch span, .switch span::after { transition: .25s var(--spring); }
.day { transition: background .2s; }

@keyframes chipIn { from { opacity: 0; transform: scale(.85) } }
.msg.pending { animation: msgIn .25s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(.98) } }
/* ---------- скидочные карты ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 6px; }
.dcard { aspect-ratio: 1.586; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; color: #fff;
  background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000)); box-shadow: 0 6px 18px color-mix(in srgb, var(--cc) 35%, transparent); animation: itemIn .35s var(--ease) both; position: relative; overflow: hidden; }
.dcard::after { content: ""; position: absolute; right: -30%; top: -40%; width: 80%; height: 120%; background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent); }
.dc-name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.dc-num { font-family: ui-monospace, Menlo, monospace; font-size: 13px; opacity: .9; letter-spacing: 1px; }
.dc-note { font-size: 11px; opacity: .8; }
.cardview .cv-head { background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000)); color: #fff; border-radius: 16px 16px 0 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cardview .cv-head b { font-size: 20px; } .cardview .cv-head span { font-size: 13px; opacity: .85; }
.cv-code { background: #fff; color: #111; border-radius: 0 0 16px 16px; padding: 16px 14px 14px; text-align: center; }
.cv-bars svg { width: 100%; height: 110px; display: block; transition: height .3s var(--ease); }
.cv-bars.zoom svg { height: 170px; }
.cv-num { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: 2px; margin-top: 8px; font-weight: 600; }
.cv-photo { width: 100%; border-radius: 14px; margin-bottom: 12px; }
.bc-preview { background: #fff; border-radius: 10px; padding: 8px; margin: -2px 0 10px; }
.bc-preview svg { width: 100%; height: 56px; display: block; }
.empty-ico { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.empty-ico svg { width: 36px; height: 36px; }
.quick-add { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 5px 5px 5px 4px; transition: border-color .2s; }
.quick-add:focus-within { border-color: var(--accent); }
.quick-add input { background: none; border: 0; padding: 9px 10px; }
.quick-add .qadd { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
/* ---------- шапка «Моё авто» ---------- */
.car-hero { position: relative; border-radius: 22px; padding: 16px 16px 0; margin: 4px 0 14px; overflow: hidden; min-height: 180px;
  background: radial-gradient(120% 90% at 70% 110%, color-mix(in srgb, var(--carc) 35%, transparent), transparent 60%), linear-gradient(160deg, var(--card), var(--bg2)); border: 1px solid var(--line); }
.car-hero .edit { position: absolute; right: 12px; top: 12px; }
.ch-name { font-size: 22px; font-weight: 800; padding-right: 48px; }
button.ch-name { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; font-family: inherit; padding: 0 48px 0 0; text-align: left; cursor: pointer; } .ch-chev { width: 18px; height: 18px; opacity: .55; flex: none; }
.ch-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.car-hero-art { margin: 6px -8px 0; animation: carIn .6s var(--spring) both; }
.car-art { width: 100%; height: auto; display: block; }
@keyframes carIn { from { transform: translateX(-30px); opacity: 0 } }
.car-preview { background: var(--card2); border-radius: 16px; padding: 6px 10px 2px; margin-bottom: 10px; }

/* записи в ячейках календаря (вид задаётся в «Повестке дня») */
.chip-s { background: var(--chc, #8ec5ff); }
.chip-s.ev { background: color-mix(in srgb, var(--chc) 22%, transparent); color: var(--text); box-shadow: inset 2px 0 0 var(--chc); }
.chip-s .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-cal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px 6px 8px; }
.preview-cal .day { cursor: default; }
/* ---------- чат: безопасность и файлы ---------- */
.safety-banner { display: flex; gap: 10px; align-items: flex-start; margin: 8px 10px 0; padding: 10px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.4; background: color-mix(in srgb, var(--warn) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); animation: itemIn .4s var(--ease); }
.safety-banner svg { color: var(--warn); flex: none; }
.fraud-warn { align-self: flex-start; max-width: 86%; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; padding: 9px 11px; border-radius: 14px; margin-top: -2px; animation: itemIn .35s var(--ease); }
.fraud-warn.lvl2 { background: color-mix(in srgb, var(--danger) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); }
.fraud-warn.lvl1 { background: color-mix(in srgb, var(--warn) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.fraud-warn svg { flex: none; width: 18px; height: 18px; color: var(--danger); } .fraud-warn.lvl1 svg { color: var(--warn); }
.msg.risky { box-shadow: 0 0 0 1.5px var(--danger); }
.msg a.ext { color: inherit; text-decoration: underline dotted; word-break: break-all; }
.filemsg { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 200px; }
.filemsg .fico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.18); flex: none; }
.msg:not(.me).filemsg .fico { background: var(--card2); }
.call-warn { margin-top: 12px; background: rgba(255,214,10,.18); color: #ffe27a; border-radius: 12px; padding: 8px 12px; font-size: 13px; max-width: 300px; }
/* ---------- помощник (новый дизайн) ---------- */
.ai-screen { display: flex; flex-direction: column; height: 100%; }
.screen .ai-screen { position: absolute; inset: 0; padding: calc(var(--safe-t) + 6px) 0 calc(96px + var(--safe-b)); }
.sheet .ai-screen.in-sheet { height: calc(100% - 4px); }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 6px 16px 12px; border-bottom: 1px solid var(--line); }
.ai-orb { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #8c7cff, #e88fb8); box-shadow: 0 6px 18px rgba(140,124,255,.35); animation: orb 4s ease-in-out infinite; }
@keyframes orb { 50% { transform: translateY(-2px) rotate(6deg); filter: hue-rotate(20deg) } }
.ai-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-turn { display: flex; flex-direction: column; gap: 8px; }
.ai-bubble { max-width: 85%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; animation: msgIn .3s var(--ease); white-space: pre-wrap; }
.ai-bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.ai-bubble.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.ai-starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ai-starter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; animation: itemIn .4s var(--ease) both; }
.ai-starter:nth-child(2) { animation-delay: .05s } .ai-starter:nth-child(3) { animation-delay: .1s } .ai-starter:nth-child(4) { animation-delay: .15s }
.ai-starter .e { font-size: 22px; }
.ai-cards { display: flex; flex-direction: column; gap: 8px; animation: itemIn .35s var(--ease); }
.ai-card2 { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--tc); transition: opacity .2s, transform .2s; }
.ai-card2.off { opacity: .5; }
.ai-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--tc) 18%, transparent); flex: none; }
.ai-type { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--tc); font-weight: 700; }
.ai-card2 .ai-title { background: none; border: 0; padding: 2px 0; font-weight: 700; font-size: 16px; border-bottom: 1px dashed transparent; border-radius: 0; }
.ai-card2 .ai-title:focus { border-bottom-color: var(--accent); }
.ai-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ai-meta span { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--card2); color: var(--muted); }
.ai-ok { width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop .3s var(--spring); }
.ai-added { text-align: center; color: var(--ok); font-weight: 600; padding: 4px; }
.ai-bar { padding: 8px 12px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.sheet .ai-bar { padding-bottom: 4px; }
.ai-field { display: flex; align-items: flex-end; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 5px 5px 5px 14px; transition: border-color .2s; }
.ai-field:focus-within { border-color: var(--accent); }
.ai-field textarea { background: none; border: 0; padding: 8px 0; resize: none; min-height: 38px; max-height: 120px; }
.ai-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; animation: pop .25s var(--spring); }
.ai-btn.mic { background: var(--card2); color: var(--text); }
.ai-btn.mic.rec { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.auth-head { margin: 2px 0 14px; } .auth-head h2 { margin: 10px 0 4px; } .auth-head p { margin: 0; }
.tg-login { background: #2aabee !important; color: #fff; margin-bottom: 8px; }
.in-code { text-align: center; font-size: 30px; letter-spacing: 10px; font-weight: 700; }
.tg-wait { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; color: #fff; background: #2aabee; animation: pulse 1.6s infinite; }
.tg-wait.ok { background: var(--ok); animation: pop .4s var(--spring); }
.tg-wait svg { width: 30px; height: 30px; }
/* ---------- превью виджетов ---------- */
.wg-gallery { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.wg { border-radius: 22px; padding: 14px; color: #fff; background: linear-gradient(135deg, #1d1f33, #3a2d5c); box-shadow: 0 10px 28px rgba(40,30,90,.35); animation: itemIn .45s var(--spring) both; }
.wg-s { width: 158px; height: 158px; display: flex; flex-direction: column; }
.wg-l { width: 100%; max-width: 340px; }
.wg-h { display: flex; justify-content: space-between; font-size: 11px; } .wg-h b { color: #a99cff; } .wg-h span { opacity: .6; }
.wg-sym { font-size: 26px; margin-top: 8px; } .wg-t { font-weight: 800; font-size: 17px; line-height: 1.15; } .wg-tm { color: #ffd27a; font-size: 13px; font-weight: 600; }
.wg-f { margin-top: auto; font-size: 11px; opacity: .65; }
.wg-week { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.wg-day { background: rgba(255,255,255,.1); border-radius: 10px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; font-size: 10px; }
.wg-day span { opacity: .6; } .wg-day b { font-size: 14px; } .wg-day i { font-style: normal; font-size: 12px; }
.wg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.wg-2 div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; font-size: 12px; gap: 2px; } .wg-2 b { color: #a99cff; } .wg-2 span { opacity: .8; }
.wg-lock { display: flex; flex-direction: column; gap: 10px; }
.wg-lr { width: 160px; padding: 8px 10px; border-radius: 16px; background: rgba(128,128,128,.25); display: flex; flex-direction: column; font-size: 13px; backdrop-filter: blur(10px); }
.wg-lr span { opacity: .7; font-size: 12px; }
.wg-lc { width: 70px; height: 70px; border-radius: 50%; background: rgba(128,128,128,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; }
.wg-lc b { font-size: 20px; }
.apk-banner { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); text-decoration: none; color: var(--text); background: color-mix(in srgb, #3ddc84 14%, var(--card)); border: 1px solid color-mix(in srgb, #3ddc84 40%, transparent); animation: itemIn .4s var(--ease); }
.apk-banner .apk-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #3ddc84; color: #0b2a17; flex: none; }
.apk-banner .small { display: block; color: var(--muted); }

/* ===== v11: помощник на весь экран, календарь, свайпы ===== */
/* помощник: лента занимает всё место, поле ввода прижато к таб-бару */
.ai-screen .ai-log { max-height: none; min-height: 0; }
.ai-screen .ai-hello { max-width: 560px; }
.ai-screen .ai-bar { flex: none; }
.ai-starter { min-width: 0; overflow: hidden; }
.ai-starter b, .ai-starter .small { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 340px) { .ai-starters { grid-template-columns: 1fr; } }
@media (min-width: 700px) { .screen .ai-screen { left: max(0px, calc(50% - 400px)); right: max(0px, calc(50% - 400px)); } }

/* календарь: стрелки и крупный шрифт */
.cal-head .topbar h1 { flex: 0 1 auto; cursor: pointer; }
.wdays { font-size: 13px; font-weight: 600; }
.day { padding: 3px 2px 2px; gap: 3px; }
.day .num { font-size: 15.5px; height: 24px; line-height: 24px; font-weight: 600; }
.day.today.big .num { font-size: 18px; }
.ev-line { font-size: 11px; }
/* смена в ячейке: строка 1 — цветная плашка, строка 2 — тот же цвет темнее */
.chip-s { background: none !important; padding: 0; border-radius: 5px; font-size: 11.5px; line-height: 1.25; text-align: center; color: var(--text); box-shadow: none; overflow: hidden; flex: none; }
.chip-s .l1 { background: var(--chc); color: #111; font-weight: 700; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-s .l2 { background: color-mix(in srgb, var(--chc) 30%, var(--card2)); color: var(--text); font-weight: 600; font-size: 11px; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.chip-s.ev .l1 { background: color-mix(in srgb, var(--chc) 24%, transparent); color: var(--text); box-shadow: inset 2px 0 0 var(--chc); font-weight: 600; }
.chip-s.ev .l2 { background: color-mix(in srgb, var(--chc) 12%, transparent); }
.chip-s.partner { outline: 1.5px dashed var(--heart); outline-offset: -1.5px; }
.chip-s.friend { outline: 1.5px solid var(--fc); outline-offset: -1.5px; }
.wk-chip { font-size: 13px; font-weight: 700; border-radius: 6px; padding: 2px 8px; color: #111; white-space: nowrap; }
.week-row .d b { font-size: 18px; } .week-row .d small { font-size: 12px; }
.week-row .small { font-size: 13px; }
.agenda-item .l1 { font-size: 16px; } .agenda-item .l2 { font-size: 14px; }
.mini .g span { font-size: 11px; } .mini h4 { font-size: 14px; }
.cal-scroll.single { touch-action: none; }
.cal-scroll.single .month.in-left { animation: inLeft .28s cubic-bezier(.2,.9,.3,1); }
.cal-scroll.single .month.in-right { animation: inRight .28s cubic-bezier(.2,.9,.3,1); }
@keyframes inLeft { from { transform: translateX(35%); opacity: 0 } }
@keyframes inRight { from { transform: translateX(-35%); opacity: 0 } }
@media (max-width: 375px) {
  .chip-s { font-size: 10px; } .chip-s .l2 { font-size: 9.5px; display: block; }
  .day .num { font-size: 14px; } .wdays { font-size: 12px; }
}
@media (orientation: landscape) and (max-height: 500px) { .chip-s .l2 { display: none; } }
@media (min-width: 700px) { .chip-s { font-size: 13px; } .chip-s .l2 { font-size: 12px; } .day .num { font-size: 17px; } }

/* свайп строки влево — удалить */
.sw-wrap { position: relative; overflow: hidden; transition: max-height .22s var(--ease), opacity .22s; max-height: 400px; }
.sw-wrap.gone { max-height: 0; opacity: 0; }
.sw-wrap > .sw-row { position: relative; z-index: 1; background: var(--card); transition: transform .25s var(--ease); touch-action: pan-y; }
.sw-del { position: absolute; inset: 0; background: var(--danger); color: #fff; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 20px; font-weight: 600; font-size: 14px; }
.sw-del svg { width: 20px; height: 20px; transition: transform .2s var(--spring); }
.sw-wrap.far .sw-del svg { transform: scale(1.25); }
.sw-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* таб-бар: плавно скользящий «пузырь» активной вкладки */
#tabbar { position: fixed; }
#tabbar .tb-ind { position: absolute; top: 6px; bottom: 6px; left: 0; border-radius: 20px; background: var(--card2); z-index: 0; transition: transform .42s cubic-bezier(.3,1.35,.5,1), width .42s cubic-bezier(.3,1.35,.5,1); pointer-events: none; }
#tabbar button { position: relative; z-index: 1; background: none !important; }
#tabbar button svg { transition: transform .3s var(--spring); }
#tabbar button.on svg { transform: translateY(-1px) scale(1.08); }
/* переход между вкладками: экран слегка выезжает в сторону свайпа */
.screen.from-right { animation: scrFromRight .3s var(--ease); }
.screen.from-left { animation: scrFromLeft .3s var(--ease); }
@keyframes scrFromRight { from { transform: translateX(28px); opacity: 0 } }
@keyframes scrFromLeft { from { transform: translateX(-28px); opacity: 0 } }
.page { will-change: transform; }
/* сообщить об ошибке: превью вложений */
.bug-media { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.bug-media:empty { display: none; }
.bm { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--card2); animation: pop .25s var(--spring); }
.bm img, .bm video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-v { position: absolute; left: 6px; bottom: 4px; color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000; }
.bm-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.bm-x svg { width: 14px; height: 14px; }
.toast.undo { display: flex; align-items: center; gap: 14px; }
.toast.undo button { color: var(--accent); font-weight: 700; padding: 2px 4px; }
.chip-s .l1, .chip-s .l2 { text-overflow: clip; letter-spacing: -.2px; }
.chip-s .ic { font-style: normal; font-size: .85em; margin-right: 1px; }

/* ===== чат v2 ===== */
.chat-top .who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 2px 4px; border-radius: 12px; }
.chat-top .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-top .who:active { background: var(--card); }
.day-sep { align-self: center; margin: 8px 0 2px; }
.day-sep span { font-size: 12px; color: var(--muted); background: var(--card); padding: 3px 10px; border-radius: 10px; }
.unread.mute { background: var(--muted) !important; }
.muted-ic { font-size: 12px; opacity: .7; }
/* голосовое */
.msg.voice { display: flex; align-items: center; gap: 10px; min-width: 230px; padding: 8px 12px 8px 8px; }
.msg.voice .tm { position: absolute; right: 10px; bottom: 6px; margin: 0; float: none; }
.vplay { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; transition: transform .2s var(--spring); }
.msg.me .vplay { background: #fff; color: var(--accent); }
.vplay:active { transform: scale(.9); }
.vbody { flex: 1; min-width: 0; }
.msg.voice .wave { height: 28px; gap: 2px; cursor: pointer; touch-action: none; }
.msg.voice .wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .3; transition: opacity .15s; }
.msg.voice .wave i.on { opacity: 1; }
.msg:not(.me).voice .wave i.on { color: var(--accent); }
.vmeta { display: flex; align-items: center; gap: 8px; font-size: 11px; opacity: .85; margin-top: 2px; padding-right: 44px; }
.speed { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: rgba(127,127,127,.22); color: inherit; }
.tr-btn { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 8px; background: rgba(127,127,127,.22); color: inherit; letter-spacing: -.3px; }
.tr-btn.on { background: var(--accent); color: #fff; }
.msg.me .tr-btn.on { background: #fff; color: var(--accent); }
.tr-btn sup { font-size: 7px; margin-left: 2px; color: #ff9f0a; }
.transcript { max-width: 78%; align-self: flex-start; font-size: 14px; line-height: 1.4; padding: 8px 12px; border-radius: 14px; background: var(--card2); margin-top: -2px; animation: msgIn .25s var(--ease); white-space: pre-wrap; }
.transcript.me { align-self: flex-end; }
/* кружок: кольцо прогресса, тап — звук, вести по кругу — перемотка */
.msg.circle { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg.circle:not(.me) { align-items: flex-start; }
.cwrap { position: relative; width: 220px; height: 220px; border-radius: 50%; touch-action: none; cursor: pointer; --p: 0; }
.cwrap video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #000; } .csnd { position: absolute; bottom: 10px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); border-radius: 8px; padding: 1px 6px; }
.csnd { right: 26px; bottom: 26px; }
.cwrap.active .csnd { display: none; }
.crow { display: flex; align-items: center; gap: 8px; }
.crow .tm { float: none; margin: 0; font-size: 10px; color: var(--muted); opacity: 1; }
.crow .tr-btn { background: var(--card2); color: var(--text); }
/* медиа */
.msg.media { padding: 3px; background: var(--card) !important; }
.msg.media img, .msg.media video { max-width: 250px; max-height: 340px; border-radius: 15px; display: block; }
.msg.media .tm { position: absolute; right: 10px; bottom: 8px; margin: 0; color: #fff; opacity: 1; background: rgba(0,0,0,.4); border-radius: 8px; padding: 0 6px; }
.img-viewer { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.94); display: grid; place-items: center; animation: fadeIn .2s; touch-action: pinch-zoom; }
.img-viewer.closing { animation: fadeOut .2s forwards; }
.img-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; }
.img-viewer .iconbtn { position: absolute; top: calc(var(--safe-t) + 12px); background: rgba(255,255,255,.15); color: #fff; }
.iv-x { right: 14px; } .iv-dl { right: 64px; }
@keyframes fadeIn { from { opacity: 0 } } @keyframes fadeOut { to { opacity: 0 } }
/* «карточки» в чате */
.msg.cardmsg { min-width: 220px; padding: 10px 12px; }
.cm-head { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .85; margin-bottom: 4px; }
.cm-head svg { width: 16px; height: 16px; }
.cm-title { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.cm-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; clear: both; }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 12px; background: rgba(127,127,127,.2); color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.btn.sm svg { width: 15px; height: 15px; }
.loc-map { height: 110px; border-radius: 12px; margin: 4px 0 6px; position: relative; overflow: hidden;
  background: linear-gradient(115deg, transparent 46%, rgba(255,255,255,.55) 47% 50%, transparent 51%), linear-gradient(25deg, transparent 60%, rgba(255,255,255,.45) 61% 63%, transparent 64%), radial-gradient(circle at 30% 70%, #b9e3b0 0 18%, transparent 19%), #dfe8d6; }
.loc-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -85%); font-size: 30px; animation: pinDrop .5s var(--spring); }
@keyframes pinDrop { from { transform: translate(-50%, -180%); opacity: 0 } }
.mini-dcard { border-radius: 12px; padding: 12px; color: #fff; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000)); display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.mini-dcard span { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; font-size: 13px; opacity: .9; }
.mini-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
/* меню скрепки */
.att-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; padding-bottom: 6px; }
.att { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-align: center; line-height: 1.2; animation: itemIn .35s var(--ease) both; }
.att-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.att:active .att-ic { transform: scale(.92); }
.pick-list { max-height: 60vh; overflow-y: auto; }
/* мини-профиль */
.avatar.xl { width: 96px; height: 96px; font-size: 40px; margin: 0 auto; }
.pf-ava { display: flex; justify-content: center; margin-top: 6px; animation: pop .35s var(--spring); }
.pf-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; }
.pf-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--card); font-size: 12px; color: var(--accent); }
.pf-act span { color: var(--text); }
.pf-act.on { color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 10px; border-radius: 14px; overflow: hidden; }
.pf-cell { position: relative; aspect-ratio: 1; background: var(--card2); }
.pf-cell img, .pf-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-cell.vid span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 1px 4px #000; }
/* запись голосового: панель поверх строки ввода, замочек над кнопкой */
.composer { position: relative; }
.composer .b-mic { position: relative; z-index: 3; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .1s; }
.composer.recording .b-mic { background: var(--danger); color: #fff; transform: scale(1.35); box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger) 25%, transparent); }
.composer.locked .b-mic { visibility: hidden; }
.rec-ui { position: absolute; inset: 0 0 var(--safe-b) 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 0 64px 0 14px; background: var(--bg2); animation: fadeIn .15s; }
.composer.locked .rec-ui { padding-right: 10px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2 } }
.rec-tt { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 40px; }
.rec-hint { flex: 1; text-align: center; color: var(--muted); font-size: 13px; animation: nudge 1.4s infinite; }
@keyframes nudge { 50% { transform: translateX(-6px) } }
.rec-cancel { color: var(--danger); background: none; }
.rec-send { margin-left: auto; background: var(--accent) !important; color: #fff; }
.rec-lock { position: absolute; right: 12px; bottom: calc(76px + var(--safe-b)); z-index: 5; width: 40px; padding: 10px 0 8px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; --k: 0;
  transform: translateY(calc(var(--k) * -24px)); animation: lockIn .3s var(--spring); }
.rec-lock .lk { color: color-mix(in srgb, var(--accent) calc(var(--k) * 100%), var(--muted)); }
.rec-lock .ar { opacity: calc(1 - var(--k)); animation: recUp 1.2s infinite; }
.rec-lock svg { width: 18px; height: 18px; }
@keyframes lockIn { from { transform: translateY(20px); opacity: 0 } }
@keyframes recUp { 50% { transform: translateY(-4px) } }
/* запись кружка: кольцо прогресса и вспышка */
.circle-rec { transition: background .25s; }
.cr-wrap { position: relative; width: 270px; height: 270px; --p: 0; }
.cr-wrap video, .circle-rec .cr-wrap video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transform: scaleX(-1); border: none; display: block; }
.circle-rec.back .cr-wrap video { transform: none; }
.cr-ring { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); }
.cr-ring circle { fill: none; stroke: var(--danger); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p) * 100); transition: stroke-dashoffset .25s linear; }
.circle-rec .cr-wrap { --p: inherit; }
.circle-rec.front-flash { background: #fff; }
.circle-rec.front-flash .tt { color: #111 !important; }
.circle-rec.front-flash .call-btn:not(.red) { background: rgba(0,0,0,.12); color: #111; }
.call-btn.flash { font-size: 22px; }
.call-btn.flash.on { background: #ffd60a; color: #111; }
/* звонок */
.call-screen { animation: fadeIn .25s; }
.call-screen.closing { animation: fadeOut .2s forwards; }
.call-screen .info { transition: opacity .4s; }
.call-screen .info.faded { opacity: 0; }
.call-screen .avatar.xl { box-shadow: 0 0 0 0 rgba(255,255,255,.25); animation: ring 2s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.3) } 100% { box-shadow: 0 0 0 26px rgba(255,255,255,0) } }
.call-screen .acts { flex-wrap: wrap; justify-content: center; }
/* доступы */
.perm-row .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; flex: none; }
.perm-st.ok { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.perm-st.ok svg { width: 18px; height: 18px; }
.tb-pv.pro-cell { opacity: .5; border: 1.5px dashed var(--line); }

/* ---------- 1.2: календарь — настройки отображения, минимализм, ночные смены ---------- */
.day.other { opacity: 1; }
.day.other .num { opacity: .35; }
.day.other .chip-s, .day.other .mbars, .day.other .dots, .day.other .ev-line { opacity: var(--adj, .4); }
.chip-s.ovs { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -3px; }
.chip-s.ove { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -3px; }
.chip-s.ove .l1 { opacity: .8; }
.mbars { display: flex; flex-direction: column; gap: 3px; padding: 2px 1px 0; }
.mbar { display: block; height: 6px; border-radius: 3px; background: var(--chc); }
.mbar.ovs { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -3px; }
.mbar.ove { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -3px; width: 55%; }
.mbar.partner { background: repeating-linear-gradient(90deg, var(--chc) 0 6px, transparent 6px 9px); }
.mbars + .dots, .dots { margin-top: 3px; }
.dots i { width: 6px; height: 6px; }
.disp-sheet { display: flex; flex-direction: column; padding: 0 !important; overflow: hidden !important; }
.ds-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t, 0px)) 12px 8px; }
.ds-head h3 { margin: 0; font-size: 20px; }
.ds-prev { margin: 0 8px; border-radius: 14px; flex: none; }
.ds-prev .day { min-height: 74px; }
.ds-body { flex: 1; overflow-y: auto; padding: 4px 14px 20px; -webkit-overflow-scrolling: touch; }
.ds-foot { padding: 8px 14px calc(10px + var(--safe-b, 0px)); border-top: 1px solid var(--line); background: var(--bg); }
.rrow .rd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); flex: none; position: relative; }
.rrow .rd.on { border-color: var(--text); }
.rrow .rd.on::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--text); }
.sch { display: inline-flex; margin-right: 4px; }
.sch i { width: 16px; height: 16px; border-radius: 50%; margin-right: -5px; border: 2px solid var(--card); }
.hol-opts { display: flex; justify-content: space-around; padding: 14px 8px; }
.hol-o { width: 40px; height: 40px; border-radius: 50%; background: var(--c); }
.hol-o.frame { background: color-mix(in srgb, var(--c) 30%, var(--card2)); box-shadow: inset 0 0 0 3px var(--c); }
.hol-o.on { outline: 3px solid var(--text); outline-offset: 3px; }
.adj-box { padding: 14px 16px 12px; }
.adj-v { text-align: center; font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.adj { width: 100%; accent-color: var(--accent); }
.ai-type.cyc { cursor: pointer; }

/* «Молния» */
.bolt-bar { position: fixed; left: 10px; right: 10px; top: calc(6px + env(safe-area-inset-top, 0px)); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; box-sizing: border-box; border-radius: 16px; background: linear-gradient(135deg, #ffd60a, #ff9f0a); color: #1a1200; box-shadow: 0 8px 24px rgba(255, 159, 10, .35); max-width: 560px; margin: 0 auto; animation: boltIn .4s var(--ease) both; }
.bolt-bar .bz { font-size: 20px; animation: boltZap 1.6s infinite; }
.bolt-bar .bt { text-align: left; font-weight: 700; color: inherit; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bolt-bar .bd { background: #1a1200; color: #ffd60a; border-radius: 12px; padding: 7px 12px; font-weight: 700; flex: none; }
/* супер-задача сдвигает вниз всё: календарь, шапки чатов, страницы */
body.has-bolt { --safe-t: calc(env(safe-area-inset-top, 0px) + 56px); }
@keyframes boltIn { from { transform: translateY(-120%); } }
@keyframes boltZap { 0%, 80%, 100% { transform: none; } 85% { transform: scale(1.3) rotate(-10deg); } 90% { transform: scale(1.1) rotate(8deg); } }
.task-row.bolt { box-shadow: inset 3px 0 0 #ffb300; }
.task-row.bolt .tt { font-weight: 600; }
.qbolt { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, #ffd60a 25%, var(--card2)); font-size: 18px; flex: none; }

/* кружок: запись через холст */
.cr-wrap canvas { width: 100%; height: 100%; border-radius: 50%; display: block; background: #111; }
.call-btn:disabled { opacity: .5; }
/* звонок в ленте — системная строка */
.sys-call { align-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 6px auto; padding: 6px 12px; border-radius: 14px; background: var(--card2); color: var(--muted); font-size: 13px; user-select: none; max-width: 90%; }
.sys-call .sc-ic { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ok, #30d158) 20%, transparent); color: var(--ok, #30d158); }
.sys-call .sc-ic svg { width: 13px; height: 13px; }
.sys-call.missed { color: var(--danger); }
.sys-call.missed .sc-ic { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.sys-call .sc-tm { font-size: 11px; opacity: .7; }
/* загрузка файлов */
.upl { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; opacity: .9; min-width: 120px; }
.upl-bar { flex: 1; height: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 22%, transparent); overflow: hidden; }
.upl-bar i { display: block; height: 100%; width: 0; background: currentColor; border-radius: 2px; transition: width .2s; }
.upl.err { color: var(--danger); }
.circle .upl { position: absolute; left: 16%; right: 16%; bottom: 14%; color: #fff; text-shadow: 0 1px 2px #000; }
.media .upl { position: absolute; left: 8px; right: 8px; bottom: 26px; color: #fff; text-shadow: 0 1px 2px #000; }
.media { position: relative; }
.sys-call.rej .sc-ic { background: var(--card); color: var(--muted); }

/* iPhone: инструкция по «Командам» */
.sc-intro { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; line-height: 1.4; }
.sc-url { font-family: ui-monospace, monospace; font-size: 12px; background: var(--card2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; word-break: break-all; color: var(--muted); }
.sc-act { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 12px; padding: 9px 12px; margin: 6px 0; }
.sc-ai { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #5b8cff, #a35bff); font-size: 16px; flex: none; }
.sc-as { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sc-chip { display: inline-block; background: color-mix(in srgb, #5b8cff 22%, transparent); color: #5b8cff; border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.sc-preview { border: 1px dashed var(--line); border-radius: 14px; padding: 6px 10px; margin-top: 10px; }
.sc-arrow { text-align: center; color: var(--muted); line-height: 1; }
.guide .chip { min-height: 0; padding: 2px 8px; font-size: 12px; margin-left: 4px; }

/* график с фото */
.ai-photo { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; padding: 12px 14px; border-radius: 16px; margin: 10px 0 4px; background: linear-gradient(135deg, color-mix(in srgb, #7c8cff 22%, var(--card)), var(--card)); border: 1px solid var(--line); }
.ph-badge { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--card2); font-weight: 800; flex: none; }
.ph-badge.sm { min-width: 24px; height: 24px; font-size: 12px; }
.ph-code select { width: 100%; margin-top: 4px; }
.item.off { opacity: .45; }
.ph-scan { font-size: 64px; position: relative; display: inline-block; overflow: hidden; }
.ph-scan i { position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: phScan 1.6s ease-in-out infinite; }
@keyframes phScan { 0%, 100% { top: 10%; } 50% { top: 85%; } }
.pay-soon { text-align: center; padding: 14px; border-radius: 14px; background: var(--card2); color: var(--muted); font-weight: 600; }

/* 1.3: кружки — обрезка по кругу и на iPhone; полоска прослушивания; звонки */
.cwrap { transition: width .25s var(--ease), height .25s var(--ease); }
.cwrap.active { width: 260px; height: 260px; }
.cclip { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(white, black); isolation: isolate; transform: translateZ(0); background: #000; }
.cclip video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.cwrap.broken .cclip::after { content: 'Кружок в старом формате — откройте на Android или в браузере на компьютере'; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: #fff; font-size: 12px; }
.np-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.np-bar button { flex: none; color: var(--accent); }
.np-bar .np-play { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.np-bar .np-play svg { width: 15px; height: 15px; }
.np-info { min-width: 0; } .np-t { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-prog { height: 4px; border-radius: 2px; background: var(--card2); margin-top: 5px; cursor: pointer; touch-action: none; position: relative; }
.np-prog::before { content: ''; position: absolute; inset: -8px 0; }
.np-prog i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; }
.np-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.np-rate { font-weight: 700; font-size: 13px; padding: 2px 6px; border-radius: 8px; background: var(--card2); }
.np-x svg { width: 16px; height: 16px; color: var(--muted); }
.call-screen .acts { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cb-w { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cb-w span { font-size: 11px; color: #fff; opacity: .8; }
.call-screen .info.faded { opacity: 1; }
.call-screen .info.faded > * { opacity: 0; transition: opacity .4s; }

/* календарь: выходные красным, режим карандаша */
.day.weekend.wred .num, .wdays .we { color: var(--danger); }
body.editing .ai-fab { display: none; }
body.editing .edit-close { bottom: calc(108px + var(--safe-b)); left: auto; right: 16px; }

/* помощник: без прыжков иконки, микрофон не меняет размер, поле ввода без тёмной полосы */
.ai-orb { animation: none !important; }
.ai-btn { animation: none; }
.ai-btn.mic.rec { animation: recRing 1.2s infinite; transform: none !important; }
@keyframes recRing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.iconbtn.mic.rec { animation: recRing 1.2s infinite; }
.ai-bar { background: transparent; border-top: 0; }
.ai-field { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.ai-field textarea { color: var(--text); background: transparent !important; }
.screen.from-right, .screen.from-left { animation-duration: .24s; }

/* офлайн */
.netbadge { position: fixed; top: calc(var(--safe-t) + 6px); left: 50%; right: auto; transform: translateX(-50%); z-index: 61; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: #2b2b33; color: #fff; padding: 5px 12px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.2); white-space: nowrap; }
.netbadge i { width: 8px; height: 8px; border-radius: 50%; background: #ff9f0a; }

/* «Ещё»: порядок и скрытие */
.link-btn { color: var(--accent); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.tscope { margin: 0 0 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tscope::-webkit-scrollbar { display: none; } .tscope .chip { flex: none; } .tscope .chip.dim { opacity: .5; }

/* ---------- отношения: минимализм ---------- */
.lv-hero { position: relative; text-align: center; padding: 22px 16px 20px; border-radius: 28px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, #ff6b9a 22%, var(--card)) 0%, var(--card) 70%); border: 1px solid var(--line); overflow: hidden; }
.lv-pair { display: flex; justify-content: center; align-items: center; }
.lv-ava { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #ff8fb1, #b48cff) center/cover; color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; border: 3px solid var(--card); }
.lv-ava.ghost { background: var(--card2); color: var(--muted); }
.lv-heart { width: 30px; height: 30px; margin: 0 -8px; z-index: 1; border-radius: 50%; background: #fff; color: #ff3b6b; display: grid; place-items: center; font-size: 16px; box-shadow: 0 4px 12px rgba(255,59,107,.3); }
.lv-heart.off { color: var(--muted); box-shadow: none; background: var(--card2); }
.lv-names { margin-top: 10px; font-weight: 700; font-size: 17px; } .lv-names span { color: var(--muted); font-weight: 400; }
.lv-days { font-size: 54px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; margin-top: 8px; background: linear-gradient(135deg, #ff4f8b, #9b6bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lv-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.lv-soon { display: inline-block; margin-top: 10px; font-size: 12.5px; padding: 5px 10px; border-radius: 12px; background: color-mix(in srgb, #ff6b9a 14%, transparent); }
.lv-set { margin-top: 12px; padding: 9px 14px; border-radius: 14px; background: color-mix(in srgb, #ff6b9a 16%, transparent); color: var(--text); font-weight: 600; }
.lv-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.lv-acts button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.lv-acts i { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-style: normal; font-size: 22px; color: var(--accent); }
.lv-acts i svg { width: 22px; height: 22px; }
.lv-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; margin-bottom: 14px; }
.lv-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.lv-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.lv-d { width: 72px; color: var(--muted); font-size: 14px; }
.lv-sh { padding: 3px 9px; border-radius: 8px; background: var(--c); color: #111; font-weight: 600; font-size: 13px; }
.lv-free { color: var(--ok, #30d158); font-weight: 600; font-size: 14px; }
.lv-free-days { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-free-days span { padding: 5px 10px; border-radius: 12px; background: color-mix(in srgb, var(--ok, #30d158) 14%, transparent); font-size: 13px; }

/* ---------- игры ---------- */
.g-list { display: flex; flex-direction: column; gap: 10px; }
.g-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--text); }
.g-emo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--c) 18%, transparent); flex: none; }
.g-top { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 10px; }
.g-pl { flex: 1; max-width: 150px; text-align: center; padding: 10px; border-radius: 16px; background: var(--card); border: 2px solid transparent; transition: border-color .2s; }
.g-pl.on { border-color: var(--accent); }
.g-pl b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .g-pl span { font-size: 20px; font-weight: 700; }
.g-vs { color: var(--muted); font-weight: 700; }
.g-status { text-align: center; min-height: 24px; font-weight: 600; color: var(--muted); margin-bottom: 12px; } .g-status.end { color: var(--text); font-size: 20px; }
.g-board { display: flex; justify-content: center; margin-bottom: 16px; }
.g-ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(330px, 86vw); }
.g-cell { aspect-ratio: 1; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-size: 54px; font-weight: 300; display: grid; place-items: center; }
.g-cell.win { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.gx { color: #5b8cff; } .go { color: #ff6b8a; }
.g-c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: min(360px, 92vw); padding: 8px; border-radius: 18px; background: #3d55d6; }
.g-col { display: flex; flex-direction: column; gap: 4px; padding: 0; background: none; }
.g-col i { aspect-ratio: 1; border-radius: 50%; background: var(--bg); display: block; transition: background .2s; }
.g-col i.p0 { background: #ff4d4d; } .g-col i.p1 { background: #ffd23f; } .g-col i.win { box-shadow: 0 0 0 3px #fff inset; }
.g-col:not(:disabled):active i:first-child { background: color-mix(in srgb, #fff 40%, var(--bg)); }
.g-rps { width: min(340px, 90vw); text-align: center; }
.g-score { font-size: 42px; font-weight: 800; letter-spacing: 2px; }
.g-last { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 44px; min-height: 64px; margin: 8px 0 14px; } .g-last small { font-size: 13px; color: var(--muted); } .g-last.muted { font-size: 15px; }
.g-picks { display: flex; justify-content: center; gap: 12px; margin-bottom: 10px; }
.g-pick { width: 84px; height: 84px; border-radius: 24px; background: var(--card); border: 2px solid var(--line); font-size: 40px; }
.g-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--card)); }

/* мастер обоев для iPhone */
.iw { position: fixed; inset: 0; z-index: 80; background: #0d0d10; color: #fff; display: flex; flex-direction: column; animation: fadeIn .2s; }
.iw.closing { animation: fadeOut .2s forwards; }
.iw-top { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 8px) 14px 6px; }
.iw-top .iconbtn { color: #fff; }
.iw-prog { flex: 1; display: flex; gap: 6px; margin-right: 44px; } .iw-prog i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); transition: background .3s; } .iw-prog i.on { background: #fff; }
.iw-body { flex: 1; overflow: auto; padding: 8px 20px calc(var(--safe-b) + 16px); display: flex; flex-direction: column; }
.iw-art { display: flex; justify-content: center; padding: 10px 0 18px; }
.iw-phone { position: relative; width: 190px; height: 330px; border-radius: 34px; background: #000; border: 3px solid #333; padding: 34px 12px 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); overflow: hidden; }
.iw-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 60px; height: 16px; border-radius: 10px; background: #1a1a1a; }
.iw-ttl { font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.iw-sc { display: flex; flex-direction: column; gap: 6px; padding: 9px; border-radius: 12px; background: linear-gradient(135deg, #5b8cff, #3a6df0); font-size: 18px; width: 74px; height: 64px; }
.iw-sc span { font-size: 9px; font-weight: 600; } .iw-sc.dim { background: #2a2a30; }
.iw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.iw-btn { position: absolute; left: 14px; right: 14px; bottom: 18px; text-align: center; padding: 8px; border-radius: 12px; background: #0a84ff; font-size: 11px; font-weight: 700; }
.iw-alert { position: absolute; left: 14px; right: 14px; bottom: 34px; background: #2c2c2e; border-radius: 14px; padding: 10px; font-size: 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; animation: pop .4s .6s both; }
.iw-alert b { color: #0a84ff; font-size: 11px; }
.iw-row { background: #1c1c1e; border-radius: 10px; padding: 9px; font-size: 10.5px; margin-bottom: 6px; } .iw-row.sm { color: #30d158; }
.iw-hand { position: absolute; font-size: 28px; right: 34px; bottom: 26px; animation: iwTap 1.6s ease-in-out infinite; }
@keyframes iwTap { 0%, 100% { transform: translate(0, 0) scale(1); } 45% { transform: translate(-10px, -6px) scale(1); } 55% { transform: translate(-10px, -6px) scale(.85); } }
.iw-h { font-size: 26px; line-height: 1.15; margin: 0 0 10px; font-weight: 800; }
.iw-d { color: rgba(255,255,255,.65); font-size: 15px; margin: 0 0 22px; line-height: 1.4; }
.iw-main { background: #fff !important; color: #000 !important; font-weight: 700; margin-top: auto; }
.iw-more { display: block; width: 100%; padding: 13px; margin-top: 8px; border-radius: 14px; color: #fff; font-weight: 600; background: rgba(255,255,255,.08); }
.iw-more + .iw-more { background: none; color: rgba(255,255,255,.6); font-weight: 500; font-size: 14px; }
.auto-banner { position: fixed; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); z-index: 19; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); max-width: 560px; margin: 0 auto; }
.auto-banner > svg { color: var(--ok, #30d158); } .ab-x { color: var(--muted); padding: 4px 6px; }
.screen:has(.update-banner:not(.hidden)) .auto-banner { display: none; }

/* «Значок» в ячейке: кружочек цвета смены со значком */
.chip-s.icon-only { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chip-s.icon-only .l1 { background: none !important; box-shadow: none !important; padding: 0; overflow: visible; }
.ic-circ { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--chc); font-style: normal; font-size: 13px; line-height: 1; }
.chip-s.ev .ic-circ { background: color-mix(in srgb, var(--chc) 35%, transparent); box-shadow: inset 0 0 0 1.5px var(--chc); }
.chip-s.icon-only .l2 { border-radius: 6px; padding: 0 4px; }
@media (max-width: 360px) { .ic-circ { width: 20px; height: 20px; font-size: 11px; } }
.chip-s .ic { font-style: normal; margin-right: 2px; }

/* кружки: ровный круг, полоска перемотки и кнопки под ним */
.msg.circle { gap: 6px; }
.msg.circle .cwrap { width: 220px; height: 220px; transition: width .25s var(--ease), height .25s var(--ease); }
.msg.circle.active .cwrap { width: 264px; height: 264px; }
.msg.circle .cclip video { width: 100% !important; height: 100% !important; border-radius: 0 !important; object-fit: cover; }
.msg.circle .csnd { right: 14%; bottom: 10%; }
.msg.circle.active .csnd { display: none; }
.cbar { display: flex; align-items: center; gap: 8px; width: 220px; padding: 4px 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: width .25s var(--ease); }
.msg.circle.active .cbar { width: 264px; }
.cb-play, .cb-dl { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.cb-play { background: var(--accent); color: #fff; } .cb-play svg { width: 13px; height: 13px; }
.cb-dl { color: var(--muted); } .cb-dl svg { width: 16px; height: 16px; }
.cb-track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--card2); touch-action: none; cursor: pointer; }
.cb-track::before { content: ''; position: absolute; inset: -12px 0; }
.cb-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 2px; }
.cb-track b { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); opacity: 0; transition: opacity .2s; }
.msg.circle.active .cb-track b { opacity: 1; }
.cb-t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.msg.circle.broken .cclip::after { content: 'Кружок в старом формате — не воспроизводится на iPhone'; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: #fff; font-size: 12px; }
.safety-banner { position: relative; padding-right: 34px !important; } .sb-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; color: inherit; opacity: .6; font-size: 13px; }

/* помощник: кнопка микрофона ровно по центру, пульсация отдельным кольцом */
.ai-btn { padding: 0 !important; line-height: 0; position: relative; display: inline-flex !important; align-items: center; justify-content: center; }
.ai-btn svg { width: 20px; height: 20px; margin: 0; display: block; }
.ai-btn.mic.rec { animation: none !important; box-shadow: none !important; }
.ai-btn.mic.rec::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--danger); opacity: .6; animation: recPulse 1.2s ease-out infinite; pointer-events: none; }
@keyframes recPulse { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.25); opacity: 0; } }
.ai-field { overflow: visible; }
.ai-field.recording { border-color: var(--danger); }
.ai-field.recording textarea::placeholder { color: var(--danger); }
.ai-btn.hidden { display: none !important; }

/* карты: выданные и чужие */
.dc-shared { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 7px; }
.dcard { position: relative; }
.cardview.secure .cv-code { position: relative; overflow: hidden; }
.cv-wm { position: absolute; inset: -40% -20%; transform: rotate(-24deg); font-size: 11px; color: rgba(0,0,0,.13); line-height: 2.4; word-spacing: 6px; pointer-events: none; user-select: none; }
.nosel { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cardview.hidden-code .cv-code { filter: blur(18px); }

/* морской бой */
.sea-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
.sea-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.sea-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 6px; border-radius: 14px; background: color-mix(in srgb, #2b9bb5 22%, var(--card)); }
.sea-grid.big { width: min(340px, 92vw); } .sea-grid.small { width: min(190px, 52vw); gap: 1px; padding: 4px; }
.sea-c { aspect-ratio: 1; border-radius: 4px; background: color-mix(in srgb, #5ec8e5 30%, var(--bg)); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); font-style: normal; padding: 0; min-width: 0; }
.sea-grid.small .sea-c { font-size: 9px; border-radius: 2px; }
.sea-c.ship { background: #5b6b80; }
.sea-c.hit { background: #ff9f43; color: #fff; } .sea-c.sunk { background: #e5484d; color: #fff; }
.sea-c.miss { color: #2b9bb5; }
.enemy .sea-c:not(:disabled):active { background: color-mix(in srgb, var(--accent) 40%, var(--bg)); }

/* ---------- уведомления: тёмная плашка снизу ---------- */
.toast.tg { top: auto; bottom: calc(96px + var(--safe-b)); left: 12px; right: 12px; transform: none; margin: 0 auto; max-width: 520px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(30, 30, 34, .94); color: #fff; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 14.5px; line-height: 1.35; animation: tgIn .3s var(--spring); z-index: 95; }
.toast.tg.closing { animation: tgOut .22s var(--ease) forwards; }
body.hide-tabbar .toast.tg, body.editing .toast.tg { bottom: calc(18px + var(--safe-b)); }
.chat-page ~ .toast.tg { bottom: calc(80px + var(--safe-b)); }
.tg-ic { font-size: 16px; flex: none; width: 22px; text-align: center; }
.tg-t { flex: 1; min-width: 0; }
.toast.tg.undo button { color: #6fb6ff; font-weight: 700; font-size: 14.5px; padding: 4px 2px; flex: none; text-transform: none; }
.tg-cd { position: relative; width: 26px; height: 26px; flex: none; display: grid; place-items: center; }
.tg-cd svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.tg-cd circle { fill: none; stroke: #6fb6ff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 62.8; stroke-dashoffset: 0; animation: tgCd var(--ms, 3000ms) linear forwards; }
.tg-cd b { font-size: 12px; font-weight: 700; }
@keyframes tgCd { to { stroke-dashoffset: 62.8; } }
@keyframes tgIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes tgOut { to { opacity: 0; transform: translateY(12px); } }

/* ---------- свайп «Удалить»: аккуратная кнопка под строкой ---------- */
.sw-wrap { border-radius: inherit; }
.sw-del { inset: 0; justify-content: flex-end; padding: 0; font-size: 12px; font-weight: 600; }
.sw-del > svg, .sw-del > span { position: relative; }
.sw-del { flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; }
.sw-del > svg { width: 22px; height: 22px; margin-right: 34px; }
.sw-del > span { width: 96px; text-align: center; margin-right: 0; line-height: 1; }
.sw-wrap.far .sw-del > svg { margin-right: 34px; }
.sw-wrap > .sw-row { will-change: transform; }

/* ---------- кружочки-отметки по всему приложению ---------- */
input[type=checkbox]:not(.switch input) { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 70%, transparent); background: transparent; display: inline-grid; place-items: center; flex: none; margin: 0; cursor: pointer; transition: background-color .18s, border-color .18s, transform .18s var(--spring); }
input[type=checkbox]:not(.switch input)::after { content: ''; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2.4px 2.4px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .18s var(--spring); }
input[type=checkbox]:not(.switch input):checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:not(.switch input):checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input[type=checkbox]:not(.switch input):active { transform: scale(.9); }
input[type=checkbox]:not(.switch input):disabled { opacity: .5; }
.task-row .ck { width: 24px; height: 24px; border: 2px solid color-mix(in srgb, var(--muted) 70%, transparent); transition: background-color .18s, border-color .18s, transform .18s var(--spring); }
.task-row .ck svg { width: 14px; height: 14px; stroke-width: 3; }
.task-row.done .ck { background: var(--accent); border-color: var(--accent); }
.task-row.bolt:not(.done) .ck { border-color: #ffb300; }
.task-row .ck:active { transform: scale(.88); }

/* превью виджетов с подписями размеров */
.wg-gallery figure, .wg-fig { margin: 0; } .wg-fig { margin-bottom: 14px; }
.wg-gallery figcaption, .wg-fig figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.wg-m { width: 100%; }
.upd-bar { height: 8px; border-radius: 4px; background: var(--card2); overflow: hidden; margin: 6px 4px; } .upd-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* техобслуживание */
.maint { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px 26px; text-align: center; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, #ff9f0a 18%, var(--bg)), var(--bg)); color: var(--text); }
.maint h2 { margin: 6px 0; font-size: 26px; } .maint p { margin: 4px 0; color: var(--muted); max-width: 420px; line-height: 1.45; }
.maint { animation: mtIn .5s ease-out both; }
.mt-scene { width: min(340px, 100%); aspect-ratio: 320 / 154; } .mt-scene svg { display: block; width: 100%; height: 100%; } .mt-scene { margin-bottom: 4px; user-select: none; -webkit-user-drag: none; }
.mt-cd { font-size: 44px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; margin: 10px 0 2px; }
.maint .btn { margin-top: 18px; }
@keyframes mtIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- исправления вида 1.3.14 ---------- */
/* свайп-строки внутри списков: без вырезов по углам и без красной каймы — кнопка «Удалить» видна только при свайпе */
.sw-wrap { border-radius: 0; background: var(--card); }
.group > .sw-wrap:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.group > .sw-wrap:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.group > .sw-wrap + .sw-wrap > .sw-row, .group > .sw-wrap + .item, .group > .item + .sw-wrap > .sw-row { border-top: 1px solid var(--line); }
.sw-wrap > .sw-row { border-radius: 0 !important; border-bottom: 0 !important; margin: 0 !important; }
.sw-del { opacity: 0; transition: opacity .12s; }
.sw-wrap.sw-on .sw-del { opacity: 1; }
/* кружочки-отметки: без отступов полей ввода */
input[type=checkbox]:not(.switch input) { padding: 0 !important; min-height: 0 !important; line-height: 0; box-sizing: border-box; position: relative; }
input[type=checkbox]:not(.switch input)::after { position: absolute; left: 50%; top: 50%; margin: -5px 0 0 -6px; transform: rotate(-45deg) scale(0); }
input[type=checkbox]:not(.switch input):checked::after { transform: rotate(-45deg) scale(1); }
/* карта: кнопки с воздухом */
.cardview .btn.block { margin-top: 14px !important; }
.cardview .btnrow { margin-top: 10px; }
.cardview .group { margin-top: 12px; }
/* отчёты: крупнее */
.rep-stats b { font-size: 30px; letter-spacing: -.5px; }
.rep-stats .small { font-size: 14px; }
.rep-list .item { font-size: 17px; min-height: 56px; }
.rep-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 45%, transparent); font-size: 17px; flex: none; }
.rep-v { font-weight: 600; text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.rep-v small { font-size: 13px; color: var(--muted); font-weight: 400; }

/* «Своё» оформление: карточки тем */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* обязательное обновление — поверх всего приложения */
.force-upd { position: fixed; inset: 0; z-index: 210; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 26px calc(30px + env(safe-area-inset-bottom)); text-align: center; background: var(--bg); color: var(--text); animation: mtIn .4s ease-out both; }
.force-upd .fu-ic { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 34px rgba(108, 124, 255, .35); margin-bottom: 10px; }
.force-upd h2 { margin: 4px 0; font-size: 26px; } .force-upd p { margin: 2px 0; color: var(--muted); max-width: 380px; line-height: 1.45; }
.force-upd .btn { margin-top: 16px; min-width: 240px; } .force-upd .link-btn { margin-top: 6px; color: var(--muted); }

/* Отношения: вопрос дня и капсула времени */
.q-text { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 2px 0 12px; }
.q-ans { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; white-space: pre-wrap; }
.q-ans.them { background: color-mix(in srgb, var(--heart, #ff375f) 12%, var(--bg)); }
.q-ans b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.q-wait { font-size: 14px; color: var(--muted); padding: 8px 2px; } .q-wait.hot { color: var(--heart, #ff375f); font-weight: 600; }
.q-in { width: 100%; margin-bottom: 10px; }
.cap { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.cap:first-of-type { border-top: 0; }
.cap-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.cap.open .cap-ic { background: color-mix(in srgb, var(--heart, #ff375f) 14%, var(--bg)); }
.cap-h { font-weight: 600; } .cap .sub { font-size: 13px; color: var(--muted); }
.cap-text { white-space: pre-wrap; margin-top: 4px; line-height: 1.45; }
.caps .cap-new { margin-top: 10px; }

/* календарь, «только значок»: смены друга и партнёра того же размера, что и свои */
.chip-s.icon-only.friend, .chip-s.icon-only.partner { outline: none; }
.chip-s.icon-only .ic-fr { background: var(--fc) !important; color: #fff; font-weight: 800; font-style: normal; }
.chip-s.icon-only.partner .ic-circ { box-shadow: 0 0 0 1.5px var(--heart); }

/* превью виджетов 1.4: супер-задача, компактный средний, календарь в большом */
.wg-bolt { background: #ffcc00; color: #1a1200; font-weight: 700; font-size: 12px; border-radius: 9px; padding: 5px 8px; margin: 4px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-t1 { font-weight: 800; font-size: 14px; margin: 4px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-foot { font-size: 11px; opacity: .65; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-mh { display: flex; justify-content: space-between; align-items: baseline; margin: 2px 0 6px; } .wg-mh b { font-size: 17px; } .wg-mh span { font-size: 11px; opacity: .65; }
.wg-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wg-wd { font-size: 9px; text-align: center; opacity: .6; font-weight: 600; } .wg-wd.off { color: #ff8a8a; opacity: 1; }
.wg-c { border-radius: 7px; text-align: center; padding: 2px 0; min-height: 26px; background: color-mix(in srgb, var(--c, transparent) 25%, transparent); }
.wg-c b { display: block; font-size: 10px; } .wg-c i { display: block; font-style: normal; font-size: 10px; line-height: 1.1; min-height: 11px; }
.wg-c.off b { color: #ff8a8a; } .wg-c.td { background: #ff453a; } .wg-c.td b { color: #fff; }

.rep-now { background: var(--card); border-radius: 18px; padding: 14px 16px; margin-top: 14px; }
.rep-now-v { font-size: 17px; margin: 4px 0 10px; } .rep-now-v b { font-size: 22px; }
.rep-bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 15%, transparent); overflow: hidden; } .rep-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* «Ещё»: колокольчик слева сверху, центр уведомлений, мои обращения */
.more-top { display: flex; align-items: center; gap: 10px; } .more-top .inbox-btn { position: relative; order: 2; margin-left: auto; }
.more-top .inbox-btn .badge, .myrep-b { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.myrep-b { position: static; margin-right: 6px; }
.ib-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.ib-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.rp-st { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.rp-st.st-done { background: color-mix(in srgb, var(--ok, #30d158) 16%, transparent); color: var(--ok, #30d158); } .rp-st.st-rejected { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--muted); }

.tm .edited { font-style: normal; opacity: .75; margin-right: 2px; }

/* запись голосового: волна слева и «дышащие» кольца вокруг микрофона */
.rec-wave { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; margin: 0 6px; }
.rec-wave i { flex: none; width: 3px; border-radius: 2px; background: var(--accent); opacity: .85; animation: rwIn .12s ease-out; }
@keyframes rwIn { from { transform: scaleY(.2); } }
.rec-on { position: relative; z-index: 2; background: var(--danger) !important; color: #fff !important; }
.rec-on::before, .rec-on::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: -1; background: color-mix(in srgb, var(--danger) 30%, transparent); transform: scale(calc(1.15 + var(--l, 0) * 1.1)); transition: transform .09s linear; }
.rec-on::after { background: color-mix(in srgb, var(--danger) 14%, transparent); transform: scale(calc(1.35 + var(--l, 0) * 1.9)); transition-duration: .16s; }

/* живые уведомления внутри приложения */
.live-bn { position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 300; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 10px 34px rgba(0, 0, 0, .22), 0 0 0 .5px color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); cursor: pointer; animation: lbIn .38s cubic-bezier(.2, .9, .3, 1.15) both; transition: transform .2s, opacity .2s; }
.live-bn + .live-bn { top: calc(env(safe-area-inset-top, 0px) + 76px); }
.live-bn.out { opacity: 0; transform: translateY(-120%); }
.lb-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--accent) 14%, transparent); overflow: hidden; }
.lb-ic .avatar { width: 38px; height: 38px; font-size: 15px; }
.lb-t { min-width: 0; display: flex; flex-direction: column; } .lb-t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-t span { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes lbIn { from { transform: translateY(-130%); opacity: .4; } }

/* Отношения 1.4: без пары, плитки списков, ссылки, настройка блоков */
.lv-single { text-align: center; padding: 18px 10px 6px; } .lv-big { font-size: 76px; line-height: 1; animation: lvBeat 2.4s ease-in-out infinite; } .lv-single h2 { margin: 8px 0 4px; } .lv-single p { margin: 0 auto; max-width: 320px; }
@keyframes lvBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.08); } 24% { transform: scale(1); } 36% { transform: scale(1.05); } }
.lv-perks { display: grid; gap: 10px; } .lv-perk { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 12px 14px; } .lv-perk > span { font-size: 24px; width: 32px; text-align: center; }
.lv-inv { margin-top: 12px; border: 1.5px solid color-mix(in srgb, var(--heart, #ff375f) 40%, transparent); }
.lv-card, .lv-acts, .shared-box, .lv-hero { margin-bottom: 14px; }
.lv-custom { display: flex; align-items: center; gap: 6px; margin: 6px auto 20px; color: var(--muted); }
.lv-edit { background: var(--card); border-radius: 18px; padding: 12px; margin-bottom: 14px; }
.lv-erow { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid color-mix(in srgb, var(--text) 7%, transparent); background: var(--card); }
.lv-erow.off { opacity: .45; } .lv-eic { font-size: 20px; width: 28px; text-align: center; } .lv-edit .lv-done { margin-top: 12px; }
.lv-sh-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 10px; } .lv-sh-head b { font-size: 19px; }
.lv-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lv-tile { position: relative; overflow: hidden; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 108px; padding: 12px; border-radius: 18px; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 22%, var(--card)), var(--card) 70%); color: var(--text); border: 0; font: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent); }
.lv-tile-e { font-size: 26px; } .lv-tile b { font-size: 15px; } .lv-tile-n { font-size: 12px; color: var(--muted); }
.lv-tile-p { font-size: 12px; margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.lv-tile-img { position: absolute; right: -10px; top: -10px; width: 64px; height: 64px; border-radius: 16px; background-size: cover; background-position: center; opacity: .9; transform: rotate(8deg); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.lv-list2 { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.lv-it { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 12px; } .lv-it.done .lv-it-b { opacity: .5; } .lv-it .lv-ck { margin-top: 3px; }
.lv-it-b { min-width: 0; } .lv-tx { white-space: pre-wrap; } .lv-it .by { font-size: 12px; color: var(--muted); margin-top: 4px; }
.lv-link { display: flex; gap: 10px; align-items: center; } .lv-link-img { width: 64px; height: 64px; flex: none; border-radius: 12px; background-size: cover; background-position: center; background-color: var(--card2); }
.lv-link b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .lv-price { font-weight: 800; font-size: 16px; color: var(--accent); margin-top: 2px; }
.lv-open { display: inline-block; margin-top: 6px; color: var(--accent); }
.lv-recipe { margin-top: 6px; background: color-mix(in srgb, #ff9f0a 10%, var(--bg)); border-radius: 12px; padding: 8px 10px; } .lv-recipe summary { font-weight: 700; cursor: pointer; } .lv-recipe ul, .lv-recipe ol { margin: 4px 0 8px; padding-left: 20px; }
.lb-img { display: block; width: 100%; height: 100%; background-size: cover; background-position: center; }
.q-past { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; } .q-past-it { border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); padding-top: 8px; }
.q-past-a { display: flex; flex-direction: column; font-size: 14px; margin-top: 2px; }

.chip-s.pending { opacity: .55; outline: 1.5px dashed var(--heart) !important; outline-offset: -1.5px; }
.chip-s.pending .l1::after { content: ' ⏳'; }

/* «Моё авто»: быстрые действия под карточкой вместо второй панели над таб-баром */
.car-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0 4px; }
.car-acts button { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 0; }
.car-acts i { width: min(54px, 100%); aspect-ratio: 1; height: auto; border-radius: 18px; display: grid; place-items: center; background: var(--card); color: var(--c); box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent); }
.car-acts button:active i { transform: scale(.94); }

.sea-grid.placing button.sea-c { border: 0; padding: 0; cursor: pointer; font: inherit; }
.sea-fleet { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; margin-top: 10px; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.sea-fleet span.on { color: var(--accent); }
.sea-btns .btn { flex: 1 1 0; min-width: 0; padding: 11px 6px; font-size: 14px; white-space: nowrap; }
.lm-ic { width: 32px; height: 32px; display: grid; place-items: center; font-size: 20px; flex: none; } .vk-login svg { vertical-align: -4px; margin-right: 4px; }
.pf-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* подсказка при первом входе в раздел */
.tip-card { position: fixed; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); z-index: 70; max-width: 520px; margin: 0 auto; display: flex; gap: 12px; padding: 14px; border-radius: 22px; background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); box-shadow: 0 14px 40px rgba(0,0,0,.22), 0 0 0 .5px color-mix(in srgb, var(--text) 12%, transparent); animation: tipIn .42s cubic-bezier(.2,.9,.3,1.1) both; }
.tip-card.out { opacity: 0; transform: translateY(20px); transition: .22s; }
.tip-e { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tip-b { min-width: 0; } .tip-b b { font-size: 16px; } .tip-b p { margin: 3px 0 10px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.tip-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tip-off { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; padding: 6px 0; }
.tip-ok { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 600; }
@keyframes tipIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.car-acts button { min-width: 0; } .car-acts button > :last-child, .car-acts button { overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
@media (max-width: 370px) { .car-acts button { font-size: 11.5px; } }
.ib-it.new b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.ib-it.read { opacity: .7; } .ib-it.read b { font-weight: 500; }
/* крупный системный шрифт: переключатели и подписи сжимаются, а не вылезают */
.seg button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* КНБ: отсчёт 3-2-1 */
.rps-cd { text-align: center; padding: 30px 0; }
.rps-fists { display: flex; justify-content: center; gap: 46px; font-size: 64px; }
.rps-fists .r { transform: scaleX(-1); display: inline-block; }
.rps-fists .shake { display: inline-block; animation: rpsShake .65s ease-in-out infinite; }
.rps-fists .shake.r { animation-name: rpsShakeR; }
.rps-fists.show span { animation: rpsPop .35s cubic-bezier(.2,1.6,.4,1); display: inline-block; }
@keyframes rpsShake { 0%,100% { transform: translateY(0) rotate(0) } 45% { transform: translateY(-18px) rotate(-12deg) } }
@keyframes rpsShakeR { 0%,100% { transform: scaleX(-1) translateY(0) rotate(0) } 45% { transform: scaleX(-1) translateY(-18px) rotate(-12deg) } }
@keyframes rpsPop { 0% { transform: scale(.4) } 100% { transform: scale(1) } }
.rps-fists.show .r { animation-name: rpsPopR; }
@keyframes rpsPopR { 0% { transform: scaleX(-1) scale(.4) } 100% { transform: scaleX(-1) scale(1) } }
.rps-n { font-size: 54px; font-weight: 800; margin: 14px 0 4px; animation: rpsPop .3s ease-out; }
.rps-res { font-size: 22px; font-weight: 700; margin-top: 18px; }
.tip-back { position: fixed; inset: 0; z-index: 69; background: rgba(0,0,0,.28); animation: fadeIn .3s ease both; }
.tip-back.out { opacity: 0; transition: .22s; }
.tip-card.nudge { animation: tipNudge .35s ease; }
@keyframes tipNudge { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
/* переключатель: плавно переезжающая плашка */
.seg.has-pill { position: relative; }
.seg-pill { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 8px; background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .32s cubic-bezier(.3,.9,.3,1), width .32s cubic-bezier(.3,.9,.3,1), opacity .2s; pointer-events: none; z-index: 0; }
.seg.has-pill > button { position: relative; z-index: 1; }
.seg.has-pill > button.on { background: transparent; box-shadow: none; }
.seg > button.hover { color: var(--text); }
/* 1.5: разделы в «Ещё» — как на экране «Домой»: яркая иконка и подпись под ней, без рамок-квадратиков */
.tilegrid { gap: 18px 6px !important; }
.tile { background: none !important; border: 0 !important; box-shadow: none !important; padding: 4px 2px !important; gap: 7px; font-size: 12.5px; line-height: 1.2; text-align: center; }
.tile .ico { width: 58px !important; height: 58px !important; border-radius: 16px !important; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c)) !important; color: #fff !important; box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 30%, transparent); }
.tile .ico svg { width: 28px !important; height: 28px !important; stroke-width: 2.1; }
@media (max-width: 360px) { .tile .ico { width: 50px !important; height: 50px !important; border-radius: 14px !important; } }
/* панель вкладок: активная — цветом, без плашки-квадратика */
#tabbar button.on { background: none !important; color: var(--accent); }
#tabbar button.on svg { transform: scale(1.08); transition: transform .2s var(--ease); }
#tabbar button.hover { color: var(--text); }
#tabbar .tb-ind { display: none !important; }
/* «Что нового»: крупные версии выделены */
.cl-major { margin: 14px 0; padding: 14px 14px 6px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), color-mix(in srgb, #bf5af2 16%, var(--card))); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.cl-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.cl-v { font-size: 19px; font-weight: 800; margin-top: 8px; }
.cl-d { color: var(--muted); }
.cl-minor li { font-size: 14px; }
body.app-fade { opacity: 0; transition: opacity .25s ease; }
.social { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
/* хотелки: карточки товаров */
.wsum { display: flex; justify-content: space-between; align-items: flex-end; padding: 14px 16px; margin: 12px 0; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, #ff7aa8 22%, var(--card)), var(--card)); }
.wsum b { font-size: 22px; font-weight: 800; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wcard { background: var(--card); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 0 var(--line); }
.wcard.done { opacity: .55; }
.wc-img { aspect-ratio: 1; background: #fff center/contain no-repeat; display: grid; place-items: center; font-size: 44px; position: relative; cursor: pointer; }
.wc-img span:first-child:not(.wc-got) { opacity: .5; }
.wc-got { position: absolute; left: 8px; top: 8px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.wc-b { padding: 10px 12px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.wc-t { font-size: 14px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-p { font-size: 17px; font-weight: 800; }
.wc-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-acts { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.wc-go { background: var(--accent); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; }
/* рецепты */
.rc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rc-card { background: var(--card); border-radius: 18px; overflow: hidden; text-align: left; display: flex; flex-direction: column; padding: 0; position: relative; }
.rc-pic { aspect-ratio: 4/3; display: grid; place-items: center; font-size: 46px; background: linear-gradient(135deg, color-mix(in srgb, #f2994a 26%, var(--card2)), var(--card2)) center/cover; }
.rc-card.big .rc-pic { aspect-ratio: 16/9; font-size: 70px; }
.rc-b { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.rc-b b { font-size: 15px; line-height: 1.25; }
.rc-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #f2994a; font-weight: 700; }
.rc-chef { margin-bottom: 6px; }
.rc-chef-h { font-weight: 800; font-size: 15px; margin: 2px 2px 8px; }
.rc-lock { width: 100%; text-align: left; background: linear-gradient(135deg, #2b1d4a, #4a2c6e); color: #fff; border-radius: 20px; padding: 14px; }
.rc-lock .rc-chef-h { color: #fff; }
.rc-lock-b { display: flex; gap: 12px; align-items: center; } .rc-lock .muted { color: rgba(255,255,255,.7) !important; }
.rc-hero { aspect-ratio: 16/9; border-radius: 20px; display: grid; place-items: center; font-size: 84px; background: linear-gradient(135deg, color-mix(in srgb, #f2994a 30%, var(--card2)), var(--card2)) center/cover; }
.rc-ing .item input { width: 20px; height: 20px; accent-color: var(--ok); }
.rc-ing .item input:checked + span { text-decoration: line-through; color: var(--muted); }
.rc-steps { margin: 0; padding-left: 22px; } .rc-steps li { margin: 0 0 10px; line-height: 1.45; }
/* ---------- коллекция тем ---------- */
.theme-card2 { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px; border-radius: 20px; border: 2px solid transparent; background: var(--card); text-align: center; font-size: 14px; }
.theme-card2.on { border-color: var(--accent); }
.theme-card2.locked { opacity: .55; }
.th-own { font-size: 11px; color: var(--ok); font-weight: 600; } .th-own.new { color: #ff9f0a; } .th-lock { font-size: 11px; color: var(--muted); }
.th-ph { position: relative; width: 74px; height: 128px; border-radius: 16px; background: var(--bg); border: 3px solid #111; box-shadow: 0 6px 16px rgba(0,0,0,.18); overflow: hidden; display: block; }
.th-ph.big { width: 96px; height: 166px; margin: 0 auto; }
.th-ph.ghost { background: var(--card2); border-color: var(--line); display: grid; place-items: center; font-size: 30px; }
.th-ph i { position: absolute; display: block; }
.th-ph .th-bar { left: 50%; top: 4px; width: 22px; height: 5px; margin-left: -11px; border-radius: 3px; background: #111; }
.th-ph .th-title { left: 8px; top: 16px; width: 34px; height: 7px; border-radius: 3px; background: var(--tx); opacity: .85; }
.th-ph .th-card { left: 6px; right: 6px; top: 30px; height: 34px; border-radius: 7px; background: var(--cd); padding: 5px; }
.th-ph .th-card.s { top: 70px; height: 20px; }
.th-ph .th-card b { display: block; height: 4px; border-radius: 2px; background: var(--tx); opacity: .45; margin-bottom: 5px; width: 80%; }
.th-ph .th-card b:first-child { background: var(--a); opacity: 1; width: 50%; }
.th-ph .th-tabs { left: 6px; right: 6px; bottom: 6px; height: 16px; border-radius: 8px; background: var(--cd); display: flex; justify-content: space-around; align-items: center; }
.th-ph .th-tabs b { width: 7px; height: 7px; border-radius: 50%; background: var(--tx); opacity: .35; }
.th-ph .th-tabs b:first-child { background: var(--a); opacity: 1; }
.th-ph .th-snow { inset: -154px 0 0 0; will-change: transform; background-image: radial-gradient(circle, #fff 1px, transparent 1.4px), radial-gradient(circle, rgba(255,255,255,.7) .8px, transparent 1.2px); background-size: 14px 14px, 9px 11px; background-position: 0 0, 4px 6px; animation: thSnow 6.6s linear infinite; opacity: .8; }
/* снег на превью темы двигается сдвигом слоя (видеокарта) — на iPhone без рывков; 154 = общий шаг обоих узоров */
@keyframes thSnow { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 154px, 0); } }

/* ---------- Новый год ---------- */
:root[data-theme="newyear"] {
  --bg: #0b1630; --bg2: #0f1d3d; --card: #14244a; --card2: #1b2f5c; --line: #26407a;
  --text: #eef4ff; --muted: #9db0d8; --accent: #ff4d5e; --tab-bg: rgba(20,36,74,.9);
  --shadow: 0 8px 30px rgba(0,0,0,.5); --ok: #3ddc84; color-scheme: dark;
}
:root[data-theme="newyear"] body { background: radial-gradient(120% 60% at 50% 0%, #1a2f63 0%, #0b1630 60%) fixed; }
body:has(.maint) .snow-fx { z-index: 201; }
.snow-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 15; }
/* снежные шапки на иконках разделов и панели вкладок */
.fx-snow .tile .ico { position: relative; overflow: visible; }
.fx-snow .tile .ico::before { content: ''; position: absolute; left: -3px; right: -3px; top: -7px; aspect-ratio: 64/26; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2064%2026%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23e3ecf7%22/%3E%3C/linearGradient%3E%3Cfilter%20id%3D%22s%22%20x%3D%22-10%25%22%20y%3D%22-10%25%22%20width%3D%22120%25%22%20height%3D%22140%25%22%3E%3CfeDropShadow%20dx%3D%220%22%20dy%3D%221.2%22%20stdDeviation%3D%221%22%20flood-color%3D%22%235a6f96%22%20flood-opacity%3D%22.35%22/%3E%3C/filter%3E%3C/defs%3E%3Cpath%20filter%3D%22url%28%23s%29%22%20fill%3D%22url%28%23g%29%22%20d%3D%22M3%2013C1%208%205%203.5%2011%203.2C15%201%2021%200.6%2027%201.6C33%200.4%2040%200.6%2046%202.2C52%201.8%2059%204%2061%208.6C63.2%2011%2062.6%2014%2060.6%2015.2C60%2018.6%2057.6%2019.4%2056.4%2017.2C55.4%2015.6%2053.6%2015.4%2052.4%2016.6C51.6%2021.4%2047.6%2022.4%2046.6%2018.4C45.6%2016%2043.2%2015.8%2041.4%2016.4C38%2017%2033.8%2016.4%2030.8%2016.8C29.6%2017%2028.8%2018.2%2028.6%2020.6C28.2%2024.4%2024%2024.4%2023.6%2020.4C23.4%2018.2%2022%2017.2%2019.8%2017.2C16.4%2017.4%2013.4%2017%2011.2%2017.4C10%2017.6%209.4%2019%208.8%2020.2C7.6%2022.4%204.4%2021.6%204.8%2018.6C5%2016.6%204%2015.2%203%2013Z%22/%3E%3Cpath%20d%3D%22M8%206.4C16%203.4%2030%202.4%2044%204.2C50%204.8%2055%206.4%2058%208.4%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.6%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20opacity%3D%22.9%22/%3E%3C/svg%3E") center/100% 100% no-repeat; pointer-events: none; }
.fx-snow #tabbar button svg { filter: drop-shadow(0 -1.5px 0 #fff); }
.fx-snow #tabbar { border-top: 2px solid rgba(255,255,255,.85); }
.fx-snow .topbar h1::after { content: ' ❄'; font-size: .6em; vertical-align: super; opacity: .8; }
.maint.ny { background: radial-gradient(120% 70% at 50% 0%, #1d3570, #0b1630) !important; color: #eef4ff; } .maint.ny p { color: #9db0d8; } .maint.ny h2::after { content: " 🎄"; }
/* ---------- видеозвонок 1.5 ---------- */
.call-top { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 10px); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 0 12px; pointer-events: none; }
.call-top > * { pointer-events: auto; }
.call-time { position: absolute; left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); pointer-events: none; }
.call-min, .call-pip { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; font-size: 17px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.call-pip { margin-left: auto; }
.call-lock { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); white-space: nowrap; }
.call-screen video.local { top: calc(var(--safe-t) + 56px); transition: top .3s, left .3s, right .3s, bottom .3s, width .3s, height .3s; touch-action: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.call-screen.rear video.local { transform: none; }
.call-screen[data-corner="tl"] video.local { left: 16px; right: auto; }
.call-screen[data-corner="bl"] video.local { left: 16px; right: auto; top: auto; bottom: calc(var(--safe-b) + 150px); }
.call-screen[data-corner="br"] video.local { top: auto; bottom: calc(var(--safe-b) + 150px); }
/* поменять местами: я крупно, собеседник в окошке */
.call-screen.swapped video.local { inset: 0; width: 100%; height: 100%; border-radius: 0; z-index: 0; top: 0; left: 0; right: 0; bottom: 0; }
.call-screen.swapped video.remote { position: absolute; inset: auto; right: 16px; top: calc(var(--safe-t) + 56px); width: 110px; height: 160px; border-radius: 14px; z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.4); touch-action: none; }
.call-screen.swapped[data-corner="tl"] video.remote { left: 16px; right: auto; }
.call-screen.swapped[data-corner="bl"] video.remote { left: 16px; right: auto; top: auto; bottom: calc(var(--safe-b) + 150px); }
.call-screen.swapped[data-corner="br"] video.remote { top: auto; bottom: calc(var(--safe-b) + 150px); }
/* свёрнутый звонок — плавающее окошко поверх приложения */
.call-screen.mini { inset: auto; right: 12px; bottom: calc(var(--safe-b) + 96px); width: 112px; height: 160px; padding: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.45); justify-content: center; cursor: pointer; z-index: 85; touch-action: none; }
.call-screen.mini:not(.is-video) { width: 96px; height: 96px; border-radius: 50%; }
.call-screen.mini .acts, .call-screen.mini .call-top, .call-screen.mini video.local, .call-screen.mini .call-warn, .call-screen.mini .info h2 { display: none !important; }
.call-screen.mini .info { transform: scale(.55); }
.call-screen.mini .info .status { font-size: 20px; }
.call-screen.mini.is-video .info { display: none; }
.call-screen.mini video.remote { inset: 0; width: 100%; height: 100%; border-radius: 0; }
/* окно «картинка в картинке» Android: показываем только видео */
@media (max-width: 320px) and (max-height: 480px) { .call-screen .acts, .call-screen .call-top, .call-screen .info { display: none !important; } .call-screen video.local { width: 34%; height: auto; aspect-ratio: 3/4; top: 6px; right: 6px; } }
/* PIN-код */
.pin-pad { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); animation: fadeIn .2s; }
.pin-pad.full { background: var(--bg); }
.pin-pad.out { opacity: 0; transition: opacity .2s; }
.pin-box { width: min(320px, 92vw); text-align: center; }
.pin-t { font-size: 19px; font-weight: 700; } .pin-sub { min-height: 20px; margin: 4px 0 10px; color: var(--danger); font-size: 14px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 8px 0 26px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text); transition: background .15s; }
.pin-dots i.on { background: var(--text); }
.pin-dots.shake { animation: tipNudge .35s ease; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 22px; justify-content: center; }
.pin-keys button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--card2); color: var(--text); font-size: 30px; font-weight: 400; }
.pin-keys button:active { background: var(--line); }
.pin-keys .pin-del, .pin-keys .pin-bio { background: none; font-size: 26px; }
.pin-cancel { margin-top: 22px; background: none; border: 0; color: var(--accent); font: inherit; font-size: 16px; }
.pin-cancel-sp { display: block; height: 40px; }
.maint.ny .mt-scene { aspect-ratio: 320 / 168; }
/* FAQ */
.faq-it { border-bottom: 1px solid var(--line); }
.faq-it:last-child { border-bottom: 0; }
.faq-it summary { list-style: none; padding: 13px 14px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.faq-it summary::-webkit-details-marker { display: none; }
.faq-it summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; transition: transform .2s; }
.faq-it[open] summary::after { transform: rotate(45deg); }
.faq-it p { margin: 0; padding: 0 14px 14px; color: var(--muted); line-height: 1.45; }
/* без системных стрелочек: полоса прокрутки в поле сообщения и «крутилки» у числовых полей */
textarea { scrollbar-width: none; } textarea::-webkit-scrollbar { display: none; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lv-card textarea, .screen textarea { resize: none; }
/* соцсети — минимально: ряд контурных значков */
.soc-min { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.soc-min a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); text-decoration: none; transition: color .2s, border-color .2s; }
.soc-min a:active, .soc-min a:hover { color: var(--text); border-color: var(--muted); }
.soc-min svg.i { width: 19px; height: 19px; }
/* «Иная» тема: панель плавно выезжает под переключателем */
.theme-drawer { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .35s cubic-bezier(.3,.9,.3,1), opacity .25s, margin .35s; margin-top: 0; }
.theme-drawer.open { grid-template-rows: 1fr; opacity: 1; margin-top: 12px; }
.theme-drawer-in { overflow: hidden; min-height: 0; }
.td-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 2px 10px; }
.seg-theme > button { font-size: 12.5px; padding-left: 2px; padding-right: 2px; }
.soc-min { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.soc-row { display: flex; justify-content: center; gap: 14px; }
.soc-min a { padding: 0; line-height: 0; }
.soc-min .soc-i { width: 21px; height: 21px; display: block; }
/* «печатает…» с прыгающими точками */
.typing { color: var(--accent); font-weight: 500; white-space: nowrap; }
.tdots { display: inline-flex; gap: 2px; margin-left: 3px; vertical-align: middle; }
.tdots b { width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; animation: tdot 1.2s infinite ease-in-out; }
.tdots b:nth-child(2) { animation-delay: .15s; } .tdots b:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .45 } 30% { transform: translateY(-3px); opacity: 1 } }
.pin-logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 12px; display: block; }
.pin-t { padding: 0 12px; line-height: 1.25; }
.pin-bio-big { display: block; margin: 0 auto 14px; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 15px; }

/* ---------- Новый год 2027: снег лежит на карточках, гирлянда, ёлка ---------- */
.fx-snow .pf-card, .fx-snow .group, .fx-snow .lv-card, .fx-snow .rc-card, .fx-snow .wcard, .fx-snow .profile, .fx-snow .g-card { position: relative; }
.fx-snow .pf-card::before, .fx-snow .group::before, .fx-snow .lv-card::before, .fx-snow .rc-card::before, .fx-snow .wcard::before, .fx-snow .profile::before, .fx-snow .g-card::before { content: ''; position: absolute; inset: -1px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2080%2012%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23e6eef8%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20fill%3D%22url%28%23g%29%22%20d%3D%22M0%200h80v4.2c-3%200-4%20.6-5%202.4-.8%201.6-2.8%201.6-3.4-.2-.7-2-2.6-2.4-5.4-2.2-4%20.3-7.2.2-10.4.6-1.4.2-2%201.4-2.2%203.4-.4%203.2-3.6%203.2-4-.2-.2-2-1.4-3-3.6-3.2-3.6-.2-6.6.2-9%20.4-1.2.1-1.8%201.2-2.4%202.4-1%202-3.6%201.6-3.4-.8.2-1.8-.8-2.6-2.4-2.6C3.6%204.4%201.8%204.2%200%204.2Z%22/%3E%3C/svg%3E") 0 0/80px 12px repeat-x; border-radius: inherit; pointer-events: none; z-index: 2; opacity: .95; }
.ny-garland { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) - 2px); height: 26px; z-index: 30; pointer-events: none; }
.ny-garland svg { width: 100%; height: 100%; display: block; }
.ny-garland .b { animation: nyBlink 1.6s ease-in-out infinite; }
.ny-garland .b:nth-child(3n) { animation-delay: -.5s; } .ny-garland .b:nth-child(3n+1) { animation-delay: -1s; }
@keyframes nyBlink { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.fx-snow .topbar h1::after { content: ' 🎄'; font-size: .55em; vertical-align: middle; opacity: 1; }
.ny-banner { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 20px; background: linear-gradient(135deg, #1d3570, #14244a); color: #fff; overflow: hidden; position: relative; }
.ny-banner b { font-size: 17px; } .ny-banner .small { color: #b9c8ea; }
.ny-banner svg { width: 58px; height: 66px; flex: none; }
/* плашка «БЕТА» */
.beta-b { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 6px; border-radius: 6px; background: #ff9f0a; color: #1a1200; vertical-align: middle; margin-left: 6px; line-height: 1.3; }
.tile .ico { position: relative; }
.tile .ico .beta-b { position: absolute; top: -6px; right: -12px; margin: 0; font-size: 9px; padding: 1px 5px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.topbar h1 .beta-b { font-size: 11px; position: relative; top: -4px; }
/* метка бета-версии (ветка develop) */
.beta-ribbon { position: fixed; top: calc(var(--safe-t) + 4px); left: 50%; transform: translateX(-50%); z-index: 250; pointer-events: none; font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 2px 9px; border-radius: 999px; background: #ff9f0a; color: #1a1200; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.rc-meta span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--card); color: var(--muted); }
.rc-steps li::marker { color: #f2994a; font-weight: 700; }
.rc-tip { margin: 14px 0 6px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, #ffd23f 16%, var(--card)); line-height: 1.45; }
.rc-tip b { display: block; margin-bottom: 4px; }
.rc-credit { margin-top: 14px; } .rc-credit a { color: inherit; }
.rc-pic, .rc-hero { background-size: cover; background-position: center; }
/* рецепты пользователей, оценки, комментарии, избранное */
.rc-tabs > button { font-size: 12.5px; padding-left: 2px; padding-right: 2px; }
.rc-card { position: relative; }
.rc-heart { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: rgba(0,0,0,.35); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 2; cursor: pointer; }
.rc-heart.on { color: #ff4d6d; background: rgba(255,255,255,.9); }
.rc-pic { position: relative; }
.rc-lockb { position: absolute; left: 8px; top: 8px; font-size: 14px; background: rgba(0,0,0,.45); border-radius: 8px; padding: 2px 6px; }
.rc-by { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-st { color: #f5a623; }
.rc-rate { display: flex; align-items: center; gap: 2px; margin: 0 0 12px; flex-wrap: wrap; }
.rc-star { border: 0; background: none; font-size: 30px; line-height: 1; padding: 0 1px; color: color-mix(in srgb, var(--muted) 45%, transparent); }
.rc-star.on { color: #f5a623; } .rc-star:disabled { opacity: 1; }
.rc-rate .small { margin-left: 8px; }
.rc-com { padding: 10px 12px; border-radius: 14px; background: var(--card); margin-bottom: 8px; }
.rc-com-t { margin-top: 4px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.rc-com-a { display: flex; gap: 12px; margin-top: 4px; } .rc-com-a .link-btn { color: var(--muted); padding: 0; }
.rc-ed-img { aspect-ratio: 16/9; border-radius: 20px; background: var(--card) center/cover; display: grid; place-items: center; color: var(--muted); cursor: pointer; border: 2px dashed var(--line); }
.rc-ed-img.has { border: 0; }
/* облегчённый режим на время техработ — минимально: контурные значки в кружках и подпись */
.mt-lite { margin-top: 26px; }
.mt-lite-row { display: flex; gap: 26px; justify-content: center; }
.mt-lite-row button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.mt-lite-row button i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); transition: background .2s, border-color .2s; }
.mt-lite-row button:active i { background: color-mix(in srgb, currentColor 10%, transparent); border-color: color-mix(in srgb, currentColor 50%, transparent); }
.mt-lite-row button svg.i { width: 22px; height: 22px; }
.mt-lite-row button span { font-size: 12px; opacity: .8; }
.mt-lite-h { margin-top: 14px; opacity: .5; font-size: 12px; }
.lite-day { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.lite-day.today .lite-d b { background: var(--danger); color: #fff; }
.lite-d { width: 40px; flex: none; text-align: center; } .lite-d b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; } .lite-d span { display: block; font-size: 11px; color: var(--muted); }
.lite-it { display: flex; align-items: center; gap: 8px; padding: 3px 0; } .lite-it i { width: 4px; height: 18px; border-radius: 2px; flex: none; }

/* заметки: ничего лишнего */
.notes-list .nt-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.notes-list .nt-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-list .nt-s span { color: var(--text); opacity: .55; margin-right: 4px; }
.note-ta { width: 100%; min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); border: 0; background: none; resize: none; padding: 4px 2px 40px; font-size: 17px; line-height: 1.5; border-radius: 0; }
.note-ta:focus { border-color: transparent; }

/* «Память» */
.st-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 0 4px 14px; }
.st-bar i { display: block; min-width: 3px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.st-ck { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- тема «Разработка» (стройка и ремонт) ---------- */
/* фон — бетон с сеткой чертежа */
:root[data-theme="build"] body, :root[data-theme="build"] .page, :root[data-theme="build"] .screen {
  background-color: var(--bg);
  /* инструменты и стройматериалы еле заметным узором (молоток, ключ, кирпичи, саморез, рулетка, шпатель) поверх сетки чертежа */
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22260%22%20height=%22260%22%20viewBox=%220%200%20260%20260%22%20fill=%22none%22%20stroke=%22%233a2f22%22%20stroke-width=%223%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%20opacity=%22.07%22%3E%20%3Cg%20transform=%22translate%2830%2030%29%20rotate%28-30%29%22%3E%3Crect%20x=%22-6%22%20y=%220%22%20width=%2212%22%20height=%2252%22%20rx=%223%22/%3E%3Cpath%20d=%22M-18%20-4h36v14h-36z%22/%3E%3C/g%3E%20%3Cg%20transform=%22translate%28185%2045%29%20rotate%2835%29%22%3E%3Cpath%20d=%22M0%200v46%22/%3E%3Ccircle%20cx=%220%22%20cy=%22-8%22%20r=%2210%22/%3E%3Cpath%20d=%22M-5%20-14l5%206%205-6%22/%3E%3C/g%3E%20%3Cg%20transform=%22translate%2870%20150%29%22%3E%3Cpath%20d=%22M0%200h44v16h-44z%20M0%2016h44v16h-44z%20M22%200v16%20M11%2016v16%20M33%2016v16%22/%3E%3C/g%3E%20%3Cg%20transform=%22translate%28190%20160%29%20rotate%2820%29%22%3E%3Cpath%20d=%22M0%200v34%22/%3E%3Cpath%20d=%22M-6%200h12%22/%3E%3Cpath%20d=%22M-4%208l8%204M-4%2016l8%204M-4%2024l8%204%22/%3E%3C/g%3E%20%3Cg%20transform=%22translate%28120%20225%29%20rotate%28-8%29%22%3E%3Crect%20x=%220%22%20y=%220%22%20width=%2270%22%20height=%2214%22%20rx=%222%22/%3E%3Cpath%20d=%22M10%200v6M20%200v9M30%200v6M40%200v9M50%200v6M60%200v9%22/%3E%3C/g%3E%20%3Cg%20transform=%22translate%28225%20235%29%20rotate%28-45%29%22%3E%3Cpath%20d=%22M0%200l14%20-14%206%206%20-14%2014z%20M-2%202l-12%2012%22/%3E%3C/g%3E%20%3C/svg%3E"), linear-gradient(rgba(40,70,120,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(40,70,120,.06) 1px, transparent 1px);
  background-size: 260px 260px, 22px 22px, 22px 22px;
}
/* заголовки — со значком инструментов, как ёлочка у новогодней темы */
:root[data-theme="build"] .topbar h1::after { content: ' 🛠'; font-size: .55em; vertical-align: middle; }
/* полоски (память, расходы, отчёты, прогресс) — как жёлтая рулетка с делениями */
:root[data-theme="build"] .st-bar, :root[data-theme="build"] .mn-bar, :root[data-theme="build"] .rep-bar { background: #ffc21a; border: 1px solid #c79300; position: relative; }
:root[data-theme="build"] .st-bar::after, :root[data-theme="build"] .mn-bar::after, :root[data-theme="build"] .rep-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0,0,0,.45) 0 1px, transparent 1px 8px), repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 1.5px, transparent 1.5px 40px); background-size: 100% 40%, 100% 75%; background-repeat: no-repeat; pointer-events: none; }
/* второстепенные кнопки — как кирпичная кладка */
:root[data-theme="build"] .btn:not(.primary):not(.danger):not(.green) { background-color: #efe6d6; background-image: linear-gradient(rgba(150,90,50,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(150,90,50,.12) 1px, transparent 1px); background-size: 28px 12px, 28px 24px; }
:root[data-theme="build"] .fr-chain, :root[data-theme="build"] .g-dots { background-image: linear-gradient(rgba(40,70,120,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(40,70,120,.05) 1px, transparent 1px); background-size: 16px 16px; }
/* заголовок — как надпись по трафарету, под ним — лента */
:root[data-theme="build"] .topbar h1 { text-transform: uppercase; letter-spacing: .5px; font-weight: 900; }
:root[data-theme="build"] .topbar { position: relative; }
:root[data-theme="build"] .topbar::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 5px; border-radius: 3px; background: var(--hz); }
/* карточки — металлические таблички с заклёпками по углам */
:root[data-theme="build"] .group, :root[data-theme="build"] .sheet {
  border: 1px solid var(--line);
  background-image: radial-gradient(circle at 8px 8px, #b9b1a0 2px, transparent 2.6px), radial-gradient(circle at calc(100% - 8px) 8px, #b9b1a0 2px, transparent 2.6px),
    radial-gradient(circle at 8px calc(100% - 8px), #b9b1a0 2px, transparent 2.6px), radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #b9b1a0 2px, transparent 2.6px);
}
/* нижняя панель и панель карандаша — с оградительной лентой сверху */
:root[data-theme="build"] #tabbar, :root[data-theme="build"] .edit-bar { border-top: 0; overflow: hidden; }
:root[data-theme="build"] #tabbar::before, :root[data-theme="build"] .edit-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--hz); }
:root[data-theme="build"] #tabbar button.on { background: #ffe9a6; color: #24221d; }
/* режим редактирования — как огороженная площадка */
:root[data-theme="build"] body.editing .cal-scroll, :root[data-theme="build"] body.editing .wk-scroll { box-shadow: inset 0 0 0 4px #ffc21a; }
/* кнопки: основная — с лёгкой штриховкой, «+» — жёлтая каска */
:root[data-theme="build"] .btn.primary { background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.09) 0 8px, transparent 8px 16px); box-shadow: 0 3px 0 #a9450a; }
:root[data-theme="build"] .btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #a9450a; }
:root[data-theme="build"] .fab { background: radial-gradient(circle at 35% 30%, #ffe27a, #ffc21a 55%, #e0a400); color: #1f1f1f; border: 2px solid #1f1f1f; }
:root[data-theme="build"] .chip.on { box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
/* разделы в «Ещё» — как дорожные знаки: жёлтая рамка */
:root[data-theme="build"] .tile .ico { box-shadow: 0 0 0 3px #ffc21a, 0 4px 10px rgba(60,45,20,.25); }
/* уведомления — как табличка «Внимание» */
:root[data-theme="build"] .toast { border-left: 6px solid #ffc21a; border-radius: 10px; }
:root[data-theme="build"] .switch input:checked + span { background: var(--accent); }

/* календарь месяцем: размер дня постоянный — ❤ (смены партнёра) и новые смены не растягивают сетку.
   Когда в дне несколько смен, вторая строка (время) прячется, чтобы плашки поместились */
.cal-scroll.single .day { height: var(--dayh, 92px); min-height: 0; }
.cal-scroll.single .day:has(.chip-s ~ .chip-s ~ .chip-s) .chip-s .l2 { display: none; }
.beta-b.new-b { background: linear-gradient(135deg, #ff3b6b, #ff8a00); color: #fff; }

/* ---------- Расходы и доходы ---------- */
.mn-month { justify-content: space-between; margin: 4px 0 10px; } .mn-month b { font-size: 18px; }
.mn-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mn-sum > div { background: var(--card); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.mn-sum span { display: block; font-size: 12px; color: var(--muted); } .mn-sum b { font-size: clamp(12px, 3.7vw, 16px); white-space: nowrap; display: block; letter-spacing: -.2px; }
.mn-sum > div { padding: 10px 8px; }
.mn-in { color: var(--ok); } .mn-out { color: var(--danger); }
.mn-bar { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; margin: 14px 0 4px; } .mn-bar i { display: block; min-width: 3px; }
.mn-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mn-add { margin: 14px 0 4px; }
.mn-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-size: 18px; flex: none; }
.mn-amt { width: 100%; font-size: 34px !important; font-weight: 800; text-align: center; margin: 12px 0; background: none !important; color: var(--danger); }
.mn-amt.in { color: var(--ok); }

/* ---------- игры: «Точки и квадраты» ---------- */
.g-dots { padding: 16px; background: var(--card); border-radius: 18px; }
.g-dots .dg { position: relative; width: 100%; aspect-ratio: 1; }
.g-dots .dg > b { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--text); z-index: 3; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.g-dots .dl { position: absolute; z-index: 2; display: grid; padding: 0; }
.g-dots .dl.h { height: 34px; margin-top: -17px; } .g-dots .dl.v { width: 34px; margin-left: -17px; }
.g-dots .dl i { display: block; border-radius: 4px; background: var(--lc); transition: background .15s, transform .15s; }
.g-dots .dl.h i { height: 7px; align-self: center; } .g-dots .dl.v i { width: 7px; justify-self: center; }
.g-dots .dl:not(.on):not(:disabled) i { background: color-mix(in srgb, var(--text) 12%, transparent); }
.g-dots .dl:not(.on):not(:disabled):hover i { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.g-dots .dl:not(.on):not(:disabled):active i { background: var(--accent); }
.g-dots .dl.last i { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc) 35%, transparent); animation: dlIn .35s; }
@keyframes dlIn { from { transform: scale(.4); opacity: .3; } }
.g-dots .db { position: absolute; z-index: 1; background: color-mix(in srgb, var(--bc) 26%, transparent); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--bc); animation: dbIn .4s cubic-bezier(.3,1.6,.5,1); border-radius: 6px; }
@keyframes dbIn { from { transform: scale(.3); opacity: 0; } }
.dots-score { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
.dots-score span { background: color-mix(in srgb, var(--bc) 18%, var(--card)); color: var(--bc); border-radius: 99px; padding: 6px 14px; font-weight: 600; }
.dots-score b { font-size: 18px; margin-left: 4px; }
.dots-again { color: var(--ok); font-weight: 700; }
/* ---------- «Фруктовая башня» ---------- */
.fr-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 10px; }
.fr-top > div { background: var(--card); border-radius: var(--r); padding: 8px 12px; text-align: center; }
.fr-top span { display: block; font-size: 11px; color: var(--muted); } .fr-top b { font-size: 20px; }
.fr-next i { font-style: normal; font-size: 26px; display: block; line-height: 1.1; }
.fr-wrap { position: relative; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--card) 70%, transparent), var(--card)); border: 3px solid var(--line); border-top: 0; touch-action: none; }
.fr-cv { display: block; touch-action: none; }
.fr-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(4px); text-align: center; padding: 20px; }
.fr-over b { font-size: 22px; }

.g-dots { width: 100%; max-width: 440px; margin: 0 auto; box-sizing: border-box; }
.g-wrap { width: 100%; display: flex; flex-direction: column; align-items: stretch; }
.g-wrap .g-score { text-align: center; }

/* ---------- Отношения: настроение, прикосновения, идея ---------- */
.lv-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; text-align: center; }
.lv-moods > div { background: var(--card2); border-radius: 14px; padding: 8px; } .lv-me { font-size: 34px; display: block; line-height: 1.2; } .lv-moods small { color: var(--muted); font-size: 12px; }
.lv-mpick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; } .lv-mpick button { font-size: 24px; height: 42px; border-radius: 12px; }
.lv-mpick button.on { background: color-mix(in srgb, var(--heart) 20%, transparent); }
.lv-touch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.lv-touch button { background: var(--card2); border-radius: 14px; padding: 10px 4px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s; }
.lv-touch button span { font-size: 26px; } .lv-touch button:active { transform: scale(.94); }
.lv-touch button.sent { animation: lvSent .7s; } @keyframes lvSent { 30% { transform: scale(1.15); background: color-mix(in srgb, var(--heart) 25%, var(--card2)); } }
.lv-idea-t { font-size: 17px; font-weight: 600; margin-top: 6px; transition: opacity .25s, transform .25s; } .lv-idea-t.spin { opacity: 0; transform: translateY(-8px); }
.tq-qr { width: 210px; height: 210px; margin: 0 auto 10px; background: #fff; border-radius: 16px; padding: 10px; transition: opacity .3s; } .tq-qr svg { width: 100%; height: 100%; display: block; }
.tq-code { font-size: 26px; letter-spacing: 6px; }

/* ---------- шашки ---------- */
.ck-b { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 440px; margin: 0 auto; border-radius: 10px; overflow: hidden; border: 6px solid #5a3a1e; box-sizing: border-box; }
.ck-l { aspect-ratio: 1; background: #f0d9b5; } .ck-d { aspect-ratio: 1; background: #b07a4a; display: grid; place-items: center; padding: 0; position: relative; }
.ck-d.last { background: #c4904f; } .ck-d.can { cursor: pointer; } .ck-d.sel { background: #d9a85c; box-shadow: inset 0 0 0 3px #ffd23f; }
.ck-d.tg::after { content: ''; width: 34%; height: 34%; border-radius: 50%; background: rgba(255,240,170,.85); box-shadow: 0 0 0 3px rgba(255,210,63,.5); }
.ck-p { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.35); transition: transform .15s; }
.ck-p.p0 { background: radial-gradient(circle at 40% 35%, #fff, #e6e1d6); } .ck-p.p1 { background: radial-gradient(circle at 40% 35%, #555, #1c1c1c); }
.ck-d.sel .ck-p { transform: scale(1.08); }
.ck-p.k::after { content: '♛'; font-size: 20px; line-height: 1; color: #d4a017; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.fr-nx { width: 34px; height: 34px; display: block; margin: 0 auto; }
.fr-rec { background: linear-gradient(135deg, color-mix(in srgb, #ffc21a 30%, var(--card)), var(--card)) !important; }
.fr-chain { margin-top: 8px; background: var(--card); border-radius: 14px; padding: 2px 0; } .fr-ch { display: block; }
.fc-box { background: var(--card); border-radius: var(--r); padding: 14px; text-align: center; position: relative; overflow: hidden; }
.fc-box::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--fcp, 1) * 100%); background: var(--accent); transition: width 1s linear; }
.fc-code { font-size: 30px; font-weight: 800; letter-spacing: 6px; font-variant-numeric: tabular-nums; }

/* ---------- уголки ---------- */
.ug-b { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 440px; margin: 0 auto; border-radius: 10px; overflow: hidden; border: 5px solid #2b5c8c; box-sizing: border-box; }
.ug-c { aspect-ratio: 1; background: #e9f1fa; display: grid; place-items: center; padding: 0; } .ug-c.dk { background: #d3e2f2; }
.ug-c.home { box-shadow: inset 0 0 0 2px rgba(255,170,0,.45); } .ug-c.last { background: #fff3c4; } .ug-c.sel { background: #ffe08a; }
.ug-c.tg::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: rgba(61,139,217,.55); }
.ug-p { width: 74%; height: 74%; border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.3); }
.ug-p.p0 { background: radial-gradient(circle at 40% 35%, #7fb4ff, #2f6fd6); } .ug-p.p1 { background: radial-gradient(circle at 40% 35%, #ff8a8a, #d63a3a); }
/* ---------- шахматы ---------- */
.ch-b { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 440px; margin: 0 auto; border-radius: 8px; overflow: hidden; border: 5px solid #4a3b2a; box-sizing: border-box; }
.ch-c { aspect-ratio: 1; background: #f0d9b5; display: grid; place-items: center; padding: 0; position: relative; } .ch-c.dk { background: #b58863; }
.ch-c.last { box-shadow: inset 0 0 0 100px rgba(255,220,60,.35); } .ch-c.sel { box-shadow: inset 0 0 0 3px #ffd23f, inset 0 0 0 100px rgba(255,220,60,.3); }
.ch-c.chk { box-shadow: inset 0 0 18px 4px rgba(255,40,40,.85); }
.ch-c.tg::after { content: ''; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(40,40,40,.25); }
.ch-c.tg.cap::after { width: 86%; height: 86%; background: none; border: 4px solid rgba(40,40,40,.3); box-sizing: border-box; }
.ch-p { font-style: normal; font-variant-emoji: text; font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", serif; font-size: min(9vw, 40px); line-height: 1; user-select: none; }
.ch-p.w { color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000, 0 0 1px #000; } .ch-p.k { color: #111; text-shadow: 0 1px 1px rgba(255,255,255,.35); }
.fc-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 12px; }
.fc-acts button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 14px; background: var(--card2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.fc-acts button span { font-size: 22px; line-height: 1; } .fc-acts button.on { background: var(--accent); color: var(--accent-text); }
.fc-acts button:active { transform: scale(.96); }
.fc-line { position: relative; display: flex; align-items: center; justify-content: center; } /* код ровно по центру, значок — у правого края */
.fc-line .fc-copy { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text); background: var(--card2); flex: none; }
.fc-line .fc-copy svg { width: 22px; height: 22px; } .fc-line .fc-copy:active { transform: translateY(-50%) scale(.92); }
/* плавное закрытие: лист/страница, утащенные пальцем, доезжают с того же места без повторной анимации */
.overlay.closing { pointer-events: none; }
.overlay.closing.dragged .sheet { animation: none !important; }
.page.swiped.closing, .chat-page.swiped { animation: none !important; }
.page.swiped.closing { transform: translateX(100%); }
/* размытие фона под окном на телефонах заметно тормозит анимацию — оставляем только затемнение */
@media (pointer: coarse) { .overlay { backdrop-filter: none; -webkit-backdrop-filter: none; } }
.rc-pic, .rc-hero { position: relative; overflow: hidden; }
.rc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-lockb { z-index: 1; }
/* галочки прочтения */
.mt { width: 16px; height: 16px; margin-left: 3px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.mt.read { color: #34b7f1; opacity: 1; }
.mt.pend { width: 13px; height: 13px; stroke-width: 1.4; opacity: .6; }
.msg.me .mt.read { color: #fff; } .msg.me.media .mt.read, .msg.me.circle .mt.read { color: #34b7f1; }
/* Отношения: быстрые ответы, фильм дня, кнопка настройки блоков */
.lv-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-quick button { padding: 7px 11px; border-radius: 16px; background: var(--card2); color: var(--text); font-size: 13.5px; border: 1px solid var(--line); transition: transform .15s; }
.lv-quick button:active, .lv-quick button.sent { transform: scale(.92); background: color-mix(in srgb, var(--heart) 18%, var(--card2)); }
.lv-quick.big { justify-content: center; } .lv-quick.big button { font-size: 16px; padding: 10px 14px; }
.lv-say { border-style: dashed !important; }
.lv-custom { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; margin: 4px 0 8px; color: var(--muted); font-size: 14px; border-radius: 14px; border: 1px dashed var(--line); background: none; }
.lv-custom svg { width: 16px; height: 16px; }
.lv-film-b { display: flex; gap: 12px; align-items: flex-start; }
.lv-film-e { font-size: 38px; width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, #a77bff 18%, var(--card2)); }
.lv-film .lv-open { display: inline-block; margin-top: 8px; }
.lv-mpick button { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.sheet.swap > :not(.grabber) { animation: fade .22s var(--ease); }
/* уведомления: текст целиком, дата и время прихода */
.ib-sub { white-space: normal; overflow: visible; max-width: none; overflow-wrap: anywhere; }
.ib-tm { font-size: 12px; color: var(--muted); margin-top: 3px; opacity: .85; }
.ib-it { align-items: flex-start; } .ib-it .ib-ic { margin-top: 2px; }
.lb-t b { white-space: normal; overflow: visible; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lb-t span { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.lb-t small { font-size: 11.5px; color: var(--muted); opacity: .8; margin-top: 2px; }
.live-stack { position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 300; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.live-stack .live-bn { position: relative; left: auto; right: auto; top: auto !important; margin: 0; max-width: none; pointer-events: auto; align-items: flex-start; }
.netbadge { transition: background .25s, opacity .3s, transform .3s; animation: fade .2s; }
.netbadge.back { background: #1f9d55; } .netbadge.back i { background: #b7f5cf; }
.netbadge.gone { opacity: 0; transform: translate(-50%, -10px); }
.ib-sub { display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden; }
.ib-it.open .ib-sub { -webkit-line-clamp: unset; display: block; }
/* чеки */
.rc-photo { display: block; max-height: 180px; max-width: 100%; margin: 0 auto 6px; border-radius: 12px; object-fit: contain; }
.rc-groups.dim { opacity: .45; }
.rc-spin { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.mn-add .btn { padding-left: 8px; padding-right: 8px; }
.car-rc { display: flex; gap: 8px; margin: 2px 0 10px; } .car-rc .btn { flex: 1; }
.rc-thumb { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--card2); margin-bottom: 10px; } .rc-thumb img { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; }
/* ---------- карточка профиля в «Ещё» ---------- */
.pf-card { background: var(--card); border-radius: 22px; padding: 6px; margin-top: 6px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.pf-card .profile.pf-main { background: none; border: 0; margin: 0; padding: 12px 10px 10px; gap: 14px; }
.pf-main .avatar { width: 60px; height: 60px; font-size: 24px; flex: none; }
.pf-main .avatar.ring { box-shadow: 0 0 0 2.5px var(--card), 0 0 0 5px #b58cff; }
.pf-name { font-weight: 800; font-size: 19px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-crown { font-size: 15px; }
.pf-contact { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-set { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--muted); flex: none; }
.pf-set svg { width: 20px; height: 20px; }
.pf-stats { display: flex; gap: 6px; padding: 0 6px 6px; }
.pf-stats:empty { display: none; }
.pf-stats button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; border-radius: 16px; background: var(--card2); color: var(--text); }
.pf-stats b { font-size: 17px; line-height: 1.2; } .pf-stats span { font-size: 11.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-plan { display: flex; align-items: center; gap: 10px; width: calc(100% - 12px); margin: 0 6px 6px; box-sizing: border-box; padding: 12px 14px; border-radius: 16px; text-align: left; font-size: 14.5px; font-weight: 600; color: var(--text); background: var(--card2); }
.pf-plan > svg:first-child { width: 20px; height: 20px; flex: none; color: #d4a017; }
.pf-plan .chev { opacity: .6; }
.pf-plan.prem { background: linear-gradient(100deg, color-mix(in srgb, #b58cff 22%, var(--card2)), color-mix(in srgb, #ffcf5a 16%, var(--card2))); }
.pf-plan.free { background: linear-gradient(90deg, #5b5bff, #a259ff); color: #fff; } .pf-plan.free > svg:first-child { color: #ffe08a; }
.pf-plan.free .grow { display: flex; flex-direction: column; } .pf-plan.free small { font-weight: 500; opacity: .85; font-size: 12.5px; }
.pf-via { font-size: 12px; color: var(--muted); font-weight: 500; }
/* ---------- «Камень, ножницы, бумага»: кулаки друг на друга, потом кто кого ---------- */
.rps-arena { position: relative; display: flex; justify-content: center; align-items: center; gap: 34px; height: 120px; font-size: 66px; line-height: 1; }
.rps-side { display: inline-block; position: relative; } .rps-side.r { transform: scaleX(-1); }
.rps-h { display: inline-block; position: relative; }
.rps-fx { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); font-size: 46px; pointer-events: none; z-index: 3; }
/* «камень… ножницы… бумага…»: кулаки вместе подпрыгивают навстречу друг другу */
.rps-arena.shaking .rps-h { animation: rpsBob .65s cubic-bezier(.4, 0, .4, 1) infinite; }
@keyframes rpsBob { 0%, 100% { transform: translate(0, 0) rotate(0) } 40% { transform: translate(6px, -26px) rotate(-14deg) } 70% { transform: translate(10px, 4px) rotate(4deg) } }
.rps-n { font-size: 30px; }
/* раскрытие: руки «выстреливают» */
.rps-arena.reveal .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsOpen { from { transform: scale(.4) } to { transform: scale(1) } }
/* победитель бьёт: рука идёт к сопернику и возвращается */
.rps-arena.win-l .l .rps-h, .rps-arena.win-r .r .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsHit .8s .4s cubic-bezier(.45, 0, .55, 1) both; z-index: 2; }
@keyframes rpsHit { 0% { transform: translateX(0) } 45% { transform: translateX(48px) } 60% { transform: translateX(40px) } 100% { transform: translateX(0) } }
/* камень разбивает ножницы: сверху вниз, ножницы сплющиваются */
.rps-arena.smash.win-l .l .rps-h, .rps-arena.smash.win-r .r .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsSmash .8s .4s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsSmash { 0% { transform: translate(0, 0) rotate(0) } 40% { transform: translate(30px, -40px) rotate(-30deg) } 62% { transform: translate(52px, 4px) rotate(10deg) } 100% { transform: translate(0, 0) rotate(0) } }
.rps-arena.smash.win-l .r .rps-h, .rps-arena.smash.win-r .l .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsSquash .4s .8s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsSquash { to { transform: translateY(22px) scale(1.25, .3); opacity: .55; filter: grayscale(1) } }
.rps-arena.smash .rps-fx { animation: rpsBoom .4s .8s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsBoom { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1 } 60% { transform: translate(-50%, -50%) scale(1.3); opacity: 1 } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0 } }
/* ножницы режут бумагу: «чик-чик», бумага разваливается пополам */
.rps-arena.cut.win-l .l .rps-h, .rps-arena.cut.win-r .r .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsSnip .8s .4s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsSnip { 0% { transform: translateX(0) } 30% { transform: translateX(46px) rotate(0) } 42% { transform: translateX(50px) rotate(-12deg) } 54% { transform: translateX(52px) rotate(8deg) } 66% { transform: translateX(54px) rotate(-12deg) } 100% { transform: translateX(0) } }
.rps-h.cut { width: 1.1em; height: 1em; } .rps-h.cut i { position: absolute; left: 0; top: 0; font-style: normal; }
.rps-h.cut .t { clip-path: inset(0 0 50% 0); } .rps-h.cut .b { clip-path: inset(50% 0 0 0); }
.rps-arena.cut .rps-h.cut .t { animation: rpsHalfT .4s .8s cubic-bezier(.45, 0, .55, 1) both; } .rps-arena.cut .rps-h.cut .b { animation: rpsHalfB .4s .8s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsHalfT { to { transform: translate(-10px, -26px) rotate(-22deg); opacity: .5 } }
@keyframes rpsHalfB { to { transform: translate(-6px, 28px) rotate(18deg); opacity: .5 } }
.rps-arena.cut .rps-fx { animation: rpsBoom .4s .8s cubic-bezier(.45, 0, .55, 1) both; font-size: 34px; }
/* бумага накрывает камень: ладонь наезжает сверху, камень прячется */
.rps-arena.cover.win-l .l .rps-h, .rps-arena.cover.win-r .r .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsCover .8s .4s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsCover { 0% { transform: translate(0, 0) } 45%, 75% { transform: translate(92px, -6px) scale(1.15) } 100% { transform: translate(0, 0) } }
.rps-arena.cover.win-l .r .rps-h, .rps-arena.cover.win-r .l .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsHide .4s .8s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsHide { to { transform: scale(.55); opacity: .25 } }
/* ничья: руки стукаются и отскакивают */
.rps-arena.draw .rps-h { animation: rpsOpen .3s cubic-bezier(.45, 0, .55, 1) both, rpsBump .8s .4s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rpsBump { 40% { transform: translateX(22px) } 60% { transform: translateX(16px) } 100% { transform: translateX(0) } }
.rps-act { font-size: 17px; font-weight: 700; margin-top: 14px; animation: fade .3s 1s both; }
.rps-res { animation: fade .3s 1.2s both; margin-top: 8px; }
/* ожидание соперника */
.g-wait { text-align: center; padding: 30px 6px; } .g-wait-e { font-size: 56px; } .g-wait h3 { margin: 8px 0 6px; } .g-wait p { margin: 0 0 18px; line-height: 1.45; }
.g-waitdots { display: flex; justify-content: center; gap: 8px; margin: 0 0 22px; } .g-waitdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: gDot 1.2s infinite ease-in-out; } .g-waitdots i:nth-child(2) { animation-delay: .2s } .g-waitdots i:nth-child(3) { animation-delay: .4s }
@keyframes gDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8) } 40% { opacity: 1; transform: scale(1.1) } }
/* фильм дня: рейтинг */
.lv-rate { display: inline-flex; align-items: baseline; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 170, 0, .15); color: #e08a00; font-weight: 700; font-size: 13px; }
.lv-rate span { font-weight: 500; font-size: 11px; opacity: .8; }

/* плашка «БЕТА» нажимается: предлагает вернуться в обычную версию */
.beta-ribbon { pointer-events: auto; border: 0; cursor: pointer; font-family: inherit; }
/* индикатор связи: красный — нет сети, оранжевый мигает — соединение, зелёный — в сети */
.netbadge.off { background: #e5484d; color: #fff; } .netbadge.off i { background: #ffd1d1; }
.netbadge.conn { background: #ff9f0a; color: #1a1200; } .netbadge.conn i { background: #fff3d6; animation: netBlink 1s ease-in-out infinite; }
.netbadge.back { color: #fff; }
@keyframes netBlink { 50% { opacity: .15; transform: scale(.7); } }
/* промокод в окне оплаты */
.promo-box { margin: 4px 0 12px; text-align: center; }
.promo-row { display: flex; gap: 8px; } .promo-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 1px; }
.promo-st { margin-top: 6px; min-height: 16px; } .promo-st.ok { color: #1f9d55; font-weight: 600; } .promo-st.err { color: var(--danger, #e5484d); }
.paywall .plan .price s { opacity: .5; font-weight: 400; font-size: .85em; margin-right: 2px; }
.paywall .plan.off { opacity: .4; }
/* поля ввода не растягиваются за уголок — ни в окнах, ни на экране техработ */
textarea { resize: none; }
/* КНБ: руки сбоку навстречу друг другу (как на фото) */
.rps-arena { overflow: hidden; margin: 0 -16px; gap: 30px; }
.rps-h { z-index: 1; }
.rps-h .hh { display: inline-block; font-style: normal; }
.rps-h .hh.rot { transform: scaleY(-1) rotate(90deg); } /* повернули пальцами к сопернику и отразили — большой палец сверху */
.rps-h.cut i .hh { display: inline-block; }
/* пока считаем «камень… ножницы… бумага» — кулаки качаются вверх-вниз, как в жизни */
@keyframes rpsBob { 0%, 100% { transform: translate(0, 0) rotate(0) } 40% { transform: translate(0, -24px) rotate(-16deg) } 70% { transform: translate(4px, 4px) rotate(3deg) } }
.rps-h.cut > i { width: 100%; height: 100%; } .rps-h.cut i.hh { position: static; }
/* на бете плашка связи — под плашкой «БЕТА», а не под ней спрятана */
body:has(.beta-ribbon) .netbadge { top: calc(var(--safe-t) + 26px); }
/* индикатор связи: всегда чёрная плашка с белым текстом, цвет — только у кружка (красный / мигающий оранжевый / зелёный) */
.netbadge, .netbadge.off, .netbadge.conn, .netbadge.back { background: #111 !important; color: #fff !important; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.netbadge i { width: 9px; height: 9px; }
.netbadge.off i { background: #ff3b30 !important; box-shadow: 0 0 6px #ff3b30; }
.netbadge.conn i { background: #ff9f0a !important; box-shadow: 0 0 6px #ff9f0a; animation: netBlink 1s ease-in-out infinite; }
.netbadge.back i { background: #30d158 !important; box-shadow: 0 0 6px #30d158; }

/* календарь, режим «Значок»: несколько записей в дне — аккуратной сеткой, ничего не обрезается */
.chip-s.icon-only { overflow: visible; }
.ic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 1px; justify-items: center; align-items: start; margin-top: 1px; }
.ic-grid .chip-s { padding: 0; min-width: 0; max-width: 100%; gap: 1px; }
.ic-grid .ic-circ { width: 22px; height: 22px; font-size: 12px; }
.ic-grid .chip-s .l2 { font-size: 9.5px; padding: 0 3px; letter-spacing: -.3px; max-width: 100%; }
.ic-grid.many { gap: 3px 1px; } .ic-grid.many .ic-circ { width: 20px; height: 20px; font-size: 11px; }
.ic-grid .chip-s.icon-only.partner .ic-circ { box-shadow: 0 0 0 1.5px var(--heart); }
.ic-more { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
@media (max-width: 360px) { .ic-grid .ic-circ { width: 19px; height: 19px; font-size: 10px; } .ic-grid.many .ic-circ, .ic-more { width: 17px; height: 17px; font-size: 9px; } }
/* режим с названиями: в загруженном дне шрифт чуть меньше, длинное название — с многоточием, а не обрубком */
.cb-busy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cb-busy .chip-s .l1 { font-size: 10px; letter-spacing: -.3px; text-overflow: ellipsis; padding: 1px 2px; }
.chip-s .l1 { text-overflow: ellipsis; }
/* календарь «С сеткой»: тонкие линии между днями */
html.cal-grid .cal-scroll .grid, html.cal-grid .preview-cal .grid { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
html.cal-grid .cal-scroll .grid > .day, html.cal-grid .preview-cal .grid > .day { border-radius: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html.cal-grid .cal-scroll .grid > .day.today, html.cal-grid .preview-cal .grid > .day.today { border-radius: 0; }
/* подгонка названий на плашках (calendar.js → fitChips) */
.chip-s .l1 { text-overflow: clip; }
.chip-s .l1.ell { text-overflow: ellipsis; } .chip-s .l1.no-pre .pre, .chip-s .l1.no-ic .ic { display: none; }
.chip-s .l1.only-ic { text-align: center; font-size: 0 !important; } .chip-s .l1.only-ic .ic { font-size: 13px; margin: 0; }
.cb-busy .chip-s .l1 { text-overflow: clip; }
/* iPhone не дал запустить видео сам — кнопка «Показать видео» по центру экрана звонка */
.tap-play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 5; padding: 16px 26px; border: 0; border-radius: 30px; background: rgba(255,255,255,.92); color: #111; font-weight: 700; font-size: 17px; line-height: 1; font-family: inherit; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: fadeIn .25s; }
/* свайп «назад» из раздела: тень слева у уезжающего раздела */
.screen.swiping { box-shadow: -10px 0 30px rgba(0,0,0,.25); background: var(--bg); }
/* «назад» кнопкой: предыдущий раздел въезжает слева мягко (после свайпа он уже на месте — без анимации) */
.screen.back-in { animation: scrBackIn .26s cubic-bezier(.2,.75,.25,1); }
@keyframes scrBackIn { from { transform: translate3d(-28%, 0, 0); opacity: .6 } }
/* стопка разделов: прошлый раздел спрятан под текущим (виден во время свайпа «назад») */
#view > .screen.stacked { visibility: hidden; pointer-events: none; z-index: 0; animation: none; }
#view > .screen:not(.stacked) { z-index: 1; }
/* смена вкладок: старый раздел уезжает в сторону, пока новый въезжает */
#view > .screen.leaving { z-index: 0; pointer-events: none; animation: scrOut .24s cubic-bezier(.2,.75,.25,1) forwards; }
#view > .screen.leaving.to-right { animation-name: scrOutR; }
@keyframes scrOut { to { transform: translate3d(-28px, 0, 0); opacity: 0 } }
@keyframes scrOutR { to { transform: translate3d(28px, 0, 0); opacity: 0 } }
@keyframes scrFromRight { from { transform: translate3d(28px, 0, 0); opacity: 0 } }
@keyframes scrFromLeft { from { transform: translate3d(-28px, 0, 0); opacity: 0 } }
/* вглубь (например «Ещё» → «Файлы»): новый раздел въезжает справа поверх, прошлый слегка уходит влево */
#view > .screen.push-in { animation: pushIn .3s cubic-bezier(.2,.75,.25,1); box-shadow: -10px 0 30px rgba(0,0,0,.25); background: var(--bg); }
#view > .screen.stacked.push-under { visibility: visible; animation: pushUnder .3s cubic-bezier(.2,.75,.25,1) forwards; }
@keyframes pushIn { from { transform: translate3d(100%, 0, 0) } }
@keyframes pushUnder { to { transform: translate3d(-30%, 0, 0) } }
@keyframes sheetIn { from { transform: translate3d(0, 100%, 0) } }
@media (max-width: 699px) { .overlay.closing .sheet { animation-name: sheetOut; } }
@keyframes sheetOut { to { transform: translate3d(0, 100%, 0) } }
/* ---------- лента месяцев: прокрутка телефона с инерцией + доводка до начала месяца ---------- */
.cal-head.cont { background: transparent; pointer-events: none; z-index: 6; }
.cal-head.cont button { pointer-events: auto; }
.cal-head.cont .ttl, .cal-head.cont .sub { visibility: hidden; }
.cal-head.cont .wdays { display: none; }
.cal-scroll.cont { overflow: hidden; scroll-snap-type: none; touch-action: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: 0; scrollbar-width: none; } .cal-scroll.cont::-webkit-scrollbar { display: none; }
.cal-scroll.cont .month { height: var(--mh, 100%); box-sizing: border-box; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 0 8px; overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto var(--mh, 700px); }
.cal-scroll.cont .month-title { box-sizing: border-box; height: var(--th, 64px); padding: var(--tt-top, 20px) 4px 0; font-size: var(--tt-fs, 30px); line-height: var(--tt-h, 36px); font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 150px; cursor: pointer; }
.cal-scroll.cont .day { height: var(--dayh, 92px); min-height: 0; }
.cal-scroll.cont .day:has(.chip-s ~ .chip-s ~ .chip-s) .chip-s .l2 { display: none; }
/* «Мои работы» / «Мои календари»: строка с корзиной той же высоты, что и строка «по умолчанию» */
.item .iconbtn.dj, .item .iconbtn.dc { width: 30px; height: 30px; min-height: 0; padding: 0; margin: -6px -4px -6px 0; flex: none; }
.item .iconbtn.dj svg, .item .iconbtn.dc svg { width: 18px; height: 18px; }
.item button.ej, .item button.ec { padding: 0; min-height: 0; line-height: inherit; }
/* календарь: «Сегодня» — вернуться к текущему месяцу */
.today-pill { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 6; transform: translate3d(-50%, 16px, 0) scale(.9); opacity: 0; pointer-events: none;
  padding: 9px 18px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: opacity .25s var(--ease), transform .3s var(--ease); }
.today-pill.show { opacity: 1; pointer-events: auto; transform: translate3d(-50%, 0, 0) scale(1); }
/* КНБ: ровно три взмаха одной анимацией — темп не скачет */
.rps-arena.shaking .rps-h { animation: rpsBob .65s cubic-bezier(.45, 0, .55, 1) 3 both; }
.rps-n.tick { animation: rpsPop .3s cubic-bezier(.45, 0, .55, 1); }
/* Новый год: снеговик выглядывает из-за нижней панели слева */
.ny-snowman { position: fixed; left: 22px; bottom: calc(var(--safe-b) + 52px); width: 42px; height: 50px; padding: 0; background: none; border: 0; z-index: 19; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); animation: nySm 7s ease-in-out infinite; transform-origin: 50% 100%; }
.ny-snowman svg { width: 100%; height: 100%; display: block; }
.ny-snowman .arm { transform-origin: 13px 46px; }
.ny-snowman.wave .arm { animation: nyWave .5s ease-in-out 3; }
@keyframes nySm { 0%, 100% { transform: rotate(-3deg) } 50% { transform: rotate(3deg) } }
@keyframes nyWave { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(-28deg) } }
body.hide-tabbar .ny-snowman, body.editing .ny-snowman { display: none; }
.ny-banner .ny-sm { width: 40px; height: 48px; flex: none; margin-left: auto; } .ny-banner .ny-sm svg { width: 100%; height: 100%; }
/* временная тема «День рождения» — нейтральная: ночное небо, бирюза и золото */
:root[data-theme="birthday"] {
  --bg: #0f1e2e; --bg2: #13253a; --card: #16293d; --card2: #1d3550; --line: #2a4a6b;
  --text: #f3f8ff; --muted: #a9bdd3; --accent: #14a394; --tab-bg: rgba(22,41,61,.9);
  --shadow: 0 8px 30px rgba(0,0,0,.5); --ok: #3ddc84; color-scheme: dark;
}
:root[data-theme="birthday"] body { background: radial-gradient(120% 60% at 50% 0%, #1d3f5e 0%, #0f1e2e 62%) fixed; }
.fx-bday .topbar h1::after { content: ' 🎈'; font-size: .55em; vertical-align: middle; }
.bd-banner { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 16px 0 12px; border-radius: 18px; background: linear-gradient(135deg, #f5a623, #14a394); color: #fff; box-shadow: 0 8px 24px rgba(20,163,148,.3); text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.bd-banner .bd-e { font-size: 38px; line-height: 1; animation: nySm 6s ease-in-out infinite; transform-origin: 50% 90%; }
.bd-pick { display: flex; gap: 8px; } .bd-pick select { flex: 1; }
/* iPhone: кадры видеозвонка на canvas поверх <video> */
.call-screen .call-cv { position: absolute; pointer-events: none; display: none; }
/* iPhone: клавиатура открыта — без отступа под «полоску» внизу, поле ввода вплотную к клавиатуре */
.chat-page.kb-open { animation: none; }
.chat-page.kb-open .composer { padding-bottom: 8px; }
/* сканер QR / штрихкодов: картинка камеры на холсте + рамка прицела */
.qr-scan .qr-view { position: relative; width: min(86vw, 380px); aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: #111; border: 3px solid #fff; }
.qr-scan .qr-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.qr-scan .qr-frame { position: absolute; left: 18%; right: 18%; top: 50%; aspect-ratio: 1; transform: translateY(-50%); border: 3px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
body.kb-open .chat-page .composer, body.kb-open .composer { padding-bottom: 8px; }
.page.swiping, .chat-page.swiping { box-shadow: -10px 0 30px rgba(0,0,0,.25); }
/* календарь: месяцы в ряд, листание вбок — нативная прокрутка с привязкой к месяцу */
.cal-scroll.cont.horiz { display: flex; overflow: hidden; scroll-snap-type: none; touch-action: none; overscroll-behavior-x: contain; padding-left: 0; padding-right: 0; scrollbar-width: none; }
.cal-scroll.cont.horiz > .month { flex: 0 0 var(--mw, 100%); width: var(--mw, 100%); padding-left: 8px; padding-right: 8px; scroll-snap-align: start; scroll-snap-stop: always; contain-intrinsic-size: var(--mw, 390px) var(--mh, 700px); }
#view > .screen.no-anim { animation: none; }
/* морской бой: промах — крупная заметная точка (раньше символ «•» был еле виден) */
.sea-c.miss::after { content: ''; width: 38%; aspect-ratio: 1; border-radius: 50%; background: #2b9bb5; box-shadow: 0 0 0 2px color-mix(in srgb, #2b9bb5 25%, transparent); }
.sea-grid.small .sea-c.miss::after { width: 42%; box-shadow: none; }
/* приглашение в игру — плашка сверху, плавно выезжает и уезжает */
.g-invite { position: fixed; left: 10px; right: 10px; top: calc(var(--safe-t) + 8px); z-index: 95; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 20px;
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(0,0,0,.28);
  transform: translate3d(0, calc(-100% - var(--safe-t) - 20px), 0); opacity: 0; transition: transform .38s cubic-bezier(.2,.8,.2,1), opacity .3s ease; }
.g-invite.show { transform: translate3d(0, 0, 0); opacity: 1; }
.g-invite.hide { transform: translate3d(0, calc(-100% - var(--safe-t) - 20px), 0); opacity: 0; transition-duration: .32s; }
.g-invite .gi-e { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex: none; background: color-mix(in srgb, var(--c) 22%, transparent); animation: giPulse 1.6s ease-in-out infinite; }
.g-invite b { display: block; font-size: 15px; } .g-invite .small { color: var(--muted); }
.g-invite .gi-no { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); flex: none; }
.g-invite .gi-no svg { width: 18px; height: 18px; }
.g-invite .gi-yes { height: 38px; padding: 0 16px; border-radius: 19px; background: var(--accent); color: #fff; font-weight: 700; flex: none; }
@keyframes giPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
/* пока есть приглашение — пульсирующая точка на вкладке «Игры» (или «Ещё», если игр нет в панели) и на плитке «Игры» */
body.game-inv #tabbar button[data-id="games"], body.game-inv:not(:has(#tabbar button[data-id="games"])) #tabbar button[data-id="more"] { position: relative; }
body.game-inv #tabbar button[data-id="games"]::after, body.game-inv:not(:has(#tabbar button[data-id="games"])) #tabbar button[data-id="more"]::after,
body.game-inv .tile[data-id="games"] .ico::after { content: ''; position: absolute; top: 4px; right: calc(50% - 18px); width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; animation: tabPulse 1.4s ease-out infinite; }
body.game-inv .tile[data-id="games"] .ico { position: relative; } body.game-inv .tile[data-id="games"] .ico::after { top: -2px; right: -2px; }
@keyframes tabPulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }
/* чей ход — такой и цвет экрана игры */
.page.g-page { transition: background-color .45s ease; }
.page.g-page.g-myturn { background-color: color-mix(in srgb, #30d158 13%, var(--bg)); }
.page.g-page[data-turn="0"] { background-color: color-mix(in srgb, #5b8cff 12%, var(--bg)); }
.page.g-page[data-turn="1"] { background-color: color-mix(in srgb, #ff6b6b 12%, var(--bg)); }
/* соперник предлагает ещё партию */
.g-again-offer { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; animation: itemIn .35s var(--ease); }
.g-again-offer .btnrow { margin-top: 10px; }
/* игры для компании (party.js) */
.pt-rules { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
.pt-step { display: inline-flex; align-items: center; gap: 10px; } .pt-step b { min-width: 28px; text-align: center; font-size: 17px; }
.pt-step button { width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 20px; font-weight: 700; line-height: 1; }
.pt-step button:disabled { opacity: .35; }
.pt-pass { display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 160px); justify-content: center; }
.pt-prog { text-align: center; color: var(--muted); font-size: 13px; }
.pt-who { text-align: center; padding: 10px 0; } .pt-who h2 { margin: 12px 0 4px; }
.pt-ava { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 800; color: #fff; background: var(--c, var(--accent)); box-shadow: 0 10px 30px color-mix(in srgb, var(--c, var(--accent)) 40%, transparent); }
.pt-ava.sm { width: 30px; height: 30px; margin: 0 10px 0 0; font-size: 14px; box-shadow: none; flex: none; }
.pt-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px; text-align: center; animation: ptFlip .35s cubic-bezier(.2,.8,.2,1); }
.pt-card h2 { margin: 4px 0 8px; font-size: 26px; } .pt-card h3 { margin: 4px 0 6px; }
.pt-big { font-size: 64px; line-height: 1; margin-bottom: 8px; }
@keyframes ptFlip { from { transform: perspective(600px) rotateY(-70deg); opacity: 0; } to { transform: none; opacity: 1; } }
.pt-play { text-align: center; padding-top: 20px; }
.pt-time { font-size: 64px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -1px; transition: color .3s; }
.pt-time.low { color: #ff3b30; animation: ptLow 1s ease-in-out infinite; }
@keyframes ptLow { 50% { transform: scale(1.06); } }
.pt-help { margin-top: 18px; text-align: left; background: var(--card); border-radius: 16px; padding: 10px 14px; } .pt-help summary { cursor: pointer; font-weight: 600; }
.pt-places { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .pt-places span { padding: 4px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 7%, transparent); font-size: 13px; }
.pt-bk { display: grid; gap: 6px; margin: 12px 0; text-align: left; } .pt-bk > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.pt-bk span { color: var(--muted); font-size: 13px; white-space: nowrap; } .pt-bk b { text-align: right; }
.pt-places-n { margin-top: 10px; font-size: 15px; }
.pt-bk-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; } .pt-bk-head > div { background: var(--card); border-radius: 14px; padding: 8px; text-align: center; display: flex; flex-direction: column; } .pt-bk-head b { font-size: 22px; }
.pt-pl.out { opacity: .45; } .pt-pl .btn.small { margin-left: 6px; }
.pt-done { margin: 12px 0; padding: 16px; border-radius: 18px; text-align: center; font-size: 17px; background: color-mix(in srgb, var(--ok) 16%, var(--card)); animation: itemIn .4s var(--ease); }
.pt-allc { display: grid; gap: 10px; margin-bottom: 12px; }
.pt-scores { display: flex; gap: 8px; margin-bottom: 14px; } .pt-scores > div { flex: 1; background: var(--card); border-radius: 14px; padding: 8px; text-align: center; display: flex; flex-direction: column; border: 2px solid transparent; transition: border-color .3s; }
.pt-scores > div.on { border-color: var(--accent); } .pt-scores span { font-size: 12px; color: var(--muted); } .pt-scores b { font-size: 22px; }
.pt-round { display: flex; flex-direction: column; gap: 18px; padding-top: 10px; }
.pt-word { font-size: 40px; font-weight: 800; text-align: center; padding: 40px 10px; background: var(--card); border-radius: 26px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.pt-word.in { animation: ptWord .28s cubic-bezier(.2,.8,.2,1); }
@keyframes ptWord { from { transform: translate3d(40px,0,0) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.pt-wbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt-wbtns button { height: 110px; border-radius: 24px; font-size: 40px; font-weight: 800; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pt-wbtns button span { font-size: 14px; font-weight: 600; } .pt-wbtns .pt-skip { background: #ff6b6b; } .pt-wbtns .pt-ok { background: #30b36b; }
.pt-wbtns button:active { transform: scale(.97); }
.pt-rv b.ok { color: #30b36b; } .pt-rv b.no { color: #ff3b30; }
/* ⓘ «как играть» у каждой игры */
.g-info { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font: italic 700 15px/1 Georgia, serif; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); }
.g-info:active { transform: scale(.92); }
/* Бункер: катастрофа и бункер, концовка */
.pt-world { display: grid; gap: 10px; text-align: left; }
.pt-sec { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; } .pt-sec > span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.pt-sec h3 { margin: 4px 0 6px; } .pt-sec p { margin: 6px 0; line-height: 1.45; } .pt-sec ul { margin: 4px 0 6px; padding-left: 20px; } .pt-sec li i { color: #ff6b6b; font-style: normal; font-size: 13px; } .pt-sec li i.ok { color: var(--muted); }
.pt-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; } .pt-facts > div { background: color-mix(in srgb, var(--text) 5%, transparent); border-radius: 12px; padding: 7px 10px; display: flex; flex-direction: column; } .pt-facts span { font-size: 12px; color: var(--muted); }
.pt-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin: 10px 0 2px; }
.pt-bk > div.wide { flex-direction: column; align-items: flex-start; gap: 2px; } .pt-bk > div.wide b { text-align: left; font-weight: 600; font-size: 14px; }
.pt-end { text-align: center; padding: 18px 10px; background: var(--card); border-radius: 22px; border: 1px solid var(--line); animation: ptFlip .4s cubic-bezier(.2,.8,.2,1); } .pt-end h2 { margin: 6px 0; }
.pt-story { margin: 12px 0; } .pt-story p { background: var(--card); border-radius: 14px; padding: 10px 12px; margin: 0 0 8px; line-height: 1.45; animation: itemIn .4s var(--ease) both; }
.pt-story p:nth-child(2) { animation-delay: .08s; } .pt-story p:nth-child(3) { animation-delay: .16s; } .pt-story p:nth-child(4) { animation-delay: .24s; } .pt-story p:nth-child(5) { animation-delay: .32s; }
.pt-roles { padding-left: 18px; line-height: 1.6; }
/* Бункер по сети */
.pt-bk.mine > div { align-items: center; } .pt-bk.mine > div.open { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pt-bk.mine .pt-rev { margin-left: 8px; flex: none; } .pt-bk.mine .pt-open { font-style: normal; font-size: 11px; color: var(--ok); margin-left: 8px; flex: none; }
.pt-bk.mine > div.wide { flex-direction: row; flex-wrap: wrap; } .pt-bk.mine > div.wide span { width: 100%; }
.pt-net-pl { display: grid; gap: 8px; } .pt-npl { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; transition: opacity .3s; }
.pt-npl.out { opacity: .45; } .pt-npl.me { border-color: var(--accent); } .pt-npl .row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.pt-revs { display: flex; flex-wrap: wrap; gap: 6px; } .pt-revs span { background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 10px; padding: 5px 9px; font-size: 13px; animation: itemIn .35s var(--ease); }
.pt-revs i { font-style: normal; color: var(--muted); margin-right: 4px; } .ok-t { color: var(--ok); }
/* Мафия */
body.mf-dark .page { background: #0b0d14; color: #e8ecff; transition: background .6s; } body.mf-dark .page .pt-card { background: #151a28; border-color: #252c42; }
.mf-night { text-align: center; padding-top: 10px; } .mf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.mf-p { aspect-ratio: 1; border-radius: 20px; font-size: 26px; font-weight: 800; background: var(--card); border: 2px solid var(--line); color: inherit; }
body.mf-dark .mf-p { background: #151a28; border-color: #2a3350; } .mf-p:disabled { opacity: .3; } .mf-p:active { transform: scale(.95); }
.pt-bk.mine > div b { flex: 1; text-align: left; margin-left: 10px; }
/* календарь: плашки не влезают по высоте — без вторых строк, затем плотнее (вместо обрезанной нижней смены) */
.day.tight .chip-s .l2 { display: none; }
.day.tighter .chip-s { padding-top: 0; padding-bottom: 0; min-height: 0; } .day.tighter .chip-s .l1 { font-size: 10px; line-height: 1.25; }
/* сегодняшний день: свой цвет и способ выделения (настройки отображения календаря) */
.day.today .num span { background: var(--todc, var(--danger)); }
.day.today.tm-frame, .day.today.tm-both { box-shadow: inset 0 0 0 2.5px var(--todc, var(--danger)); border-radius: 12px; }
.day.today.tm-fill, .day.today.tm-both { background: color-mix(in srgb, var(--todc, var(--danger)) 18%, transparent); border-radius: 12px; }
html.cal-grid .cal-scroll .grid > .day.today.tm-frame, html.cal-grid .cal-scroll .grid > .day.today.tm-both, html.cal-grid .cal-scroll .grid > .day.today.tm-fill { border-radius: 0; }
.today-cols { display: flex; gap: 12px; padding: 12px 14px; } .tc-o { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.tc-o.on { border-color: var(--card); box-shadow: 0 0 0 2.5px var(--c); }
/* Новый год — цвета от символа года (nyyear.js); 2027 — Красная Огненная Коза */
.ny-banner { background: linear-gradient(135deg, var(--ng1, #7a1f2b) 0%, var(--ng2, #1d3570) 55%, var(--ng3, #14244a) 100%) !important; position: relative; overflow: visible; }
.ny-mascot { margin-left: auto; flex: none; background: none; border: 0; padding: 0; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ny-mascot.em { font-size: 38px; filter: drop-shadow(0 0 10px rgba(var(--ngl), .75)); animation: nyBob 3s ease-in-out infinite; }
.ny-mascot.ng { width: 78px; height: 82px; margin: -6px -4px -6px auto; }
.ng-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 8px rgba(var(--ngl, 255,120,40), .65)); }
.ng-head { transform-origin: 50px 60px; animation: ngSway 4.5s ease-in-out infinite; }
.ng-beard, .ng-tuft { transform-box: fill-box; animation: ngFlame .42s ease-in-out infinite alternate; }
.ng-beard { transform-origin: 50% 0%; } .ng-tuft { transform-origin: 50% 100%; animation-duration: .34s; }
.ng-ear { transform-box: fill-box; transform-origin: 100% 50%; animation: ngEar 5s ease-in-out infinite; } .ng-ear.r { transform-origin: 0% 50%; animation-name: ngEarR; }
.ng-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: ngBlink 4.2s infinite; }
.ng-horns { animation: ngHorn 2.4s ease-in-out infinite alternate; }
/* коза живая: дышит, смотрит по сторонам, жуёт, высовывает язык, морщит нос, от чубчика летят искры */
.ng-svg { animation: ngBreath 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.ng-look { animation: ngLook 7s ease-in-out infinite; }
.ng-mouth, .ng-tongue { transform-box: fill-box; transform-origin: 50% 0%; }
.ng-mouth { animation: ngChew 9s ease-in-out infinite; }
.ng-tongue { animation: ngTongue 9s ease-in-out infinite; transform: scaleY(0); }
.ng-nose { transform-box: fill-box; transform-origin: 50% 50%; animation: ngSniff 5.5s ease-in-out infinite; }
.ng-embers circle { opacity: 0; animation: ngEmber 2.6s ease-out infinite; transform-box: fill-box; } .ng-embers .e2 { animation-delay: .7s; } .ng-embers .e3 { animation-delay: 1.4s; } .ng-embers .e4 { animation-delay: 2s; }
@keyframes ngBreath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.018, 1.026); } }
@keyframes ngLook { 0%, 12%, 100% { transform: translateX(0); } 20%, 32% { transform: translateX(-2.2px); } 42%, 50% { transform: translateX(0); } 60%, 74% { transform: translateX(2.2px); } 84% { transform: translateX(0); } }
@keyframes ngChew { 0%, 40%, 100% { transform: scaleY(1); } 44% { transform: scaleY(1.9); } 48% { transform: scaleY(.9); } 52% { transform: scaleY(1.9); } 56% { transform: scaleY(.9); } 60% { transform: scaleY(1.6); } 64% { transform: scaleY(1); } }
@keyframes ngTongue { 0%, 78%, 100% { transform: scaleY(0); } 82%, 90% { transform: scaleY(1); } 94% { transform: scaleY(0); } }
@keyframes ngSniff { 0%, 60%, 100% { transform: scale(1); } 64% { transform: scale(1.15, .9); } 68% { transform: scale(1); } 72% { transform: scale(1.15, .9); } 76% { transform: scale(1); } }
@keyframes ngEmber { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 15% { opacity: .95; } 100% { transform: translate(var(--ex, 3px), -16px) scale(.3); opacity: 0; } }
.ng-embers .e1 { --ex: -4px; } .ng-embers .e3 { --ex: 2px; } .ng-embers .e4 { --ex: 5px; }
@keyframes ngSway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } 62% { transform: rotate(4deg) translateX(1px); } 66% { transform: rotate(-7deg); } 70% { transform: rotate(6deg); } 74% { transform: rotate(-3deg); } }
@keyframes ngFlame { from { transform: scale(1, 1) skewX(-4deg); filter: brightness(1); } to { transform: scale(.88, 1.14) skewX(5deg); filter: brightness(1.3); } }
@keyframes ngEar { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-14deg); } 94% { transform: rotate(4deg); } }
@keyframes ngEarR { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(14deg); } 88% { transform: rotate(-4deg); } }
@keyframes ngBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes ngHorn { from { filter: brightness(1); } to { filter: brightness(1.25) drop-shadow(0 0 3px rgba(255,190,80,.8)); } }
@keyframes nyBob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
/* нажали — бодается: наклон вперёд с разбега и отскок */
.ny-mascot.hop .ng-svg, .ny-mascot.hop.em { animation: ngButt .7s cubic-bezier(.3,.1,.3,1); }
@keyframes ngButt { 0% { transform: none; } 30% { transform: translateY(-3px) rotate(-10deg) scale(.95); } 55% { transform: translateY(4px) rotate(8deg) scale(1.14); } 80% { transform: translateY(-2px) rotate(-3deg); } 100% { transform: none; } }
.ny-spark { position: absolute; left: 30%; top: 30%; font-style: normal; font-size: 13px; color: #ffcf5a; pointer-events: none; animation: nyBurst 1s ease-out forwards; }
@keyframes nyBurst { from { opacity: 1; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3); } }
.fx-snow .topbar h1::after { content: var(--nyem, ' 🐐'); }

.pshifts { position: relative; } .lv-free-set { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted); } .lv-free-set svg { width: 18px; height: 18px; } .lv-free-set.on { color: var(--accent); }
.lv-fi-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-right: 10px; }
.acc-wall { position: fixed; inset: 0; z-index: 49; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; animation: fade .25s; }
.acc-wall .acc-in { max-width: 360px; width: 100%; } .acc-wall h2 { margin: 10px 0 6px; } .acc-wall p { margin: 0 0 18px; }

.legal-body { padding: 0 !important; display: flex; flex-direction: column; } .legal-frame { flex: 1; width: 100%; min-height: calc(100vh - 120px); border: 0; background: #fff; }
/* приглашение в игру — карточка в «Ещё» под профилем: появляется и уезжает плавно */
.more-inv { display: flex; flex-direction: column; }
.mi-card { overflow: hidden; transition: height .35s cubic-bezier(.2,.8,.2,1), opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1); }
.mi-card.in { opacity: 0; transform: translateY(-8px); } .mi-card.out { opacity: 0; transform: translateX(40px); }
.mi-in { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 12px; border-radius: 18px; background: var(--card); border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent); } /* рамка внутри блока: раньше тень обрезалась по краям и обводка выглядела кривой */
.mi-in .gi-e { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; flex: none; background: color-mix(in srgb, var(--c) 22%, transparent); }
.mi-in b { display: block; font-size: 14px; } .mi-in .small { color: var(--muted); }
.mi-in .gi-no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); flex: none; } .mi-in .gi-no svg { width: 16px; height: 16px; }
.mi-in .gi-yes { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--accent); color: #fff; font-weight: 700; flex: none; }
/* чат в играх по сети */
.pc-chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; padding: 0 12px calc(var(--safe-b) + 12px); }
.pc-tog { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 22px; background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.pc-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: #ff3b30; color: #fff; font-size: 11px; font-style: normal; display: grid; place-items: center; padding: 0 5px; }
.pc-panel { pointer-events: auto; width: 100%; max-width: 560px; align-self: center; background: var(--card); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.35); margin-bottom: 10px; display: flex; flex-direction: column; max-height: 0; opacity: 0; overflow: hidden; transform: translateY(12px); transition: max-height .3s cubic-bezier(.2,.8,.2,1), opacity .2s, transform .3s; order: -1; }
.pc-chat.open .pc-panel { max-height: 55vh; opacity: 1; transform: none; }
.pc-list { flex: 1; overflow-y: auto; padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.pc-m { max-width: 82%; padding: 7px 11px; border-radius: 14px; background: color-mix(in srgb, var(--text) 7%, transparent); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.pc-m b { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 1px; }
.pc-m.me { align-self: flex-end; background: var(--accent); color: #fff; } .pc-m.me b { color: rgba(255,255,255,.75); }
.pc-m.team { box-shadow: inset 0 0 0 1.5px #c0222c; } .pc-m.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; text-align: center; max-width: 100%; }
.pc-hint:empty { display: none; } .pc-hint { padding: 0 12px 4px; }
.pc-form { display: flex; gap: 8px; padding: 8px 10px 10px; } .pc-form input { flex: 1; min-width: 0; height: 40px; border-radius: 20px; padding: 0 14px; }
.pc-send { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; } .pc-send:disabled { opacity: .4; } .pc-send svg { width: 18px; height: 18px; }
.page:has(.pc-chat) { padding-bottom: calc(96px + var(--safe-b)); }
/* мафия по сети */
.mfn-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 16px; background: var(--card); margin-bottom: 10px; }
.mfn-head.night { background: linear-gradient(135deg, #1a1440, #0b0b1e); color: #e8e6ff; } .mfn-head.night .muted { color: #a6a3d6; }
.mfn-head b { font-size: 18px; } .mfn-t { font-size: 28px !important; margin: 0 !important; }
.mfn-role { background: var(--card); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; } .mfn-role summary { cursor: pointer; } .mfn-role p { margin: 8px 0 0; }
.mfn-info { margin-top: 8px; display: grid; gap: 3px; }
.mfn-log { padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); margin-bottom: 10px; font-weight: 600; }
.mfn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.mfn-p { min-height: 54px; border-radius: 14px; background: var(--card); padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .15s, box-shadow .15s; }
.mfn-p span { font-size: 11px; color: var(--muted); } .mfn-p.on { box-shadow: inset 0 0 0 2.5px var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); transform: scale(1.03); }
.mfn-p:disabled { opacity: .35; } .mfn-p.none { color: var(--muted); }
.mfn-sleep { text-align: center; padding: 18px 0; }
.mfn-pl { display: grid; gap: 6px; } .mfn-pl > div { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--card); } .mfn-pl > div.dead { opacity: .5; } .mfn-pl > div.dead b { text-decoration: line-through; }
body.mf-dark .page { --card: #151a28; --line: #2a3350; --text: #e8ecff; --muted: #9aa3c7; }
body.mf-dark .mfn-log { background: #1c2340; color: #e8ecff; }
body.mf-dark .pc-panel { background: #151a28; color: #e8ecff; } body.mf-dark .pc-form input { background: #0b0d14; color: #e8ecff; }

/* режимы (бета) */
.modes-bar { display: flex; gap: 6px; margin: 12px 0 4px; padding: 0 6px; overflow-x: auto; }
.md-chip { flex: 1 1 0; min-width: 66px; height: 40px; padding: 0 10px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s, transform .15s; }
.md-chip:active { transform: scale(.96); } .md-chip .md-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.md-chip.on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.md-chip.add { flex: 0 0 40px; min-width: 40px; padding: 0; color: var(--muted); } .md-chip.add svg { width: 18px; height: 18px; }
.md-card { background: var(--card); border-radius: 18px; margin-bottom: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.md-card.open { box-shadow: inset 0 0 0 1.5px var(--accent); }
.md-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; } .md-head b { display: block; font-size: 16px; } .md-head .small { display: block; margin-top: 1px; }
.md-big { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--accent) 14%, transparent); flex: none; }
.md-body { padding: 0 14px 14px; }
.md-emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.md-em { height: 40px; border-radius: 12px; font-size: 22px; background: color-mix(in srgb, var(--text) 5%, transparent); } .md-em.on { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.md-nm { width: 100%; height: 44px; border-radius: 12px; padding: 0 12px; font-size: 16px; font-weight: 600; }
.md-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 2px 8px; display: flex; justify-content: space-between; }
.md-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.md-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; transition: background .15s, opacity .15s; }
.md-tile .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); } .md-tile .ico svg { width: 20px; height: 20px; }
.md-tl { font-size: 11px; line-height: 1.15; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.md-tile.on { background: color-mix(in srgb, var(--accent) 12%, transparent); } .md-tile.on .ico { background: var(--c); color: #fff; } .md-tile:disabled { opacity: .35; }
.md-k { position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center; }
.md-auto { display: flex; } .md-auto button { flex: 1; }
.md-lim { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); color: var(--muted); font-size: 14px; }
.danger-t { color: var(--danger) !important; background: none !important; }

/* редактор «Ещё» — сетка */
.me-grid { touch-action: pan-y; } .me-t { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.me-b { position: absolute; top: 2px; right: calc(50% - 40px); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 16px; line-height: 1; color: #fff; background: #ff3b30; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.me-t.hid .me-b { background: #34c759; } .me-t.hid .ico { opacity: .45; filter: grayscale(.6); }
.me-t.me-hole { opacity: .25; } .me-ghost { transition: none !important; }
.me-grid .me-t.shown { animation: meWiggle .5s ease-in-out infinite alternate; } .me-grid .me-t.shown:nth-child(2n) { animation-delay: .25s; }
@keyframes meWiggle { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }

/* приглашение в игру: в «Ещё» верхняя плашка уезжает (там своя карточка); смахнутая — тоже */
body.on-more .g-invite.show, .g-invite.show.swiped { transform: translate3d(0, calc(-100% - var(--safe-t) - 20px), 0); opacity: 0; pointer-events: none; }
.more-inv:not(:empty) { margin-top: 12px; }

/* припаркованная вкладка: скрыта, но живая — при возврате показывается мгновенно */
.screen.parked { visibility: hidden; pointer-events: none; animation: none !important; z-index: -1; }
/* НГ: сугроб на карточке профиля — по верхнему краю самой карточки (раньше лежал на кнопке внутри и «съезжал» вниз) */
.fx-snow .pf-card { position: relative; }
.fx-snow .pf-card .profile::before { content: none; }

/* крокодил */
.cr-cv { width: 100%; height: 46vh; border-radius: 16px; background: var(--card); touch-action: none; display: block; }
.cr-tools { gap: 8px; margin-top: 8px; } .cr-round .pt-word { font-size: 32px; }

/* рейтинг и турнир */
.rt-open { margin-bottom: 10px; }
.rt-hero { padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #e8a317, #d9534f); color: #fff; margin-bottom: 6px; } .rt-hero b { display: block; font-size: 18px; margin: 4px 0; } .rt-hero .small { opacity: .9; }
.rt-n { display: inline-grid; place-items: center; width: 22px; color: var(--muted); font-weight: 700; } .rt-me { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* отложенные сообщения */
.sch-bar { display: block; width: calc(100% - 20px); margin: 0 10px 6px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--text); font-size: 13px; text-align: left; }

/* здоровье и привычки */
.hb-water { padding: 14px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, #4aa3ff 22%, var(--card)), var(--card)); margin-bottom: 10px; }
.hb-water b { font-size: 22px; } .hb-glasses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hb-g { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; background: color-mix(in srgb, var(--text) 6%, transparent); filter: grayscale(1) opacity(.45); transition: filter .2s, transform .15s; } .hb-g.on { filter: none; background: color-mix(in srgb, #4aa3ff 22%, transparent); } .hb-g:active { transform: scale(.9); }
.hb-tip { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); margin-bottom: 8px; } .hb-tip > span { font-size: 26px; } .hb-tip .small { color: var(--muted); margin-top: 2px; }
.hb-chk { width: 30px; height: 30px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; font-weight: 800; color: #fff; margin-right: 10px; transition: background .2s; } .hb-chk.on { background: #34c759; box-shadow: none; }
.hb-week { display: flex; gap: 3px; } .hb-week i { width: 8px; height: 20px; border-radius: 4px; background: color-mix(in srgb, var(--text) 10%, transparent); } .hb-week i.on { background: #34c759; }
.hb-pre { display: flex; flex-wrap: wrap; gap: 6px; } .hb-p { padding: 7px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); font-size: 13px; }
.hb-goals { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }

/* итоги года */
.ys-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; margin-top: 12px; border-radius: 18px; background: linear-gradient(135deg, #6a5cff, #ee0979); color: #fff; font-size: 26px; text-align: left; } .ys-banner b { display: block; font-size: 16px; } .ys-banner .small { font-size: 12px; opacity: .9; }
.ys { position: fixed; inset: 0; z-index: 120; background: var(--ys); color: #fff; animation: fade .25s; transition: background .5s; } .ys.closing { animation: fadeOut .25s forwards; }
.ys-bars { position: absolute; top: calc(var(--safe-t) + 10px); left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; } .ys-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; } .ys-bars i b { display: block; height: 100%; width: 0; background: #fff; } .ys-bars i.done b { width: 100%; } .ys-bars i.on b { animation: ysBar 5.5s linear forwards; }
@keyframes ysBar { to { width: 100%; } }
.ys-x { position: absolute; top: calc(var(--safe-t) + 22px); right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 20px; background: rgba(0,0,0,.18); }
.ys-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; text-align: center; }
.ys-in { animation: ysIn .45s cubic-bezier(.2,.8,.2,1); } .ys-big { font-size: min(28vw, 140px); font-weight: 900; line-height: 1; letter-spacing: -.03em; text-shadow: 0 6px 30px rgba(0,0,0,.2); } .ys-in h2 { font-size: 26px; margin: 12px 0 8px; } .ys-in p { font-size: 17px; opacity: .92; max-width: 340px; margin: 0 auto; }
@keyframes ysIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.ys-prev, .ys-next { position: absolute; top: 80px; bottom: 0; background: none; border: 0; } .ys-prev { left: 0; width: 30%; } .ys-next { right: 0; width: 70%; }
.ys-share { position: relative; z-index: 4; margin-top: 22px; padding: 12px 26px; border-radius: 24px; background: #fff; color: #222; font-weight: 700; }

/* режимы: превью нижней панели и порядок разделов */
.md-tb { display: flex; justify-content: space-around; gap: 2px; padding: 8px 6px; border-radius: 20px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.md-tb > * { flex: 1; border: 0; background: none; color: inherit; padding: 4px 0; border-radius: 12px; touch-action: none; transition: transform .15s; }
.md-tb > *, .md-tb div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; } .md-tb span svg { width: 20px; height: 20px; } .md-tb i { font-style: normal; font-size: 10px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-order { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.md-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.md-row.bar { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.md-row .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; } .md-row .ico svg { width: 16px; height: 16px; }
.md-row small { display: block; font-size: 11px; color: var(--muted); } .md-row .iconbtn { width: 32px; height: 32px; } .md-row .iconbtn:disabled { opacity: .25; }

/* ===== плавные открытия и закрытия (1.9.0.4) =====
   Одна кривая для всего, как в системе iPhone: быстрый старт и мягкая остановка. Открытие ~0,42 с, закрытие ~0,32 с.
   Двигаем только transform (видеокарта), без «прыжка» прозрачности в конце — поэтому ничего не мигает. */
:root { --open: cubic-bezier(.32,.72,0,1); --close: cubic-bezier(.4,0,.7,.2); }
.page, .chat-page { animation: pgIn .42s var(--open) backwards; will-change: transform; box-shadow: -8px 0 28px rgba(0,0,0,.18); }
.page.closing { animation: pgOut .32s var(--close) forwards; }
@keyframes pgIn { from { transform: translate3d(100%, 0, 0); } to { transform: none; } }
@keyframes pgOut { to { transform: translate3d(100%, 0, 0); } }
.overlay { animation: fade .32s var(--open); } .overlay.closing { animation: fadeOut .3s var(--close) forwards; }
.sheet { animation: shIn .44s var(--open) backwards; will-change: transform; } .overlay.closing .sheet { animation: shOut .3s var(--close) forwards; }
@keyframes shIn { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@keyframes shOut { to { transform: translate3d(0, 100%, 0); } }
@media (min-width: 700px) { .sheet { animation: popIn .32s var(--open) backwards; } .overlay.closing .sheet { animation: popOut2 .22s var(--close) forwards; } }
@keyframes popIn { from { transform: translate3d(0, 24px, 0) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popOut2 { to { transform: translate3d(0, 16px, 0) scale(.97); opacity: 0; } }
#view > .screen.from-right { animation: scrFromRight .36s var(--open); } #view > .screen.from-left { animation: scrFromLeft .36s var(--open); }
#view > .screen.push-in { animation: pushIn .42s var(--open); }
.page.swiped.closing, .chat-page.swiped { animation: none !important; }

/* чат: просмотр фото и видео */
.gv { position: fixed; inset: 0; z-index: 95; color: #fff; overflow: hidden; touch-action: none; animation: fade .25s var(--open, ease); outline: none; }
.gv.closing { animation: fadeOut .26s ease forwards; }
.gv-bg { position: absolute; inset: 0; background: #000; }
.gv-track { position: absolute; inset: 0; will-change: transform; }
.gv-s { position: absolute; inset: 0; display: grid; place-items: center; }
.gv-s img, .gv-s video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; }
.gv-top, .gv-bot { position: absolute; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 12px; transition: opacity .25s, transform .25s; }
.gv-top { top: 0; padding-top: calc(var(--safe-t) + 8px); background: linear-gradient(rgba(0,0,0,.55), transparent); }
.gv-bot { bottom: 0; flex-direction: column; align-items: stretch; padding-bottom: calc(var(--safe-b) + 12px); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.gv .iconbtn { color: #fff; background: rgba(255,255,255,.14); }
.gv-who b { display: block; font-size: 15px; } .gv-who small { opacity: .75; font-size: 12px; } .gv-n { font-size: 14px; opacity: .85; }
.gv-cap { font-size: 15px; line-height: 1.35; max-height: 30vh; overflow: auto; } .gv-cap:empty { display: none; }
.gv.chrome-off .gv-top { opacity: 0; transform: translateY(-20px); pointer-events: none; } .gv.chrome-off .gv-bot { opacity: 0; transform: translateY(20px); pointer-events: none; }
.gv.dragging .gv-top, .gv.dragging .gv-bot { opacity: 0; }
body.gv-open { overflow: hidden; }
.msg.media { position: relative; } .m-vplay { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.m-vplay svg { width: 24px; height: 24px; margin-left: 3px; }
.m-cap { padding: 6px 10px 2px; font-size: 15px; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
/* перед отправкой фото */
.mc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 10px; } .mc-grid.one { grid-template-columns: 1fr; }
.mc-it { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--card); } .mc-grid.one .mc-it { aspect-ratio: auto; max-height: 50vh; }
.mc-it img, .mc-it video { width: 100%; height: 100%; object-fit: cover; display: block; } .mc-grid.one .mc-it img { object-fit: contain; max-height: 50vh; }
.mc-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; } .mc-x svg { width: 15px; height: 15px; }
.mc-v { position: absolute; left: 8px; bottom: 8px; color: #fff; } .mc-v svg { width: 18px; height: 18px; }
.mc-add { aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--line); color: var(--muted); display: grid; place-items: center; } .mc-grid.one .mc-add { aspect-ratio: auto; height: 56px; }
.mc-raw { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 2px 10px; }
.mc-row { display: flex; gap: 8px; align-items: flex-end; } .mc-cap { flex: 1; min-height: 44px; border-radius: 22px; padding: 11px 16px; resize: none; font: inherit; }
.mc-send { position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; } .mc-send b { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: #fff; color: var(--accent); font-size: 11px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }

/* режимы: перетаскивание панели и списка */
.md-tb span svg { pointer-events: none; } .md-tbi { cursor: grab; } .md-tbi:active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.md-tbe span { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px dashed var(--muted); border-radius: 7px; color: var(--muted); font-size: 13px; } .md-tbm { opacity: .55; }
.md-hd { width: 26px; height: 32px; display: grid; place-items: center; color: var(--muted); touch-action: none; cursor: grab; flex: none; margin-left: -4px; } .md-hd svg { width: 18px; height: 18px; fill: currentColor; }
.md-sw { border: 0; border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); white-space: nowrap; }
.md-row.bar .md-sw { color: var(--muted); }
.md-div { font-size: 11px; color: var(--muted); text-align: center; padding: 6px 0 2px; display: flex; align-items: center; gap: 8px; }
.md-div::before, .md-div::after { content: ''; flex: 1; border-top: 1px dashed color-mix(in srgb, var(--text) 25%, transparent); }
.dl-on { user-select: none; -webkit-user-select: none; }
.dl-drag { position: relative; z-index: 3; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: none !important; background: var(--card, var(--bg)) !important; }
.md-row { transition: background .2s; }

/* звонок: системную кнопку ▶ поверх видео не показываем — вместо неё своя понятная «Нажмите, чтобы включить видео» */
.call-screen video::-webkit-media-controls-start-playback-button, .call-screen video::-webkit-media-controls { display: none !important; -webkit-appearance: none; opacity: 0; }

/* звонок на iPhone: диагностика видео */
.call-diag { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; }
.call-diag-p { position: absolute; left: 10px; right: 10px; top: calc(var(--safe-t) + 54px); z-index: 9; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.86); color: #d8ffd8; }
.call-diag-p pre { margin: 0 0 8px; font: 11px/1.35 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }

/* плавное исчезновение окон и плашек (вместо мгновенного) */
.fx-out { animation: fadeOut .24s var(--close, ease) forwards !important; pointer-events: none !important; }
.popover.fx-out { animation: fadeOut .14s ease forwards !important; }

.call-diag-p { max-height: 70vh; overflow: auto; } .call-diag-p pre { font-size: 10px; }
.cd-q { margin-bottom: 8px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; } .cd-q .row { flex-wrap: wrap; }

/* Android: звонок в окошке поверх других приложений («картинка в картинке») — только собеседник, без кнопок */
.in-pip body > *:not(.call-screen):not(script) { visibility: hidden !important; }
.in-pip .call-screen { inset: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0 !important; }
.in-pip .call-screen .acts, .in-pip .call-screen .call-top, .in-pip .call-screen video.local, .in-pip .call-screen .tap-play, .in-pip .call-screen .call-warn, .in-pip .call-screen .call-diag-p, .in-pip .call-screen .info h2, .in-pip .call-screen .info .status { display: none !important; }
.in-pip .call-screen.is-video .info { display: none !important; }
.in-pip .call-screen .info { transform: scale(.6); }
/* iPhone: кнопка «картинка в картинке» (⧉) в звонке */
.call-pip { margin-left: 4px; }

/* ===== 1.9.5.1 ===== */
/* «Стереть» и выбранные шаблоны: рамка внутри кнопки (раньше outline обрезался и выходил за край прокручиваемого ряда) */
.tpl-btn.on { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.edit-bar .scroller { padding: 2px; }
/* чат: плашка с именем и статусом всегда одного размера, что бы ни было в статусе */
.chat-top .who { height: 48px; box-sizing: border-box; overflow: hidden; }
.chat-top .who .av, .chat-top .who .avatar { flex: none; }
.chat-top .who b, .chat-top .who .st { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.chat-top .who .st { height: 16px; }
/* звонок: верхние значки одной высоты и на одном уровне */
.call-top { height: 36px; }
.call-top > * { box-sizing: border-box; flex: none; }
.call-min, .call-pip, .call-diag { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 17px; line-height: 1; background: rgba(255,255,255,.16); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.call-pip { margin-left: 0; } .call-diag { margin-left: auto; }
.call-pip svg, .call-min svg { width: 20px; height: 20px; }
.call-lock { height: 36px; display: flex; align-items: center; padding: 0 12px; }
.call-time { top: 0; height: 36px; display: flex; align-items: center; }
/* звонок: все кнопки в один ряд, одного размера; миниатюра не наезжает на них */
.call-screen .acts { flex-wrap: nowrap !important; gap: 8px !important; justify-content: center; align-items: flex-start; width: 100%; padding: 0 2px; }
.call-screen .acts .cb-w { flex: 1 1 0; min-width: 0; max-width: 84px; }
.call-screen .acts .call-btn { width: 58px; height: 58px; flex: none; }
.call-screen .acts .cb-w span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.call-screen .acts > .call-btn { margin: 0 16px; }
.call-screen[data-corner="bl"] video.local, .call-screen[data-corner="br"] video.local { bottom: calc(var(--safe-b) + 150px); }
.call-screen[data-corner="bl"].swapped video.remote, .call-screen[data-corner="br"].swapped video.remote { bottom: calc(var(--safe-b) + 150px); }
.call-zoom { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); z-index: 6; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff; font-weight: 700; font-size: 16px; pointer-events: none; animation: fadeIn .15s; }
.call-zoom.out { animation: fadeOut .4s forwards; }
.aud-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 8px; border: 0; background: none; color: var(--text); text-align: left; border-radius: 12px; font-size: 16px; }
.aud-row .em { font-size: 24px; width: 34px; text-align: center; } .aud-row small { display: block; color: var(--muted); font-size: 12px; }
.aud-row.on { background: color-mix(in srgb, var(--accent) 14%, transparent); } .aud-row .ck { margin-left: auto; color: var(--accent); }


.msg svg.mt.dlv { opacity: .6; }

.av-offer { margin-top: 6px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 8%, transparent); font-size: 13px; } .av-acts { display: flex; gap: 8px; margin-top: 8px; }

.item.sub-tpl { padding-left: 34px; min-height: 40px; font-size: 14px; } .item.sub-tpl .color-dot { flex: none; }

.item.job-h { min-height: 38px; background: color-mix(in srgb, var(--text) 4%, transparent); font-size: 13px; }

.pf-preview { display: flex; gap: 8px; padding: 12px; border-radius: 18px; background: var(--card); margin-top: 6px; }
.pf-pv { flex: 1; min-width: 0; text-align: center; padding: 10px 4px; border-radius: 14px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.pf-pv b { display: block; font-size: 20px; line-height: 1.2; } .pf-pv span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Новый год 1.9.5.1: во всех разделах и играх что-то новогоднее; снег копится внизу, потом трактор его убирает ===== */
.fx-snow .screen[data-s="calendar"] .topbar h1::after { content: ' 🎁'; } .fx-snow .screen[data-s="chat"] .topbar h1::after { content: ' ⛄'; }
.fx-snow .screen[data-s="tasks"] .topbar h1::after { content: ' 🎄'; } .fx-snow .screen[data-s="love"] .topbar h1::after { content: ' 💝'; }
.fx-snow .screen[data-s="games"] .topbar h1::after { content: ' 🎅'; } .fx-snow .screen[data-s="notes"] .topbar h1::after { content: ' 🕯️'; }
.fx-snow .screen[data-s="cards"] .topbar h1::after { content: ' 🎟️'; } .fx-snow .screen[data-s="car"] .topbar h1::after { content: ' 🛷'; }
.fx-snow .screen[data-s="money"] .topbar h1::after { content: ' 🪙'; } .fx-snow .screen[data-s="reports"] .topbar h1::after { content: ' ⭐'; }
.fx-snow .screen[data-s="recipes"] .topbar h1::after { content: ' 🍪'; } .fx-snow .screen[data-s="files"] .topbar h1::after { content: ' 📦'; }
.fx-snow .screen[data-s="lock"] .topbar h1::after { content: ' ❄️'; } .fx-snow .screen[data-s="birthdays"] .topbar h1::after { content: ' 🥳'; }
.fx-snow .screen[data-s="habits"] .topbar h1::after { content: ' 🏂'; } .fx-snow .screen[data-s="widgets"] .topbar h1::after { content: ' ✨'; }
/* гирлянда под шапкой любого экрана-страницы (в том числе игр): лампочки мигают */
.fx-snow .page > .topbar, .fx-snow .screen .topbar { position: relative; }
.fx-snow .page > .topbar::after, .fx-snow .screen[data-s="games"] .topbar::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: -4px; height: 8px; pointer-events: none; opacity: .95; animation: nyTwinkle 1.4s ease-in-out infinite alternate;
  background: radial-gradient(circle at 7px 4px, #ff5d5d 2.6px, transparent 3.2px) 0 0 / 56px 8px repeat-x, radial-gradient(circle at 21px 4px, #ffd23f 2.6px, transparent 3.2px) 0 0 / 56px 8px repeat-x, radial-gradient(circle at 35px 4px, #4da3ff 2.6px, transparent 3.2px) 0 0 / 56px 8px repeat-x, radial-gradient(circle at 49px 4px, #3ddc84 2.6px, transparent 3.2px) 0 0 / 56px 8px repeat-x; }
.fx-snow .screen[data-s="games"] .topbar h1::after, .fx-snow .page > .topbar h2::after { position: static; background: none; height: auto; animation: none; }
@keyframes nyTwinkle { from { opacity: .45; filter: saturate(.7); } to { opacity: 1; filter: saturate(1.3); } }
/* шапка игры и поле: снег на краях */
.fx-snow .g-board, .fx-snow .gb-wrap { position: relative; }
.fx-snow .g-board::before { content: ''; position: absolute; left: -2px; right: -2px; top: -6px; height: 10px; border-radius: 10px 10px 0 0; background: radial-gradient(circle at 10px 10px, #fff 7px, transparent 7.5px) 0 0 / 22px 10px repeat-x; pointer-events: none; z-index: 1; filter: drop-shadow(0 -1px 0 rgba(150,180,220,.4)); }
.fx-snow .sheet::before { content: ''; position: absolute; left: 14px; right: 14px; top: -7px; height: 9px; background: radial-gradient(circle at 9px 9px, #fff 6px, transparent 6.5px) 0 0 / 20px 9px repeat-x; pointer-events: none; }
.fx-snow .sheet { position: relative; }
.fx-snow .btn.primary { box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 6px 18px rgba(255,77,94,.25); }
/* сугроб внизу и трактор */
.ny-floor { --h: 2px; position: fixed; left: 0; right: 0; bottom: calc(var(--safe-b) + 54px); height: calc(var(--h) + 10px); z-index: 24; pointer-events: none; transition: height 1.5s linear; }
.ny-floor .nf-snow { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; filter: drop-shadow(0 -1px 2px rgba(120,160,210,.35)); }
.ny-floor .nf-tractor { position: absolute; bottom: 0; right: 0; width: 64px; height: 38px; transform: translateX(110%); display: none; }
.ny-floor .nf-tractor svg { width: 100%; height: 100%; display: block; }
.ny-floor.plowing .nf-tractor { display: block; animation: nyPlow 7s linear forwards; }
.ny-floor.plowing .nf-snow { animation: nyClear 7s linear forwards; }
@keyframes nyPlow { from { transform: translateX(110%); } to { transform: translateX(calc(-100vw - 20px)); } }
@keyframes nyClear { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 100% 0 0); } }
body.hide-tabbar .ny-floor, body.editing .ny-floor { display: none; }

/* окна поверх звонка (выбор звука и др.) — выше экрана звонка */
.call-screen ~ .overlay { z-index: 95; }

/* сугроб: мягче и красивее */
.ny-floor .nf-snow { filter: drop-shadow(0 -2px 3px rgba(150,190,240,.45)); }
.ny-floor .nf-sp { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 5px 1px rgba(255,255,255,.9); bottom: calc(var(--h) * .55); animation: nySpark 2.6s ease-in-out infinite; opacity: 0; }
.ny-floor .nf-sp.a { left: 18%; } .ny-floor .nf-sp.b { left: 52%; animation-delay: .9s; } .ny-floor .nf-sp.c { left: 81%; animation-delay: 1.7s; }
@keyframes nySpark { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
.ny-floor.plowing .nf-sp { display: none; }
/* снежные шапки на карточках — ровнее и мягче */
.fx-snow .g-board::before, .fx-snow .sheet::before { filter: drop-shadow(0 -1px 1px rgba(150,190,240,.35)); }

/* сугроб на холсте у самого низа, за нижней панелью */
.ny-floor { --h: 8px; left: 0; right: 0; bottom: 0; height: 110px; z-index: 18; transition: none; }
.ny-floor .nf-snow { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 110px; filter: none; }
.ny-floor .nf-sp { bottom: calc(var(--h) + 6px); }
.ny-floor .nf-tractor { width: 74px; height: 44px; bottom: 2px; }

.ny-floor { --h: 6px; bottom: calc(var(--safe-b) + 57px); height: 76px; z-index: 24; }
.ny-floor .nf-snow { height: 76px; }
.ny-floor .nf-tractor { width: 66px; height: 40px; bottom: 6px; }

.ny-floor { bottom: calc(var(--safe-b) + 60px); height: 56px; }
.ny-floor .nf-snow { height: 56px; -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 45%, rgba(0,0,0,.0) 100%); mask-image: linear-gradient(to bottom, #000 0, #000 45%, rgba(0,0,0,0) 100%); }
.ny-floor .nf-tractor { bottom: 2px; }

/* ===== экран блокировки: галерея раскладок ===== */
.lk-chips { display: flex; gap: 8px; margin: 4px 0 12px; overflow-x: auto; scrollbar-width: none; } .lk-chips::-webkit-scrollbar { display: none; }
.lk-chip { flex: none; padding: 8px 16px; border-radius: 999px; border: 0; background: var(--card); color: var(--text); font-weight: 600; font-size: 14px; transition: background .2s, color .2s, transform .2s var(--open, ease); }
.lk-chip.on { background: var(--text); color: var(--bg); } .lk-chip:active { transform: scale(.95); }
.lk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.lk-item { border: 0; background: none; color: inherit; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lk-ph { position: relative; display: block; border-radius: 26px; padding: 5px; background: color-mix(in srgb, var(--text) 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 14%, transparent); transition: transform .25s var(--open, ease), box-shadow .25s; }
.lk-item:active .lk-ph { transform: scale(.97); }
.lk-ph.cur { box-shadow: inset 0 0 0 2.5px var(--ok, #30d158); }
.lk-ph canvas { display: block; width: 100%; height: auto; aspect-ratio: 1179 / 2556; border-radius: 21px; background: #111; }
.lk-use { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border-radius: 999px; background: var(--ok, #30d158); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px rgba(48,209,88,.35); }
.lk-use svg { width: 16px; height: 16px; stroke-width: 3; }
.lk-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; padding: 0 4px; } .lk-name i { font-style: normal; font-size: 16px; }

/* ===== стеклянная нижняя панель: линза-выделение (1.9.6) ===== */
#tabbar { background: color-mix(in srgb, var(--tab-bg) 72%, transparent); -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7); box-shadow: 0 10px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.14); }
#tabbar button { position: relative; z-index: 1; background: none !important; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
#tabbar button svg, #tabbar button span { transition: transform .35s cubic-bezier(.3,1.4,.5,1), color .2s; }
#tabbar button.on { color: var(--text); }
#tabbar button.hover svg, #tabbar button.hover span { transform: scale(1.2); }
#tabbar button.hover { color: var(--text); }
#tabbar .tb-ind { display: block !important; position: absolute; top: 4px; bottom: 4px; left: 0; z-index: 0; border-radius: 22px; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 16%, transparent), color-mix(in srgb, var(--text) 8%, transparent));
  -webkit-backdrop-filter: blur(3px) saturate(1.9) brightness(1.15); backdrop-filter: blur(3px) saturate(1.9) brightness(1.15);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,.5), inset 0 -1.5px 1px rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.26), 0 0 0 .5px rgba(255,255,255,.22);
  transition: transform .5s cubic-bezier(.3,1.45,.5,1), width .5s cubic-bezier(.3,1.45,.5,1), scale .3s cubic-bezier(.3,1.5,.5,1); }
#tabbar .tb-ind::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px; opacity: 0; transition: opacity .25s;
  background: conic-gradient(from 210deg, #ff7ab8, #ffd36b, #7dffb1, #6bc7ff, #b48cff, #ff7ab8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude; }
#tabbar.moving .tb-ind, #tabbar.pressing .tb-ind { scale: 1.1 1.06; }
#tabbar.dragging .tb-ind { scale: 1.22 1.12; }
#tabbar.moving .tb-ind::before, #tabbar.dragging .tb-ind::before, #tabbar.pressing .tb-ind::before { opacity: .85; }

/* ===== Новогодняя улица над нижней панелью + снег на панели (1.9.5.8) ===== */
.ny-floor { display: none !important; }
.ny-scene { --k: .12; position: fixed; left: 0; right: 0; bottom: calc(var(--safe-b) + 58px); height: 84px; z-index: 19; pointer-events: none; overflow: hidden; }
.ny-scene .ns-bg, .ny-scene .ns-piles { position: absolute; left: 0; bottom: 0; width: 100%; height: 84px; display: block; }
.ny-scene .ns-pl { position: absolute; inset: 0; }
.ny-scene .ns-piles .m { transform-box: view-box; transform: scale(1, calc(.18 + var(--k) * .82)); transition: transform 3s linear; }
.ny-scene .ns-tractor { position: absolute; left: 0; bottom: 8px; width: 78px; height: 42px; transform: translateX(-100px); display: none; }
.ny-scene .ns-tractor svg { width: 100%; height: 100%; display: block; }
.ny-scene.plowing .ns-tractor { display: block; animation: nyPlow2 15s linear forwards; }
.ny-scene.plowing .ns-pl { animation: nyClear2 15s linear forwards; }
@keyframes nyPlow2 { from { transform: translateX(-100px); } to { transform: translateX(calc(100vw + 20px)); } }
@keyframes nyClear2 { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
.ny-scene .ns-lights circle { animation: nsTw 1.6s ease-in-out infinite alternate; } .ny-scene .ns-lights circle:nth-child(even) { animation-delay: .8s; }
@keyframes nsTw { from { opacity: .35; } to { opacity: 1; } }
.ny-scene .nt-beacon, .ny-scene .ns-smoke { animation: nsBeacon 1s steps(2) infinite; }
.ny-scene .ns-smoke { animation: nsSmoke 5s ease-in-out infinite; }
@keyframes nsBeacon { 50% { opacity: .25; } } @keyframes nsSmoke { 0% { transform: translate(0, 0); opacity: .55; } 100% { transform: translate(6px, -16px) scale(1.7); opacity: 0; } }
body.hide-tabbar .ny-scene, body.editing .ny-scene { display: none; }
/* снег на самой панели: шапки по верхнему краю */
.fx-snow #tabbar::before { content: ''; position: absolute; left: 18px; right: 18px; top: -6px; height: 10px; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at 9px 10px, #fff 6px, transparent 6.5px) 0 0 / 21px 10px repeat-x, radial-gradient(circle at 14px 10px, #eef4ff 4.5px, transparent 5px) 0 2px / 33px 10px repeat-x; filter: drop-shadow(0 -1px 1px rgba(150,190,240,.4)); }
.fx-snow #tabbar { overflow: visible; }

.ny-scene { bottom: calc(var(--safe-b) + 70px); }
.ny-scene .ns-tractor { bottom: 6px; }

/* ===== зимние забавы внутри нижней панели (1.9.5.8) ===== */
.ny-scene { display: none !important; }
.fx-snow #tabbar::before { display: none; }
.fx-snow #tabbar { padding-top: 26px; }
.nt-strip { --k: .1; position: absolute; left: 14px; right: 14px; top: 3px; height: 20px; pointer-events: none; overflow: hidden; z-index: 2; border-radius: 12px 12px 0 0; }
.nt-strip svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.nt-strip .ns-acc .m { transform-box: view-box; transform: scale(1, calc(.15 + var(--k) * .95)); transition: transform 3s linear; }
.nt-strip .ns-b1 { animation: nsBall1 3.2s linear infinite; } .nt-strip .ns-b2 { animation: nsBall2 3.2s linear infinite; animation-delay: 1.6s; }
@keyframes nsBall1 { 0% { transform: translate(0, 0); opacity: 1; } 45% { transform: translate(16px, -6px); } 85% { transform: translate(32px, 0); opacity: 1; } 100% { transform: translate(34px, 2px); opacity: 0; } }
@keyframes nsBall2 { 0% { transform: translate(0, 0); opacity: 1; } 45% { transform: translate(-16px, -6px); } 85% { transform: translate(-32px, 0); opacity: 1; } 100% { transform: translate(-34px, 2px); opacity: 0; } }
.nt-strip .ns-sled { animation: nsSled 6s ease-in-out infinite; } @keyframes nsSled { 0% { transform: translateX(98px); opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(186px); opacity: 0; } }
.nt-strip .ns-man .p1 { animation: nsGrow 12s infinite; transform-origin: 150px 18px; } .nt-strip .ns-man .p2 { animation: nsGrow2 12s infinite; transform-origin: 150px 12px; } .nt-strip .ns-man .p3 { animation: nsGrow3 12s infinite; transform-origin: 150px 8px; } .nt-strip .ns-man .p4 { animation: nsGrow4 12s infinite; }
@keyframes nsGrow { 0% { transform: scale(0); } 12%, 90% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes nsGrow2 { 0%, 22% { transform: scale(0); } 34%, 90% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes nsGrow3 { 0%, 44% { transform: scale(0); } 56%, 90% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes nsGrow4 { 0%, 62% { opacity: 0; } 70%, 90% { opacity: 1; } 100% { opacity: 0; } }
.nt-strip .ns-roll { animation: nsRoll 6s linear infinite; transform-origin: 173px 15px; } @keyframes nsRoll { 0% { transform: translateX(0) scale(.5); } 100% { transform: translateX(-12px) scale(1.15); } }
.nt-strip .ns-skate { animation: nsSkate 5.5s ease-in-out infinite alternate; } @keyframes nsSkate { 0% { transform: translateX(240px) rotate(-4deg); } 100% { transform: translateX(296px) rotate(4deg); } }
.nt-strip .ns-wing { transform-box: fill-box; animation: nsWing 1.1s ease-in-out infinite alternate; } .nt-strip .ns-wing.l { transform-origin: 100% 50%; } .nt-strip .ns-wing.r { transform-origin: 0 50%; animation-name: nsWingR; }
@keyframes nsWing { from { transform: rotate(0); } to { transform: rotate(-38deg); } } @keyframes nsWingR { from { transform: rotate(0); } to { transform: rotate(38deg); } }
.nt-strip .ns-ski { animation: nsSki 26s linear infinite; transform: translateX(-30px); } @keyframes nsSki { 0%, 70% { transform: translateX(-30px); } 100% { transform: translateX(380px); } }
.nt-strip .ns-tr { display: none; transform: translateX(-40px); }
.nt-strip.plowing .ns-tr { display: block; animation: nsTr 10s linear forwards; } .nt-strip.plowing .ns-acc { animation: nsAccClear 10s linear forwards; }
@keyframes nsTr { from { transform: translateX(-40px); } to { transform: translateX(380px); } } @keyframes nsAccClear { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
.nt-strip .nt-beacon { animation: nsBeacon 1s steps(2) infinite; }

.fx-snow #tabbar .tb-ind { top: 27px; bottom: 4px; }
.nt-strip .ns-acc .m { transform: scale(1, calc(.2 + var(--k) * .9)); }

/* 1.9.5.9: всё стоит сверху, на «крыше» нижней панели; горка, с которой скатываются малыши */
.fx-snow #tabbar { padding-top: 6px; }
.fx-snow #tabbar .tb-ind { top: 4px; bottom: 4px; }
.nt-strip { top: -19px; left: 24px; right: 24px; height: 22px; border-radius: 0; overflow: hidden; }
.nt-strip .ns-sled { animation: none; }
.nt-strip .ns-slide { animation: nsSlide 5s cubic-bezier(.4, 0, .8, .6) infinite; opacity: 0; }
.nt-strip .ns-slide.b { animation-delay: 2.5s; }
@keyframes nsSlide { 0% { transform: translate(106px, 6.4px) rotate(22deg); opacity: 0; } 6% { opacity: 1; } 55% { transform: translate(148px, 19px) rotate(2deg); opacity: 1; } 85% { transform: translate(176px, 19px) rotate(0); opacity: 1; } 100% { transform: translate(184px, 19px); opacity: 0; } }
.nt-strip .ns-skate { animation: nsSkate2 5.5s ease-in-out infinite alternate; } @keyframes nsSkate2 { 0% { transform: translateX(244px) rotate(-4deg); } 100% { transform: translateX(296px) rotate(4deg); } }

.nt-strip .ns-man .p1 { transform-origin: 190px 18px; } .nt-strip .ns-man .p2 { transform-origin: 190px 12px; } .nt-strip .ns-man .p3 { transform-origin: 190px 8px; }
.nt-strip .ns-roll { transform-origin: 213px 15px; } @keyframes nsRoll { 0% { transform: translateX(0) scale(.5); } 100% { transform: translateX(-12px) scale(1.15); } }

/* ===== 1.9.5.10: логичная анимация малышей ===== */
.nt-strip .bob { animation: nsBob .34s ease-in-out infinite alternate; } @keyframes nsBob { from { transform: translateY(0); } to { transform: translateY(-.8px); } }
.nt-strip .twk circle { animation: nsTw 1.4s ease-in-out infinite alternate; } .nt-strip .twk circle:nth-child(2n) { animation-delay: .5s; } .nt-strip .twk circle:nth-child(3n) { animation-delay: .9s; }
.nt-strip .sway { animation: nsSway 4s ease-in-out infinite alternate; transform-origin: 0 0; } @keyframes nsSway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
/* снежки: каждый бежит вперёд, бросает, бежит назад; снежок летит дугой */
.nt-strip .kA { animation: nsKA 5s ease-in-out infinite; } .nt-strip .kB { animation: nsKB 5s ease-in-out infinite; }
@keyframes nsKA { 0% { transform: translate(44px, 17.4px); } 22%, 46% { transform: translate(58px, 17.4px); } 72%, 100% { transform: translate(44px, 17.4px); } }
@keyframes nsKB { 0%, 28% { transform: translate(96px, 17.4px); } 52%, 72% { transform: translate(82px, 17.4px); } 98%, 100% { transform: translate(96px, 17.4px); } }
.nt-strip .kA .arm { transform-box: fill-box; transform-origin: 50% 20%; animation: nsThrow 5s ease-in-out infinite; } .nt-strip .kB .arm { transform-box: fill-box; transform-origin: 50% 20%; animation: nsThrow 5s ease-in-out infinite; animation-delay: 1.25s; }
@keyframes nsThrow { 0%, 22% { transform: rotate(0); } 28% { transform: rotate(-150deg); } 34%, 100% { transform: rotate(0); } }
.nt-strip .bA { animation: nsBA 5s linear infinite; opacity: 0; } .nt-strip .bB { animation: nsBB 5s linear infinite; opacity: 0; }
@keyframes nsBA { 0%, 25% { opacity: 0; transform: translate(62px, 8.6px); } 26% { opacity: 1; transform: translate(62px, 8.6px); } 38% { transform: translate(78px, 4px); opacity: 1; } 49% { transform: translate(90px, 9px); opacity: 1; } 52%, 100% { opacity: 0; transform: translate(92px, 11px); } }
@keyframes nsBB { 0%, 50% { opacity: 0; transform: translate(80px, 8.6px); } 51% { opacity: 1; transform: translate(80px, 8.6px); } 62% { transform: translate(70px, 4px); opacity: 1; } 73% { transform: translate(62px, 9px); opacity: 1; } 76%, 100% { opacity: 0; transform: translate(60px, 11px); } }
/* горка: цикл 16 с — идёт вверх с санками → садится → скатывается → встаёт и идёт назад */
.nt-strip .cyc.p2 { animation-delay: -8s; } .nt-strip .cyc.p2 > g { animation-delay: -8s; }
.nt-strip .cyc > g { opacity: 0; }
.nt-strip .climb { animation: nsClimb 16s linear infinite; } .nt-strip .ride { animation: nsRide 16s linear infinite; } .nt-strip .back { animation: nsBack 16s linear infinite; }
.nt-strip .cyc.p2 .climb, .nt-strip .cyc.p2 .ride, .nt-strip .cyc.p2 .back { animation-delay: -8s; }
@keyframes nsClimb { 0% { opacity: 1; transform: translate(112px, 17.4px) rotate(0); } 8% { transform: translate(122px, 12px) rotate(-16deg); } 18% { transform: translate(131px, 5.2px) rotate(-4deg); } 22% { opacity: 1; transform: translate(134px, 4.2px) rotate(0); } 22.1%, 99.9% { opacity: 0; transform: translate(134px, 4.2px); } 100% { opacity: 1; transform: translate(112px, 17.4px); } }
@keyframes nsRide { 0%, 22% { opacity: 0; transform: translate(134px, 3.6px) rotate(20deg); } 22.1% { opacity: 1; transform: translate(134px, 3.6px) rotate(20deg); } 27% { transform: translate(137px, 5.2px) rotate(20deg); } 34% { transform: translate(152px, 10.6px) rotate(20deg); } 40% { transform: translate(166px, 16px) rotate(10deg); } 43% { transform: translate(174px, 17.4px) rotate(0); } 52% { opacity: 1; transform: translate(182px, 17.4px) rotate(0); } 52.1%, 100% { opacity: 0; transform: translate(182px, 17.4px); } }
@keyframes nsBack { 0%, 52% { opacity: 0; transform: translate(182px, 17.4px); } 52.1% { opacity: 1; transform: translate(182px, 17.4px); } 62% { transform: translate(170px, 17.4px); } 80% { transform: translate(126px, 17.4px); } 90%, 100% { opacity: 1; transform: translate(112px, 17.4px); } }
/* коньки: вправо, разворот, влево */
.nt-strip .skater { animation: nsSk 8s ease-in-out infinite; } .nt-strip .skater .turn { animation: nsTurn 8s step-end infinite; }
@keyframes nsSk { 0% { transform: translate(204px, 17.4px); } 46% { transform: translate(246px, 17.4px); } 54% { transform: translate(246px, 17.4px); } 100% { transform: translate(204px, 17.4px); } }
@keyframes nsTurn { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
.nt-strip .ns-ski { animation: nsSki 24s linear infinite; transform: translateX(14px); } @keyframes nsSki { 0%, 4% { transform: translateX(14px) scaleX(1); } 46% { transform: translateX(calc(var(--sw, 280) * 1px)) scaleX(1); } 46.1%, 54% { transform: translateX(calc(var(--sw, 280) * 1px)) scaleX(-1); } 96% { transform: translateX(14px) scaleX(-1); } 96.1%, 100% { transform: translateX(14px) scaleX(1); } }
.nt-strip { top: -31px; height: 34px; }

/* 1.9.5.12: аккуратнее — мягкие края, ровно по плоской части «крыши», узкий и широкий экран */
.nt-strip { left: 24px; right: 24px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.fx-snow #tabbar .tb-ind { top: 4px; bottom: 4px; }

/* 1.9.5.13: сцена стоит на панели (не внутри), всегда одного размера; ширину задаёт скрипт по числу вкладок */
.nt-strip { top: auto !important; bottom: 100%; left: 50% !important; right: auto !important; height: 34px; transform: translateX(-50%); }
.nt-strip svg { position: static; width: auto; height: 34px; inset: auto; }

/* 1.9.6.1: сворачивание работ в «Кто видит мои смены» */
.group-title.sp-fold { width: 100%; background: none; border: 0; padding: 4px 4px; margin: 14px 0 6px; color: var(--muted); text-align: left; cursor: pointer; }
.group-title.sp-fold .grow { flex: 1; text-transform: uppercase; letter-spacing: .4px; font-size: 13px; }
.group-title.sp-fold .chev { width: 18px; height: 18px; transition: transform .3s var(--spring, cubic-bezier(.3,1.4,.5,1)); flex: none; }
.group-title.sp-fold.closed .chev { transform: rotate(-90deg); }

/* 1.9.6.1: одна гирлянда на экран (верхняя), без второй под шапкой; в играх и окнах нет снежных «кружков» и шапок на карточках */
.fx-snow .page > .topbar::after, .fx-snow .screen .topbar::after { content: none !important; }
.fx-snow .g-board::before, .fx-snow .sheet::before { content: none !important; }
.fx-snow .sheet .group::before, .fx-snow .sheet .pf-card::before, .fx-snow .g-card::before, .fx-snow .screen[data-s="games"] .group::before, .fx-snow .screen[data-s="games"] .tile .ico::before { content: none !important; }

/* 1.9.6.1: поля даты и времени не вылезают за экран (iPhone даёт им собственную ширину) */
.field input[type="date"], .field input[type="time"], .field input[type="datetime-local"], .field input[type="month"] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.row > .field { min-width: 0; }

/* 1.9.6.1: код комнаты для игр по сети */
.pt-code { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; margin: 0 0 12px; border-radius: 18px; background: var(--card); }
.pt-code-v { font-size: 34px; letter-spacing: 8px; font-weight: 800; padding-left: 8px; cursor: pointer; user-select: all; }

/* 1.9.6.1: «Вопрос дня» — ровные отступы между блоками, ответы видны сразу */
.qday > * { margin-left: 0; margin-right: 0; }
.qday .q-text { margin: 6px 0 14px; }
.qday .q-wait { margin: 0 0 10px; padding: 0; }
.qday .q-answers { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.qday .q-answers .q-ans { margin: 0; }
.qday .q-in { display: block; margin: 0 0 12px; }
.qday .q-send { margin-top: 0; }
.qday .q-hist { display: block; margin: 14px 0 2px; padding: 4px 0; }
.wg-lock { flex-wrap: wrap; max-width: 100%; } .wg-lr { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* 1.9.6.1: «линза» панели прозрачная, как стекло: почти без заливки, только кромка, блик и лёгкое увеличение содержимого */
#tabbar .tb-ind { background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02) 55%, rgba(255,255,255,.06));
  -webkit-backdrop-filter: blur(.6px) saturate(1.6) brightness(1.08); backdrop-filter: blur(.6px) saturate(1.6) brightness(1.08);
  box-shadow: inset 0 1.2px .5px rgba(255,255,255,.55), inset 0 -1.2px .5px rgba(255,255,255,.18), inset 0 0 14px rgba(255,255,255,.07), 0 4px 14px rgba(0,0,0,.16), 0 0 0 .5px rgba(255,255,255,.28); }
#tabbar.dragging .tb-ind, #tabbar.pressing .tb-ind { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.01) 55%, rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(0) saturate(1.8) brightness(1.12); backdrop-filter: blur(0) saturate(1.8) brightness(1.12); }
[data-theme="white"] #tabbar .tb-ind { background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.01) 55%, rgba(0,0,0,.035)); box-shadow: inset 0 1.2px .5px rgba(255,255,255,.9), inset 0 -1.2px .5px rgba(0,0,0,.10), 0 4px 14px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.12); }

/* 1.9.6.1: без радужной кромки — у стекла нейтральный светлый край */
#tabbar .tb-ind::before { background: linear-gradient(160deg, rgba(255,255,255,.75), rgba(255,255,255,.12) 38%, rgba(255,255,255,.05) 62%, rgba(255,255,255,.5)); }
#tabbar.moving .tb-ind::before, #tabbar.dragging .tb-ind::before, #tabbar.pressing .tb-ind::before { opacity: .6; }

/* 1.9.6.1: увеличение содержимого под линзой — плавно, по расстоянию до центра стекла */
#tabbar button svg, #tabbar button span { transition: color .2s; transform: none !important; scale: var(--mag, 1); transform-origin: 50% 55%; }
#tabbar button.hover svg, #tabbar button.hover span { transform: none !important; }
#tabbar button span { overflow: visible; }
#tabbar.pressing .tb-ind, #tabbar.moving .tb-ind { scale: 1.16 1.1; }
#tabbar.dragging .tb-ind { scale: 1.3 1.16; }
#tabbar.dragging .tb-ind { scale: 1.3 1.16; transition: none !important; }
/* линза двигается свойством translate (оно не масштабируется вместе с увеличением), поэтому стоит ровно под пальцем */
#tabbar .tb-ind { transform: none !important; transition: translate .5s cubic-bezier(.3,1.45,.5,1), width .5s cubic-bezier(.3,1.45,.5,1), scale .3s cubic-bezier(.3,1.5,.5,1); }
#tabbar.dragging .tb-ind { transition: none !important; }
.pt-bk .bk-foot, .pt-revs .bk-foot { grid-column: 1 / -1; width: 100%; font-size: 11px; line-height: 1.35; color: var(--muted); padding: 8px 4px 0; margin-top: 4px; border-top: 1px dashed var(--line); text-align: left; flex-basis: 100%; }
.lk-tune .item input[type=range] { flex: none; }
.lk-tune .item .val { min-width: 42px; text-align: right; }

/* ===== 1.9.7.1: скрепка — окно с шапкой, содержимым и стеклянной панелью вкладок ===== */
.sheet.att-sheet { display: flex; flex-direction: column; height: min(86vh, 760px); max-height: 86vh; padding: 0; overflow: hidden; border-radius: 28px 28px 0 0; }
.att-sheet .grabber { margin: 8px auto 0; flex: none; }
.att-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 10px; flex: none; }
.att-x { width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--text) 10%, var(--card)); display: grid; place-items: center; border: 0; color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.att-x svg { width: 22px; height: 22px; }
.att-ttl { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.att-chev { width: 16px; height: 16px; opacity: .6; }
.att-sp { width: 46px; }
.att-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 96px; -webkit-overflow-scrolling: touch; }
.att-big { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; margin: 0 0 10px; border-radius: 20px; background: var(--card); border: 0; color: var(--text); font: inherit; }
.att-big > svg:first-child { width: 28px; height: 28px; color: var(--accent); flex: none; }
.att-big b { display: block; font-size: 16px; } .att-big .chev { width: 18px; height: 18px; opacity: .45; flex: none; }
.att-lim { margin: 8px 6px 0; line-height: 1.4; }
.att-body .pick-list { margin-top: 2px; }
.att-tabs { position: absolute; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 30px; background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 8px 26px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.14), 0 0 0 .5px rgba(255,255,255,.14); }
.att-tabs::-webkit-scrollbar { display: none; }
.att-tabs button { position: relative; z-index: 1; flex: none; min-width: 72px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 8px 6px; background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.att-tabs button svg { width: 26px; height: 26px; transition: transform .3s var(--spring, cubic-bezier(.3,1.4,.5,1)); }
.att-tabs button.on { color: var(--accent); } .att-tabs button.on svg { transform: scale(1.12); }
.att-ind { position: absolute; z-index: 0; left: 0; top: 6px; bottom: 6px; border-radius: 24px; width: 72px; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); box-shadow: inset 0 1px .5px rgba(255,255,255,.45), inset 0 -1px .5px rgba(255,255,255,.12), 0 0 0 .5px rgba(255,255,255,.2); transition: translate .45s cubic-bezier(.3,1.4,.5,1), width .45s cubic-bezier(.3,1.4,.5,1); pointer-events: none; }

/* ===== 1.9.7.2: тема «Разработка» — стройка на «крыше» панели: кран, экскаватор, рабочие в жилетках, самосвал ===== */
.nt-strip.bld .bd-tr { animation: bdTr 11s ease-in-out infinite alternate; }
.nt-strip.bld .bd-load { transform-origin: 0 .8px; animation: bdSwing 3.4s ease-in-out infinite alternate; }
.nt-strip.bld .bd-boom { transform-origin: 0 0; animation: bdBoom 4.6s ease-in-out infinite; }
.nt-strip.bld .bd-stick { transform-origin: 0 0; animation: bdStick 4.6s ease-in-out infinite; }
.nt-strip.bld .bd-bucket { transform-origin: 0 0; animation: bdBucket 4.6s ease-in-out infinite; }
.nt-strip.bld .bd-hit { transform-box: fill-box; transform-origin: 50% 100%; animation: bdHit .7s ease-in-out infinite alternate; }
.nt-strip.bld .bd-walk { animation: bdWalk 14s linear infinite; }
.nt-strip.bld .bd-beacon { animation: bdBeacon 1s steps(2) infinite; }
.nt-strip.bld .ns-ski { animation-duration: 38s; }
@keyframes bdTr { from { transform: translateX(-30px); } to { transform: translateX(14px); } }
@keyframes bdSwing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes bdBoom { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(10deg); } }
@keyframes bdStick { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(18deg); } }
@keyframes bdBucket { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(30deg); } }
@keyframes bdHit { from { transform: translateY(0) rotate(0); } to { transform: translateY(-.5px) rotate(-2deg); } }
@keyframes bdWalk { 0% { transform: translateX(210px); } 45% { transform: translateX(248px); } 50% { transform: translateX(248px) scaleX(-1); } 95% { transform: translateX(210px) scaleX(-1); } 100% { transform: translateX(210px); } }
@keyframes bdBeacon { 0% { opacity: 1; } 50% { opacity: .15; } }
/* «Разработка»: лента на панели остаётся скруглённой, а стройка стоит над ней (панель больше не обрезает всё лишнее) */
:root[data-theme="build"] #tabbar { overflow: visible; }
:root[data-theme="build"] #tabbar::before { border-radius: 26px 26px 0 0; clip-path: inset(0 round 26px 26px 0 0); }

/* ===== 1.9.8.2: тема «День рождения» — праздник на «крыше» панели: торт со свечами, шарики, флажки, гости в колпаках, колонка, хлопушка, пиньята ===== */
.nt-strip.bday .bd-bunt { animation: bdSway 4s ease-in-out infinite alternate; transform-origin: 50% 0; }
.nt-strip.bday .bdb { animation: bdBob 2.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; } .nt-strip.bday .bdb.d2 { animation-delay: -.9s; } .nt-strip.bday .bdb.d3 { animation-delay: -1.7s; }
.nt-strip.bday .bd-fl { animation: bdFlame .35s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; } .nt-strip.bday .bd-fl.d2 { animation-delay: -.12s; } .nt-strip.bday .bd-fl.d3 { animation-delay: -.22s; }
.nt-strip.bday .pa-jump { animation: bdJump .7s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; } .nt-strip.bday .pa-jump.d2 { animation-delay: -.25s; } .nt-strip.bday .pa-jump.d3 { animation-delay: -.5s; }
.nt-strip.bday .pa-l { transform-box: fill-box; transform-origin: 50% 10%; animation: bdArmL .35s ease-in-out infinite alternate; }
.nt-strip.bday .pa-r { transform-box: fill-box; transform-origin: 50% 10%; animation: bdArmR .35s ease-in-out infinite alternate; }
.nt-strip.bday .bd-spk { transform-box: fill-box; transform-origin: 50% 100%; animation: bdSpk .5s ease-in-out infinite alternate; }
.nt-strip.bday .bd-nt { animation: bdNote 2.4s ease-in infinite; opacity: 0; } .nt-strip.bday .bd-nt.n2 { animation-delay: .8s; } .nt-strip.bday .bd-nt.n3 { animation-delay: 1.6s; }
.nt-strip.bday .bd-cf { animation: bdConf 3.6s ease-out infinite; opacity: 0; }
.nt-strip.bday .bd-pin { transform-origin: 0 0; animation: bdPin 2.4s ease-in-out infinite alternate; }
.nt-strip.bday .ns-ski { animation-duration: 46s; }
@keyframes bdSway { from { transform: rotate(-.4deg); } to { transform: rotate(.4deg); } }
@keyframes bdBob { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-1.4px) rotate(3deg); } }
@keyframes bdFlame { from { transform: scale(1, 1) skewX(-6deg); } to { transform: scale(.8, 1.25) skewX(6deg); } }
@keyframes bdJump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-2.2px); } 70% { transform: translateY(0); } }
@keyframes bdArmL { from { transform: rotate(-150deg); } to { transform: rotate(-20deg); } }
@keyframes bdArmR { from { transform: rotate(20deg); } to { transform: rotate(150deg); } }
@keyframes bdSpk { from { transform: scale(1, 1); } to { transform: scale(1.08, .96); } }
@keyframes bdNote { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -9px); } }
@keyframes bdConf { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 6% { opacity: 1; } 50% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(200deg); } 100% { opacity: 0; transform: translate(calc(var(--dx) * 1.3), 4px) rotate(420deg); } }
@keyframes bdPin { from { transform: rotate(-13deg); } to { transform: rotate(13deg); } }
/* «Разработка»: лента на панели повторяет скруглённую форму панели и не торчит за углы (раньше обрезалась только пока панель всё прятала) */
:root[data-theme="build"] #tabbar::before { inset: 0; height: auto; bottom: 0; border-radius: inherit; clip-path: none; -webkit-mask: linear-gradient(#000 0, #000 5px, transparent 5px); mask: linear-gradient(#000 0, #000 5px, transparent 5px); pointer-events: none; }

.bd-pick { display: flex; gap: 8px; } .bd-pick select, .bd-pick .bd-y { flex: 1; min-width: 0; } .bd-pick .bd-y { max-width: 96px; }

/* тема «День рождения»: сцена стоит прямо на панели (ниже, чтобы не «парила в облаках») */
.nt-strip.bday { bottom: calc(100% - 1px) !important; }

/*MT-THEMES*/
/* экран «Технические работы» под каждую тему (обычная и новогодняя сцены свои — их не трогаем) */
.mtw.t-black { background: radial-gradient(120% 70% at 50% 0%, #2a1f10, #000) !important; color: #f2f2f2; } .mtw.t-black p { color: #9a958e; }
.mtw.t-pickme { background: radial-gradient(120% 70% at 50% 0%, #ffd0e4, #fff0f6) !important; color: #4a1630; } .mtw.t-pickme p { color: #b0668a; } .mtw.t-pickme h2::after, .mtw.t-pickme h1::after { content: " 🎀"; }
.mtw.t-pickme-dark { background: radial-gradient(120% 70% at 50% 0%, #4a1a35, #1a0b13) !important; color: #ffe6f1; } .mtw.t-pickme-dark p { color: #c98aa8; } .mtw.t-pickme-dark h2::after, .mtw.t-pickme-dark h1::after { content: " 🎀"; }
.mtw.t-build { background: repeating-linear-gradient(-45deg, #ffc21a 0 14px, #1f1f1f 14px 28px) top / 100% 10px no-repeat, radial-gradient(120% 70% at 50% 0%, #f1ece0, #e7e3da) !important; color: #24221d; } .mtw.t-build p { color: #7a7466; } .mtw.t-build h2::after, .mtw.t-build h1::after { content: " 🚧"; }
.mtw.t-birthday { background: radial-gradient(120% 70% at 50% 0%, #1f4a66, #0f1e2e) !important; color: #f3f8ff; } .mtw.t-birthday p { color: #9fb8d4; } .mtw.t-birthday h2::after, .mtw.t-birthday h1::after { content: " 🎉"; }
/* каска и жилет: в «Пикми» — розовые, в «Дне рождения» — праздничный колпак, в «Разработке» — оранжевая каска */
.mtw.t-pickme #mts-gHat stop:nth-child(1), .mtw.t-pickme-dark #mts-gHat stop:nth-child(1) { stop-color: #ffb3d4; } .mtw.t-pickme #mts-gHat stop:nth-child(2), .mtw.t-pickme-dark #mts-gHat stop:nth-child(2) { stop-color: #ff5fa8; } .mtw.t-pickme #mts-gHat stop:nth-child(3), .mtw.t-pickme-dark #mts-gHat stop:nth-child(3) { stop-color: #d11f78; }
.mtw.t-pickme #mts-gBrim stop:nth-child(1), .mtw.t-pickme-dark #mts-gBrim stop:nth-child(1) { stop-color: #ffd0e4; } .mtw.t-pickme #mts-gBrim stop:nth-child(2), .mtw.t-pickme-dark #mts-gBrim stop:nth-child(2) { stop-color: #ff7fb8; }
.mtw.t-pickme #mts-gVest stop:nth-child(1), .mtw.t-pickme-dark #mts-gVest stop:nth-child(1) { stop-color: #ff9ccb; } .mtw.t-pickme #mts-gVest stop:nth-child(2), .mtw.t-pickme-dark #mts-gVest stop:nth-child(2) { stop-color: #f0408e; }
.mtw.t-birthday #mts-gHat stop:nth-child(1) { stop-color: #8ff0e4; } .mtw.t-birthday #mts-gHat stop:nth-child(2) { stop-color: #14a394; } .mtw.t-birthday #mts-gHat stop:nth-child(3) { stop-color: #0b6f64; }
.mtw.t-birthday #mts-gBrim stop:nth-child(1) { stop-color: #ffe27a; } .mtw.t-birthday #mts-gBrim stop:nth-child(2) { stop-color: #ffb300; }
.mtw.t-birthday #mts-gVest stop:nth-child(1) { stop-color: #ff8fb3; } .mtw.t-birthday #mts-gVest stop:nth-child(2) { stop-color: #e83e8c; }
.mtw.t-build #mts-gHat stop:nth-child(1) { stop-color: #ffb066; } .mtw.t-build #mts-gHat stop:nth-child(2) { stop-color: #e8620c; } .mtw.t-build #mts-gHat stop:nth-child(3) { stop-color: #a84300; }
.mtw.t-pickme .mt-cd, .mtw.t-pickme-dark .mt-cd, .mtw.t-pickme .cd, .mtw.t-pickme-dark .cd { color: #ff4f9a; }
.mtw.t-build .mt-cd, .mtw.t-build .cd { color: #e8620c; } .mtw.t-birthday .mt-cd, .mtw.t-birthday .cd { color: #ffd23f; }
/* декор темы лежит позади сцены: лента и рабочие закрывают его */
.mtw .mt-scene, .mtw .scene { position: relative; } .mtw .mt-decor { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; } .mtw .mt-scene > svg:not(.mt-decor), .mtw .scene > svg:not(.mt-decor) { position: relative; }
/*/MT-THEMES*/

/* трактор в окне техработ «Нового года»: живой — мигалка крутится, корпус подрагивает, выхлоп */
.tr-fx { position: fixed; z-index: 202; pointer-events: none; left: 0; top: 0; will-change: transform; }
.tr-svg { display: block; overflow: visible; width: 100%; height: 100%; }
.tr-body { animation: trShake .16s linear infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.tr-fx.work .tr-body { animation-duration: .1s; }
@keyframes trShake { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(.25px, -.7px) rotate(.12deg); } 100% { transform: translate(-.2px, .1px) rotate(-.1deg); } }
.tr-hl { transform-box: fill-box; transform-origin: center; animation: trHl .7s ease-in-out infinite alternate; }
@keyframes trHl { 0% { transform: translateX(-3.8px) scaleX(.35); } 50% { transform: translateX(0) scaleX(1); } 100% { transform: translateX(3.8px) scaleX(.35); } }
.tr-glow { animation: trGlow .7s ease-in-out infinite alternate; opacity: .3; transform-box: fill-box; transform-origin: center; }
@keyframes trGlow { 0% { opacity: .15; transform: scale(.8); } 100% { opacity: .5; transform: scale(1.25); } }
.tr-ray { opacity: 0; } .tr-rr { animation: trRay .7s ease-in-out infinite alternate; } .tr-rl { animation: trRay .7s ease-in-out infinite alternate-reverse; }
@keyframes trRay { 0%, 40% { opacity: 0; } 100% { opacity: .38; } }
.fi-fold { width: 100%; background: none; border: 0; } .fi-fold .chev { width: 18px; height: 18px; flex: none; transition: transform .3s cubic-bezier(.3,1.4,.5,1); } .fi-fold.closed .chev { transform: rotate(-90deg); }

.lk-ph { position: relative; } .lk-gear { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); } .lk-gear svg { width: 17px; height: 17px; }
.lk-new .lk-ph { display: grid; place-items: center; background: var(--card2); border: 2px dashed var(--line); min-height: 160px; } .lk-plus { font-size: 38px; color: var(--accent); }
.tw-dots { display: flex; gap: 6px; justify-content: center; margin: 12px 0; } .tw-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .tw-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.tw-prev { max-height: 38vh; display: grid; place-items: center; margin-bottom: 8px; } .tw-prev canvas { max-height: 38vh; width: auto; border-radius: 14px; }
/* смена раздела на iPhone: уезжающий и въезжающий экраны отдельными слоями — без дрожания содержимого */
#view > .screen.from-right, #view > .screen.from-left, #view > .screen.leaving { will-change: transform, opacity; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tw-prev, .tw-prev canvas { max-height: 27vh; }
/* клавиатура и поле ввода: одна кривая и одно время, чтобы ничего не обгоняло друг друга */
.composer { transition: padding-bottom .26s cubic-bezier(.2,.8,.25,1); }
.chat-page.kb-open, .chat-page { transition: height .26s cubic-bezier(.2,.8,.25,1), transform .26s cubic-bezier(.2,.8,.25,1); }
.composer textarea { transition: height .16s ease-out; }

/* плитка фото и видео в меню скрепки (как в Telegram) */
.att-loading { text-align: center; color: var(--muted); padding: 30px 0; }
.att-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0 -2px; padding-bottom: 76px; }
.att-tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--card2); border-radius: 0; padding: 0; }
.att-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s, opacity .2s; }
.att-tile.on img { transform: scale(.88); opacity: .75; border-radius: 10px; }
.att-tile.att-cam { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--accent); font-size: 12px; }
.att-tile.att-cam svg { width: 30px; height: 30px; }
.att-sel { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); color: #fff; font-style: normal; font-size: 13px; font-weight: 700; display: grid; place-items: center; transition: background .15s, transform .15s; }
.att-tile.on .att-sel { background: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.att-dur { position: absolute; left: 6px; bottom: 5px; font-size: 11px; color: #fff; background: rgba(0,0,0,.5); padding: 1px 6px; border-radius: 9px; display: inline-flex; align-items: center; gap: 3px; } .att-dur svg { width: 11px; height: 11px; }
.att-bar { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 10px 4px calc(10px + var(--safe-b)); background: linear-gradient(to top, var(--bg2) 70%, transparent); margin-top: -66px; }
.att-bar button { flex: 1; padding: 13px; border-radius: 16px; font-weight: 600; background: var(--card2); }
.att-bar .att-go { background: var(--accent); color: var(--accent-text, #fff); flex: 2; } .att-bar .att-go:disabled { opacity: .45; }
.chip-s.dim, .mbar.dim { opacity: .3; filter: grayscale(.7); }
.cj-fold .chev { width: 18px; height: 18px; transition: transform .3s cubic-bezier(.3,1.4,.5,1); } .cj-fold.closed .chev { transform: rotate(-90deg); }

/* свернувшаяся игра: окно спрятано, но живое; внизу плашка «Вернуться в игру» */
.page.minimized { display: none !important; }
.gm-resume { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-text, #fff); font-weight: 700; box-shadow: 0 8px 26px rgba(0,0,0,.28); animation: gmIn .35s cubic-bezier(.3,1.3,.5,1); max-width: calc(100vw - 32px); white-space: nowrap; }
.gm-resume i { width: 9px; height: 9px; border-radius: 50%; background: #7dff9a; box-shadow: 0 0 0 0 rgba(125,255,154,.7); animation: gmPulse 1.6s infinite; }
@keyframes gmIn { from { transform: translateX(-50%) translateY(30px) scale(.9); opacity: 0; } }
@keyframes gmPulse { 70% { box-shadow: 0 0 0 9px rgba(125,255,154,0); } 100% { box-shadow: 0 0 0 0 rgba(125,255,154,0); } }
.gm-exit { color: var(--danger); }
/* бункер: сноска под карточкой ровным текстом (раньше — серая плашка с обрезанными краями) и отступы в блоке «Катастрофа и бункер» */
.pt-bk > div.bk-foot, .pt-bk.mine > div.bk-foot { display: block; background: none; border-radius: 0; padding: 10px 2px 2px; margin-top: 8px; border-top: 1px dashed var(--line); font-size: 11.5px; line-height: 1.4; color: var(--muted); text-align: left; font-weight: 400; }
.pt-revs .bk-foot { display: block; flex-basis: 100%; background: none; border-radius: 0; padding: 8px 2px 0; margin-top: 6px; border-top: 1px dashed var(--line); font-size: 11.5px; line-height: 1.4; color: var(--muted); text-align: left; }
.pt-help summary { padding: 2px 0 4px; } .pt-help[open] summary { margin-bottom: 12px; }
.pt-help .pt-world { display: flex; flex-direction: column; gap: 12px; }
.pt-help .pt-sec { margin: 0; }

/* экран блокировки: картинки блоков и шаблонов вместо одних названий */
.lk-grid.g3 { grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.lk-grid.g3 .lk-name { font-size: 12px; padding: 0 2px; gap: 4px; }
.lk-grid.g3 .lk-ph { border-radius: 18px; padding: 3px; }
.lk-ph canvas { display: block; width: 100%; height: auto; border-radius: 14px; }
.el-th { flex: none; width: 92px; max-height: 70px; overflow: hidden; border-radius: 10px; background: #111; display: block; line-height: 0; }
.el-th canvas { width: 100%; height: auto; display: block; }
.item.dim { opacity: .45; }

/* переписка на iPhone: отступ снизу растёт вместе с клавиатурой (см. initKeyboard) */
.chat-page { transition: height .26s cubic-bezier(.2,.8,.25,1), transform .26s cubic-bezier(.2,.8,.25,1), padding-bottom .26s cubic-bezier(.2,.8,.25,1); }
body.kb-none .chat-page { padding-bottom: var(--kb, 0px); }

/* экран блокировки: меньше кнопок */
.lk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger, #ff453a); margin-left: 6px; vertical-align: middle; }
.btn.set.upd { border-color: var(--accent, #6a5cff); color: var(--accent, #6a5cff); }

.item.lk-sub { padding-left: 30px; font-size: 14px; }

/* обои: два ряда и «шапочки» следующих, плитка «Собрать свой» */
.lk-clip { position: relative; }
.lk-clip.cut { overflow: hidden; -webkit-mask-image: linear-gradient(#000 calc(100% - 46px), transparent); mask-image: linear-gradient(#000 calc(100% - 46px), transparent); }
.lk-grid { position: relative; }
.lk-ph canvas { aspect-ratio: 1179 / 2556; }
.lk-mk { display: block; padding: 5px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent, #6a5cff) 22%, transparent), color-mix(in srgb, var(--accent, #6a5cff) 6%, transparent)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent, #6a5cff) 55%, transparent); }
.mk-scr { position: relative; display: block; width: 100%; aspect-ratio: 1179 / 2556; border-radius: 22px; border: 2px dashed color-mix(in srgb, var(--accent, #6a5cff) 60%, transparent); overflow: hidden; background: color-mix(in srgb, var(--text) 4%, transparent); }
.mk-b { position: absolute; left: 12%; right: 12%; height: 11%; border-radius: 9px; background: color-mix(in srgb, var(--accent, #6a5cff) 70%, #fff 10%); opacity: 0; }
.mk-b.b1 { bottom: 40%; animation: mkDrop 3.6s cubic-bezier(.2,.9,.3,1.2) infinite; }
.mk-b.b2 { bottom: 26%; left: 12%; right: 38%; animation: mkDrop 3.6s .35s cubic-bezier(.2,.9,.3,1.2) infinite; }
.mk-b.b3 { bottom: 12%; animation: mkDrop 3.6s .7s cubic-bezier(.2,.9,.3,1.2) infinite; background: color-mix(in srgb, #ffb347 80%, var(--accent, #6a5cff)); }
@keyframes mkDrop { 0% { opacity: 0; transform: translateY(-120%) scale(.9); } 14% { opacity: 1; transform: translateY(0) scale(1); } 80% { opacity: 1; transform: translateY(0); } 92%, 100% { opacity: 0; transform: translateY(0); } }
.mk-plus { position: absolute; left: 50%; top: 30%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; border-radius: 50%; font-size: 26px; font-weight: 300; line-height: 1; color: #fff; background: var(--accent, #6a5cff); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent, #6a5cff) 55%, transparent); animation: mkPulse 2.2s ease-in-out infinite; }
@keyframes mkPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* углы рамки и картинки совпадают: радиус картинки = радиус рамки − её отступ */
.lk-ph canvas { border-radius: 21px; }
.lk-grid.g3 .lk-ph canvas { border-radius: 15px; }
.mk-scr { border-radius: 21px; }
.lk-grid.g3 .mk-scr { border-radius: 15px; }

/* игры на одном телефоне: крестик «выйти» виден только после старта (до него — обычная стрелка «назад») */
.page.lg:not(.gm-on) .gm-exit { display: none; }

/* Android: выбор «куда ставить» — три плитки с картинками, ничего не обрезается */
.wh-box { padding: 14px 14px 12px; }
.wh-t { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 12px; }
.wh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wh { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 12px 6px 10px; border-radius: 16px; background: var(--card2); color: var(--muted); font-size: 12px; line-height: 1.2; text-align: center; box-shadow: inset 0 0 0 2px transparent; transition: background .25s var(--ease, ease), color .25s, box-shadow .25s, transform .2s; }
.wh span { min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.wh.on { color: var(--text); background: color-mix(in srgb, var(--accent, #6a5cff) 12%, var(--card2)); box-shadow: inset 0 0 0 2px var(--accent, #6a5cff); }
.wh:active { transform: scale(.97); }

/* во всём приложении (iPhone): окно двигается вместе с клавиатурой — снизу отступ на высоту клавиатуры, с той же кривой */
#app, .page { transition: bottom .26s cubic-bezier(.2,.8,.25,1); }
.overlay { transition: padding-bottom .26s cubic-bezier(.2,.8,.25,1); }
body.kb-none #app, body.kb-none .page { bottom: var(--kb, 0px); }
body.kb-none .overlay { padding-bottom: var(--kb, 0px); }
body.kb-none .sheet { max-height: calc(92vh - var(--kb, 0px)); }

.rep-media { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; } .rep-media img, .rep-media video { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; background: var(--card2); }

/* плашка приглашения: без размытия и ровные углы (на iPhone размытие давало косую рамку) */
.g-invite { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: 0 0 0 1px var(--line), 0 12px 34px rgba(0,0,0,.28); overflow: hidden; }

/* чат в играх: круглая кнопка в правом нижнем углу, панель выезжает над ней */
.pc-chat { position: fixed; left: auto; right: 12px; bottom: calc(var(--safe-b) + 14px); width: min(360px, calc(100vw - 24px)); z-index: 45; padding: 0; align-items: flex-end; transition: bottom .26s cubic-bezier(.2,.8,.25,1); }
.pc-chat.hidden { display: none; }
body.kb-none .pc-chat { bottom: calc(var(--kb, 0px) + 12px); }
.pc-tog { width: 54px; height: 54px; padding: 0; border-radius: 50%; justify-content: center; font-size: 24px; box-shadow: 0 8px 22px rgba(0,0,0,.32); transform: translateZ(0); }
.pc-tog span { display: none; }
.pc-panel { width: 100%; max-width: none; align-self: flex-end; margin-bottom: 10px; }

/* сыгранные карты действия в «Бункере» */
.pt-plays { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pt-play { padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, #f2b01e 14%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #f2b01e 40%, transparent); font-size: 14px; line-height: 1.3; }
.pt-play b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

.spam-b { display: inline-block; padding: 1px 8px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .3px; }

/* «Пикми»: сердечки плавно летят вверх и покачиваются */
.pm-hearts { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.pm-hearts i { position: absolute; left: var(--x); bottom: -40px; font-style: normal; font-size: var(--s); line-height: 1; opacity: 0; text-shadow: 0 0 10px color-mix(in srgb, currentColor 45%, transparent); animation: pmUp var(--d) linear var(--l) infinite, pmSway calc(var(--d) / 2.4) ease-in-out var(--l) infinite alternate; }
@keyframes pmUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 10% { opacity: .75; } 75% { opacity: .6; } 100% { transform: translateY(-112vh) scale(1.15); opacity: 0; } }
@keyframes pmSway { from { margin-left: calc(var(--w) * -1); } to { margin-left: var(--w); } }

/* морской бой: после партии видно, какие корабли соперника уцелели */
.sea-c.left { background: color-mix(in srgb, #5a6b86 55%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, #ffd23f 70%, transparent); }

/* предложение сменить аватарку: аккуратная карточка с круглым фото */
.av-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 16px 12px; min-width: 220px; max-width: 280px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent, #6a5cff) 16%, var(--card)), var(--card)) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #6a5cff) 28%, transparent); color: var(--text) !important; }
.av-ring { position: relative; width: 104px; height: 104px; border-radius: 50%; padding: 4px; background: conic-gradient(from 210deg, var(--accent, #6a5cff), #ff7ab8, #ffb347, var(--accent, #6a5cff)); margin-bottom: 8px; }
.av-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--card); box-sizing: border-box; }
.av-spark { position: absolute; font-style: normal; color: #ffd27a; font-size: 14px; animation: avTw 2.2s ease-in-out infinite; } .av-spark.s1 { right: -4px; top: 6px; } .av-spark.s2 { left: -2px; bottom: 10px; font-size: 11px; animation-delay: 1.1s; }
@keyframes avTw { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(25deg); } }
.av-t { font-weight: 700; font-size: 15px; line-height: 1.25; } .av-s { font-size: 12px; opacity: .65; }
.av-acts { display: flex; gap: 8px; width: 100%; margin-top: 10px; }
.av-acts button { flex: 1; height: 38px; border-radius: 19px; font-weight: 700; font-size: 14px; }
.av-yes { background: var(--accent, #6a5cff); color: #fff; } .av-no { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
.av-card .tm { align-self: flex-end; margin-top: 4px; }

/* карта геопозиции (бета) */
.gm-map { height: 58vh; min-height: 300px; border-radius: 18px; overflow: hidden; background: var(--card2); }
.gm-bar { padding: 12px 2px 0; } .gm-dist { font-size: 17px; } .gm-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gm-links a { text-decoration: none; }
.gm-wrap { background: none; border: 0; }
.gm-pin { position: relative; width: 44px; height: 54px; display: grid; place-items: start center; }
.gm-pin b { width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.9); }
.gm-pin i { position: absolute; bottom: 4px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: var(--c); transform: rotate(45deg); border-radius: 2px; z-index: -1; }
.gm-pin.live b { animation: gmPulse 1.6s ease-out infinite; }
@keyframes gmPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 0 3px rgba(255,255,255,.9); } 100% { box-shadow: 0 0 0 16px transparent, inset 0 0 0 3px rgba(255,255,255,.9); } }
/* трансляция геопозиции — тонкая полоса сверху, как мини-плеер голосовых: поверх любого раздела, с «ещё N мин» и «Стоп» */
.gm-live-bn { position: fixed; left: 0; right: 0; top: 0; z-index: 96; padding: calc(var(--safe-t) + 6px) 14px 7px; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, #30d158 16%, var(--card)); border-bottom: 1px solid color-mix(in srgb, #30d158 35%, var(--line)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 13px; }
.gm-live-bn b { font-weight: 600; } .gm-live-x { flex: none; border: 0; border-radius: 14px; padding: 5px 14px; background: #ff453a; color: #fff; font-weight: 600; font-size: 13px; }
body.gm-live-on #view, body.gm-live-on .screen { scroll-padding-top: 44px; }
.gm-live-bn .small { color: var(--muted); } .gm-live-dot { width: 12px; height: 12px; border-radius: 50%; background: #30d158; animation: gmPulse 1.6s ease-out infinite; --c: #30d158; flex: none; }

/* пока идут техработы: окна и подтверждения (например, «хочет с вами общаться» в Bluetooth) — поверх экрана техработ, гирлянда видна */
body.maint-on .page, body.maint-on .chat-page { z-index: 260; }
body.maint-on .overlay { z-index: 270; }
body.maint-on .ny-garland { z-index: 205; }

/* геопозиция (бета): экран с картой и действиями, карточка в переписке */
.page.gm-page { padding: 0 !important; display: flex; flex-direction: column; }
.page.gm-page .pbody { padding: 0; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gm-page .gm-map { border-radius: 0; flex: 1; min-height: 240px; height: auto; }
.gm-map.full { height: auto; flex: 1; }
.gm-dock { padding: 12px 14px calc(14px + var(--safe-b)); background: var(--bg); box-shadow: 0 -10px 30px rgba(0,0,0,.18); border-radius: 22px 22px 0 0; margin-top: -18px; position: relative; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.gm-dock.slim { gap: 6px; }
.gm-info:empty { display: none; } .gm-dist { font-size: 17px; } .gm-dist:empty { display: none; }
.gm-b { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--card); font-size: 15px; } .gm-b b { display: block; font-size: 15px; } .gm-b .small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.gm-b.main { background: var(--accent, #6a5cff); color: #fff; } .gm-b.main .small { color: rgba(255,255,255,.8); }
.gm-b:disabled { opacity: .5; }
.gm-dur { display: flex; gap: 6px; } .gm-dur button { flex: 1; height: 40px; border-radius: 14px; background: color-mix(in srgb, var(--accent, #6a5cff) 16%, var(--card)); font-weight: 600; }
.gm-dur.hidden { display: none; }
.loc2 { cursor: pointer; min-width: 220px; }
.loc2 .loc-map { position: relative; height: 92px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #6a5cff) 20%, transparent), color-mix(in srgb, #30d158 18%, transparent)); display: grid; place-items: center; overflow: hidden; margin-bottom: 6px; }
.loc2 .loc-pin { font-size: 34px; } .loc2 .loc-pin.live { animation: gmBob 1.4s ease-in-out infinite; }
@keyframes gmBob { 50% { transform: translateY(-5px); } }
.loc2 .loc-tap { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 11px; opacity: .7; }

/* плитка галереи: живая камера первой плиткой, «Все фото» — последней, без чёрной полосы; «Отправить» всплывает при выборе */
.att-tiles { padding-bottom: 12px; }
.att-tile.att-cam { background: #111; color: #fff; }
.att-tile.att-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.att-tile.att-cam.live video { opacity: 1; }
.att-tile.att-cam .att-camic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.38); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.att-tile.att-cam .att-camic svg { width: 22px; height: 22px; }
.att-tile.att-all { display: grid; place-items: center; background: var(--card2); color: var(--accent); }
.att-allic { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; } .att-allic svg { width: 28px; height: 28px; }
.att-go { position: sticky; bottom: 10px; display: block; width: calc(100% - 24px); margin: 10px auto 0; height: 48px; border-radius: 24px; background: var(--accent); color: var(--accent-text, #fff); font-weight: 700; font-size: 16px; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent); opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.2,.9,.3,1.2); }
.att-go.show { opacity: 1; transform: none; pointer-events: auto; }
/* «Отправить N» в листе скрепки: парит над панелью вкладок, а не наезжает на неё; по ширине как плитки */
.att-body .att-go { bottom: max(0px, calc(var(--safe-b) - 12px)); width: 100%; margin: 10px 0 0; } /* sticky учитывает нижний отступ списка (96px): кнопка садится сразу над панелью вкладок */
.att-tile { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* расходы: лимиты, цели, регулярные платежи */
.mp-card { padding: 4px 14px; } .mp-row { padding: 10px 0; } .mp-row + .mp-row { border-top: 1px solid var(--line); }
.mp-bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--text) 10%, transparent); margin-top: 7px; overflow: hidden; } .mp-bar i { display: block; height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.25,1); }
.mp-note { display: flex; flex-direction: column; gap: 4px; margin: 4px 2px 12px; font-size: 13px; color: var(--muted); }
.mp-quick { margin: 0 0 12px; } .mp-gn { background: none; font-size: 15px; }
.link-btn { background: none; color: var(--accent); font-size: 13px; font-weight: 600; }

/* здоровье и привычки: настроение, сон, карта, итоги */
.hp-card { background: var(--card); border-radius: 18px; padding: 14px; margin-bottom: 4px; }
.hp-moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; } .hp-m { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: var(--card2); transition: transform .2s, background .2s, box-shadow .2s; } .hp-m span { font-size: 26px; } .hp-m i { font-style: normal; font-size: 10px; color: var(--muted); }
.hp-m.on { background: color-mix(in srgb, var(--accent) 16%, var(--card2)); box-shadow: inset 0 0 0 2px var(--accent); transform: scale(1.04); }
.hp-wk { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 6px; font-size: 18px; opacity: .85; }
.hp-st { width: 42px; height: 42px; border-radius: 50%; background: var(--card2); font-size: 22px; font-weight: 600; }
.hp-bars { display: flex; gap: 6px; align-items: flex-end; height: 86px; margin: 12px 0 8px; } .hp-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; } .hp-bars i { width: 100%; border-radius: 6px; background: color-mix(in srgb, var(--text) 10%, transparent); min-height: 4px; } .hp-bars i.ok { background: var(--ok); } .hp-bars i.lo { background: #f2994a; } .hp-bars span { font-size: 10px; color: var(--muted); }
.hp-heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; } .hp-heat i { aspect-ratio: 1; border-radius: 6px; background: color-mix(in srgb, var(--ok) calc(var(--a) * 100%), color-mix(in srgb, var(--text) 8%, transparent)); } .hp-heat i.now { box-shadow: 0 0 0 2px var(--accent); }
.hp-badges { display: flex; gap: 10px; margin-top: 10px; } .hp-badges span { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 14px; background: var(--card2); filter: grayscale(1); opacity: .45; font-size: 22px; } .hp-badges span i { font-style: normal; font-size: 11px; color: var(--muted); } .hp-badges span.on { filter: none; opacity: 1; background: color-mix(in srgb, #f2b01e 18%, var(--card2)); }
.hp-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .hp-sum div { display: flex; flex-direction: column; } .hp-sum b { font-size: 22px; } .hp-sum span { font-size: 12px; color: var(--muted); }

/* авто: обмен данными */
.xc-ic { font-size: 26px; } .x-warn { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #f2994a 16%, var(--card)); font-size: 14px; }
.x-list { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; } .x-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--line); } .x-row span:first-child { color: var(--muted); }

/* миниатюра карты в сообщении */
.gt-map { position: relative; height: 130px; border-radius: 12px; overflow: hidden; background: #dfe6ea; margin-bottom: 8px; }
.gt-map img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.gt-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -88%); font-size: 30px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.loc2 { min-width: 260px; max-width: 300px; }

.gt-map { height: 190px; }
.loc2 { min-width: 280px; max-width: 320px; }
.loc2 .cm-acts { flex-wrap: wrap; }
.gm-inline .gm-map { height: 30vh; min-height: 190px; border-radius: 16px; }
.gm-inline .gm-dock { margin-top: 10px; padding: 0; box-shadow: none; border-radius: 0; background: transparent; }

/* пустое обязательное поле */
.need { animation: shake .4s; border-color: var(--danger) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 25%, transparent) !important; }

/* «Экран и виджеты»: общий заголовок и переключатель, у вложенного раздела свой заголовок прячем (кнопки остаются справа вверху) */
.scr-wrap { position: relative; }
.scr-sw { margin: 0 0 14px; }
.scr-body > .topbar { position: absolute; top: 0; right: 0; left: auto; margin: 0; padding: 0; min-height: 0; background: none; pointer-events: none; }
.scr-body > .topbar > * { pointer-events: auto; }
.scr-body > .topbar h1 { display: none; }
/* «Шаблоны» внутри календаря: заголовок уже есть у страницы */
.tpl-in > .topbar { display: none; }

/* первый запуск: для чего приложение */
.purp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.purp { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px; border-radius: 16px; background: var(--card); border: 2px solid transparent; transition: border-color .2s, background .2s; }
.purp.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.purp-e { font-size: 26px; line-height: 1; }

/* настоящие картинки виджетов с сервера на экране «Виджеты» */
.wg-img { display: block; height: auto; border-radius: 22px; box-shadow: 0 10px 28px rgba(40,30,90,.28); margin: 0 auto; }
.wg-gallery.wg-wrap figure { flex: 1; min-width: 0; }

/* закрывашки разделов на техработах: у каждого раздела свои цвета, значок и анимация */
.mc { min-height: 100%; display: grid; place-items: center; padding: 24px 8px 120px; }
.mc-card { width: 100%; max-width: 380px; text-align: center; padding: 26px 20px 22px; border-radius: 28px; background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 16%, var(--card)), color-mix(in srgb, var(--c2) 30%, var(--card))); box-shadow: 0 14px 40px color-mix(in srgb, var(--c1) 28%, transparent); }
.mc-stage { position: relative; height: 150px; display: grid; place-items: center; margin-bottom: 8px; }
.mc-bg { position: absolute; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c2) 70%, transparent), transparent 70%); animation: mcGlow 3s ease-in-out infinite; }
.mc-e { position: relative; font-size: 84px; line-height: 1; display: inline-block; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.mc-d { position: absolute; font-size: 26px; opacity: .9; }
.mc-d1 { left: 14%; top: 12%; animation: mcFloat 3.2s ease-in-out infinite; } .mc-d2 { right: 14%; top: 22%; animation: mcFloat 3.8s ease-in-out .4s infinite; } .mc-d3 { right: 26%; bottom: 6%; animation: mcFloat 3.5s ease-in-out .9s infinite; }
.mc-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--c1) 18%, transparent); color: var(--c1); }
.mc-t { margin: 12px 0 6px; font-size: 24px; line-height: 1.2; }
.mc-s { margin: 0 4px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.mc-bar { height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--c1) 14%, transparent); overflow: hidden; margin: 18px 22px 10px; }
.mc-bar i { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); animation: mcBar 1.8s ease-in-out infinite; }
.mc-n { font-size: 12px; color: var(--muted); opacity: .8; }
.mc-flip { animation: mcFlip 2.4s ease-in-out infinite; } .mc-bounce { animation: mcBounce 1.4s ease-in-out infinite; } .mc-wiggle { animation: mcWiggle 1.8s ease-in-out infinite; transform-origin: 50% 80%; }
.mc-spin { animation: mcSpin 5s linear infinite; } .mc-float { animation: mcFloat 3s ease-in-out infinite; } .mc-pulse { animation: mcPulse 1.5s ease-in-out infinite; }
.mc-type { animation: mcTyping 1.6s steps(1) infinite; } .mc-sweep { animation: mcSweep 2.2s ease-in-out infinite; }
@keyframes mcGlow { 50% { transform: scale(1.18); opacity: .7; } }
@keyframes mcFloat { 50% { transform: translateY(-9px); } }
@keyframes mcBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes mcFlip { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
@keyframes mcBounce { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-18px) scale(.96, 1.05); } 55% { transform: translateY(0) scale(1.06, .94); } }
@keyframes mcWiggle { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes mcSpin { to { transform: rotate(360deg); } }
@keyframes mcPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes mcTyping { 0% { transform: translateX(0); } 33% { transform: translateX(6px); } 66% { transform: translateX(-6px); } }
@keyframes mcSweep { 0%, 100% { transform: translateX(-12px) rotate(-6deg); } 50% { transform: translateX(12px) rotate(6deg); } }

/* «Моё авто» → Статистика → Графики */
.cc-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; margin-top: 10px; overflow: hidden; }
.cc-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.cc-v { font-size: 9px; color: var(--muted); height: 12px; white-space: nowrap; }
.cc-b { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; }
.cc-b.st { display: flex; flex-direction: column-reverse; overflow: hidden; }
.cc-b.st i { display: block; min-height: 2px; }
.cc-l { font-size: 8.5px; letter-spacing: -.2px; color: var(--muted); margin-top: 4px; height: 12px; white-space: nowrap; }
.cc-row { margin: 8px 0; } .cc-rt { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.cc-rb { height: 7px; border-radius: 5px; background: var(--card2, rgba(120,120,128,.14)); overflow: hidden; margin-top: 4px; } .cc-rb i { display: block; height: 100%; border-radius: 5px; }

/* графики «Моё авто» → Статистика (SVG) */
.cx { margin: 12px 0; padding: 10px 6px 8px; border-radius: 16px; background: var(--card); }
.cx-svg { width: 100%; height: auto; display: block; }
.cx-t { font-size: 8.5px; fill: var(--muted); } .cx-g { stroke: var(--line, rgba(120,120,128,.25)); stroke-width: .6; }
.cx-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.cx-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* чат: ответы и реакции */
.msg .rp { display: block; margin: -2px -4px 6px; padding: 4px 8px; border-left: 3px solid currentColor; border-radius: 6px; background: rgba(120,120,128,.18); font-size: 12.5px; line-height: 1.3; cursor: pointer; max-width: 260px; }
.msg .rp b { display: block; font-size: 12px; opacity: .9; } .msg .rp span { display: block; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.flash { animation: msgFlash 1.3s ease; } @keyframes msgFlash { 0%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.rx { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 12px 6px 14px; } .rx.me { justify-content: flex-end; }
.rx-chip { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line, rgba(120,120,128,.3)); background: var(--card); border-radius: 999px; padding: 2px 8px; font-size: 14px; line-height: 1.3; } .rx-chip i { font-style: normal; font-size: 12px; color: var(--muted); } .rx-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.rx-row { display: flex; justify-content: space-between; gap: 4px; padding: 4px 2px; } .rx-pick { flex: 1; font-size: 26px; padding: 8px 0; border-radius: 14px; background: none; border: 0; } .rx-pick.on { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line, rgba(120,120,128,.2)); background: var(--bg); } .reply-bar .rb-l { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding-left: 8px; font-size: 13px; } .reply-bar .rb-l b { display: block; color: var(--accent); } .reply-bar .rb-l span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* плашка «Вышла новая версия» / «Рекомендуем обновить»: ровная, во всю ширину, значок в квадрате (раньше у кнопки значок был без рамки и всё «ехало») */
button.apk-banner { width: 100%; box-sizing: border-box; font: inherit; text-align: left; cursor: pointer; align-items: center; }
.apk-banner .apk-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: #3ddc84; color: #0b2a17; }
.apk-banner .apk-ico svg { width: 22px; height: 22px; display: block; }
.apk-banner .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; } .apk-banner .grow b { line-height: 1.25; }
.apk-banner.ios-upd .apk-ico { background: #5b6cff; color: #fff; }
.apk-banner .chev { flex: none; opacity: .5; }

/* режимы: одна строка без прокрутки; тень активной кнопки больше не обрезается; много режимов — только значки */
.modes-bar { overflow: visible; flex-wrap: nowrap; padding: 0 6px 10px; margin-bottom: 0; }
.md-chip { min-width: 0; flex: 1 1 auto; }
.modes-bar.icons .md-chip { flex: 1 1 0; padding: 0; } .modes-bar.icons .md-chip .md-n { display: none; } .modes-bar.icons .md-chip .md-e { font-size: 18px; }
.modes-bar .md-chip.add { flex: 0 0 40px; }

/* окно «Для чего вам «Я чел»?» — поверх подсказок и уведомлений */
.overlay:has(.purp-grid) { z-index: 9000; }

/* ---------- «Сегодня»: сводка дня ---------- */
.td-date { color: var(--muted); font-size: 15px; margin: -4px 4px 12px; }
.td-date::first-letter { text-transform: uppercase; }
.td-shift { display: flex; gap: 14px; align-items: center; padding: 14px 16px; width: 100%; text-align: left; margin-bottom: 8px; }
.td-shift b { font-size: 18px; }
.td-shift .sub { font-size: 14px; }
.td-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex: none; }
.td-n { text-transform: none; letter-spacing: 0; }
.td-e { font-size: 22px; flex: none; }
.td-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 2px 24px; }
.td-empty { padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.td-empty-e { font-size: 40px; }
.td-empty b { font-size: 19px; }
.td-empty .sub { max-width: 28ch; }
.td-empty-b { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.ai-screen > .topbar { padding: 0 20px 4px; }
.more-top .more-search { order: 1; margin-left: auto; } .more-top .inbox-btn { margin-left: 0; }
.feat-list li.fh { display: block; padding: 10px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.feat-list li.fh:first-child { padding-top: 0; }

/* день рождения в календаре: тёплая подсветка дня и значок 🎂 в углу */
.day.bday { position: relative; }
.day.bday.bd-frame { box-shadow: inset 0 0 0 2px rgba(255, 204, 0, var(--bdop, 1)); } /* прозрачность рамки — «Настройки отображения» */
.day.bday.bd-fill { background: rgba(255, 204, 0, .2); }
.day.bday.bd-dnum .num { color: #e6a800; font-weight: 800; } /* жёлтая дата дня рождения */
.day.bday.bd-cake::after { content: '🎂'; position: absolute; top: 1px; right: 2px; font-size: 11px; line-height: 1; pointer-events: none; } /* значок тортика в углу (бета) */

/* рисунки и фото для двоих (бета) */
.dd-seg { margin-bottom: 10px; }
.dd-cv { display: block; margin: 0 auto; border-radius: 18px; background: #fffdf7; box-shadow: 0 0 0 1px var(--line); touch-action: none; }
.dd-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.dd-cols, .dd-sz { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.dd-c { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); } .dd-c.on { border-color: var(--bg); box-shadow: 0 0 0 2.5px var(--text); }
.dd-s { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; } .dd-s i { background: var(--text); border-radius: 50%; display: block; } .dd-s.on { background: var(--accent); } .dd-s.on i { background: #fff; }
.dd-undo, .dd-clear { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); font-size: 18px; }
.dd-photo { aspect-ratio: 1; border-radius: 18px; background: var(--card2); display: grid; place-items: center; overflow: hidden; text-align: center; padding: 12px; } .dd-photo img { width: 100%; height: 100%; object-fit: cover; margin: -12px; padding: 0; }
.dd-last { display: block; width: 100%; text-align: left; } .dd-last img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; display: block; } .dd-last span { display: block; margin: 6px 2px 0; font-size: 13px; color: var(--muted); }
.dd-row { display: flex; gap: 6px; margin: 10px 0 0; overflow-x: auto; } .dd-row button { flex: none; } .dd-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; display: block; }
.dd-btns { display: flex; gap: 8px; margin-top: 12px; } .dd-btns .btn { flex: 1; }

/* Бункер «по правилам»: ход и голосование */
.bk-phase { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--card2); margin: 10px 0; }
.bk-phase b { font-size: 16px; } .bk-phase span { font-size: 13px; color: var(--muted); }
.bk-phase.mine { background: color-mix(in srgb, var(--accent) 22%, var(--card)); box-shadow: 0 0 0 1.5px var(--accent); }
.bk-phase.vote { background: color-mix(in srgb, #ff9f0a 18%, var(--card)); }
.bk-turn { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--accent); color: var(--accent-text); }
/* тема «Разработка»: полоска под заголовком — у каждого месяца ленты своя (едет вместе с месяцем), а не одна неподвижная в шапке */
:root[data-theme="build"] .screen:has(.cal-scroll.cont) .cal-head .topbar::after { display: none; }
:root[data-theme="build"] .cal-scroll.cont .month-title { position: relative; }
:root[data-theme="build"] .cal-scroll.cont .month-title::after { content: ""; position: absolute; left: 4px; bottom: 4px; width: 64px; height: 5px; border-radius: 3px; background: var(--hz); }
/* «Вернуться в игру» — того же размера, что «Сегодня» в календаре */
.gm-resume { bottom: calc(100px + var(--safe-b)); padding: 9px 18px; gap: 7px; font-size: 14px; line-height: 1.2; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.gm-resume i { width: 7px; height: 7px; }
/* выбор нескольких в скрепке чата (дни рождения, карты, смены) */
.pm-grp .pm-ck { padding: 0; background: none; cursor: pointer; } .pm-grp .pm-ck::after { content: ''; position: absolute; inset: -10px; }
.pm-grp .pm-ck { position: relative; }
.pm-row .pm-ck, .pm-grp .pm-ck { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.pm-row.on .pm-ck, .pm-grp.on .pm-ck { background: var(--accent); border-color: var(--accent); }
.pm-grp.part .pm-ck { border-color: var(--accent); color: var(--accent); }
.pm-ck .i { width: 14px; height: 14px; stroke-width: 3; }
.pm-grp .pm-gopen .chev { transition: transform .2s var(--ease); } .pm-grp .pm-gopen.open .chev { transform: rotate(180deg); }
.pm-list .pm-row { padding-left: 14px; } .pm-list .pm-grp + .pm-row, .pm-list .pm-row + .pm-row { } .pm-grp ~ .pm-row { padding-left: 30px; }
.pm-bar { position: sticky; bottom: calc(-16px - var(--safe-b)); display: flex; gap: 10px; margin: 0 -16px calc(-16px - var(--safe-b)); padding: 14px 16px calc(16px + var(--safe-b)); background: linear-gradient(to top, var(--bg2) 75%, transparent); }
.pm-bar button { flex: 1; padding: 13px; border-radius: 16px; font-weight: 600; background: var(--card2); border: 0; color: inherit; }
.pm-bar .pm-send { flex: 2; background: var(--accent); color: var(--accent-text, #fff); } .pm-bar .pm-send:disabled { opacity: .45; }
.pm-list .pm-grp { padding-left: 14px; }
/* двойной тап по сообщению — короткий «пульс» */
.msg.dbl-pop { animation: dblPop .35s var(--ease); } @keyframes dblPop { 40% { transform: scale(1.04); } }
/* мини-плеер голосовых и кружков вне чата — над нижней панелью, во всём приложении */
.np-global { position: fixed; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); z-index: 119; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--card); box-shadow: 0 8px 26px rgba(0,0,0,.22); animation: gmIn .3s var(--ease); }
.np-global .npg-play { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 36px; }
.np-global .npg-t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-global .np-prog { height: 3px; border-radius: 2px; background: var(--line); margin-top: 5px; overflow: hidden; } .np-global .np-prog i { display: block; height: 100%; background: var(--accent); }
.np-global .npg-rate { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 10px; background: var(--bg); }
.np-global .npg-x { opacity: .6; }
body:has(.gm-resume) .np-global { bottom: calc(146px + var(--safe-b)); }
/* «Медиафайлы» в профиле собеседника: голосовые и кружки играют по нажатию */
.pf-vo .pf-vp { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 30px; }
.pf-vo .pf-vp .i { width: 15px; height: 15px; }
.pf-vo.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
/* прогресс скачивания прямо на экране «Доступно обновление» (Android) */
.force-upd .fu-prog { width: 100%; max-width: 320px; margin: 14px auto 0; } .force-upd .fu-prog .upd-bar { height: 10px; }
/* iPhone/Android «Уменьшение движения» и «Экономия данных»: без размытия под стеклом.
   Размытие (backdrop-filter) и бесконечные анимации на слабом режиме iOS давали подлагивания при каждом прокручивании. */
html.fx-lite *, html.fx-lite *::before, html.fx-lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.fx-lite #tabbar, html.fx-lite .edit-bar, html.fx-lite .att-tabs, html.fx-lite .topbar.glass { background: var(--card) !important; }
html.fx-lite .overlay { background: rgba(0,0,0,.45) !important; }
/* анимации при «Уменьшении движения» не выключаем — так решили раньше (themes.js: calm = false); убираем только размытие */
/* Настройки: шапка профиля — обложка, крупный аватар с камерой, три кнопки-плитки (вариант 1 из макетов) */
.st-hero { display: flex; align-items: center; gap: 14px; padding: 14px; }
.st-ava-w { position: relative; width: 72px; height: 72px; flex: none; }
.st-ava { width: 72px !important; height: 72px !important; border-radius: 50%; box-sizing: border-box; font-size: 28px; font-weight: 800; padding: 0; background-size: cover; background-position: center; }
.st-cam { position: absolute; right: -3px; bottom: -1px; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--card); background: var(--text); color: var(--bg); display: grid; place-items: center; pointer-events: none; }
.st-cam .i { width: 12px; height: 12px; }
.st-name { font-size: 20px; line-height: 1.2; } .st-bio { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.st-edit { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 5px 10px; border-radius: 999px; } .st-edit .i { width: 13px; height: 13px; }
.st-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 14px; }
.st-act { height: 72px; border: 0; border-radius: 18px; background: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; }
.st-act i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.st-act i .i { width: 16px; height: 16px; }
.st-act:active { transform: scale(.96); }
/* режим в заголовке «Ещё» (бета): «💼 Работа ▾» → список режимов снизу */
.md-title { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: inherit; font: inherit; min-width: 0; }
.md-title h1 { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-title .chev { width: 22px; height: 22px; flex: none; }
.md-list { display: flex; flex-direction: column; gap: 6px; }
.md-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 16px; background: var(--card); color: var(--text); font: inherit; text-align: left; }
.md-opt.on { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.md-opt b { display: block; font-size: 16px; } .md-opt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.md-opt .md-oe { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-size: 20px; flex: none; }
.md-opt > .i { color: var(--ok, #2f9e44); }
/* Дни рождения (вид A+B): обложка ближайшего + лента по месяцам; цвет кружка — группа */
.bd-c-fr { --bc: #1c7ed6; } .bd-c-fa { --bc: #2f9e44; } .bd-c-ow { --bc: #e8590c; }
.bd-hero { border-radius: 24px; padding: 18px; background: var(--bc, #e8590c); color: #fff; display: flex; flex-direction: column; gap: 12px; margin: 4px 0 14px; }
.bd-hero-top { display: flex; align-items: center; gap: 14px; }
.bd-hero-d { width: 60px; height: 60px; border-radius: 50%; border: 3px solid #fff; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.bd-hero-d b { font-size: 20px; } .bd-hero-d span { font-size: 10px; font-weight: 700; }
.bd-hero-k { display: block; font-size: 13px; font-weight: 600; opacity: .9; } .bd-hero-n { display: block; font-size: 21px; margin-top: 2px; }
.bd-hero-acts { display: flex; gap: 8px; }
.bd-hero-acts button { flex: 1; height: 44px; border-radius: 14px; border: 0; font: inherit; font-weight: 700; background: rgba(255,255,255,.22); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.bd-hero-acts .bd-hero-go { background: #fff; color: #111114; }
.bd-seg { display: flex; gap: 4px; background: var(--card2, rgba(127,127,127,.15)); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.bd-seg button { flex: 1; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; }
.bd-seg button.on { background: var(--card); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.bd-tl { display: flex; gap: 10px; margin-bottom: 12px; }
.bd-tl-m { width: 36px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 6px; flex: none; }
.bd-tl-m b { font-size: 12px; text-transform: uppercase; color: var(--muted); } .bd-tl-m i { flex: 1; width: 2px; border-radius: 1px; background: var(--line); }
.bd-tl .group { margin: 0; min-width: 0; }
.bd-num { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: var(--bc); background: color-mix(in srgb, var(--bc) 16%, transparent); }
.bd-w { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* группы дней рождения: фильтр прокручивается вбок, «+» — своя группа; цветная точка — цвет группы */
.bd-seg { overflow-x: auto; scrollbar-width: none; } .bd-seg::-webkit-scrollbar { display: none; }
.bd-seg button { flex: 1 0 auto; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bd-seg .bd-gadd { width: 40px; padding: 0; color: var(--text); } .bd-seg .bd-gadd .i { width: 18px; height: 18px; }
.bd-gdot { width: 10px; height: 10px; border-radius: 50%; background: var(--bc); flex: none; display: inline-block; }
.bd-gpick .chip { display: inline-flex; align-items: center; gap: 6px; }
.bg-colors { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.bg-c { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; background: var(--bc); background-clip: padding-box; box-shadow: 0 0 0 2px var(--card); }
.bg-c.on { border-color: var(--text); }
.bd-fltw { display: flex; gap: 8px; align-items: stretch; margin-bottom: 14px; } .bd-fltw .bd-seg { flex: 1; min-width: 0; margin-bottom: 0; }
.bd-fltw > .bd-gadd { width: 44px; flex: none; border: 0; border-radius: 14px; background: var(--card); color: var(--text); display: grid; place-items: center; } .bd-fltw > .bd-gadd .i { width: 18px; height: 18px; }
/* Настройки: разделы списком с цветными значками */
.st-row .st-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; font-style: normal; }
.st-row .st-ic .i { width: 17px; height: 17px; }
/* настройка режимов: объяснение и шаги 1–4 */
.md-intro { background: var(--card); border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.md-intro b { font-size: 16px; } .md-intro p { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.md-step { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin: 16px 2px 8px; }
.md-step i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 12px; display: grid; place-items: center; flex: none; }
.md-step .muted { font-weight: 500; font-size: 13px; margin-left: auto; }
.md-more { margin-top: 8px; } .md-more summary { font-size: 14px; color: var(--accent); cursor: pointer; padding: 6px 2px; list-style: none; } .md-more summary::-webkit-details-marker { display: none; }
.st-who { border: 0; background: none; color: inherit; font: inherit; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 4px 6px; border-radius: 12px; flex: 1; min-width: 0; }
.st-who:active { background: var(--bg); }
.st-pen { display: inline-grid; place-items: center; vertical-align: middle; color: var(--muted); } .st-pen .i { width: 15px; height: 15px; }

.bd-view-cake { width: 64px; height: 64px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: color-mix(in srgb, var(--bc) 16%, transparent); }
/* скрепка: панель «Выбрать все / Отправить» — как в галерее (без светлой полосы снизу) */
.att-body .pm-bar { bottom: 0; margin: 0; padding: 10px 4px calc(10px + var(--safe-b)); background: linear-gradient(to top, var(--bg2) 70%, transparent); }
/* стопка фото/видео (до 10 за раз) — сетка в одном «пузыре», как альбом */
.album { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; width: min(78%, 300px); align-self: flex-start; border-radius: 18px; overflow: hidden; background: var(--card); padding: 3px; }
.album.me { align-self: flex-end; }
.album.n3 > .msg:first-child, .album.n5 > .msg:first-child, .album.n7 > .msg:first-child, .album.n9 > .msg:first-child { grid-column: span 2; }
.album > .msg.media { max-width: none; width: 100%; margin: 0; padding: 0; border-radius: 4px; overflow: hidden; align-self: stretch; }
.album > .msg.media img, .album > .msg.media video { width: 100%; max-width: none; height: 100%; max-height: none; aspect-ratio: 1; object-fit: cover; border-radius: 0; }
.album > .msg.media:first-child img, .album > .msg.media:first-child video { aspect-ratio: auto; max-height: 260px; }
.album.n2 > .msg.media:first-child img, .album.n4 > .msg.media:first-child img, .album.n6 > .msg.media:first-child img, .album.n8 > .msg.media:first-child img, .album.n10 > .msg.media:first-child img,
.album.n2 > .msg.media:first-child video, .album.n4 > .msg.media:first-child video, .album.n6 > .msg.media:first-child video, .album.n8 > .msg.media:first-child video, .album.n10 > .msg.media:first-child video { aspect-ratio: 1; max-height: none; }
.album > .msg.media .tm { display: none; } .album > .msg.media:last-child .tm { display: inline-flex; }
.album > .msg.media .m-cap { display: none; }
.album > .msg.media .m-vplay { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
/* кружок, доигрывающий вне диалога */
.np-circle { position: fixed; right: 14px; bottom: calc(170px + var(--safe-b)); z-index: 160; /* поверх профиля и окон */ width: 124px; height: 124px; border-radius: 50%; touch-action: none; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: gmIn .3s var(--ease); cursor: pointer; }
.np-circle video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #000; pointer-events: none; }
.npc-ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.npc-ring circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .25s linear; }
.npc-ic { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; } .npc-ic .i, .npc-ic svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.npc-x { position: absolute; top: -4px; right: -4px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); background: var(--card2); color: var(--text); display: grid; place-items: center; padding: 0; }
.npc-x .i, .npc-x svg { width: 14px; height: 14px; }
/* пачка смен в чате — компактный список */
.msg.evgrp { min-width: 250px; max-width: 86%; }
.eg-span { margin-left: auto; opacity: .75; font-weight: 500; }
.eg-list { display: flex; flex-direction: column; margin: 2px 0 0; }
.eg-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 14px; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.eg-row:first-child { border-top: 0; }
.eg-d { font-size: 12px; opacity: .75; text-transform: capitalize; } .eg-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .eg-tm { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.eg-more { border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 700; opacity: .85; padding: 4px 0 0; text-decoration: underline; text-underline-offset: 3px; }
/* Текст не выделяется и не копируется там, где это не нужно (кнопки, плитки, списки, сообщения — у сообщений есть «Копировать» в меню).
   Выделять можно только поля ввода и то, что копируют: номера карт, коды, ссылки, адреса, логи. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable="true"], .sel, .code-box, .pt-code-v, .sc-url, .cv-num, .dc-num, .call-diag-p pre, .transcript, .m-cap a, .msg a[href^="http"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }

.car-dots { display: flex; justify-content: center; gap: 6px; margin: -6px 0 12px; } .car-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; } .car-dots i.on { width: 18px; background: var(--text); }
.car-hero { touch-action: pan-y; }
.qrl-box { width: 220px; max-width: 70vw; margin: 0 auto; background: #fff; padding: 10px; border-radius: 16px; } .qrl-box svg { display: block; width: 100%; height: auto; }
body.maint-on .ny-garland { display: none; } /* на экране техработ своя гирлянда в сцене — верхнюю прячем, чтобы не было двух */

/* «Ещё»: шестерёнка настроек в карточке профиля вместо стрелки */
.pf-gear { width: 40px; height: 40px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; flex: none; color: var(--text); } .pf-gear svg, .pf-gear .i { width: 20px; height: 20px; }
/* иконки строк в старом стиле: линейные, без цветных плашек (Настройки и «Ещё») */
.st-row .st-ic { background: none !important; color: var(--text); width: 26px; height: 26px; box-shadow: none; }
.st-row .st-ic svg, .st-row .st-ic .i { width: 22px; height: 22px; color: var(--text); stroke: currentColor; }

/* плитки разделов в общем стиле: мягкий тон цвета раздела и цветная линейная иконка (вариант 3) */
.tilegrid .tile .ico, .me-grid .tile .ico { background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent) !important; background-image: none !important; color: var(--c, var(--accent)) !important; box-shadow: none !important; }
.tilegrid .tile .ico svg, .me-grid .tile .ico svg { filter: none !important; }
/* «Моё авто»: карточка «＋ Добавить машину» за последней машиной */
.car-hero.car-add { display: grid; place-items: center; min-height: 196px; background: transparent; border: 2px dashed var(--line); }
.car-add-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--text); font: inherit; padding: 20px; }
.car-add-plus { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.car-dots i.plus { width: auto; height: auto; background: none; font-size: 11px; line-height: 6px; color: var(--muted); font-style: normal; font-weight: 800; }
.car-dots i.plus.on { color: var(--text); }
/* единые кнопки в шапках разделов: настройки — шестерёнка справа, одинакового вида везде */
.topbar .iconbtn.sec-set { order: 99; }
/* Обычное переключение вкладки (не палец на линзе): стекло просто переезжает, без большого увеличения */
#tabbar.moving:not(.pressing):not(.dragging) .tb-ind { scale: 1.03 1.02; }

/* ===== Нарды и Го ===== */
.nd-w { max-width: 460px; margin: 0 auto; }
.nd-top { display: flex; justify-content: space-between; font-size: 13px; margin: 0 2px 6px; }
.nd-board { background: #5a3a1e; border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 2px; box-shadow: inset 0 0 0 2px #3d2512; }
.nd-row { display: grid; grid-template-columns: repeat(6, 1fr) 28px repeat(6, 1fr); gap: 0; }
.nd-pt { position: relative; height: 126px; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; min-width: 0; -webkit-tap-highlight-color: transparent; }
.nd-pt.t { justify-content: flex-start; } .nd-pt.b { justify-content: flex-end; }
.nd-tri { position: absolute; inset: 0; background: #d9b382; }
.nd-pt.o .nd-tri { background: #9a4a38; }
.nd-pt.t .nd-tri { clip-path: polygon(12% 0, 88% 0, 50% 96%); } .nd-pt.b .nd-tri { clip-path: polygon(50% 4%, 12% 100%, 88% 100%); }
.nd-st { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.nd-pt.b .nd-st { flex-direction: column-reverse; }
.nd-c { display: block; width: min(23px, 92%); aspect-ratio: 1; border-radius: 50%; margin: 1px 0; box-shadow: 0 2px 3px rgba(0,0,0,.45), inset 0 -3px 0 rgba(0,0,0,.18); }
.nd-c.c0 { background: radial-gradient(circle at 35% 30%, #fff, #d8d3c8); }
.nd-c.c1 { background: radial-gradient(circle at 35% 30%, #555, #151515); }
.nd-n { position: absolute; z-index: 2; font-size: 12px; color: #fff; background: rgba(0,0,0,.6); border-radius: 9px; padding: 0 5px; }
.nd-pt.t .nd-n { bottom: -12px; } .nd-pt.b .nd-n { top: -12px; }
.nd-pt.can .nd-c { box-shadow: 0 0 0 2px #ffd23f, 0 2px 3px rgba(0,0,0,.45); }
.nd-pt.sel .nd-c:last-child, .nd-pt.sel .nd-c:first-child { transform: translateY(-3px); }
.nd-pt.sel::before { content: ''; position: absolute; inset: 0; z-index: 0; background: rgba(255,210,63,.3); border-radius: 6px; }
.nd-pt.tg::after { content: ''; position: absolute; inset: 0; z-index: 2; background: rgba(255,236,140,.35); box-shadow: inset 0 0 0 2px #ffd23f; border-radius: 6px; }
.nd-pt.last .nd-tri { filter: brightness(1.18); }
.nd-bar { background: #3d2512; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; padding: 0; position: relative; }
.nd-bar.can { box-shadow: inset 0 0 0 2px #ffd23f; } .nd-bar.sel { background: #6a4520; }
.nd-bar .nd-c { width: 22px; } .nd-bar .nd-n { position: static; }
.nd-mid { min-height: 36px; display: flex; align-items: center; justify-content: center; background: #3d2512; border-radius: 6px; }
.nd-dice { display: flex; gap: 8px; } .nd-dice span { font-size: 32px; line-height: 1; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.5); }
.nd-roll, .nd-off { display: block; width: 100%; margin-top: 10px; }
.go-w { max-width: 440px; margin: 0 auto; }
.go-b { display: grid; grid-template-columns: repeat(9, 1fr); background: #dcb065; border-radius: 10px; padding: 6px; box-shadow: inset 0 0 0 2px #b8883f; }
.go-x { aspect-ratio: 1; position: relative; display: grid; place-items: center; padding: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
.go-x::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #5a3a1e; }
.go-x::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #5a3a1e; }
.go-x.cl::before { left: 50%; } .go-x.cr::before { right: 50%; } .go-x.rt::after { top: 50%; } .go-x.rb::after { bottom: 50%; }
.go-x.star { background: radial-gradient(circle at center, #5a3a1e 0 11%, transparent 12%); }
.go-x.can:active::before, .go-x.can:hover::before { background: #b0731c; }
.go-s { width: 90%; height: 90%; border-radius: 50%; position: relative; z-index: 1; box-shadow: 0 2px 3px rgba(0,0,0,.45); }
.go-s.s0 { background: radial-gradient(circle at 35% 30%, #666, #0d0d0d); } .go-s.s1 { background: radial-gradient(circle at 35% 30%, #fff, #cfcabd); }
.go-s.last::after { content: ''; position: absolute; left: 50%; top: 50%; width: 26%; height: 26%; margin: -13% 0 0 -13%; border-radius: 50%; background: #ff453a; }
.go-pass { margin-top: 10px; }
