@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/material-symbols.woff2) format('woff2');
}
:root {
  --primary: #2563EB; --on-primary: #fff; --primary-c: #EBF1FF; --on-primary-c: #001B3E;
  --bg: #F5F6F8; --surface: #fff; --surface-c: #F0F2F6; --text: #192331; --muted: #566475; --outline: #C4CBD5;
  --error: #BA1A1A; --error-c: #FFDAD6; --tertiary-c: #F2E7FF; --open: #2E7D32;
  --radius: 10px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior-y: contain; }
a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; width: 100%; padding: 12px 14px; border: 1px solid var(--outline);
  border-radius: 10px; background: var(--surface); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); border-color: transparent; }
input[type=checkbox] { width: 22px; height: 22px; padding: 0; accent-color: var(--primary); flex: none; }
input:disabled { background: var(--surface-c); color: var(--muted); }
textarea { resize: vertical; }
hr { border: 0; border-top: 1px solid var(--outline); margin: 4px 0; width: 100%; }
h2.h2 { font-size: 22px; margin: 0; line-height: 1.25; }

.ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; vertical-align: middle; }
.ms.accent, .accent { color: var(--primary); }
.small-ic { font-size: 16px; }
.big-ic { font-size: 40px; }

/* ---------- каркас ---------- */
#splash { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  background: #fff; z-index: 100; transition: opacity .35s; }
#splash.hide { opacity: 0; pointer-events: none; }
#splash img { width: 120px; height: 120px; border-radius: 28px; animation: spin 1.1s ease-in-out infinite; }
#splash b { color: #16294A; font-size: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

.app { max-width: 640px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
.app.has-tabs { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 4px; min-height: 60px;
  padding: calc(6px + var(--safe-t)) 8px 6px 16px; background: var(--bg); }
.topbar h1 { font-size: 22px; font-weight: 500; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .icon-btn:first-child { margin-left: -8px; }
.topbar .actions { display: flex; }
.topbar.dark { background: #1C2550; color: #fff; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn:active { background: rgba(0,0,0,.08); }
.icon-btn.light, .btn.light { color: #fff; }
.content { padding: 4px 16px 24px; }
.content.with-bottom { padding-bottom: 96px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; z-index: 20;
  display: flex; background: var(--surface-c); padding-bottom: var(--safe-b); height: calc(var(--tab-h) + var(--safe-b)); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--muted); }
.tabbar .tab-ic { width: 60px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.tabbar button.on { color: var(--text); font-weight: 600; }
.tabbar button.on .tab-ic { background: #CDE5F0; }
.fab { position: fixed; z-index: 15; right: max(16px, calc(50% - 320px + 16px)); bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-radius: 16px; background: var(--primary-c);
  color: var(--on-primary-c); font-weight: 600; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.bottom-action { position: fixed; z-index: 15; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px;
  padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
.detail { padding-bottom: 96px; }

/* Основные вкладки повторяют оформление Android 1.6.4. */
.topbar:not(.dark) { background: var(--surface); }
.topbar h1 { font-weight: 700; letter-spacing: -.4px; }
.tabbar { background: var(--surface); border-top: 1px solid var(--surface-c); }
.tabbar button { min-width: 0; font-size: 11px; }
.tabbar button.on { color: var(--primary); }
.tabbar button.on .tab-ic { background: var(--primary-c); }
.fab[aria-label] { width: 52px; height: 52px; justify-content: center; padding: 0; border-radius: 12px;
  background: var(--primary); color: var(--on-primary); }
.browse-ads, .browse-feed, .browse-directory { padding-bottom: 82px; }

/* ---------- раскладка ---------- */
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.align-start { align-items: flex-start; }
.gap { gap: 12px; } .gap-s { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.list { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.pad { padding: 16px; }
.center { display: flex; justify-content: center; padding: 32px; }
.center-row { display: flex; justify-content: center; align-items: center; }
.center-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.center-text { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--error); }
.pre { white-space: pre-wrap; margin: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.section { font-size: 16px; margin: 12px 0 0; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--primary-c); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; }

/* ---------- элементы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px;
  border-radius: 22px; font-weight: 600; font-size: 15px; text-align: center; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.outline { border: 1px solid var(--outline); color: var(--primary); }
.btn.outline.light { border-color: rgba(255,255,255,.6); }
.btn.text { color: var(--primary); padding: 0 12px; }
.btn.text.err, .btn.text.danger { color: var(--error); }
.btn.block { width: 100%; }
.btn.big { min-height: 52px; font-size: 16px; }
.btn.small { min-height: 32px; font-size: 13px; }
.btn:disabled { opacity: .5; }
.btn:active { filter: brightness(.92); }
.card { background: var(--surface-c); border-radius: var(--radius); padding: 12px; cursor: pointer; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border: 1px solid var(--outline); border-radius: 8px; font-size: 14px; font-weight: 500; }
.chip.on { background: #CDE5F0; border-color: transparent; }
.chip-s { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--primary-c); color: var(--on-primary-c); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.badge.new { background: var(--primary); color: var(--on-primary); }
.tabbar .tab-ic { position: relative; }
.tabbar .tab-ic .notif-dot { top: -3px; right: 6px; }
.badge.pending { background: var(--tertiary-c); }
.badge.rejected { background: var(--error-c); }
.badge.official { background: var(--primary-c); }
.badge.archive { background: var(--surface); color: var(--muted); border: 1px solid var(--outline); }
.svg-ic { width: 24px; height: 24px; display: block; }
.fav-on { color: var(--error); }
.notif-dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--error); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.icon-btn.has-dot { position: relative; }
.notif.new { background: var(--primary-c); }
.life-banner { padding: 16px; background: var(--primary-c); display: flex; flex-direction: column; gap: 8px; }
.life-banner.hidden { background: var(--surface-c); }
.life-banner p { margin: 0; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--outline); border-radius: 28px; padding: 0 16px; background: var(--surface); }
.search input { border: 0; padding: 12px 0; background: none; }
.search input:focus { outline: none; }
.title2 { font-weight: 600; font-size: 16px; }
.price { color: var(--primary); font-weight: 700; }
.price.big { font-size: 22px; }
.thumb { border-radius: 10px; object-fit: cover; flex: none; display: block; background: var(--surface); }
.empty-thumb { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.thumb-wrap { position: relative; flex: none; }
.thumb-count { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 0 5px; border-radius: 5px; }
.ad-card { display: flex; gap: 12px; }
.news-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
/* Компактная лента объявлений */
.browse-ads h1 { margin: 4px 0 14px; font-size: 26px; }
.compact-topics .chip, .compact-actions .chip { background: var(--surface); border-radius: 24px; min-height: 40px; }
.compact-topics .chip[aria-pressed=true] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.compact-actions .chip[aria-pressed=true] { color: var(--on-primary-c); background: var(--primary-c); border-color: var(--primary-c); }
.compact-topics { margin-top: 6px; }
.compact-actions { padding-top: 0; }
.compact-actions .chip { padding-inline: 11px; }
.compact-list { background: var(--surface); border-radius: 12px; margin: 6px -8px 12px; padding-inline: 8px; }
.compact-ad { display: flex; align-items: center; gap: 12px; padding-block: 8px; color: var(--text); }
.compact-ad + .compact-ad { border-top: 1px solid var(--outline); }
.compact-ad img, .compact-placeholder { flex: none; width: clamp(68px, 21vw, 90px); height: 72px; border-radius: 8px; object-fit: cover; }
.compact-placeholder { display: grid; place-items: center; background: var(--surface-c); color: var(--muted); }
.compact-copy { min-width: 0; overflow-wrap: anywhere; }
.compact-copy h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 16px; line-height: 1.25; }
.compact-copy strong { display: block; font-size: 18px; }
.ad-views { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; margin-inline-start: 5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.compact-copy small { display: block; color: var(--muted); }

.browse-ads .list { gap: 0; }
.ad-card { border-radius: 0; border-bottom: 1px solid var(--surface-c); }
.browse-ads .ad-card { margin-inline: -16px; padding-inline: 16px; }
.browse-feed .news-card { margin-inline: -16px; border-radius: 0; }
.card.news-card { display: flex; padding: 14px 16px; background: var(--surface); }
.news-author { align-items: center; }
.news-avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary-c); color: var(--primary); font-weight: 700; }
.news-card > .wrap:empty { display: none; }
.news-copy { white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.news-photo { position: relative; margin-inline: -16px; background: var(--surface-c); }
.news-photo img { display: block; width: 100%; aspect-ratio: 1.45; object-fit: contain; }
.service-list .tile { background: var(--surface); padding: 12px; border-radius: 10px; }
.service-list .tile-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--service-tint); color: var(--service-accent); }
.service-list .tile { color: var(--text); }
.browse-ads .ad-card { background: var(--surface); }
.pin { font-size: 15px; color: #8E6A00; }
.reactions { display: flex; gap: 6px; }
.reaction { padding: 2px 10px; border: 1px solid var(--outline); border-radius: 10px; background: var(--surface); font-size: 14px; }
.reaction.on { background: var(--primary-c); border-color: var(--primary); }
.status-banner { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.status-banner p { margin: 0; }
.status-banner.pending { background: var(--tertiary-c); }
.status-banner.rejected { background: var(--error-c); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; position: relative; background: #000; }
.gallery img { width: 100%; flex: none; aspect-ratio: 4/3; object-fit: cover; scroll-snap-align: center; }
.gallery-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 8px; }
.viewer { position: fixed; inset: 0; z-index: 60; background: #000; }
.viewer-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; }
.viewer-page { flex: none; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; }
.viewer-page img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.viewer-close { position: absolute; top: calc(8px + var(--safe-t)); right: 8px; z-index: 2; color: #fff; background: rgba(0,0,0,.4); }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 24px; }
.dialog { background: var(--surface); border-radius: 24px; padding: 24px; width: 100%; max-width: 420px; }
.dialog h2 { font-size: 20px; margin: 0 0 12px; font-weight: 500; }
.dialog-body { display: flex; flex-direction: column; gap: 12px; }
.dialog-body p { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 84px); transform: translateX(-50%) translateY(20px);
  background: #2F3033; color: #fff; padding: 12px 18px; border-radius: 10px; max-width: 90%; opacity: 0; transition: .25s; z-index: 70; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- формы ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field.error input, .field.error textarea { border-color: var(--error); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.consent.error span { color: var(--error); }
.switch-row { display: flex; justify-content: space-between; align-items: center; }
.photo-row { display: flex; gap: 8px; overflow-x: auto; }
.photo-item { position: relative; flex: none; }
.photo-item img, .photo-add { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; display: block; }
.photo-add { border: 1px solid var(--outline); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.photo-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.photo-del .ms { font-size: 18px; }
.icon-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-pick { border-radius: 12px; padding: 2px; border: 3px solid transparent; }
.icon-pick.on { border-color: var(--primary); }
.color-pick { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; }
.color-pick.on { border-color: var(--text); }
.seg { display: flex; border: 1px solid var(--outline); border-radius: 20px; overflow: hidden; }
.seg button { flex: 1; padding: 8px 4px; font-size: 14px; }
.seg button.on { background: #CDE5F0; font-weight: 600; }
.day-row { display: flex; align-items: center; gap: 8px; }
.day-label { width: 96px; flex: none; }
.day-row input[type=time] { width: auto; padding: 8px; }
.call-number { font-size: 28px; font-weight: 700; text-align: center; color: var(--primary); letter-spacing: .5px; }
.hint { background: var(--primary-c); color: var(--on-primary-c); border-radius: var(--radius); padding: 14px; }
.hint p { margin: 6px 0 10px; }
.docs-links { line-height: 2; padding: 8px 4px; }
.profile-card { background: var(--primary-c); }

/* ---------- лента ---------- */
.strip { background: var(--surface-c); border-radius: 12px; padding: 7px 12px; cursor: pointer; min-height: 38px; }
.presence { flex: none; display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.dot-online { width: 8px; height: 8px; border-radius: 50%; background: #43A047; display: inline-block; margin-left: 6px; }
.vnote { position: relative; border-radius: 50%; overflow: hidden; background: #000; flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.vnote img, .vnote video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vnote-play { position: relative; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; }
.vnote-play .ms { font-size: 30px; }
.vnote-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.vnote-ring circle { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.vnote-ring.rec circle { stroke: #E53935; }
.recorder { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: calc(8px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
.rec-top { width: 100%; }
.rec-time { font-size: 18px; padding-right: 8px; }
.rec-time.on { color: #E53935; }
.rec-circle { position: relative; border-radius: 50%; overflow: hidden; background: #333; margin-top: auto; }
.rec-circle video { width: 100%; height: 100%; object-fit: cover; }
.rec-circle video.mirror { transform: scaleX(-1); }
.rec-denied { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 28px; }
.rec-hint { color: rgba(255,255,255,.8); text-align: center; margin-bottom: auto; }
.rec-controls { width: 100%; justify-content: space-evenly; }
.rec-btn { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: flex; align-items: center; justify-content: center; }
.rec-btn span { width: 58px; height: 58px; border-radius: 50%; background: #E53935; transition: .2s; }
.rec-btn.on span { width: 30px; height: 30px; border-radius: 6px; }

/* ---------- справочник ---------- */
.biz-logo { display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.invite { background: var(--surface); border: 1px solid var(--outline); cursor: default; display: flex; flex-direction: column; gap: 10px; }
.invite-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-c); color: var(--on-primary-c); }
.open { color: var(--open); font-weight: 600; }
.closed { color: var(--error); font-weight: 600; }
.promo { color: #7B5800; font-weight: 600; }
.promo-box { background: #FFF3D6; color: #5C4300; border-radius: 12px; padding: 12px; display: flex; gap: 8px; align-items: center; }
.info-row { display: flex; gap: 12px; align-items: flex-start; }
.info-row > .ms { color: var(--muted); }

/* ---------- сервисы ---------- */
.tile { border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; color: #1B1B1F; }
.tile-ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.tile-ic .ms { font-size: 30px; }
.bus-num { width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none; }
.legend-next { width: 14px; height: 14px; border-radius: 3px; background: var(--primary-c); display: inline-block; }
.schedule { display: flex; margin: 8px -16px; background: var(--surface); }
.sch-names { flex: none; width: 128px; }
.sch-name { height: 40px; display: flex; align-items: center; padding: 0 6px 0 16px; font-size: 13px; font-weight: 600; line-height: 1.15; }
.sch-times { display: flex; overflow-x: auto; }
.sch-col { flex: none; width: 56px; }
.sch-cell { height: 40px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.sch-cell.past { color: #A0A4AA; }
.sch-cell.none { color: #C9CCD1; }
.sch-cell.next { background: var(--primary-c) !important; font-weight: 700; color: var(--on-primary-c); }
.z { background: #F2F4F8; }
.sch-break { flex: none; width: 28px; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; background: #FFF6E0; }
.prize { background: #534AB7; color: #CECBF6; border-radius: 16px; padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.prize-ic { color: #FFC94D; font-size: 36px; }
.prize-title { color: #fff; font-size: 22px; font-weight: 700; }
.leader { border-radius: 10px; padding: 8px 12px; background: var(--surface-c); }
.leader.gold { background: #FAEEDA; color: #633806; }
.leader.me { background: var(--primary-c); }
.rank { width: 24px; }
.tabs { display: flex; border-bottom: 1px solid var(--outline); position: sticky; top: calc(60px + var(--safe-t)); background: var(--bg); z-index: 9; }
.tabs button { flex: 1; padding: 12px 4px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--primary); border-color: var(--primary); }
.game-screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: #1C2550; max-width: 640px; margin: 0 auto; }
.game-canvas { flex: 1; width: 100%; touch-action: none; display: block; padding-bottom: var(--safe-b); }
.game-frame { flex: 1; width: 100%; border: 0; display: block; background: #10141F; }

/* ---------- вход через ВКонтакте и Яндекс ---------- */
.btn.vk { background: #0077FF; color: #fff; }
.btn.ya { background: #FC3F1D; color: #fff; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--outline); }

/* Расписание автобусов: размеры и расположение как в Android-приложении. */
.bus-list { gap: 10px; }
.bus-kind { margin-bottom: 0; }
.bus-route-card { display: flex; align-items: center; gap: 14px; padding: 14px; width: 100%; text-align: left; }
.bus-route-card .bus-card-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bus-route-card b { font-size: 16px; font-weight: 600; }
.bus-next { margin-top: 4px; font-weight: 600; }
.bus-carrier { padding-top: 8px; }
.bus-carrier p { margin: 0 0 6px; }
.bus-carrier .btn { display: inline-flex; align-items: center; gap: 6px; }
.bus-route-layout { display: flex; flex-direction: column; height: calc(100dvh - 60px - var(--safe-t)); min-height: 380px; padding-bottom: calc(12px + var(--safe-b)); }
.bus-route-controls { padding: 0 16px; flex: none; }
.bus-legend { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.bus-off-banner { background: var(--error-c); color: var(--error); padding: 10px; margin: 4px 0; font-size: 14px; }
.bus-off-chip { color: var(--error) !important; }
.bus-table-scroll { flex: 1; min-height: 120px; overflow-y: auto; padding-top: 4px; }
.bus-schedule { margin: 0; background: transparent; }
.bus-schedule .sch-names { width: 128px; }
.bus-schedule .sch-name { padding: 0 4px 0 16px; font-size: 14px; font-weight: 500; overflow: hidden; }
.bus-schedule .sch-times { flex: 1; min-width: 0; padding-right: 16px; }
.bus-schedule .sch-col { width: 54px; }
.bus-schedule .sch-cell { padding: 3px; }
.bus-schedule .z { background: var(--surface-c); }
.bus-time { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.bus-time.next { background: var(--primary-c); color: var(--on-primary-c); font-weight: 700; }
.bus-time.off { background: var(--error-c); color: var(--error); font-weight: 700; }
.bus-time.past { opacity: .35; }
.bus-schedule .sch-break { width: 30px; writing-mode: initial; transform: none; background: var(--tertiary-c); font-weight: 700; color: var(--text); }
.bus-schedule .sch-break span { white-space: nowrap; transform: rotate(-90deg); text-transform: uppercase; }
.bus-route-footer { padding: 0 16px; flex: none; }
.bus-note { margin: 0; }

/* Эталон: опубликованный APK 1.6.4, Theme.kt и экраны автобусов. */
:root {
  --on-primary-c: #001A41; --muted: #687585; --outline: #ADB6C3;
  --secondary-c: #F0F3F8; --tertiary-c: #FFE8B3;
  --surface-highest: #E6E0E9; --on-error-c: #410002;
}
.bus-list { padding-top: 16px; }
.bus-kind { padding-top: 0; }
.bus-route-card { background: var(--surface-highest); border-radius: 10px; }
.bus-route-card b { font-size: 17px; line-height: 23px; letter-spacing: -.2px; }
.bus-route-card .small { font-size: 12px; line-height: 17px; }
.bus-route-card .bus-next { font-size: 14px; line-height: 20px; }
.bus-num { color: var(--on-primary); }
.bus-kind .chip, .bus-route-controls .chip { color: var(--muted); font-weight: 600; padding: 6px 12px; line-height: 20px; }
.bus-kind .chip.on, .bus-route-controls .chip.on { background: var(--secondary-c); color: var(--text); }
.bus-schedule .z { background: var(--surface); }
.bus-schedule .sch-name { line-height: 21px; }
.bus-carrier .small, .bus-legend { font-size: 12px; line-height: 17px; }
.bus-carrier .btn { min-height: 40px; font-size: 14px; line-height: 20px; padding: 0 20px; }
.bus-carrier .ms { font-size: 18px; }
.bus-time.off, .bus-off-banner { color: var(--on-error-c); }
.bus-route-layout { background: var(--bg); }
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #A9C7FF; --on-primary: #002F67;
    --primary-c: #00458F; --on-primary-c: #D6E4FF;
    --bg: #10141B; --surface: #191F29; --surface-c: #242C38;
    --surface-highest: #36343B; --text: #E6E1E5; --muted: #CAC4D0;
    --outline: #938F99; --secondary-c: #004F56; --tertiary-c: #5C4100;
    --error: #FFB4AB; --error-c: #93000A; --on-error-c: #FFDAD6; --open: #81C784;
  }
  #splash { background: var(--bg); }
  #splash b { color: var(--text); }
  .chip.on, .seg button.on { background: var(--secondary-c); color: var(--text); }
  .z { background: var(--surface); }
  .tile { color: var(--text); }
  .tile-ic { color: var(--primary); }
  .service-list .tile { background: var(--surface); }
  .service-list .tile-ic { background: var(--surface-c); color: var(--primary); }
  .promo, .pin { color: #FFC94D; }
  .promo-box, .leader.gold { background: var(--tertiary-c); color: #FFE8B3; }
  .badge.pending { color: #FFE8B3; }
  .badge.rejected { color: var(--on-error-c); }
  #toast { background: #E6E1E5; color: #10141B; }
}

/* Обычные ролики сохраняют пропорции, кружочки используют прежний проигрыватель. */
.feed-video { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: 10px; }
.feed-video-thumb { position: relative; overflow: hidden; background: #000; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.feed-video-thumb img { width: 100%; height: 100%; object-fit: contain; }
.bus-date { padding: 8px 0; font-size: 14px; line-height: 20px; font-weight: 600; text-transform: none; }

/* Лента: согласованное оформление из Android, крупные фото и блок автора. */
.browse-feed { padding-bottom: 82px; }
.browse-feed .news-card { margin-inline: -16px; border-radius: 0; }
.card.news-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); }
.news-author { align-items: center; }
.news-avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--primary-c); color: var(--primary); font-weight: 700; }
.news-card > .wrap:empty { display: none; }
.news-copy { white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.news-photo { position: relative; margin-inline: -16px; background: var(--surface-c); }
.news-photo img { display: block; width: 100%; aspect-ratio: 1.45; object-fit: contain; }
.fab[aria-label="Написать публикацию"] { width: 52px; height: 52px; justify-content: center; padding: 0; border-radius: 12px; background: var(--primary); color: var(--on-primary); }

.bus-route-controls .chip.bus-other-day { color: var(--muted); border-style: dashed; opacity: .76; }
.bus-schedule.bus-other-day { color: var(--muted); }
.bus-schedule.bus-other-day .bus-time { color: var(--muted); opacity: .82; }





/* Справочник: категории, карточки и страница предприятия. */
.directory-page, .business-detail-page { --biz-border: #E5EAF1; --biz-muted: #586678; --biz-shadow: 0 2px 6px #19233106; }
.directory-page .topbar { padding-top: calc(12px + var(--safe-t)); padding-bottom: 10px; }
.directory-page .topbar h1 { line-height: 1.2; }
.directory-city { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--biz-muted); margin-top: 4px; }
.directory-city .ms { font-size: 16px; }
.browse-directory { padding-top: 14px; padding-bottom: 24px; }
.browse-directory .search { background: var(--surface-c); border: 1px solid transparent; border-radius: 14px; padding: 0 12px; min-height: 48px; margin-bottom: 16px; }
.browse-directory .search:focus-within { border-color: var(--primary); }
.browse-directory .search input { min-width: 0; padding: 12px 8px; background: transparent; }
.browse-directory .search input:focus { outline: none; }
.browse-directory .search .icon-btn { width: 44px; margin-right: -10px; }
.directory-categories { display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 12px; margin: -3px -2px 0; scroll-snap-type: x proximity; scrollbar-width: thin; }
.directory-category { flex: 0 0 calc((100% - 24px) / 4); min-width: 78px; min-height: 82px; padding: 10px 5px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; scroll-snap-align: start; border: 2px solid transparent; color: #25364A; }
.directory-category .ms { font-size: 29px; }
.directory-category span:last-child { font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; }
.directory-category.warm { background: #FFF0DC; }.directory-category.mint { background: #E0F5E9; }
.directory-category.aqua { background: #DFF2F6; }.directory-category.blue { background: #E4EDFF; }.directory-category.rose { background: #FBE8ED; }
.directory-category.on { border-color: var(--primary); }
.directory-filters { margin: 0; padding: 0 0 16px; gap: 8px; }
.directory-filters .chip { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid transparent; border-radius: 24px; background: var(--surface-c); color: var(--biz-muted); font-size: 13px; }
.directory-filters .chip.on { background: var(--primary-c); color: var(--primary); border-color: var(--primary); }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.directory-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.directory-heading .small { flex: none; }
.directory-results { min-height: 120px; }
.browse-directory .list { padding-top: 12px; gap: 12px; }
.card.business-card { position: relative; padding: 12px; border: 1px solid var(--biz-border, #E5EAF1); border-radius: 18px; background: var(--surface); box-shadow: var(--biz-shadow, 0 2px 6px #19233106); cursor: default; }
.business-open { display: flex; width: calc(100% - 46px); gap: 12px; text-align: left; align-items: flex-start; border-radius: 10px; }
.business-photo { position: relative; flex: none; overflow: hidden; border-radius: 13px; }
.business-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.business-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.business-name { font-size: 16px; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.business-category, .business-address { font-size: 12px; line-height: 1.4; color: var(--biz-muted, var(--muted)); }
.business-address { display: flex; align-items: flex-start; gap: 3px; }
.business-address .ms { font-size: 15px; flex: none; margin-top: 1px; }
.business-copy .small { font-size: 12px; line-height: 1.4; }
.business-copy .closed { color: var(--biz-muted, var(--muted)); font-weight: 500; }
.business-tools { position: absolute; top: 7px; right: 6px; bottom: 7px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.business-tools .icon-btn { width: 44px; height: 44px; }
.business-tools .business-call { background: var(--primary); color: var(--on-primary); margin-top: auto; }
.business-tools .fav-on { color: #C52848; }
.business-tools .fav-on svg path { fill: currentColor; }
.business-tools button:disabled { opacity: .55; cursor: progress; }
.business-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-right: 44px; }
.business-promo { display: flex; align-items: flex-start; gap: 6px; color: #6E4B09; background: #FFF1D9; border-radius: 8px; margin-top: 10px; margin-right: 46px; padding: 6px 8px; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.business-promo .ms { font-size: 16px; flex: none; }
.business-promo span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.directory-add { margin-top: 16px; width: 100%; min-height: 48px; border: 1px solid var(--outline); border-radius: 14px; background: var(--surface); color: var(--primary); display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 600; }
.business-detail { padding-bottom: 24px; }
.business-detail.has-call { padding-bottom: calc(92px + var(--safe-b)); }
.business-cover { position: relative; background: var(--surface-c); }
.business-cover-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.business-cover-strip::-webkit-scrollbar { display: none; }
.business-cover-slide { position: relative; flex: 0 0 100%; height: clamp(180px, 55vw, 300px); overflow: hidden; scroll-snap-align: start; background: var(--surface-c); }
.business-cover-slide img { position: relative; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.business-cover-slide img[hidden] { display: none; }
.business-cover-fallback, .business-cover-placeholder { display: flex; align-items: center; justify-content: center; }
.business-cover-fallback { position: absolute; inset: 0; }
.business-cover-placeholder { min-height: 136px; background: var(--primary-c); }
.business-cover-count { position: absolute; z-index: 2; right: 14px; bottom: 12px; border-radius: 20px; padding: 4px 10px; font-size: 12px; color: white; background: #0009; pointer-events: none; }
.business-detail-content { padding: 18px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.business-identity h2 { margin: 0 0 4px; font-size: 25px; line-height: 1.2; letter-spacing: -.5px; overflow-wrap: anywhere; }
.business-identity .open, .business-identity .closed { margin-top: 5px; display: block; }
.business-identity .closed { color: var(--biz-muted); }
.business-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.business-actions .btn { min-height: 48px; border-radius: 12px; min-width: 0; padding: 10px 12px; font-size: 14px; gap: 6px; }
.business-offer { background: #FFF1D9; color: #6E4B09; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; overflow-wrap: anywhere; }
.business-offer > .ms { font-size: 26px; flex: none; }
.business-offer p { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.business-section { background: var(--surface); padding: 16px; border: 1px solid var(--biz-border); border-radius: 16px; box-shadow: var(--biz-shadow); display: flex; flex-direction: column; gap: 12px; overflow-wrap: anywhere; }
.business-section h3 { margin: 0; font-size: 17px; letter-spacing: -.2px; }
.business-section p, .business-section .info-row { font-size: 14px; line-height: 1.6; }
.business-section .info-row + .info-row { border-top: 1px solid var(--biz-border); padding-top: 12px; }
.business-address-link { color: var(--text); min-height: 44px; align-items: center; }
.business-address-link > span:nth-child(2) { flex: 1; min-width: 0; }
.business-address-link > .ms:last-child { color: var(--primary); }
.business-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.business-socials:empty { display: none; }
.business-socials .btn { min-height: 44px; padding: 8px 12px; font-size: 13px; border-color: var(--biz-border); border-radius: 10px; gap: 6px; }
.business-meta { display: flex; align-items: center; gap: 5px; padding: 0 4px; }
.business-meta .ms { font-size: 17px; }
.business-call-bar { position: fixed; z-index: 15; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; background: var(--surface); border-top: 1px solid var(--biz-border); padding: 12px 16px calc(12px + var(--safe-b)); }
.business-call-bar .btn { min-height: 48px; border-radius: 12px; gap: 8px; }
.directory-page :is(button, a):focus-visible, .business-card :is(button, a):focus-visible, .business-detail-page :is(button, a):focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 359px) {
  .card.business-card { padding: 10px; }
  .business-open { gap: 8px; }
  .business-photo { max-width: 64px; max-height: 72px; }
  .directory-filters .chip { padding-inline: 10px; font-size: 12px; }
}
@media (prefers-color-scheme: dark) {
  .directory-page, .business-detail-page { --biz-border: #303A48; --biz-muted: #B4C0D0; --biz-shadow: none; }
  .business-card { --biz-border: #303A48; }
  .directory-category { background: var(--surface-c) !important; color: var(--text); }
  .directory-category.on { background: var(--primary-c) !important; }
  .business-promo, .business-offer { background: #483713; color: #FFE0A6; }
  .business-tools .fav-on { color: #FFADB8; }
}
@media (prefers-reduced-motion: reduce) {
  .directory-page .spinner { animation: none; }
  .directory-page *, .business-detail-page * { scroll-behavior: auto; }
}
/* END LENSK DIRECTORY REDESIGN */

/* Чат идей */
.idea-page { display: flex; flex-direction: column; height: 100dvh; }
.idea-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 16px 16px; }
.idea-msg { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--surface); }
.idea-msg.mine { align-self: flex-end; background: var(--primary-c); }
.idea-msg p { margin: 2px 0 4px; }
.idea-msg .who { font-size: 12px; font-weight: 700; }
.idea-compose { display: flex; gap: 8px; align-items: flex-end; padding: 8px 16px calc(8px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--outline); }
.idea-compose textarea { flex: 1; min-height: 44px; max-height: 120px; margin: 0; }
.idea-compose .btn { flex: none; }
.idea-compose .btn.block { flex: 1; }