/* Shared responsive layer. Business data and desktop layouts remain unchanged. */
.mobile-topbar,.mobile-nav-close,.mobile-nav-backdrop,.mobile-queue-toggle,.mobile-editor-tools,.mobile-filter-toggle{display:none}
.mobile-table td,.mobile-table th{overflow-wrap:anywhere}
@media(max-width:1024px){
  html{scroll-padding-top:80px}
  body{min-width:0;-webkit-text-size-adjust:100%}
  .shell{display:block;width:100%;min-width:0}
  .shell>main{width:100%;max-width:none;margin:0;padding:20px 16px 100px;min-width:0}
  .shell>main>header{align-items:flex-start;gap:12px;padding-bottom:18px;margin-bottom:18px}
  .shell>main>header>div{min-width:0}
  .shell>main>header h1{font-size:25px;line-height:1.35;overflow-wrap:anywhere}
  .shell>main>header p{overflow-wrap:anywhere}
  .shell>main>header .today{display:none}
  .mobile-ready .mobile-topbar{display:flex;position:sticky;top:0;z-index:50;align-items:center;gap:12px;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top));min-height:60px;background:#14171c;color:#fff;border-bottom:1px solid #303741}
  .mobile-topbar img{width:30px;height:30px;flex:none}
  .mobile-topbar strong{flex:1;min-width:0;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
  .mobile-topbar button,.mobile-nav-close{display:inline-flex;align-items:center;justify-content:center;width:44px;min-height:44px;flex:none;padding:8px;border:1px solid #454b56;border-radius:9px;background:#252b34;color:#fff;font:inherit;cursor:pointer}
  .mobile-ready .shell>aside{position:fixed;inset:0 auto 0 0;z-index:220;width:min(320px,calc(100vw - 48px));height:100vh;height:100dvh;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 14px;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom));background:#14171c;border:0;transform:translateX(-105%);visibility:hidden;transition:transform .18s,visibility .18s}
  .mobile-ready.mobile-nav-open .shell>aside{transform:translateX(0);visibility:visible}
  .mobile-nav-open{overflow:hidden}
  .mobile-ready.mobile-nav-open .mobile-nav-backdrop{display:block;position:fixed;inset:0;z-index:210;border:0;background:#08111bb3;width:100%;height:100%;cursor:pointer}
  .mobile-ready .mobile-nav-close{position:absolute;right:12px;top:max(12px,env(safe-area-inset-top));font-size:25px}
  .mobile-ready .shell>aside .brand{padding:0 48px 22px 10px;flex-shrink:0}
  .mobile-ready .shell>aside .brand-logo{width:36px;height:36px}
  .mobile-ready .shell>aside .brand b{font-size:18px}
  .mobile-ready .shell>aside .brand small{display:block;font-size:8px;letter-spacing:1px}
  .mobile-ready .shell>aside .studio-navigation{display:block;width:100%;margin:0 0 20px;overflow:visible;order:0}
  .mobile-ready .studio-navigation .nav-children{grid-template-columns:minmax(0,1fr)}
  .mobile-ready .studio-navigation .nav{min-height:44px;font-size:14px;white-space:normal}
  .mobile-ready .studio-navigation .nav-label{display:block}
  .mobile-ready .studio-navigation .nav-group>summary{min-height:44px;font-size:13px}
  .mobile-ready .shell>aside .user-card{display:flex;width:100%;margin:auto 0 0;padding:16px 10px 0;flex-shrink:0}
  .mobile-ready .shell>aside .user-card button{min-width:44px;min-height:44px}
  .mobile-ready .shell>aside .aside-note{display:none}
  .mobile-ready .shell>aside .user-card b{overflow-wrap:anywhere}
  .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .stats article{padding:12px 8px;min-height:84px}
  .stats span{font-size:10px}
  .stats span::before{display:none}
  .stats em{display:none}
  .stats strong{font-size:22px;overflow-wrap:anywhere}
  .stats .accent strong{font-size:13px;line-height:1.5}
  .filters,#titleFilters,.special-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px;justify-content:stretch;padding:16px}
  .filters>*{min-width:0;max-width:100%}
  .mobile-filter-toggle:has(+.filters:not(.hidden)){display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px;min-height:48px;padding:12px 16px;border:0;border-bottom:1px solid #e5e9e6;background:#fafcfb;color:#33463b;text-align:left;font:inherit;font-size:13px;font-weight:600}
  .mobile-filter-toggle::after{content:'展开';flex:none;color:#698173;font-size:12px;font-weight:400}
  .mobile-filter-toggle[aria-expanded=true]::after{content:'收起'}
  main .filters[data-mobile-filters]:not([data-mobile-expanded=true]){display:none!important}
  .list-management-toolbar{flex-wrap:wrap;gap:8px}
  .list-management-toolbar button{min-height:40px;padding:8px 12px;border:1px solid #d7e0da;border-radius:8px;background:#fff;color:#35483c;font:inherit;font-size:12px}
  .filters .searchBtn{grid-column:auto}
  input:not([type=checkbox]):not([type=radio]),textarea,select{min-width:0;max-width:100%;font-size:16px}
  input[type=checkbox],input[type=radio]{flex-shrink:0;width:20px;min-width:20px;height:20px;vertical-align:middle}
  button{max-width:100%;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
  .toolbar{display:flex;flex-wrap:wrap;gap:8px}
  .toolbar button{flex:1 1 140px;min-height:44px;line-height:1.5}
  .table-actions{flex-wrap:wrap;gap:10px;padding:12px 16px}
  .table-actions>div{display:flex;flex-wrap:wrap;gap:8px}
  .table-actions button,.pager button,.dialog-actions button,.title-actions button{min-height:40px}
  .queue-panel{display:flex;flex-wrap:wrap;flex-direction:row;align-items:flex-start;gap:12px;padding:16px}
  .queue-panel>div:first-child{flex:1 1 200px;min-width:0;overflow-wrap:anywhere}
  .mobile-queue-toggle{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #d5dde1;background:white;border-radius:8px;color:#34423c;cursor:pointer}
  .mobile-ready .queue-panel .queue-buttons{display:none;flex-basis:100%;width:100%}
  .mobile-ready .queue-panel .queue-buttons[data-mobile-expanded=true]{display:flex;gap:8px}
  .mobile-ready .queue-panel:not(:has([data-mobile-expanded=true]))>div:first-child>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.7}
  .queue-buttons button{flex:1 1 140px;min-height:44px;white-space:normal}
  .queue-buttons label{display:flex;align-items:center;gap:8px}
  .pager{gap:12px;padding:14px;flex-wrap:wrap}
  .pager>span{width:100%;margin:0}
  .pager-controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:100%}
  .pager .pager-controls>span{margin:0 3px}
  .pager .page-jump{display:flex;align-items:center;gap:6px;margin:0;flex-wrap:wrap}
  .pager .page-jump input{width:64px;min-width:0;min-height:40px}
  .site-category-tabs{max-width:100%;flex-wrap:wrap}
  .site-category-tabs [role=tablist]{width:100%;display:flex;flex-wrap:wrap;overflow:visible}
  .site-category-tabs button{flex:1 1 110px;min-width:0;min-height:44px;padding:9px 8px;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .system-error-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:12px}
  .system-error-banner>*{max-width:100%;min-width:0;overflow-wrap:anywhere}
  .system-error-banner strong{font-size:12px}
  .system-error-banner span{grid-column:1/-1;grid-row:2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px;line-height:1.7}
  .system-error-banner button{min-height:44px}
  .workbench-toolbar,.diagnostic-heading,.style-intro,.gallery-hero,.mining-hero,.cluster-intro{flex-wrap:wrap;gap:16px;padding:18px;min-width:0}
  .workbench-toolbar,.diagnostic-heading{padding:0}
  .workbench-controls{width:100%;gap:10px}
  .workbench-controls label{display:flex;flex:1 1 180px;align-items:center;gap:8px;white-space:normal;min-width:0}
  .workbench-controls select{flex:1;min-width:0;margin:0}
  .workbench-period{flex:1;justify-content:space-between}
  .workbench-period button{flex:1;min-height:40px}
  .workbench-charts,.diagnostic-alerts,.cluster-grid,.process-grid,.quality-rules-grid{grid-template-columns:minmax(0,1fr)}
  .workbench-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .workbench-kpis article{padding:16px;min-width:0}
  .workbench-card{padding:16px;max-width:100%}
  .workbench-chart-frame{width:100%;max-width:100%}
  .workbench-chart-tooltip{min-width:0;font-size:11px;padding:10px}
  .workbench-inventory{grid-template-columns:minmax(0,1fr)}
  .diagnostic-filters{align-items:stretch}
  .diagnostic-filters>*{flex:1 1 140px;min-width:0;max-width:100%}
  .diagnostic-pager{flex-wrap:wrap;gap:10px}
  .process-card,.quality-rule-card,.style-card,.cluster-rules,.cluster-guide{padding:18px;min-width:0;max-width:100%}
  .process-card-top{flex-wrap:wrap;gap:10px}
  .process-card-top>div{min-width:0;flex:1}
  .process-toggle{min-height:44px;margin-left:0}
  .process-runtime{flex-wrap:wrap;gap:8px}
  .process-intro>span{white-space:normal}
  .cluster-intro h2{font-size:23px;line-height:1.5}
  .cluster-intro>div{min-width:0}
  .cluster-actions{width:100%}
  .cluster-tabs button{flex:1 1 130px;min-height:44px}
  .cluster-capabilities{flex-wrap:wrap;gap:12px}
  .gallery-groups{grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr))}
  .image-group-tools,.style-card footer{flex-wrap:wrap}
  .gallery-choice-preview,.image-group-grid{max-width:100%}
  .person-query label,.person-query [data-person-name],#lmPersonName{min-width:0;max-width:100%}
  .mining-filters,.tag-keyword-filters,.blacklist-grid,.lm-grid,.grid2{grid-template-columns:minmax(0,1fr)!important}
  .modal{z-index:300;padding:10px;align-items:center}
  #modal .dialog,#modal .dialog.article-dialog{width:100%;max-width:900px;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);padding:20px 16px 0;display:flex;flex-direction:column;overflow:hidden;min-width:0;border-radius:14px}
  #modal .dialog>.eyebrow{flex:none;margin:4px 44px 8px 0}
  #modal .dialog>h2{flex:none;margin:0 40px 16px 0;font-size:21px;line-height:1.5;overflow-wrap:anywhere;max-height:24dvh;overflow:auto}
  #modal .close{right:8px;top:8px;width:44px;height:44px;z-index:2;background:#fff;border-radius:8px}
  #modalBody{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding-right:0;overflow-wrap:anywhere}
  #modal .dialog-actions{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px -16px 0;padding:12px 16px;padding-bottom:max(12px,env(safe-area-inset-bottom));border-top:1px solid #e5e8e6;background:white}
  #modal .dialog-actions>button{flex:1;min-height:44px;margin:0}
  .article-preview-nav{display:flex;width:100%;gap:8px;margin:0}
  .article-preview-nav button{flex:1;min-height:44px}
  #modal .article-meta{grid-template-columns:85px minmax(0,1fr);gap:10px;font-size:13px}
  .article-meta>*{min-width:0;overflow-wrap:anywhere}
  #modal .article-preview{max-height:none;overflow:visible;font-size:15px}
  #modal pre.article-preview{white-space:pre-wrap;overflow-wrap:anywhere}
  .article-review-actions{flex-wrap:wrap;gap:8px}
  .article-review-actions button{flex:1 1 130px;min-height:44px}
  .rich-article img{width:auto!important;max-width:100%!important;height:auto!important}
  .rich-article figure{max-width:100%;margin:20px 0}
  .rich-article pre{max-width:100%;overflow-x:auto;white-space:pre}
  .rich-article iframe,.rich-article video{max-width:100%}
  .rich-article table{max-width:100%;overflow-x:auto}
  .style-picker,.writer-provider-options{grid-template-columns:minmax(0,1fr)}
  .writer-provider-options input{width:20px!important}
  .writer-provider-options label{min-width:0}
  .toggle-line{white-space:normal!important;flex-wrap:wrap;line-height:1.6}
  .prompt-group{padding:12px;margin:12px 0}
  .prompt-group button{margin:6px 6px 6px 0;min-height:44px}
  .lm-overlay{padding:8px}
  .lm-dialog{position:relative;width:100%;height:calc(100vh - 16px);height:calc(100dvh - 16px);max-height:none;border-radius:12px;min-width:0;overflow-y:auto;overscroll-behavior:contain}
  .lm-dialog>header{position:sticky;top:0;z-index:7;background:white;flex-shrink:0;padding:16px;gap:12px}
  .lm-dialog>header>div{min-width:0}
  .lm-controls,.lm-person-controls{padding:12px 16px;gap:10px;flex-shrink:0}
  .lm-controls label,.lm-person-controls label{flex:1 1 140px;min-width:0}
  .lm-results{padding:0 14px;flex:1 0 240px;min-height:240px}
  .lm-dialog>footer{position:sticky;bottom:0;z-index:6;background:#fff;padding:12px 14px;gap:8px;flex-wrap:wrap;flex-shrink:0}
  .lm-dialog>footer button{min-height:44px}
  .lm-detail{grid-template-columns:85px minmax(0,1fr)}
  .article-editor-overlay{padding:0}
  .article-editor-dialog{width:100%;height:100vh;height:100dvh;min-height:0;border:0;border-radius:0;overflow-y:auto;overscroll-behavior:contain}
  .article-editor-dialog>header,.article-editor-dialog>div,.article-editor-dialog>p,.article-editor-dialog>footer{flex-shrink:0}
  .article-editor-header{padding:12px 14px;gap:12px}
  .article-editor-header>div{min-width:0}
  .article-editor-header h2{font-size:18px}
  .article-editor-subtitle{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .article-editor-close{width:44px;height:44px}
  .mobile-editor-tools{display:flex;gap:8px;padding:8px 14px;border-bottom:1px solid #e5e9e6;background:#f8faf9}
  .mobile-editor-tools button{flex:1;min-height:40px;border:1px solid #d4ddd7;border-radius:7px;background:#fff;color:#334f40;font:inherit;font-size:13px}
  .mobile-editor-tools button[aria-expanded=true]{background:#e7f1eb;border-color:#9bb4a4}
  .article-editor-meta{display:none;grid-template-columns:minmax(0,1fr);max-height:24dvh;padding:12px 14px;min-height:110px}
  .article-editor-overlay[data-mobile-meta=true] .article-editor-meta{display:grid}
  .article-editor-meta .article-editor-wide{grid-column:auto}
  .article-editor-meta input,.article-editor-meta textarea{font-size:16px}
  .article-editor-note{padding:8px 14px;font-size:11px}
  .article-editor-images{display:none;padding:10px 14px;gap:8px}
  .article-editor-overlay[data-mobile-images=true] .article-editor-images{display:flex}
  .article-editor-images input[type=url]{flex:1 1 100%;max-width:100%;min-width:0;font-size:16px}
  .article-editor-images button{flex:1;min-height:40px;white-space:normal}
  .article-editor-images small{width:100%}
  .article-editor-host{position:relative;isolation:isolate;z-index:0;flex:1 0 220px!important;min-height:220px;padding:8px;overflow:auto}
  .article-editor-host .edui-editor,.article-editor-host .edui-editor-iframeholder{width:100%!important;max-width:100%!important}
  .article-editor-host .edui-toolbar{display:flex!important;align-items:center;flex-wrap:nowrap!important;overflow-x:auto;max-width:100%;padding-bottom:5px!important;white-space:nowrap}
  .article-editor-host .edui-toolbar>.edui-box{flex-shrink:0}
  .article-editor-footer{position:sticky;bottom:0;z-index:4;flex-wrap:wrap;padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom));gap:8px}
  .article-editor-footer span{width:100%;margin:0}
  .article-editor-footer button{flex:1 1 130px;min-height:44px}
  .login-screen{padding:16px;overflow-y:auto;align-items:center}
  .login-card{padding:24px;max-height:calc(100dvh - 32px);overflow-y:auto}
  .login-card input{min-height:44px;font-size:16px}
  .toast{left:12px;right:12px;bottom:max(16px,env(safe-area-inset-bottom));max-width:none;z-index:1800;overflow-wrap:anywhere}
  #articleActivityDock.activity-dock,#articleActivityDock.activity-dock.minimized{left:12px!important;right:12px!important;top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none;max-height:55vh;max-height:55dvh;z-index:80}
  #articleActivityDock>header{min-height:54px;padding:10px 12px;gap:10px;touch-action:pan-y;cursor:default}
  #articleActivityDock>header button{min-height:40px;min-width:64px}
  #articleActivityDock .activity-content{display:none!important;max-height:calc(55dvh - 65px);overscroll-behavior:contain}
  .mobile-log-open #articleActivityDock .activity-content{display:block!important}
  .mobile-nav-open #articleActivityDock,.article-editor-open #articleActivityDock,body:has(#modal:not(.hidden)) #articleActivityDock,body:has(.lm-overlay:not(.hidden)) #articleActivityDock{display:none!important}
  .mobile-dialog-open{overflow:hidden}
}
@media(max-width:640px){
  .shell>main{padding:18px 12px 100px}
  .filters,#keywordFilters,#titleFilters,.special-filters{grid-template-columns:minmax(0,1fr)!important;padding:14px}
  .filters .searchBtn{grid-column:auto!important;min-height:44px}
  .filters label span{font-size:12px;margin-bottom:6px}
  .filters input,.filters select{min-height:44px}
  .workbench-controls>label{flex-basis:100%}
  .diagnostic-metrics,.diagnostic-processes{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px}
  .diagnostic-metrics article{padding:14px;min-width:0}
  .workbench-kpis strong,.diagnostic-metrics strong{font-size:25px;overflow-wrap:anywhere}
  .mobile-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto;white-space:normal!important}
  .mobile-table.hidden{display:none!important}
  .mobile-table>thead{display:block;position:relative}
  .mobile-table>thead>tr{display:flex;padding:8px 14px}
  .mobile-table>thead>tr:not(:has(input[type=checkbox])){position:absolute;width:1px;height:1px;padding:0;clip-path:inset(50%);overflow:hidden}
  .mobile-table>thead>tr>th{display:none}
  .mobile-table>thead>tr>th:has(input[type=checkbox]){display:flex;align-items:center;gap:10px;min-height:44px;width:auto;height:auto;padding:0;background:transparent}
  .mobile-table>thead>tr>th:has(input[type=checkbox])::after{content:'全选本页';font-size:13px;color:#56675e;letter-spacing:0}
  .mobile-table>tbody{display:block;width:100%}
  .mobile-table>tbody>tr{display:block;width:auto;margin:10px 12px 14px;padding:14px;border:1px solid #e1e7e3;border-radius:12px;background:white;box-shadow:0 2px 6px #142a1c04}
  .mobile-table>tbody>tr>td,.mobile-table>tbody>tr>th{display:block;position:static;width:100%!important;min-width:0!important;max-width:none!important;padding:8px 0!important;margin:0;border:0!important;text-align:left!important;white-space:normal!important;font-size:13px;overflow-wrap:anywhere;background:transparent!important;height:auto}
  .mobile-table>tbody>tr>td::before,.mobile-table>tbody>tr>th::before{content:attr(data-mobile-label);display:block;margin-bottom:4px;color:#7a8780;font-size:11px;line-height:1.5;font-weight:500}
  .mobile-table>tbody>tr>.mobile-row-heading{font-size:15px;font-weight:600;padding:4px 0 12px!important;margin-bottom:4px;border-bottom:1px solid #edf0ee!important}
  .mobile-table>tbody>tr>.mobile-row-select{display:flex;align-items:center;gap:10px;padding:0 0 8px!important}
  .mobile-table>tbody>tr>.mobile-row-select::before{margin:0}
  .mobile-table td>small,.mobile-table .job-error,.mobile-table .candidate-cell,.mobile-table .log-detail,.mobile-table .queue-reason{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}
  .mobile-table td button{min-height:40px;margin:4px 6px 4px 0;padding:8px 12px;white-space:normal}
  .mobile-table td:has(button){line-height:2}
  .mobile-table .review-state,.mobile-table .article-state{max-width:100%;white-space:normal;width:fit-content;line-height:1.6}
  .mobile-table .mobile-empty::before{display:none}
  .table-wrap:has(>.mobile-table),.cluster-table:has(>.mobile-table),.workbench-table-wrap:has(>.mobile-table){overflow:visible;min-width:0;max-width:100%}
  .workbench-operators{max-height:none}
  #modal .dialog-actions>.article-blacklist-choice{order:1;flex:1 0 100%;margin:0;min-height:32px;white-space:normal}
  #modal .dialog-actions>button{order:2}
  #modal .dialog-actions>.article-preview-nav{order:0}
  .cluster-summary,.cluster-actions,.cluster-capabilities{align-items:flex-start;gap:10px}
  .style-card footer>span{width:100%}
}
@media(max-width:360px){
  .shell>main{padding-left:10px;padding-right:10px}
  .stats article,.workbench-kpis article{padding:12px}
  .toolbar button{flex-basis:120px}
  #modal .article-meta{grid-template-columns:minmax(0,1fr);gap:4px}
  #modal .article-meta>span{margin-bottom:10px}
  .mobile-table>tbody>tr{margin:8px;padding:12px}
}
@media(prefers-reduced-motion:reduce){.mobile-ready .shell>aside{transition:none}}
