:root {
  --bg: #0d0d0f;
  --card: #151517;
  --card-2: #1c1c1f;
  --line: rgba(255, 255, 255, .09);
  --text: #f5f5f6;
  --mute: #86868d;
  --faint: #4b4b52;
  --radius: 26px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100dvh; font-size: 16px; line-height: 1.4; }
main { max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom)); }
body[data-view=chat] main { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.view { display: none; }
.view.active { display: block; }

/* ---------- home ---------- */

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; min-height: 128px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.tile:active { background: var(--card-2); }
.label { color: var(--mute); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.big { height: 40px; display: flex; align-items: center; font-size: 32px; white-space: nowrap; overflow: hidden; max-width: 100%; font-weight: 800; letter-spacing: -.03em; }
.cap { color: var(--mute); font-size: 15px; line-height: 1.25; margin-top: auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.plus { position: relative; width: 36px; height: 36px; display: block; }
.plus::before, .plus::after { content: ""; position: absolute; background: var(--text); border-radius: 2px; }
.plus::before { left: 0; right: 0; top: 17px; height: 2px; }
.plus::after { top: 0; bottom: 0; left: 17px; width: 2px; }

/* ---------- sub screens ---------- */
.bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.bar h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 26px; line-height: 1; padding-bottom: 3px; }
body.in-tg .back { display: none; }

.add { display: flex; gap: 8px; margin-bottom: 14px; }
.add.stack { flex-direction: column; }
.row2 { display: flex; gap: 8px; }
.row2 input { flex: 1; min-width: 0; }
input, textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 16px; font-size: 16px; color-scheme: dark; resize: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
.add button[type="submit"] {
  background: var(--text); color: var(--bg); border: 0; border-radius: 18px; padding: 0 20px; font-weight: 700; min-height: 50px; white-space: nowrap;
}

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 14px 16px; }
.row > span, .row > div { flex: 1; min-width: 0; word-break: break-word; white-space: pre-wrap; }
.row small { display: block; color: var(--mute); font-size: 14px; margin-top: 2px; }
.row.done > span { color: var(--faint); text-decoration: line-through; }
.chk { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; padding: 0; }
.row.done .chk { background: var(--text); border-color: var(--text); box-shadow: inset 0 0 0 6px var(--bg); }
.x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); font-size: 22px; line-height: 1; }
.empty { color: var(--mute); padding: 18px 4px; }

/* ---------- chat ---------- */
#chat.active { display: flex; flex-direction: column; height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
#pix { width: 100%; height: 70px; flex: none; border-radius: 22px; background: #111113; border: 1px solid var(--line); margin-bottom: 10px; }
.msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 0 8px; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 20px; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--text); color: var(--bg); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.bot.act { border-color: rgba(255, 255, 255, .32); }
.msg .badge { display: block; color: var(--mute); font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.msg.hint { align-self: stretch; max-width: none; background: transparent; border: 0; color: var(--mute); padding-left: 2px; }
.msg code { background: rgba(255, 255, 255, .08); padding: 1px 5px; border-radius: 6px; font-size: .92em; }
.composer { flex: none; display: flex; gap: 8px; align-items: center; padding-top: 6px; }
.composer input { border-radius: 999px; padding: 14px 18px; }
.icon-btn { flex: none; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.icon-btn.solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.icon-btn.rec { background: var(--text); color: var(--bg); border-color: var(--text); }
.icon-btn:disabled, .composer input:disabled { opacity: .5; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 999px; font-weight: 600; max-width: 88vw; opacity: 0; pointer-events: none; transition: opacity .2s; text-align: center; }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ---------- compact hero ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; width: 100%; text-align: left;
  border-radius: 26px; border: 1px solid var(--line); background: #111113; color: inherit; padding: 0; min-height: 112px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, #0d0d0f 2px, transparent 2px),
    linear-gradient(to bottom, #0d0d0f 2px, transparent 2px),
    linear-gradient(135deg, transparent 34%, rgba(255, 255, 255, .6) 100%);
  background-size: 8px 8px, 8px 8px, 100% 100%;
}
.hero-text { position: relative; display: block; width: 100%; padding: 14px 18px 14px; }
.hero-text > span { display: block; }
.sub { color: var(--mute); font-size: 15px; line-height: 1.3; }
.sub.split { display: flex !important; justify-content: space-between; gap: 12px; }
#wx { color: var(--text); font-weight: 600; }
.date { font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 1px 0 2px; }
.assist { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 13px 18px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--mute); }
.assist svg { width: 22px; height: 22px; color: var(--text); flex: none; }
.grid { margin-top: 10px; gap: 10px; }

/* ---------- bottom navigation ---------- */
#nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 536px); display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 32px; border: 1px solid var(--line);
  background: rgba(24, 24, 27, .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); z-index: 10;
}
body[data-view=chat] #nav { display: none; }
#nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; background: none; border: 0; color: var(--faint); font-size: 11px; font-weight: 600; }
#nav button.on { color: var(--text); }
#nav .navmic { flex: none; width: 64px; height: 64px; margin: -26px 4px 0; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center; padding: 0; border: 5px solid var(--bg); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
#nav .navmic:active { transform: scale(.96); }

/* ---------- shared bits ---------- */
select { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; font-size: 16px; color-scheme: dark; appearance: none; -webkit-appearance: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.card .sub { font-size: 15px; }
.amount { margin: 2px 0 10px; font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.meter { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-bottom: 8px; }
.meter i { display: block; height: 100%; background: var(--text); border-radius: 99px; }
.meter.over i { background: repeating-linear-gradient(135deg, var(--text) 0 6px, #7a7a80 6px 12px); }
.sect { margin: 20px 2px 10px; font-size: 17px; font-weight: 700; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 14px; padding: 10px; color: var(--mute); font-weight: 600; }
.seg button.on { background: var(--text); color: var(--bg); }
.chips { display: flex; gap: 6px; }
.chip { flex: 1; min-width: 0; padding: 10px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--faint); font-weight: 600; font-size: 14px; }
.chip.on { color: var(--text); border-color: rgba(255, 255, 255, .45); }
.limit { margin-top: 20px; }
.limit button { background: var(--card-2) !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.search { margin-bottom: 12px; border-radius: 999px; }
.sum { white-space: pre-wrap; word-break: break-word; font-family: var(--font); font-size: 16px; line-height: 1.55; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.muted { color: var(--mute); font-size: 14px; }

/* habits */
.habit { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 14px 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.h-top { display: flex; align-items: flex-start; gap: 10px; }
.h-name { flex: 1; min-width: 0; font-weight: 700; font-size: 18px; word-break: break-word; }
.h-name small { display: block; color: var(--mute); font-weight: 400; font-size: 14px; }
.streak { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 20px; }
.streak svg { color: var(--text); }
.streak.zero { color: var(--faint); }
.h-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.week { display: flex; gap: 5px; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-style: normal; font-weight: 700; border: 1.5px solid var(--faint); color: var(--mute); }
.dot.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.dot.off { border-color: transparent; color: var(--faint); opacity: .55; }
.dot.today:not(.on) { border-color: var(--text); color: var(--text); }
.check-btn { border-radius: 14px; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; font-weight: 700; white-space: nowrap; }
.check-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* budget */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.bars .b { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.bars .b i { display: block; height: 100%; background: var(--text); border-radius: 99px; }
.tx-amt { font-weight: 700; white-space: nowrap; }
.tx-amt.inc { color: var(--text); }
.tx-amt.exp { color: var(--mute); }

/* links */
.link { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; }
.link .t { text-align: left; background: none; border: 0; padding: 0; font-weight: 700; font-size: 17px; line-height: 1.3; word-break: break-word; }
.link.unread .t::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text); margin-right: 8px; vertical-align: middle; }
.link .dom { color: var(--mute); font-size: 13px; }
.link .s { color: #b8b8be; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 3px 10px; color: var(--mute); font-size: 13px; }
.l-actions { display: flex; gap: 14px; margin-top: 2px; }
.l-actions button { background: none; border: 0; padding: 4px 0; color: var(--mute); font-size: 14px; font-weight: 600; }

/* ---------- fixes ---------- */
.row2 > * { min-width: 0; }
.row2 select { width: auto; flex: 1; }
.row2 input[type="number"] { flex: 1; }
.row > .tx-amt { flex: none; text-align: right; padding-top: 1px; }
#wx { background: rgba(13, 13, 15, .72); padding: 1px 9px; border-radius: 99px; }
.dot { width: 24px; height: 24px; }
.week { gap: 4px; }
.h-bot { flex-wrap: wrap; }

/* =====================================================
   Polish: свет, глубина, движение
   ===================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sweep { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(130%); } }
@keyframes breathe { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes ring { 0% { transform: scale(1); opacity: .45; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes recring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.07, 1.1) rotate(-2deg); } 60% { transform: scale(.97, 1.03) rotate(1.5deg); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* фоновый свет сверху */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 56vh; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 50% 0%, rgba(255, 255, 255, .075), transparent 70%);
}
main { position: relative; z-index: 1; }

/* вход экранов и списков */
.view.active { animation: viewIn .3s cubic-bezier(.2, .8, .2, 1); }
.enter .tile, .enter .assist, .enter .list > li, .enter .bars > li, .enter .habit { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.enter .assist { animation-delay: 40ms; }
.enter .grid .tile:nth-child(1), .enter li:nth-child(1) { animation-delay: 70ms; }
.enter .grid .tile:nth-child(2), .enter li:nth-child(2) { animation-delay: 110ms; }
.enter .grid .tile:nth-child(3), .enter li:nth-child(3) { animation-delay: 150ms; }
.enter .grid .tile:nth-child(4), .enter li:nth-child(4) { animation-delay: 190ms; }
.enter .grid .tile:nth-child(5), .enter li:nth-child(5) { animation-delay: 230ms; }
.enter .grid .tile:nth-child(6), .enter li:nth-child(6) { animation-delay: 270ms; }
.enter li:nth-child(n + 7) { animation-delay: 300ms; }

/* карточки: блик под пальцем + верхняя кромка света */
.tile, .assist, .s-card, .habit, .link, .card {
  position: relative; overflow: hidden;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 46%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 26px -14px rgba(0, 0, 0, .8);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), border-color .2s, background-color .2s;
}
.tile::after, .assist::after, .s-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(190px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .11), transparent 62%);
}
.tile:active::after, .assist:active::after, .s-card:active::after { opacity: 1; }
@media (hover: hover) { .tile:hover::after, .assist:hover::after, .s-card:hover::after { opacity: 1; } .tile:hover { border-color: rgba(255, 255, 255, .16); } }
.tile:active, .assist:active, .hero:active { transform: scale(.975); }
.hero { transition: transform .18s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 16px 40px -20px rgba(255, 255, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .1); }
.add button, .check-btn, .icon-btn, .chip, .seg button, .back, .x { transition: transform .14s ease, background-color .2s, color .2s, border-color .2s; }
.add button:active, .check-btn:active, .icon-btn:active, .chip:active, .seg button:active, .back:active { transform: scale(.94); }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(255, 255, 255, .38); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }

/* hero: световая полоса и «дыхание» сетки */
.hero::before { animation: breathe 6s ease-in-out infinite; }
.hero::after {
  content: ""; position: absolute; inset: -20% 0; z-index: 0; pointer-events: none; width: 60%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .13) 50%, transparent 70%);
  animation: sweep 9s ease-in-out infinite;
}
.hero-text { z-index: 1; }

/* навигация */
#nav button svg { transition: transform .2s, filter .3s; }
#nav button.on svg { transform: translateY(-1px); filter: drop-shadow(0 0 8px rgba(255, 255, 255, .5)); }
#nav .navmic::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); animation: ring 3.4s ease-out infinite; pointer-events: none; }
#nav .navmic { position: relative; }
.icon-btn.rec { animation: recring 1.2s ease-out infinite; }

/* привычки */
.streak:not(.zero) svg { transform-origin: 50% 90%; animation: flicker 2.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35)); }
.habit.pop .streak, .habit.pop .check-btn { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
.dot.on { box-shadow: 0 0 10px rgba(255, 255, 255, .25); }

/* полосы */
.meter i, .bars .b i { transition: width .9s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 12px rgba(255, 255, 255, .3); }
#toast { transform: translate(-50%, 12px); transition: opacity .25s, transform .25s; }
#toast.show { transform: translate(-50%, 0); }

/* =====================================================
   Сводка дня
   ===================================================== */
.s-wrap { display: flex; flex-direction: column; gap: 10px; }
.s-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background-color: var(--card); animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.s-wrap > :nth-child(2) { animation-delay: 70ms; }
.s-wrap > :nth-child(3) { animation-delay: 140ms; }
.s-wrap > :nth-child(4) { animation-delay: 210ms; }
.s-wrap > :nth-child(5) { animation-delay: 280ms; }
.s-wrap > :nth-child(n + 6) { animation-delay: 340ms; }
.s-label { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; color: var(--mute); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.s-label em { font-style: normal; color: var(--text); letter-spacing: 0; font-size: 15px; }
.skel { height: 150px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(100deg, var(--card) 30%, #232327 50%, var(--card) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel.short { height: 84px; }

.wx { padding: 20px; }
.wx::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, #151517 2px, transparent 2px), linear-gradient(to bottom, #151517 2px, transparent 2px), linear-gradient(120deg, transparent 45%, rgba(255, 255, 255, .34) 100%);
  background-size: 8px 8px, 8px 8px, 100% 100%;
  animation: breathe 6s ease-in-out infinite;
}
.wx > * { position: relative; }
.wx-main { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wx-temp { font-size: 72px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.wx-desc { font-size: 20px; font-weight: 600; margin-top: 6px; }
.wx-city { color: var(--mute); font-size: 15px; margin-top: 1px; }
.wx-ico { flex: none; color: var(--text); filter: drop-shadow(0 0 14px rgba(255, 255, 255, .25)); }
.wx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.wx-stats span { display: block; color: var(--mute); font-size: 13px; }
.wx-stats b { font-size: 20px; letter-spacing: -.02em; }
.wx-hint { color: var(--mute); margin: 0; font-size: 16px; }

.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.rate { background: var(--card-2); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.rate span { display: block; color: var(--mute); font-size: 13px; font-weight: 600; }
.rate b { font-size: 26px; letter-spacing: -.03em; }

.s-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.s-list li { display: flex; align-items: center; gap: 12px; word-break: break-word; }
.s-list .time { font-weight: 800; min-width: 50px; font-variant-numeric: tabular-nums; }
.s-list .tick { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint); }
.s-list .more { color: var(--mute); font-size: 14px; }
.s-list .r { margin-left: auto; display: flex; align-items: center; gap: 4px; font-weight: 800; }
.s-list .r svg { width: 18px; height: 18px; }
.s-amount { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 10px; }
.s-calm { text-align: center; color: var(--mute); padding: 26px 18px; }

/* погодные иконки */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(-1px); } to { transform: translateX(1.2px); } }
@keyframes fall { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(3px); opacity: 0; } }
@keyframes flash { 0%, 70%, 100% { opacity: .35; } 76%, 84% { opacity: 1; } }
@keyframes slide { from { transform: translateX(-1.4px); } to { transform: translateX(1.4px); } }
.wx-ico .rays { transform-box: fill-box; transform-origin: center; animation: spin 30s linear infinite; }
.wx-ico .cloud { animation: drift 6s ease-in-out infinite alternate; }
.wx-ico .d { animation: fall 1.7s linear infinite; }
.wx-ico .d2 { animation-delay: .55s; }
.wx-ico .d3 { animation-delay: 1.1s; }
.wx-ico .bolt { animation: flash 3.2s infinite; }
.wx-ico .f1, .wx-ico .f3 { animation: slide 5s ease-in-out infinite alternate; }
.wx-ico .f2 { animation: slide 5s ease-in-out infinite alternate-reverse; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- настройки ---------- */
.settings-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 12px; background: transparent; border: 0; color: var(--mute); font-weight: 600; }
.settings-link:active { color: var(--text); }
.set-form { display: flex; flex-direction: column; gap: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field > span { color: var(--mute); font-size: 14px; margin-left: 4px; }
.primary { width: 100%; margin-top: 4px; background: var(--text); color: var(--bg); border: 0; border-radius: 18px; padding: 15px; font-weight: 700; }
.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; font-weight: 600; white-space: nowrap; }
.ghost.wide { width: 100%; margin-top: 12px; }
.danger { width: 100%; background: transparent; border: 1px solid rgba(255, 123, 123, .35); color: #ff8e8e; border-radius: 18px; padding: 14px; font-weight: 600; }
.fine { margin: 10px 4px 0; }
.token { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.token code { flex: 1; min-width: 0; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
#tokenOut .muted { margin: 10px 0 0; }
.wx-hint .ghost { margin-top: 12px; }
