/* «Я чел» — стили. Темы: 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, 1fr); gap: 2px; }
.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: 4px 0; }
.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: 3px solid transparent; }
.pal button.on i { border-color: 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); }
}
/* меньше анимаций, если пользователь отключил их в системе */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.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: up .38s var(--spring); }
@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; }
.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: помощник на весь экран, календарь как в Supershift, свайпы ===== */
/* помощник: лента занимает всё место, поле ввода прижато к таб-бару */
.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: up 1.2s infinite; }
.rec-lock svg { width: 18px; height: 18px; }
@keyframes lockIn { from { transform: translateY(20px); opacity: 0 } }
@keyframes up { 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)); }

/* ---------- уведомления как в Telegram: тёмная плашка снизу ---------- */
.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; }
@media (prefers-reduced-motion: reduce) { .maint { animation: 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: 0; 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 6s linear infinite; opacity: .8; }
@keyframes thSnow { to { background-position: 0 140px, 4px 146px; } }

/* ---------- Новый год ---------- */
: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; }
.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; }
/* «печатает…» с прыгающими точками, как в Telegram */
.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 .group, .fx-snow .lv-card, .fx-snow .rc-card, .fx-snow .wcard, .fx-snow .profile, .fx-snow .g-card { position: relative; }
.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 } }
@media (prefers-reduced-motion: reduce) { .ny-garland .b { animation: none; } }
.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; }

/* «Память» — как в Telegram */
.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 .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-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; } }
