:root {
  color-scheme: light;
  /* ---- ink / neutrals (light) ---- */
  --canvas: #F4F3EE; --surface: #FFFFFF; --surface-sunken: #F0EFE8; --surface-alt: #FBFBF8;
  --chip-bg: #F2F1EB;
  --border: #EEEDE6; --border-strong: #E7E6DF; --border-chip: #E4E3DC; --border-dashed: #D3D2CA; --hairline: #F4F3EE; --hairline-row: #ECEBE3;
  --ink-900: #16161A; --ink-700: #2A2A30; --ink-600: #3A3A42; --ink-500: #6A6A72; --ink-400: #7A7A82; --ink-300: #8A8A94;
  --ink-250: #9A9AA4; --ink-200: #A0A0AA; --ink-150: #B0B0BA; --ink-100: #C4C4CC; --ink-050: #D0D0D8;
  --on-ink: #FFFFFF;
  --neutral-chip-fg: #5A5A62;
  /* ---- brand + semantic ---- */
  --primary: #6D5EFC; --primary-2: #A86BFF; --primary-ink: #6A5AA8; --primary-tint: #ECE9FF;
  --success: #17A87B; --success-deep: #0E8A63; --success-tint: #E3F5EE;
  --warning: #E0A020; --warning-tint: #FFF4DA;
  --danger: #D9484D; --danger-tint: #FFEAEA;
  --save: #1F97AA; --save-tint: #E1F3F6;
  --glow-purple: rgba(138,114,255,.32); --glow-cyan: rgba(140,246,255,.34);
  --scrim: rgba(16,16,26,.4);
  --grad: linear-gradient(135deg, #6D5EFC 0%, #A86BFF 100%);
  --grad-card: linear-gradient(150deg, #6D5EFC 0%, #A86BFF 100%);
  --grad-success: linear-gradient(135deg, #17A87B, #0E8A63);
  --dark-card: #15131F;
  /* ---- radius ---- */
  --r-pill: 999px; --r-field: 12px; --r-control: 11px; --r-icon-btn: 13px; --r-icon-btn-lg: 14px;
  --r-primary: 15px; --r-tile: 16px; --r-card-sm: 16px; --r-card: 18px; --r-card-lg: 20px;
  --r-hero: 22px; --r-hero-lg: 24px; --r-sheet: 28px; --r-sheet-bottom: 34px; --r-screen: 34px; --r-device: 46px;
  /* ---- shadow ---- */
  --sh-composer: 0 18px 40px -16px rgba(40,36,70,.45);
  --sh-primary: 0 8px 18px -6px rgba(109,94,252,.6);
  --sh-thumb: 0 2px 6px -2px rgba(0,0,0,.2);
  --sh-knob: 0 1px 3px rgba(0,0,0,.2);
  --sh-toast: 0 18px 40px -14px rgba(0,0,0,.5);
  /* ---- layout ---- */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --maxw: 460px;
}
html.dark {
  color-scheme: dark;
  --canvas: #0B0B10; --surface: #191921; --surface-sunken: #14141A; --surface-alt: #14141A;
  --chip-bg: #20202A;
  --border: #26262F; --border-strong: #2A2A34; --border-chip: #2A2A34; --border-dashed: #34343E; --hairline: #22222B; --hairline-row: #24242D;
  --ink-900: #F2F1F7; --ink-700: #E4E3EC; --ink-600: #C9C8D2; --ink-500: #8C8B98; --ink-400: #7C7B88; --ink-300: #747380;
  --ink-250: #6E6D7A; --ink-200: #64636F; --ink-150: #57565F; --ink-100: #454450; --ink-050: #34343E;
  --on-ink: #16161A;
  --neutral-chip-fg: #9C9BA8;
  --primary: #6D5EFC; --primary-2: #A86BFF; --primary-ink: #C9BBFF; --primary-tint: #241E44;
  --success: #3ED6A8; --success-deep: #1FA37D; --success-tint: #123D31;
  --warning: #FFC46B; --warning-tint: #3D3320;
  --danger: #FF8F8F; --danger-tint: #3D2323;
  --save: #3ED6E8; --save-tint: #17323A;
  --glow-purple: rgba(138,114,255,.28); --glow-cyan: rgba(140,246,255,.20);
  --scrim: rgba(0,0,0,.55);
  --grad: linear-gradient(135deg, #6D5EFC 0%, #A86BFF 100%);
  --grad-card: linear-gradient(150deg, #6D5EFC 0%, #A86BFF 100%);
  --grad-success: linear-gradient(135deg, #1FA37D, #177F62);
  --dark-card: #0E0D14;
  --sh-composer: 0 18px 40px -16px rgba(0,0,0,.6);
  --sh-primary: 0 8px 18px -6px rgba(109,94,252,.5);
  --sh-toast: 0 18px 40px -14px rgba(0,0,0,.7);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  background: var(--canvas); color: var(--ink-900);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.row1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc { scrollbar-width: none; }
.sc::-webkit-scrollbar { width: 0; height: 0; }

@keyframes sheetup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes marqL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-9px) rotate(4deg); } }
@keyframes shadowpulse { 0%, 100% { transform: scaleX(1); opacity: .32; } 50% { transform: scaleX(.78); opacity: .16; } }
@keyframes blinkeye { 0%, 7%, 12%, 52%, 57%, 100% { transform: scaleY(1); } 9%, 54.5% { transform: scaleY(.08); } }
@keyframes lookaround { 0%, 22% { transform: translateX(0); } 32%, 48% { transform: translateX(3.5px); } 58%, 74% { transform: translateX(-3.5px); } 84%, 100% { transform: translateX(0); } }
@keyframes loadbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(290%); } }
@keyframes micring { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== App shell ===== */
.app { max-width: var(--maxw); margin: 0 auto; height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; position: relative; background: var(--canvas); }
.scroll { flex: 1; overflow-y: auto; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 100%); }
.scroll.locked { overflow: hidden; touch-action: none; }
.view { animation: fadein .25s ease; padding: 2px 18px 26px; }
.view.has-composer { padding-bottom: 128px; }
.view.home-view { padding: 2px 20px 128px; }

/* ===== Headers ===== */
.home-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 8px) 20px 6px; flex-shrink: 0; }
.ham-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-alt); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; color: var(--ink-700); }
.notice-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px 7px 8px; font-family: inherit; cursor: pointer; text-align: left; }
.notice-pill .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.notice-pill .tx { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--ink-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-pill .dots { display: flex; gap: 3px; flex-shrink: 0; }
.notice-pill .dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-050); }
.notice-pill .dots span.on { background: var(--primary); }
.avatar-btn { border: none; padding: 0; background: none; cursor: pointer; flex-shrink: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-family: inherit; font-weight: 700; font-size: 15px; box-shadow: var(--sh-primary); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.screen-header { display: flex; align-items: center; gap: 11px; padding: calc(var(--safe-t) + 8px) 18px 12px; flex-shrink: 0; }
.back-btn { width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--border-strong); background: var(--surface-alt); color: var(--ink-700); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.screen-title-wrap { flex: 1; min-width: 0; }
.screen-title { font-size: 19px; font-weight: 700; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-sub { font-size: 11.5px; color: var(--ink-200); }
.header-action { width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--border-strong); background: var(--surface-alt); color: var(--ink-700); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.header-action.ink { border: none; background: var(--ink-900); color: var(--on-ink); }
.header-action.text { width: auto; padding: 10px 13px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-600); }

/* ===== Icon buttons / chips ===== */
.icon-btn { width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--border-strong); background: var(--surface-alt); color: var(--ink-700); display: grid; place-items: center; cursor: pointer; }
.icon-btn.ink { border: none; background: var(--ink-900); color: var(--on-ink); }
.icon-tile { border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.icon-tile.neutral { background: var(--chip-bg); color: var(--neutral-chip-fg); }
.close-btn { border: none; background: var(--border-strong); width: 32px; height: 32px; border-radius: 50%; color: var(--ink-500); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }

.chip { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border-chip); background: var(--surface); color: var(--ink-600); border-radius: 999px; padding: 9px 15px 9px 12px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--ink-900); color: var(--on-ink); border-color: var(--ink-900); }
.chip.new { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { width: 0; height: 0; }

.seg { display: flex; background: var(--border-strong); border-radius: 14px; padding: 4px; gap: 2px; }
.seg-btn { flex: 1; border: none; font-family: inherit; font-size: 13px; font-weight: 700; padding: 8px 4px; border-radius: 11px; cursor: pointer; background: transparent; color: var(--ink-250); }
.seg-btn.on { background: var(--surface); color: var(--ink-900); box-shadow: var(--sh-thumb); }

.range-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.range-pills::-webkit-scrollbar { width: 0; height: 0; }
.range-pill { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border-chip); background: var(--surface); color: var(--ink-600); border-radius: 999px; padding: 9px 15px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.range-pill.on { background: var(--ink-900); color: var(--on-ink); border-color: var(--ink-900); }

/* ===== List rows ===== */
.row-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; font-family: inherit; cursor: pointer; }
.row-card .main { flex: 1; min-width: 0; }
.row-card .title { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink-900); }
.row-card .meta { display: block; font-size: 12px; color: var(--ink-200); }
.row-card .amt { font-size: 14.5px; font-weight: 700; flex-shrink: 0; }
.row-card .chev { color: var(--ink-100); flex-shrink: 0; }
.section-label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-200); margin: 26px 4px 10px; }
.section-label-row { display: flex; align-items: center; justify-content: space-between; margin: 26px 4px 10px; }
.section-label-row .section-label { margin: 0; }
.view-all-link { border: none; background: none; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--primary); cursor: pointer; padding: 0; }
.day-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 9px; }
.day-head .lbl { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.day-head .d { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-200); }
.day-head .date { font-size: 11.5px; font-weight: 500; color: var(--ink-150); }
.day-head .t { font-size: 12px; font-weight: 600; color: var(--ink-150); }

/* ===== Aurora + panels ===== */
.aurora-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-hero); }
.aurora-card .g1 { position: absolute; top: -64px; left: -34px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, var(--glow-purple), transparent 68%); filter: blur(6px); pointer-events: none; }
.aurora-card .g2 { position: absolute; bottom: -76px; right: -16px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--glow-cyan), transparent 66%); filter: blur(6px); pointer-events: none; }
.aurora-card .content { position: relative; }
.summary-card { padding: 17px 18px; }
.summary-meta { font-size: 12.5px; color: var(--ink-300); font-weight: 500; }
.summary-total { font-size: 29px; font-weight: 700; color: var(--ink-900); margin-top: 3px; letter-spacing: -.03em; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.stat-pair { display: flex; gap: 9px; }
.stat-tile { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card-sm); padding: 13px 14px; }
.stat-tile .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-200); }
.stat-tile .val { font-size: 18px; font-weight: 700; color: var(--ink-900); margin-top: 5px; }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 26px 4px 0; }
.empty p.lead { font-size: 24px; font-weight: 700; color: var(--ink-900); letter-spacing: -.02em; margin: 16px 0 0; }
.empty p.sub { font-size: 14.5px; line-height: 1.55; color: var(--ink-300); margin: 10px 18px 0; }

/* ===== Buttons ===== */
.btn-primary { width: 100%; border: none; border-radius: 15px; padding: 13px; font-family: inherit; font-size: 15.5px; font-weight: 700; color: #fff; cursor: pointer; background: var(--ink-900); }
.btn-primary.accent { background: var(--grad); box-shadow: 0 16px 30px -14px rgba(109,94,252,.9); }
.btn-primary.income { background: var(--grad-success); }
.btn-primary.save { background: linear-gradient(135deg, var(--save), #12707E); }
.btn-outline { width: 100%; border: 1px solid var(--border-chip); background: var(--surface); border-radius: 17px; padding: 15px; font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-600); cursor: pointer; }
.btn-danger-outline { width: 100%; background: var(--danger-tint); color: var(--danger); border: none; border-radius: 15px; padding: 11px; font-family: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }

/* ===== Composer ===== */
.composer-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: 6; pointer-events: none; background: var(--canvas); }
.composer-fade::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 26px; background: linear-gradient(to top, var(--canvas), transparent); }
.composer { position: absolute; left: 14px; right: 14px; bottom: calc(14px + var(--safe-b)); z-index: 7; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; padding: 13px 14px 11px; box-shadow: 0 8px 20px -14px rgba(40,36,70,.4); }
.composer input { width: 100%; border: none; background: none; font-family: inherit; font-size: 16px; color: var(--ink-900); outline: none; padding: 2px 4px 0; }
.composer-row2 { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.composer-row2 .left { display: flex; align-items: center; gap: 9px; }
.composer-btn { width: 40px; height: 40px; border-radius: 14px; border: 1px solid var(--hairline-row); background: var(--canvas); color: var(--ink-500); display: grid; place-items: center; cursor: pointer; }
.composer-btn.ink { border: none; background: var(--ink-900); color: var(--on-ink); }
.composer-primary { position: relative; width: 44px; height: 44px; border-radius: 15px; border: none; background: var(--ink-900); color: var(--on-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 24px -16px rgba(20,18,32,.7); }
.composer-primary.recording { background: #000; color: #fff; box-shadow: 0 12px 26px -14px rgba(0,0,0,.65); }
.mic-ring { position: absolute; inset: 0; border-radius: 15px; border: 2px solid #000; animation: micring 1.35s ease-out infinite; pointer-events: none; }
.mic-ring.delay { animation-delay: .68s; }

/* ===== Home hero + marquee ===== */
.hero-wrap { position: relative; margin-top: 2px; }
.hero-glow-a { position: absolute; top: -6px; left: -26px; width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle, rgba(138,114,255,.4), transparent 68%); filter: blur(6px); pointer-events: none; }
.hero-glow-b { position: absolute; top: 44px; right: -22px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(140,246,255,.36), transparent 66%); filter: blur(6px); pointer-events: none; }
.hero-inner { position: relative; text-align: center; padding-top: 2px; }
.balance-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.85); border-radius: 999px; padding: 5px 13px 5px 6px; backdrop-filter: blur(6px); }
html.dark .balance-badge { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
.balance-badge .lbl { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-ink); white-space: nowrap; }
.hero-amt-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.hero-amt { font-size: 44px; font-weight: 700; color: var(--ink-900); line-height: 1; }
.hero-eye { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.65); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; color: var(--ink-500); backdrop-filter: blur(6px); }
html.dark .hero-eye { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.07); }
.hero-sub { display: flex; align-items: center; justify-content: center; margin-top: 12px; font-size: 13px; color: var(--ink-300); font-weight: 500; }
.hero-sub .v { color: var(--ink-600); font-weight: 700; }
.hero-line { font-size: 22px; font-weight: 600; color: var(--ink-900); letter-spacing: -.02em; line-height: 1.3; margin-top: 26px; }

.marq-mask { margin: 0 -20px; overflow: hidden; display: flex; flex-direction: column; gap: 9px; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marq-track { display: inline-flex; gap: 8px; width: max-content; }
.marq-track.a { animation: marqL 28s linear infinite; }
.marq-track.b { animation: marqR 34s linear infinite; }
.marq-mask:active .marq-track { animation-play-state: paused; }
.mp { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border-chip); background: var(--surface); color: var(--ink-600); border-radius: 999px; padding: 9px 15px 9px 12px; font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }

.strip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.strip-card { text-align: left; font-family: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 13px; cursor: pointer; }
.strip-card .top { display: flex; align-items: center; justify-content: space-between; }
.strip-card .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; }
.strip-card .pct { font-size: 12px; font-weight: 600; color: var(--ink-200); }
.strip-card .nm { font-size: 13px; color: var(--ink-400); margin-top: 9px; }
.strip-card .amt { font-size: 17px; font-weight: 700; color: var(--ink-900); margin-top: 1px; }

/* ===== Mascot ===== */
.mascot { position: relative; }
.mascot .shadow { position: absolute; border-radius: 50%; background: var(--primary); filter: blur(7px); animation: shadowpulse 5s ease-in-out infinite; }
.mascot .head { position: absolute; border-radius: 50%; animation: floaty 5s ease-in-out infinite; }
.mascot .base { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, #3a2a8c, #241a5c); }
.mascot .face { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 34% 26%, #EFE9FF 0%, #C3B0FF 22%, #8A72FF 52%, #6046E0 78%, #4A32C0 100%); display: flex; align-items: center; justify-content: center; }
.mascot .eye { border-radius: 50%; background: radial-gradient(circle at 36% 30%, #DFFBFF 0%, #5FE3F0 38%, #12A0C4 78%, #0B6B8E 100%); animation: blinkeye 5.5s ease-in-out infinite; }
.mascot .eye.look { animation: blinkeye 5.5s ease-in-out infinite, lookaround 7s ease-in-out infinite; }
.mascot .shine { position: absolute; border-radius: 50%; background: rgba(255,255,255,.65); filter: blur(4px); transform: rotate(-24deg); }
.mascot-badge { position: relative; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 34% 26%, #EFE9FF 0%, #C3B0FF 22%, #8A72FF 52%, #6046E0 78%, #4A32C0 100%); box-shadow: inset 0 -3px 5px rgba(50,30,120,.5), inset 0 2px 4px rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; }
.mascot-badge .eye { width: 5px; height: 5px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #DFFBFF 0%, #5FE3F0 38%, #12A0C4 78%, #0B6B8E 100%); animation: blinkeye 5.5s ease-in-out infinite; }

/* ===== Sheets / dialogs ===== */
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 90; backdrop-filter: blur(0); }
.scrim.open { opacity: 1; pointer-events: auto; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 110%); width: 100%; max-width: var(--maxw); background: var(--canvas); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 16px 0 20px; box-shadow: var(--sh-composer); z-index: 91; transition: transform .3s cubic-bezier(.22,1,.36,1); max-height: 86%; overflow-y: auto; overscroll-behavior: contain; }
.sheet.open { transform: translate(-50%, 0); }
.sheet-pad { padding-left: 20px; padding-right: 20px; }
.grabber { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0 20px 12px; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink-900); }
.field { display: flex; flex-direction: column; gap: 5px; margin: 0 20px 9px; }
.field > span { font-size: 12.5px; color: var(--ink-400); font-weight: 600; }
.field input, .field select { width: 100%; border: 1px solid var(--hairline-row); background: var(--surface); border-radius: 12px; padding: 11px 14px; font-family: inherit; font-size: 15px; color: var(--ink-900); outline: none; }
.field-2 { display: flex; gap: 10px; margin: 0 20px 9px; }
.field-2 .field { flex: 1; margin: 0; }
.amount-field { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface); border: 1px solid var(--hairline-row); border-radius: 16px; padding: 13px; margin: 0 20px 10px; }
.amount-field .cur { font-size: 26px; font-weight: 600; color: var(--ink-250); }
.amount-field input { border: none; background: none; font-family: inherit; font-size: 34px; font-weight: 700; text-align: center; width: 62%; color: var(--ink-900); outline: none; }

.confirm-dialog { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.94); width: calc(100% - 56px); max-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-hero); padding: 24px 22px 20px; text-align: center; box-shadow: var(--sh-composer); z-index: 91; opacity: 0; pointer-events: none; transition: transform .22s cubic-bezier(.32,.72,0,1), opacity .2s ease; }
.confirm-dialog.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.confirm-icon { font-size: 32px; margin-bottom: 10px; }
.confirm-dialog h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--ink-900); }
.confirm-dialog p { margin: 0 0 20px; color: var(--ink-300); font-size: 13.5px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions button { flex: 1; }

.toast { position: absolute; left: 20px; right: 20px; bottom: 96px; z-index: 30; background: var(--ink-900); border-radius: 16px; padding: 14px 16px; display: none; align-items: center; gap: 11px; box-shadow: var(--sh-toast); }
.toast.show { display: flex; animation: riseup .26s ease both; }
.toast .ic { width: 26px; height: 26px; border-radius: 50%; background: var(--success); display: grid; place-items: center; flex-shrink: 0; }
.toast .tx { flex: 1; font-size: 14px; font-weight: 600; color: var(--on-ink); }

.switch { position: relative; display: inline-block; width: 46px; height: 27px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: var(--border-dashed); border-radius: 999px; transition: background .2s; cursor: pointer; }
.switch-track::before { content: ''; position: absolute; height: 21px; width: 21px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: var(--sh-knob); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::before { transform: translateX(19px); }

/* ===== Mosaic ===== */
.mosaic { display: flex; flex-direction: column; gap: 10px; }
.mosaic-row { display: flex; gap: 10px; }
.mosaic-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mosaic-tile { min-width: 0; min-height: 0; overflow: hidden; text-align: left; font-family: inherit; border: none; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; color: #fff; }
.mosaic-tile.tier1 { border-radius: 20px; padding: 16px; }
.mosaic-tile.tier2 { border-radius: 20px; padding: 12px; }
.mosaic-tile.tail { border-radius: 18px; padding: 12px; }
.mosaic-tile.crumb { border-radius: 16px; padding: 11px 12px; justify-content: flex-end; }
.mosaic-tile .ic { border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; }
.mosaic-tile .name { font-weight: 600; color: rgba(255,255,255,.82); }
.mosaic-tile .amt { font-weight: 700; color: #fff; letter-spacing: -.02em; }
.mosaic-tile .meta { font-weight: 600; color: rgba(255,255,255,.6); }

/* ===== Dark hero card (Budgets / Budget flow) ===== */
.dark-card { position: relative; overflow: hidden; border-radius: 26px; background: var(--dark-card); padding: 16px 17px 17px; }
.dark-card .glow { position: absolute; top: -96px; right: -56px; width: 210px; height: 210px; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.dark-card .grid-tex { position: absolute; inset: 0; opacity: .5; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(120% 90% at 78% 4%, #000, transparent 78%); mask-image: radial-gradient(120% 90% at 78% 4%, #000, transparent 78%); }
.dark-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); border-radius: 999px; padding: 7px 11px 7px 10px; font-family: inherit; font-size: 12.5px; font-weight: 700; color: #fff; cursor: pointer; }
.dark-hero-val { display: block; font-size: 40px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: -.03em; margin-top: 18px; }
.dark-hero-cap { font-size: 12.5px; font-weight: 600; margin-top: 7px; }
.dark-stats { position: relative; display: flex; margin-top: 20px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 15px; }
.dark-stats .st { flex: 1; min-width: 0; }
.dark-stats .st + .st { border-left: 1px solid rgba(255,255,255,.14); padding-left: 14px; margin-left: 14px; }
.dark-stats .lbl { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.55); white-space: nowrap; }
.dark-stats .val { font-size: 16px; font-weight: 700; color: #fff; margin-top: 5px; }
.tick-col { display: flex; flex-direction: column-reverse; gap: 2px; width: 6px; flex-shrink: 0; }
.tick-col span { height: 4px; border-radius: 1px; background: var(--border-dashed); }
.tick-col span.on { background: var(--primary); }

/* ===== Rings (Analytics) ===== */
.ring-row { display: flex; gap: 10px; }
.ring-cell { flex: 1; text-align: center; }
.ring-wrap { position: relative; width: 76px; height: 76px; margin: 0 auto; }
.ring-wrap .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--ink-900); }

/* ===== Splash / login / lock ===== */
.overlay-screen { position: absolute; inset: 0; z-index: 40; }
.splash { background: var(--canvas); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; overflow: hidden; cursor: pointer; }
.splash-glow-a { position: absolute; top: 22%; left: 50%; width: 340px; height: 340px; margin-left: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(138,114,255,.45), transparent 66%); filter: blur(10px); pointer-events: none; }
.splash-glow-b { position: absolute; bottom: 14%; right: -70px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(140,246,255,.26), transparent 66%); filter: blur(10px); pointer-events: none; }
.splash-word { font-size: 27px; font-weight: 700; color: var(--ink-900); letter-spacing: -.02em; text-align: center; }
.splash-tag { font-size: 13px; color: var(--ink-300); margin-top: 6px; text-align: center; }
.splash-bar-track { width: 112px; height: 3px; border-radius: 99px; background: var(--border-strong); overflow: hidden; }
.splash-bar-fill { width: 40%; height: 100%; border-radius: 99px; background: var(--grad); animation: loadbar 1.5s cubic-bezier(.4,0,.2,1) infinite; }
.splash-syncing { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-200); }

.login-screen { background: var(--canvas); overflow-y: auto; display: flex; flex-direction: column; padding: 0 24px 30px; }
.login-glow-a { position: absolute; top: -40px; left: -50px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(138,114,255,.34), transparent 68%); filter: blur(8px); pointer-events: none; }
.login-glow-b { position: absolute; top: 120px; right: -60px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(140,246,255,.32), transparent 66%); filter: blur(8px); pointer-events: none; }
.login-head { font-size: 29px; font-weight: 700; color: var(--ink-900); letter-spacing: -.02em; line-height: 1.15; margin-top: 24px; }
.login-sub { font-size: 14.5px; color: var(--ink-300); line-height: 1.5; margin-top: 11px; }
.login-btn-google { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; background: var(--surface); border: 1px solid var(--border-chip); border-radius: 16px; padding: 15px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink-900); cursor: pointer; }
.login-or { display: flex; align-items: center; gap: 12px; margin: 22px 2px; }
.login-or span.line { flex: 1; height: 1px; background: #DFDED6; }
.login-or span.tx { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #A8A8B0; }
.login-email-row { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--border-chip); border-radius: 16px; padding: 4px 15px; }
.login-email-row input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 14px 0; font-family: inherit; font-size: 15px; color: var(--ink-900); }
.login-legal { margin-top: auto; padding-top: 26px; text-align: center; font-size: 11.5px; line-height: 1.6; color: #A8A8B0; }
html.dark .login-or span.line { background: var(--border-dashed); }
html.dark .login-or span.tx, html.dark .login-legal { color: var(--ink-150); }
.login-legal a { color: var(--primary); text-decoration: none; }
.dev-login-btn { width: 100%; margin-top: 10px; background: var(--surface); border: 1px dashed var(--border-dashed); border-radius: 16px; padding: 13px; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-400); cursor: pointer; }

.lock-screen { background: var(--canvas); display: flex; flex-direction: column; align-items: center; padding: 0 24px 34px; overflow: hidden; }
.lock-glow { position: absolute; top: 8%; left: 50%; width: 300px; height: 300px; margin-left: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(138,114,255,.32), transparent 68%); filter: blur(10px); pointer-events: none; }
.lock-name { font-size: 20px; font-weight: 700; color: var(--ink-900); text-align: center; }
.lock-sub { font-size: 13.5px; color: var(--ink-300); margin-top: 6px; text-align: center; }
.lock-scan { width: min(100%, 292px); min-height: 74px; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); color: var(--ink-900); display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 13px 16px; cursor: pointer; box-shadow: var(--sh-soft); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.lock-scan:hover { border-color: rgba(109,94,252,.45); box-shadow: var(--sh-float); transform: translateY(-1px); }
.lock-scan-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.lock-scan-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.lock-scan-copy span { font-size: 15px; font-weight: 750; }
.lock-scan-copy small { font-size: 12px; color: var(--ink-250); font-weight: 600; }
.lock-scan.ok { border-color: rgba(23,168,123,.45); box-shadow: 0 12px 28px -14px rgba(23,168,123,.65); }
.lock-scan.ok .lock-scan-icon { background: var(--success-tint); color: var(--success); }
.lock-scan-text { font-size: 13.5px; font-weight: 600; color: var(--ink-600); min-height: 20px; text-align: center; }
.lock-pin-btn { border: 1px solid var(--border-strong); background: var(--surface-alt); border-radius: 14px; padding: 12px 20px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-900); cursor: pointer; }
