/* v202: screen-only responsive refinements; financial print layouts unchanged. */
@media screen {
 html{scroll-padding-bottom:100px;-webkit-text-size-adjust:100%}
 html body{margin:0;min-width:0}
 html body .shell{box-sizing:border-box;width:100%;max-width:2400px;margin-inline:auto;padding-top:max(12px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));min-height:100dvh}
 html body .main-col{min-width:0}
 html body #main{box-sizing:border-box;min-width:0;width:100%;padding:clamp(16px,2vw,34px)}
 html body :is(.card,.toolbar,.scr-head,.frow,.fx-kpis,.fx-pay-main,.fx-cal-main){min-width:0;box-sizing:border-box}
 html body :is(.toolbar,.scr-head){flex-wrap:wrap;gap:12px}
 html body :is(.toolbar,.scr-head) :is(input,select){max-width:100%;box-sizing:border-box}
 html body :is(.tbl-wrap,.table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 html body :is(.tbl-wrap,.table-wrap):focus-visible{outline:3px solid var(--tint2);outline-offset:2px}
 html body :is(.card,.modal-body) :is(input,select,textarea){max-width:100%;box-sizing:border-box}
 html body :is(.card,.modal-body) :is(label,.frow>* ){min-width:0}
 html body :is(.fx-card-h,.wc-top,.modal-head){min-width:0}
 html body :is(.fresh-ph-title,.fx-greet h2,.modal-head h3){overflow-wrap:anywhere}
 html body :is(.tkc-title,.bd-card-title,.task-file,.tf-name){overflow-wrap:anywhere}
 html body .topbar{box-sizing:border-box;max-width:100%;flex-wrap:wrap;gap:10px}
 html body .sidebar{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}
 html body .modal-back{box-sizing:border-box;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
 html body .modal{max-width:calc(100vw - 24px);max-height:calc(var(--ds-vh,100dvh) - max(24px,env(safe-area-inset-top) + env(safe-area-inset-bottom)));box-sizing:border-box}
 html body .modal-body{scroll-padding-block:16px}
 html body :is(input,select,textarea,button,a){touch-action:manipulation}
}
@media screen and (min-width:2200px){
 html body .main-col{max-width:2080px;margin-inline:auto}
 html body #main{padding:36px}
 html body .sidebar{flex-basis:272px;width:272px}
}
@media screen and (max-width:1300px){
 html body .fx-grid.ds-reference{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"week week" "rem plan" "prog time" "task task"}
}
@media screen and (max-width:980px){
 html body .sidebar{width:min(300px,calc(100vw - 32px));max-width:calc(100vw - 32px);top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));height:calc(100dvh - 24px);padding-bottom:90px;box-sizing:border-box}
 html body .topbar .fresh-tb-right{min-width:0;flex-wrap:wrap}
 html body .fx-pay{grid-template-columns:minmax(0,1fr)}
 html body .fx-pay-team{max-width:100%;overflow:auto}
 html body .bd-cols{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
}
@media screen and (max-width:860px){
 html body #main{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
 html body .fx-tabbar{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));border-radius:22px}
 html body .fx-tabbar svg.plate path{fill:var(--brand)}
 html body #toastRoot{max-width:calc(100vw - 24px);bottom:calc(92px + env(safe-area-inset-bottom))!important}
}
@media screen and (max-width:600px){
 html body .shell{padding-inline:max(8px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top))}
 html body #main{padding:16px 12px calc(100px + env(safe-area-inset-bottom))}
 html body .fx-grid.ds-reference{grid-template-columns:minmax(0,1fr);grid-template-areas:"week" "rem" "plan" "prog" "time" "task"}
 html body .toolbar{align-items:stretch}
 html body .toolbar :is(input:not([type=checkbox]):not([type=radio]),select){min-height:44px;font-size:16px}
 html body :is(.modal-body,.admin-wrap) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px}
 html body .modal-head h3{font-size:18px}
 html body .modal-foot .btn{min-height:44px}
 html body :is(.frow,.admin-wrap .frow){flex-direction:column}
 html body .admin-wrap .frow label{flex-basis:auto}
 html body :is(.grid2,.grid3,.fx-an-grid){grid-template-columns:minmax(0,1fr)}
 html body .topbar .clock-widget{max-width:100%;min-width:0}
 html body .fx-ov-main{width:100%;min-width:0}
 html body .fx-bignums{flex-wrap:wrap}
 html body .fx-pay-table{max-width:100%;overflow-x:auto}
}
@media screen and (max-width:360px){
 html body .fx-kpis,html body .ds-accounting .kpi-grid{grid-template-columns:minmax(0,1fr)}
 html body .topbar{gap:6px;padding:8px}
 html body .fresh-tb-right{gap:6px}
 html body .fx-week-bars{gap:7px}
 html body .wc-face{flex-wrap:wrap}
 html body .wc-info{flex-basis:150px}
 html body .modal-foot{gap:6px}
 html body .modal-foot .btn{padding-inline:10px}
}
@media screen and (max-height:500px){
 html body .sidebar{top:6px;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}
 html body .modal{max-height:calc(var(--ds-vh,100dvh) - 12px)}
 html body .modal-back{padding-block:6px}
 html body .modal-body{padding:12px}
 html body .topbar{position:relative;top:auto}
}
@media (pointer:coarse){
 html body :is(.btn,.seg,.nav-item,.wc-select,.wc-convert,.ds-order-row button){min-height:44px}
 html body .fresh-swatch{min-width:32px;min-height:32px}
 html body .ds-order-row button{min-width:44px}
}
/* v203: touch/mouse drag handles with an equivalent keyboard interaction. */
html body .ds-arrange summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
html body .ds-drag-help,html body .ds-order-status{font-size:12px;line-height:1.5;color:var(--muted);margin:8px 4px}
html body .ds-order-list h4{margin:18px 4px 8px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
html body .ds-order-row{padding:8px 8px 8px 12px;margin:6px 0;background:var(--card);border:1px solid var(--line);border-radius:12px;min-height:44px;color:var(--ink);gap:8px}
html body .ds-order-row .ds-drag-handle{min-width:44px;min-height:44px;font-size:26px;line-height:1;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;background:var(--soft);color:var(--ink);border:0}
html body .ds-order-row.ds-dragging{opacity:.6;border-style:dashed}
html body .ds-order-row.ds-dragging .ds-drag-handle{cursor:grabbing}
html body .ds-order-row.ds-drop-target{outline:3px solid var(--tint2);outline-offset:1px;background:var(--tint)}
