.mobile-app-header{display:none}
@media(max-width:700px){
  html{scroll-padding-top:90px;scroll-padding-bottom:110px}
  body{background:#f5f5f9;-webkit-tap-highlight-color:transparent}
  body:has(dialog[open]){overflow:hidden}
  main{margin:0;min-width:0}
  .mobile-app-header{display:flex;position:sticky;top:0;z-index:5;align-items:center;justify-content:space-between;padding:calc(12px + env(safe-area-inset-top)) 20px 12px;background:#f5f5f9ed;backdrop-filter:blur(18px);border-bottom:1px solid #e9e7ef}
  .mobile-brand{font-family:Manrope,system-ui,sans-serif;font-size:28px;font-weight:800;letter-spacing:-1.5px;display:flex;align-items:center;gap:7px}
  .mobile-brand>span{color:#859a61;font-size:31px;font-weight:400}
  .mobile-app-header form{display:flex;align-items:center;gap:12px}
  .mobile-user{font-size:10px;color:#8a8295;text-align:right;line-height:1.6}
  .mobile-user b{display:block;font-size:12px;font-weight:600;color:#51495b}
  .mobile-app-header button{width:44px;height:44px;border-radius:50%;border:1px solid #e2d9ef;background:#ece5f8;color:#827097;font-size:22px}
  main>header{display:none}
  .sidebar{position:fixed;inset:auto 0 0;width:100%;padding:8px max(12px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));z-index:20;background:#fffffff2;border:0;border-top:1px solid #e8e3ee;box-shadow:0 -8px 32px #24203207;backdrop-filter:blur(20px)}
  .sidebar>.brand,.sidebar .workspace,.sidebar-bottom{display:none}
  .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;max-width:500px;margin:auto}
  .sidebar nav a{display:flex;flex-direction:column;gap:4px;min-height:58px;padding:6px 2px;border-radius:13px;color:#8a8295;font-size:11px;font-weight:500;white-space:normal;text-align:center}
  .sidebar nav a>span:first-child{display:grid;place-items:center;width:48px;height:27px;font-size:23px;line-height:1;border-radius:9px;transition:background .2s}
  .sidebar nav a.active{background:none;color:#363d2e;font-weight:700}
  .sidebar nav a.active>span:first-child{background:#d8edbc;color:#4a6140}
  .sidebar .nav-arrow,.sidebar .nav-count{display:none}
  .content{padding:24px 18px calc(110px + env(safe-area-inset-bottom));width:100%;overflow-wrap:anywhere}
  .page-heading{display:block;margin-bottom:22px}
  .page-heading .eyebrow{font-size:9px;letter-spacing:1.4px;color:#8c819b}
  .page-heading h1{font-size:32px;font-weight:750;margin:9px 0 8px;letter-spacing:-1.2px}
  .page-heading p{font-size:13px;line-height:1.6;max-width:none;color:#8c8298}
  .heading-actions{display:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}
  .heading-actions .primary{max-width:none;min-height:48px;flex:1;font-size:12px;padding:13px 15px;border-radius:13px}
  .heading-actions .text-btn{font-size:10px;min-height:44px;padding:8px;max-width:105px;line-height:1.6}
  .primary,.salary-edit,.add-line,.calendar-today{min-height:44px}
  .top-grid{margin-bottom:16px}
  .wealth-hero{border-radius:22px;min-height:220px;padding:24px;box-shadow:0 12px 25px #24203313}
  .hero-top>span:first-child{font-size:10px;letter-spacing:1.3px}
  .wealth-number{font-size:clamp(29px,9vw,43px);margin:24px 0;letter-spacing:-1.4px;overflow-wrap:anywhere}
  .hero-bottom{flex-wrap:wrap;gap:12px;font-size:12px}.hero-bottom small{font-size:11px}.hero-bottom a{font-size:11px;min-height:30px;display:flex;align-items:center}
  .asset-strip{gap:0;background:#fff;border:1px solid #ebe7f1;border-radius:18px;overflow:hidden;margin-bottom:22px}
  .asset-strip article{padding:17px;border:0;border-bottom:1px solid #f0edf5;border-radius:0;background:none;gap:12px}
  .asset-strip article:last-child{border:0}.asset-icon{width:37px;height:37px;font-size:22px;border-radius:12px}
  .asset-strip small{font-size:11px;max-width:115px;line-height:1.5;color:#8d819b}.asset-strip strong{font-size:18px}
  .grid-main{gap:18px;margin-bottom:18px}.panel{padding:20px 18px;border-radius:19px;border-color:#ebe7f1}
  .panel-heading{gap:12px;margin-bottom:18px;flex-wrap:wrap}.panel-heading h2{font-size:15px;line-height:1.5}.panel-heading .badge{font-size:9px;padding:7px 9px}
  .chart-note{font-size:11px;line-height:1.7;color:#978aa4}.history-chart{margin-top:10px}
  .legend{gap:16px}.legend>div{font-size:12px}.donut small{font-size:10px}.donut small:first-child{font-size:9px}
  .account-row{gap:11px;padding:17px 0;min-height:80px}.account-name b{font-size:12px;line-height:1.5}.account-name small{font-size:10px;line-height:1.5}.account-row strong{font-size:13px}.round-arrow{margin:0}
  .panel-link{min-height:46px;font-size:12px;align-items:center;padding-top:13px}.text-link{font-size:12px;min-height:36px;display:flex;align-items:center}
  .account-banner{padding:23px;border-radius:20px;margin-bottom:18px}.account-banner .eyebrow{font-size:9px;line-height:1.7}.account-banner h2{font-size:34px}.account-banner p{font-size:12px;line-height:1.6}
  .filter-tabs{padding:4px;border-radius:12px;gap:2px;overflow-x:auto}.filter-tabs button{min-height:44px;font-size:11px;border-radius:9px;padding:8px 9px;white-space:nowrap;flex:1 0 auto}
  .account-cards{gap:14px}.account-card{padding:20px;border-radius:18px}.account-card:hover{transform:none}
  .account-card h2{font-size:14px;margin:20px 0 10px;min-height:0;line-height:1.6}.account-value{font-size:31px}.account-card .badge{font-size:10px;white-space:normal;text-align:right}
  .account-card-footer{margin-top:18px;padding-top:12px}.account-card-footer small{font-size:11px}.account-card-footer button{width:44px;height:44px;font-size:20px}
  .section-intro{display:block;margin-bottom:18px}.section-intro .eyebrow{display:none}.section-intro p{font-size:12px;margin:0 0 17px;line-height:1.7}
  .month-picker{width:100%;border-radius:13px;padding:5px;justify-content:space-between;margin:0}
  .month-picker>button{min-width:44px;height:44px;font-size:26px}.month-picker .month-current{flex:1;min-width:0;font-size:14px;gap:12px}.month-current span{font-size:18px}
  .salary-card,.salary-card.compact{padding:18px 15px;border-radius:17px;gap:10px;flex-wrap:wrap}.salary-card>div{flex:1;min-width:135px}.salary-icon{width:37px;height:37px;flex-shrink:0;font-size:22px}
  .salary-card>div>span{font-size:11px;line-height:1.5;color:#8c719f}.salary-card strong,.compact strong{font-size:25px}.salary-edit,.compact .salary-edit{font-size:11px;border-radius:10px;min-height:44px;padding:10px}
  .salary-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:0;background:none;overflow:visible;margin-bottom:14px;border-radius:0}
  .salary-summary article{display:block;border:1px solid #eae5ef!important;border-radius:16px;background:white;padding:17px 13px;min-width:0}
  .salary-summary span{font-size:11px;line-height:1.5;color:#8c7f98}.salary-summary strong{font-size:clamp(18px,5.4vw,25px);margin:13px 0 9px;letter-spacing:-.7px}.salary-summary small{font-size:10px;line-height:1.6;display:block}
  .budget-explanation{font-size:11px;line-height:1.7;color:#998ba6;margin-bottom:22px}
  .remaining-summary{gap:10px}.remaining-summary article{padding:15px 12px;border-radius:13px;min-width:0}.remaining-summary span{font-size:11px;line-height:1.6}.remaining-summary strong{font-size:21px;overflow-wrap:anywhere}.remaining-summary small{font-size:10px;line-height:1.6}
  .budget-overview-totals{justify-content:space-between;padding:2px 2px 18px}.budget-overview-totals span{font-size:11px}.budget-overview-totals b{font-size:17px}
  .category-chart{gap:19px}.category-chart>div{grid-template-columns:80px minmax(0,1fr) 80px;gap:8px;font-size:11px}.category-chart b{font-size:11px}.track{height:9px}
  .budget-categories{gap:18px}.budget-category{border-radius:19px;border-color:#e8e2ee}.category-heading{padding:19px 17px;gap:11px}.category-heading h2{font-size:15px}.category-heading small{font-size:10px;line-height:1.5}.category-total{font-size:17px}.category-icon{width:40px;height:40px;border-radius:13px}
  .budget-table-wrap{overflow:visible}.budget-table-wrap table,.budget-table-wrap tbody{display:block;width:100%}.budget-table-wrap thead{display:none}
  .budget-table-wrap tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 88px;padding:14px 17px;gap:8px 12px;border-bottom:1px solid #f0ebf5;align-items:center}
  .budget-table-wrap td{padding:0!important;border:0;min-width:0;white-space:normal;text-align:left;max-width:none}
  .budget-table-wrap td:first-child{grid-column:1/3;grid-row:1}.budget-table-wrap .line-label{font-size:13px;line-height:1.5;min-height:38px;width:100%;color:#675875}
  .budget-table-wrap td:nth-child(2){grid-column:1;grid-row:2;font-size:14px}.budget-table-wrap td:nth-child(3){grid-column:2/4;grid-row:2;font-size:14px}
  .budget-table-wrap td:nth-child(2):before,.budget-table-wrap td:nth-child(3):before{display:block;font-size:10px;color:#a393af;margin-bottom:6px}
  .budget-table-wrap td:nth-child(2):before{content:'Prévu'}.budget-table-wrap td:nth-child(3):before{content:'Réalisé'}
  .budget-table-wrap td:last-child{grid-column:3;grid-row:1;display:flex;justify-content:flex-end;min-width:0}.budget-table-wrap .icon-btn{width:44px;height:44px;font-size:21px;border-radius:10px}
  .category-empty{font-size:12px;padding:24px 16px}.category-footer{padding:14px 17px;gap:8px}.add-line{font-size:12px;padding:11px 13px;border-radius:10px}.category-footer>span{font-size:10px;line-height:1.5;text-align:right}.progress{height:4px}
  .notice{font-size:11px;line-height:1.7;border-radius:12px;padding:14px}.empty{font-size:13px;padding:35px 15px}
  footer{display:none}
  dialog,#month-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;max-height:calc(100dvh - env(safe-area-inset-top) - 16px);border:0;border-radius:24px 24px 0 0;padding:12px 22px calc(24px + env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;box-shadow:0 -15px 70px #28203025}
  dialog:before{content:'';display:block;width:38px;height:4px;background:#ded5e6;border-radius:9px;margin:0 auto 17px}
  dialog[open]{animation:sheet-enter .22s ease-out}dialog::backdrop{background:#17142066;backdrop-filter:blur(4px)}
  .modal-heading{margin-bottom:18px;gap:10px}.modal-heading h2{font-size:20px;line-height:1.4}.modal-heading .icon-btn{height:44px;width:44px;border-radius:50%;background:#f6f1fa;flex-shrink:0;font-size:25px}
  label{font-size:12px;gap:10px;margin:17px 0}input,select{font-size:16px;padding:14px;min-height:50px;border-radius:12px;color:#63516f}
  #editor .full{font-size:14px;min-height:52px;border-radius:13px;margin-top:16px}#editor .chart-note{font-size:11px}.form-row{gap:12px}
  .form-row:has(input[type=month]){display:block}.form-row:has(input[type=month])>label{width:100%}
  .calendar-year>button{width:44px;height:44px;font-size:27px}.calendar-year input{font-size:18px;min-height:48px}.calendar-months{gap:10px}.calendar-months button{min-height:52px;border-radius:12px;font-size:13px}.calendar-today{min-height:50px;border-radius:12px;font-size:13px}
  #toast{bottom:calc(92px + env(safe-area-inset-bottom));font-size:12px;border-radius:13px;transform:translate(-50%,220px);max-width:420px}#toast.show{transform:translate(-50%,0)}
  .login-body{background:radial-gradient(ellipse at 90% 0%,#e4dcf6,transparent 55%),#f7f5fa}.login-main{min-height:100dvh;padding:calc(35px + env(safe-area-inset-top)) 26px calc(35px + env(safe-area-inset-bottom))}.login-form h2{font-size:37px}.login-form .eyebrow{font-size:10px}.login-form>p:not(.form-error){font-size:14px;line-height:1.6}.login-form label{font-size:13px}.login-form>.primary{min-height:54px;border-radius:13px;font-size:14px}.login-form>small{font-size:11px;line-height:1.7}.login-symbol{width:60px;height:60px;border-radius:19px}
}
@keyframes sheet-enter{from{transform:translateY(35px);opacity:.5}to{transform:translateY(0);opacity:1}}
@media(max-width:360px){.content{padding-left:14px;padding-right:14px}.sidebar nav a{font-size:10px}.salary-card>div{min-width:110px}.salary-icon{display:none}.budget-table-wrap tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 88px;gap:8px}.category-chart>div{grid-template-columns:70px minmax(0,1fr) 76px}.category-footer{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){dialog[open]{animation:none}}
