:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --text: #1d2433;
  --muted: #8b95a7;
  --border: #eceff5;
  --primary: #4f6bed;
  --primary-soft: #eef1fe;
  --on-primary: #ffffff;
  --income: #12b76a;
  --income-soft: #e8f8f0;
  --expense: #f04438;
  --expense-soft: #fef0ef;
  --transfer: #4f6bed;
  --warn: #f79009;
  --shadow: 0 2px 14px rgba(29, 36, 51, .05);
  --radius: 20px;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.income { color: var(--income); }
.expense { color: var(--expense); }
.transfer { color: var(--transfer); }
.hidden { display: none !important; }

/* ---------- Yükleniyor ---------- */
.splash { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Düzen ---------- */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 16px) 16px calc(var(--nav-h) + var(--safe-b) + 28px);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-bottom: 10px; }
.topbar h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.topbar .back { display: flex; align-items: center; gap: 2px; background: none; border: 0; color: var(--primary); font-size: 16px; padding: 8px 4px 8px 0; font-weight: 500; }
.topbar .sub-title { font-size: 17px; font-weight: 600; margin: 0; flex: 1; text-align: center; }
.topbar .spacer { width: 64px; }

.month-switch { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 4px 0 16px; background: var(--surface); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); }
.month-switch button { background: none; border: 0; width: 40px; height: 36px; border-radius: 10px; font-size: 20px; color: var(--primary); display: grid; place-items: center; }
.month-switch button:active { background: var(--primary-soft); }
.month-switch .label { flex: 1; text-align: center; font-weight: 600; font-size: 15px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.card h3 a, .card h3 button.link { font-size: 14px; font-weight: 500; text-decoration: none; background: none; border: 0; color: var(--primary); padding: 0; }
.section-title { font-size: 16px; font-weight: 600; margin: 24px 4px 10px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title a { font-size: 14px; font-weight: 500; text-decoration: none; }

/* ---------- Ana ekran üst kısmı ---------- */
.hero { background: linear-gradient(160deg, #5b78f6 0%, #4f6bed 55%, #6a5ff0 100%); color: #fff; border-radius: 24px; padding: 18px 20px 20px; margin-bottom: 18px; box-shadow: 0 10px 30px rgba(79, 107, 237, .25); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 18px; }
.hero .hello { font-size: 15px; opacity: .9; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-month { display: flex; align-items: center; background: rgba(255,255,255,.18); border-radius: 12px; padding: 2px; }
.mini-month button { background: none; border: 0; color: #fff; width: 30px; height: 30px; font-size: 18px; border-radius: 9px; }
.mini-month button:active { background: rgba(255,255,255,.2); }
.mini-month span { font-size: 13px; font-weight: 600; padding: 0 4px; white-space: nowrap; }
.hero-label { font-size: 13px; opacity: .85; }
.hero-amount { font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 2px 0 16px; }
.hero-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-pill { background: rgba(255,255,255,.16); border-radius: 14px; padding: 10px 12px; }
.hero-pill .k { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.hero-pill .k i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; }
.hero-pill.in .k i { color: var(--income); }
.hero-pill.out .k i { color: var(--expense); }
.hero-pill .v { font-size: 17px; font-weight: 700; margin-top: 2px; }
.hero-note { font-size: 12.5px; opacity: .85; margin-top: 12px; }

/* ---------- Özet kutuları (raporlar) ---------- */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary .net { grid-column: 1 / -1; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.stat .d { font-size: 12px; margin-top: 2px; }
.net .v { font-size: 24px; }

/* ---------- Hesaplar ---------- */
.accounts-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px 6px; padding: 2px 16px 10px; scrollbar-width: none; }
.accounts-row::after { content: ""; flex: 0 0 6px; }
.accounts-row::-webkit-scrollbar { display: none; }
.acc-chip { scroll-snap-align: start; flex: 0 0 auto; min-width: 148px; background: var(--surface); border: 0; border-radius: 18px; padding: 14px; text-align: left; box-shadow: var(--shadow); }
.acc-chip .n { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.acc-chip .b { font-size: 17px; font-weight: 700; margin-top: 6px; }
.acc-chip .f { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* ---------- Listeler ---------- */
.list { background: var(--surface); 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; border: 0; border-bottom: 1px solid var(--border); width: 100%; background: none; text-align: left; }
.list .item:last-child { border-bottom: 0; }
.list button.item:active, .list a.item:active { background: var(--surface-2); }
.item .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.item .main { flex: 1; min-width: 0; }
.item .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .amt { font-weight: 600; white-space: nowrap; text-align: right; }
.item .amt.income { color: var(--income); }
.item .amt.expense { color: var(--text); }
.item .chev { color: #c3cad6; font-size: 20px; }
.day-head { display: flex; justify-content: space-between; padding: 10px 16px 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 8px; background: var(--surface-2); color: var(--muted); margin-left: 6px; font-weight: 500; vertical-align: 1px; }
.badge.future { background: #fff4e5; color: var(--warn); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .e { font-size: 36px; margin-bottom: 8px; }

/* ---------- Bütçe çubukları ---------- */
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.bar.warn > i { background: var(--warn); }
.bar.over > i { background: var(--expense); }
.budget-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.budget-row:last-child { border-bottom: 0; padding-bottom: 0; }
.budget-row:first-child { padding-top: 0; }
.budget-row .top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }

/* ---------- Grafikler ---------- */
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut-wrap svg { flex: 0 0 132px; width: 132px; height: 132px; }
.legend { flex: 1; min-width: 0; font-size: 13.5px; }
.legend .row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.legend .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .pc { color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 10px; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.cat-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.cat-row:last-child { border-bottom: 0; }
.cat-row .top { display: flex; align-items: center; gap: 10px; }
.cat-row .top .nm { flex: 1; font-weight: 500; }
.cat-row .subs { margin: 6px 0 0 34px; font-size: 13px; }
.cat-row .subs div { display: flex; justify-content: space-between; color: var(--muted); padding: 2px 0; }
.delta { font-size: 12px; }
.delta.up { color: var(--expense); }
.delta.down { color: var(--income); }

/* ---------- Segment / filtreler ---------- */
.seg { display: flex; background: #e9edf5; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 10px; font-weight: 500; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(29,36,51,.08); font-weight: 600; }
.seg button:disabled { opacity: .4; }
.seg.type button.on[data-v=expense] { color: var(--expense); }
.seg.type button.on[data-v=income] { color: var(--income); }
.seg.type button.on[data-v=transfer] { color: var(--transfer); }
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filters .search { flex: 1 1 100%; }
.filters select { flex: 1 1 0; min-width: 0; }

/* ---------- Form ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 1.5px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); outline: none; -webkit-appearance: none; appearance: none;
}
.filters .input { box-shadow: var(--shadow); border-color: transparent; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input:focus { border-color: var(--primary); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.amount-wrap { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 20px; padding: 14px; background: var(--surface-2); border-radius: 18px; }
.amount-input { font-size: 38px; font-weight: 700; text-align: center; padding: 0; border: 0 !important; background: none; letter-spacing: -.02em; width: 100%; }
.amount-input.expense { color: var(--expense); }
.amount-input.income { color: var(--income); }
.amount-input.transfer { color: var(--transfer); }
.amount-wrap span { font-size: 28px; color: var(--muted); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; background: var(--surface-2); border-radius: 14px; margin-bottom: 10px; }
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #d5dbe6; border-radius: 15px; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 26px; height: 26px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.extra { padding: 4px 2px 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 22px; border: 1.5px solid var(--border); background: var(--surface); font-size: 14px; }
.chip.on { border-color: var(--c, var(--primary)); background: var(--primary-soft); font-weight: 600; }
.chips.subs { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.chips.subs .chip { font-size: 13px; padding: 6px 11px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border: 1.5px solid transparent; background: var(--surface-2); border-radius: 12px; font-size: 20px; padding: 0; }
.emoji-grid button.on { border-color: var(--primary); background: var(--primary-soft); }
.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.colors button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; padding: 0; box-shadow: 0 0 0 1px var(--border); }
.colors button.on { box-shadow: 0 0 0 2px var(--text); }

.btn { display: block; width: 100%; padding: 15px; border-radius: 16px; border: 0; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 16px; text-align: center; text-decoration: none; }
.btn:active { opacity: .85; }
.btn:disabled { opacity: .55; }
.btn.secondary { background: var(--primary-soft); color: var(--primary); }
.btn.danger { background: var(--expense-soft); color: var(--expense); }
.btn + .btn { margin-top: 10px; }
.err { background: var(--expense-soft); color: var(--expense); padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; }

/* ---------- Giriş ---------- */
.auth { max-width: 400px; margin: 0 auto; padding: calc(var(--safe-t) + 56px) 20px 40px; }
.auth .logo { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 18px; display: block; box-shadow: 0 10px 30px rgba(79, 107, 237, .3); }
.auth h1 { text-align: center; margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; }
.auth p.lead { text-align: center; color: var(--muted); margin: 0 0 30px; }
.auth form { background: var(--surface); padding: 22px 18px 18px; border-radius: 24px; box-shadow: var(--shadow); }
.auth .alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth .alt button { background: none; border: 0; color: var(--primary); font-weight: 600; padding: 4px; }
.check-row { display: flex; gap: 8px; align-items: center; margin: 2px 0 18px; font-size: 14px; color: var(--muted); }
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ---------- Alt menü ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 -1px 0 var(--border), 0 -6px 20px rgba(29,36,51,.04);
  padding-bottom: var(--safe-b);
}
.nav-inner { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); align-items: center; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #a3acbb; text-decoration: none; font-weight: 500; }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--primary); }
.nav .add { justify-self: center; width: 56px; height: 56px; border-radius: 18px; background: var(--primary); color: #fff; border: 0; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(79, 107, 237, .35); margin-top: -20px; }
.nav .add svg { width: 28px; height: 28px; }

/* ---------- Alt sayfa (sheet) ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(29,36,51,.3); z-index: 40; animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 600px; margin: 0 auto; max-height: calc(100vh - var(--safe-t) - 20px);
  background: var(--surface); border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2,.8,.2,1);
}
.sheet::before { content: ""; width: 38px; height: 5px; border-radius: 3px; background: #dde2ea; margin: 8px auto 0; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 10px; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.sheet-head button { background: none; border: 0; color: var(--primary); font-size: 16px; padding: 6px 2px; min-width: 64px; }
.sheet-head button.save { font-weight: 700; text-align: right; }
.sheet-head button.close { text-align: left; color: var(--muted); }
.sheet-body { overflow-y: auto; padding: 8px 18px calc(var(--safe-b) + 26px); -webkit-overflow-scrolling: touch; }
.sheet-body .card { box-shadow: none; background: var(--surface-2); padding: 12px 14px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Bildirim ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); transform: translateX(-50%) translateY(20px);
  background: #1d2433; color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; z-index: 60;
  opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Daha ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: 0 0 auto; }

/* ---------- Basit işlem formu ---------- */
.chips.quick { margin: -6px 0 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.quick::-webkit-scrollbar { display: none; }
.chips.quick .chip { flex: 0 0 auto; padding: 7px 14px; background: var(--surface-2); border-color: transparent; }
.chips.quick .chip:active { background: var(--primary-soft); }
.cat-hint { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface-2); text-align: left; font-size: 15px; }
.cat-hint .k { color: var(--muted); font-size: 13px; }
.cat-hint .v { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-hint .chg { color: var(--primary); font-size: 13px; font-weight: 600; }
.cat-box { padding: 12px 2px 4px; }
.more-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 2px; border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 14px; text-align: left; }
.more-toggle .sum { color: var(--muted); font-weight: 400; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-box { padding-top: 4px; }

.credit { text-align: center; font-size: 12.5px; color: var(--muted); margin: 28px 0 0; line-height: 1.7; }
.credit b { color: var(--text); font-weight: 600; }

/* ---------- Raporlar: düz liste ---------- */
.plain-list { padding: 6px 18px 18px; }
.pl-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 4px; }
.pl-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 15.5px; }
.pl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-cnt { color: var(--muted); font-size: 12px; }
.pl-total { display: flex; justify-content: space-between; padding: 11px 0 4px; font-weight: 700; font-size: 16px; }
.pl-net { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding: 14px 16px; background: var(--primary-soft); border-radius: 14px; font-weight: 700; font-size: 18px; }
.pl-net .num { font-size: 22px; color: var(--primary); }
.pl-net .num.expense { color: var(--expense); }

/* ---------- Açılış penceresi ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }
.modal-bg { position: absolute; inset: 0; background: rgba(29,36,51,.35); animation: fade .2s ease; }
.modal { position: relative; width: 100%; max-width: 340px; background: var(--surface); border-radius: 26px; padding: 26px 22px 20px; text-align: center; box-shadow: 0 20px 60px rgba(29,36,51,.25); animation: pop .32s cubic-bezier(.2,1.3,.4,1); }
.modal-e { font-size: 54px; line-height: 1; margin-bottom: 12px; }
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.modal p { margin: 0 0 20px; color: #4b5563; line-height: 1.55; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Mobil kayma düzeltmeleri ---------- */
html, body { overflow-x: hidden; max-width: 100%; }
body { touch-action: manipulation; }
body.typing .nav { display: none; }
.row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.input, select.input { min-width: 0; max-width: 100%; }
/* iPhone'da tarih kutusu kendi genişliğini dayatıp satırı taşırıyor */
input[type=date].input { display: block; min-height: 50px; line-height: 1.2; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .5; }
.sheet { max-height: calc(100vh - var(--safe-t) - 20px); max-height: calc(100dvh - var(--safe-t) - 20px); }
.sheet-body { overscroll-behavior: contain; }
.hero-amount { overflow-wrap: anywhere; }
.chart svg, img { max-width: 100%; }

@media (max-width: 360px) {
  .hero-amount { font-size: 30px; }
  .hero-pill .v { font-size: 15px; }
  .mini-month span { font-size: 12px; }
}

@media (min-width: 720px) {
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 24px; max-height: 88vh; animation: fade .2s ease; }
  .sheet::before { display: none; }
  .sheet-head { padding-top: 14px; }
}
