/* Mobile readability and touch-target improvements */
html{-webkit-text-size-adjust:100%}
body{font-size:16px}
input,select,textarea{font-size:1rem}
button{touch-action:manipulation}

/* Login */
.eyebrow{font-size:.76rem}
.auth-content>h1{font-size:2.25rem}
.tagline{font-size:.9rem;margin-bottom:26px}
.auth-card{padding:28px 24px}
.auth-card h2{font-size:1.7rem}
.auth-card>p:nth-of-type(2){font-size:.86rem;line-height:1.6;margin-bottom:22px}
.auth-card label{margin-bottom:17px}
.auth-card label>span{font-size:.82rem;margin-bottom:7px}
.auth-card input{min-height:50px;padding:12px 14px;font-size:1rem}
.password-input-wrap button{min-width:44px;min-height:38px;font-size:.76rem}
.auth-message{font-size:.8rem;padding:10px 12px}
.submit{min-height:50px;font-size:1rem}
.forgot-link{font-size:.76rem;line-height:1.55}
.local-note{font-size:.7rem;line-height:1.5}

/* Header and page spacing */
.app-header{height:76px;padding:14px 18px}
.app-brand img{width:43px;height:43px}
.app-brand strong{font-size:1.05rem}
.app-brand small{font-size:.68rem}
.header-buttons button{width:42px;height:42px}
main{padding-bottom:94px}
.screen{padding:21px 18px 30px;min-height:calc(100vh - 76px)}
.greeting{margin-bottom:18px}
.greeting p{font-size:.82rem}
.greeting h1{font-size:1.72rem}
.greeting>span{font-size:.7rem}

/* Hero */
.hero-card{padding:23px;min-height:218px}
.hero-badge{font-size:.68rem;padding:5px 9px}
.hero-copy h2{font-size:1.55rem;line-height:1.35}
.hero-copy p{font-size:.78rem;line-height:1.55}
.hero-copy button{min-height:42px;padding:9px 13px;font-size:.8rem}
.mascot-bubble{font-size:.68rem}

/* Daily and monthly dashboards */
.daily-card,.monthly-card{padding:17px}
.daily-top p{font-size:.72rem}
.daily-top h2{font-size:1.02rem}
.daily-numbers{gap:8px}
.daily-numbers div{padding:11px 9px}
.daily-numbers small{font-size:.66rem}
.daily-numbers strong{font-size:.9rem}
.daily-message{font-size:.72rem;line-height:1.55;margin-top:9px}
.daily-actions button{min-height:43px;padding:9px 12px;font-size:.78rem}
.expense-row{grid-template-columns:36px 1fr auto 34px;gap:9px;padding:11px 0}
.expense-row>span{width:34px;height:34px;font-size:.82rem}
.expense-row strong{font-size:.76rem}
.expense-row small{font-size:.63rem}
.expense-row>b{font-size:.78rem}
.expense-row button{width:34px;height:34px;font-size:.9rem}
.monthly-head p{font-size:.68rem}
.monthly-head h2{font-size:1.02rem}
.monthly-head>span{font-size:.64rem;padding:5px 8px}
.monthly-stats div{padding:11px 9px}
.monthly-stats small{font-size:.62rem}
.monthly-stats strong{font-size:.84rem}
.monthly-donut small{font-size:.6rem}
.monthly-donut strong{font-size:.82rem}
.monthly-categories>p,.category-row,.category-row b{font-size:.66rem}

/* Forms and profile */
.screen-head p{font-size:.7rem}
.screen-head h1{font-size:1.45rem}
.screen-head .back{width:42px;height:42px}
.lead-form{padding:19px}
.form-intro strong{font-size:.82rem}
.form-intro p{font-size:.68rem}
.lead-form label>span{font-size:.78rem;margin-bottom:7px}
.lead-form label small{font-size:.66rem}
.lead-form input,.lead-form select,.lead-form textarea{min-height:48px;padding:12px;font-size:1rem}
.lead-form .consent span{font-size:.72rem}
.form-submit,.contact-button,.logout-button{min-height:48px;font-size:.9rem}
.profile-card h2{font-size:1.2rem}
.profile-card p{font-size:.74rem}
.profile-list button{grid-template-columns:42px 1fr 24px;min-height:64px;padding:13px}
.profile-list button>span{width:40px;height:40px}
.profile-list strong{font-size:.82rem}
.profile-list small{font-size:.68rem;line-height:1.45}

/* Dialogs */
.mobile-dialog form{padding:26px 23px}
.mobile-dialog h2{font-size:1.5rem}
.mobile-dialog form>p:not(.eyebrow){font-size:.8rem;line-height:1.55;max-width:310px}
.money-input>span,.expense-dialog form>label>span,.profile-setup-dialog form>label>span{font-size:.76rem}
.profile-setup-dialog input,.expense-dialog select,.expense-dialog form>label>input{min-height:48px;padding:11px 12px;font-size:1rem}
.quick-budget button{min-height:42px;font-size:.76rem}
.dialog-submit{min-height:48px;font-size:.9rem}
.dialog-skip{min-height:42px;margin-top:7px;padding:8px 12px;background:transparent;color:#687793;font-size:.78rem}
.mobile-dialog form>small{font-size:.67rem;line-height:1.45}
.linked-user span{font-size:.7rem}
.linked-user strong{font-size:.84rem}

/* History */
.history-heading p{font-size:.68rem}
.history-heading h1{font-size:1.5rem}
.history-period-tabs button{min-height:44px;font-size:.78rem}
.history-calendar{padding:11px 13px}
.history-calendar label{font-size:.68rem}
.history-calendar input,.history-calendar select{font-size:1rem}
.history-summary{gap:8px}
.history-summary div{padding:12px 8px}
.history-summary small{font-size:.66rem}
.history-summary strong{font-size:.84rem}
.history-card-head p{font-size:.66rem}
.history-card-head h2{font-size:1rem}
.history-card-head>span,.history-card-head>strong{font-size:.66rem}
.history-chart-insight{font-size:.72rem;line-height:1.5}
.history-transaction{grid-template-columns:38px 1fr auto;gap:10px;padding:11px 0}
.history-transaction>span{width:36px;height:36px;font-size:.84rem}
.history-transaction strong{font-size:.76rem}
.history-transaction small{font-size:.63rem}
.history-transaction>b{font-size:.8rem}
.history-empty{font-size:.72rem}

/* Bottom navigation */
.bottom-nav{
  height:84px;
  padding:7px 10px calc(8px + env(safe-area-inset-bottom));
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  align-items:stretch;
  gap:4px;
}
.bottom-nav button{
  width:100%;
  min-width:0;
  min-height:64px;
  padding:4px 2px 3px;
  gap:3px;
  justify-content:center;
  border-radius:13px;
  transition:background .18s,color .18s,transform .18s;
}
.bottom-nav button:active{transform:scale(.96)}
.bottom-nav button.active{background:#edf3ff}
.bottom-nav span,
.bottom-nav button:nth-child(2) span,
.bottom-nav button:nth-child(3) span{
  width:34px;
  height:34px;
  min-width:34px;
  margin:0;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:transparent;
  color:inherit;
  box-shadow:none;
}
.bottom-nav svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.bottom-nav #bottomAddExpense span{
  width:40px;
  height:40px;
  min-width:40px;
  margin:0;
  border-radius:13px;
  background:linear-gradient(135deg,#2367e8,#5c4bdd);
  color:#fff;
  box-shadow:0 7px 15px #2367e842;
}
.bottom-nav #bottomAddExpense b{color:#315fc6;font-weight:600}
.bottom-nav b{font-size:.62rem;font-weight:500;line-height:1.15;white-space:nowrap}
.toast{bottom:98px;font-size:.78rem;line-height:1.45}

/* Tap the daily budget summary to set or edit it */
.daily-numbers .budget-shortcut{position:relative;padding:9px;border:1px solid transparent;border-radius:10px;background:#f5f8fd;text-align:left;transition:background .18s,border-color .18s,transform .18s}
.daily-numbers .budget-shortcut small,.daily-numbers .budget-shortcut strong{display:block}
.daily-numbers .budget-shortcut small{color:#8190aa;font-size:.68rem}
.daily-numbers .budget-shortcut strong{font-size:.92rem}
.daily-numbers .budget-shortcut>span{position:absolute;right:7px;top:6px;color:#4d6fc4;font-size:.68rem}
.daily-numbers .budget-shortcut:active{transform:scale(.96)}
.daily-numbers .budget-shortcut:focus-visible{border-color:#9bb9f5;background:#edf3ff;outline:0}

/* Premium all-time financial wheel in Profile (kept in the always-loaded stylesheet) */
.profile-finance-card{margin-top:15px;padding:18px;border:1px solid #dfe6f3;border-radius:20px;background:linear-gradient(155deg,#fff 0%,#f7f9ff 100%);box-shadow:0 12px 30px #253e7412;overflow:hidden}
.profile-finance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.profile-finance-head p,.profile-finance-head h2{margin:0}.profile-finance-head p{color:#7e8ca7;font-size:.68rem;letter-spacing:.08em}.profile-finance-head h2{font-size:1.22rem}.profile-finance-head>span{padding:6px 10px;border-radius:20px;background:#e8efff;color:#315fc6;font-size:.66rem;font-weight:600}
.profile-finance-content{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;margin-top:17px!important}
.profile-finance-wheel{position:relative;width:196px;height:196px;margin:0 auto;background:radial-gradient(circle at 50% 45%,#fff 0 53%,transparent 54%);border-radius:50%}
.profile-finance-wheel svg{display:block;width:100%;height:100%;overflow:visible;filter:url(#financeGlow);transform:rotate(-90deg)}
.finance-wheel-track,.finance-wheel-segment{fill:none;stroke-width:17}.finance-wheel-track{stroke:#e9eef7}.finance-wheel-segment{stroke-linecap:round;stroke-dasharray:0 100;stroke-dashoffset:0;transition:stroke-dasharray .65s ease,stroke-dashoffset .65s ease}.finance-wheel-segment.expense{stroke:#2563eb}.finance-wheel-segment.remaining{stroke:#ec3f8c}.finance-wheel-segment.paid{stroke:#12b76a}
.profile-finance-center{position:absolute;inset:37px;display:grid;align-content:center;justify-items:center;text-align:center;border-radius:50%;background:#fff;box-shadow:0 9px 25px #273f7515}.profile-finance-center small,.profile-finance-center strong,.profile-finance-center span{display:block}.profile-finance-center small{color:#8592aa;font-size:.64rem}.profile-finance-center strong{max-width:112px;margin:2px 0;color:#16234a;font-size:1.08rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis}.profile-finance-center span{color:#9aa5b9;font-size:.58rem}
.profile-finance-legend{display:grid!important;gap:8px!important}.profile-finance-legend .finance-legend-row{display:grid!important;grid-template-columns:12px 1fr auto!important;gap:10px!important;align-items:center!important;padding:11px 12px;border:1px solid #e4e9f2;border-radius:13px;background:#fff;box-shadow:0 5px 14px #263e7308}.finance-legend-row>i{width:11px!important;height:35px!important;border-radius:10px!important}.finance-legend-row.expense>i{background:linear-gradient(#4d86f7,#2563eb)!important}.finance-legend-row.remaining>i{background:linear-gradient(#ff73ad,#ec3f8c)!important}.finance-legend-row.paid>i{background:linear-gradient(#54d89a,#12b76a)!important}.finance-legend-row>div{min-width:0}.finance-legend-row strong,.finance-legend-row small{display:block}.finance-legend-row strong{font-size:.76rem}.finance-legend-row small{margin-top:1px!important;color:#8390a8!important;font-size:.67rem!important}.finance-legend-row>b{min-width:48px;padding:7px 8px;border-radius:10px;background:#f1f4fa;font-size:.78rem;text-align:center}.finance-legend-row.expense>b{color:#2563eb}.finance-legend-row.remaining>b{color:#d83278}.finance-legend-row.paid>b{color:#079954}
.profile-finance-note{margin:13px 0 0!important;padding:10px 12px!important;border-radius:11px!important;background:#eef3ff!important;color:#536788!important;font-size:.7rem!important;line-height:1.45;text-align:center}
@media(max-width:360px){.profile-finance-wheel{width:174px;height:174px}.profile-finance-center{inset:34px}.profile-finance-card{padding:15px}}

/* Final compact dashboard layout, matched to the supplied reference */
.profile-finance-card{margin-top:13px;padding:17px;border:1px solid #dce3ef;border-radius:18px;background:#fff;box-shadow:none;overflow:visible}
.profile-finance-head{display:flex;align-items:flex-start;justify-content:space-between}.profile-finance-head p,.profile-finance-head h2{margin:0}.profile-finance-head p{color:#8090ab;font-size:.66rem;letter-spacing:0}.profile-finance-head h2{margin-top:1px;font-size:1.1rem}.profile-finance-head>span{padding:5px 9px;border-radius:16px;background:#edf3ff;color:#315fc6;font-size:.62rem;font-weight:500}
.profile-finance-stats{display:grid;grid-template-columns:1.2fr 1fr .82fr;gap:7px;margin-top:13px}.profile-finance-stats>div{min-width:0;padding:11px 10px;border-radius:11px;background:#f3f6fb}.profile-finance-stats>div.expense{background:linear-gradient(135deg,#2367e8,#5b4adc);color:#fff}.profile-finance-stats small,.profile-finance-stats strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-finance-stats small{color:#7e8ca6;font-size:.61rem}.profile-finance-stats .expense small{color:#dfe8ff}.profile-finance-stats strong{margin-top:2px;font-size:.78rem}
.profile-finance-content{display:grid!important;grid-template-columns:128px 1fr!important;align-items:center!important;gap:14px!important;margin-top:15px!important}
.profile-finance-wheel{width:124px;height:124px;margin:0;background:transparent;box-shadow:none}.profile-finance-wheel svg{width:124px;height:124px;filter:none}.finance-wheel-track,.finance-wheel-segment{stroke-width:15}.profile-finance-center{inset:28px;background:#fff;box-shadow:none}.profile-finance-center small{font-size:.59rem}.profile-finance-center strong{max-width:66px;margin:1px 0;font-size:.76rem}.profile-finance-center span{display:none}
.profile-finance-legend{gap:7px!important}.profile-finance-legend .finance-legend-row{grid-template-columns:8px 1fr auto!important;gap:7px!important;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}.finance-legend-row>i{width:8px!important;height:8px!important;border-radius:50%!important}.finance-legend-row>div{min-width:0}.finance-legend-row strong{font-size:.64rem;font-weight:500;white-space:nowrap}.finance-legend-row small{margin:0!important;font-size:.59rem!important}.finance-legend-row>b{min-width:38px;padding:3px 5px;border-radius:7px;background:#f1f4fa;font-size:.66rem}
.profile-finance-note{margin:12px 0 0!important;padding:8px 10px!important;border-radius:9px!important;background:#f5f7fb!important;color:#71809c!important;font-size:.64rem!important}
@media(max-width:360px){.profile-finance-content{grid-template-columns:112px 1fr!important;gap:9px!important}.profile-finance-wheel,.profile-finance-wheel svg{width:108px;height:108px}.profile-finance-center{inset:25px}.profile-finance-stats{gap:5px}.profile-finance-stats>div{padding:9px 7px}}

.copy-monthly-summary{width:100%;min-height:54px;margin-top:15px;padding:9px 10px;display:grid;grid-template-columns:36px 1fr auto;gap:9px;align-items:center;border:1px solid #dce5f4;border-radius:12px;background:#f7f9ff;color:#315fc6;text-align:left;transition:.18s}.copy-monthly-summary:active{transform:scale(.98);background:#edf3ff}.copy-monthly-summary>span{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#e5edff;font-size:.92rem}.copy-monthly-summary strong,.copy-monthly-summary small{display:block}.copy-monthly-summary strong{font-size:.75rem}.copy-monthly-summary small{margin-top:1px;color:#7f8ba4;font-size:.62rem}.copy-monthly-summary>b{padding:6px 9px;border-radius:8px;background:#2367e8;color:#fff;font-size:.65rem}
.monthly-summary-dialog{width:min(420px,calc(100% - 22px))}.monthly-summary-dialog form{padding:21px;text-align:left}.monthly-summary-picker{display:block;margin-top:15px}.monthly-summary-picker>span{display:block;margin-bottom:6px;color:#647390;font-size:.74rem}.monthly-summary-picker input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #d9e1ee;border-radius:10px;background:#f9fbff;font:inherit;font-size:.9rem;outline:0}.monthly-summary-picker input:focus{border-color:#2367e8;box-shadow:0 0 0 3px #2367e814}.monthly-summary-dialog pre{max-height:42vh;margin:13px 0 0;padding:15px;overflow:auto;white-space:pre-wrap;word-break:break-word;border:1px solid #e0e6f0;border-radius:12px;background:#f6f8fc;color:#263657;font-family:"Kanit",sans-serif;font-size:.72rem;line-height:1.7}.copy-summary-dialog{width:100%;min-height:54px;margin-top:12px;padding:9px 10px;display:grid;grid-template-columns:36px 1fr auto;gap:9px;align-items:center;border-radius:11px;background:linear-gradient(135deg,#2367e8,#5b4bd8);color:#fff;text-align:left}.copy-summary-dialog>span{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#ffffff1f}.copy-summary-dialog strong,.copy-summary-dialog small{display:block}.copy-summary-dialog strong{font-size:.76rem}.copy-summary-dialog small{color:#dce5ff;font-size:.62rem}.copy-summary-dialog>b{padding:6px 9px;border-radius:8px;background:#fff;color:#315fc6;font-size:.65rem}

@media(max-width:360px){
  .screen{padding-left:14px;padding-right:14px}
  .hero-card{padding:19px}
  .hero-copy h2{font-size:1.38rem}
  .daily-numbers strong{font-size:.82rem}
  .monthly-stats strong{font-size:.76rem}
}
