/* Дневник прогнозов — тот же «пульт в космосе», что у команды: тёмно-фиолетовые модули с фасками на звёздном небе,
   розовое — главное действие, светлые клавиши «Да / Нет». Шрифты — свои файлы (./fonts): Tektur — знак, цифры и клавиши;
   IBM Plex Sans — текст. Без сборки. Сначала телефон (375 px), потом всё остальное. */
@font-face { font-family: "Tektur"; font-weight: 600; font-display: swap; src: url(fonts/tektur-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Tektur"; font-weight: 600; font-display: swap; src: url(fonts/tektur-latin-600-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tektur"; font-weight: 700; font-display: swap; src: url(fonts/tektur-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Tektur"; font-weight: 700; font-display: swap; src: url(fonts/tektur-latin-700-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* космос и корпус — как в пульте */
  --space: #0b0716; --panel: #1a1230; --module: #241a3b; --module2: #2d2149; --well: #130c22; --hover: #33264f;
  --bezel: #3a2c5a; --bezel2: #4c3b74; --edge: #0e0919;
  --text: #f3ecff; --text2: #dcd1f2; --muted: #b6a6d6; --faint: #9e8dc4;
  --pink: #ff5fb4; --pink-hi: #ff8ccb; --pink-soft: #ffb3dc; --pink-ink: #2a0a1e; --pink-edge: #b23c7e; --pink-bg: rgba(255, 95, 180, .14);
  --green: #3ddc9c; --green-bg: rgba(61, 220, 156, .13);
  --amber: #ffc25c; --amber-bg: rgba(255, 194, 92, .13);
  --red: #ff6b7d; --red-bg: rgba(255, 107, 125, .13);
  --cap: #ede4fb; --cap-ink: #1b1132; --cap-sub: #4e3f72; --cap-edge: #8f7bb8;
  --f-display: "Tektur", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mod-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 2px 0 var(--edge), 0 10px 24px rgba(5, 2, 14, .45);
  --well-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(255, 255, 255, .04);
  /* края: вырезы экрана и (Telegram 8+) его собственные отступы */
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --gut-l: max(16px, env(safe-area-inset-left, 0px)); --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --tabbar: 0px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--space); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lock, html.lock body { overflow: hidden; }
body { margin: 0; min-height: 100vh; color: var(--text); background: transparent; font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; -webkit-tap-highlight-color: transparent; }

/* космос: звёзды и туманность — слой позади всего, не двигается при прокрутке; редкие яркие звёзды мерцают */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(1px 1px at 23px 41px, rgba(255, 255, 255, .85), transparent 70%),
    radial-gradient(1px 1px at 141px 97px, rgba(255, 255, 255, .6), transparent 70%),
    radial-gradient(1.5px 1.5px at 87px 163px, rgba(255, 220, 245, .8), transparent 70%),
    radial-gradient(1px 1px at 199px 21px, rgba(220, 210, 255, .7), transparent 70%),
    radial-gradient(1px 1px at 61px 223px, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(1px 1px at 251px 151px, rgba(255, 255, 255, .5), transparent 70%),
    radial-gradient(1.5px 1.5px at 311px 263px, rgba(210, 200, 255, .75), transparent 70%),
    radial-gradient(1px 1px at 173px 297px, rgba(255, 255, 255, .45), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 0%, rgba(124, 38, 160, .32), transparent 70%),
    radial-gradient(ellipse 50% 36% at 8% 12%, rgba(124, 58, 237, .22), transparent 70%),
    radial-gradient(ellipse 70% 45% at 55% 104%, rgba(91, 33, 182, .30), transparent 72%),
    var(--space);
  background-size: 337px 331px, 337px 331px, 337px 331px, 337px 331px, 337px 331px, 337px 331px, 337px 331px, 337px 331px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}
body::after {
  background:
    radial-gradient(2px 2px at 57px 77px, rgba(255, 255, 255, .95), transparent 70%),
    radial-gradient(1.5px 1.5px at 233px 193px, rgba(255, 190, 235, .9), transparent 70%),
    radial-gradient(2px 2px at 401px 37px, rgba(225, 215, 255, .9), transparent 70%),
    radial-gradient(1.5px 1.5px at 151px 389px, rgba(255, 255, 255, .85), transparent 70%);
  background-size: 467px 449px; animation: twinkle 5.5s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

a { color: var(--pink-hi); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 2px solid var(--pink-hi); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.offscreen { position: fixed; top: -1000px; left: 0; font-size: 16px; opacity: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .text2 { color: var(--text2); }
.small { font-size: 13px; } .xs { font-size: 11.5px; }
.err { color: var(--red); font-size: 13.5px; font-weight: 500; }
.err:empty { display: none; }
.hint { color: var(--faint); font-size: 12.5px; text-align: center; margin-top: -6px; }
.fine { color: var(--faint); font-size: 11.5px; line-height: 1.45; text-align: center; }
.ic { display: block; flex: none; }

/* ---------- раскладка ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 var(--gut-r) calc(28px + var(--tabbar)) var(--gut-l); display: flex; flex-direction: column; gap: 12px; }
.hd { display: flex; align-items: center; gap: 8px 10px; padding: 18px 0 2px; min-height: 58px; flex-wrap: wrap; }
.hd.col { flex-direction: column; align-items: flex-start; gap: 2px; }
.hd-t { display: flex; flex-direction: column; gap: 0; }
.ttl { font: 700 22px/1.15 var(--f-display); letter-spacing: .02em; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--pink); box-shadow: 0 0 10px 2px rgba(255, 95, 180, .67); }
.brand-name { font: 700 20px/1.15 var(--f-display); letter-spacing: .04em; }
.streak { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hd.feed-hd { flex-wrap: nowrap; }
.feed-hd .hd-t, .feed-hd .brand { min-width: 0; }
.feed-hd .hd-t { gap: 1px; }
.feed-hd .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-hd .streak { padding-left: 22px; }
@media (max-width: 359px) { .feed-hd .brand-name { font-size: 18px; letter-spacing: .03em; } }
.banner { padding: 6px 16px; font-size: 12.5px; font-weight: 600; text-align: center; background: #3a2a07; color: #ffd27a; border-bottom: 1px solid rgba(255, 194, 92, .25); }
.sec-h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-title { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text2); margin: 6px 0 8px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(255, 194, 92, .3); white-space: nowrap; }

/* модуль: корпус с фаской; «колодец» — утопленная область */
.card { background: var(--module); border: 1px solid var(--bezel); border-radius: 18px; padding: 14px; box-shadow: var(--mod-shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.note { border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.note.bad { background: var(--red-bg); border: 1px solid rgba(255, 107, 125, .35); color: #ffd0d6; }

/* ---------- кнопки ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--bezel2); background: var(--module2); color: var(--text); font: 600 14.5px/1.2 var(--f-body); text-align: center; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 var(--edge), inset 0 1px 0 rgba(255, 255, 255, .07); transition: transform .07s ease-out, box-shadow .07s ease-out, background-color .12s; }
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge), inset 0 1px 0 rgba(255, 255, 255, .05); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); font-weight: 600;
  box-shadow: 0 3px 0 var(--pink-edge), 0 0 14px rgba(255, 95, 180, .25), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary:active:not([aria-disabled="true"]) { box-shadow: 0 1px 0 var(--pink-edge), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.cta { display: flex; width: 100%; min-height: 54px; border-radius: 16px; background: var(--pink); border-color: var(--pink); color: var(--pink-ink); font-size: 16px; font-weight: 600;
  box-shadow: 0 6px 0 var(--pink-edge), 0 10px 26px rgba(255, 95, 180, .33), inset 0 1px 0 rgba(255, 255, 255, .35); margin-bottom: 6px; }
.btn.cta:active:not([aria-disabled="true"]) { transform: translateY(4px); box-shadow: 0 2px 0 var(--pink-edge), 0 6px 16px rgba(255, 95, 180, .25); }
.btn.primary:focus-visible, .btn.cta:focus-visible { outline-color: var(--text); }
.btn.ghost { background: var(--well); border-color: var(--bezel); box-shadow: var(--well-shadow); color: var(--text2); }
.btn.mine { background: var(--well); border-color: rgba(61, 220, 156, .45); color: var(--text); box-shadow: var(--well-shadow); }
.btn.mine::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--green); box-shadow: 0 0 6px var(--green); }
.btn.small { min-height: 40px; padding: 7px 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn[aria-busy="true"] { cursor: progress; opacity: .8; }
.tlink { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 6px; border: 0; background: none; color: var(--pink-hi);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--bezel); color: var(--text2); cursor: pointer; padding: 0; }
.star { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 46px; min-height: 44px; padding: 0; border-radius: 12px; cursor: pointer;
  background: var(--well); border: 1px solid var(--bezel); color: var(--faint); box-shadow: var(--well-shadow); transition: color .12s, border-color .12s; }
.star[aria-pressed="true"] { color: var(--amber); border-color: rgba(255, 194, 92, .5); }
.star[aria-pressed="true"] .ic-star { fill: currentColor; filter: drop-shadow(0 0 5px rgba(255, 194, 92, .55)); }
.star[aria-busy="true"] { opacity: .75; }
@media (hover: hover) {
  .btn:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--hover); }
  .btn.primary:hover:not([aria-disabled="true"]), .btn.cta:hover:not([aria-disabled="true"]) { background: var(--pink-hi); }
  .btn.ghost:hover, .btn.mine:hover { background: var(--panel); }
  .iconbtn:hover, .star:hover { border-color: var(--bezel2); color: var(--text); }
  .star[aria-pressed="true"]:hover { color: var(--amber); }
  .tlink:hover { text-decoration: underline; text-underline-offset: 3px; }
  .pill:hover:not(:disabled):not([aria-selected="true"]):not([aria-pressed="true"]) { border-color: var(--pink-edge); color: var(--text); }
  .pi:hover, .wrow:hover { border-color: var(--bezel2); }
  .mc-h a:hover { color: var(--pink-soft); }
}

/* таблетки: вкладки ленты и темы; видимая высота 36, место для пальца — 44 */
.tabs, .chips { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 2px; margin: 0 -2px; }
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.chips { margin-top: -4px; }
.pill { position: relative; flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bezel2); background: var(--panel); color: var(--text2);
  font: 500 13.5px/1.2 var(--f-body); cursor: pointer; white-space: nowrap; }
.pill::after { content: ""; position: absolute; inset: -4px 0; }
.tabs .pill { flex: 1 0 auto; padding: 0 10px; font-size: 13px; }
.pill[aria-selected="true"] { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); font-weight: 600; }
.pill.sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.pill.sm::after { inset: -6px 0; }
.pill.sm[aria-pressed="true"] { background: var(--pink-bg); border-color: var(--pink); color: var(--pink-soft); font-weight: 600; }
.pill:disabled { cursor: default; opacity: .6; }

/* ---------- лента ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.mc { background: var(--module); border: 1px solid var(--bezel); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 22px rgba(5, 2, 14, .53); min-width: 0; }
.mc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); min-height: 22px; }
.tchip { padding: 2px 9px; border-radius: 999px; background: var(--well); border: 1px solid var(--bezel); color: var(--text2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ready { display: inline-flex; align-items: center; gap: 6px; color: var(--green); white-space: nowrap; }
.rdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.mc-h { font-size: 16.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.mc-h a { color: var(--text); text-decoration: none; }
.mc-price, .price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.pct { font: 700 26px/1 var(--f-display); color: var(--pink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pct.big { font-size: 34px; }
.q { display: flex; flex-direction: column; flex: 0 1 auto; font-size: 12.5px; line-height: 1.3; color: var(--muted); min-width: 0; }
.mv { margin-left: auto; font-size: 13px; font-weight: 600; text-align: right; line-height: 1.25; white-space: nowrap; }
.mv.up { color: var(--green); } .mv.down { color: var(--red); } .mv.flat { color: var(--faint); font-weight: 500; }
.mc-act { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 8px; }
.mc-act .btn { padding: 8px 6px; font-size: 14px; }
.empty { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 18px 2px; color: var(--text2); }
.empty.card { padding: 18px 16px; }
.empty.big { align-items: center; text-align: center; padding: 26px 18px; }
.empty .row2 { width: 100%; }
.fx { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--well); color: var(--pink-hi); box-shadow: var(--well-shadow); }

/* заготовка карточки, пока лента едет */
.skels { display: flex; flex-direction: column; gap: 12px; }
.skel { gap: 12px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--module2) 0%, var(--hover) 50%, var(--module2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel .s1 { width: 40%; } .skel .s2 { width: 92%; height: 16px; } .skel .s3 { width: 64%; height: 26px; } .skel .s4 { width: 100%; height: 44px; border-radius: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- событие ---------- */
.ev { padding-bottom: 0; }
.ev-top { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.ev-meta { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ev-h { font-size: 20px; font-weight: 600; line-height: 1.28; overflow-wrap: anywhere; }
.price-card { gap: 8px; }
.spark { display: block; width: 100%; height: 76px; margin-top: 4px; }
.spark-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--faint); }
.mine-strip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel); font-size: 13.5px; }
.rules-card { background: var(--panel); }
.rules { white-space: pre-line; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.5; color: var(--text2); }
.rules.clamp { max-height: 7.6em; overflow: hidden; position: relative; }
.rules.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.6em; background: linear-gradient(rgba(26, 18, 48, 0), var(--panel)); }
.rules-card .tlink { align-self: flex-start; padding-left: 0; margin: -6px 0 -8px; }
.src { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ext { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; min-height: 32px; }
.bd { background: var(--panel); border-color: var(--bezel2); }
.bd-h { display: flex; align-items: center; gap: 8px; }
.bd p { font-size: 13.5px; line-height: 1.5; color: var(--text2); overflow-wrap: anywhere; }
.bd p b { color: var(--text); font-weight: 600; }
.bd-empty p.muted { color: var(--muted); }
.lamp { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #3b2f58; box-shadow: 0 0 0 1px var(--bezel2); }
.lamp.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.ev-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; margin: 2px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut-l));
  padding: 18px var(--gut-r) calc(12px + var(--safe-b)) var(--gut-l); background: linear-gradient(rgba(11, 7, 22, 0), var(--space) 26%); }

/* ---------- шторка «Мой прогноз» ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.scrim { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: rgba(6, 3, 14, .8); cursor: default; }
.scrim.anim { animation: fade .2s ease-out both; }
.sheet { position: relative; width: 100%; max-width: 560px; margin: 0 auto; max-height: calc(100% - 28px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border-top: 1px solid var(--bezel2); border-radius: 26px 26px 0 0; box-shadow: 0 -18px 40px #05020e;
  padding: 10px var(--gut-r) calc(20px + var(--safe-b)) var(--gut-l); display: flex; flex-direction: column; gap: 14px; }
.sheet.anim { animation: up .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.grab { align-self: center; width: 44px; height: 5px; border-radius: 5px; background: var(--bezel2); flex: none; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: -4px; }
.sh-h { font: 700 22px/1.2 var(--f-display); }
.ctx { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: -8px; overflow-wrap: anywhere; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 6px; }
.kc { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 80px; padding: 20px 8px 12px; border-radius: 16px;
  border: 2px solid transparent; background: var(--module2); color: var(--text2); font: 700 22px/1 var(--f-display); letter-spacing: .03em; cursor: pointer;
  box-shadow: 0 6px 0 var(--well), inset 0 1px 0 rgba(255, 255, 255, .07); transition: transform .07s ease-out, box-shadow .07s ease-out, background-color .12s; }
.kc::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; margin-left: -20px; height: 5px; border-radius: 3px; background: var(--bezel2); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .3); }
.kc small { font: 500 12px/1.2 var(--f-body); letter-spacing: 0; color: var(--muted); }
.kc.yes { --lens: var(--green); --glow: rgba(61, 220, 156, .35); } .kc.no { --lens: var(--amber); --glow: rgba(255, 194, 92, .35); }
.kc[aria-pressed="true"] { background: var(--cap); color: var(--cap-ink); border-color: var(--lens); box-shadow: 0 6px 0 var(--cap-edge), 0 0 18px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .7); }
.kc[aria-pressed="true"] small { color: var(--cap-sub); }
.kc[aria-pressed="true"]::before { background: var(--lens); box-shadow: 0 0 10px 1px var(--lens); }
.kc:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--well), inset 0 3px 6px rgba(0, 0, 0, .25); }
.kc[aria-pressed="true"]:active { box-shadow: 0 1px 0 var(--cap-edge), 0 0 18px var(--glow), inset 0 3px 6px rgba(0, 0, 0, .2); }
.conf, .note-f { display: flex; flex-direction: column; gap: 6px; }
.conf-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.flabel { font-size: 14px; font-weight: 600; color: var(--text); padding: 0; }
.confv { font: 700 18px/1 var(--f-display); color: var(--pink-soft); font-variant-numeric: tabular-nums; }
.cnt { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 36px; margin: 0; accent-color: var(--pink); background: transparent; cursor: pointer; }
.scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: -4px; }
textarea, input[type="text"], input[type="search"] { width: 100%; background: var(--well); border: 1px solid var(--bezel2); border-radius: 12px; color: var(--text); padding: 10px 12px;
  font: 16px/1.4 var(--f-body); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45); outline: none; }
input[type="search"] { -webkit-appearance: none; appearance: none; min-height: 44px; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
textarea { resize: vertical; min-height: 64px; }
textarea::placeholder, input::placeholder { color: var(--faint); }
textarea:focus, input[type="text"]:focus, input[type="search"]:focus { border-color: var(--pink); }
textarea:focus-visible, input[type="text"]:focus-visible, input[type="search"]:focus-visible { outline: 2px solid var(--pink-hi); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--red); }
.okstrip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #10261d; border: 1px solid #2c6e52; font-size: 13.5px; color: #c8f5e2; line-height: 1.4; }
.okstrip .ic { color: var(--green); margin-top: 1px; }
.pitch { font-size: 14.5px; line-height: 1.5; color: var(--text2); }
.sh-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: -4px; }

/* ---------- дневник ---------- */
.seg { display: inline-flex; background: var(--well); border: 1px solid var(--bezel); border-radius: 12px; padding: 3px; gap: 2px; box-shadow: var(--well-shadow); }
.seg button { position: relative; min-height: 36px; padding: 0 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 500 12.5px/1 var(--f-body); cursor: pointer; }
.seg button::after { content: ""; position: absolute; inset: -4px 0; }
.seg button[aria-pressed="true"] { background: var(--module2); color: var(--text); font-weight: 600; box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 rgba(255, 255, 255, .08); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--module); border: 1px solid var(--bezel); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--mod-shadow); min-width: 0; }
.tl { font-size: 12px; color: var(--muted); }
.tv { font: 700 24px/1.2 var(--f-display); color: var(--text2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tv.pink { color: var(--pink-soft); } .tv.pos { color: var(--green); } .tv.neg { color: var(--red); } .tv.amber { color: var(--amber); }
.ts { font-size: 11.5px; color: var(--faint); line-height: 1.35; }
.cal-card { background: var(--panel); }
.cal { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cal li { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.cv { font-size: 11.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.cbox { position: relative; width: 100%; height: 84px; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 1px solid var(--bezel); }
.cbar { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--pink-hi), var(--pink-edge)); box-shadow: 0 0 10px rgba(255, 95, 180, .25); }
.ideal { position: absolute; left: -3px; right: -3px; height: 0; border-top: 1px dashed var(--muted); z-index: 1; }
.cr { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.cn { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.cal li.nil .cbar { background: var(--bezel); box-shadow: none; }
.cal li.nil .cv, .cal li.nil .cr, .cal li.nil .cn { opacity: .6; }
.cal-note { font-size: 13px; color: var(--text2); line-height: 1.45; }
.bt { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bt li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(196, 170, 255, .12); font-size: 13.5px; }
.bt li:first-child { border-top: 0; }
.bt b { font-family: var(--f-display); color: var(--pink-soft); min-width: 44px; text-align: right; }
.pl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pi { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel); color: var(--text); text-decoration: none; }
.pi-b { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.pi-t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-s { font-size: 11.5px; color: var(--faint); }
.pi-st { font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: currentColor; box-shadow: 0 0 6px currentColor; }
.s-open { color: var(--amber); } .s-won { color: var(--green); } .s-lost { color: var(--red); } .s-void { color: var(--faint); }
.dot.s-void { box-shadow: none; }

/* ---------- чат и «Ещё» ---------- */
.soon { gap: 12px; }
.soon .tag { align-self: flex-start; }
.soon p { color: var(--text2); font-size: 14.5px; line-height: 1.45; }
.ex { display: flex; flex-wrap: wrap; gap: 8px; }
.ex .pill { white-space: normal; text-align: left; padding: 7px 12px; line-height: 1.3; }
.wl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wrow { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border-radius: 12px; background: var(--well); border: 1px solid var(--bezel); color: var(--text); text-decoration: none; font-size: 13.5px; }
.wstar { color: var(--amber); display: inline-flex; }
.wstar .ic { fill: currentColor; }
.wt { flex: 1 1 auto; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }
.wr { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: none; max-width: 42%; text-align: right; font-size: 12px; }
.wp { font: 700 15px/1.1 var(--f-display); color: var(--pink-soft); }
.wr .mv { font-size: 11.5px; }
.calc { background: var(--panel); border-color: var(--bezel2); }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.fld input { font-weight: 600; min-height: 44px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.obx { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; border-radius: 12px; background: var(--well); box-shadow: var(--well-shadow); min-width: 0; }
.ov { font: 700 17px/1.2 var(--f-display); color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ov.pos { color: var(--green); } .ov.pink { color: var(--pink-soft); } .ov.neg { color: var(--red); }
.calc-out { text-align: center; } .calc-out .obx { padding: 11px 6px; }
.ol { font-size: 11px; color: var(--faint); line-height: 1.25; }
.calc-l { font-size: 12.5px; color: var(--text2); line-height: 1.45; }
.calc-l:empty { display: none; }
.warn { font-size: 12.5px; color: var(--amber); line-height: 1.45; }
.prefs { padding: 0; gap: 0; }
.prefs summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; cursor: pointer; list-style: none; border-radius: 18px; }
.prefs summary::-webkit-details-marker { display: none; }
.prefs summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 2px; transition: transform .15s; flex: none; }
.prefs[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.prefs-b { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 14px; }
.prefs-b .flabel { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.prefs-b .btn { align-self: flex-start; }
.linkrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel);
  color: var(--text); font-size: 14px; text-align: left; }
.linkrow:disabled { cursor: default; opacity: .75; }

/* ---------- вход ---------- */
.ob { min-height: 100vh; padding-top: 18px; padding-bottom: calc(20px + var(--safe-b)); gap: 16px; }
.obp { display: flex; gap: 6px; }
.obp span { flex: 1; height: 4px; border-radius: 4px; background: var(--bezel); }
.obp span.on { background: var(--pink); box-shadow: 0 0 8px rgba(255, 95, 180, .45); }
.eyebrow { font-size: 12px; color: var(--faint); letter-spacing: .06em; margin-top: -6px; }
.ob-body { display: flex; flex-direction: column; gap: 16px; flex: 1 0 auto; padding-top: 10px; }
.ob-h { font: 700 28px/1.15 var(--f-display); }
.lead { font-size: 15.5px; line-height: 1.5; color: var(--text2); }
.feats, .rules-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feats li, .rules-list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.4; color: var(--text2); }
.fx-pct { width: auto; padding: 0 8px; font: 700 15px/1 var(--f-display); color: var(--pink-soft); min-width: 44px; }
.rb { display: inline-grid; place-items: center; flex: none; min-width: 44px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--amber-bg); color: var(--amber);
  border: 1px solid rgba(255, 194, 92, .3); font: 700 14px/1 var(--f-display); }
.consent { gap: 4px; background: var(--panel); }
.consent legend { float: left; width: 100%; margin-bottom: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.ck-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; min-height: 44px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.ck-row input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--pink); cursor: pointer; }
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topt { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel);
  font-weight: 600; font-size: 14px; line-height: 1.25; cursor: pointer; min-width: 0; transition: background-color .12s, border-color .12s; }
.topt.on { background: #2d1a3f; border-color: var(--pink); }
.topt input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--pink); cursor: pointer; }
.topt span { min-width: 0; overflow-wrap: anywhere; }
.card.sws { gap: 2px; background: var(--panel); }
.card > .btn.small { align-self: flex-start; }
.sw-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; font-size: 14px; line-height: 1.35; cursor: pointer; }
.sw-in { position: absolute; left: 0; top: 50%; width: 46px; height: 28px; margin: -14px 0 0; opacity: 0; cursor: pointer; }
.sw { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--well); border: 1px solid var(--bezel2); box-shadow: var(--well-shadow); transition: background-color .15s, border-color .15s; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--faint); transition: transform .15s, background-color .15s; }
.sw-in:checked + .sw { background: rgba(255, 95, 180, .25); border-color: var(--pink-edge); }
.sw-in:checked + .sw::after { transform: translateX(18px); background: var(--pink); box-shadow: 0 0 8px rgba(255, 95, 180, .6); }
.sw-in:focus-visible + .sw { outline: 2px solid var(--pink-hi); outline-offset: 3px; }
.sw-l { min-width: 0; }
.ob-foot { display: flex; gap: 10px; align-items: stretch; position: sticky; bottom: 0; padding: 14px 0 calc(6px + var(--safe-b)); margin-bottom: calc(-1 * var(--safe-b));
  background: linear-gradient(rgba(11, 7, 22, 0), var(--space) 30%); }
.ob-foot .btn { min-height: 52px; border-radius: 16px; }
.ob-foot .btn.cta { margin-bottom: 6px; }
.ob-foot .btn.ghost { flex: none; padding: 10px 18px; }

/* ---------- экраны входа и ошибок ---------- */
.center { max-width: 440px; margin: 0 auto; padding: 14vh var(--gut-r) 40px var(--gut-l); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.c-h { font: 700 24px/1.2 var(--f-display); }
.center p { color: var(--text2); }
.devbox { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 14px; border-radius: 16px; border: 1px dashed var(--bezel2); background: var(--well); width: 100%; }
.boot { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.boot .brand-dot { width: 14px; height: 14px; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- нижняя панель разделов ---------- */
.tabbar { display: flex; gap: 4px; max-width: 560px; margin: 0 auto; padding: 10px var(--gut-r) 0 var(--gut-l); }
.tb { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; color: var(--muted);
  font-size: 14px; font-weight: 600; text-decoration: none; }
.tb[aria-current="page"], .tb[aria-current="true"] { color: var(--pink-hi); background: var(--module2); box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 rgba(255, 255, 255, .06); }
.tb span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .tb:hover { color: var(--text); } }
@media (max-width: 760px) {
  :root { --tabbar: calc(62px + var(--safe-b)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: none; height: var(--tabbar); gap: 0; margin: 0;
    padding: 6px max(6px, env(safe-area-inset-left, 0px)) var(--safe-b) max(6px, env(safe-area-inset-right, 0px));
    background: var(--panel); border-top: 1px solid var(--bezel); box-shadow: 0 -8px 20px rgba(5, 2, 14, .45); }
  .tb { flex-direction: column; gap: 3px; min-height: 50px; font-size: 11.5px; }
  .tb[aria-current="page"], .tb[aria-current="true"] { background: transparent; box-shadow: none; }
  /* пять вкладок (owner и team): на 320–360 px подпись чуть мельче, иконка та же */
  .tabbar.t5 { padding-left: max(2px, env(safe-area-inset-left, 0px)); padding-right: max(2px, env(safe-area-inset-right, 0px)); }
  .tabbar.t5 .tb { font-size: 11px; letter-spacing: -.01em; }
}
@media (max-width: 359px) { .tabbar.t5 .tb { font-size: 10.5px; letter-spacing: -.02em; } }

/* ---------- «Команда» (owner и team, TEAM.md) ---------- */
.aslead { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 8px; padding: 4px 16px; font-size: 13px; font-weight: 600; text-align: center;
  background: #2d1a3f; color: var(--pink-soft); border-bottom: 1px solid rgba(255, 95, 180, .3); }
.aslead-b { min-height: 36px; padding: 4px 12px; border: 1px solid var(--pink-edge); border-radius: 10px; background: var(--pink-bg); color: var(--text); font: 600 13px/1.2 var(--f-body); cursor: pointer; }
.role { font-size: 12.5px; color: var(--muted); }
.trange { margin-top: -4px; }
.th { align-items: flex-start; }
.th-t { display: flex; flex-direction: column; gap: 2px; padding-top: 9px; }
.th .ttl { overflow-wrap: anywhere; }
.fun, .bars, .ppl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fun li, .bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.fl { min-width: 0; overflow-wrap: anywhere; color: var(--text2); }
.fv { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fv b, b.fv { font: 700 15px/1.1 var(--f-display); color: var(--text); }
b.fv { font-size: 13px; }
.ftrack { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: var(--well); box-shadow: var(--well-shadow); overflow: hidden; }
.fbar { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--pink-edge), var(--pink-hi)); }
.fsub { grid-column: 1 / -1; font-size: 11.5px; color: var(--faint); line-height: 1.35; }
.fside { font-size: 12.5px; color: var(--muted); line-height: 1.45; padding-top: 10px; border-top: 1px solid rgba(196, 170, 255, .12); }
.fside b { color: var(--text); font-weight: 600; }
.nolabel { font-style: italic; color: var(--muted); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1 1 auto; min-width: 0; padding: 4px 6px; line-height: 1.15; }
.daily { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dbars { display: flex; align-items: flex-end; gap: 3px; height: 64px; border-bottom: 1px solid var(--bezel); }
.dcol { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.dbar { display: block; width: 100%; border-radius: 3px 3px 1px 1px; background: linear-gradient(var(--pink-hi), var(--pink-edge)); }
.dbar.nil { background: var(--bezel); }
.dcol:last-child .dbar:not(.nil) { box-shadow: 0 0 8px rgba(255, 95, 180, .45); }
.dfoot { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--faint); }
.lnk { padding: 10px 12px; border-radius: 12px; background: var(--well); border: 1px solid var(--bezel); box-shadow: var(--well-shadow); font-size: 13.5px; font-weight: 500;
  color: var(--pink-soft); overflow-wrap: anywhere; word-break: break-all; -webkit-user-select: all; user-select: all; }
.note-i { padding: 10px 12px; border-radius: 12px; background: var(--amber-bg); border: 1px solid rgba(255, 194, 92, .3); color: #ffe2ad; font-size: 13.5px; line-height: 1.45; }
.tnav { display: flex; flex-direction: column; gap: 6px; }
a.linkrow { cursor: pointer; text-decoration: none; }
a.linkrow::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
.lfilters { display: flex; flex-direction: column; gap: 8px; }
.lfilters .chips { margin-top: 0; }
.lrow { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel); color: var(--text); text-decoration: none; }
.lr-b { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 1px; }
.lr-n { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-n .faint { font-weight: 400; }
.lr-s { font-size: 11.5px; color: var(--faint); line-height: 1.35; overflow-wrap: anywhere; }
.lr-t { flex: none; max-width: 34%; text-align: right; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.wcol { display: flex; flex-direction: column; gap: 2px; }
.pi-note { font-size: 12px; color: var(--text2); font-style: italic; overflow-wrap: anywhere; }
.lg { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 12px; background: var(--well); border: 1px solid var(--bezel); font-size: 13.5px; }
.lg-b { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lg-t { flex: none; max-width: 38%; text-align: right; font-size: 11.5px; color: var(--muted); }
.kv { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag.team { background: var(--pink-bg); color: var(--pink-soft); border-color: rgba(255, 95, 180, .35); }
.prow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding-top: 12px; border-top: 1px solid rgba(196, 170, 255, .12); }
.ppl li:first-child { padding-top: 0; border-top: 0; }
.pr-b { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.pr-n { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.prow > .btn { flex: none; }
.prow > .cfm { flex: 1 1 100%; }
.hrow { display: flex; flex-direction: column; gap: 6px; }
.hrow .btn { align-self: flex-end; }
.cfm { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel2); box-shadow: var(--well-shadow); }
.cfm-q { font-size: 13.5px; line-height: 1.45; color: var(--text); }
.cfm.bad { background: var(--red-bg); border-color: rgba(255, 107, 125, .35); box-shadow: none; }
.cfm.bad .cfm-q { color: #ffd0d6; }
.btn.danger { background: var(--well); border-color: rgba(255, 107, 125, .55); color: #ffb3bd; box-shadow: var(--well-shadow); }
.cfm .btn.danger { background: var(--red); border-color: var(--red); color: #2a0710; box-shadow: 0 3px 0 #a3364a, inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.danger:focus-visible { outline-color: var(--text); }
.inv { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: #10261d; border: 1px solid #2c6e52; }
.inv-h { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #c8f5e2; }
.inv-h .ic { color: var(--green); }
.inv .tlink { align-self: flex-start; padding-left: 0; }
.inv > .btn { align-self: flex-start; }
.ev-own { background: var(--panel); }
.ev-own > .btn { align-self: flex-start; }
@media (hover: hover) {
  .lrow:hover { border-color: var(--bezel2); }
  a.linkrow:hover { border-color: var(--bezel2); }
  .btn.danger:hover:not([aria-disabled="true"]) { background: var(--red-bg); }
  .cfm .btn.danger:hover { background: #ff8a98; }
  .aslead-b:hover { background: rgba(255, 95, 180, .25); }
}

/* ---------- всплывашка ---------- */
.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 70; width: max-content; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px; background: var(--module2); border: 1px solid var(--bezel2); color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.35; text-align: center;
  box-shadow: 0 10px 24px rgba(5, 2, 14, .55); animation: drop .25s ease-out both; pointer-events: none; }
.toast.ok { border-color: rgba(61, 220, 156, .55); }
.toast.bad { border-color: rgba(255, 107, 125, .6); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* узкие телефоны */
@media (max-width: 359px) {
  .prefs-b { padding: 0 10px 14px; } .prefs-b .topt { padding: 10px 8px; gap: 8px; }
  .pct { font-size: 23px; } .pct.big { font-size: 30px; }
  .tv { font-size: 21px; }
  .ob-h { font-size: 25px; }
  .mc-act { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 6px; }
}

/* меньше движения — по настройке системы */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  body::after { opacity: .7; }
  .skel i { background: var(--module2); }
}

/* подпись темы при входе и в настройках («CS, Dota, LoL», «погода, твиты, курьёзы») */
.topt .tt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.topt .tsub { font-size: 11.5px; font-weight: 400; color: var(--muted); }

.topt span { hyphens: auto; }

/* ---------- подсказки «?» (TOUR.md, раздел 2): видно — 20 px, место для пальца — 32 px ---------- */
.qb { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; margin: -6px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; vertical-align: middle; }
.qb-i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--bezel2); background: var(--well);
  font: 700 11.5px/1 var(--f-display); color: var(--muted); transition: color .12s, border-color .12s, background-color .12s; }
.qb[aria-expanded="true"] .qb-i { background: var(--pink-bg); border-color: var(--pink); color: var(--pink-soft); }
.qb:focus-visible { outline-offset: -3px; }
.qb.inl { margin: -10px -6px -10px -4px; }
.qh, .qlab { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qlab { display: inline-flex; }
.qq { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.mvq { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.mvq .mv { margin-left: 0; }
.qrow { display: flex; align-items: center; gap: 2px; min-width: 0; }
.qrow > .btn { flex: 1 1 auto; min-width: 0; padding-left: 10px; padding-right: 10px; }
.qrow > .qb { margin: 0 -6px 0 0; }
.qrow > .btn.cta { margin-bottom: 6px; }
.qrow > .btn.cta + .qb { margin-top: -6px; }
@media (max-width: 359px) { .qrow > .btn { padding-left: 6px; padding-right: 6px; font-size: 13.5px; } .qrow > .btn.cta { font-size: 15px; }
  /* «Ты: Нет · 99%» и «Спросить ИИ» — в одну строку, кнопки одной высоты */
  .row2 > .qrow > .btn { padding-left: 4px; padding-right: 4px; font-size: 13px; white-space: nowrap; } }
.spark-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; margin-top: 2px; font-size: 11.5px; color: var(--faint); }
.hintpop { --ax: 24px; position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 4px; padding: 12px 14px; border-radius: 14px;
  background: var(--module2); border: 1px solid var(--pink-edge); color: var(--text); text-align: left;
  box-shadow: 0 10px 24px rgba(5, 2, 14, .5), inset 0 1px 0 rgba(255, 255, 255, .06); }
.hintpop.up { margin: 0 0 4px; }
.hintpop.anim { animation: hp-in .18s ease-out both; }
.hintpop.up.anim { animation-name: hp-up; }
@keyframes hp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes hp-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hp-arrow { position: absolute; top: -6px; left: var(--ax); width: 11px; height: 11px; margin-left: -5.5px; background: var(--module2);
  border-left: 1px solid var(--pink-edge); border-top: 1px solid var(--pink-edge); border-radius: 2px 0 0 0; transform: rotate(45deg); }
.hintpop.up .hp-arrow { top: auto; bottom: -6px; border: 0; border-right: 1px solid var(--pink-edge); border-bottom: 1px solid var(--pink-edge); border-radius: 0 0 2px 0; }
.hp-h { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.hp-t { font-size: 13.5px; line-height: 1.5; color: var(--text2); }
.hintpop .btn { align-self: flex-end; margin-top: 2px; }
@media (hover: hover) { .qb:hover .qb-i { border-color: var(--pink-edge); color: var(--text); } }

/* «Как читать событие», заголовок по-английски, правила по-русски */
.ev-tnote { margin-top: -6px; font-size: 12px; color: var(--faint); }
.howto { background: var(--panel); border-color: rgba(255, 95, 180, .38); }
.how-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.how-l li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--text2); }
.how-l .rb { min-width: 38px; height: 28px; border-radius: 8px; font-size: 12.5px; }
.rules-wait { display: flex; align-items: center; gap: 9px; font-size: 13.5px; line-height: 1.45; color: var(--text2); }
.rules-wait::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.rules-wait.on::before { background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: breathe 1.6s ease-in-out infinite; }
.rules-en { margin: 0 -14px -14px; border-top: 1px solid rgba(196, 170, 255, .12); }
.rules-en summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; cursor: pointer; list-style: none; border-radius: 0 0 18px 18px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); }
.rules-en summary::-webkit-details-marker { display: none; }
.rules-en summary span { flex: 1 1 auto; min-width: 0; }
.rules-en summary::after { content: ""; width: 8px; height: 8px; flex: none; margin: -4px 4px 0 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s; }
.rules-en[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.rules-en .rules { padding: 0 14px 14px; color: var(--muted); }
@media (hover: hover) { .rules-en summary:hover { color: var(--text); } }

/* вход в инструкцию: «?» в шапке ленты и строка в «Ещё» */
.iconbtn.help { width: 40px; height: 40px; border-radius: 50%; border-color: var(--bezel2); color: var(--pink-soft); font: 700 17px/1 var(--f-display);
  box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 rgba(255, 255, 255, .06); }
.linkrow.go { cursor: pointer; }
.linkrow.go::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
.lr-q { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pink-bg); border: 1px solid var(--pink-edge);
  color: var(--pink-soft); font: 700 14px/1 var(--f-display); }
@media (hover: hover) { .linkrow.go:hover { border-color: var(--bezel2); } .iconbtn.help:hover { color: var(--pink-hi); } }

/* ---------- инструкция (TOUR.md, раздел 1): полноэкранная шторка в своём космосе ---------- */
.tour-wrap { position: fixed; inset: 0; z-index: 60; overflow: hidden; overscroll-behavior: contain;
  background:
    radial-gradient(1px 1px at 37px 61px, rgba(255, 255, 255, .8), transparent 70%),
    radial-gradient(1.5px 1.5px at 211px 133px, rgba(255, 220, 245, .75), transparent 70%),
    radial-gradient(1px 1px at 121px 241px, rgba(220, 210, 255, .6), transparent 70%),
    radial-gradient(1px 1px at 293px 29px, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(ellipse 70% 38% at 85% 0%, rgba(124, 38, 160, .38), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 30%, rgba(124, 58, 237, .2), transparent 70%),
    radial-gradient(ellipse 80% 45% at 50% 106%, rgba(255, 95, 180, .15), transparent 72%),
    var(--space);
  background-size: 331px 317px, 331px 317px, 331px 317px, 331px 317px, 100% 100%, 100% 100%, 100% 100%, 100% 100%; }
.tour-wrap.anim { animation: fade .22s ease-out both; }
.tour { display: flex; flex-direction: column; height: 100%; max-width: 560px; margin: 0 auto; touch-action: pan-y;
  padding: calc(6px + env(safe-area-inset-top, 0px)) var(--gut-r) 0 var(--gut-l); }
.tour-top { display: flex; align-items: center; gap: 10px; flex: none; min-height: 48px; }
.tour-dots { display: flex; align-items: center; gap: 6px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 4px; background: var(--bezel2); }
.tour-dots span.done { background: var(--pink-edge); }
.tour-dots span.on { width: 22px; background: var(--pink); box-shadow: 0 0 8px rgba(255, 95, 180, .5); }
.tour-x { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 8px 0 12px; margin-right: -8px;
  border: 0; border-radius: 12px; background: none; color: var(--muted); font: 600 14px/1 var(--f-body); cursor: pointer; }
.tour-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.tour-body.in-next { animation: tour-next .3s cubic-bezier(.2, .8, .2, 1) both; }
.tour-body.in-prev { animation: tour-prev .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes tour-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes tour-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.tour-stage { display: flex; justify-content: center; flex: none; padding: 10px 0 14px; -webkit-user-select: none; user-select: none; }
.tour-n { margin-top: 0; }
.tour-h { font: 700 24px/1.18 var(--f-display); margin-top: -4px; }
.tour-t { font-size: 15px; line-height: 1.5; color: var(--text2); }
.tour-ul { list-style: none; margin: -2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tour-ul li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.45; color: var(--text2); }
.tour-ul li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 6px rgba(255, 95, 180, .6); }
.tour-foot { display: flex; gap: 10px; flex: none; padding: 10px 0 calc(14px + var(--safe-b)); }
.tour-foot .btn { min-height: 52px; border-radius: 16px; font-size: 15.5px; }
.tour-foot .btn.ghost { flex: none; padding: 10px 18px; }
@media (hover: hover) { .tour-x:hover { color: var(--text); } }
/* высокий экран — макет крупнее, низкий — мельче (место под ним остаётся точным: высота сцены задана) */
@media (min-height: 760px) and (min-width: 350px) {
  .tour-stage { height: 268px; padding: 14px 0 0; }
  .tm { transform: scale(1.12); transform-origin: 50% 0; }
}
@media (max-height: 640px) {
  .tour-stage { height: 196px; padding: 6px 0 0; }
  .tm { transform: scale(.86); transform-origin: 50% 0; }
  .tour-h { font-size: 22px; }
  .tour-t { font-size: 14.5px; }
}

/* мини-макет экрана 264×212: те же модули, розовые кнопки и цифры Tektur, что в приложении */
.tm { position: relative; width: 264px; height: 212px; flex: none; overflow: hidden; border-radius: 24px; border: 1px solid var(--bezel2); color: var(--text);
  font: 400 10px/1.3 var(--f-body); text-align: left;
  background: radial-gradient(ellipse 80% 55% at 92% 0%, rgba(124, 38, 160, .4), transparent 70%), radial-gradient(1px 1px at 40px 30px, rgba(255, 255, 255, .7), transparent 70%),
    radial-gradient(1px 1px at 200px 150px, rgba(255, 255, 255, .5), transparent 70%), var(--space);
  box-shadow: 0 0 0 5px rgba(36, 26, 59, .75), 0 0 0 6px var(--bezel), 0 18px 40px rgba(5, 2, 14, .65); }
.tm .ic { display: block; }
.tm-hd { position: absolute; left: 12px; top: 11px; display: flex; align-items: center; gap: 6px; }
.tm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 6px 1px rgba(255, 95, 180, .6); }
.tm-brand { font: 700 11.5px/1 var(--f-display); letter-spacing: .04em; }
.tm-tabs { position: absolute; left: 10px; right: 10px; top: 32px; display: flex; gap: 4px; }
.tm-tabs span { flex: 1 0 auto; height: 18px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--bezel2); background: var(--panel); color: var(--text2);
  font: 500 8.5px/16px var(--f-body); text-align: center; white-space: nowrap; }
.tm-tabs span.on { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); font-weight: 600; }
.tm-feed { position: absolute; left: 10px; right: 10px; top: 58px; bottom: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.tm-roll { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; animation: tm-roll 4s cubic-bezier(.45, 0, .2, 1) infinite; }
.tm-roll .tmc { height: 102px; flex: none; }
.tmc { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 8px 9px; border-radius: 13px; background: var(--module); border: 1px solid var(--bezel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 14px rgba(5, 2, 14, .5); }
.tmc-meta { display: flex; align-items: center; gap: 5px; height: 13px; font-size: 8px; color: var(--muted); white-space: nowrap; }
.tm-chip { padding: 0 6px; border-radius: 999px; background: var(--well); border: 1px solid var(--bezel); color: var(--text2); line-height: 11px; }
.tm-ready { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--green); }
.tm-ready i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 4px var(--green); }
.tmc-h { font-size: 10.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmc-p { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.tm-pct { font: 700 17px/1 var(--f-display); color: var(--pink-soft); white-space: nowrap; }
.tm-q { font-size: 7.5px; line-height: 1.25; color: var(--muted); white-space: nowrap; }
.tm-mv { margin-left: auto; font-size: 8px; font-weight: 600; white-space: nowrap; }
.tm-mv.up { color: var(--green); } .tm-mv.down { color: var(--red); }
.tmc-act { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 24px; gap: 5px; }
.tm-b { position: relative; display: block; height: 22px; border-radius: 7px; border: 1px solid var(--bezel2); background: var(--module2); color: var(--text);
  font: 600 8.5px/20px var(--f-body); text-align: center; white-space: nowrap; box-shadow: 0 2px 0 var(--edge); }
.tm-b.pk { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); box-shadow: 0 2px 0 var(--pink-edge), 0 0 8px rgba(255, 95, 180, .25); }
.tm-star { position: relative; display: grid; place-items: center; height: 22px; border-radius: 7px; background: var(--well); border: 1px solid var(--bezel); color: var(--faint); }
.tm-svg { display: block; width: 100%; height: 100%; }
.tm-finger { position: absolute; left: 50%; top: 50%; z-index: 3; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .9) 0 36%, rgba(255, 255, 255, .28) 40% 100%); box-shadow: 0 0 0 5px rgba(255, 255, 255, .12), 0 4px 10px rgba(5, 2, 14, .5); }
/* 2. процент */
.tm-price { position: absolute; left: 12px; right: 12px; top: 16px; gap: 6px; padding: 10px; }
.tm-odo { display: block; flex: none; height: 26px; overflow: hidden; }
.tm-odo-c { display: flex; flex-direction: column; transform: translateY(-104px); animation: tm-odo 4s linear infinite; }
.tm-odo-c span { display: block; height: 26px; font: 700 22px/26px var(--f-display); color: var(--pink-soft); font-variant-numeric: tabular-nums; }
.tm-mvin { animation: tm-pop 4s ease-out infinite; }
.tm-chart { position: relative; height: 56px; margin-top: 2px; }
.tm-cur { position: absolute; top: -3px; bottom: -3px; left: -3px; right: -3px; background: var(--module); transform-origin: 100% 50%; transform: scaleX(0);
  animation: tm-cur 4s ease-in-out infinite; }
.tm-sf { display: flex; justify-content: space-between; font-size: 7.5px; color: var(--faint); }
/* 3. разбор */
.tm-one { position: absolute; left: 10px; right: 10px; top: 34px; }
.tm-one.tm-two { top: 144px; }
.tm-tap { animation: tm-tap 4s ease-out infinite; }
.tm-f3 { animation: tm-f3 4s ease-in-out infinite; }
.tm-ev { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px;
  background: radial-gradient(ellipse 80% 55% at 92% 0%, rgba(124, 38, 160, .4), transparent 70%), var(--space); box-shadow: -14px 0 26px rgba(5, 2, 14, .7);
  animation: tm-slide 4s cubic-bezier(.2, .8, .2, 1) infinite; }
.tm-evtop { display: flex; align-items: center; gap: 6px; }
.tm-ib { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--panel); border: 1px solid var(--bezel); color: var(--text2); }
.tm-evm { flex: 1 1 auto; min-width: 0; font-size: 7.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-evh { font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.tm-pc { gap: 3px; padding: 7px 9px; }
.tm-pc .tm-svg { height: 18px; }
.tm-rc { gap: 3px; padding: 7px 9px; background: var(--panel); }
.tm-sh { display: flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 600; }
.tm-rt { font-size: 7.5px; line-height: 1.35; color: var(--text2); }
.tm-rt.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* страница события целиком в кадре 212 px */
.tm-lamp { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 5px var(--green); }
/* 4. «Мой прогноз»: шторка в масштабе, координаты — от её левого верхнего угла */
.tm-sheet { position: absolute; left: 0; right: 0; top: 14px; bottom: -1px; background: var(--panel); border-top: 1px solid var(--bezel2); border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 24px rgba(5, 2, 14, .6); }
.tm-sheet > * { position: absolute; }
.tm-grab { top: 6px; left: 50%; width: 30px; height: 4px; margin-left: -15px; border-radius: 4px; background: var(--bezel2); }
.tm-sht { top: 14px; left: 14px; font: 700 13px/1 var(--f-display); }
.tm-kc { top: 34px; width: 113px; height: 42px; padding-top: 6px; border-radius: 12px; border: 2px solid transparent; background: var(--module2); color: var(--text2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 4px 0 var(--well), inset 0 1px 0 rgba(255, 255, 255, .07); }
.tm-kc::before { content: ""; position: absolute; top: 5px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: var(--bezel2); }
.tm-kc.yes { left: 14px; animation: tm-key 4s ease-out infinite; }
.tm-kc.no { right: 14px; }
.tm-kc b { font: 700 14px/1 var(--f-display); letter-spacing: .03em; }
.tm-kc small { font-size: 7.5px; color: var(--muted); }
.tm-kc-on { position: absolute; inset: -2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-top: 6px; border-radius: 12px;
  background: var(--cap); color: var(--cap-ink); border: 2px solid var(--green); box-shadow: 0 0 12px rgba(61, 220, 156, .35), inset 0 1px 0 rgba(255, 255, 255, .7);
  animation: tm-on 4s ease-out infinite; }
.tm-kc-on::before { content: ""; position: absolute; top: 5px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: var(--green); box-shadow: 0 0 6px var(--green); }
.tm-kc-on small { color: var(--cap-sub); }
.tm-cl { top: 87px; left: 14px; font-size: 9.5px; font-weight: 600; }
.tm-cv { top: 84px; right: 14px; height: 16px; overflow: hidden; }
.tm-cv-c { display: flex; flex-direction: column; transform: translateY(-48px); animation: tm-cv 4s infinite; }
.tm-cv-c span { display: block; height: 16px; font: 700 13px/16px var(--f-display); color: var(--pink-soft); text-align: right; font-variant-numeric: tabular-nums; }
.tm-track { top: 104px; left: 14px; right: 14px; height: 14px; }
.tm-track::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 4px; background: var(--well); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.tm-fill { position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 4px; background: var(--pink); transform-origin: 0 50%; transform: scaleX(.606);
  animation: tm-fill 4s ease-in-out infinite; }
.tm-thumb { position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--pink); transform: translateX(136px);
  box-shadow: 0 0 0 3px rgba(255, 95, 180, .25), 0 2px 4px rgba(0, 0, 0, .4); animation: tm-thumb 4s ease-in-out infinite; }
.tm-scale { top: 122px; left: 14px; right: 14px; display: flex; justify-content: space-between; font-size: 7.5px; color: var(--faint); }
.tm-go, .tm-ok { top: 140px; left: 14px; right: 14px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 10.5px/1 var(--f-body); }
.tm-go { background: var(--pink); color: var(--pink-ink); opacity: 0; box-shadow: 0 3px 0 var(--pink-edge), 0 0 12px rgba(255, 95, 180, .3); animation: tm-go 4s ease-out infinite; }
.tm-ok { background: #10261d; border: 1px solid #2c6e52; color: #c8f5e2; animation: tm-ok 4s ease-out infinite; }
.tm-ok .ic { color: var(--green); }
.tm-f4 { left: 0; top: 0; animation: tm-f4 4s ease-in-out infinite; }
.tm-pfine { top: 180px; left: 14px; right: 14px; font-size: 7.5px; color: var(--faint); text-align: center; }
/* 5. дневник */
.tm-dia { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 14px; }
.tm-dh { display: flex; align-items: center; justify-content: space-between; height: 20px; flex: none; }
.tm-dt { font: 700 13px/1 var(--f-display); }
.tm-seg { padding: 3px 8px; border-radius: 7px; background: var(--well); border: 1px solid var(--bezel); font-size: 8px; font-weight: 600; }
.tm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; flex: none; }
.tm-tile { display: flex; flex-direction: column; gap: 1px; height: 50px; min-width: 0; padding: 5px 8px; border-radius: 11px; background: var(--module); border: 1px solid var(--bezel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 0 var(--edge); }
.tm-tl { font-size: 7.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-tvw { position: relative; height: 20px; flex: none; }
.tm-tv0, .tm-tv { position: absolute; left: 0; top: 0; font: 700 17px/20px var(--f-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-tv0 { color: var(--faint); }
.tm-tv { padding-right: 16px; background: var(--module); color: var(--text2); }
.tm-tv.pink { color: var(--pink-soft); } .tm-tv.pos { color: var(--green); } .tm-tv.neg { color: var(--red); } .tm-tv.amber { color: var(--amber); }
.tm-ts { font-size: 7px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-d0 { animation: tm-d0 4s ease-out infinite; } .tm-d1 { animation: tm-d1 4s ease-out infinite; }
.tm-d2 { animation: tm-d2 4s ease-out infinite; } .tm-d3 { animation: tm-d3 4s ease-out infinite; }
.tm-cal { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; padding: 6px 8px 0; border-radius: 11px; background: var(--panel); border: 1px solid var(--bezel); }
.tm-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; min-height: 0; border-bottom: 1px solid var(--bezel); }
.tm-bars span { display: flex; align-items: flex-end; height: 100%; }
.tm-bars i { display: block; width: 100%; border-radius: 4px 4px 1px 1px; background: linear-gradient(var(--pink-hi), var(--pink-edge)); transform-origin: 50% 100%;
  animation: tm-bar 4s ease-out infinite; }
/* 6. «Слежу» и Бинодекс */
.tm-toast { position: absolute; left: 50%; top: 10px; z-index: 5; width: max-content; padding: 6px 10px; border-radius: 9px; background: var(--module2); border: 1px solid rgba(61, 220, 156, .55);
  font-size: 8.5px; font-weight: 600; transform: translateX(-50%); box-shadow: 0 6px 14px rgba(5, 2, 14, .55); animation: tm-toast 4s ease-out infinite; }
.tm-w { top: 42px; }
.tm-star-on { position: absolute; inset: -1px; z-index: 2; display: grid; place-items: center; border-radius: 7px; border: 1px solid rgba(255, 194, 92, .6); background: var(--well);
  color: var(--amber); animation: tm-star 4s ease-out infinite; }
.tm-star-on .ic { fill: currentColor; filter: drop-shadow(0 0 4px rgba(255, 194, 92, .7)); }
.tm-burst { position: absolute; left: 50%; top: 50%; z-index: 1; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--amber); opacity: 0;
  animation: tm-burst 4s ease-out infinite; }
.tm-f6 { animation: tm-f6 4s ease-in-out infinite; }
.tm-cta { position: absolute; left: 12px; right: 12px; top: 158px; height: 30px; border-radius: 10px; background: var(--pink); color: var(--pink-ink); font: 600 10px/30px var(--f-body);
  text-align: center; box-shadow: 0 4px 0 var(--pink-edge), 0 6px 16px rgba(255, 95, 180, .3); }
.tm-fine { position: absolute; left: 12px; right: 12px; top: 196px; font-size: 7.5px; color: var(--faint); text-align: center; }

/* анимации макетов: 4 с по кругу, только transform и opacity */
.tm-loop { animation: tm-loop 4s ease-in-out infinite; }
@keyframes tm-loop { 0% { opacity: 0; } 6%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tm-roll { 0%, 14% { transform: translateY(0); } 30%, 44% { transform: translateY(-110px); } 60%, 74% { transform: translateY(-220px); } 90%, 100% { transform: translateY(-330px); } }
@keyframes tm-odo { 0%, 12% { transform: translateY(0); animation-timing-function: steps(4, end); } 52%, 100% { transform: translateY(-104px); } }
@keyframes tm-cur { 0%, 12% { transform: scaleX(1); } 52%, 100% { transform: scaleX(0); } }
@keyframes tm-pop { 0%, 54% { opacity: 0; transform: translateY(4px); } 64%, 100% { opacity: 1; transform: none; } }
@keyframes tm-tap { 0%, 15% { transform: none; } 19% { transform: scale(.92); } 25%, 100% { transform: none; } }
@keyframes tm-f3 {
  0% { opacity: 0; transform: translate(64px, 70px) scale(1); }
  13% { opacity: 1; transform: translate(0, 0) scale(1); }
  19% { opacity: 1; transform: translate(0, 0) scale(.78); }
  25% { opacity: 1; transform: translate(0, 0) scale(1); }
  33%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}
@keyframes tm-slide { 0%, 26% { opacity: 1; transform: translateX(105%); } 42%, 86% { opacity: 1; transform: translateX(0); } 96% { opacity: 0; transform: translateX(0); } 100% { opacity: 0; transform: translateX(105%); } }
@keyframes tm-key { 0%, 10% { transform: none; } 13% { transform: translateY(3px); } 17%, 100% { transform: none; } }
@keyframes tm-on { 0%, 12% { opacity: 0; } 15%, 100% { opacity: 1; } }
@keyframes tm-thumb { 0%, 28% { transform: translateX(0); } 50%, 100% { transform: translateX(136px); } }
@keyframes tm-fill { 0%, 28% { transform: scaleX(.03); } 50%, 100% { transform: scaleX(.606); } }
@keyframes tm-cv { 0%, 28% { transform: translateY(0); animation-timing-function: steps(3, end); } 50%, 100% { transform: translateY(-48px); } }
@keyframes tm-go { 0%, 60% { opacity: 1; transform: none; } 63% { opacity: 1; transform: scale(.95); } 66% { opacity: 1; transform: none; } 71%, 100% { opacity: 0; transform: none; } }
@keyframes tm-ok { 0%, 66% { opacity: 0; transform: scale(.94); } 72%, 100% { opacity: 1; transform: none; } }
@keyframes tm-f4 {
  0% { opacity: 0; transform: translate(190px, 200px) scale(1); }
  8% { opacity: 1; transform: translate(70px, 55px) scale(1); }
  11% { opacity: 1; transform: translate(70px, 55px) scale(.8); }
  15% { opacity: 1; transform: translate(70px, 55px) scale(1); }
  24% { opacity: 1; transform: translate(21px, 111px) scale(1); }
  28% { opacity: 1; transform: translate(21px, 111px) scale(.85); }
  50% { opacity: 1; transform: translate(157px, 111px) scale(.85); }
  54% { opacity: 1; transform: translate(157px, 111px) scale(1); }
  60% { opacity: 1; transform: translate(132px, 155px) scale(1); }
  63% { opacity: 1; transform: translate(132px, 155px) scale(.8); }
  67% { opacity: 1; transform: translate(132px, 155px) scale(1); }
  75%, 100% { opacity: 0; transform: translate(150px, 175px) scale(1); }
}
@keyframes tm-d0 { 0%, 10% { opacity: 0; transform: translateY(4px); } 16%, 100% { opacity: 1; transform: none; } }
@keyframes tm-d1 { 0%, 22% { opacity: 0; transform: translateY(4px); } 28%, 100% { opacity: 1; transform: none; } }
@keyframes tm-d2 { 0%, 34% { opacity: 0; transform: translateY(4px); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes tm-d3 { 0%, 46% { opacity: 0; transform: translateY(4px); } 52%, 100% { opacity: 1; transform: none; } }
@keyframes tm-bar { 0%, 54% { transform: scaleY(0); } 72%, 100% { transform: scaleY(1); } }
@keyframes tm-f6 {
  0% { opacity: 0; transform: translate(-46px, 56px) scale(1); }
  14% { opacity: 1; transform: translate(0, 0) scale(1); }
  19% { opacity: 1; transform: translate(0, 0) scale(.78); }
  25% { opacity: 1; transform: translate(0, 0) scale(1); }
  34%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}
@keyframes tm-star { 0%, 19% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; transform: scale(1.18); } 31%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes tm-burst { 0%, 20% { opacity: 0; transform: scale(.5); } 23% { opacity: .9; transform: scale(.7); } 42%, 100% { opacity: 0; transform: scale(1.9); } }
@keyframes tm-toast { 0%, 28% { opacity: 0; transform: translate(-50%, -12px); } 36%, 84% { opacity: 1; transform: translate(-50%, 0); } 94%, 100% { opacity: 0; transform: translate(-50%, -6px); } }

/* меньше движения: макеты стоят на конечном кадре, шторки и подсказки появляются без анимации */
@media (prefers-reduced-motion: reduce) {
  .tm, .tm *, .tour-wrap.anim, .tour-body.in-next, .tour-body.in-prev, .hintpop.anim, .rules-wait.on::before { animation: none !important; }
}

/* ---------- разбор ИИ (AI.md, «Экран»): взгляд словами, уверенность, факторы со ссылками, время и цена тогда/сейчас ---------- */
.lamp.wait { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: breathe 1.4s ease-in-out infinite; }
.bd .bd-h .tag { flex: none; }
.bd-view { --vc: var(--text2); display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--well); border: 1px solid var(--bezel);
  box-shadow: var(--well-shadow); }
.bd-view.yes { --vc: var(--green); border-color: rgba(61, 220, 156, .4); }
.bd-view.no { --vc: var(--amber); border-color: rgba(255, 194, 92, .4); }
.bd-view { position: relative; padding-right: 44px; }
.bd .bdv { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; line-height: 1.2; color: var(--muted); }
.bdv .qb { position: absolute; top: 10px; right: 10px; margin: 0; }
.bdv-l { font-weight: 600; }
.bdv-w { font: 700 24px/1.15 var(--f-display); letter-spacing: .01em; color: var(--vc); }
.bd .bdv-c { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.meter { display: inline-flex; gap: 3px; flex: none; }
.meter i { width: 14px; height: 6px; border-radius: 3px; background: var(--bezel); }
.meter.m1 i:first-child, .meter.m2 i:nth-child(-n+2), .meter.m3 i { background: var(--vc); }
.bd .bd-take { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text); }
.bd-take-i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--pink); box-shadow: 0 0 6px rgba(255, 95, 180, .6); }
.bd-part { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bd-k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bd-f { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bd-f li { position: relative; padding-left: 16px; font-size: 13.5px; line-height: 1.5; color: var(--text2); overflow-wrap: anywhere; }
.bd-f li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.bd-fs { margin-left: 6px; white-space: nowrap; }
.ext.bd-fl { display: inline-flex; min-height: 24px; gap: 3px; font-size: 12.5px; vertical-align: baseline; }
.bd-srcs { margin: 0 -14px; border-top: 1px solid rgba(196, 170, 255, .12); border-bottom: 1px solid rgba(196, 170, 255, .12); }
.bd-srcs summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.bd-srcs summary::-webkit-details-marker { display: none; }
.bd-srcs summary span { flex: 1 1 auto; min-width: 0; }
.bd-srcs summary::after { content: ""; width: 8px; height: 8px; flex: none; margin: -4px 4px 0 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s; }
.bd-srcs[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.bd-sl { margin: 0; padding: 0 14px 12px 34px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--faint); }
.bd-sa { display: flex; flex-direction: column; gap: 1px; min-height: 40px; justify-content: center; color: var(--pink-hi); text-decoration: none; }
.bd-st { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.bd-sh { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--faint); }
.bd .bd-time { font-size: 12px; line-height: 1.45; color: var(--muted); }
.bd .bd-disc { padding-top: 10px; border-top: 1px solid rgba(196, 170, 255, .12); font-size: 11.5px; line-height: 1.45; color: var(--faint); }
.bd-act { display: flex; flex-direction: column; gap: 8px; }
.bd-act .btn { align-self: flex-start; min-width: 168px; }
.bd-act .btn.primary { align-self: stretch; }
.bd-act.stale { padding: 10px 12px; border-radius: 12px; background: var(--amber-bg); border: 1px solid rgba(255, 194, 92, .3); }
.bd .bd-stale { font-size: 13px; color: #ffe2ad; }
.bd p.err { font-size: 13.5px; font-weight: 500; color: var(--red); }
.bd-dim > :not(.bd-h):not(.bd-wait):not(.hintpop) { opacity: .5; }
@media (hover: hover) { .bd-srcs summary:hover { color: var(--text); } .bd-sa:hover .bd-st { text-decoration: underline; text-underline-offset: 3px; } }
/* ждём разбор: шаги «ищет новости → читает правила → пишет разбор» */
.bd-wait { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--well); border: 1px solid var(--pink-edge); box-shadow: var(--well-shadow); }
.bd .bdw-h { font-size: 14px; font-weight: 600; color: var(--text); }
.bdw-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bdw-steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--faint); }
.bdw-dot { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--bezel2); background: var(--module); }
.bdw-steps li.done { color: var(--text2); }
.bdw-steps li.done .bdw-dot { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.bdw-steps li.now { color: var(--text); font-weight: 600; }
.bdw-steps li.now .bdw-dot { border-color: var(--pink); background: var(--pink-bg); }
.bdw-steps li.now .bdw-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); animation: breathe 1.2s ease-in-out infinite; }

/* лента: «ИИ: скорее «Да»» на карточке, пояснение над «С разбором» */
.mc-ai { display: flex; align-items: center; gap: 7px; margin-top: -2px; font-size: 12.5px; font-weight: 600; color: var(--text2); }
.ai-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.mc-ai.yes .ai-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.mc-ai.no .ai-dot { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.feed-note { margin: -2px 2px 0; }

/* ---------- чат с ИИ (AI.md, «Чат») ---------- */
.wrap.chat { gap: 10px; padding-bottom: calc(var(--composer, 120px) + var(--tabbar) + var(--kb, 0px) + 16px); }
.chat-hd { position: sticky; top: 0; z-index: 6; display: flex; flex-direction: column; gap: 8px; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut-l));
  padding: 0 var(--gut-r) 8px var(--gut-l); background: linear-gradient(var(--space) 80%, rgba(11, 7, 22, 0)); }
.chat-hd .hd { flex-wrap: nowrap; padding-top: 12px; min-height: 0; }
.chat-hd .hd-t { min-width: 0; }
.chat-hd .hd > .btn { flex: none; }
html.typing .chat-hd { position: static; }
.chat-priv { margin-top: -4px; text-align: left; }
.chat-intro { gap: 10px; align-items: flex-start; }
.chat-intro p { font-size: 14.5px; line-height: 1.45; color: var(--text2); }
.chat-intro p.faint { font-size: 13px; color: var(--faint); }
.starters { display: flex; flex-wrap: wrap; gap: 8px; }
.starters .pill { white-space: normal; text-align: left; line-height: 1.3; padding: 7px 12px; min-height: 36px; }
.msgs { display: flex; flex-direction: column; gap: 12px; padding-top: 2px; }
.msg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg.me { align-self: flex-end; align-items: flex-end; max-width: 86%; }
.msg.ai { align-self: stretch; align-items: flex-start; }
.bub { display: flex; flex-direction: column; gap: 8px; max-width: 100%; padding: 10px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.bub p { white-space: pre-line; }
.msg.me .bub { background: #3a1f4e; border: 1px solid rgba(255, 95, 180, .45); border-bottom-right-radius: 6px; color: var(--text); }
.msg.ai .bub { max-width: 94%; background: var(--module); border: 1px solid var(--bezel); border-bottom-left-radius: 6px; box-shadow: var(--mod-shadow); color: var(--text2); }
.msg.ai .bub b { color: var(--text); font-weight: 600; }
.msg.pending .bub { opacity: .75; }
.msg-ctx { font-size: 11.5px; font-weight: 600; line-height: 1.35; color: var(--pink-soft); }
.msg-t { padding: 0 6px; font-size: 11px; color: var(--faint); }
.msg-t:empty { display: none; }
.msg-cards { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mc.cc { padding: 12px; gap: 8px; }
.cc-h { font-size: 15px; }
.cc-act { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cc-act.one { grid-template-columns: minmax(0, 1fr); }
.cc-act .btn { padding: 8px 6px; font-size: 14px; }
.cc-link { justify-content: space-between; color: var(--pink-hi); font-weight: 600; }
.ext.inl { display: inline; min-height: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.msg.typing .bub { flex-direction: row; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--pink-soft); animation: dotty 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotty { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ty-late { padding: 0 6px; font-size: 11.5px; color: var(--faint); animation: reveal .3s ease-out 12s both; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
/* поле ввода — слой рядом с #app, над нижним меню (и над клавиатурой: --kb) */
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--kb, 0px)); z-index: 35; padding: 8px var(--gut-r) 6px var(--gut-l);
  background: var(--panel); border-top: 1px solid var(--bezel); box-shadow: 0 -8px 20px rgba(5, 2, 14, .45); }
.cmp-in { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.cmp-ctx:empty { display: none; }
.cmp-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--pink-bg); border: 1px solid var(--pink-edge);
  font-size: 12.5px; font-weight: 600; color: var(--pink-soft); }
.cmp-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-x { position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--pink-soft); cursor: pointer; }
.cmp-x::after { content: ""; position: absolute; inset: -8px; }
.cmp-off { font-size: 13px; }
.cmp-off[hidden] { display: none; }
.cmp-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1 1 auto; min-width: 0; min-height: 44px; max-height: 132px; padding: 10px 12px; line-height: 1.4; resize: none; overflow-y: auto; }
.composer textarea:disabled { opacity: .55; }
.cmp-send { flex: none; min-height: 44px; padding: 10px 14px; }
.cmp-foot { display: flex; align-items: center; gap: 8px; min-height: 16px; font-size: 11.5px; line-height: 1.3; color: var(--faint); }
@media (hover: hover) { .cmp-x:hover { color: var(--text); } }
@media (min-width: 761px) { .composer { padding-bottom: calc(8px + var(--safe-b)); } }
/* набор на телефоне: нижнее меню прячем — поле сразу над клавиатурой */
@media (max-width: 760px) and (pointer: coarse) {
  html.typing { --tabbar: 0px; }
  html.typing .tabbar { display: none; }
  html.typing:not(.kb) .composer { padding-bottom: calc(6px + var(--safe-b)); }
}
@media (max-width: 359px) { .cmp-send { padding: 10px 10px; font-size: 13.5px; } .bdv-w { font-size: 21px; } }

/* меньше движения: лампа, шаги разбора и точки «печатает…» стоят; вторая строка ожидания — сразу */
@media (prefers-reduced-motion: reduce) {
  .lamp.wait, .bdw-steps li.now .bdw-dot::after, .dots i { animation: none !important; }
  .dots i { opacity: .8; }
}
