/* noto-sans-thai-thai-wght-normal */
@font-face {
  font-family: 'Noto Sans Thai Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../webfonts/noto-sans-thai-thai-wght-normal.woff2) format('woff2');
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}

/* noto-sans-thai-latin-ext-wght-normal */
@font-face {
  font-family: 'Noto Sans Thai Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../webfonts/noto-sans-thai-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* noto-sans-thai-latin-wght-normal */
@font-face {
  font-family: 'Noto Sans Thai Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../webfonts/noto-sans-thai-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root{
  --bg:#fbf8ef;--paper:#fffdf8;--paper-soft:#fff8df;--paper-strong:#fff2bd;
  --yellow:#f5d66f;--yellow-deep:#d7ad35;--yellow-soft:#fff1b8;
  --ink:#342f28;--ink-2:#5f574d;--muted:#8c8376;--line:#e9e0d1;
  --green:#47745a;--green-soft:#edf6ee;--red:#b85d51;--red-soft:#fff0ec;--blue:#61768d;
  --shadow-sm:0 4px 14px rgba(72,58,35,.06);--shadow:0 12px 34px rgba(72,58,35,.09);--shadow-float:0 20px 56px rgba(72,58,35,.17);
  --radius-sm:14px;--radius:20px;--radius-lg:28px;--nav-h:76px;
}
*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;color:var(--ink);background:linear-gradient(180deg,#fffaf0 0,#fbf8ef 34rem);font-family:Inter,"Noto Sans Thai",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid rgba(215,173,53,.28);outline-offset:2px}.ui-icon{width:1.15em;height:1.15em;display:inline-block;vertical-align:-.17em}.app-shell{width:min(1120px,100%);min-height:100dvh;margin:auto}.content{padding:0 18px calc(112px + env(safe-area-inset-bottom))}.topbar{height:72px;position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;padding:10px 18px;background:rgba(251,248,239,.86);backdrop-filter:blur(18px);border-bottom:1px solid transparent;transition:.2s ease}.topbar.scrolled{border-bottom-color:rgba(233,224,209,.85);box-shadow:0 4px 20px rgba(61,48,29,.06)}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{width:40px;height:40px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(145deg,#ffeaa0,#f3ce5e);box-shadow:inset 0 0 0 1px rgba(163,122,21,.12);color:#5c491f}.brand-mark .ui-icon{width:21px;height:21px}.brand-copy{display:grid;line-height:1.15}.brand-copy b{font-size:14px}.brand-copy small{margin-top:4px;font-size:10px;color:var(--muted);font-weight:600}.topbar-actions{display:flex;gap:8px}.icon-button{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line);border-radius:14px;background:rgba(255,253,248,.78);color:var(--ink-2)}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:14px 1px 16px}.page-heading h1{font-size:28px;line-height:1.18;letter-spacing:-.035em;margin:3px 0 0}.page-kicker{font-size:11px;font-weight:800;color:#987b30;letter-spacing:.08em}.page-add{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:14px;background:var(--paper);border:1px solid var(--line);font-size:12px;font-weight:800;box-shadow:var(--shadow-sm)}.page-add .ui-icon{width:17px;height:17px}.card,.money-hero,.today-glance,.entry-shell,.debt-summary{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.card{padding:18px;margin-bottom:16px}.no-pad{padding:3px 0;overflow:hidden}.money-hero{position:relative;overflow:hidden;padding:22px;background:linear-gradient(145deg,#fff6ce 0,#fffdf7 62%)}.money-hero:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;right:-80px;top:-105px;background:rgba(245,214,111,.28)}.hero-top{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.hero-label{font-weight:760;color:var(--ink-2);font-size:13px}.hero-balance{margin-top:5px;font-size:38px;line-height:1.05;font-weight:900;letter-spacing:-.05em}.hero-top p{margin:8px 0 0;color:var(--muted);font-size:12px}.hero-divider{height:1px;background:rgba(125,100,48,.13);margin:19px 0 14px}.hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.hero-stats>div{min-width:0}.hero-stats span{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted);font-weight:750}.hero-stats b{display:block;margin-top:3px;font-size:14px;white-space:nowrap}.cycle-inline{margin-top:15px;padding-top:12px;border-top:1px dashed rgba(115,91,42,.18);display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:10px;color:var(--muted)}.cycle-inline span{display:inline-flex;align-items:center;gap:5px}.ring{--p:0;width:82px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:radial-gradient(circle,#fff9e7 58%,transparent 60%),conic-gradient(var(--yellow-deep) calc(var(--p)*1%),#e9dfc7 0);transition:background .7s ease}.ring.compact{width:72px}.ring b{font-size:15px}.ring small{display:block;margin-top:-15px;font-size:8px;color:var(--muted)}.quick-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0 18px}.quick-actions a{min-height:88px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:12px 7px;border-radius:18px;background:var(--paper);border:1px solid var(--line);box-shadow:var(--shadow-sm);transition:transform .16s ease,box-shadow .16s ease}.quick-actions a:active{transform:scale(.975)}.quick-actions a>span{width:34px;height:34px;display:grid;place-items:center;border-radius:12px;background:#f7f1e4;color:#6d604c}.quick-actions a.action-expense>span{background:var(--red-soft);color:var(--red)}.quick-actions a.action-income>span{background:var(--green-soft);color:var(--green)}.quick-actions b{font-size:12px}.quick-actions small{font-size:9px;color:var(--muted)}.today-glance{display:flex;align-items:center;gap:12px;padding:13px 15px;margin-bottom:20px}.today-icon{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:var(--yellow-soft);color:#6d571d}.today-glance small{display:block;font-size:10px;color:var(--muted)}.today-glance b{font-size:18px}.today-glance>a{display:inline-flex;align-items:center;gap:3px;color:#846a29;font-size:11px;font-weight:800}.section-plain{margin:4px 0 20px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.section-head h3,.card h3{margin:0;font-size:17px;letter-spacing:-.015em}.section-head p,.card>p{margin:2px 0 0;color:var(--muted);font-size:11px}.section-head>a{font-size:11px;font-weight:850;color:#8b702b}.wallet-strip{display:flex;gap:10px;overflow:auto;padding:10px 1px 5px;scrollbar-width:none;scroll-snap-type:x proximity}.wallet-strip::-webkit-scrollbar{display:none}.wallet-mini{flex:0 0 154px;scroll-snap-align:start;display:grid;grid-template-columns:auto 1fr;grid-template-areas:'emoji name' 'emoji amount';column-gap:8px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:var(--shadow-sm)}.wallet-emoji{grid-area:emoji;width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:var(--paper-soft);font-size:18px}.wallet-mini small{grid-area:name;color:var(--muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wallet-mini b{grid-area:amount;font-size:13px}.dashboard-grid,.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.friendly-grid>.card{min-height:100%}.bar-row{margin:14px 0}.bar-label{display:flex;justify-content:space-between;gap:12px;font-size:12px;align-items:center}.bar-label>span{display:flex;align-items:center;gap:7px}.cat-dot{width:28px;height:28px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--cat) 18%,white);font-style:normal}.bar-track,.progress{height:7px;background:#eee7d9;border-radius:999px;overflow:hidden;margin-top:7px}.bar-track i,.progress i{display:block;height:100%;background:var(--yellow-deep);border-radius:999px;transition:width .72s cubic-bezier(.2,.8,.2,1)}.progress i.over{background:var(--red)}.progress.big{height:10px}.budget-line{display:grid;grid-template-columns:minmax(130px,1fr) 1.4fr 52px;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #f0e8da}.budget-line:last-child{border:0}.budget-line span{font-weight:750;font-size:12px}.budget-line small{display:block;color:var(--muted);font-size:10px}.budget-line>b{text-align:right;font-size:11px}.recent-card{margin-top:0}.list-row{width:100%;min-height:66px;display:flex;align-items:center;gap:11px;padding:11px 8px;border:0;border-bottom:1px solid #f0e9df;background:transparent;text-align:left;transition:background .14s ease}.list-row:last-child{border-bottom:0}.list-row:active{background:#fff9e8}.list-icon{width:42px;height:42px;flex:0 0 auto;display:grid;place-items:center;border-radius:14px;background:var(--paper-soft);font-size:20px}.list-icon.system-icon{color:#77643a}.grow{flex:1;min-width:0}.grow b,.grow small{display:block}.grow b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.grow small{color:var(--muted);font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-amount{text-align:right}.tx-amount strong,.tx-amount small{display:block}.tx-amount strong{font-size:13px}.tx-amount small{font-size:9px;color:var(--muted);margin-top:2px}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.friendly-empty{display:flex;flex-direction:column;align-items:center;gap:5px}.friendly-empty>span{font-size:28px}.friendly-empty>b{font-size:13px}.friendly-empty>small{font-size:10px;color:var(--muted)}.empty{text-align:center;color:var(--muted);padding:20px 8px}.empty.large{padding:42px 16px}.chart-card details>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.chart-card summary::-webkit-details-marker{display:none}.chart-card summary span{display:inline-flex;align-items:center;gap:8px;font-weight:800}.chart-card summary small{color:var(--muted);font-size:10px}.chart-wrap{height:245px;padding-top:14px}.chart-wrap.tall{height:310px}.alert{display:flex;align-items:flex-start;gap:8px;padding:12px 14px;border-radius:15px;margin:4px 0 14px;font-weight:700}.alert.success{background:var(--green-soft);color:#3f694f}.alert.danger{background:var(--red-soft);color:#944a40}.toast{position:fixed;top:82px;left:50%;transform:translateX(-50%);z-index:70;width:min(420px,calc(100% - 32px));box-shadow:var(--shadow-float)}.btn{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:14px;padding:10px 14px;background:#f4eee3;font-weight:820;min-height:42px}.btn.primary{background:linear-gradient(180deg,#f8dd7c,#f2cf5c);border-color:#e2bf4d;color:#493b1d}.btn.secondary{background:#f7f2e8;border-color:var(--line)}.btn.ghost{background:transparent;border-color:var(--line)}.btn.danger-text{color:var(--red);background:#fff8f6;border-color:#efd6d0}.btn.wide{width:100%}.btn.tiny{min-height:34px;padding:6px 10px;font-size:11px}.top-gap{margin-top:14px}.search-shell{margin-bottom:10px}.smart-search{display:flex;align-items:center;gap:8px;padding:4px 5px 4px 13px;border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:var(--shadow-sm)}.smart-search>span{color:var(--muted)}.smart-search input{border:0;background:transparent;padding:9px 2px;box-shadow:none!important}.search-submit{width:38px;height:38px;border:0;border-radius:13px;background:var(--yellow-soft);display:grid;place-items:center;color:#6c571e}.type-chips{display:flex;gap:8px;overflow:auto;padding:2px 0 12px;scrollbar-width:none}.type-chips::-webkit-scrollbar{display:none}.type-chips a{flex:0 0 auto;padding:8px 13px;border:1px solid var(--line);border-radius:999px;background:var(--paper);font-size:11px;font-weight:750;color:var(--muted)}.type-chips a.active{background:var(--yellow-soft);border-color:#e7c75e;color:#604d1e}.type-chips a.active.expense{background:var(--red-soft);border-color:#efd2cb;color:var(--red)}.type-chips a.active.income{background:var(--green-soft);border-color:#d7e8d9;color:var(--green)}.filter-panel{padding:0;margin-bottom:14px;overflow:hidden}.filter-panel>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:13px 15px;font-size:11px;font-weight:800;cursor:pointer}.filter-panel summary::-webkit-details-marker{display:none}.filter-panel>summary span{display:inline-flex;align-items:center;gap:7px}.filter-panel[open]>summary{border-bottom:1px solid var(--line)}.filter-panel[open]>summary i{transform:rotate(180deg)}.friendly-filter{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;padding:15px}.filter-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}.list-summary{display:flex;justify-content:space-between;align-items:center;margin:12px 2px 10px;color:var(--muted);font-size:11px}.list-summary b{color:var(--ink)}.list-summary a{display:inline-flex;align-items:center;gap:5px;color:#806728;font-weight:800}.date-group{margin-bottom:17px}.date-group-head{display:flex;justify-content:space-between;align-items:flex-end;margin:0 4px 7px}.date-group-head b{font-size:12px}.date-group-head small{display:block;color:var(--muted);font-size:9px}.day-totals{display:flex;gap:8px;font-size:10px;font-weight:800}.transaction-day-card{margin:0}.entry-shell{padding:18px}.entry-form{display:block}.entry-type{max-width:560px;margin:0 auto 18px}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;background:#f1eadb;border-radius:16px}.segmented label{display:block}.segmented input{display:none}.segmented label > span{height:43px;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:12px;font-size:12px;font-weight:800;color:var(--muted);transition:.16s ease}.segmented input:checked+span{background:var(--paper);color:var(--ink);box-shadow:0 3px 10px rgba(84,66,35,.10)}.entry-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr);gap:22px}.entry-main{min-width:0}.amount-stage{padding:16px 0 12px;text-align:center}.amount-stage>small{display:block;font-size:10px;color:var(--muted);font-weight:800}.amount-field{display:flex;align-items:center;justify-content:center;gap:5px;margin:3px auto 0;max-width:460px}.amount-field span{font-size:28px;font-weight:900;color:#766021}.amount-field input{width:min(330px,80%);border:0!important;background:transparent!important;box-shadow:none!important;text-align:center;font-size:44px;font-weight:900;letter-spacing:-.04em;padding:2px}.field-title{display:flex;justify-content:space-between;align-items:baseline;margin:15px 1px 8px}.field-title span{font-size:12px;font-weight:850}.field-title small{font-size:9px;color:var(--muted)}.category-icon-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.category-option{min-width:0;border:1px solid transparent;background:transparent;border-radius:15px;padding:7px 3px;display:flex;flex-direction:column;align-items:center;gap:5px}.category-option>span{width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:color-mix(in srgb,var(--cat) 18%,white);font-size:21px;transition:.15s ease}.category-option small{width:100%;font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.category-option:hover{background:#fffaf0}.category-option.selected{background:#fff8dc;border-color:#ead17b}.category-option.selected>span{box-shadow:0 0 0 3px rgba(222,184,70,.18);transform:translateY(-1px)}.category-option[hidden]{display:none!important}.category-empty{text-align:center;color:var(--muted);font-size:10px}.category-empty a{font-weight:800;color:#806728}.entry-title{margin-top:14px}.account-choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.account-choice{display:block}.account-choice input{position:absolute;width:1px;height:1px;margin:0;padding:0;opacity:0;pointer-events:none;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.account-choice > span{min-height:56px;display:flex;align-items:center;gap:8px;padding:10px;border-radius:14px;border:1px solid var(--line);background:var(--paper)}.account-choice i{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:var(--paper-soft);font-style:normal}.account-choice b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-choice input:checked+span{border-color:#dcb84f;background:#fff8dc;box-shadow:0 0 0 2px rgba(220,184,79,.12)}.account-choice input:focus-visible+span{outline:3px solid rgba(215,173,53,.28);outline-offset:2px}.field-error-pulse{animation:fieldErrorPulse .55s ease}@keyframes fieldErrorPulse{0%,100%{transform:none}25%{transform:translateX(-4px)}50%{transform:translateX(4px)}75%{transform:translateX(-2px)}}.entry-more{margin-top:16px;border-top:1px solid var(--line)}.entry-more>summary{list-style:none;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:13px 1px;cursor:pointer}.entry-more summary::-webkit-details-marker{display:none}.entry-more summary span{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800}.entry-more summary small{font-size:9px;color:var(--muted)}.entry-more-fields{display:grid;gap:11px;padding-bottom:4px}.entry-keypad{align-self:start;position:sticky;top:88px;padding:16px;border:1px solid var(--line);border-radius:19px;background:#fffaf0}.keypad-hint{margin-bottom:10px}.keypad-hint b,.keypad-hint small{display:block}.keypad-hint b{font-size:12px}.keypad-hint small{font-size:9px;color:var(--muted)}.number-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.number-pad button{height:48px;border:1px solid var(--line);border-radius:13px;background:var(--paper);font-size:17px;font-weight:800;box-shadow:0 2px 5px rgba(63,47,24,.03)}.number-pad button:active{background:var(--yellow-soft);transform:scale(.97)}.keypad-delete{width:100%;height:39px;margin:8px 0 10px;border:0;border-radius:12px;background:#f3ece0;color:var(--muted);font-size:10px;font-weight:800}.save-entry{min-height:49px}.save-hint{text-align:center;margin:6px 0 0;color:var(--muted);font-size:9px}.entry-delete{max-width:520px;margin:16px auto 0}.transfer-wrap{display:none;margin-top:12px}.form-card{max-width:760px;margin:auto}.form-card form,.modal-card,.card form{display:grid;gap:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#665e53}input,select,textarea{width:100%;border:1px solid #ded5c8;border-radius:13px;background:#fffefb;padding:11px 12px;outline:none}input:focus,select:focus,textarea:focus{border-color:#d2ad45;box-shadow:0 0 0 3px rgba(235,205,106,.24)}textarea{resize:vertical}.hint{font-size:10px!important;color:var(--muted)!important}.standalone{margin:18px 2px 10px}.chip-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:15px}.category-chip{border:1px solid var(--line);border-left:5px solid var(--chip);background:#fffdf8;border-radius:16px;padding:12px;display:grid;grid-template-columns:auto 1fr;grid-template-areas:'icon name' 'icon type';gap:0 8px;text-align:left}.category-chip > span{grid-area:icon;font-size:24px}.category-chip b{grid-area:name}.category-chip small{grid-area:type;color:var(--muted)}.account-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:15px}.account-card{border:1px solid var(--line);border-radius:18px;background:linear-gradient(150deg,#fffef9,#fff7dc);padding:16px;text-align:left}.account-card span,.account-card small,.account-card b,.account-card strong{display:block}.account-icon{font-size:26px}.account-card small{color:var(--muted);margin-top:6px}.account-card strong{font-size:20px;margin-top:8px}.account-card.archived{opacity:.55;filter:grayscale(.4)}.inline-form{display:flex!important;grid-template-columns:none!important;gap:9px!important;align-items:end}.inline-form>*{flex:1}.inline-form .btn{flex:0 0 auto}.cycle-strip{padding:10px 14px;background:#fff4c5;border-radius:14px;margin-bottom:12px;text-align:center;font-weight:750}.budget-detail{padding:15px 0;border-bottom:1px dashed var(--line)}.budget-detail:last-child{border:0}.budget-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.budget-actions form{display:flex;gap:7px}.budget-actions input{max-width:130px;padding:7px}.goal-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.goal-card{display:flex;gap:13px;align-items:flex-start}.goal-emoji{font-size:30px;width:46px;height:46px;display:grid;place-items:center;background:var(--paper-soft);border-radius:15px}.goal-card h3{margin:3px 0 9px}.goal-money{display:flex;align-items:baseline;gap:5px;margin-top:7px}.goal-money b{font-size:19px}.goal-money span{font-size:11px;color:var(--muted)}.goal-buttons{display:grid;gap:6px}.debt-summary{padding:20px;background:linear-gradient(145deg,#fff2e9,#fffaf1);display:flex;flex-direction:column}.debt-summary b{font-size:31px}.debt-summary small,.debt-summary span{color:var(--muted)}.debt-card.closed{opacity:.62}.debt-money{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.debt-money small,.debt-money b{display:block}.debt-money small{color:var(--muted);font-size:10px}.debt-money b{font-size:14px}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.menu-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--paper);box-shadow:var(--shadow-sm)}.menu-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:var(--paper-soft);color:#755e25}.menu-card b,.menu-card small{display:block}.menu-card b{font-size:13px}.menu-card small{font-size:10px;color:var(--muted);margin-top:2px}.menu-chevron{color:var(--muted)}.report-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}.report-row small{color:var(--muted)}.table-scroll{overflow:auto;margin-top:10px}table{width:100%;border-collapse:collapse;font-size:12px}th,td{padding:11px 9px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}th{font-size:10px;color:var(--muted)}.profile-line{display:flex;align-items:center;gap:12px;margin:12px 0 16px}.avatar{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:var(--yellow);font-weight:850}.avatar.large{width:50px;height:50px}.stack{display:grid;gap:8px}.check{display:flex;align-items:center;gap:9px}.check input{width:auto}.current-cycle-note{margin-top:14px;padding:11px 12px;border-radius:13px;background:var(--paper-soft);font-size:11px}dialog{border:0;border-radius:22px;padding:0;box-shadow:0 24px 80px rgba(63,50,31,.3);width:min(560px,calc(100% - 24px));background:#fffdf8}dialog::backdrop{background:rgba(55,47,36,.42);backdrop-filter:blur(4px)}.modal-card{padding:21px}.modal-delete{padding:0 21px 21px}.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:4px}.bottom-nav{position:fixed;z-index:60;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(610px,calc(100% - 20px));height:68px;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;padding:7px 6px 6px;background:rgba(255,253,248,.95);border:1px solid rgba(222,211,193,.92);border-radius:23px;box-shadow:var(--shadow-float);backdrop-filter:blur(16px)}.nav-item{height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:16px;color:#918777}.nav-icon{height:23px;display:grid;place-items:center}.nav-item .ui-icon{width:20px;height:20px}.nav-item small{font-size:8px;font-weight:750}.nav-item.active{color:#66521f;background:#fff8df}.nav-item.add{position:relative;color:#53421a;background:transparent}.nav-item.add .nav-icon{width:50px;height:50px;margin-top:-23px;border-radius:18px;background:linear-gradient(145deg,#ffe483,#f2c94f);border:4px solid var(--bg);box-shadow:0 8px 20px rgba(168,126,27,.23)}.nav-item.add .ui-icon{width:24px;height:24px}.nav-item.add small{margin-top:-2px}.ripple-dot{position:absolute;border-radius:50%;pointer-events:none;transform:translate(-50%,-50%) scale(0);background:rgba(255,255,255,.52);animation:ripple .55s ease-out forwards}@keyframes ripple{to{transform:translate(-50%,-50%) scale(1);opacity:0}}.reveal{opacity:1;transform:none}.motion-ready .reveal{opacity:0;transform:translateY(10px);transition:opacity .4s ease,transform .4s ease}.motion-ready .reveal.is-visible{opacity:1;transform:none}.page-enter{animation:pageEnter .28s ease-out}@keyframes pageEnter{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (max-width:780px){.dashboard-grid,.settings-grid{grid-template-columns:1fr}.entry-grid{grid-template-columns:1fr}.entry-keypad{position:static}.friendly-filter{grid-template-columns:1fr 1fr}.category-icon-grid{grid-template-columns:repeat(5,1fr)}.account-grid{grid-template-columns:1fr 1fr}.goal-grid{grid-template-columns:1fr}.menu-grid{grid-template-columns:1fr 1fr}.metric-grid{grid-template-columns:1fr 1fr}}
@media (max-width:560px){body{font-size:14px}.content{padding-left:14px;padding-right:14px}.topbar{height:66px;padding-left:14px;padding-right:14px}.brand-copy small{display:none}.brand-mark{width:37px;height:37px}.page-heading{padding-top:11px;padding-bottom:13px}.page-heading h1{font-size:24px}.page-add{padding:8px 10px}.page-add span{display:none}.money-hero{padding:18px}.hero-balance{font-size:34px}.hero-top p{max-width:235px}.hero-stats{gap:4px}.hero-stats b{font-size:12px}.cycle-inline{display:grid;gap:4px}.quick-actions{gap:7px}.quick-actions a{min-height:82px;padding:9px 4px}.quick-actions a>span{width:32px;height:32px}.quick-actions small{display:none}.today-glance{margin-bottom:17px}.card{padding:15px;border-radius:18px}.wallet-mini{flex-basis:146px}.friendly-filter{grid-template-columns:1fr}.filter-actions{grid-column:auto}.category-icon-grid{grid-template-columns:repeat(4,1fr);gap:7px}.category-option>span{width:44px;height:44px}.account-choice-grid{grid-template-columns:1fr 1fr}.entry-shell{padding:14px;border-radius:20px}.amount-field input{font-size:40px}.entry-keypad{margin-top:4px;padding:12px;background:#fffaf0}.number-pad button{height:46px}.menu-grid{grid-template-columns:1fr}.chip-list{grid-template-columns:1fr 1fr}.account-grid{grid-template-columns:1fr}.inline-form{display:grid!important}.form-grid{grid-template-columns:1fr 1fr}.bottom-nav{width:calc(100% - 16px);bottom:max(6px,env(safe-area-inset-bottom));border-radius:21px}.nav-item small{font-size:8px}.toast{top:72px}.debt-money{grid-template-columns:1fr 1fr 1fr}}
@media (max-width:390px){.hero-balance{font-size:31px}.ring.compact{width:66px}.quick-actions a{min-width:0}.quick-actions b{font-size:10px}.category-icon-grid{grid-template-columns:repeat(4,1fr)}.category-option small{font-size:8px}.account-choice-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}}
@media (min-width:900px){.content{padding-left:24px;padding-right:24px}.money-hero{padding:26px}.hero-balance{font-size:44px}.bottom-nav{bottom:18px}.chart-card{display:none}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}.motion-ready .reveal{opacity:1!important;transform:none!important}}

/* v1.0.7 — tap-to-open custom amount keypad */
.entry-grid{display:block}
.entry-main{max-width:760px;margin:0 auto}
.amount-stage{padding-bottom:16px}
.amount-field{cursor:pointer;position:relative;border-radius:18px;padding:5px 10px;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.amount-field:hover,.amount-field:focus-within{background:#fff9e5;box-shadow:0 0 0 3px rgba(235,205,106,.14)}
.amount-field:active{transform:scale(.992)}
.amount-field input[readonly]{cursor:pointer;caret-color:transparent;user-select:none;-webkit-user-select:none}
.amount-keypad-helper{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:0;background:transparent;color:#92752b;font-size:9px;font-weight:800;padding:5px 9px;margin-top:3px;border-radius:999px}
.amount-keypad-helper:active{background:var(--yellow-soft)}
.entry-submit{margin-top:18px;padding-top:4px}
.keypad-backdrop{position:fixed;inset:0;z-index:94;border:0;padding:0;background:rgba(54,45,32,.30);backdrop-filter:blur(2px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility .22s ease}
.keypad-backdrop.is-open{opacity:1;visibility:visible;pointer-events:auto}
.entry-keypad.keypad-sheet{position:fixed;z-index:95;left:50%;right:auto;top:auto;bottom:0;width:min(500px,100%);max-height:min(620px,82dvh);overflow:auto;margin:0;padding:8px 16px calc(14px + env(safe-area-inset-bottom));border:1px solid rgba(222,211,193,.96);border-bottom:0;border-radius:27px 27px 0 0;background:rgba(255,252,244,.99);box-shadow:0 -16px 55px rgba(52,42,27,.20);transform:translate(-50%,calc(100% + 28px));opacity:0;visibility:hidden;pointer-events:none;transition:transform .30s cubic-bezier(.2,.82,.2,1),opacity .20s ease,visibility .30s ease;overscroll-behavior:contain}
.entry-keypad.keypad-sheet.is-open{transform:translate(-50%,0);opacity:1;visibility:visible;pointer-events:auto}
.keypad-grabber{width:38px;height:4px;border-radius:999px;background:#d6cec0;margin:2px auto 10px}
.keypad-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 8px}
.keypad-sheet-head b,.keypad-sheet-head small{display:block}
.keypad-sheet-head b{font-size:14px}
.keypad-sheet-head small{margin-top:1px;color:var(--muted);font-size:9px;font-weight:600}
.keypad-done{border:0;border-radius:999px;padding:8px 12px;background:var(--yellow-soft);color:#735b1c;font-size:10px;font-weight:850}
.keypad-display{min-height:62px;display:flex;align-items:baseline;justify-content:center;gap:5px;margin:0 0 10px;padding:7px 12px;border-radius:17px;background:#fff7d9;border:1px solid #efdfaa;color:#5f4b1d}
.keypad-display span{font-size:22px;font-weight:850}
.keypad-display b{max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:34px;line-height:1.15;letter-spacing:-.035em}
.keypad-sheet .number-pad{gap:8px}
.keypad-sheet .number-pad button{height:55px;border-radius:16px;background:#fffefb;font-size:20px;box-shadow:0 2px 7px rgba(63,47,24,.04);touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.keypad-sheet .number-pad button:active{background:#ffefb0;transform:scale(.965)}
.keypad-actions{display:grid;grid-template-columns:.8fr 1fr 1.2fr;gap:8px;margin-top:9px}
.keypad-actions>button{height:44px;border:0;border-radius:14px;background:#f1eadf;color:#746b5e;font-size:11px;font-weight:850}
.keypad-actions .keypad-delete{width:auto;height:44px;margin:0;display:flex;align-items:center;justify-content:center;gap:5px;background:#f1eadf}
.keypad-actions .keypad-confirm{display:flex;align-items:center;justify-content:center;gap:5px;background:linear-gradient(145deg,#ffe47f,#f2c94f);color:#584616}
body.amount-keypad-open{overflow:hidden;touch-action:none}
body.amount-keypad-open .bottom-nav{opacity:0;pointer-events:none;transform:translate(-50%,calc(100% + 30px));transition:opacity .18s ease,transform .24s ease}

@media (max-width:560px){
  .amount-stage{padding-top:10px}
  .amount-field{padding:4px 6px}
  .amount-field input{font-size:42px}
  .entry-submit{position:sticky;bottom:82px;z-index:10;margin:18px -2px 0;padding:7px 2px 2px;background:linear-gradient(180deg,rgba(255,253,248,0),rgba(255,253,248,.92) 28%,rgba(255,253,248,.98))}
  .keypad-sheet-head{padding-bottom:6px}
  .keypad-display{min-height:58px;margin-bottom:8px}
  .keypad-display b{font-size:32px}
  .entry-keypad.keypad-sheet{padding-left:12px;padding-right:12px}
  .keypad-sheet .number-pad{gap:7px}
  .keypad-sheet .number-pad button{height:54px;font-size:19px}
}
@media (prefers-reduced-motion:reduce){.entry-keypad.keypad-sheet,.keypad-backdrop,.bottom-nav{transition:none!important}}

/* v1.0.9 — Rainy Wallet: automatic salary, visible date, richer analytics */
.salary-ready{display:flex;align-items:center;gap:12px;padding:13px 15px;margin:12px 0 16px;border:1px solid #eadca9;border-radius:18px;background:linear-gradient(145deg,#fff9df,#fffdf8);box-shadow:var(--shadow-sm)}
.salary-ready-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:14px;background:#fff0b1;font-size:20px}
.salary-ready b,.salary-ready small,.salary-ready .grow > span{display:block}.salary-ready small{font-size:9px;color:var(--muted)}.salary-ready b{font-size:13px}.salary-ready .grow>span{font-size:10px;color:var(--muted);margin-top:2px}
.status-badge{display:inline-flex!important;align-items:center;justify-content:center;width:max-content;padding:3px 7px;border-radius:999px;font-size:8px!important;font-weight:850;white-space:nowrap}
.status-badge.scheduled{background:#fff0b0;color:#795f15}.status-badge.posted{background:var(--green-soft);color:var(--green)}
.scheduled-row{background:linear-gradient(90deg,#fffaf0,#fffefb)}
.analytics-section{margin:4px 0 16px}.analysis-metrics{display:grid;grid-template-columns:repeat(6,1fr);gap:9px;margin-top:12px}
.metric-card{min-width:0;padding:12px 11px;border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:var(--shadow-sm)}.metric-card span,.metric-card b,.metric-card small{display:block}.metric-card span{font-size:9px;color:var(--muted);font-weight:800}.metric-card b{margin-top:4px;font-size:16px;letter-spacing:-.02em}.metric-card small{margin-top:2px;font-size:8px;color:var(--muted);line-height:1.35}
.analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}.analytics-grid .card{margin-bottom:0}.chart-wide{grid-column:1/-1}.chart-panel{min-width:0}.insight-card{min-width:0}.insight-list{display:grid;gap:8px;margin-top:11px}.insight-list>div{display:flex;align-items:flex-start;gap:9px;padding:10px;border-radius:14px;background:#fff9e9}.insight-list>div>span{width:30px;height:30px;display:grid;place-items:center;flex:0 0 auto;border-radius:10px;background:#fff1bc;color:#755e21}.insight-list p{margin:0}.insight-list b,.insight-list small{display:block}.insight-list b{font-size:11px}.insight-list small{margin-top:1px;color:var(--muted);font-size:9px}
.entry-date-visible{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;margin:0 0 16px;border:1px solid #e6ddcd;border-radius:16px;background:#fffdf8}.entry-date-visible>span{display:grid;grid-template-columns:auto 1fr;grid-template-areas:'icon title' 'icon sub';column-gap:8px;align-items:center;min-width:0}.entry-date-visible i{grid-area:icon;width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:var(--yellow-soft);color:#765f20;font-style:normal}.entry-date-visible b{grid-area:title;font-size:11px}.entry-date-visible small{grid-area:sub;font-size:8px;color:var(--muted)}.entry-date-visible input{width:auto;min-width:145px;background:#fff;padding:9px 10px;font-weight:750}
.salary-settings-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.salary-settings-form>label:last-of-type{grid-column:1/-1}.salary-settings-form>.btn{grid-column:1/-1}.salary-auto-note{display:flex;gap:10px;align-items:flex-start;margin-top:13px;padding:11px 12px;border-radius:14px;background:#fff7d8;border:1px solid #efdfa8}.salary-auto-note>span{font-size:21px}.salary-auto-note b,.salary-auto-note small{display:block}.salary-auto-note b{font-size:11px}.salary-auto-note small{margin-top:2px;color:var(--muted);font-size:9px;line-height:1.45}.salary-history-amount{text-align:right}.salary-history-amount strong{display:block;font-size:12px}.salary-history-amount .status-badge{margin:3px 0 0 auto}
@media(max-width:980px){.analysis-metrics{grid-template-columns:repeat(3,1fr)}}
@media(max-width:780px){.analytics-grid{grid-template-columns:1fr}.chart-wide{grid-column:auto}.analysis-metrics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.salary-ready{padding:11px 12px}.analysis-metrics{gap:7px}.metric-card{padding:10px}.metric-card b{font-size:14px}.analytics-grid{gap:12px}.chart-panel .chart-wrap{height:220px}.chart-panel .chart-wrap.tall{height:270px}.entry-date-visible{align-items:stretch;flex-direction:column}.entry-date-visible input{width:100%}.salary-settings-form{grid-template-columns:1fr}.salary-settings-form>label:last-of-type,.salary-settings-form>.btn{grid-column:auto}}

/* Rainy Wallet v1.0.10 — clear dashboard + transaction visibility */
.analysis-entry-card{display:flex;align-items:center;gap:12px;margin:-2px 0 20px;padding:14px 15px;border:1px solid #eadcae;border-radius:18px;background:linear-gradient(145deg,#fff7d9,#fffdf7);box-shadow:var(--shadow-sm)}
.analysis-entry-card .analysis-entry-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:14px;background:#ffe991;color:#69521d}.analysis-entry-card b,.analysis-entry-card small{display:block}.analysis-entry-card b{font-size:13px}.analysis-entry-card small{margin-top:2px;color:var(--muted);font-size:10px;line-height:1.4}.analysis-entry-card>i{display:grid;place-items:center;color:#8b702b}
.analysis-overview{background:linear-gradient(145deg,#fff8dc,#fffdf8)}.forecast-note{margin:10px 1px 0!important;padding:9px 11px;border-radius:12px;background:#f8f3e9;color:var(--muted)!important;font-size:9px!important;line-height:1.45}
body[data-route="transactions"] .content{padding-bottom:calc(132px + env(safe-area-inset-bottom))}
body[data-route="transactions"] .date-group{opacity:1!important;transform:none!important;transition:none!important}
.transaction-day-card{overflow:visible!important;padding:3px 7px!important}
.transaction-day-card .transaction-item{align-items:flex-start;border-radius:13px;padding:11px 7px}
.transaction-day-card .transaction-item:active{background:#fff8e5}
.transaction-day-card .transaction-item .list-icon{margin-top:2px}
.transaction-day-card .transaction-item .grow b{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}
.transaction-day-card .transaction-item .grow small{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.4;margin-top:2px;overflow-wrap:anywhere}
.transaction-day-card .note-line{color:#756c60!important;background:#f8f3ea;border-radius:8px;padding:3px 6px;margin-top:5px!important;width:max-content;max-width:100%}
.transaction-day-card .tag-line{color:#9a7722!important;font-size:8px!important;margin-top:4px!important}
.transaction-row-amount{flex:0 0 auto;min-width:86px;text-align:right;padding-top:2px;white-space:nowrap}.transaction-row-amount strong,.transaction-row-amount small{display:block}.transaction-row-amount strong{font-size:13px}.transaction-row-amount small{margin-top:3px;color:var(--muted);font-size:8px}
.date-group-head{align-items:flex-start;gap:10px}.date-group-head>div:first-child{min-width:0}.day-totals{flex-wrap:wrap;justify-content:flex-end;text-align:right}
@media(max-width:560px){.analysis-entry-card{margin-bottom:17px}.transaction-day-card{padding:2px 5px!important}.transaction-day-card .transaction-item{gap:9px;padding:11px 5px}.transaction-day-card .transaction-item .list-icon{width:39px;height:39px;border-radius:13px}.transaction-row-amount{min-width:78px}.transaction-row-amount strong{font-size:12px}.date-group-head b{font-size:11px}.day-totals{font-size:9px}}

/* Rainy Wallet v1.0.11 — transactions controls must never be hidden by reveal motion */
body[data-route="transactions"] .search-shell,
body[data-route="transactions"] .type-chips{opacity:1!important;transform:none!important;visibility:visible!important;transition:none!important}

/* Rainy Wallet v2.0 — Public Edition */
.public-body{min-height:100dvh;background:radial-gradient(circle at 80% 8%,rgba(245,214,111,.23),transparent 28rem),linear-gradient(180deg,#fffaf0,#f8f5ed 72%);color:var(--ink)}
.public-shell{width:min(1180px,100%);margin:auto;min-height:100dvh;padding:0 22px}.public-nav{height:78px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid rgba(233,224,209,.75)}.public-nav nav,.public-footer nav{display:flex;gap:18px;align-items:center}.public-nav nav a,.public-footer nav a{font-size:12px;color:var(--ink-2);font-weight:750}.landing-main{padding:56px 0 30px}.landing-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(330px,.75fr);gap:58px;align-items:center;min-height:570px}.hero-copy{max-width:680px}.landing-pill{display:inline-flex;align-items:center;gap:7px;width:max-content;padding:7px 11px;border-radius:999px;background:#fff2bd;border:1px solid #ebd57c;color:#735b1c;font-size:11px;font-weight:850}.hero-copy h1{margin:17px 0 16px;font-size:clamp(44px,6vw,76px);line-height:.98;letter-spacing:-.06em}.hero-copy h1 em{font-style:normal;color:#b68718}.hero-copy>p{max-width:620px;margin:0;color:var(--ink-2);font-size:17px;line-height:1.75}.hero-cta{display:grid;gap:8px;margin-top:24px}.landing-button{width:max-content;min-width:230px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:14px 18px}.hero-cta small{color:var(--muted)}
.google-login-card{max-width:430px;display:grid;gap:10px;margin-top:26px;padding:14px;border:1px solid var(--line);border-radius:20px;background:rgba(255,253,248,.82);box-shadow:var(--shadow-sm)}.consent-check{display:flex;align-items:flex-start;gap:8px;font-size:10px;color:var(--muted);line-height:1.45}.consent-check input{width:auto;margin-top:2px}.consent-check a{color:#8c6e20;text-decoration:underline}.google-signin{height:50px;display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid #d9d7d2;border-radius:14px;background:white;color:#3c4043;box-shadow:0 2px 7px rgba(60,64,67,.08);font-size:13px}.google-signin:hover{background:#fafafa}.google-g{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;font:900 18px/1 Arial;color:#4285f4}.google-login-card>small{font-size:9px;color:var(--muted);text-align:center}.oauth-not-ready{max-width:470px;display:grid;gap:4px;margin-top:24px;padding:14px 16px;border:1px dashed #d7b64e;border-radius:16px;background:#fff7d8}.oauth-not-ready b{font-size:12px}.oauth-not-ready span{font-size:10px;color:var(--muted)}.oauth-not-ready code{font-size:10px}
.hero-demo{display:flex;justify-content:center}.demo-phone{width:min(390px,100%);padding:19px;border:1px solid #e7dcc8;border-radius:34px;background:linear-gradient(160deg,#fff7d3,#fffdf8 48%);box-shadow:0 35px 80px rgba(74,55,24,.16);transform:rotate(1.5deg)}.demo-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;font-weight:900}.demo-top i{width:36px;height:36px;display:grid;place-items:center;border-radius:13px;background:#ffe889;font-style:normal}.demo-phone>small{color:var(--muted);font-size:10px}.demo-phone>strong{display:block;margin:4px 0 13px;font-size:38px;letter-spacing:-.05em}.demo-cycle{display:grid;gap:5px;font-size:9px;color:var(--muted)}.demo-cycle i{height:7px;border-radius:999px;background:#eee6d5;overflow:hidden}.demo-cycle i b{display:block;height:100%;border-radius:inherit;background:#d7ad35}.demo-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.demo-stats>div{padding:11px;border:1px solid #eee3cf;border-radius:14px;background:rgba(255,255,255,.65)}.demo-stats small,.demo-stats b{display:block}.demo-stats small{font-size:9px;color:var(--muted)}.demo-stats b{margin-top:2px;font-size:13px}.demo-list{display:grid;gap:6px}.demo-list span{display:flex;justify-content:space-between;gap:8px;padding:10px 11px;border-radius:12px;background:#fff}.demo-list b{font-size:11px}
.trust-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:4px 0 80px;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:rgba(255,253,248,.7);text-align:center;font-size:10px;font-weight:800;color:var(--ink-2)}.landing-section{padding:54px 0}.landing-section>h2,.landing-security h2{max-width:750px;margin:10px 0 28px;font-size:clamp(30px,4vw,48px);line-height:1.08;letter-spacing:-.04em}.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.feature-grid article{min-height:210px;padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--paper);box-shadow:var(--shadow-sm)}.feature-grid article i{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:var(--paper-soft);font-size:21px;font-style:normal}.feature-grid h3{margin:18px 0 6px;font-size:16px}.feature-grid p{margin:0;color:var(--muted);font-size:11px;line-height:1.65}.landing-security{display:grid;grid-template-columns:1fr .8fr;gap:30px;align-items:center;margin:70px 0;padding:34px;border-radius:28px;background:#333028;color:#fff}.landing-security p{color:#d7d0c2;max-width:650px}.landing-security a{color:#ffe58b;font-weight:800}.security-card{padding:20px;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:rgba(255,255,255,.06)}.security-card ul{padding-left:20px;color:#e6dfd1}.security-card small{color:#c9c1b2}.public-footer{display:grid;grid-template-columns:auto 1fr auto;gap:10px 20px;align-items:center;padding:30px 0 38px;border-top:1px solid var(--line);color:var(--muted);font-size:10px}.public-footer b{color:var(--ink);font-size:13px}.public-footer small{grid-column:1/-1}.policy-page{width:min(820px,100%);margin:0 auto;padding:60px 0 80px}.policy-back{display:inline-block;margin-bottom:28px;color:#8a6b1f;font-weight:800;font-size:11px}.policy-page h1{margin:9px 0 5px;font-size:clamp(34px,5vw,54px);letter-spacing:-.045em}.policy-lead{color:var(--muted);margin-bottom:38px}.policy-page section{padding:22px 0;border-top:1px solid var(--line)}.policy-page section h2{margin:0 0 8px;font-size:18px}.policy-page section p{margin:0;color:var(--ink-2);line-height:1.8}.policy-page section a{color:#8a6b1f;text-decoration:underline}
.onboarding-page{width:min(800px,100%);margin:0 auto;padding:54px 0 80px}.onboarding-head{text-align:center;margin-bottom:28px}.onboarding-head .landing-pill{margin:auto}.onboarding-head h1{margin:14px 0 8px;font-size:clamp(36px,6vw,56px);line-height:1.02;letter-spacing:-.05em}.onboarding-head p{margin:0;color:var(--muted)}.onboarding-form{display:grid;gap:14px}.onboard-card{display:grid;grid-template-columns:52px 1fr;gap:14px;padding:20px;border:1px solid var(--line);border-radius:22px;background:var(--paper);box-shadow:var(--shadow-sm)}.onboard-no{width:42px;height:42px;display:grid;place-items:center;border-radius:15px;background:#ffe88c;color:#654f16;font-weight:900}.onboard-card h2{margin:0;font-size:18px}.onboard-card p{margin:2px 0 15px;color:var(--muted);font-size:10px}.onboard-card label{display:grid;gap:6px;font-size:11px;font-weight:800}.onboard-card input,.onboard-card select{width:100%;padding:12px 13px;border:1px solid #ddd2bf;border-radius:13px;background:#fff}.onboarding-submit{margin-top:4px;min-height:50px}.user-avatar-link{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;overflow:hidden;border:2px solid #fff;background:#ffe78a;box-shadow:0 0 0 1px var(--line);font-weight:900}.user-avatar-link img{width:100%;height:100%;object-fit:cover}.avatar-image{object-fit:cover;border-radius:50%;border:1px solid var(--line)}.avatar-image.large{width:48px;height:48px}.privacy-links{display:flex;gap:14px;flex-wrap:wrap;margin:13px 0}.privacy-links a{font-size:10px;font-weight:800;color:#83651a;text-decoration:underline}.danger-account-card{border-color:#efd2ca}.danger-account-card summary{cursor:pointer;color:var(--red);font-weight:850}.delete-account-form{display:grid;gap:10px;margin-top:14px}.delete-account-form label{display:grid;gap:5px;font-size:11px}.delete-account-form input{padding:11px;border:1px solid #e1cbc6;border-radius:12px;background:#fff}.desktop-settings{display:grid}
@media(max-width:820px){.landing-hero{grid-template-columns:1fr;min-height:auto;gap:42px}.hero-copy{text-align:center;margin:auto}.hero-copy>p{margin-inline:auto}.landing-pill{margin-inline:auto}.google-login-card,.oauth-not-ready{margin-inline:auto}.hero-cta{justify-items:center}.hero-demo{padding-bottom:14px}.trust-strip{grid-template-columns:1fr;margin-bottom:45px}.feature-grid{grid-template-columns:1fr 1fr}.landing-security{grid-template-columns:1fr}.public-nav nav{display:none}.public-footer{grid-template-columns:1fr;text-align:center}.public-footer nav{justify-content:center}.public-footer small{grid-column:auto}.public-footer>span{display:none}}
@media(max-width:560px){.public-shell{padding:0 14px}.public-nav{height:68px}.landing-main{padding-top:34px}.hero-copy h1{font-size:43px}.hero-copy>p{font-size:14px}.demo-phone{transform:none}.feature-grid{grid-template-columns:1fr}.feature-grid article{min-height:0}.landing-security{margin:40px 0;padding:22px}.policy-page{padding:38px 0 60px}.onboarding-page{padding:34px 0 60px}.onboard-card{grid-template-columns:42px 1fr;padding:16px}.onboard-no{width:36px;height:36px}.desktop-settings{display:none}}
.public-message{max-width:720px;margin:0 auto 18px;padding:12px 14px;border-radius:14px;font-size:11px;font-weight:800;text-align:center}.public-message.success{background:#edf6ee;color:#47745a;border:1px solid #d7e9da}.public-message.danger{background:#fff0ec;color:#a34f45;border:1px solid #f1d5cf}


/* Typography and icon alignment shared by public and signed-in pages */
body { font-family: 'Noto Sans Thai Variable', 'Noto Sans Thai', system-ui, sans-serif; }
.ui-icon.fa-solid { display: inline-grid; place-items: center; flex: none; vertical-align: -.08em; }
.brand b { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: -.035em; }
.public-body {
  background: radial-gradient(ellipse at 82% 16%, #fbefc990, transparent 37rem), #faf8f0;
}
.public-nav .brand-mark { border: 1px solid #e4cf94; border-radius: 13px; background: #f8ebc1; color: #725320; box-shadow: none; }
.public-nav .brand-copy b { font-size: 22px; line-height: 1.15; }
.hero-copy h1 { font-weight: 630; letter-spacing: -.042em; }
.hero-copy h1 em { color: #855c20; }
.demo-phone { background: #fffaf0; border-color: #e6d9b8; box-shadow: 0 22px 54px #3b2b141a; }
.demo-list > span { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 6px; }
.demo-list .ui-icon, .public-footer .ui-icon { color: #806022; }
.demo-list .ui-icon { padding: 0; background: transparent; }
.feature-grid article { background: #fffdf7; border-radius: 16px; box-shadow: none; }
.feature-grid article i { color: #806022; }

/* Authenticated workspace */
body[data-route] {
  --bg: #faf8f0;
  --paper: #fffefa;
  --paper-soft: #f8f1db;
  --ink: #2b261e;
  --ink-2: #524737;
  --muted: #6e6250;
  --line: #e9dfcc;
  --green: #35634b;
  --green-soft: #edf6ee;
  --red: #a83f42;
  --red-soft: #faecea;
  --accent: #79561a;
  --action: #f4df9f;
  --action-hover: #efd287;
  --action-ink: #453208;
  --shadow-sm: 0 2px 6px #49391d09;
  --shadow-float: 0 10px 34px #49391d18;
  --gutter: clamp(14px, 3.4vw, 40px);
  --header-height: 64px;
  background: var(--bg);
  min-width: 0;
  min-height: 100dvh;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
body[data-route] [hidden] { display: none !important; }
body[data-route] :focus-visible { outline: 3px solid #947122; outline-offset: 3px; }
body[data-route].motion-ready .reveal { opacity: 1; transform: none; transition-delay: 0s !important; }
body[data-route] .app-shell { width: 100%; }
.app-main, .content, .card, .dashboard-grid > *, .entry-main > *, .section-head > div { min-width: 0; }
.wallet-sidebar { display: none; }
.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 150;
  transform: translateY(-150%);
  color: #fff;
  background: #604619;
  padding: 10px 14px;
  border-radius: 9px;
}
.skip-link:focus { transform: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
body[data-route] .topbar {
  height: calc(var(--header-height) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  gap: 12px;
  background: #faf8f0f5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
body[data-route] .brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 21px; letter-spacing: -.035em; }
body[data-route] .brand-mark { border: 1px solid #e7d4a1; border-radius: 12px; width: 36px; height: 36px; flex: 0 0 36px; background: #f9edc9; color: #79561a; box-shadow: none; }
.profile-chip { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; padding: 2px 0 2px 8px; }
.profile-chip-name { display: none; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.profile-chip .user-avatar-link { width: 36px; height: 36px; flex: 0 0 36px; background: #f7edcd; color: #604619; }
body[data-route] .content {
  width: min(100%, 1370px);
  margin-inline: auto;
  padding: 0 var(--gutter) calc(104px + env(safe-area-inset-bottom));
  scroll-margin-top: 72px;
}
body[data-route] .page-heading { align-items: center; padding: clamp(18px, 3.5vw, 34px) 0 18px; gap: 10px; }
body[data-route] .page-heading h1 { font-size: clamp(23px, 3vw, 35px); font-weight: 650; letter-spacing: -.027em; line-height: 1.32; margin: 0; }
body[data-route] .page-add,
body[data-route] .btn.primary { color: var(--action-ink); background: var(--action); border-color: #e5cc84; box-shadow: none; }
body[data-route] .btn.secondary { color: #604619; background: #fff4cc; border-color: #ecd99e; }
body[data-route] .page-add,
body[data-route] .btn { min-height: 44px; border-radius: 11px; font-size: 13px; line-height: 1.4; }
body[data-route] .page-add { display: inline-flex; flex: 0 0 auto; gap: 6px; align-items: center; padding: 8px 13px; font-weight: 800; }
body[data-route] .card { border-radius: 15px; }
body[data-route] .section-head { align-items: center; flex-wrap: wrap; column-gap: 12px; row-gap: 6px; }
body[data-route] .section-head h3, body[data-route] .card h3 { font-size: clamp(16px, 2.2vw, 19px); font-weight: 650; }
body[data-route] .section-head p, body[data-route] .card > p { font-size: 13px; line-height: 1.55; }
body[data-route] .section-head > a { color: var(--accent); font-size: 13px; padding-block: 8px; }
body[data-route] .section-head > a.btn { color: var(--ink-2); }
body[data-route] :is(.modal-card, .card form, .entry-form) label { min-width: 0; font-size: 13px; }
body[data-route] :is(input, select, textarea):not([type=radio]):not([type=checkbox]):not([type=hidden]):not([type=color]):not([data-amount-input]) {
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
}
body[data-route] .list-row .grow, body[data-route] .profile-line > div { min-width: 0; overflow-wrap: anywhere; }
body[data-route] .list-row .grow > b { font-size: 14px; }
body[data-route] .list-row .grow > small { font-size: 12px; }
body[data-route] .list-row strong { font-size: 14px; overflow-wrap: anywhere; }
body[data-route] .list-row .list-icon { flex-shrink: 0; }
body[data-route] dialog { max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
body[data-route] dialog::backdrop { background: #302512a1; }
body[data-route] .bottom-nav {
  min-height: 64px;
  height: auto;
  width: min(620px, calc(100% - 18px));
  padding: 5px 5px 4px;
  border: 1px solid var(--line);
  background: #fffdf8f7;
  border-radius: 16px;
}
body[data-route] .bottom-nav .nav-item { min-height: 51px; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
body[data-route] .bottom-nav .nav-item.active { color: var(--accent); background: #f8efd4; }
body[data-route] .bottom-nav .nav-item.add .nav-icon {
  width: 37px; height: 34px; margin: 0; border-radius: 11px; background: var(--action); color: var(--action-ink); box-shadow: none;
}
body[data-route] .bottom-nav small { font-size: 10px; }
body[data-route] .toast { z-index: 65; max-width: calc(100% - 24px); width: max-content; white-space: normal; font-size: 13px; }

/* Summary and analytics */
.dashboard-grid, .dashboard-shortcuts { display: grid; gap: 13px; }
.dashboard-grid > *, .dashboard-shortcuts > * { margin-block: 0; }
body[data-route] .money-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  isolation: isolate;
  padding: clamp(17px, 3.2vw, 34px);
  background: linear-gradient(125deg, #fffdf4 5%, #fbefc9 66%, #f8e7b4);
  color: var(--ink);
  border: 1px solid #e5d4a3;
  box-shadow: 0 8px 26px #5f461012;
}
body[data-route] .money-hero::after {
  content: '';
  position: absolute;
  inset: auto -76px -236px auto;
  width: 430px;
  height: 430px;
  border: 1px solid #b8964929;
  border-radius: 50%;
  box-shadow: 0 0 0 22px #b8964909, 0 0 0 44px #b8964909;
  background: none;
  z-index: -1;
  pointer-events: none;
}
.money-hero .hero-top { gap: 10px; align-items: start; }
.money-hero .hero-top > div:first-child { min-width: 0; }
.money-hero .hero-label { font-size: 14px; color: #634a20; }
body[data-route] .hero-balance { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; font-size: clamp(35px, 5vw, 67px); line-height: 1.16; letter-spacing: -.055em; color: var(--ink); overflow-wrap: anywhere; }
.money-hero .hero-top p { color: #675231; font-size: 13px; }
.money-hero .hero-divider { background: #92743e38; margin-block: 15px; }
.money-hero .hero-stats { gap: 8px; }
.money-hero .hero-stats > div { min-width: 0; }
.money-hero .hero-stats span { color: #634a20; font-size: 12px; }
.money-hero .hero-stats b { color: var(--ink); font-size: clamp(12px, 2vw, 20px); overflow-wrap: anywhere; }
.money-hero .hero-stats b.positive { color: var(--green) !important; }
.money-hero .hero-stats b.negative { color: var(--red) !important; }
.money-hero .ring {
  flex-shrink: 0; width: clamp(59px, 10vw, 89px); height: auto; aspect-ratio: 1;
  background: radial-gradient(circle, #fffae5 58%, transparent 60%), conic-gradient(#bb8d21 calc(var(--p) * 1%), #ead9ae 0);
}
.money-hero .ring b { color: var(--ink); }
.money-hero .ring small { color: #675231; font-size: 10px; }
.money-hero .cycle-inline {
  flex-wrap: wrap; gap: 4px 12px; margin-top: 15px; padding: 9px 0 0; background: transparent; border-top: 1px solid #ba9d6859; color: #634a20; font-size: 12px;
}
.dashboard-shortcuts .quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
}
.dashboard-shortcuts .quick-actions a { padding: 10px 3px; color: var(--ink); border-color: var(--line); background: var(--paper); min-width: 0; }
.dashboard-shortcuts .quick-actions a > span { background: #f8efd4; color: var(--accent); }
.dashboard-shortcuts .quick-actions a > b { font-size: 12px; white-space: normal; }
.dashboard-shortcuts .quick-actions a > small { display: none; }
.dashboard-shortcuts :is(.salary-ready, .today-glance, .analysis-entry-card) {
  background: var(--paper); border-color: var(--line); min-height: 69px; padding: 10px 12px;
}
.dashboard-shortcuts .analysis-entry-card b, .dashboard-shortcuts .today-glance b { font-size: 15px; }
.dashboard-shortcuts .analysis-entry-card small, .dashboard-shortcuts .salary-ready .grow > span,
.dashboard-shortcuts .today-glance small { font-size: 12px; }
.dashboard-shortcuts .analysis-entry-card .analysis-entry-icon, .dashboard-shortcuts .today-icon { background: #f8efd4; color: var(--accent); }
body[data-route] .wallet-strip { scrollbar-width: thin; }
body[data-route] .wallet-strip::-webkit-scrollbar { display: block; height: 6px; }
body[data-route] .wallet-mini { background: #fff; border-color: var(--line); }
body[data-route] .wallet-mini small { font-size: 12px; }
body[data-route] .wallet-mini b { font-size: 15px; }
body[data-route] .budget-line span, body[data-route] .budget-line small { overflow-wrap: anywhere; }
body[data-route] .metric-card { padding: 13px; }
body[data-route] .metric-card span, body[data-route] .metric-card small { font-size: 12px; }
body[data-route] .metric-card b { font-size: clamp(16px, 2vw, 25px); overflow-wrap: anywhere; }
.report-period-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.report-period-nav .btn { display: inline-flex; align-items: center; padding: 6px 12px; }
body[data-route] .chart-panel .chart-wrap { height: clamp(225px, 37vw, 330px); }
body[data-route] .table-scroll { max-width: 100%; overflow-x: auto; }

/* Search, filters and categories */
body[data-route] .history-controls { padding: clamp(12px, 2.5vw, 20px); }
.history-controls .smart-search { display: flex; min-height: 49px; padding: 0 4px 0 13px; border: 1px solid var(--line); background: #fffbef; box-shadow: none; }
.history-controls .search-submit { min-height: 42px; min-width: 42px; color: var(--action-ink); background: var(--action); border-radius: 9px; }
.history-chips { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 12px; row-gap: 2px; padding-top: 8px; }
.history-chips .type-chips { display: flex; flex-wrap: wrap; overflow: visible; margin: 0; gap: 5px; }
.history-chips .type-chips a {
  display: inline-flex; align-items: center; min-height: 41px; padding: 5px 11px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 12px;
}
.history-chips .type-chips a.active { background: #f8edce; border-color: #e5d3a1; color: #604619; }
.history-controls .filter-panel { margin: 10px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.history-controls .filter-panel > summary { min-height: 44px; padding: 5px 0; font-size: 13px; }
.history-controls .friendly-filter { padding: 6px 0 0; }
.history-controls .friendly-filter > .form-grid, .history-controls .filter-actions, .filter-error { grid-column: 1 / -1; }
.filter-error, .entry-error { color: var(--red); font-weight: 700; }
.history-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.history-totals > div { min-width: 0; padding: 10px clamp(7px, 2vw, 18px); }
.history-totals > div + div { border-left: 1px solid var(--line); }
.history-totals span, .history-totals b { display: block; }
.history-totals span { color: var(--muted); font-size: 12px; }
.history-totals b { font-size: clamp(12px, 2.3vw, 20px); overflow-wrap: anywhere; }
body[data-route] .list-summary { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 13px; }
body[data-route] .list-summary > a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); padding-inline: 9px; }
body[data-route] .date-group-head b { font-size: 14px; }
body[data-route] .date-group-head small, body[data-route] .day-totals { font-size: 11px; }
body[data-route] .transaction-row-amount, body[data-route] .tx-amount { max-width: 39%; min-width: 0; text-align: right; }
.history-pagination { display: flex; justify-content: center; align-items: center; gap: clamp(8px, 2.8vw, 22px); margin-top: 20px; font-size: 13px; }
.history-pagination a { display: inline-flex; align-items: center; }

.category-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.category-toolbar .btn { white-space: nowrap; }
.category-search {
  flex: 1 1 185px; display: flex; align-items: center; gap: 8px; padding-inline: 12px;
  min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: #fffbef; color: var(--accent);
}
.category-search .ui-icon { flex-shrink: 0; }
.category-search input { width: 100%; height: 44px; padding: 0; border: 0; background: transparent; }
.category-group .chip-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); }
.category-count { font-size: 12px; color: var(--muted); }
.category-group .category-chip {
  grid-template-columns: 38px minmax(0, 1fr);
  min-width: 0; min-height: 66px; align-content: center; gap: 1px 9px;
  background: #fffcf4; padding: 9px; border-radius: 12px;
}
.category-group .category-chip:hover { background: #fff8e3; }
.category-group .category-chip > span {
  width: 35px; height: 35px; align-self: center; display: grid; place-items: center;
  border-radius: 9px; background: #f6edcf; color: var(--accent); font-size: 17px;
}
.category-group .category-chip b { overflow-wrap: anywhere; font-size: 14px; }
.category-group .category-chip small { font-size: 11px; }

/* Transaction editor */
body[data-route] .entry-shell { background: var(--paper); border-radius: 17px; padding: clamp(13px, 3vw, 24px); }
.entry-main { display: grid; gap: 13px; max-width: none; }
.entry-selection, .entry-details { min-width: 0; }
body[data-route] .entry-type { max-width: none; margin: 0 0 13px; }
body[data-route] .entry-type label > span { min-height: 44px; font-size: 13px; }
body[data-route] .amount-stage { padding: 13px; margin-bottom: 11px; border-radius: 15px; background: #faf1d8; border: 1px solid #ede0bd; text-align: left; }
body[data-route] .amount-stage label { color: var(--ink-2); font-weight: 800; }
body[data-route] .amount-field, body[data-route] .amount-field:hover, body[data-route] .amount-field:focus-within {
  justify-content: flex-start; max-width: 100%; padding: 3px 0; cursor: text; background: transparent; box-shadow: none; transform: none;
}
body[data-route] .amount-field input[data-amount-input] { min-width: 0; width: 100%; font-size: clamp(34px, 5vw, 52px); color: var(--ink); text-align: left; }
body[data-route] .amount-field > span { color: var(--accent); }
body[data-route] .amount-keypad-helper { min-height: 40px; padding: 5px 10px; color: var(--accent); font-size: 13px; }
body[data-route] .entry-date-visible { flex-direction: row; flex-wrap: wrap; align-items: center; margin-bottom: 11px; background: #fff; border-color: var(--line); }
body[data-route] .entry-date-visible > span { grid-template-areas: 'icon title'; flex: 1 1 auto; }
body[data-route] .entry-date-visible input { flex: 0 1 auto; width: auto; min-width: 0; min-height: 44px; }
body[data-route] .entry-date-visible b, body[data-route] .field-title { font-size: 13px; }
body[data-route] .category-icon-grid { grid-template-columns: repeat(auto-fill, minmax(64px,1fr)); }
body[data-route] .category-option { min-height: 66px; }
body[data-route] .category-option small { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
body[data-route] .category-option.selected { background: #faf0cc; border-color: #d4b970; }
body[data-route] .entry-title { margin: 0 0 12px; }
body[data-route] .account-choice-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 127px),1fr)); }
body[data-route] .account-choice > span { min-height: 44px; }
body[data-route] .account-choice b { overflow-wrap: anywhere; white-space: normal; }
body[data-route] .entry-submit { position: static; margin: 13px 0 0; padding: 0; background: none; }
body[data-route] .entry-error { margin: 12px 0 0; padding: 8px 10px; background: var(--red-soft); border: 1px solid #f2cdce; border-radius: 9px; }
body[data-route] .entry-no-account a { color: var(--accent); text-decoration: underline; }
body[data-route].amount-keypad-open { touch-action: auto; }

/* Responsive layout */
@media (min-width: 660px) {
  .profile-chip-name { display: block; }
  .dashboard-grid { grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); align-items: stretch; gap: 15px; }
  .dashboard-grid .accounts-overview { grid-column: 1 / -1; }
  .dashboard-grid .recent-card, .dashboard-grid .budgets-overview { grid-column: 1 / -1; }
  .dashboard-shortcuts .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .dashboard-shortcuts .quick-actions a { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 7px; padding: 8px; min-height: 60px; }
  .dashboard-shortcuts .quick-actions a > span { margin: 0; width: 31px; height: 31px; flex: 0 0 31px; }
  .entry-main { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 21px; }
  .entry-details { border-left: 1px solid var(--line); padding-left: 18px; }
  body[data-route] .entry-shell { width: min(100%, 980px); margin-inline: auto; }
}
@media (min-width: 780px) {
  .dashboard-grid > .recent-card { grid-column: 1; }
  .dashboard-grid > .budgets-overview { grid-column: 2; }
  body[data-route] .analysis-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width: 1000px) {
  body[data-route] .app-shell { display: grid; grid-template-columns: clamp(205px, 18vw, 238px) minmax(0, 1fr); }
  body[data-route] .content { padding-bottom: 38px; }
  body[data-route] .topbar { justify-content: flex-end; }
  body[data-route] .topbar > .brand, body[data-route] .bottom-nav { display: none; }
  .wallet-sidebar {
    position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; overflow: auto;
    padding: 21px 14px; color: var(--ink); background: #f8f3e5; border-right: 1px solid var(--line);
  }
  .wallet-sidebar > .brand { margin: 3px 7px 23px; }
  .sidebar-nav { display: grid; gap: 4px; align-content: start; }
  .sidebar-group { margin: 16px 8px 4px; padding-top: 10px; border-top: 1px solid #e9d8ae; color: #6c6151; font-size: 12px; }
  .sidebar-nav .nav-item {
    min-height: 43px; height: auto; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px;
    padding: 6px 9px; border-radius: 9px; color: #4e3d20;
  }
  .sidebar-nav .nav-item small { font-size: 13px; font-weight: 625; }
  .sidebar-nav .nav-item.add .nav-icon { border: 0; }
  .sidebar-nav .nav-item .nav-icon { display: grid; place-items: center; width: 28px; height: 28px; background: none; color: inherit; }
  .sidebar-nav .nav-item:hover { background: #fff0bf; }
  .sidebar-nav .nav-item.active { color: var(--action-ink); background: #f3e5bf; box-shadow: inset 2px 0 #ab7c2b; }
  .sidebar-nav .nav-item.add { color: var(--action-ink); background: var(--action); }
  .sidebar-nav .nav-item.add.active { box-shadow: inset 3px 0 #9f741e; }
  .sidebar-nav .nav-item.add .nav-icon { width: 28px; height: 28px; margin: 0; transform: none; box-shadow: none; }
  .sidebar-nav .nav-item:focus-visible { outline-color: #947122; }
  .dashboard-grid, .dashboard-shortcuts { gap: 15px; }
  .dashboard-shortcuts .quick-actions a > b { font-size: 14px; }
  .category-group .chip-list { grid-template-columns: repeat(auto-fill,minmax(168px,1fr)); }
}
@media (min-width: 1440px) {
  body[data-route] .analysis-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 375px) {
  body[data-route] .page-add { padding-inline: 7px; font-size: 11px; }
  .history-chips .type-chips a { padding-inline: 8px; }
  body[data-route] .form-grid { gap: 8px; }
  .money-hero .hero-stats span { font-size: 11px; }
  body[data-route] .chart-panel { padding-inline: 10px; }
}
@media (hover: hover) {
  body[data-route] .btn.primary:hover, body[data-route] .page-add:hover { background: var(--action-hover); }
  .dashboard-shortcuts .quick-actions a:hover { border-color: #d6b358; background: #fff9e8; }
}

body[data-route] .entry-keypad.keypad-sheet:not([open]) { display: none; }
body[data-route] .entry-keypad.keypad-sheet[open] {
  inset: auto 0 0;
  margin: 0 auto;
  width: min(470px,100%);
  max-height: calc(100dvh - 12px);
  transform: none;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
body[data-route] .entry-keypad .keypad-display { background: #fff2bf; border-color: var(--line); color: var(--ink); }
body[data-route] .entry-keypad .keypad-confirm { background: var(--action); color: var(--action-ink); }
@media (min-width: 660px) {
  body[data-route] .entry-keypad.keypad-sheet[open] {
    inset: 0;
    margin: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    width: min(420px, calc(100% - 24px));
    max-height: calc(100dvh - 30px);
  }
  .entry-keypad .keypad-grabber { display: none; }
}

body[data-route] .transfer-wrap:not([hidden]) { display: block; }
body[data-route] .amount-field input[data-amount-input]::placeholder { font: inherit; opacity: .47; }

body[data-route] :is(.salary-ready-icon, .wallet-emoji, .list-icon, .account-icon, .goal-emoji, .account-choice i, .category-option > span) > .ui-icon {
  color: var(--accent);
  font-size: 17px;
}
body[data-route] .menu-icon > .ui-icon { color: var(--accent); }
body[data-route] .salary-ready-icon,
body[data-route] .wallet-emoji { background: #f8efd4; }
body[data-route] .friendly-empty > span:has(.ui-icon) { color: var(--accent); font-size: 23px; }
body[data-route] .quick-actions .ui-icon,
body[data-route] .bottom-nav .ui-icon,
body[data-route] .sidebar-nav .ui-icon { width: 17px; height: 17px; }
body[data-route] .entry-type { background: #f5efdf; }
body[data-route] .entry-type label > span,
body[data-route] .btn { font-weight: 650; }
body[data-route] .category-option > span { background: #f8f0d9; }
@media (max-width: 375px) {
  body[data-route] .hero-balance { font-size: clamp(28px, 9vw, 35px); }
}
