/* Internal mobile enhancement; no business-state or hidden-rule overrides. */
html { -webkit-text-size-adjust:100%; }
body { min-height:100vh; min-height:100dvh; font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; }
.mobile-install { margin:12px auto; padding:10px 14px; width:min(460px,calc(100% - 28px)); border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); font-size:14px; line-height:1.7; }
body>.mobile-install { width:calc(100% - 28px); max-width:1540px; }
.mobile-install summary { cursor:pointer; min-height:44px; display:flex; align-items:center; gap:8px; font-weight:650; }
.mobile-install button { min-height:44px; padding:10px 16px; border:1px solid #b8d2e4; border-radius:10px; background:#edf5fc; color:#245d90; font:inherit; cursor:pointer; }
.mobile-install p { margin:8px 0; }
.mobile-install [role=status] { color:#496b60; }
@media(max-width:720px) {
 body { overflow-x:visible; padding-bottom:env(safe-area-inset-bottom,0px); }
 .app { grid-template-columns:minmax(0,1fr); }
 .app>main { min-width:0; padding:18px max(14px,env(safe-area-inset-right)) 32px max(14px,env(safe-area-inset-left)); }
 .sidebar { position:static; height:auto; padding:10px 14px; gap:8px; display:flex; flex-wrap:wrap; align-items:center; }
 .team-logo { padding:0; margin:0; border:0; flex:1; }
 .team-logo img { width:34px; height:34px; }
 .team-logo small { font-size:11px; }
 .sidebar-note { display:none; }
 .sidebar>.ghost { margin:0; min-height:44px; }
 .sidebar nav { order:3; width:100%; display:flex; flex-wrap:nowrap; overflow-x:auto; gap:7px; padding:3px 2px 6px; }
 .sidebar .nav { flex:0 0 auto; min-height:44px; padding:10px 13px; font-size:14px; white-space:nowrap; }
 .app header { position:static; margin:0 0 18px; padding:0 0 14px; gap:12px; flex-wrap:wrap; background:transparent; }
 .header-actions { flex-wrap:wrap; width:100%; gap:8px; }
 .header-actions button,.header-actions a { min-height:44px; height:auto; }
 button,.ghost,.upload-btn,.manage-btn,.back,.view-switch button,.decision-grid button,summary { min-height:44px; }
 input:not([type=checkbox]):not([type=radio]),select { min-height:44px; font-size:16px; max-width:100%; }
 textarea { width:100%; max-width:100%; font-size:16px; line-height:1.8; min-height:150px; resize:vertical; }
 #stageText { min-height:320px; }
 .project-grid.grid-view,.project-grid.list-view,.list-view .project-card,.workspace-grid,.workspace-grid.direction-review-only,.direction-edit-form,.ops-item-columns,.ops-control-columns { grid-template-columns:minmax(0,1fr); }
 .ops-home-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .ops-home-group:last-child { grid-column:1/-1; }
 .ops-home,.ops-pane,.panel,.detail-head { padding:16px; min-width:0; }
 .ops-home-head,.ops-detail-head,.panel-head,.detail-head,.detail-actions,.production-summary,.phone-bridge-row,.recovery-actions { flex-wrap:wrap; gap:12px; }
 .ops-guide ol { grid-template-columns:minmax(0,1fr); }
 .ops-home p,.ops-guide p,.panel-head p,.muted,.card-meta,.history,.production-copy,.ops-pane { font-size:14px; line-height:1.8; }
 .card-body h3,.detail-head h2,#detailName,.task-title,pre,code,.selected-file-list,.document-list a,.ops-pane a { overflow-wrap:anywhere; word-break:break-word; }
 .card-body h3 { white-space:normal; }
 .workflow-list,.stepper { overflow-x:auto; max-width:100%; }
 .ops-pane { overflow-x:auto; }
 .ops-pane table { min-width:560px; }
 .workspace-grid>*,.ops-home-columns>*,.ops-item-columns>* { min-width:0; }
 .review-panel { position:static; }
 .gallery { grid-template-columns:minmax(0,1fr); }
 .gallery img { width:100%; height:auto; max-height:none; object-fit:contain; }
 .form-dialog { width:calc(100% - 24px); max-width:calc(100% - 24px); max-height:calc(100dvh - 24px); padding:18px; overflow-y:auto; }
 .source-mode-tabs { grid-template-columns:minmax(0,1fr); }
 #lightbox { width:calc(100% - 16px); max-width:calc(100% - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:12px; }
 #lightbox img { display:block; width:100%; height:auto; max-height:none; object-fit:contain; }
 .login-shell { min-height:100dvh; height:auto; padding:24px 14px; }
 .login-card { padding:26px 22px; }
 .login-card .mobile-install { width:100%; padding:8px 10px; margin-top:18px; }
 .topbar { position:static; height:auto; min-height:60px; grid-template-columns:minmax(0,1fr) auto; padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left)); }
 .back-link { font-size:14px; min-height:44px; display:flex; align-items:center; }
 .live-pill { max-width:150px; font-size:11px; white-space:normal; }
 body:has(.topbar) main { width:calc(100% - 28px); padding-top:16px; }
 .office { display:grid; grid-template-columns:minmax(0,1fr); overflow:visible; margin:0; }
 .employee-card { width:100%; min-width:0; }
 .card-head { height:auto; min-height:64px; padding:12px 14px; }
 .employee-name { font-size:18px; }
 .employee-role { font-size:13px; white-space:normal; max-width:none; }
 .state-badge { font-size:12px; }
 .task-panel { height:auto; padding:16px; }
 .task-title { display:block; -webkit-line-clamp:unset; height:auto; min-height:0; overflow:visible; font-size:16px; line-height:1.7; }
 .task-kicker { font-size:12px; }
 .task-meta { flex-wrap:wrap; }
 .task-meta .elapsed,.task-meta code { font-size:12px; }
 .task-meta code { max-width:100%; white-space:normal; }
 .mini-stats { flex-wrap:wrap; overflow:visible; }
 .mini-stats span { font-size:12px; }
 .scene { height:180px; }
 .summary { grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
 .summary small { font-size:13px; }
 body:has(.topbar) .hero { flex-wrap:wrap; }
 .hero #manualRefresh { min-height:44px; height:auto; font-size:14px; width:auto; padding:10px 14px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
