/* Phone overrides are isolated from desktop layout and use the global theme. */
.mobile-topbar, .mobile-nav-backdrop, .mobile-fold-toggle, .mobile-more-toggle { display:none; }
.mobile-scroll-hint, .mobile-table-select { display:none; }
.mobile-wide-scroll { display:contents; }
.alist-sync-section { margin-top:20px; padding:16px; border:1px solid var(--color-border); border-radius:8px; background:var(--color-card-bg); }
.sync-part-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.sync-part-heading h3 { margin:0; }
.sync-part-heading p { color:var(--color-text-secondary); font-size:12px; line-height:1.6; }
.sync-part-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media screen and (max-width:760px) {
  html, body { min-width:0!important; }
  .mobile-topbar { display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:1202; padding:6px 12px; height:60px; box-sizing:border-box; background:var(--color-header-bg); border-bottom:1px solid var(--color-border); }
  .mobile-topbar a { color:var(--color-text-primary); font-weight:700; text-decoration:none; }
  .mobile-topbar button { min-height:40px; background:var(--color-hover-bg); color:var(--color-primary); border:1px solid var(--color-border); border-radius:6px; padding:0 12px; }
  .app-header { display:none!important; }
  html[data-nav-side] .content, html .content { box-sizing:border-box; width:100%!important; max-width:100%!important; min-width:0!important; margin:0!important; padding:10px!important; }
  html .app-side-navigation { display:flex!important; position:fixed!important; inset:60px auto 0 0!important; width:min(280px,85vw)!important; height:calc(100dvh - 60px)!important; max-height:none!important; margin:0!important; padding:8px!important; box-sizing:border-box; overflow-y:auto; overflow-x:hidden; z-index:1201; transform:translateX(-110%); background:var(--color-sidebar-bg)!important; border:1px solid var(--color-border)!important; border-radius:0 8px 8px 0!important; box-shadow:var(--shadow-card); }
  html.mobile-nav-open .app-side-navigation { transform:translateX(0); }
  html.mobile-nav-open { overflow:hidden; }
  html .app-side-navigation > a, html .app-side-navigation > .app-side-group > summary { min-height:44px!important; width:100%!important; margin:0!important; padding:8px 12px!important; border-radius:6px!important; box-shadow:none!important; }
  html .app-side-navigation span { display:inline!important; }
  html .app-side-navigation .app-side-group-menu { position:static!important; width:auto!important; max-width:100%; margin:4px 0; }
  .app-side-toggle { display:none!important; }
  .mobile-nav-backdrop:not([hidden]) { display:block!important; position:fixed; inset:60px 0 0; z-index:1200; border:0; border-radius:0; background:rgb(0 0 0 / .3); width:100%; height:calc(100dvh - 60px); }
  .mobile-adapted-page { padding:12px!important; min-width:0!important; max-width:100%!important; margin:0!important; box-sizing:border-box; }
  .mobile-adapted-page .page-title-row, .mobile-adapted-page .page-title-actions { display:flex!important; flex-wrap:wrap; gap:8px; width:auto; margin:0 0 12px; padding:0; }
  .mobile-adapted-page .page-heading-group { min-width:0; align-items:flex-start; gap:10px; }
  .mobile-adapted-page .page-heading-icon { width:40px!important; height:40px!important; min-width:40px; }
  .mobile-adapted-page .page-heading-copy { min-width:0; }
  .mobile-adapted-page h2 { font-size:21px!important; overflow-wrap:anywhere; }
  .mobile-adapted-page .page-heading-copy p { font-size:12px; line-height:1.6; }
  .mobile-adapted-page :is(.button, button, input:not([type=checkbox]):not([type=radio]), select) { min-height:40px!important; }
  .mobile-adapted-page :is(input, select, textarea) { max-width:100%; box-sizing:border-box; font-size:16px; }
  .mobile-adapted-page .button { white-space:normal; text-align:center; padding:6px 10px!important; }
  .mobile-adapted-page .page-title-actions > :is(a, button, form, details) { width:auto!important; flex:0 1 auto!important; }
  .mobile-adapted-page .mobile-secondary-action { display:none!important; }
  .mobile-adapted-page .mobile-actions-open .mobile-secondary-action { display:inline-flex!important; }
  .mobile-adapted-page .mobile-more-toggle { display:inline-flex; }
  .mobile-fold-toggle { display:flex!important; width:100%; justify-content:space-between; align-items:center; margin:8px 0; min-height:42px; padding:8px 12px; border:1px solid var(--color-border); border-radius:6px; background:var(--color-hover-bg); color:var(--color-primary); }
  .mobile-adapted-page .mobile-fold-panel:not(.mobile-fold-open) { display:none!important; }
  .mobile-adapted-page :is(.project-task-workspace, .test-execution-workspace, .work-report-workspace) { display:flex!important; flex-direction:column; gap:8px; min-width:0; }
  .mobile-adapted-page :is(.project-task-detail, .test-execution-results, .work-report-content) { width:100%; min-width:0!important; overflow:visible; }
  .mobile-adapted-page :is(.important-task-filter, .test-task-filter, .report-filter-form, .form-grid) { grid-template-columns:1fr!important; width:auto; margin:8px 0; padding:12px; gap:10px; }
  .mobile-adapted-page :is(.form-group, .form-group-full, .form-group-span-2) { grid-column:auto!important; min-width:0; }
  .mobile-adapted-page :is(.project-task-priority, .test-scope-sidebar, .annual-schedule-sidebar) { position:static!important; width:100%; max-height:50dvh; overflow:auto; box-sizing:border-box; }
  .mobile-adapted-page :is(.task-summary-grid, .report-summary-grid) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px; margin:12px 0; }
  .mobile-adapted-page :is(.quick-filters-bar, .segmented-control, .annual-type-tabs) { display:flex; overflow-x:auto; max-width:100%; flex-wrap:nowrap; }
  .mobile-adapted-page :is(.quick-filter-chip, .segmented-item, .annual-tab-btn) { flex:none; }
  .mobile-adapted-page .quick-filters-label { flex:none; white-space:nowrap; }
  .mobile-adapted-page [data-list-sidebar-toggle] { display:none!important; }
  .mobile-adapted-page .test-progress-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; width:auto!important; min-width:0!important; }
  .mobile-adapted-page :is(.project-task-group-heading, .test-execution-results-head, .action-result-header) { flex-wrap:wrap; gap:6px; }
  .mobile-adapted-page .table-container { max-width:100%; overflow-x:auto; }
  .mobile-adapted-page .mobile-record-table { display:block; width:100%!important; min-width:0!important; table-layout:auto; border:0; background:transparent; }
  .mobile-record-table thead { display:none; }
  .mobile-record-table tbody { display:block; }
  .mobile-adapted-page .mobile-record-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; padding:12px; margin:8px 0; border:1px solid var(--color-border-light); border-radius:8px; background:var(--color-card-bg); }
  .mobile-adapted-page .mobile-record-table tr[hidden] { display:none!important; }
  .mobile-adapted-page .mobile-record-table td { display:block; width:auto!important; min-width:0!important; padding:0!important; border:0!important; white-space:normal!important; overflow-wrap:anywhere; font-size:13px; }
  .mobile-record-table td[data-mobile-label]::before { content:attr(data-mobile-label); display:block; color:var(--color-text-tertiary); font-size:11px; margin-bottom:3px; }
  .mobile-record-table td:first-child, .mobile-record-table td[colspan], .mobile-record-table.important-task-table td:last-child { grid-column:1/-1; }
  .mobile-record-table.test-task-table td:nth-child(2) { grid-column:1/-1; }
  .mobile-record-table :is(.task-title-cell, .table-actions) { display:flex; flex-wrap:wrap; gap:6px; }
  .mobile-record-table .task-description-preview { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .mobile-adapted-page :is(.important-task-summary, .test-task-summary, .report-detail-summary, .report-project-summary, .report-review-grid, .report-progress-groups, .task-quick-actions) { display:grid!important; grid-template-columns:1fr!important; gap:8px; }
  .mobile-adapted-page .report-document-layout { display:block!important; }
  .mobile-adapted-page :is(.report-information-column, .report-writing-column, .report-resources-column) { grid-column:auto!important; grid-row:auto!important; width:auto; padding:12px!important; margin:0; }
  .mobile-adapted-page :is(.requirement-major-section, .report-main-section) { padding-left:0!important; margin:12px 0!important; }
  .mobile-adapted-page .requirement-major-body { padding:8px 0!important; min-width:0; }
  .mobile-adapted-page :is(.markdown-content, .text-content, .report-reading-content) { overflow-wrap:anywhere; }
  .mobile-adapted-page :is(img, video) { max-width:100%; height:auto; }
  .mobile-adapted-page pre { max-width:100%; overflow:auto; }
  .slide-drawer-panel, .entity-preview-panel { width:100vw!important; max-width:100vw!important; height:100dvh; border-radius:0!important; }
  .slide-drawer-body, .entity-preview-body { padding:12px!important; overflow-x:hidden; }
  .slide-drawer-header, .slide-drawer-footer { flex-wrap:wrap; gap:8px; }
  dialog { width:calc(100vw - 24px)!important; max-width:calc(100vw - 24px)!important; max-height:calc(100dvh - 24px)!important; margin:auto!important; padding:12px!important; box-sizing:border-box; }
  dialog .form-grid { grid-template-columns:1fr!important; }
  .sync-session-banner { gap:6px; }
  .content.mobile-adapted-page { padding:10px!important; }
  .content .mobile-page-card { box-sizing:border-box; width:100%!important; max-width:100%!important; min-width:0!important; margin:0 0 12px!important; padding:12px!important; }
  .content .mobile-page-card > .page-title-row { margin-left:0!important; margin-right:0!important; }
  .mobile-adapted-page .mobile-main-cell { grid-column:1/-1; }
  .mobile-adapted-page .mobile-table-select { display:inline-flex; min-height:40px; align-items:center; padding:6px 12px; margin:8px 0; border:1px solid var(--color-border); border-radius:6px; color:var(--color-primary); background:var(--color-hover-bg); }
  .mobile-adapted-page :is(.project-filter-workspace, .product-class-filter-workspace, .attention-layout, .product-definition-editor-grid, .product-content-grid, .product-document-grid, .bug-solution-grid) { display:flex!important; flex-direction:column; gap:12px; min-width:0!important; }
  .mobile-adapted-page :is(.project-filter-results, .product-class-filter-main, .product-content-section, .bug-summary-panel) { min-width:0!important; width:100%!important; padding-left:0!important; margin-left:0!important; }
  .mobile-adapted-page :is(.project-filter-sidebar, .product-class-filter-sidebar) { position:static!important; width:100%!important; min-width:0!important; max-height:55dvh; overflow:auto; box-sizing:border-box; }
  .mobile-adapted-page :is([data-project-sidebar-toggle], [data-project-sidebar-expand], [data-function-class-collapse], [data-function-class-expand]) { display:none!important; }
  .mobile-adapted-page :is(.detail-grid, .detail-info-grid, .requirement-detail-summary, .bug-detail-grid, .ecn-detail-grid, .product-definition-summary, .attachment-fields-grid, .product-document-upload-grid, .bug-attachment-grid, .form-grid-two, .form-grid-three, .advanced-filter-grid, .settings-checkbox-grid, .attention-filter-toolbar, .attachment-index-filters, .replica-connection-grid, .sync-overview-grid, .sync-metrics-grid, .sync-scope-grid, .sync-options-grid, .maintenance-overview-grid, .maintenance-actions-grid) { display:grid!important; grid-template-columns:1fr!important; gap:10px; min-width:0; }
  .mobile-adapted-page :is(.detail-item, .detail-info-item, .compact-filter-field, .filter-group, .filter-field-standard, .filter-field-grow) { grid-column:auto!important; min-width:0!important; width:auto!important; flex-basis:auto!important; }
  .mobile-adapted-page :is(.requirement-filter-bar, .ecn-filter-bar, .filter-bar, .standard-filter-row, .requirement-primary-filters, .bug-filter-actions, .filter-actions, .form-actions, .form-actions-row, .pagination, .project-tabs, .timeline-toolbar, .timeline-nav-controls, .dev-toolbar, .dev-toolbar-left, .dev-toolbar-right, .dev-filter-form) { display:flex; flex-wrap:wrap; max-width:100%; gap:8px; margin-left:0!important; margin-right:0!important; }
  .mobile-adapted-page :is(.requirement-primary-filters, .standard-filter-row, .filter-bar) { flex-direction:column; align-items:stretch!important; }
  .mobile-adapted-page :is(.requirement-filter-bar, .ecn-filter-bar, .filter-bar) { padding:12px!important; }
  .mobile-adapted-page .project-tabs { flex-wrap:nowrap; overflow-x:auto; white-space:nowrap; margin-bottom:12px; padding:4px 0; }
  .mobile-adapted-page .project-tabs > * { flex:none; }
  .mobile-adapted-page :is(.standard-form-section, .product-form-section, .requirement-form-section) { margin:12px 0!important; padding:12px!important; border-radius:6px; }
  .mobile-adapted-page :is(.standard-section-heading, .product-section-heading, .requirement-major-heading) { margin-left:0!important; max-width:100%; flex-wrap:wrap; gap:6px; }
  .mobile-adapted-page :is(.standard-form-section, .product-form-section)::after { display:none!important; }
  .mobile-adapted-page :is(.requirement-detail-card, .bug-detail-card, .ecn-detail-card) > section { margin-left:0!important; margin-right:0!important; padding-left:0!important; }
  .mobile-adapted-page :is(.requirement-content-section, .bug-description-section, .bug-solutions-section, .ecn-content-section) { margin-left:0!important; padding-left:0!important; }
  .mobile-adapted-page .detail-label { white-space:normal; }
  .mobile-adapted-page .EasyMDEContainer { min-width:0; max-width:100%; }
  .mobile-adapted-page .editor-toolbar { white-space:normal; }
  .mobile-adapted-page .editor-toolbar.fullscreen, .mobile-adapted-page .CodeMirror-fullscreen { z-index:1300; }
  .mobile-adapted-page :is(.table-container, .matrix-container, .rollout-matrix-container, .product-matrix-table-wrap) { min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  .mobile-wide-scroll { display:block; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
  .mobile-adapted-page .mobile-scroll-hint { display:block; margin:8px 0; color:var(--color-text-tertiary); font-size:12px; }
  .mobile-adapted-page .work-calendar-layout { display:flex!important; flex-direction:column; gap:10px; }
  .mobile-adapted-page .work-calendar-months { position:static; display:flex; overflow-x:auto; gap:4px; width:100%; max-height:none; }
  .mobile-adapted-page .work-calendar-months > * { flex:none; min-width:45px; border-radius:6px!important; }
  .mobile-adapted-page .work-calendar-grid { min-width:700px; }
  .mobile-adapted-page .work-calendar-bars { grid-auto-rows:40px; row-gap:4px; }
  .mobile-adapted-page .work-calendar-event { height:40px; }
  .mobile-adapted-page .work-calendar-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
  .mobile-adapted-page .work-calendar-filter { flex-wrap:wrap; margin-left:0; }
  .mobile-adapted-page .work-calendar-detail { position:static; top:auto; width:100%; }
  .mobile-adapted-page .dev-timeline-board, .mobile-adapted-page .timeline-board-wrapper { min-width:700px; }
  .mobile-adapted-page :is(.timeline-task-lists-grid, .system-module-grid, .system-governance-grid, .system-insight-grid, .system-activity-grid, .dashboard-work-row, .action-summary-grid) { display:grid!important; grid-template-columns:1fr!important; gap:10px; }
  .mobile-adapted-page :is(.system-dashboard-hero, .system-hero-main, .system-dashboard-heading, .system-status-card, .system-coverage-card) { min-width:0!important; padding:12px!important; flex-wrap:wrap; }
  .mobile-adapted-page .system-dashboard-quick-actions { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; width:100%; }
  .mobile-adapted-page .theme-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mobile-adapted-page :is(.settings-form-actions, .bulk-toolbar) { max-width:calc(100vw - 24px); box-sizing:border-box; left:12px!important; right:12px!important; margin:0; flex-wrap:wrap; padding:8px; }
  .mobile-adapted-page :is(.product-tree-row, .product-tree-node, .function-tree-node) { min-width:0; overflow-wrap:anywhere; }
  .mobile-adapted-page .sync-part-heading { flex-direction:column; }
  .mobile-adapted-page .alist-sync-section, .mobile-adapted-page .replica-sync-section { padding:12px; }
  .mobile-adapted-page .qrcode-content-wrap { flex-direction:column; align-items:flex-start; }
  .mobile-adapted-page .url-copy-box { flex-wrap:wrap; }
  .mobile-adapted-page .url-input { min-width:0!important; width:100%; }
  .mobile-adapted-page :is(.markdown-content, .text-content, .report-reading-content) table { display:block; overflow-x:auto; max-width:100%; }
  .mobile-adapted-page :is(.timeline-task-lists-grid, .system-module-grid, .system-governance-grid, .system-insight-grid, .system-activity-grid, .dashboard-work-row, .action-summary-grid) { grid-template-columns:minmax(0,1fr)!important; margin-left:0!important; margin-right:0!important; }
  .mobile-adapted-page :is(.timeline-task-section, .timeline-task-section-header, .timeline-notice-list, .notice-content-col, .notice-main-col) { min-width:0!important; max-width:100%; box-sizing:border-box; }
  .mobile-adapted-page .timeline-notice-item { flex-wrap:wrap; min-width:0; }
  .mobile-adapted-page .notice-task-title { white-space:normal!important; overflow-wrap:anywhere; }
  .mobile-adapted-page :is(.maintenance-layout, .maintenance-backup-location) { min-width:0; max-width:100%; overflow-wrap:anywhere; }
  .mobile-adapted-page .maintenance-layout { display:flex!important; flex-direction:column; gap:12px; }
  .mobile-adapted-page .maintenance-page .u-inline-111 { flex-wrap:wrap!important; gap:8px; }
  .mobile-adapted-page .maintenance-backup-location { flex:1 1 100%; white-space:normal!important; overflow-wrap:anywhere!important; word-break:break-all; }
  .mobile-adapted-page :is(.maintenance-summary-grid, .maintenance-metrics-grid) { display:grid; grid-template-columns:minmax(0,1fr)!important; }
  .mobile-adapted-page .maintenance-heading { display:flex; flex-wrap:wrap; gap:12px; }
  .mobile-adapted-page :is(.dev-toolbar-row, .dev-toolbar-left, .dev-toolbar-right, .dev-nav-controls) { display:flex!important; flex-wrap:wrap!important; width:100%!important; min-width:0!important; box-sizing:border-box; gap:8px; justify-content:flex-start!important; }
  .mobile-adapted-page .dev-toolbar-row { flex-direction:column!important; align-items:stretch!important; }
  .mobile-adapted-page .dev-range-badge { max-width:100%; box-sizing:border-box; flex-wrap:wrap!important; }
  .mobile-adapted-page .dev-filter-form { display:flex!important; flex-wrap:wrap!important; }
  .mobile-adapted-page .dev-toolbar-row > .mobile-fold-toggle { width:100%!important; flex:none!important; }
  .mobile-adapted-page .page-heading-with-icon { display:flex; align-items:flex-start; min-width:0; gap:8px; }
  .mobile-adapted-page .page-heading-with-icon > div { min-width:0; }
  .mobile-adapted-page :is(.bug-overview-grid, .bug-statistics-grid, .product-stat-grid, .system-coverage-grid) { display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:10px; }
  .mobile-adapted-page :is(.overview-kpi-grid, .about-feature-grid) { display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:10px; }
  .mobile-adapted-page .form-grid-3, .mobile-adapted-page .dev-modal-grid { grid-template-columns:minmax(0,1fr)!important; }
  .timeline-global-portal-popover, .work-calendar-hover { display:none!important; }
  .mobile-dev-info { color:var(--color-text-primary); background:var(--color-card-bg); border:1px solid var(--color-border); border-radius:8px; }
  .mobile-dev-info .dev-popover-val { overflow-wrap:anywhere; }
  .mobile-dev-info > button { margin-top:12px; min-height:40px; }
  .local-login-page .local-login-card { width:calc(100vw - 24px); min-height:0; border-radius:12px; grid-template-columns:1fr; margin:12px; }
  .local-login-page .local-login-art { min-height:110px; padding:20px; }
  .local-login-page .local-login-form { min-width:0; padding:24px 20px; }
  .local-login-page input { box-sizing:border-box; max-width:100%; font-size:16px; }
}
@media screen and (max-width:380px) {
  .mobile-adapted-page .mobile-record-table tr { grid-template-columns:1fr; }
  .mobile-adapted-page .theme-choices { grid-template-columns:1fr; }
}

/* Phone navigation and detail alignment, shared across entity pages. */
@media screen and (max-width:760px) {
  html[data-theme] .app-side-navigation { flex-direction:column!important; align-items:stretch!important; justify-content:flex-start!important; gap:3px!important; padding:10px!important; }
  html[data-theme] .app-side-navigation > a, html[data-theme] .app-side-navigation > .app-side-group > summary { display:flex!important; flex:none!important; align-items:center!important; justify-content:flex-start!important; text-align:left!important; gap:12px!important; min-height:44px!important; height:auto!important; transform:none!important; padding:9px 12px!important; clip-path:none!important; font-size:14px!important; }
  html[data-theme] .app-side-navigation > .app-side-group { width:100%!important; flex:none!important; margin:0!important; padding:0!important; }
  html[data-theme] .app-side-navigation > .app-side-brand { margin-bottom:8px!important; padding-bottom:14px!important; border-bottom:1px solid var(--color-border-light)!important; font-weight:700; }
  html[data-theme] .app-side-navigation .ui-icon { display:inline-flex!important; align-items:center; justify-content:center; flex:0 0 24px!important; width:24px!important; height:24px!important; font-size:21px!important; margin:0!important; }
  html[data-theme] .app-side-navigation :is(a,summary) > span:not(.ui-icon) { flex:0 1 auto!important; margin:0!important; line-height:22px; }
  html[data-theme] .app-side-navigation .app-side-group-menu a { display:flex!important; align-items:center; justify-content:flex-start!important; text-align:left; gap:10px; padding:9px 12px!important; }
  html[data-theme] .content .page-title-row { flex-direction:column!important; align-items:stretch!important; justify-content:flex-start!important; }
  html[data-theme] .content .page-title-row .page-title-actions { width:100%!important; flex-basis:auto!important; align-self:stretch!important; justify-content:flex-start!important; align-items:center!important; margin:4px 0 0!important; padding:0!important; gap:8px!important; }
  html[data-theme] .content .page-title-actions .mobile-more-toggle { margin-left:0!important; }
  html[data-theme] .content .mobile-page-card > .detail-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:0!important; }
  html[data-theme] .content .mobile-page-card > .detail-grid > .detail-item { grid-column:auto!important; width:auto!important; min-width:0!important; padding:10px!important; border-right:0!important; border-bottom:1px dashed var(--color-border)!important; overflow-wrap:anywhere; }
  html[data-theme] .content .mobile-page-card > .detail-grid > .detail-item:nth-child(odd) { border-right:1px dashed var(--color-border)!important; }
  html[data-theme] .content .mobile-page-card > .detail-grid .detail-label { font-size:12px; line-height:1.5; }
  html[data-theme] .content .mobile-page-card > .detail-grid .detail-item > :not(.detail-label) { max-width:100%; font-size:13px; line-height:1.6; }
}
@media screen and (max-width:339px) {
  html[data-theme] .content .mobile-page-card > .detail-grid { grid-template-columns:1fr!important; }
  html[data-theme] .content .mobile-page-card > .detail-grid > .detail-item:nth-child(odd) { border-right:0!important; }
}
