/* Shared mobile presentation; desktop tables and action handlers stay intact. */
@media screen and (max-width:768px){
 .main,.content,.card,.modal,.parts-shop{min-width:0;max-width:100%;box-sizing:border-box}
 .content{padding-left:12px;padding-right:12px}
 .content .heading,.modal .heading,.section-head{flex-wrap:wrap;gap:12px}
 .heading>div,.section-head>div,.heading-actions{min-width:0;max-width:100%}
 .heading-actions,.content .actions,.modal .actions{flex-wrap:wrap;gap:8px;max-width:100%}
 .heading-actions .search,.heading-actions input,.heading-actions select{width:100%!important;min-width:0!important}
 .heading-actions>.btn,.actions>.btn{white-space:normal;min-height:42px}
 .grid-2,.detail-grid,.form-grid,.split{grid-template-columns:minmax(0,1fr)!important}
 .form-grid>*{min-width:0;max-width:100%;grid-column:auto!important}
 .field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea,.search,.parts-shop input:not([type=checkbox]):not([type=radio]),.parts-shop select,.parts-shop textarea{font-size:16px;max-width:100%;min-width:0;box-sizing:border-box}
 .field select,.field input:not([type=checkbox]):not([type=radio]),.search{min-height:44px}
 .content h1{overflow-wrap:anywhere;font-size:24px;line-height:1.35}
 .content h2,.content h3,.sub,.notice,.sim-banner,.modal p{overflow-wrap:anywhere}
 .stats,.stats.stats-4,.stats.stats-5,.stats.stats-6{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .stat{min-width:0;padding:14px 12px}
 .stat strong{font-size:clamp(17px,5vw,23px)!important;overflow-wrap:anywhere}
 .tabs,.user-tabs,.filter-tabs{max-width:100%;flex-wrap:wrap;gap:6px}
 .tabs button,.user-tabs button,.filter-tabs button{min-height:40px;white-space:normal}
 .modal-backdrop{padding:10px 8px calc(10px + env(safe-area-inset-bottom));align-items:center}
 .modal,.modal.modal-wide,.modal.modal-lg,.modal.modal-xl{width:100%!important;max-width:100%!important;min-width:0!important;max-height:calc(100dvh - 32px - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;padding:18px 14px;box-sizing:border-box}
 .modal-header{gap:10px;align-items:flex-start}
 .modal-header h2{font-size:19px;overflow-wrap:anywhere}
 .modal-header>button{min-width:40px;min-height:40px;flex-shrink:0}
 .modal .actions{position:static}
 .modal .actions>.btn{flex:1 1 130px}
 .table-wrap{max-width:100%;min-width:0}
 table.mobile-record-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;white-space:normal;font-size:14px;border:0}
 .mobile-record-table>colgroup{display:none}
 .mobile-record-table>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .mobile-record-table.mobile-has-header-controls>thead{position:static;width:auto;height:auto;clip-path:none;white-space:normal;margin-bottom:10px}
 .mobile-record-table.mobile-has-header-controls>thead>tr{display:flex;flex-wrap:wrap;gap:8px}
 .mobile-record-table.mobile-has-header-controls>thead>tr>th:not(.mobile-header-control){display:none}
 .mobile-record-table.mobile-has-header-controls>thead>tr>.mobile-header-control{display:flex;align-items:center;gap:8px;min-height:44px;border-radius:8px;padding:8px 12px}
 .mobile-record-table .mobile-header-control input[type=checkbox]{width:22px;height:22px}
 .mobile-record-table>tbody{display:grid!important;gap:12px;width:100%}
 .mobile-record-table>tbody+tbody{margin-top:12px}
 .mobile-record-table>tbody>tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;width:auto!important;min-width:0!important;padding:8px 12px;border:1px solid var(--line,#e1e8f1);border-radius:12px;background:var(--card,#fff);box-sizing:border-box}
 .mobile-record-table>tbody>tr>td,.mobile-record-table>tbody>tr>th{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:10px 0!important;border-bottom:1px solid #edf1f5;text-align:left!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;box-sizing:border-box;background:transparent}
 .mobile-record-table>tbody>tr>.mobile-cell-wide{grid-column:1/-1}
 .mobile-record-table>tbody>tr>td::before{content:attr(data-mobile-label);display:block;font-size:11px;font-weight:600;color:#65748b;line-height:1.4;margin-bottom:6px}
 .mobile-record-table>tbody>tr>td[data-mobile-label=""]::before{display:none}
 .mobile-record-table td .sub,.mobile-record-table td small,.mobile-record-table td p,.mobile-record-table td .text-btn{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;max-width:100%;overflow-wrap:anywhere}
 .mobile-record-table td .btn,.mobile-record-table td button{min-height:40px;white-space:normal;max-width:100%;margin:3px 5px 3px 0}
 .mobile-record-table td input:not([type=checkbox]):not([type=radio]),.mobile-record-table td select,.mobile-record-table td textarea{width:100%!important;min-width:0!important;max-width:100%;font-size:16px;box-sizing:border-box}
 .mobile-record-table td input[type=checkbox]{width:22px;height:22px}
 .mobile-record-table td details{min-width:0!important;width:100%}
 .mobile-record-table td summary{padding:10px 0;min-height:40px;box-sizing:border-box}
 .mobile-record-table td img{max-width:100%;object-fit:contain}
 .mobile-record-table>tfoot{display:block}
 .mobile-record-table>tfoot>tr{display:flex;flex-wrap:wrap;gap:8px}
 .mobile-scroll-table{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .mobile-scroll-table::before{content:'↔ 표를 좌우로 이동해 확인하세요';display:block;font-size:12px;color:#64748b;padding:8px 0}
 .settle-expected-card{padding:16px 12px}
 .settle-item-money{gap:8px}
 .settle-item-money dd{font-size:14px;line-height:1.5}
 .sh-filter{flex-wrap:wrap}
 .sh-filter .sh-field{min-width:0;flex:1 1 100%}
 .sh-toolbar{align-items:stretch}
 .sh-toolbar>.btn,.sh-toolbar>select{min-height:44px;flex:1 1 130px}
}

@media screen and (max-width:768px){
 .monitor-tabs,.sh-tabs{flex-wrap:wrap;overflow:visible;max-width:100%;gap:6px}
 .monitor-tabs button,.sh-tabs .btn{min-height:40px;white-space:normal}
 .mobile-record-table .mobile-select-all::after{content:'전체 선택';font-size:12px}
}

/* All service headers stay visible in the mobile layout without covering content. */
@media screen and (max-width:768px){
 .main > .topbar{position:sticky;top:0;z-index:60;height:auto;min-height:calc(82px + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px);box-sizing:border-box;box-shadow:0 2px 8px rgba(23,37,63,.06)}
}
@media screen and (max-width:600px){
 .main > .topbar{min-height:calc(54px + env(safe-area-inset-top,0px))}
}

/* Driver work list: keep the full desktop row and a compact mobile summary. */
.driver-mobile-summary{display:none}
@media screen and (max-width:768px){
 .request-row.driver-compact-row{display:block;padding:16px 0;width:100%;min-width:0}
 .driver-compact-row > .cat-icon,.driver-compact-row > .body,.driver-compact-row > .row-badges{display:none}
 .driver-compact-row > .driver-mobile-summary{display:block;width:100%;min-width:0}
 .driver-mobile-heading{display:flex;align-items:flex-start;gap:10px;justify-content:space-between}
 .driver-mobile-heading b{font-size:16px;line-height:1.45;min-width:0;overflow-wrap:anywhere}
 .driver-mobile-heading .badge{flex-shrink:0;font-size:11px;line-height:1.4;padding:5px 8px;white-space:nowrap}
 .driver-mobile-equipment{font-size:13px;font-weight:700;color:var(--primary);margin-top:7px;overflow-wrap:anywhere}
 .driver-mobile-symptom{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;line-height:1.55;color:#526079;margin-top:8px;white-space:normal;overflow-wrap:anywhere}
 .driver-mobile-flags{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
 .driver-mobile-flags:empty{display:none}
 .driver-mobile-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-top:10px;font-size:11px;line-height:1.5;color:#758198}
 .driver-mobile-meta > :last-child{color:var(--primary);font-weight:600}
 .driver-compact-row:focus-visible{outline:2px solid var(--primary);outline-offset:3px;border-radius:8px}
}

/* Calendar lower lists: undated entries also use the entire mobile width. */
.wcal-mobile-store{display:none}
@media screen and (max-width:768px){
 .wcal .wcal-daypanel,.wcal .wcal-undated{padding:16px}
 .wcal .section-head{flex-wrap:wrap;gap:8px}
 .wcal .section-head h2{font-size:17px}
 .wcal .wcal-list{gap:10px}
 .wcal .wcal-item{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:14px;min-width:0}
 .wcal .wcal-item > time{font-size:15px;color:var(--primary);padding:0}
 .wcal .wcal-item-main{width:100%}
 .wcal .wcal-mobile-store{display:block;font-size:16px;font-weight:750;line-height:1.45;margin:6px 0;overflow-wrap:anywhere}
 .wcal .wcal-summary-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;line-height:1.55;overflow-wrap:anywhere;color:#526079}
 .wcal .wcal-item-main > .sub{font-size:12px;line-height:1.5;overflow-wrap:anywhere;margin-top:6px}
 .wcal .wcal-note{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 .wcal .wcal-item .actions{width:100%;justify-content:flex-end;gap:6px;margin:2px 0 0;padding-top:8px;border-top:1px solid var(--line)}
 .wcal .wcal-item .actions .btn{min-height:40px;padding:8px 12px;font-size:12px;flex:0 1 auto}
}

.wcal-item[data-detail]{cursor:pointer}
.wcal-item[data-detail]:hover{box-shadow:0 0 0 1px var(--primary)}
.wcal-item[data-detail]:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.wcal-as-summary{margin:6px 0;line-height:1.5}
.wcal-as-summary .equipment-identity{font-size:13px}
.wcal-as-summary > .badge{font-size:12px;padding:5px 9px}

/* Audited shared list surfaces: preserve values/actions, condense presentation only. */
.mobile-copy-toggle{display:none}
@media(max-width:768px){
 .mobile-long-copy:not(.is-expanded){display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden!important;overflow-wrap:anywhere}
 .mobile-copy-toggle{display:inline-flex;align-items:center;min-height:40px;padding:5px 8px;margin:4px 0;background:transparent;border:0;color:var(--primary,#1768d5);font:inherit;font-size:12px;font-weight:700;cursor:pointer}
 .q-req-row{flex-direction:column;align-items:stretch!important;padding:16px;gap:10px}
 .q-req-main{width:100%}
 .q-req-top b{flex-basis:100%;font-size:16px;line-height:1.45;overflow-wrap:anywhere}
 .q-req-side{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;border-top:1px solid var(--line);padding-top:10px}
 .q-req-side strong{font-size:18px;overflow-wrap:anywhere}
 .q-req-main p{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 .dispatch-card,[data-assign-job-id],.sub-list>.card{padding:16px}
 .dispatch-card h2,[data-assign-job-id] h2,.sub-list>.card h3{font-size:17px;line-height:1.45;margin:10px 0;overflow-wrap:anywhere}
 .dispatch-card .heading,[data-assign-job-id] .heading{margin-bottom:10px;gap:8px}
 .dispatch-card .price-row,[data-assign-job-id] .price-row{gap:12px;flex-wrap:wrap;font-size:13px;padding:10px 0}
 .dispatch-card .actions,[data-assign-job-id] .actions{display:flex;gap:8px}
 .dispatch-card .actions>.btn,[data-assign-job-id] .actions>.btn{flex:1 1 100px;min-height:42px;padding:10px;font-size:13px}
 .sub-list>.card p{font-size:13px;line-height:1.55;margin:8px 0}
 .mobile-record-table>tbody>tr{padding:6px 12px;gap:0 10px}
 .mobile-record-table>tbody>tr>td{padding:8px 0!important;font-size:13px;line-height:1.5}
 .mobile-record-table>tbody>tr>td::before{margin-bottom:3px}
 .mobile-record-table .mobile-cell-actions{display:flex!important;flex-wrap:wrap;gap:6px;align-items:center}
 .mobile-record-table .mobile-cell-actions::before{flex-basis:100%}
 .mobile-record-table td .list-item-with-thumb{align-items:flex-start;gap:10px}
 .mobile-record-table td .list-thumb{width:44px;height:44px;flex:0 0 44px}
 .partner-store-equipment .store-equip-preview{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
}
