:root {
  --bg: #F3F4F1;
  --card: #FFFFFF;
  --card-2: #F7F8F5;
  --text: #15181A;
  --muted: #6B716E;
  --faint: #A3A9A5;
  --line: #E6E8E3;
  --accent: #0E8F6A;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F3EC;
  --danger: #E5484D;
  --danger-soft: #FDECEC;
  --warn: #D9860B;
  --warn-soft: #FDF3E1;
  --income: #12A150;
  --hero-1: #0B6E52;
  --hero-2: #12382E;
  --shadow: 0 1px 2px rgba(20, 30, 25, .05), 0 6px 24px rgba(20, 30, 25, .06);
  --radius: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0F0E;
    --card: #17191A;
    --card-2: #1E2122;
    --text: #EEF1EF;
    --muted: #9AA19D;
    --faint: #616865;
    --line: #272B2A;
    --accent: #2BC48E;
    --accent-ink: #062418;
    --accent-soft: #143329;
    --danger: #FF6369;
    --danger-soft: #3A1A1C;
    --warn: #F5A524;
    --warn-soft: #3A2A10;
    --income: #3DD68C;
    --hero-1: #0F5C45;
    --hero-2: #0F2620;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- layout */
.screen {
  max-width: 560px; margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 104px);
  min-height: 100dvh;
  animation: fade .18s ease-out;
}
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 8px; }
.topbar h1 { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.topbar .hello { font-size: 14px; color: var(--muted); margin: 0 0 2px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); color: var(--text); flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.plain { background: none; box-shadow: none; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card h2, .section-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-title a, .card h2 a { font-size: 14px; font-weight: 600; }
.section-title { margin: 22px 4px 10px; }

/* ---------- period switcher */
.period {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: var(--card); border-radius: 14px; padding: 4px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.period button { width: 38px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.period button:active { background: var(--card-2); }
.period button:disabled { opacity: .3; }
.period button svg { width: 18px; height: 18px; }
.period .label { font-weight: 650; font-size: 15px; text-align: center; flex: 1; }
.period .label small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }

/* ---------- hero */
.hero {
  border-radius: 24px; padding: 20px; color: #fff; margin-bottom: 14px; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.14), transparent 50%), linear-gradient(150deg, var(--hero-1), var(--hero-2));
  box-shadow: 0 10px 30px rgba(11, 110, 82, .25);
}
.hero.over { background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.14), transparent 50%), linear-gradient(150deg, #A3343A, #3B1517); box-shadow: 0 10px 30px rgba(163, 52, 58, .25); }
.hero .k { font-size: 14px; opacity: .8; margin: 0; }
.hero .big { font-size: 40px; font-weight: 780; letter-spacing: -.03em; margin: 2px 0 2px; line-height: 1.1; }
.hero .sub { font-size: 14px; opacity: .85; margin: 0 0 16px; }
.bar { height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: #fff; border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hero-stats div { font-size: 12px; opacity: .78; }
.hero-stats b { display: block; font-size: 15px; opacity: 1; font-weight: 650; color: #fff; margin-top: 1px; }
.hero .setup { display: inline-flex; margin-top: 4px; background: rgba(255,255,255,.18); color: #fff; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); min-width: 120px;
}
.chip span { display: block; font-size: 12px; color: var(--muted); }
.chip b { font-size: 15px; font-weight: 680; }
.chip.warn b { color: var(--warn); }
.chip.bad b { color: var(--danger); }

.add-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 17px;
  border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 8px 20px rgba(14, 143, 106, .25);
  transition: transform .1s;
}
.add-btn:active { transform: scale(.98); }
.add-btn svg { width: 22px; height: 22px; }

/* ---------- categories */
.donut-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.donut { width: 120px; height: 120px; flex: none; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); }
.donut .center b { display: block; font-size: 16px; color: var(--text); }
.legend { flex: 1; min-width: 0; display: grid; gap: 6px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend b { font-weight: 600; }

.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cat-row:first-of-type { border-top: 0; }
.emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; }
.cat-row .body { flex: 1; min-width: 0; }
.cat-row .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 15px; }
.cat-row .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mini-bar { height: 5px; background: var(--card-2); border-radius: 9px; margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; border-radius: 9px; }
.up { color: var(--danger); } .down { color: var(--income); }

/* ---------- transactions */
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; text-align: left; border-top: 1px solid var(--line); }
.tx:first-child { border-top: 0; }
.tx .body { flex: 1; min-width: 0; }
.tx .title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .amt { font-weight: 650; font-size: 15px; text-align: right; white-space: nowrap; }
.tx .amt small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.tx .amt.income { color: var(--income); }
.badge { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; margin-left: 4px; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.day-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 600; margin: 18px 6px 6px; }
.day-group { padding: 4px 16px; }

.search { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 0 12px; box-shadow: var(--shadow); margin-bottom: 10px; }
.search svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: none; padding: 12px 0; font-size: 16px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 6px; padding: 2px 16px 6px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { flex: none; padding: 7px 12px; border-radius: 99px; background: var(--card); font-size: 14px; font-weight: 550; box-shadow: var(--shadow); white-space: nowrap; }
.filter-chips button.on { background: var(--text); color: var(--bg); }
.totals-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin: 6px 6px 0; }
.totals-line b { color: var(--text); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ico { font-size: 40px; margin-bottom: 6px; }
.empty p { margin: 4px 0; }

/* ---------- tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 8px 8px calc(var(--safe-bottom) + 8px);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--faint); padding: 4px 0; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); }
.tabbar .fab {
  justify-self: center; width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(14, 143, 106, .35); margin-top: -18px;
}
.tabbar .fab svg { width: 28px; height: 28px; }

/* ---------- forms */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 4px 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--card-2); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none;
  transition: border-color .15s; -webkit-appearance: none; appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus { border-color: var(--accent); }
textarea.input { resize: none; min-height: 110px; line-height: 1.45; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; padding: 14px; border-radius: 14px;
}
.btn:disabled { opacity: .55; }
.btn.secondary { background: var(--card-2); color: var(--text); border: 1.5px solid var(--line); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn + .btn { margin-top: 10px; }
.btn svg { width: 20px; height: 20px; }
.hint { font-size: 13px; color: var(--muted); margin: -4px 4px 12px; }
.error { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--card-2); border-radius: 12px; margin-bottom: 12px; border: 1.5px solid var(--line); }
.switch-row b { font-weight: 600; font-size: 15px; }
.switch-row small { display: block; color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 26px; height: 26px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card-2); border-radius: 12px; padding: 3px; border: 1.5px solid var(--line); margin-bottom: 12px; }
.seg button { padding: 8px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

.mic { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); color: var(--muted); box-shadow: var(--shadow); }
.mic.on { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.mic svg { width: 20px; height: 20px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(229, 72, 77, .18); } }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.examples button { font-size: 13px; padding: 6px 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }

/* ---------- sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.38); z-index: 50; animation: bd .2s ease-out; }
@keyframes bd { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 560px; margin: 0 auto;
  background: var(--card); border-radius: 24px 24px 0 0; max-height: 92dvh; display: flex; flex-direction: column;
  animation: up .28s cubic-bezier(.2,.9,.25,1); box-shadow: 0 -10px 40px rgba(0,0,0,.15);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet.closing { animation: down .2s ease-in forwards; }
@keyframes down { to { transform: translateY(100%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 4px; }
.sheet-head h3 { margin: 0; font-size: 19px; font-weight: 720; }
.sheet-grip { width: 38px; height: 5px; background: var(--line); border-radius: 9px; margin: 8px auto 0; }
.sheet-body { overflow-y: auto; padding: 8px 16px calc(var(--safe-bottom) + 18px); -webkit-overflow-scrolling: touch; }

.preview { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; background: var(--card-2); position: relative; }
.preview .head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.preview .head .emoji { width: 36px; height: 36px; font-size: 18px; }
.preview .head b { flex: 1; font-size: 15px; }
.preview .remove { color: var(--faint); width: 30px; height: 30px; display: grid; place-items: center; }
.preview .remove svg { width: 18px; height: 18px; }
.preview .input { background-color: var(--card); }
.preview .seg { background: var(--card); }
.inst-info { font-size: 13px; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 8px 10px; margin-top: -2px; margin-bottom: 12px; font-weight: 550; }
.new-cat { font-size: 12px; color: var(--accent); font-weight: 600; margin: -6px 4px 10px; }

.loading-ai { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 0 34px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .spinner { width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255,255,255,.4); border-top-color: currentColor; }

.charges-list { font-size: 14px; }
.charges-list div { display: flex; justify-content: space-between; padding: 6px 2px; border-top: 1px solid var(--line); }
.charges-list div.past { color: var(--faint); }
.charges-list div.now { font-weight: 650; color: var(--accent); }

/* ---------- reports */
.chart { width: 100%; display: block; }
.chart text { font-size: 11px; fill: var(--muted); font-family: inherit; }
.chart .val { fill: var(--text); font-weight: 600; font-size: 10.5px; }
.inst { padding: 12px 0; border-top: 1px solid var(--line); }
.inst:first-of-type { border-top: 0; }
.inst .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.inst .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.inst .mini-bar { height: 6px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.stat span { font-size: 12.5px; color: var(--muted); display: block; }
.stat b { font-size: 19px; font-weight: 720; letter-spacing: -.02em; }

/* ---------- chat */
.chat-screen { display: flex; flex-direction: column; padding-bottom: calc(var(--safe-bottom) + 168px); }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; white-space: normal; }
.msg.assistant p { margin: 0 0 8px; } .msg.assistant p:last-child { margin: 0; }
.msg.assistant ul { margin: 4px 0 8px; padding-left: 18px; } .msg.assistant li { margin: 3px 0; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-intro { text-align: center; padding: 18px 8px 8px; }
.chat-intro .ico { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); display: grid; place-items: center; margin: 0 auto 10px; font-size: 30px; }
.chat-intro h2 { margin: 0 0 4px; font-size: 20px; }
.chat-intro p { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }
.suggestions { display: grid; gap: 8px; }
.suggestions button { text-align: left; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14.5px; font-weight: 550; }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 72px); z-index: 19; padding: 8px 12px;
}
.composer form { max-width: 536px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--card); border-radius: 22px; padding: 6px 6px 6px 14px; box-shadow: 0 4px 24px rgba(0,0,0,.1); border: 1px solid var(--line); }
.composer textarea { flex: 1; border: 0; outline: none; background: none; resize: none; padding: 8px 0; max-height: 120px; font-size: 16px; line-height: 1.35; }
.composer button { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.composer button:disabled { opacity: .4; }
.composer button svg { width: 18px; height: 18px; }

/* ---------- settings */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; border-top: 1px solid var(--line); min-height: 52px; }
.list-item:first-child { border-top: 0; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body small { display: block; color: var(--muted); font-size: 12.5px; }
.list-item .val { color: var(--muted); font-size: 15px; white-space: nowrap; }
.list-item svg.chev { width: 16px; height: 16px; color: var(--faint); flex: none; }
.list-item .emoji { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
.list-item.danger { color: var(--danger); font-weight: 600; justify-content: center; }
.list-head { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 20px 16px 8px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 12px; }
.emoji-grid button { font-size: 22px; aspect-ratio: 1; border-radius: 10px; }
.emoji-grid button.on { background: var(--accent-soft); outline: 2px solid var(--accent); }

/* ---------- login */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px); max-width: 420px; margin: 0 auto; }
.login .logo { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 16px; display: block; box-shadow: 0 10px 30px rgba(11,110,82,.3); }
.login h1 { text-align: center; font-size: 30px; margin: 0 0 4px; letter-spacing: -.02em; }
.login p.lead { text-align: center; color: var(--muted); margin: 0 0 28px; }

/* ---------- toast */
#toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); transform: translate(-50%, -150%); z-index: 100;
  background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 600;
  transition: transform .3s cubic-bezier(.2,.9,.25,1); max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
#toast.show { transform: translate(-50%, 0); }
#toast.err { background: var(--danger); color: #fff; }

.skeleton { background: linear-gradient(90deg, var(--card-2), var(--line), var(--card-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
