/* Same application, mobile presentation. The outer preview supplies a real
   393 px iframe viewport; this is reflow, not a shrunken desktop screenshot. */
.mobile-only,.mobile-back{display:none}
@media(max-width:640px){
  :root{font-size:15px;--sidebar:0px}
  html{scrollbar-width:none;overscroll-behavior-y:none}
  html::-webkit-scrollbar{display:none}
  body{overflow-x:hidden;min-width:320px;padding-bottom:72px}
  body.detail-open{overflow:hidden}
  .app-shell{display:block;min-height:calc(100dvh - 72px)}
  .sidebar{display:none}
  .topbar{position:sticky;top:0;z-index:20;gap:12px;height:58px;padding:0 19px;background:#ffffffef;backdrop-filter:blur(12px);border-bottom:1px solid #edf1ee}
  .mobile-brand{display:flex;align-items:center;gap:5px;margin:0;font-size:20px;font-weight:700;letter-spacing:1px;white-space:nowrap;line-height:1}
  .mobile-brand>span:first-child{display:grid;place-items:center;width:26px;height:29px;background:#28766c;color:white;border-radius:8px;margin-right:4px}
  .mobile-brand svg{width:19px;height:19px}
  .mobile-brand .brand-dot{margin-left:-4px;font-size:22px}
  .topbar .breadcrumb,.topbar .local-status,.global-search kbd{display:none}
  .global-search{margin-left:auto;width:auto;flex:1;height:34px;gap:6px;background:#f4f7f5;padding:0 9px;border-radius:8px;max-width:210px}
  .global-search input{font-size:11px;width:100%;height:30px}
  .global-search input::placeholder{color:#a6b2aa}
  .global-search svg{width:14px;height:14px;flex-shrink:0}
  #mobile-reset{display:grid;width:25px;height:34px;margin-right:-5px;flex-shrink:0}
  #mobile-reset svg{width:16px;height:16px}
  .workspace{padding:23px 18px 0;margin:0;width:100%}
  .page-heading{margin-bottom:12px;display:block}
  .page-heading .eyebrow,.page-heading #add-task{display:none}
  .page-heading h1{font-size:25px;font-weight:650;line-height:1.45;margin:0}
  .page-heading p{font-size:12px;max-width:none;line-height:1.8;margin-top:7px;color:#8a9b91}
  .demo-banner{border:0;padding:6px 0 0;margin-bottom:18px;background:none;gap:5px;font-size:10px;line-height:1.5}
  .demo-banner .desktop-demo-label,.demo-banner-end{display:none}
  .mobile-demo-label{display:inline;color:#9aa99e}
  .demo-banner svg{width:12px;height:12px}
  .summary-grid{gap:9px;margin-bottom:18px}
  .summary-card{padding:12px 12px 11px;min-height:75px;border-radius:11px;gap:0;box-shadow:0 2px 4px #2b4a3410}
  .summary-card .summary-icon,.summary-tail{display:none}
  .summary-label{font-size:11px;line-height:1.6;white-space:nowrap;margin-bottom:3px;color:#8c9b92}
  .summary-card strong{font-size:25px;font-weight:550;letter-spacing:-.4px}
  .summary-card .unit{font-size:10px;margin-left:5px}
  .summary-card.warm strong{color:#b18a55}.summary-card.red strong{color:#b77b68}
  .content-columns{display:block}
  .week-panel{padding:11px 11px 9px;border-radius:12px;margin-bottom:18px}
  .week-panel-heading{font-size:12px;margin-bottom:8px;padding:0 2px}
  .week-controls{gap:0}.week-controls .icon-button{width:25px;height:27px}
  .week-controls .button.ghost{font-size:10px;min-height:27px;padding:0 4px}
  .week-grid{gap:3px}
  .week-day{min-height:62px;padding:7px 0 6px;gap:5px;border-radius:9px}
  .week-day .weekday{font-size:10px}.week-day .daynum{font-size:17px}
  .list-toolbar{margin-bottom:8px;gap:16px}
  .filter-tab{padding:0 0 12px;font-size:13px;min-height:35px}
  .filter-tab>span{font-size:10px;margin-left:5px}
  .list-count{font-size:9px;line-height:1.6}
  .section-heading{padding:13px 0 10px;font-size:11px;gap:6px}
  .section-heading>span:last-child{font-size:9px}
  .task-card{padding:16px 12px;gap:11px;margin-bottom:9px;border-radius:11px;min-height:92px}
  .task-card.selected{border-color:#e2ebe5;background:#fff;box-shadow:none}
  .task-card.selected:before{display:none}
  .check-button{position:relative;width:23px;height:23px;min-width:23px;border-radius:6px;margin-top:1px;border-width:1.4px}
  .check-button:after{content:"";position:absolute;inset:-10px}
  .check-button svg{width:15px;height:15px}
  .task-title{font-size:14px;line-height:1.65;font-weight:550;color:#40564a}
  .task-matter{font-size:10px;line-height:1.7;margin-top:4px;color:#99a99d}
  .task-meta{font-size:10px;line-height:1.6;gap:5px;margin-top:8px;color:#8a9d90}
  .task-due{color:#899b8f}.task-due.urgent{color:#b18b5b}.task-due.overdue{color:#b77a67}
  .task-select-arrow svg{width:14px;height:14px}
  .tag{font-size:9px;padding:2px 5px}
  .subtle-add{font-size:12px;min-height:44px;margin-top:15px}
  .workspace-footer{padding:22px 0 95px;justify-content:center;font-size:9px;line-height:1.8;text-align:center;color:#acb7af}
  .workspace-footer>span:first-child{display:none}
  .mobile-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:40;height:66px;padding:5px 10px 4px;background:#fffffff5;backdrop-filter:blur(15px);border-top:1px solid #e7ede8;box-shadow:0 -4px 18px #29463504}
  .mobile-tab{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-width:44px;min-height:48px;padding:6px 0;color:#a0afa3;border-radius:9px;font-size:10px;font-weight:500}
  .mobile-tab svg{width:21px;height:21px;stroke-width:1.6}
  .mobile-tab.active{color:#28766c;background:#f1f7f2;font-weight:650}
  .mobile-add{display:flex;align-items:center;justify-content:center;gap:5px;position:fixed;right:18px;bottom:83px;z-index:35;background:#28766c;color:white;height:45px;padding:0 15px;border-radius:24px;box-shadow:0 5px 17px #245e3e30;font-size:12px;font-weight:550;border:1px solid #ffffff45}
  .mobile-add svg{width:18px;height:18px}
  .details-panel{display:none}
  .details-panel.is-open{display:block;position:fixed;inset:0;z-index:70;overflow-y:auto;overscroll-behavior:contain;border:0;border-radius:0;background:#fff;scrollbar-width:thin;scrollbar-color:#dce6df transparent}
  .detail-open .mobile-add,.detail-open .mobile-nav{visibility:hidden}
  .detail-top{position:sticky;top:0;z-index:2;background:#ffffffee;backdrop-filter:blur(12px);height:59px;padding:0 18px;border-bottom:1px solid #edf1ee;gap:10px;font-size:12px}
  .detail-top>span:first-of-type{margin-right:auto}
  .mobile-back{display:flex;align-items:center;gap:3px;color:#47816a;margin-left:-7px;padding:8px 4px;font-size:13px;min-height:40px;min-width:43px}
  .mobile-back svg{width:19px;height:19px}
  .detail-top>.tag{font-size:10px}
  .detail-content{padding:24px 22px 20px}
  .detail-tags{gap:7px;margin-bottom:14px}.detail-tags .tag{font-size:10px;padding:3px 7px}
  .detail-title h2{font-size:23px;line-height:1.55;color:#344f3e;font-weight:600}
  .detail-title .icon-button{width:32px;height:35px;margin-top:1px}.detail-title .icon-button svg{width:19px;height:19px}
  .detail-description{font-size:12px;line-height:2;margin-top:12px;color:#8a9c8f}
  .detail-fields{display:flex;flex-direction:column;margin-top:25px;gap:18px}
  .detail-field{grid-template-columns:82px minmax(0,1fr);gap:11px;align-items:start}
  .detail-label{font-size:12px;line-height:36px;gap:7px}.detail-label svg{width:15px;height:15px}
  .detail-date input,.detail-field select{font-size:13px;height:36px;padding:0 9px;border-radius:7px}
  .detail-date .icon-button{width:27px;height:36px}.detail-date .icon-button svg{width:16px;height:16px}
  .field-hint{font-size:9px;line-height:1.8;margin-top:5px}
  .due-value{font-size:13px;min-height:36px;gap:7px;line-height:1.7}.due-value .icon-button{width:25px;height:30px}
  .detail-divider{margin:24px 0 20px}
  .detail-section-heading{font-size:13px;gap:7px;margin-bottom:13px}.detail-section-heading svg{width:15px;height:15px}.detail-section-heading .aside{font-size:10px}
  .source-box{font-size:12px;line-height:2;padding:13px 14px;border-radius:9px}.source-box strong{font-size:11px;margin-bottom:8px}
  .attachment{padding:12px;gap:11px;margin-top:11px;border-radius:9px}.file-icon{width:33px;height:38px}.file-name{font-size:12px}.file-sub{font-size:10px;line-height:1.7;margin-top:4px}.attachment-note{font-size:10px;line-height:1.9;margin-top:10px}
  .feedback-entry{padding:12px 13px;margin-bottom:4px}.feedback-entry p{font-size:12px;line-height:1.95}.feedback-entry small{font-size:10px;margin-top:6px}
  .feedback-form{padding:12px 13px 10px;border-radius:9px}.feedback-form textarea{font-size:13px;min-height:72px;line-height:1.9}.feedback-form-footer{font-size:9px;margin-top:9px}.feedback-form button{font-size:11px;padding:7px 10px;min-height:32px}
  .matter-complete-label{font-size:10px;line-height:1.9;margin-top:20px;padding-top:15px}
  .detail-bottom{font-size:10px;padding:16px 22px;gap:10px;background:#fafcf9}.detail-bottom .button{min-height:36px;font-size:11px}
  .task-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:calc(100dvh - 20px);margin:0;padding:25px 22px 22px;border:0;border-radius:24px 24px 0 0;box-shadow:0 -15px 70px #183c2630;overflow-y:auto}
  .task-dialog::before{content:"";display:block;width:35px;height:4px;border-radius:4px;background:#dce5de;margin:-12px auto 20px}
  .task-dialog::backdrop{background:#24433250;backdrop-filter:blur(2px)}
  .dialog-heading h2,#reset-title{font-size:23px;margin:0}.dialog-heading .eyebrow{display:none}.dialog-heading .icon-button{width:32px;height:32px;margin:0}
  .dialog-intro{font-size:11px;line-height:1.9;margin-bottom:18px}.field-label{font-size:12px;margin-top:16px;margin-bottom:8px}.field-label small{font-size:10px}
  .text-input{font-size:14px;padding:11px 12px;border-radius:8px}.text-input[type=date],.text-input[type=time],select.text-input{min-height:43px;font-size:13px}.form-two-columns{gap:11px}.form-help{font-size:10px;line-height:1.8}.dialog-actions{margin-top:21px;padding-top:17px}.dialog-actions .button{font-size:12px;min-height:42px;padding:0 17px}
  .toast{left:50%;bottom:85px;width:max-content;max-width:calc(100vw - 36px);font-size:11px;padding:11px 15px;line-height:1.9;z-index:100;box-shadow:0 7px 30px #123b2425}
  .detail-open .toast{bottom:25px}
  .month-panel{border-radius:12px}.month-toolbar{padding:14px 12px}.month-toolbar strong{font-size:14px}.month-toolbar .button.ghost{font-size:11px}.month-toolbar .icon-button{width:30px;height:30px}
  .month-weekdays{font-size:10px;padding:12px 0}.month-cell{min-height:80px;padding:6px 3px}.month-day{font-size:12px;width:25px;height:25px;margin-bottom:4px}.month-action{font-size:8px;line-height:1.7;padding:2px 3px;margin-top:3px}.month-more{font-size:8px;margin:3px}.calendar-day-list{margin-top:21px}
  .matter-list-panel{padding:1px 12px 14px}.matter-item{padding-top:18px;padding-bottom:15px}.matter-heading h3{font-size:14px;line-height:1.8}.matter-heading .icon-button{width:28px;height:32px}.matter-note{font-size:11px;line-height:1.9;margin-bottom:13px}.no-actions{font-size:11px;line-height:2;padding:15px}.no-actions .button{font-size:11px;min-height:36px;margin-top:6px}
  .review-panel{padding:20px 17px}.review-heading{font-size:13px;margin-bottom:22px}.review-heading .tag{font-size:9px}.review-time{font-size:11px;margin-bottom:8px}.review-event{padding-left:20px;padding-bottom:26px}.review-event h3{font-size:14px;line-height:1.9}.review-event p{font-size:12px;line-height:1.9;margin-top:8px}.review-event .button{font-size:11px;margin-top:9px;min-height:36px}.review-explainer{font-size:11px;line-height:2;padding:14px}.review-summary{margin-bottom:18px}
  .empty-state{padding:38px 16px;margin-top:18px}.empty-state h3{font-size:15px}.empty-state p{font-size:12px;line-height:1.9}.empty-state .button{font-size:12px;min-height:39px}
  .search-heading{font-size:13px;line-height:1.9;margin-bottom:18px}.view-subheading{font-size:13px}.view-subheading .button{font-size:11px;min-height:35px}
}
