/* ===== Финополис — стили приложения участника ===== */
@font-face { font-family: 'Press Start 2P'; src: url(/fonts/px-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: 'Press Start 2P'; src: url(/fonts/px-lat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(/fonts/manrope-cyr.woff2) format('woff2'); font-weight: 200 800; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(/fonts/manrope-lat.woff2) format('woff2'); font-weight: 200 800; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/jbm-cyr.woff2) format('woff2'); font-weight: 100 800; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/jbm-lat.woff2) format('woff2'); font-weight: 100 800; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; font-display: swap; }

:root {
  --bg: #040c08;
  --bg2: #08170f;
  --card: rgba(14, 34, 24, 0.78);
  --card2: rgba(20, 48, 34, 0.7);
  --line: rgba(94, 245, 150, 0.14);
  --line2: rgba(94, 245, 150, 0.28);
  --neon: #5ef596;
  --neon-dim: #2fbf72;
  --pink: #f6dff0;
  --text: #e8f8ee;
  --muted: #8db7a0;
  --muted2: #5f8a73;
  --up: #34f39a;
  --down: #ff5c6c;
  --warn: #ffc857;
  --r: 18px;
  --px: 'Press Start 2P', 'Courier New', monospace;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--sans); font-size: 15px; line-height: 1.45; color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(47, 191, 114, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(30, 120, 80, 0.18), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(47, 191, 114, 0.14), transparent 60%);
  background-attachment: fixed;
  overscroll-behavior-y: none;
}
body::before { /* «схемотехника» как в фирменном стиле */
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 260px; pointer-events: none; z-index: 0; opacity: .35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='260' fill='none' stroke='%235ef596' stroke-opacity='.35'%3E%3Cpath d='M20 40h90v-30M60 90h120v50M330 20v70h70M300 120h-60v80M390 150v60'/%3E%3Cg fill='%235ef596' fill-opacity='.7' stroke='none'%3E%3Ccircle cx='110' cy='10' r='3.5'/%3E%3Ccircle cx='20' cy='40' r='3.5'/%3E%3Ccircle cx='180' cy='140' r='3.5'/%3E%3Ccircle cx='330' cy='20' r='3.5'/%3E%3Ccircle cx='400' cy='90' r='3.5'/%3E%3Ccircle cx='240' cy='200' r='3.5'/%3E%3Ccircle cx='390' cy='210' r='3.5'/%3E%3C/g%3E%3C/svg%3E") top right / 420px 260px no-repeat;
}
a { color: var(--neon); }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.px { font-family: var(--px); letter-spacing: .02em; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  padding: calc(var(--sat) + 10px) 16px 10px;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(4, 12, 8, .96) 0%, rgba(4, 12, 8, .86) 70%, rgba(4, 12, 8, 0)); 
}
.top .logo { height: 26px; width: auto; display: block; filter: drop-shadow(0 0 10px rgba(94, 245, 150, .45)); }
.top .sp { flex: 1; }
.clock { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: rgba(94, 245, 150, .08); border: 1px solid var(--line); font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .02em; white-space: nowrap; }
.clock small { font-family: var(--sans); font-weight: 700; font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted2); flex: none; }
.dot.live { background: var(--up); box-shadow: 0 0 0 0 rgba(52, 243, 154, .7); animation: pulse 1.8s infinite; }
.dot.poll { background: var(--warn); }
.dot.offline { background: var(--down); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 243, 154, .6); } 70% { box-shadow: 0 0 0 9px rgba(52, 243, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 243, 154, 0); } }
.iconbtn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(94, 245, 150, .06); cursor: pointer; position: relative; flex: none; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn .badge { position: absolute; top: -4px; right: -4px; }

/* ---------- офлайн ---------- */
.offline-bar { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(74px + var(--sab)); max-width: 600px; margin: 0 auto; box-shadow: 0 8px 30px rgba(0,0,0,.5);  background: rgba(60, 14, 20, .92) !important; padding: 9px 12px; border-radius: 12px; background: rgba(255, 92, 108, .12); border: 1px solid rgba(255, 92, 108, .35); color: #ffd0d5; font-size: 13px; display: flex; gap: 8px; align-items: center; }

/* ---------- страницы ---------- */
main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 4px 16px calc(96px + var(--sab)); }
.page { display: none; animation: fadein .25s ease; }
.page.active { display: block; }
@keyframes fadein { from { transform: translateY(6px); } to { transform: none; } }
.h1 { font-family: var(--px); font-size: 17px; line-height: 1.4; margin: 14px 0 14px; color: var(--neon); text-shadow: 0 0 16px rgba(94, 245, 150, .55); text-transform: uppercase; }
.h2 { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 2px 10px; display: flex; align-items: center; justify-content: space-between; }
.h2 a { font-size: 12px; letter-spacing: .04em; text-transform: none; text-decoration: none; font-weight: 700; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px;  }

/* ---------- статус рынка ---------- */
.hero { position: relative; overflow: hidden; padding: 16px 16px 14px; border-color: var(--line2); background: linear-gradient(135deg, rgba(30, 90, 60, .55), rgba(10, 28, 19, .85)); }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(94, 245, 150, .25), transparent 65%); pointer-events: none; }
.hero .status { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.hero .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.hero .cd { font-family: var(--px); font-size: 34px; line-height: 1; color: #fff; text-shadow: 0 0 22px rgba(94, 245, 150, .6); letter-spacing: .02em; }
.hero .cd.soon { color: var(--warn); text-shadow: 0 0 22px rgba(255, 200, 87, .6); }
.hero .cdcap { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.hero .tickno { text-align: right; font-size: 12px; color: var(--muted); }
.hero .tickno b { display: block; font-family: var(--mono); font-size: 18px; color: var(--text); }
.bar { height: 6px; border-radius: 6px; background: rgba(94, 245, 150, .12); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--neon-dim), var(--neon)); border-radius: 6px; transition: width 1s linear; box-shadow: 0 0 12px rgba(94, 245, 150, .6); }
.hero .alert { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 200, 87, .12); border: 1px solid rgba(255, 200, 87, .4); color: #ffe6ad; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---------- бегущая строка ---------- */
.tape { margin: 14px -16px 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(4, 12, 8, .6); white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tape .track { display: inline-block; padding: 9px 0; animation: tape 30s linear infinite; will-change: transform; }
.tape span { display: inline-flex; align-items: center; gap: 6px; margin: 0 16px; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.tape span b { color: var(--text); font-family: var(--sans); font-weight: 800; letter-spacing: .03em; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- активы ---------- */
.assets { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
@media (min-width: 620px) { .assets { grid-template-columns: 1fr 1fr; } }
.asset { display: flex; align-items: stretch; gap: 10px; padding: 12px 12px 12px 14px; cursor: pointer; transition: transform .15s ease, border-color .3s; position: relative; overflow: hidden; text-align: left; width: 100%; }
.asset:active { transform: scale(.985); }
.asset .info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.asset .name { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; letter-spacing: .04em; }
.asset .name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.asset .kind { font-size: 11px; color: var(--muted); margin-top: 1px; }
.asset .price { font-family: var(--mono); font-weight: 800; font-size: 24px; line-height: 1.1; margin-top: 8px; letter-spacing: -.01em; }
.chg { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-weight: 700; font-size: 12.5px; padding: 3px 7px; border-radius: 8px; margin-top: 5px; align-self: flex-start; }
.chg.up { background: rgba(52, 243, 154, .12); }
.chg.down { background: rgba(255, 92, 108, .14); }
.chg.flat { background: rgba(141, 183, 160, .12); color: var(--muted); }
.asset canvas { width: 46%; max-width: 210px; height: 92px; flex: none; display: block; }
.asset.flash-up { animation: flashUp 1.6s ease; }
.asset.flash-down { animation: flashDown 1.6s ease; }
@keyframes flashUp { 0%, 30% { border-color: var(--up); box-shadow: 0 0 0 1px var(--up), 0 0 30px rgba(52, 243, 154, .35); } 100% { box-shadow: none; } }
@keyframes flashDown { 0%, 30% { border-color: var(--down); box-shadow: 0 0 0 1px var(--down), 0 0 30px rgba(255, 92, 108, .35); } 100% { box-shadow: none; } }

/* ---------- новости ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(94, 245, 150, .05); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--neon); color: #03140b; border-color: var(--neon); }
.news { display: flex; flex-direction: column; gap: 12px; }
.ncard { padding: 14px 14px 12px; position: relative; }
.ncard.fresh { border-color: rgba(255, 200, 87, .55); box-shadow: 0 0 0 1px rgba(255, 200, 87, .25), 0 0 32px rgba(255, 200, 87, .12); }
.ncard .nh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ncard .nt { font-family: var(--px); font-size: 11px; color: var(--warn); text-transform: uppercase; line-height: 1.5; }
.ncard.info .nt { color: var(--neon); }
.ncard .time { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.nitem { padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14.5px; }
.nitem:first-of-type { border-top: 0; padding-top: 0; }
.tag { display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; margin-right: 6px; color: #03140b; vertical-align: 1px; }
.tag.all { background: var(--pink); }
.nfoot { margin-top: 8px; font-size: 13px; color: var(--muted); white-space: pre-line; font-style: italic; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; font-size: 14px; }
.empty .px { display: block; color: var(--neon); font-size: 13px; margin-bottom: 10px; }

/* ---------- расписание ---------- */
.now-card { padding: 16px; border-color: var(--line2); background: linear-gradient(135deg, rgba(30, 90, 60, .5), rgba(10, 28, 19, .85)); }
.now-card .lbl { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--neon); text-transform: uppercase; }
.now-card .ttl { font-size: 20px; font-weight: 800; margin-top: 4px; }
.now-card .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.timeline { position: relative; margin-top: 6px; }
.tl { display: grid; grid-template-columns: 64px 1fr; gap: 12px; position: relative; padding: 10px 0; }
.tl::before { content: ''; position: absolute; left: 75px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl .tm { font-family: var(--mono); font-weight: 700; font-size: 14px; text-align: right; padding-top: 12px; }
.tl .tm small { display: block; color: var(--muted2); font-size: 11.5px; font-weight: 500; }
.tl .box { margin-left: 12px; padding: 11px 13px; position: relative; }
.tl .box::before { content: ''; position: absolute; left: -19px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted2); }
.tl .box .t { font-weight: 800; font-size: 15px; }
.tl .box .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tl .kind { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-top: 6px; background: rgba(94, 245, 150, .1); color: var(--neon); }
.tl .kind.break { background: rgba(246, 223, 240, .12); color: var(--pink); }
.tl.past { opacity: .45; }
.tl.past .box::before { background: var(--muted2); }
.tl.now .box { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 0 28px rgba(94, 245, 150, .2); }
.tl.now .box::before { border-color: var(--neon); background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.tl.now .tm { color: var(--neon); }
.tl .prog { height: 4px; border-radius: 4px; background: rgba(94, 245, 150, .15); margin-top: 9px; overflow: hidden; }
.tl .prog i { display: block; height: 100%; background: var(--neon); }

/* ---------- районы ---------- */
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 620px) { .dgrid { grid-template-columns: 1fr 1fr 1fr; } }
.dcard { padding: 14px; position: relative; overflow: hidden; }
.dcard .ic { font-size: 22px; }
.dcard .nm { font-weight: 800; font-size: 14px; margin-top: 6px; line-height: 1.25; }
.dcard .cf { font-family: var(--px); font-size: 22px; margin-top: 12px; color: var(--neon); text-shadow: 0 0 16px rgba(94, 245, 150, .5); }
.dcard .cf small { font-size: 13px; opacity: .7; margin-right: 2px; }
.dcard .delta { font-family: var(--mono); font-size: 12px; font-weight: 700; margin-top: 8px; }
.dcard .nt { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.dcard .meter { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--neon-dim), var(--neon)); }
.dcard.changed { border-color: rgba(255, 200, 87, .5); }

/* ---------- ещё ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px; }
.opt .tx { flex: 1; min-width: 0; }
.opt .tx b { display: block; font-size: 15px; }
.opt .tx span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 14px; border: 0; background: var(--neon); color: #03140b; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; box-shadow: 0 6px 24px rgba(94, 245, 150, .25); }
.btn.ghost { background: rgba(94, 245, 150, .08); color: var(--text); border: 1px solid var(--line2); box-shadow: none; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 30px; background: rgba(141, 183, 160, .25); transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--neon); }
.switch input:checked + span::before { transform: translateX(20px); }
.steps { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin: 6px 0; }
.steps b { color: var(--text); }
.note { font-size: 13px; color: var(--muted); padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line2); }

/* ---------- нижняя панель ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 6px 6px calc(6px + var(--sab));
  background: rgba(5, 14, 10, .92); border-top: 1px solid var(--line); 
}
.tabbar button { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; color: var(--muted2); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer; position: relative; border-radius: 12px; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--neon); }
.tabbar button.on svg { filter: drop-shadow(0 0 6px rgba(94, 245, 150, .7)); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--down); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.tabbar .badge { position: absolute; top: 0; left: 50%; margin-left: 4px; }

@media (min-width: 900px) {
  .tabbar { top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: auto; padding: 10px 8px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px; z-index: 50; }
  .tabbar button { flex-direction: row; gap: 8px; font-size: 13.5px; padding: 8px 14px; max-width: none; }
  .tabbar button svg { width: 20px; height: 20px; }
  .tabbar .badge { position: static; margin: 0; }
  main { padding-bottom: 40px; }
  .offline-bar { bottom: 20px; }
  .top { padding-left: 28px; padding-right: 28px; }
}

/* ---------- шторка ---------- */
.sheet-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-wrap.show { opacity: 1; }
.sheet { width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #0a1a12; border: 1px solid var(--line2); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 10px 16px calc(20px + var(--sab)); transform: translateY(30px); transition: transform .25s ease; }
.sheet-wrap.show .sheet { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--muted2); margin: 2px auto 12px; }
.sheet .sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet .sh h3 { margin: 0; font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sheet canvas { width: 100%; height: 260px; display: block; margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.stats div { background: rgba(94, 245, 150, .06); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.stats small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.stats b { font-family: var(--mono); font-size: 14px; }
@media (min-width: 760px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 24px; border-bottom: 1px solid var(--line2); } }

/* ---------- тосты ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--sat) + 8px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; width: 100%; max-width: 520px; padding: 12px 14px; border-radius: 16px; background: rgba(12, 30, 21, .97); border: 1px solid var(--warn); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(255, 200, 87, .2); animation: toastIn .35s cubic-bezier(.2, 1.4, .4, 1); cursor: pointer; }
.toast.ok { border-color: var(--neon); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(94, 245, 150, .2); }
.toast b { display: block; font-size: 14px; }
.toast span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0; } }

.foot { text-align: center; color: var(--muted2); font-size: 12px; margin-top: 28px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* ---------- карта районов ---------- */
.map { position: relative; margin: 0 -8px; }
.map svg { width: 100%; height: auto; display: block; overflow: visible; }
.map .reg { fill: rgba(94, 245, 150, 0); stroke: rgba(94, 245, 150, 0); stroke-width: 6; cursor: pointer; transition: fill .2s, stroke .2s; -webkit-tap-highlight-color: transparent; }
.map .reg:hover { fill: rgba(94, 245, 150, .12); stroke: rgba(94, 245, 150, .6); }
.map .reg.sel { fill: rgba(94, 245, 150, .2); stroke: #5ef596; stroke-width: 9; filter: drop-shadow(0 0 14px rgba(94, 245, 150, .9)); }
.map .reg.recent { animation: regPulse 1.6s ease-in-out infinite; }
@keyframes regPulse { 50% { fill: rgba(255, 200, 87, .25); stroke: #ffc857; } }
.map .lbl { cursor: pointer; }
.map .lb-bg { fill: rgba(4, 14, 9, .88); stroke: rgba(94, 245, 150, .75); stroke-width: 3; }
.map .lb-bg.recent { stroke: #ffc857; stroke-width: 5; }
.map .lb-num-bg { fill: #5ef596; }
.map .lb-num { fill: #03140b; font: 800 37px var(--sans); text-anchor: middle; }
.map .lb-coef { fill: #eafff2; font: 800 48px var(--mono); text-anchor: middle; }
.map .lb-coef.c2 { font-size: 50px; text-anchor: start; }
.map .lb-coef.up { fill: #34f39a; }
.map .lb-coef.down { fill: #ff5c6c; }
.map .lb-name { fill: #d6f5e2; font: 800 29px var(--sans); text-anchor: middle; }
.map .lbl .lb-coef { dominant-baseline: auto; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(94, 245, 150, .06); border: 1px solid var(--line); margin: 0 0 14px; }
.seg button { flex: 1; padding: 9px 6px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 800; font-size: 13.5px; cursor: pointer; }
.seg button.on { background: var(--neon); color: #03140b; }
.dlist { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.drow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; text-align: left; width: 100%; }
.drow .no { width: 28px; height: 28px; border-radius: 50%; background: var(--neon); color: #03140b; font-weight: 800; display: grid; place-items: center; flex: none; font-size: 13px; }
.drow .nm { flex: 1; min-width: 0; font-weight: 800; }
.drow .nm small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; margin-top: 1px; }
.drow .cf { font-family: var(--px); color: var(--neon); font-size: 15px; text-shadow: 0 0 12px rgba(94, 245, 150, .5); white-space: nowrap; }
.drow.sel { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }
.bgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 620px) { .bgrid { grid-template-columns: repeat(4, 1fr); } }
.bcard { padding: 14px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; }
.bcard .bi { font-size: 30px; line-height: 1; }
.bcard .bn { font-weight: 800; font-size: 13.5px; margin-top: 8px; text-transform: uppercase; letter-spacing: .03em; }
.bcard .bt { font-size: 12px; color: var(--muted); margin-top: 6px; }
.bcard .bb { font-family: var(--px); font-size: 17px; color: var(--neon); margin-top: 8px; text-shadow: 0 0 12px rgba(94, 245, 150, .5); }
.bcard .bm { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line2); font-size: 13px; line-height: 1.55; white-space: pre-line; width: 100%; }
.bcard .bp { margin-top: 6px; font-family: var(--mono); font-weight: 800; font-size: 14px; color: var(--warn); }
.bcard .tender { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: var(--warn); color: #1d1400; }
.loc { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.loc .li { font-size: 26px; width: 40px; text-align: center; flex: none; }
.loc .ln { flex: 1; font-weight: 800; font-size: 15.5px; }
.loc .ln small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.loc .lp { font-family: var(--mono); font-weight: 800; font-size: 14px; color: var(--neon); text-align: right; white-space: nowrap; }
.blt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.blt span { padding: 5px 9px; border-radius: 9px; background: rgba(94, 245, 150, .08); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }

/* ---------- лента станций ---------- */
.av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: #0c2418; border: 1.5px solid var(--line2); display: inline-grid; place-items: center; font-size: 22px; }
.av.sm { width: 22px; height: 22px; font-size: 13px; border-width: 1px; margin: -3px 6px -3px -5px; vertical-align: middle; }
.chip.st { display: inline-flex; align-items: center; }
.post { padding: 13px 14px; }
.post.fresh { border-color: rgba(94, 245, 150, .5); box-shadow: 0 0 26px rgba(94, 245, 150, .12); }
.post .ph { display: flex; align-items: center; gap: 10px; }
.post .pn { flex: 1; min-width: 0; }
.post .pn b { display: block; font-size: 15px; color: var(--neon); }
.post .pn small { display: block; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.post .pin { font-size: 16px; }
.post .pt { margin-top: 10px; font-size: 15px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.post .pt a { color: var(--neon); }
.post .pimg { display: block; width: calc(100% + 28px); max-height: 70vh; object-fit: cover; margin: 12px -14px -13px; border-radius: 0 0 var(--r) var(--r); cursor: zoom-in; background: #0a1a12; }
.post.compact { padding: 10px 12px; background: rgba(20, 48, 34, .6); }
.post.compact .pt { font-size: 13.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post.compact .av { width: 30px; height: 30px; font-size: 16px; }
.pinbox { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.pinlbl { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin: 0 2px; }
.sthead { display: flex; align-items: center; gap: 14px; padding: 10px; margin-bottom: 12px; overflow: hidden; }
.sthead img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; flex: none; }
.sthead .big { width: 92px; height: 92px; border-radius: 14px; display: grid; place-items: center; font-size: 48px; background: #0c2418; flex: none; }
.sthead .tx b { display: block; font-family: var(--px); font-size: 14px; color: var(--neon); line-height: 1.5; text-transform: uppercase; }
.sthead .tx span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.loc { cursor: pointer; }
.loc .li .av { width: 40px; height: 40px; }

/* ---------- тестовый день ---------- */
.test-banner { position: fixed; left: 0; right: 0; top: 0; z-index: 95; padding: calc(var(--sat) + 3px) 10px 3px; text-align: center; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: #1d1400; background: repeating-linear-gradient(-45deg, #ffc857 0 14px, #ffb02e 14px 28px); pointer-events: none; }
html.is-test .top { padding-top: calc(var(--sat) + 30px); }
.test-banner { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* без размытия фона: на недорогих Android оно тормозит прокрутку */
.card, .top, .tabbar, .offline-bar { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.top { background: linear-gradient(180deg, rgba(4, 12, 8, .99) 0%, rgba(4, 12, 8, .95) 75%, rgba(4, 12, 8, 0)); }
.tabbar { background: rgba(5, 14, 10, .98); }
.card { background-color: rgba(12, 30, 21, .94); }
.hero .cd { white-space: nowrap; }
.hero .cd.long { font-size: 26px; }

.chartscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; overscroll-behavior-x: contain; }
.sheet .chartscroll canvas { margin-top: 0; height: 270px; max-width: none; }

/* ---------- пиксельные иконки ---------- */
.pe, .pi { --pe: 16px; display: inline-block; flex: none; vertical-align: -.16em; }
.pe { width: var(--pe); height: var(--pe); background-repeat: no-repeat; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; font-style: normal; }
.pi { width: 20px; height: 20px; vertical-align: -.28em; margin: 0 .25em 0 0; shape-rendering: crispEdges; }
.tabbar button svg, .iconbtn svg { shape-rendering: crispEdges; }
.bcard .bi .pe, .sthead .big .pe { --pe: 48px; }
.loc .li .pe, .av .pe { --pe: 32px; }
.av.sm .pe, .post.compact .av .pe { --pe: 16px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; }
.chartscroll { padding-bottom: 10px; }

/* ---------- фигурки построек на карте ---------- */
.map .fig { cursor: pointer; shape-rendering: crispEdges; }
.map .fig-sh { fill: rgba(2, 20, 10, .35); shape-rendering: auto; }
.map .fig-n { fill: rgba(4, 14, 9, .92); stroke: rgba(94, 245, 150, .75); stroke-width: 2; shape-rendering: auto; }
.map .fig-t { fill: #eafff2; font: 800 27px var(--mono); text-anchor: middle; }
.map image.px { image-rendering: pixelated; }
.map .fig.pop { transform-box: fill-box; transform-origin: 50% 100%; animation: figPop .55s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes figPop { from { transform: scale(0); } 60% { transform: scale(1.18); } to { transform: none; } }
.bf { display: inline-block; vertical-align: middle; shape-rendering: crispEdges; flex: none; }
.blt span { display: inline-flex; align-items: center; gap: 7px; }
