@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17191f;
  background: #ffffff;
  font-synthesis: none;
  --ink: #17191f;
  --muted: #65666b;
  --line: #e6e6e6;
  --soft: #f7f7f7;
  --accent: #d7373f;
  --accent-strong: #c92832;
  --accent-soft: #fff5f5;
  --shadow: 0 7px 24px rgba(29, 31, 38, .08), 0 1px 3px rgba(29, 31, 38, .06);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lock-screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #fff 0%, #fff8f8 100%); }
.lock-card { width: min(100%, 390px); padding: 36px 30px 31px; text-align: center; background: rgba(255,255,255,.96); border: 1px solid #edcfd0; border-radius: 25px; box-shadow: 0 18px 50px rgba(29,31,38,.11); }
.lock-mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 19px; border-radius: 20px; color: #fff; background: var(--accent); }
.lock-mark svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lock-kicker { margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.lock-card h1 { margin: 0; color: var(--ink); font-size: 30px; letter-spacing: -.05em; }
.lock-copy { margin: 11px auto 25px; max-width: 280px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.lock-form input { display: block; width: 100%; height: 58px; border: 1px solid #d9d9d9; border-radius: 14px; padding: 0 18px; outline: none; text-align: center; color: var(--ink); font-size: 27px; letter-spacing: .36em; transition: border-color .18s ease, box-shadow .18s ease; }
.lock-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(215,55,63,.11); }
.lock-form button { width: 100%; height: 52px; margin-top: 13px; border: 0; border-radius: 14px; color: #fff; background: var(--accent); font-weight: 600; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.lock-form button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.passcode-error { margin: 12px 0 0; color: var(--accent-strong); font-size: 13px; }
body.locked .app-shell { filter: blur(14px); pointer-events: none; user-select: none; }
body:not(.locked) .lock-screen { display: none; }

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #fff; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 3px solid rgba(215, 55, 63, .3); outline-offset: 3px; }
.app-shell { width: min(100%, 784px); min-height: 100vh; margin: 0 auto; padding: 26px 28px 40px; overflow: hidden; position: relative; background: #fff; }
.topbar { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 22px; margin-bottom: 38px; position: relative; }
.topbar h1 { font-size: clamp(24px, 3.7vw, 31px); letter-spacing: -.04em; line-height: 1; margin: 0; font-weight: 700; }
.icon-button { width: 64px; height: 64px; border: 0; background: #fff; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.icon-button:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(29,31,38,.12); }
.icon-button svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top-actions { display: flex; gap: 18px; position: relative; }
.menu-popover { position: absolute; z-index: 4; top: 74px; right: 0; width: 180px; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.menu-popover button { border: 0; background: transparent; display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.menu-popover button:hover { background: var(--soft); }
.balance-section { padding: 0 6px 35px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 22px; line-height: 1; margin-bottom: 12px; letter-spacing: -.03em; }
.eye-toggle { display: inline-grid; place-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; }
.eye-toggle svg { width: 29px; height: 29px; fill: none; stroke: #55575c; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.balance-amount { font-size: clamp(47px, 8vw, 74px); line-height: .98; letter-spacing: -.064em; font-weight: 700; white-space: nowrap; margin-bottom: 28px; transition: filter .2s ease; }
.balance-amount.is-hidden { filter: blur(12px); user-select: none; }
.investment-pill { display: inline-flex; align-items: center; gap: 10px; border: 1.5px solid #ebb2b4; background: #fff; color: var(--accent); border-radius: 25px; padding: 10px 22px; font-size: 22px; letter-spacing: -.03em; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.investment-pill:hover { background: var(--accent-soft); transform: translateY(-1px); }
.trend-icon { width: 27px; height: 27px; display: inline-grid; place-items: center; }
.trend-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.progress-card, .categories-card { border: 1px solid #ececec; border-radius: 22px; box-shadow: var(--shadow); background: #fff; }
.progress-card { padding: 27px 26px 24px; margin-bottom: 22px; }
.progress-heading, .progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--muted); font-size: 21px; letter-spacing: -.035em; }
.progress-heading strong { color: var(--accent-strong); font-size: 23px; }
.progress-track { height: 27px; border-radius: 99px; background: #f1f1f1; margin: 23px 0 18px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 90%; border-radius: inherit; background: linear-gradient(90deg, #fc4b51, #f43d45); }
.progress-meta { font-size: 21px; }
.categories-card { padding: 26px 25px 21px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px; }
.section-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.grid-button { border: 0; background: transparent; width: 32px; height: 32px; padding: 3px; cursor: pointer; color: #65666b; }
.grid-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.category-chip { min-width: 0; min-height: 57px; display: flex; align-items: center; justify-content: flex-start; gap: 11px; padding: 9px 15px; border-radius: 15px; border: 1px solid #dedede; background: #fff; font-size: 20px; white-space: nowrap; letter-spacing: -.045em; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.category-chip:hover { transform: translateY(-1px); border-color: #c3c3c3; }
.category-chip.selected { border-color: #e2777a; color: var(--accent); background: #fffafa; box-shadow: inset 0 0 0 1px rgba(215,55,63,.08); }
.chip-icon { flex: 0 0 27px; width: 27px; height: 27px; display: inline-grid; place-items: center; color: #202226; }
.selected .chip-icon { color: var(--accent); }
.chip-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.currency-row { margin-top: 20px; width: 100%; min-height: 63px; display: flex; align-items: center; gap: 14px; border: 1px solid #dedede; border-radius: 17px; background: #fff; padding: 12px 17px; cursor: pointer; font-size: 20px; letter-spacing: -.035em; text-align: left; }
.currency-row:hover { background: #fdfdfd; border-color: #c8c8c8; }
.currency-row strong { font-weight: 600; color: #17191f; }
.dot { font-size: 23px; margin-left: 1px; }
.globe-icon { color: #292b30; width: 29px; height: 29px; display: inline-grid; place-items: center; }
.globe-icon svg, .chevron { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.chevron { margin-left: auto; width: 23px; height: 23px; }
.notice { display: flex; align-items: center; gap: 17px; margin-top: 21px; min-height: 86px; padding: 18px 24px; border: 1px solid #edc2c3; border-radius: 22px; background: #fffafa; color: #202226; }
.notice p { margin: 0; font-size: 20px; line-height: 1.35; letter-spacing: -.035em; }
.notice strong { color: var(--accent); }
.info-icon { flex: 0 0 36px; width: 36px; height: 36px; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); display: grid; place-items: center; font-size: 25px; font-weight: 600; line-height: 1; }
.bottom-fade { height: 90px; margin: 28px -28px -40px; background: linear-gradient(to bottom, rgba(250,250,250,0), #fafafa); }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translateX(-50%); z-index: 8; background: #191b20; color: white; border-radius: 99px; padding: 12px 18px; box-shadow: var(--shadow); font-size: 13px; }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  .app-shell { padding: 24px 28px 38px; }
  .topbar { grid-template-columns: 57px 1fr auto; gap: 16px; margin-bottom: 39px; }
  .icon-button { width: 57px; height: 57px; }
  .icon-button svg { width: 26px; height: 26px; }
  .top-actions { gap: 13px; }
  .topbar h1 { font-size: 25px; }
  .balance-section { padding-bottom: 34px; }
  .eyebrow { font-size: 20px; }
  .balance-amount { font-size: clamp(47px, 11.8vw, 68px); }
  .investment-pill { font-size: 19px; padding: 9px 21px; }
  .progress-heading, .progress-meta { font-size: 18px; }
  .progress-heading strong { font-size: 19px; }
  .progress-card { padding: 25px 24px 23px; }
  .progress-track { height: 26px; margin-top: 21px; }
  .categories-card { padding: 25px 24px 20px; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
  .category-chip { min-height: 58px; padding: 8px 12px; gap: 9px; font-size: 17px; }
  .chip-icon, .chip-icon svg { width: 25px; height: 25px; }
  .currency-row { font-size: 18px; }
  .notice { padding: 17px 22px; }
  .notice p { font-size: 18px; }
}

@media (max-width: 560px) {
  .app-shell { padding: 22px 17px 33px; }
  .topbar { grid-template-columns: 52px 1fr auto; gap: 12px; margin-bottom: 36px; }
  .icon-button { width: 52px; height: 52px; }
  .top-actions { gap: 8px; }
  .topbar h1 { font-size: 22px; }
  .balance-section { padding: 0 4px 29px; }
  .balance-amount { font-size: clamp(43px, 11vw, 62px); letter-spacing: -.07em; margin-bottom: 24px; }
  .progress-card { padding: 22px 20px 20px; border-radius: 18px; margin-bottom: 19px; }
  .progress-heading, .progress-meta { font-size: 14px; gap: 8px; }
  .progress-heading strong { font-size: 17px; }
  .progress-track { height: 24px; margin: 19px 0 15px; }
  .categories-card { padding: 21px 18px 18px; border-radius: 18px; }
  .section-heading { margin-bottom: 16px; }
  .section-heading h2 { font-size: 23px; }
  .category-grid { gap: 5px; grid-template-columns: 1.25fr 1.15fr 1.1fr 1.45fr; }
  .category-chip { min-height: 52px; padding: 7px 4px; gap: 3px; border-radius: 13px; font-size: 10px; letter-spacing: -.055em; }
  .chip-icon, .chip-icon svg { width: 16px; height: 16px; flex-basis: 16px; }
  .currency-row { min-height: 54px; margin-top: 16px; padding: 10px 13px; gap: 10px; font-size: 15px; }
  .globe-icon, .globe-icon svg { width: 24px; height: 24px; }
  .chevron { width: 20px; height: 20px; }
  .notice { gap: 12px; margin-top: 18px; min-height: 82px; padding: 15px 16px; border-radius: 18px; }
  .notice p { font-size: 15px; }
  .info-icon { flex-basis: 31px; width: 31px; height: 31px; font-size: 20px; }
  .bottom-fade { margin-left: -17px; margin-right: -17px; margin-bottom: -33px; }
}

@media (max-width: 370px) {
  .topbar h1 { font-size: 19px; }
  .top-actions .icon-button:first-child { display: none; }
  .category-grid { gap: 6px; }
  .category-chip { padding-inline: 7px; font-size: 12px; }
  .chip-icon, .chip-icon svg { width: 18px; height: 18px; flex-basis: 18px; }
  .progress-heading, .progress-meta { font-size: 12px; }
}
