/* Цвета - только переменные. Тема: data-theme ставит app.js (в Telegram - его тема, в браузере - системная). */
:root {
  --bg: #ffffff; --ink: #15171a; --mute: #6b7076; --line: #e6e8eb; --card: #f5f6f7; --acc: #2b6cf6;
  --r: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1013; --ink: #eef0f2; --mute: #9aa0a6; --line: #24272c; --card: #171a1e; --acc: #6c9cff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
.top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 8px 16px; min-height: 60px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.brand { font-weight: 800; font-size: 20px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk { padding: 0 12px 0 8px; margin-left: -8px; background: none; color: var(--acc); font-weight: 600; flex: none; }
.bk[hidden] { display: none; }
.scr { padding: 16px; }
.hs { overflow-x: auto; } /* ленты, которые листаются вбок: свайп «назад» на них не срабатывает */
/* плашка ярлыка на главный экран */
.hm { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: var(--r); padding: 6px 4px 6px 14px; margin-bottom: 12px; font-size: 15px; }
.hm span { flex: 1; min-width: 0; }
.hm button { flex: none; background: var(--acc); color: #fff; font-weight: 600; }
.hm .hm-x { background: none; color: var(--mute); font-size: 22px; padding: 0; }
.empty { color: var(--mute); text-align: center; padding: 48px 16px; }
.card { background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
button { font: inherit; color: inherit; min-height: 44px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--card); cursor: pointer; }
button.main { background: var(--acc); color: #fff; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 15px; z-index: 9; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
