:root {
  --green-900: #0a4b36;
  --green-800: #0f6b4b;
  --green-700: #13845d;
  --green-100: #ddf5e9;
  --gold-700: #9a6c0b;
  --gold-500: #d6a62f;
  --gold-100: #fff4cf;
  --cream: #f8f5ec;
  --white: #ffffff;
  --ink: #18231f;
  --muted: #6c7973;
  --line: #e2e9e5;
  --danger: #b93838;
  --danger-bg: #fff0f0;
  --warning: #7a5713;
  --warning-bg: #fff6dc;
  --shadow: 0 24px 60px rgba(16, 62, 46, .16);
  --soft-shadow: 0 8px 24px rgba(16, 62, 46, .08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214,166,47,.18), transparent 28%),
    linear-gradient(135deg, #eef7f2, #f7f2e6 55%, #e6f5ed);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(19,132,93,.28); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(360px, 470px);
  justify-content: center;
  align-items: center;
  gap: 48px;
  padding: 36px;
}

.prototype-panel { max-width: 360px; }
.prototype-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15,107,75,.1);
  color: var(--green-800);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.prototype-panel h1 { margin: 22px 0 4px; font-size: clamp(3rem, 7vw, 5.8rem); line-height: .9; color: var(--green-900); }
.prototype-panel p { color: #4b5e56; line-height: 1.7; font-size: 1.02rem; }
.flow-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0; font-weight: 750; color: var(--green-800); }
.flow-line span { background: var(--white); border: 1px solid rgba(15,107,75,.14); padding: 8px 10px; border-radius: 999px; box-shadow: var(--soft-shadow); }
.flow-line i { font-style: normal; color: var(--gold-700); }
.demo-help { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 14px; }
.demo-help code { padding: 5px 8px; background: var(--green-900); color: white; border-radius: 8px; letter-spacing: .12em; }

.phone-frame {
  position: relative;
  width: 100%;
  min-height: 820px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f8faf8;
  border: 8px solid rgba(15,72,53,.9);
  border-radius: 38px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(15,107,75,.3) transparent;
}
.phone-frame::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  width: 106px;
  height: 24px;
  margin: 0 auto -24px;
  border-radius: 0 0 16px 16px;
  background: rgba(15,72,53,.9);
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 12px;
  background: rgba(248,250,248,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,233,229,.8);
}
.topbar-eyebrow { display: block; font-size: .67rem; letter-spacing: .18em; color: var(--green-700); font-weight: 800; }
.mobile-topbar strong { font-size: .98rem; }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-weight: 800; }
.icon-btn.surface { background: var(--white); box-shadow: var(--soft-shadow); }

.screen { display: none; min-height: 760px; padding: 24px 18px 104px; animation: fadeSlide .34s ease; }
.screen.active { display: block; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.splash-screen { position: relative; overflow: hidden; min-height: 804px; padding: 0; background: linear-gradient(155deg, var(--green-900), #0f7b56 62%, #2a9a6e); color: white; }
.splash-content { position: relative; z-index: 2; min-height: 804px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 42px; }
.brand-mark { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 26px; background: linear-gradient(145deg, #f7d970, #c89217); color: var(--green-900); font-size: 2.7rem; font-weight: 900; box-shadow: 0 18px 36px rgba(0,0,0,.18); }
.splash-content .eyebrow { letter-spacing: .34em; font-size: .78rem; margin: 26px 0 0; opacity: .78; }
.splash-content h2 { margin: 8px 0 12px; font-size: 3.6rem; letter-spacing: -.05em; }
.splash-content > p:last-of-type { max-width: 310px; line-height: 1.6; color: rgba(255,255,255,.82); margin-bottom: 28px; }
.splash-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .16; background: #fff; }
.orb-one { width: 260px; height: 260px; top: -90px; right: -80px; }
.orb-two { width: 330px; height: 330px; bottom: -130px; left: -140px; }

.home-header { display: flex; justify-content: space-between; align-items: center; margin: 26px 2px 22px; }
.home-header h2 { margin: 3px 0 0; font-size: 1.65rem; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--green-800), var(--green-700)); color: white; font-weight: 800; }
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.balance-card { min-height: 166px; padding: 16px; border-radius: var(--radius-lg); display: flex; flex-direction: column; box-shadow: var(--soft-shadow); }
.balance-card strong { margin-top: 20px; font-size: 1.18rem; }
.balance-card > span { font-size: .76rem; margin-top: 4px; opacity: .72; }
.gold-card { background: linear-gradient(145deg, #fff6d9, #f4d36a); color: #5b430b; }
.wallet-card { background: linear-gradient(145deg, #0f6b4b, #0a4b36); color: white; }
.balance-label { font-size: .77rem; font-weight: 800; }
.text-btn { margin-top: auto; padding: 8px 0 0; border: 0; background: transparent; color: inherit; text-align: left; font-size: .75rem; font-weight: 800; }
.section-title { margin: 25px 2px 14px; font-size: 1rem; }
.quick-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-menu button { min-width: 0; border: 0; background: white; border-radius: 16px; padding: 13px 6px 11px; box-shadow: var(--soft-shadow); color: var(--ink); }
.quick-menu span { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 8px; border-radius: 12px; background: var(--green-100); color: var(--green-800); font-size: 1.05rem; font-weight: 900; }
.quick-menu small { display: block; font-size: .68rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card { margin-top: 18px; min-height: 190px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; padding: 20px; border-radius: 24px; background: linear-gradient(145deg, var(--green-900), #0e8059); color: white; overflow: hidden; box-shadow: var(--soft-shadow); }
.hero-card h3 { margin: 12px 0 7px; font-size: 1.35rem; }
.hero-card p { margin: 0 0 18px; font-size: .82rem; line-height: 1.55; color: rgba(255,255,255,.76); }
.hero-pill { display: inline-flex; border-radius: 999px; padding: 5px 9px; background: rgba(255,255,255,.14); font-size: .68rem; font-weight: 800; }
.hero-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 2.5rem; transform: rotate(4deg); }
.hero-visual span { font-size: 1.2rem; opacity: .7; }
.insight-card { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 15px; border-radius: 18px; background: white; box-shadow: var(--soft-shadow); }
.insight-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; background: var(--green-100); border-radius: 14px; }
.insight-card strong { font-size: .86rem; }
.insight-card p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; font-size: .75rem; }
.demo-toggle-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; position: relative; margin-top: 12px; padding: 15px; border-radius: 18px; background: white; box-shadow: var(--soft-shadow); }
.demo-toggle-card strong { font-size: .84rem; }
.demo-toggle-card p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.demo-toggle-card input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { width: 46px; height: 26px; padding: 3px; border-radius: 999px; background: #ccd7d2; transition: .2s ease; }
.toggle-ui::after { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 2px 8px rgba(0,0,0,.18); transition: .2s ease; }
.demo-toggle-card input:checked + .toggle-ui { background: var(--green-700); }
.demo-toggle-card input:checked + .toggle-ui::after { transform: translateX(20px); }
.demo-toggle-card input:focus-visible + .toggle-ui { outline: 3px solid rgba(19,132,93,.28); outline-offset: 3px; }

.btn { min-height: 48px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.btn-primary { background: linear-gradient(145deg, var(--green-700), var(--green-900)); color: white; box-shadow: 0 10px 24px rgba(15,107,75,.22); }
.btn-secondary { background: white; color: var(--green-800); border: 1px solid var(--line); }
.btn-light { background: white; color: var(--green-900); }
.btn-ghost { background: transparent; color: var(--green-800); border: 1px dashed rgba(15,107,75,.35); }
.btn-wide { width: 100%; margin-top: 12px; }
.button-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 14px; }

.stepper { display: flex; align-items: flex-start; justify-content: center; margin: 8px 2px 26px; }
.stepper span { position: relative; width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #edf1ef; color: #8a9691; font-size: .8rem; font-weight: 900; }
.stepper span small { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .58rem; font-weight: 750; color: var(--muted); }
.stepper span.active { background: var(--green-800); color: white; box-shadow: 0 8px 18px rgba(15,107,75,.22); }
.stepper span.done { background: var(--green-100); color: var(--green-800); }
.stepper i { width: 42px; height: 3px; margin-top: 18px; background: #e3e9e6; }
.stepper i.done { background: #9dd7bd; }

.mini-balance, .wallet-mini { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 18px; background: linear-gradient(145deg, #fff9e8, #fff1bf); border: 1px solid #f0dda0; }
.mini-balance span, .wallet-mini span { display: block; font-size: .72rem; color: var(--muted); }
.mini-balance strong, .wallet-mini strong { display: block; margin-top: 4px; font-size: 1.02rem; }
.gold-dot { font-size: 1.4rem !important; color: var(--gold-500) !important; }
.wallet-mini { background: var(--green-100); border-color: #bee8d5; }

.form-card, .estimate-card, .summary-card, .receipt-card, .selected-merchant, .custom-merchant, .merchant-header-card, .transaction-link-card, .gold-chart { margin-top: 14px; padding: 18px; border-radius: var(--radius-lg); background: white; box-shadow: var(--soft-shadow); }
.form-card label, .custom-merchant label { font-size: .78rem; font-weight: 800; }
.money-input-wrap { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 11px 14px; background: #f7faf8; border: 1.5px solid var(--line); border-radius: 15px; }
.money-input-wrap:focus-within { border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(19,132,93,.08); }
.money-input-wrap > span { color: var(--muted); font-weight: 800; }
.money-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1.75rem; font-weight: 900; }
.field-hint, .field-error { margin: 7px 0 0; min-height: 18px; font-size: .7rem; }
.field-hint { color: var(--muted); }
.field-error { color: var(--danger); }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.quick-amounts button { border: 1px solid var(--line); background: white; color: var(--green-800); border-radius: 999px; padding: 7px 10px; font-size: .68rem; font-weight: 800; }
.quick-amounts button.active { background: var(--green-800); color: white; border-color: var(--green-800); }
.estimate-header { display: flex; align-items: center; justify-content: space-between; }
.estimate-header h3, .summary-card h3 { margin: 0 0 12px; font-size: .98rem; }
.info-dot { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--green-100); color: var(--green-800); font-weight: 900; }
dl { margin: 0; }
dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
dl > div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: .75rem; }
dd { margin: 0; text-align: right; font-size: .76rem; font-weight: 800; }
.total-row { margin-top: 4px; padding-top: 14px !important; border-top: 1px solid var(--line); }
.total-row dd { color: var(--green-800); font-size: .92rem; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 13px 14px; border-radius: 15px; font-size: .73rem; line-height: 1.5; }
.notice p { margin: 0; }
.notice.neutral { background: #eef6f2; color: #3d5a4f; }
.notice.warning { background: var(--warning-bg); color: var(--warning); }
.notice.success { background: var(--green-100); color: var(--green-900); }
.check-card { display: flex; gap: 11px; align-items: flex-start; margin-top: 14px; padding: 15px; border-radius: 15px; background: white; border: 1px solid var(--line); font-size: .76rem; line-height: 1.45; }
.check-card input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--green-800); }

.processing-visual { text-align: center; padding: 18px 0 12px; }
.loader-ring { width: 82px; height: 82px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; border: 5px solid #dcebe4; border-top-color: var(--green-700); animation: spin 1s linear infinite; }
.loader-ring span { animation: counterSpin 1s linear infinite; font-size: 1.8rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counterSpin { to { transform: rotate(-360deg); } }
.processing-visual h2 { margin: 0; font-size: 1.2rem; }
.processing-visual p { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.status-timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.status-timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; min-height: 62px; color: #8c9993; }
.status-timeline li::after { content: ""; position: absolute; left: 13px; top: 28px; width: 2px; height: calc(100% - 4px); background: #e0e8e4; }
.status-timeline li:last-child::after { display: none; }
.status-timeline li > span { z-index: 1; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #dce6e1; background: white; }
.status-timeline li strong { display: block; font-size: .8rem; margin-top: 3px; }
.status-timeline li small { display: block; margin-top: 3px; font-size: .68rem; }
.status-timeline li.active, .status-timeline li.done { color: var(--ink); }
.status-timeline li.active > span { border-color: var(--green-700); box-shadow: 0 0 0 6px rgba(19,132,93,.08); }
.status-timeline li.done > span { border-color: var(--green-700); background: var(--green-700); }
.status-timeline li.done > span::after { content: "✓"; display: grid; place-items: center; color: white; font-size: .7rem; font-weight: 900; }
.status-timeline li.issue { color: var(--warning); }
.status-timeline li.issue > span { border-color: var(--gold-500); background: var(--warning-bg); }

.success-hero, .failure-hero { text-align: center; padding: 22px 10px 6px; }
.success-icon, .failure-icon { width: 82px; height: 82px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--green-100); color: var(--green-800); font-size: 2rem; font-weight: 900; box-shadow: 0 12px 28px rgba(15,107,75,.14); }
.failure-icon { background: var(--danger-bg); color: var(--danger); }
.success-kicker, .failure-hero > span { color: var(--green-700); font-size: .73rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.failure-hero > span { color: var(--danger); }
.success-hero h2, .failure-hero h2 { margin: 8px 0 6px; font-size: 1.45rem; }
.success-hero p, .failure-hero p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .77rem; }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(19,132,93,.08); } }
.receipt-card.compact { padding: 15px 18px; }

.scanner-card { margin-top: 8px; text-align: center; padding: 18px; border-radius: 22px; background: linear-gradient(145deg, #0d513c, #13845d); color: white; box-shadow: var(--soft-shadow); }
.scanner-corners { position: relative; width: 172px; height: 172px; margin: 0 auto 14px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.18); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.06); }
.scanner-corners::before, .scanner-corners::after { content: ""; position: absolute; inset: 15px; border: 3px solid transparent; border-top-color: white; border-left-color: white; border-radius: 10px; }
.scanner-corners::after { transform: rotate(180deg); }
.scan-line { position: absolute; left: 18px; right: 18px; height: 2px; background: #f6d16a; box-shadow: 0 0 12px #f6d16a; animation: scan 2.3s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(-58px); } 50% { transform: translateY(58px); } }
.scanner-symbol { font-size: 3rem; opacity: .86; }
.scanner-card h3 { margin: 0; }
.scanner-card p { margin: 6px 0 0; color: rgba(255,255,255,.75); font-size: .72rem; }
.merchant-list { display: grid; gap: 9px; margin-top: 14px; }
.merchant-option { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: white; text-align: left; color: var(--ink); box-shadow: 0 4px 16px rgba(16,62,46,.04); }
.merchant-option > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--green-100); }
.merchant-option strong, .merchant-option small { display: block; }
.merchant-option strong { font-size: .78rem; }
.merchant-option small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.merchant-option b { font-size: .73rem; }
.merchant-option.active { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(19,132,93,.08); }
.selected-merchant > div { display: flex; justify-content: space-between; gap: 15px; padding: 7px 0; }
.selected-merchant span { color: var(--muted); font-size: .72rem; }
.selected-merchant strong { font-size: .76rem; }
.merchant-header-card { text-align: center; }
.merchant-logo { width: 58px; height: 58px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 18px; background: var(--green-100); color: var(--green-800); font-size: 1.7rem; }
.merchant-header-card span { color: var(--muted); font-size: .72rem; }
.merchant-header-card h2 { margin: 6px 0 8px; font-size: 1.15rem; }
.merchant-header-card > strong { font-size: 1.8rem; color: var(--green-800); }
.linked-label { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--green-100); color: var(--green-900); font-size: .7rem; font-weight: 800; }
.transaction-link-card { padding: 16px; }
.transaction-node { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.transaction-node > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green-700); color: white; font-size: .76rem; font-weight: 900; }
.transaction-node strong, .transaction-node small { display: block; }
.transaction-node strong { font-size: .78rem; }
.transaction-node small { margin-top: 3px; color: var(--green-700); font-size: .67rem; }
.connector { position: relative; min-height: 54px; margin-left: 16px; border-left: 2px dashed #9dd7bd; }
.connector span { position: absolute; top: 17px; left: 15px; padding: 5px 8px; border-radius: 999px; background: var(--green-100); color: var(--green-900); font-size: .58rem; font-weight: 800; }

.history-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.history-filter button { flex: 0 0 auto; border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 999px; padding: 8px 12px; font-size: .68rem; font-weight: 800; }
.history-filter button.active { background: var(--green-800); color: white; border-color: var(--green-800); }
.history-list { display: grid; gap: 10px; margin-top: 14px; }
.history-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 13px; background: white; border-radius: 16px; border: 1px solid var(--line); }
.history-item .history-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--green-100); }
.history-item strong, .history-item small { display: block; }
.history-item strong { font-size: .76rem; }
.history-item small { margin-top: 3px; color: var(--muted); font-size: .64rem; }
.history-item .amount { text-align: right; font-size: .72rem; font-weight: 850; }
.linked-badge { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 999px; background: var(--gold-100); color: var(--gold-700); font-size: .55rem; font-weight: 900; }
.empty-state { text-align: center; padding: 45px 20px; color: var(--muted); }
.empty-state span { display: block; font-size: 2rem; margin-bottom: 8px; }

.gold-detail-hero { margin-top: 8px; padding: 24px; border-radius: 24px; background: linear-gradient(145deg, #fff2bc, #e6bd42); color: #604606; text-align: center; box-shadow: var(--soft-shadow); }
.gold-detail-hero span { font-size: .72rem; }
.gold-detail-hero h2 { margin: 8px 0 3px; font-size: 2rem; }
.gold-detail-hero p { margin: 0; font-size: .8rem; }
.gold-chart { height: 160px; display: flex; align-items: flex-end; gap: 8px; }
.gold-chart span { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(to top, var(--green-800), #74c9a5); }

.bottom-nav { position: sticky; bottom: 0; z-index: 14; display: grid; grid-template-columns: repeat(5, 1fr); padding: 9px 8px 12px; background: rgba(255,255,255,.95); backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -8px 25px rgba(16,62,46,.06); }
.bottom-nav button { border: 0; background: transparent; color: #89958f; }
.bottom-nav span, .bottom-nav small { display: block; }
.bottom-nav span { font-size: 1.05rem; }
.bottom-nav small { margin-top: 3px; font-size: .56rem; font-weight: 800; }
.bottom-nav button.active { color: var(--green-800); }
.reset-demo { position: fixed; right: max(calc((100vw - 470px)/2 + 18px), 22px); bottom: 94px; z-index: 16; border: 0; border-radius: 999px; padding: 9px 12px; background: rgba(10,75,54,.92); color: white; font-size: .65rem; font-weight: 800; box-shadow: var(--soft-shadow); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(8,30,23,.55); backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(100%, 400px); max-height: 90vh; overflow-y: auto; padding: 22px; border-radius: 26px; background: white; box-shadow: var(--shadow); animation: modalIn .25s ease; }
@keyframes modalIn { from { transform: translateY(18px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f0f4f2; color: var(--ink); font-size: 1.2rem; }
.modal-handle { width: 42px; height: 4px; margin: -7px auto 14px; border-radius: 999px; background: #d8e0dc; }
.pin-card { text-align: center; }
.pin-card .eyebrow { color: var(--green-700); font-size: .65rem; letter-spacing: .18em; font-weight: 900; }
.pin-card h2 { margin: 3px 0 5px; }
.pin-card > p:not(.eyebrow):not(.pin-error) { margin: 0; color: var(--muted); font-size: .73rem; }
.pin-dots { display: flex; justify-content: center; gap: 10px; margin: 22px 0 8px; }
.pin-dots span { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #c9d4cf; }
.pin-dots span.filled { background: var(--green-800); border-color: var(--green-800); }
.pin-dots.shake { animation: shake .35s ease; }
@keyframes shake { 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }
.pin-error { min-height: 18px; color: var(--danger); font-size: .68rem; }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pin-keypad button { min-height: 48px; border: 0; border-radius: 14px; background: #f3f7f5; color: var(--ink); font-weight: 900; }
.pin-keypad .key-muted { color: var(--muted); font-size: .68rem; }
.receipt-modal-card { text-align: center; }
.receipt-brand { color: var(--green-800); font-weight: 950; letter-spacing: .18em; }
.receipt-status { width: 58px; height: 58px; display: grid; place-items: center; margin: 14px auto 8px; border-radius: 50%; background: var(--green-100); color: var(--green-800); font-size: 1.5rem; font-weight: 900; }
.receipt-modal-card h2 { margin: 8px 0 4px; font-size: 1.2rem; }
.receipt-modal-card > p { margin: 0 0 14px; font-size: .7rem; }
.receipt-modal-card dl { text-align: left; }

.tooltip { position: fixed; z-index: 120; max-width: 220px; padding: 9px 11px; border-radius: 10px; background: var(--ink); color: white; font-size: .65rem; line-height: 1.4; box-shadow: var(--soft-shadow); }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 150; transform: translate(-50%, 120px); opacity: 0; max-width: min(90vw, 420px); padding: 12px 16px; border-radius: 13px; background: #14231d; color: white; font-size: .72rem; box-shadow: var(--shadow); transition: .3s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 900px) {
  body { background: #f8faf8; }
  .app-shell { display: block; padding: 0; }
  .prototype-panel { display: none; }
  .phone-frame { min-height: 100vh; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .phone-frame::before { display: none; }
  .screen { min-height: calc(100vh - 80px); }
  .splash-screen, .splash-content { min-height: 100vh; }
  .reset-demo { right: 16px; bottom: 88px; }
}

@media (max-width: 390px) {
  .screen { padding-left: 14px; padding-right: 14px; }
  .balance-grid { grid-template-columns: 1fr; }
  .balance-card { min-height: 142px; }
  .quick-menu { gap: 7px; }
  .stepper i { width: 28px; }
  .button-row { grid-template-columns: 1fr; }
}
