/* Approved phone/iPad shell. Desktop rules remain in the existing stylesheets. */
.touch-account-menu[hidden] { display: none !important; }
.platform-touch-nav { display: none; }
.environment-device-table [data-env-device-row][hidden] { display: none !important; }
body[data-route="meters"] #viewHost [data-meter-card][hidden] { display: none !important; }
.environment-device-modal fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.environment-device-notice { margin: 10px 0; white-space: normal; overflow-wrap: anywhere; }
.environment-device-notice[role="alert"] { color: #b42318; }
.environment-device-modal [data-ledger-read-notice] { margin: 10px 0; white-space: normal; overflow-wrap: anywhere; }
.environment-device-modal [data-ledger-read-notice][role="status"] { color: inherit; }
.touch-filter-menu { display: contents; }
.touch-filter-menu > summary { display: none; }
/* Missing communication is neutral on every viewport, never a green healthy badge. */
body[data-shell="business"][data-skin="light"][data-route="nodes"] #viewHost .node-status-badge.unknown { color: #66758a; }
body[data-route="nodes"] #viewHost .node-detail-trigger { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; outline-offset: -2px; }
body[data-route="schedules"] .schedule-review { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; margin: 0 0 24px; }
body[data-route="schedules"] .schedule-review dt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
body[data-route="schedules"] .schedule-review dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 1279px), (pointer: coarse) and (max-width: 1440px) {
  body[data-route="room-bindings"][data-touch-layout] #viewHost .room-tree-zone-action { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  body[data-shell][data-touch-layout] #viewHost .project-assets-loading-shell .acctgrid { grid-template-columns: minmax(0,1fr); }
  html:has(body[data-route="meters"][data-touch-layout] .meter-modal-backdrop:not([hidden])),
  body[data-route="meters"][data-touch-layout]:has(.meter-modal-backdrop:not([hidden])) { overflow: hidden; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-modal-backdrop { z-index: 1500; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-drawer-backdrop { inset: 0; padding: 12px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-drawer-backdrop:not([hidden]) { display: grid; place-items: center; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-editor-drawer { width: min(540px,100%); min-height: 0; max-height: calc(100dvh - 24px); height: auto; overflow: auto; border-radius: 16px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-modal-backdrop.fullscreen { inset: 0; padding: 12px; place-items: center; background: rgba(18,34,56,.38); }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-modal { width: min(1040px,100%); min-height: 0; max-height: calc(100dvh - 24px); overflow: auto; padding: 16px; border-radius: 16px; background: #fff; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-modal header { margin-bottom: 8px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-modal h2 { font-size: 16px; line-height: 1.5; color: var(--touch-ink); }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-workbench { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-workbench > section { min-width: 0; border: 1px solid var(--touch-line); border-radius: 12px; padding: 12px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-workbench h3 { color: var(--touch-ink); font-weight: 600; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-transfer-actions { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 0; justify-items: stretch; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-modal :is(button,select) { min-height: 44px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-modal select { font-size: 16px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-modal .btn.pri { background: var(--touch-blue); border-color: var(--touch-blue); color: #fff; box-shadow: none; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-workbench { gap: 12px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-workbench-heading { padding: 12px; gap: 8px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-summary-card { padding: 10px; gap: 4px; box-shadow: none; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-summary-card b { font-size: 22px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-toolbar { grid-template-columns: minmax(0,1fr); padding: 12px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-filter-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-toolbar label { display: grid; gap: 6px; white-space: normal; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-action-group { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-toolbar .meter-select { width: 100%; font-size: 16px; }
  body[data-shell="business"][data-touch-layout][data-route="meters"] #viewHost :is(.meter-toolbar,.meter-pagination) :is(button,input,select) { min-height: 44px; min-width: 44px; }
  body[data-shell="business"][data-touch-layout][data-route="meters"] #viewHost .meter-pagination { flex-wrap: wrap; gap: 8px; }
  body[data-shell="business"][data-touch-layout][data-route="meters"] #viewHost .meter-pagination label { display: inline-flex; align-items: center; gap: 6px; }
  body[data-shell="business"][data-touch-layout][data-route="meters"] #viewHost [data-meter-filter-empty] { padding: 16px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-info-list { grid-template-columns: minmax(0,1fr); align-items: start; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-info-pair { grid-template-columns: minmax(88px,122px) minmax(0,1fr); column-gap: 10px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-info-list :is(dt,dd) { margin: 0; white-space: normal; overflow-wrap: anywhere; }
  body[data-shell="business"][data-skin="light"][data-route="nodes"] #viewHost .node-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  body[data-shell="business"][data-skin="light"][data-route="nodes"] #viewHost .node-detail-list dd { white-space: normal; overflow-wrap: anywhere; }
  body[data-shell="business"][data-skin="light"][data-route="nodes"] #viewHost .node-info-row b { white-space: normal; overflow-wrap: anywhere; }
  body[data-shell="business"][data-skin="light"][data-route="nodes"] #viewHost .gateway-node-card { padding-top: 72px; padding-bottom: 64px; }
  body[data-route="nodes"] #viewHost .node-detail-trigger { min-width: 44px; min-height: 44px; }
  body[data-shell="business"][data-skin="light"][data-route="nodes"] #viewHost .node-edit-icon { top: auto; bottom: 10px; right: 64px; min-width: 44px; min-height: 44px; }
  html:has(body[data-route="schedules"][data-touch-layout] [data-schedule-modal]:not([hidden])),
  body[data-route="schedules"][data-touch-layout]:has([data-schedule-modal]:not([hidden])) { overflow: hidden; }
  body[data-shell][data-touch-layout] {
    --touch-ink: #122238;
    --touch-blue: #246bfe;
    --touch-muted: #5e6f85;
    --touch-line: #dfe6ee;
    --touch-paper: #f4f7fa;
    color: var(--touch-ink);
    background: var(--touch-paper);
  }
  body[data-shell][data-touch-layout] .main { min-width: 0; }
  body[data-shell="business"][data-touch-layout] .topbar > .platform-title-stack { display: none; }
  body[data-shell="platform"][data-touch-layout] .main { padding-top: 0; }
  body[data-shell="platform"][data-touch-layout] .topbar-actions { max-height: none; overflow: visible; padding-right: 0; }
  body[data-shell="platform"][data-touch-layout] .platform-topbar-brand-name { display: block; color: var(--touch-ink); }
  body[data-shell="platform"][data-touch-layout] .platform-topbar-brand { background: transparent; padding: 0; }
  body[data-shell="platform"][data-touch-layout] .platform-menu-toggle { color: var(--touch-blue); min-width: 44px; min-height: 44px; }
  body[data-shell="platform"][data-touch-layout] .platform-drawer-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex-basis: 44px; }
  body[data-shell="platform"][data-touch-layout].platform-mobile-nav-open .sidebar { top: 64px; z-index: 70; }
  body[data-shell="platform"][data-touch-layout].platform-mobile-nav-open .platform-mobile-scrim { top: 64px; z-index: 65; }
  body[data-shell][data-touch-layout] .platform-shell { transform: none; }
  body[data-shell][data-touch-layout] #viewHost .modal-backdrop { z-index: 1500; }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer {
    z-index: 1500;
    top: 0;
    bottom: 0;
    width: min(520px,100%);
    max-height: 100dvh;
    overflow: auto;
  }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer .modal-actions {
    margin: auto 0 0;
    padding-bottom: max(18px,env(safe-area-inset-bottom));
  }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer .modal-box {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 24px;
    position: relative;
  }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer h3 { margin: 8px 48px 28px 0; font-size: 20px; color: var(--touch-ink); }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer label { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-bottom: 20px; }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer label > span { grid-column: 1 / -1; color: var(--touch-muted); font-size: 14px; }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer label > :is(input,select,textarea) { min-width: 0; width: 100%; min-height: 44px; font-size: 16px; }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer label > em { align-self: center; font-style: normal; color: var(--touch-muted); }
  body[data-route="controllers"][data-touch-layout] #viewHost .gateway-drawer .x { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border: 1px solid var(--touch-line); border-radius: 12px; background: var(--touch-paper); color: var(--touch-ink); }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-editor-backdrop { padding: 12px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-editor-panel { min-height: 0; max-height: calc(100dvh - 24px); overflow: auto; }
  body[data-shell][data-touch-layout] .topbar {
    position: relative;
    inset: auto;
    z-index: 60;
    height: auto;
    min-height: 64px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    color: var(--touch-ink);
    background: #fff;
    border-bottom: 1px solid var(--touch-line);
    box-shadow: none;
    border-radius: 0;
  }
  body[data-shell][data-touch-layout] .topbar-actions {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
    margin: 0;
    min-width: 0;
  }
  body[data-shell][data-touch-layout] .topbar-actions > .project-switcher {
    position: relative;
    inset: auto;
    order: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    flex: 1 1 220px;
    width: auto;
    max-width: 420px;
    min-width: 0;
    gap: 4px;
    z-index: auto;
  }
  body[data-shell][data-touch-layout] .project-switcher #projectSelector,
  body[data-shell][data-touch-layout] #customerContextSelector {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 10px;
    border: 1px solid var(--touch-line);
    border-radius: 10px;
    color: var(--touch-ink);
    background: var(--touch-paper);
    font-size: 16px;
  }
  body[data-shell="business"][data-touch-layout] .topbar-actions > .project-switcher,
  body[data-shell="platform"][data-route="platform/smart-box-onboarding"][data-touch-layout] .topbar-actions > .project-switcher { display: grid !important; }
  body[data-shell][data-touch-layout] .topbar .ghost-button,
  body[data-shell][data-touch-layout] .project-switcher .project-edit-button,
  body[data-shell][data-touch-layout] .admin-access-trigger,
  body[data-shell][data-touch-layout] .touch-account-menu > summary {
    min-height: 44px;
    height: auto;
    min-width: 44px;
    padding: 10px;
    white-space: nowrap;
    border: 1px solid var(--touch-line);
    border-radius: 10px;
    color: var(--touch-ink);
    background: #fff;
    font-size: 13px;
    line-height: 22px;
    cursor: pointer;
    white-space: nowrap;
  }
  body[data-shell][data-touch-layout] .admin-access-trigger { color: var(--touch-blue); border-color: #c8dafd; }
  body[data-shell][data-touch-layout] .admin-access-menu { margin: 0; flex: 0 0 auto; }
  body[data-shell][data-touch-layout] .admin-access-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(320px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    color: var(--touch-ink);
  }
  body[data-shell][data-touch-layout] .customer-context-switcher {
    flex: 0 1 200px;
    min-width: 0;
    color: var(--touch-muted);
  }
  body[data-shell][data-touch-layout] .project-edit-popover {
    max-width: calc(100vw - 32px);
    width: 320px;
    color: var(--touch-ink);
  }
  body[data-shell][data-touch-layout] .touch-account-menu { position: static; flex: 0 0 auto; }
  body[data-shell][data-touch-layout] .touch-account-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: min(320px, calc(100vw - 32px));
    max-height: min(70dvh, 520px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--touch-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 48px #12223824;
  }
  body[data-shell][data-touch-layout] .touch-account-panel :is(.version-pill, .user-pill) {
    display: block;
    height: auto;
    overflow-wrap: anywhere;
    white-space: normal;
    color: var(--touch-muted);
    background: var(--touch-paper);
  }
  body[data-shell][data-touch-layout] .touch-account-panel .shell-corner-logout {
    min-height: 44px;
    color: var(--touch-ink);
    border-color: var(--touch-line);
    background: var(--touch-paper);
  }
  body[data-shell][data-touch-layout] .touch-account-panel :is(.theme-label, .theme-dots) { display: flex; color: var(--touch-muted); }
  body[data-shell][data-touch-layout] .touch-account-panel .theme-dot { width: 44px; height: 44px; }
  body[data-shell][data-touch-layout] :is(button, a, summary, input, select, textarea):focus-visible {
    outline: 2px solid var(--touch-blue);
    outline-offset: 2px;
  }
  body[data-shell="business"][data-touch-layout] .platform-shell {
    --sidebar-width: 104px;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }
  body[data-shell="business"][data-touch-layout] .sidebar {
    padding: 16px 8px;
    color: var(--touch-ink);
    background: #fff;
    border-right: 1px solid var(--touch-line);
    box-shadow: none;
  }
  body[data-shell="business"][data-touch-layout] .business-brand { flex-direction: column; padding: 0; gap: 6px; }
  body[data-shell="business"][data-touch-layout] .business-brand strong { color: var(--touch-ink); font-size: 16px; }
  body[data-shell="business"][data-touch-layout] .business-brand-initial { color: #fff; background: var(--touch-blue); }
  body[data-shell="business"][data-touch-layout] .business-primary-nav { margin-top: 24px; gap: 8px; }
  body[data-shell="business"][data-touch-layout] .business-primary-nav button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 68px;
    padding: 8px 2px;
    color: var(--touch-muted);
    text-align: center;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  body[data-shell="business"][data-touch-layout] .business-primary-nav button.active,
  body[data-shell="business"][data-touch-layout] .business-primary-nav button:hover {
    color: var(--touch-blue);
    background: #edf3ff;
    box-shadow: none;
  }
  body[data-shell="business"][data-touch-layout] .business-primary-nav button.active::before { display: none; }
  body[data-shell="business"][data-touch-layout] .business-nav-icon,
  body[data-shell="business"][data-touch-layout] .business-primary-nav button.active .business-nav-icon {
    width: 26px;
    height: 26px;
    color: inherit;
    background: transparent;
  }
  body[data-shell="business"][data-touch-layout] .business-nav-label {
    position: static;
    clip: auto;
    width: auto;
    height: auto;
    overflow: visible;
    font-size: 12px;
    font-weight: 650;
  }
  body[data-shell="business"][data-touch-layout] .business-nav-count { display: none; }
  body[data-shell="business"][data-touch-layout] .main { padding: 0 16px 24px; background: var(--touch-paper); }
  body[data-shell="business"][data-touch-layout] .topbar { margin-inline: -16px; }
  body[data-shell="business"][data-touch-layout] .business-secondary-nav {
    position: relative;
    top: auto;
    min-height: 48px;
    margin: 0;
    padding: 0 4px;
    box-shadow: none;
    background: #fff;
  }
  body[data-shell="business"][data-touch-layout] .business-secondary-nav button { min-height: 44px; }
  body[data-shell="business"][data-touch-layout] .view-host { padding-top: 16px; }
  body[data-shell][data-touch-layout] .float-tools { display: none; }
  body[data-route="faults"][data-touch-layout] #viewHost .fault-record-table :is(tr,td) { height: auto; }
  body[data-route="command-events"][data-touch-layout] #viewHost :is(.events-timeline-layout > div,.event-chronology,.event-time-lane-track) { min-width: 0; max-width: 100%; }
  body[data-route="operations"][data-touch-layout] #viewHost .ops-home-right > .kpis { grid-template-columns: repeat(3,minmax(0,1fr)); min-width: 0; }
  body[data-route="operations"][data-touch-layout] #viewHost .ops-kpi-wave > span { color: var(--touch-muted); }
  body[data-route="operations"][data-touch-layout] #viewHost [data-energy-trend-mode] { min-height: 44px; }
  body[data-route="operations"][data-touch-layout] #viewHost .ops-daily-temperature-toolbar { flex-wrap: wrap; }
  body[data-route="operations"][data-touch-layout] #viewHost .ops-daily-temperature-selects { flex-wrap: wrap; max-width: 100%; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-record-table,.event-table) { display: block; min-width: 0; width: 100%; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-record-table,.event-table) thead { display: none; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-record-table,.event-table) tbody { display: grid; gap: 12px; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-record-table,.event-table) tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost td[data-touch-label] { display: block; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost td[data-touch-label="操作"] { grid-column: 1 / -1; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-record-table,.event-table) td[colspan] { grid-column: 1 / -1; display: block; width: auto; min-width: 0; padding: 12px; }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-time-lane { min-height: 44px; }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-timeline-marker { top: -21px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-modal-backdrop,.event-modal-backdrop) { inset: 0; z-index: 1500; padding: 12px; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-modal-panel,.event-modal-dialog) { min-width: 0; max-width: 100%; max-height: calc(100dvh - 24px); overflow: auto; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(.fault-actions,.event-actions) { display: flex; flex-wrap: wrap; gap: 8px; }
  body:is([data-route="faults"],[data-route="command-events"])[data-touch-layout] #viewHost :is(button,.inp) { min-height: 44px; }
  body:is([data-route="platform/smart-box-onboarding"],[data-route="smart-box-onboarding"])[data-touch-layout] #viewHost .smartbox-form { grid-template-columns: repeat(2,minmax(0,1fr)); min-width: 0; }
  body:is([data-route="platform/smart-box-onboarding"],[data-route="smart-box-onboarding"])[data-touch-layout] #viewHost :is(.smartbox-form label,.smartbox-form .inp) { min-width: 0; max-width: 100%; }
  body:is([data-route="platform/smart-box-onboarding"],[data-route="smart-box-onboarding"])[data-touch-layout] #viewHost :is(.smartbox-form .inp,.smartbox-actions button) { min-height: 44px; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost [data-preserve-scroll="protocol-session-list"] .protocol-table { display: block; min-width: 0; width: 100%; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost [data-preserve-scroll="protocol-session-list"] thead { display: none; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost [data-preserve-scroll="protocol-session-list"] tbody { display: grid; gap: 12px; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost [data-preserve-scroll="protocol-session-list"] tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost [data-preserve-scroll="protocol-session-list"] td[data-label] { display: block; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost [data-preserve-scroll="protocol-session-list"] td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body[data-shell="platform"][data-touch-layout] #viewHost :is(.customer-profile-stepper,.customer-setup-stepper) { grid-template-columns: repeat(3,minmax(0,1fr)); overflow: visible; }
  body[data-shell="platform"][data-touch-layout] #viewHost :is(.customer-profile-stepper,.customer-setup-stepper) > li { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  body[data-route="platform/customer-setup"][data-touch-layout] #viewHost .platform-field { min-width: 0; }
  body[data-route="platform/customer-setup"][data-touch-layout] #viewHost .platform-field select { min-width: 0; width: 100%; max-width: 100%; min-height: 44px; font-size: 16px; }
  body[data-route="platform/tenants"][data-touch-layout] #viewHost .confirmed-platform-tenants, body[data-route="platform/tenants"][data-touch-layout] #viewHost .confirmed-platform-tenants > * { min-width: 0; max-width: 100%; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.platform-table-scroll,.tenant-ledger-panel) { min-width: 0; max-width: 100%; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) { display: block; min-width: 0; width: 100%; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) thead { display: none; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) tbody { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; min-width: 0; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost td[data-touch-label] { display: block; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost td[data-touch-label="操作"] { grid-column: 1 / -1; }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.row-actions,.tenant-tabs,.tenant-toolbar) { flex-wrap: wrap; gap: 8px; min-width: 0; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(button,.inp) { min-height: 44px; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(input,select,textarea) { min-width: 0; font-size: 16px; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(.read-table,.run-table,.use-table,.tenant-table) { display: block; min-width: 0; width: 100%; border: 0; table-layout: auto; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(.read-table,.run-table,.use-table,.tenant-table) thead { display: none; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(.read-table,.run-table,.use-table,.tenant-table) tbody { display: grid; gap: 12px; grid-template-columns: minmax(0,1fr); }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(.read-table,.run-table,.use-table,.tenant-table) tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); min-width: 0; gap: 14px; padding: 16px; margin: 0; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost td[data-touch-label] { display: block; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body:is([data-route="meter-readings"],[data-route="runtime-records"],[data-route="daily-usage"],[data-route="prepaid-tenants"])[data-touch-layout] #viewHost :is(.readpager,.runpager,.daily-pager,.tenantpager) { flex-wrap: wrap; gap: 8px; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-table td:last-child { grid-column: 1 / -1; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-table thead,
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-table thead tr { display: block; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-table th:not(:first-child) { display: none; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-table th:first-child { display: flex; align-items: center; gap: 8px; border: 0; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-table th:first-child::after { content: "全选"; }
  body[data-route="daily-usage"][data-touch-layout] #viewHost .daily-pager { min-width: 0; width: 100%; }
  body[data-route="daily-usage"][data-touch-layout] #viewHost .billing-building-tree .control-tree-node { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "primary secondary"; gap: 4px; }
  body[data-route="daily-usage"][data-touch-layout] #viewHost .billing-building-tree .control-tree-secondary { padding-left: 0; white-space: nowrap; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenantops { display: flex; flex-wrap: wrap; min-width: 0; gap: 8px; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-modal-backdrop { inset: 0; z-index: 1500; max-height: 100dvh; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-dialog { min-width: 0; max-width: 100%; max-height: 100dvh; overflow: auto; }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-account-drawer { width: min(520px,100%); height: 100dvh; max-height: 100dvh; }
  body[data-route="meter-readings"][data-touch-layout] #viewHost .read-detail-modal { z-index: 1500; padding: 12px; }
  body[data-route="meter-readings"][data-touch-layout] #viewHost .read-detail-dialog { min-width: 0; max-width: 100%; max-height: calc(100dvh - 24px); overflow: auto; }
  body[data-route="runtime-records"][data-touch-layout] #viewHost .runtime-date-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,130px),1fr)); }
  body:is([data-route="billing"],[data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.billing-building-tree,.runtime-control-tree) .control-tree-primary { grid-template-columns: 44px 44px minmax(0,1fr); gap: 4px; }
  body:is([data-route="billing"],[data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.billing-building-tree,.runtime-control-tree) :is(.control-tree-check,.control-tree-toggle) { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  body:is([data-route="billing"],[data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.billing-building-tree,.runtime-control-tree) .control-tree-name-input { font-size: 13px; }
  body[data-shell="business"]:is([data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.daily-ledger-layout,.runtime-ledger-layout) { grid-template-columns: 300px minmax(0,1fr) !important; }
  body:is([data-route="billing"],[data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.billing-building-tree,.runtime-control-tree) :is(.control-tree-children,.daily-tree-level-floor,.daily-tree-level-room) { padding-left: 4px; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(button,.inp) { min-height: 44px; }
  body[data-shell="business"]:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost .btn.pri { background: var(--touch-blue); }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(input,select,textarea) { min-width: 0; font-size: 16px; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(.subaccount-table,.environment-device-table) { display: block; min-width: 0; width: 100%; border: 0; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(.subaccount-table,.environment-device-table) thead { display: none; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(.subaccount-table,.environment-device-table) tbody { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(.subaccount-table,.environment-device-table) tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; min-width: 0; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost td[data-touch-label] { display: block; width: auto; padding: 0; min-width: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body[data-route="customers"][data-touch-layout] #viewHost td.subaccount-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; }
  body[data-route="customers"][data-touch-layout] #viewHost td.subaccount-actions::before { flex-basis: 100%; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-modal-backdrop { z-index: 1500; padding: 12px; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-modal { min-width: 0; max-width: 100%; max-height: calc(100dvh - 24px); overflow: auto; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .environment-device-tabs { display: flex; height: auto; flex-wrap: wrap; gap: 6px; padding: 8px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .environment-device-tabs > button { flex: 1 1 150px; padding: 8px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .environment-device-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .gateway-pagination { height: auto; min-height: 56px; flex-wrap: wrap; padding: 12px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .gateway-pagination :is(button,input) { min-width: 44px; min-height: 44px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .gateway-modal { z-index: 1500; padding: 12px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .environment-device-modal .modal-box.small { min-width: 0; min-height: 0; width: min(500px,100%); max-width: 100%; max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; border-radius: 16px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .environment-device-modal .x { min-width: 44px; min-height: 44px; top: 8px; right: 8px; }
  body[data-route="gateway-channels"][data-touch-layout] #viewHost .environment-device-modal h3 { padding-right: 36px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost :is(button,.inp) { min-height: 44px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost :is(input,select) { min-width: 0; font-size: 16px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-layout { grid-template-columns: minmax(0,1fr) minmax(280px,.85fr); }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-table-head { display: none; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-row { grid-template-columns: minmax(0,1fr) 16px; gap: 10px; padding: 16px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost :is(.ai-strategy-row-saving,.ai-strategy-row-target,.ai-strategy-row-time) { grid-column: 1; white-space: normal; overflow-wrap: anywhere; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-row-arrow { grid-column: 2; grid-row: 1 / span 2; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-drawer { min-width: 0; min-height: 0; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-drawer-body { min-height: 0; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-drawer-close { min-width: 44px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-modal-panel { width: min(900px,100vw); max-width: 100%; min-width: 0; max-height: 100dvh; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-task-modal { min-width: 0; width: 100%; height: 100%; max-height: 100%; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-modal-body { min-width: 0; grid-template-columns: minmax(160px,.7fr) minmax(0,1.3fr); }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost :is(.strategy-room-column,.strategy-form-column) { min-width: 0; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-modal-foot { flex-wrap: wrap; padding-bottom: max(12px,env(safe-area-inset-bottom)); }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost :is(.energy-page-head,.energy-command-bar,.energy-command-actions,.energy-filter-strip,.strategy-pagination) { flex-wrap: wrap; gap: 10px; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost :is(.energy-page-head,.energy-command-bar) > div { min-width: 0; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost :is(button,summary,.inp) { min-height: 44px; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost :is(input,select,textarea) { min-width: 0; font-size: 16px; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-modal-backdrop { z-index: 1500; inset: 0; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-modal-panel { width: min(960px,100vw); max-width: 100%; max-height: 100dvh; min-width: 0; min-height: 0; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-task-modal { width: 100%; min-width: 0; max-width: 100%; height: 100%; min-height: 0; max-height: 100%; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-modal-body { grid-template-columns: minmax(180px,.7fr) minmax(0,1.3fr); min-height: 0; overflow: auto; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost :is(.strategy-room-column,.strategy-form-column) { min-width: 0; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-modal-foot { flex-wrap: wrap; padding-bottom: max(12px,env(safe-area-inset-bottom)); }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-shell {
    min-height: 0;
    border: 0;
    color: var(--touch-ink);
    background: transparent;
  }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-tabs { display: flex; flex-wrap: wrap; gap: 6px; height: auto; padding: 6px; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-tab { flex: 1 1 90px; min-height: 44px; padding: 8px 4px; font-size: 13px; white-space: nowrap; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-main { padding: 16px 0; min-height: 0; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-kpis > article { min-width: 0; padding: 16px 12px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-refresh { position: static; display: block; margin: 12px 0 12px auto; min-height: 44px; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-board { min-height: 0; overflow-x: auto; border: 0; background: #fff; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-pager { position: static; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-pager :is(button,input) { min-height: 44px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-timeline-row {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
    margin: 12px 0;
    padding: 16px;
    border: 1px solid var(--touch-line);
    border-radius: 16px;
    background: #fff;
  }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-row-track {
    min-width: 0;
    height: auto;
    min-height: 48px;
    background: none;
    overflow: visible;
  }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-row-slot {
    position: static;
    display: inline-flex;
    gap: 12px;
    align-items: center;
    height: auto;
    max-width: 100%;
    padding: 12px;
    transform: none;
  }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-time-axis,
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-board-hint { display: none; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-actions { grid-column: auto; justify-content: flex-end; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-week-strip { overflow-x: auto; grid-template-columns: repeat(7,minmax(44px,1fr)); }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(button,summary,.inp) { min-height: 44px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(input,select,textarea) { min-width: 0; font-size: 16px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-modal-backdrop { z-index: 1500; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-modal-panel { height: 100dvh; max-height: 100dvh; overflow: hidden; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-task-drawer { width: 100%; max-width: 100%; min-width: 0; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(.schedule-drawer-head,.schedule-drawer-foot) { flex-shrink: 0; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-control-pad {
    width: 100%; margin-top: 20px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; color: var(--touch-ink);
  }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-temperature-entry { color: var(--touch-ink); }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-temp-row { grid-template-columns: 44px minmax(0,1fr) 44px auto; gap: 8px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-temp-slider { background: var(--touch-line); }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(.schedule-mode-grid,.schedule-fan-grid) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(.schedule-mode-grid,.schedule-fan-grid) button {
    min-height: 64px; padding: 10px 6px; border: 1px solid var(--touch-line); border-radius: 10px; background: var(--touch-paper); color: var(--touch-ink);
  }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(.schedule-mode-grid,.schedule-fan-grid) i { font-size: 20px; line-height: 24px; color: inherit; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(.schedule-mode-grid,.schedule-fan-grid) span { font-size: 14px; line-height: 20px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost :is(.schedule-mode-grid,.schedule-fan-grid) button.on,
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .btn.pri,
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-action-row .btn.on { background: var(--touch-blue); border-color: var(--touch-blue); color: #fff; box-shadow: none; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-action-row .btn.on i { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 3px var(--touch-blue); }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-drawer-steps button.on { color: var(--touch-blue); }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-drawer-foot { flex-wrap: wrap; padding-bottom: max(12px,env(safe-area-inset-bottom)); }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-drawer-head { gap: 8px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-drawer-head > div { min-width: 0; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-drawer-steps button { min-width: 0; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-pagination { flex-wrap: wrap; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-layout,
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-layout.is-group-rail-collapsed {
    grid-template-columns: minmax(0,1fr);
    gap: 16px;
  }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-main { min-height: 0; height: auto; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-columns { display: none; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-item {
    margin-bottom: 12px;
    border: 1px solid var(--touch-line);
    border-radius: 16px;
    background: #fff;
  }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-item.selected { border-color: #a9c7ff; background: #fff; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row {
    grid-template-columns: repeat(3,minmax(0,1fr));
    padding: 14px;
    gap: 12px;
  }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row > .group-ledger-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row > div:first-of-type { grid-column: 1 / 3; grid-row: 1; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row :is(b,small) { white-space: normal; overflow-wrap: anywhere; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row [data-touch-label] { display: block; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row [data-touch-label]::before {
    content: attr(data-touch-label);
    display: block;
    margin-bottom: 4px;
    color: var(--touch-muted);
    font-size: 11px;
    font-weight: 400;
  }
  body[data-route="control-groups"][data-touch-layout] #viewHost .building-group-card-actions { grid-column: 1 / -1; justify-content: flex-end; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-detail { grid-template-columns: minmax(0,1fr); padding: 12px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members { grid-column: 1 / -1; overflow: auto; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members table { min-width: 600px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members :is(th,td) { display: table-cell; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-quick { padding: 0; border: 0; background: transparent; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-temp { grid-template-columns: minmax(0,1fr) 44px max-content 44px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-temp b { white-space: nowrap; overflow-wrap: normal; }
  body[data-route="control-groups"][data-touch-layout] #viewHost :is(.btn,.ctile,.link-button,.group-ledger-toggle,.lock-temp-step) {
    min-width: 44px;
    min-height: 44px;
    height: auto;
    padding: 8px 4px;
  }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-toolbar .inp { flex: 1 1 160px; min-width: 0; height: 44px; font-size: 16px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-pager { flex-wrap: wrap; gap: 8px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-history p { grid-template-columns: minmax(0,1fr); }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-command-rail { position: static; min-width: 0; min-height: 0; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-command-rail.is-collapsed { position: static; width: 100%; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-rail-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-rail-content .control-right-panel { min-width: 0; width: auto; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-mode-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-fan-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-right-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--touch-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: none;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .mobile-control-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--touch-line);
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .mobile-control-context small {
    grid-column: 1 / -1;
    color: var(--touch-muted);
    overflow-wrap: anywhere;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .mobile-control-context strong { font-size: 20px; overflow-wrap: anywhere; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-power-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-right-panel { padding: 16px; border-radius: 18px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-right-panel { --primary-gradient: linear-gradient(#246bfe,#246bfe); }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-status::before { content: none; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 12px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost [data-command-feedback][aria-hidden="true"] { display: none; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .touch-control-reported {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px 12px;
    margin-top: 12px;
    color: var(--touch-ink);
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .touch-control-reported small { grid-column: 1 / -1; color: var(--touch-muted); font-size: 12px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-status > .panel-title { order: 2; margin: 0; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-power-row { order: 3; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-section { order: 4; margin: 0; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .touch-control-target-label { display: block; grid-area: label; text-align: center; color: var(--touch-muted); font-size: 14px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-power-tile { min-height: 60px; border-radius: 12px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-row {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) 52px;
    grid-template-areas: "label label label" "decrease target increase";
    order: 1;
    padding: 14px;
    border-radius: 16px;
    background: var(--touch-paper);
    height: auto;
    min-height: 100px;
    gap: 8px;
    margin: 0;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-row .sld { display: none; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-row [data-temperature-direction="decrease"] { grid-area: decrease; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-row [data-temperature-direction="increase"] { grid-area: increase; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-row > button {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 12px;
    font-size: 24px;
    color: var(--touch-blue);
    background: #edf3ff;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-current {
    grid-area: target;
    text-align: center;
    justify-self: center;
    font-family: Bahnschrift, "Segoe UI", sans-serif;
    font-size: clamp(40px, 6vw, 60px);
    line-height: 1.1;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-grid.five { grid-template-columns: repeat(5,minmax(0,1fr)); }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-grid { gap: 6px; margin: 10px 0; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .ctile {
    min-width: 0;
    min-height: 60px;
    padding: 8px 2px;
    border-radius: 12px;
    font-size: 12px;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .ctile.on {
    color: var(--touch-blue);
    background: #edf3ff;
    border-color: #b8d0ff;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-lock .panel-title { flex-wrap: wrap; gap: 10px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-lock .title-actions { margin-left: auto; }
}

@media (max-width: 767px) {
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost .observation-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  body[data-route="platform/protocol-tests"][data-touch-layout] #viewHost .observation-tabs button { min-width: 0; min-height: 44px; }
  body[data-shell="business"][data-route="ac-control"] .shell-corner { display: none; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-workbench { grid-template-columns: minmax(0,1fr); gap: 12px; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-transfer-actions { grid-row: auto; order: 2; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-binding-workbench > section:last-child { order: -1; }
}

@media (min-width: 768px) and (max-width: 1279px), (min-width: 768px) and (pointer: coarse) and (max-width: 1440px) {
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-layout,
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-layout.is-group-rail-collapsed { grid-template-columns: minmax(0,1fr) minmax(300px,1fr); align-items: start; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-main { min-width: 0; max-height: 75vh; overflow: auto; }
  body[data-route="control-groups"][data-touch-layout] #viewHost :is(.group-rail-content,.group-ledger-detail) { grid-template-columns: minmax(0,1fr); }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,1fr); gap: 16px; align-items: start; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-shell { min-width: 0; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; max-width: 100%; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-interface-hooks { margin-top: 0; min-width: 0; }
  body[data-shell="business"][data-skin="light"][data-route="nodes"][data-touch-layout] #viewHost .node-management-layout { grid-template-columns: minmax(0,1fr) minmax(280px,1fr); align-items: start; }
  body[data-shell="business"][data-skin="light"][data-touch-layout][data-route="meters"] #viewHost .meter-info-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-layout-grid {
    grid-template-columns: minmax(210px, .38fr) minmax(0, 1fr) !important;
    gap: 12px;
    align-items: start;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tree-panel {
    grid-column: 1;
    grid-row: 1;
    max-height: 200px;
    overflow: auto;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-main-panel { grid-column: 1; grid-row: 2; min-width: 0; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-right-panel { grid-column: 2; grid-row: 1 / span 2; width: auto; position: relative; }
  /* Override the legacy tablet !important two-column grid inside the narrow master pane. */
  body[data-responsive][data-shell="business"][data-skin][data-route="ac-control"][data-touch-layout] #viewHost .control-card-grid { grid-template-columns: minmax(0,1fr) !important; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-filter-row { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-filter-row > :is(.btn,.inp) { grid-column: span 2; min-width: 0; width: 100%; padding-inline: 6px; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-filter-row > :is([data-select-all],[data-select-visible],select) { grid-column: span 3; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-pager { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-filter-status { grid-column: 1 / -1; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-filter-status:empty { display: none; }
body[data-route="ac-control"][data-touch-layout] #viewHost .control-layout-toggle { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); grid-column: 1 / -1; max-width: 100%; margin: 0; padding: 4px; gap: 4px; background: var(--touch-paper); border: 1px solid var(--touch-line); transform: none; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-layout-toggle :is(b,.btn) { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; height: auto; padding: 6px; white-space: normal; text-align: center; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-layout-toggle b { background: var(--touch-blue); color: #fff; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-right-panel { max-height: none; overflow: visible; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-layout,
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-management-layout.is-group-rail-collapsed {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 1023px) {
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-rail-content { grid-template-columns: minmax(0,1fr); }
  body[data-route="operations"][data-touch-layout] #viewHost .ops-home-layout { grid-template-columns: minmax(0,1fr); }
}

@media (min-width: 768px) and (max-width: 1279px), (min-width: 768px) and (pointer: coarse) and (max-width: 1440px) {
  body:is([data-route="environment"],[data-route="ai/anomaly"])[data-touch-layout] #viewHost :is(.environment-monitor-table,.energy-task-table) { display: block; width: 100%; min-width: 0; }
  body:is([data-route="environment"],[data-route="ai/anomaly"])[data-touch-layout] #viewHost :is(.environment-monitor-table,.energy-task-table) thead { display: none; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table tbody { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; width: 100%; min-width: 0; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table tbody { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 12px; width: 100%; min-width: 0; }
  body:is([data-route="environment"],[data-route="ai/anomaly"])[data-touch-layout] #viewHost :is(.environment-monitor-table,.energy-task-table) tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; min-width: 0; height: auto; }
  body:is([data-route="environment"],[data-route="ai/anomaly"])[data-touch-layout] #viewHost :is(.environment-monitor-table,.energy-task-table) td[data-touch-label] { display: block; width: auto; min-width: 0; height: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body:is([data-route="environment"],[data-route="ai/anomaly"])[data-touch-layout] #viewHost :is(.environment-monitor-table,.energy-task-table) td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body:is([data-route="environment"],[data-route="ai/anomaly"])[data-touch-layout] #viewHost :is(.environment-monitor-table,.energy-task-table) td:last-child { grid-column: 1 / -1; }
}

@media (min-width: 1080px) and (max-width: 1279px), (min-width: 1080px) and (pointer: coarse) and (max-width: 1440px) {
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-status {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1.2fr);
    gap: 12px 20px;
    align-items: start;
  }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-temp-row { grid-column: 1; grid-row: 1 / span 4; align-self: start; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-panel-section-status > .panel-title { grid-column: 2; grid-row: 1; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-power-row { grid-column: 2; grid-row: 2; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-section { grid-column: 2; }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-grid.five { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body[data-route="ac-control"][data-touch-layout] #viewHost .control-tile-grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 767px) {
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members table,
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members tbody { display: block; width: 100%; min-width: 0; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members thead { display: none; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 10px 0; padding: 12px; border: 1px solid var(--touch-line); border-radius: 12px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members td[data-member-label] { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-members td[data-member-label]::before { content: attr(data-member-label); display: block; color: var(--touch-muted); margin-bottom: 4px; font-size: 12px; }
  body[data-route="operations"][data-touch-layout] #viewHost .ops-home-right > .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-time-scale { display: none; }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-time-lane { grid-template-columns: minmax(0,1fr); }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-time-lane-track { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; min-width: 0; height: auto; padding: 8px 0; }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-timeline-marker { position: static; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-width: 44px; min-height: 44px; width: auto; height: auto; padding: 8px; transform: none; }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-timeline-marker::before { position: static; flex: 0 0 7px; transform: none; }
  body[data-route="command-events"][data-touch-layout] #viewHost .event-timeline-marker span { display: block; position: static; transform: none; }
  body:is([data-route="platform/smart-box-onboarding"],[data-route="smart-box-onboarding"])[data-touch-layout] #viewHost .smartbox-form { grid-template-columns: minmax(0,1fr); }
  body[data-shell="platform"][data-touch-layout] .topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  body[data-shell="platform"][data-touch-layout] .topbar-actions { display: contents; }
  body[data-shell="platform"][data-touch-layout] .platform-topbar-brand { grid-column: 1; grid-row: 1; }
  body[data-shell="platform"][data-touch-layout] .touch-account-menu { grid-column: 2; grid-row: 1; }
  body[data-shell="platform"][data-touch-layout] .customer-context-switcher { grid-column: 1 / -1; grid-row: 2; }
  body[data-shell="platform"][data-touch-layout] .topbar-actions > .project-switcher { grid-column: 1 / -1; grid-row: 3; }
  body[data-shell="platform"][data-touch-layout] #viewHost :is(.customer-profile-stepper,.customer-setup-stepper) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body:is([data-route="platform/tenants"],[data-route="platform/onboarding"])[data-touch-layout] #viewHost :is(.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) tbody { grid-template-columns: minmax(0,1fr); }
  body[data-shell="business"]:is([data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.daily-ledger-layout,.runtime-ledger-layout) { grid-template-columns: minmax(0,1fr) !important; }
  body[data-route="runtime-records"][data-touch-layout] #viewHost .runtime-layout > :is(.runtime-tree,.runtime-main) { grid-column: auto; grid-row: auto; }
  body:is([data-route="daily-usage"],[data-route="runtime-records"])[data-touch-layout] #viewHost :is(.daily-building-tree,.runtime-tree) { min-height: 0; max-height: 260px; overflow: auto; }
  body[data-route="runtime-records"][data-touch-layout] #viewHost .runtime-date-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="prepaid-tenants"][data-touch-layout] #viewHost .tenant-account-drawer { width: 100%; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-toolbar > label { min-width: 0; width: auto; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-toolbar > label:first-child { grid-column: 1 / -1; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-toolbar > button { width: auto; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-add { grid-column: 1 / -1; }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px; }
  body:is([data-route="customers"],[data-route="gateway-channels"])[data-touch-layout] #viewHost :is(.subaccount-table,.environment-device-table) tbody { grid-template-columns: minmax(0,1fr); }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-form-grid { grid-template-columns: minmax(0,1fr); }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-permissions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="customers"][data-touch-layout] #viewHost .subaccount-permissions label { min-height: 44px; display: flex; align-items: center; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-layout { grid-template-columns: minmax(0,1fr); }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-summary { padding: 16px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-summary-heading p { margin-bottom: 10px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-metrics { gap: 8px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-summary-metric { padding: 4px 0; gap: 6px; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .ai-strategy-toolbar > input { grid-column: 1 / -1; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-modal-body { grid-template-columns: minmax(0,1fr); }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-date-range { grid-template-columns: minmax(0,1fr); }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-week-grid { display: flex; flex-wrap: wrap; }
  body[data-route="ai/strategy"][data-touch-layout] #viewHost .strategy-week-grid label { display: inline-flex; align-items: center; min-height: 44px; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-command-actions { width: 100%; display: flex; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-command-actions > button { flex: 1; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table,
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table tbody { display: block; width: 100%; min-width: 0; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table thead { display: none; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 12px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; background: #fff; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table td[data-touch-label] { display: block; width: auto; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 6px; color: var(--touch-muted); font-size: 12px; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .energy-task-table td:last-child { grid-column: 1 / -1; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-modal-body { grid-template-columns: minmax(0,1fr); overflow: auto; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost :is(.energy-time-grid,.energy-valid-range) { grid-template-columns: minmax(0,1fr); }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-week-grid { display: flex; flex-wrap: wrap; gap: 8px; }
  body[data-route="ai/anomaly"][data-touch-layout] #viewHost .strategy-week-grid > label { min-height: 44px; display: inline-flex; align-items: center; }
  body[data-shell][data-touch-layout] #viewHost .touch-filter-menu { display: block; margin: 12px 0; }
  body[data-shell][data-touch-layout] #viewHost .touch-filter-menu > summary { display: list-item; min-height: 44px; padding: 12px 16px; border: 1px solid var(--touch-line); border-radius: 12px; background: #fff; color: var(--touch-ink); cursor: pointer; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table,
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table tbody { display: block; width: 100%; min-width: 0; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table thead { display: none; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 12px; padding: 16px; border: 1px solid var(--touch-line); border-radius: 16px; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table td[data-touch-label] { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; color: var(--touch-ink); }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table td[data-touch-label]::before { content: attr(data-touch-label); display: block; margin-bottom: 4px; color: var(--touch-muted); font-size: 12px; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-monitor-table td:last-child { grid-column: 1 / -1; }
  body[data-route="environment"][data-touch-layout] #viewHost .environment-link-action { min-height: 44px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row > div:first-of-type { grid-column: 1 / -1; padding-right: 44px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-row > .group-ledger-toggle { grid-column: 2; z-index: 1; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-ledger-detail,
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-rail-content { grid-template-columns: minmax(0,1fr); }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-editor-panel { width: calc(100vw - 24px); min-height: 0; max-width: none; max-height: calc(100dvh - 24px); overflow: auto; padding: 14px; }
  body[data-route="control-groups"][data-touch-layout] #viewHost .group-editor-body { grid-template-columns: minmax(0,1fr); }
  body[data-shell="business"][data-touch-layout] { --touch-nav-height: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body[data-shell="business"][data-touch-layout] .platform-shell { display: block; }
  body[data-shell="business"][data-touch-layout] .sidebar,
  body[data-shell="business"][data-touch-layout] .business-sidebar-content { display: contents; }
  body[data-shell="platform"][data-touch-layout] .topbar > .business-brand { display: none; }
  body[data-shell="business"][data-touch-layout] .topbar > .business-brand {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
    width: 44px;
    gap: 0;
  }
  body[data-shell="business"][data-touch-layout] .topbar > .business-brand strong {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    font-size: 16px;
    white-space: nowrap;
  }
  body[data-shell="business"][data-touch-layout] .topbar > .business-brand .business-brand-initial { display: none; }
  body[data-shell="business"][data-touch-layout] .business-primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    margin: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--touch-line);
    background: #fff;
  }
  body[data-shell="business"][data-touch-layout] .business-primary-nav button { min-height: 62px; padding: 6px 0; }
  body[data-shell="business"][data-touch-layout] .business-nav-label { font-size: 11px; }
  body[data-shell="business"][data-touch-layout] .main { padding: 0 12px calc(var(--touch-nav-height) + 20px); }
  body[data-shell="business"][data-touch-layout] .topbar { margin-inline: -12px; padding: 10px 12px; }
  body[data-shell][data-touch-layout] .topbar-actions { justify-content: flex-start; }
  body[data-shell][data-touch-layout] .topbar-actions > .project-switcher { flex-basis: 100%; max-width: none; order: -1; }
  body[data-shell][data-touch-layout] .customer-context-switcher { flex: 1 1 100%; }
  body[data-shell][data-touch-layout] .touch-account-menu { margin-left: auto; }
  body[data-shell="business"][data-touch-layout] .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto;
    gap: 8px;
    align-items: center;
  }
  body[data-shell="business"][data-touch-layout] .topbar-actions { display: contents; }
  body[data-shell="business"][data-touch-layout] .topbar-actions > .project-switcher { grid-column: 2; grid-row: 1; }
  body[data-shell="business"][data-touch-layout] .touch-account-menu { grid-column: 3; grid-row: 1; }
  body[data-shell="business"][data-touch-layout] .customer-context-switcher {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 6px;
    grid-column: 1 / 3;
    grid-row: 2;
  }
  body[data-shell="business"][data-touch-layout] #customerContextMessage { grid-column: 1 / -1; }
  body[data-shell="business"][data-touch-layout] #customerContextMessage:empty { display: none; }
  body[data-shell="business"][data-touch-layout] .admin-access-menu { grid-column: 3; grid-row: 2; }
  body[data-shell="business"][data-touch-layout] .project-edit-popover { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
  body[data-shell="business"][data-touch-layout] .view-host { padding-top: 12px; }
  body[data-shell="business"][data-touch-layout] .view-host :is(button, a, summary, input, select, textarea, [role="button"]) {
    scroll-margin-top: 20px;
    scroll-margin-bottom: calc(var(--touch-nav-height) + 20px);
  }
  /* The AC device/batch/lock switch is local navigation, not a second bottom dock. */
  body[data-shell="business"][data-touch-layout][data-route="ac-control"] #viewHost { display: flex; flex-direction: column; }
  body[data-shell="business"][data-touch-layout][data-route="ac-control"] #viewHost .mobile-control-bar {
    position: relative;
    inset: auto;
    order: -1;
    z-index: 10;
    margin-bottom: 12px;
    padding: 6px;
    border-radius: 12px;
    box-shadow: none;
  }
  body[data-shell="business"][data-touch-layout][data-route="ac-control"] { --ac-mobile-nav-clearance: var(--touch-nav-height); padding-bottom: 0; }
}

/* R1: confirmed platform dock/rail and summary hierarchy; desktop chrome is untouched. */
body[data-shell="business"] .main > .platform-title-stack { display: none; }
@media (max-width: 1279px), (pointer: coarse) and (max-width: 1440px) {
  /* The existing card renderers keep all facts; labels need not consume a second line each. */
  body[data-shell][data-skin][data-touch-layout] #viewHost :is(.subaccount-table,.fault-record-table,.event-table,.read-table,.run-table,.use-table,.tenant-table,.environment-device-table,.environment-monitor-table,.energy-task-table,.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) tbody tr { gap: 10px 12px; padding: 14px; align-items: start; }
  body[data-shell][data-skin][data-touch-layout] #viewHost :is(.subaccount-table,.fault-record-table,.event-table,.read-table,.run-table,.use-table,.tenant-table,.environment-device-table,.environment-monitor-table,.energy-task-table,.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) td[data-touch-label] { height: auto; min-height: 0; font-size: 13px; line-height: 1.6; }
  body[data-shell][data-skin][data-touch-layout] #viewHost :is(.subaccount-table,.fault-record-table,.event-table,.read-table,.run-table,.use-table,.tenant-table,.environment-device-table,.environment-monitor-table,.energy-task-table,.tenant-ledger-table,.tenant-ledger-compact,.platform-simple-table) td[data-touch-label]::before { display: inline; margin: 0 8px 0 0; line-height: inherit; }
  body[data-shell][data-skin][data-touch-layout] #viewHost .subaccount-table td.subaccount-actions { gap: 6px 12px; }
  body[data-shell][data-skin][data-touch-layout] #viewHost .subaccount-table td.subaccount-actions::before { flex-basis: 100%; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-timeline-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 12px; padding: 14px; align-items: start; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-row-title { grid-column: 1 / -1; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-row-title :is(strong,small) { white-space: normal; overflow-wrap: anywhere; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-row-title strong { font-size: 16px; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-row-meta :is(span,small) { white-space: normal; overflow-wrap: anywhere; }
  body[data-shell="business"][data-skin="light"][data-route="schedules"][data-touch-layout] #viewHost .schedule-actions { grid-column: 1 / -1; padding-top: 4px; border-top: 1px solid var(--touch-line); }
  body[data-responsive][data-shell="platform"][data-touch-layout] .platform-shell { display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: start; --sidebar-width: 88px; }
  body[data-responsive][data-shell="platform"][data-touch-layout] .sidebar,
  body[data-shell="platform"][data-touch-layout] .platform-menu-toggle,
  body[data-shell="platform"][data-touch-layout] .platform-mobile-scrim { display: none; }
  body[data-shell="platform"][data-touch-layout] .platform-shell > .main { grid-column: 2; grid-row: 1; margin: 0; padding: 0; background: var(--touch-paper); }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav {
    display: flex; flex-direction: column; gap: 8px; grid-column: 1; grid-row: 1;
    position: sticky; top: 0; width: 88px; height: 100dvh; overflow-y: auto;
    padding: 20px 10px; background: #fff; border-right: 1px solid var(--touch-line); z-index: 61;
  }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav :is(button,a) {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    flex: 0 0 auto; min-height: 62px; padding: 8px 4px; border: 0; border-radius: 10px;
    background: transparent; color: var(--touch-muted); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.5; text-decoration: none; box-shadow: none;
  }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav :is(button,a) > span { font: 22px/1.1 system-ui,sans-serif; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav .active,
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav :is(button,a):hover { color: var(--touch-blue); background: #eaf1ff; }
  body[data-shell="platform"][data-touch-layout] :is(.platform-touch-nav,.platform-touch-menu) [hidden] { display: none !important; }
  body[data-shell="platform"][data-touch-layout] :is(.platform-touch-nav,.platform-touch-menu) :focus-visible { outline: 3px solid var(--touch-blue); outline-offset: -3px; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu {
    width: min(580px,calc(100% - 32px)); max-width: 100%; max-height: 85dvh;
    inset: 0; margin: auto; padding: 20px; border: 1px solid var(--touch-line); border-radius: 20px;
    color: var(--touch-ink); background: #fff; box-shadow: 0 12px 60px #12223833;
  }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu::backdrop { background: #12223870; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu h2 { margin: 0; font-size: 20px; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu [data-platform-touch-close] { min-width: 44px; min-height: 44px; border: 1px solid var(--touch-line); border-radius: 10px; background: #fff; color: var(--touch-ink); font-size: 24px; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu .side-nav { display: grid; gap: 12px; padding: 0; max-height: none; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu .nav-group-title { color: var(--touch-muted); margin: 0 0 8px; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .nav-group:not(:has([data-route]:not([hidden]),a[href])) { display: none; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .nav-box { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0; background: transparent; border: 0; min-width: 0; width: 100%; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .nav-box > button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; width: 100%; min-height: 48px; padding: 10px; white-space: normal; text-align: left; color: var(--touch-ink); background: var(--touch-paper); border: 0; border-radius: 10px; box-shadow: none; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .nav-box > button.active { color: var(--touch-blue); background: #eaf1ff; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .nav-box > button.active::before { display: none; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .nav-icon { flex: 0 0 22px; color: inherit; }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .gate-box { grid-template-columns: minmax(0,1fr); }
  body[data-responsive][data-shell="platform"][data-touch-layout] #platformTouchMenu .gate-link { display: flex; justify-content: flex-start; min-width: 0; min-height: 44px; padding: 12px; color: var(--touch-ink); border: 1px solid var(--touch-line); border-radius: 10px; background: var(--touch-paper); }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu .gate-link small { color: var(--touch-muted); }
  body[data-shell="platform"][data-touch-layout] .platform-topbar-brand { flex: 0 0 auto; }
  body[data-shell="platform"][data-touch-layout] .topbar { gap: 12px; }
  body[data-shell="platform"][data-touch-layout] .customer-context-switcher { max-width: 360px; }
  body[data-shell="platform"][data-touch-layout] #customerContextMessage:empty { display: none; }
  body[data-shell="platform"][data-touch-layout] .main > .platform-title-stack { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; padding: 20px 24px 16px; }
  body[data-shell="platform"][data-touch-layout] .platform-title-stack h2 { margin: 0; font-size: 28px; line-height: 1.3; color: var(--touch-ink); }
  body[data-shell="platform"][data-touch-layout] .platform-title-stack .breadcrumb { display: block; color: var(--touch-muted); font-size: 13px; }
  body[data-shell="platform"][data-touch-layout] .platform-topbar-status:not([hidden]) { display: flex; grid-column: 1; grid-row: auto; width: fit-content; max-width: 100%; margin-top: 8px; white-space: normal; }
  body[data-shell="platform"][data-touch-layout] .view-host { padding: 0 24px 32px; background: var(--touch-paper); }
  body[data-shell="platform"][data-touch-layout] .platform-secondary-nav { display: flex; gap: 8px; padding: 0 0 12px; margin: 0; max-width: 100%; overflow-x: auto; border: 0; }
  body[data-shell="platform"][data-touch-layout] .platform-secondary-nav button { flex: 0 0 auto; width: auto; min-height: 44px; padding: 10px 14px; border: 1px solid var(--touch-line); border-radius: 10px; color: var(--touch-muted); background: #fff; font-size: 13px; }
  body[data-shell="platform"][data-touch-layout] .platform-secondary-nav button.active { color: var(--touch-blue); background: #eaf1ff; border-color: #c8dafd; }
  body[data-shell="platform"][data-touch-layout] .platform-page { gap: 16px; }
  body[data-shell="platform"][data-touch-layout] .kpi-grid.platform-kpi-four { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
  body[data-shell="platform"][data-touch-layout] .kpi { padding: 16px; min-height: 0; border: 1px solid var(--touch-line); border-radius: 14px; box-shadow: none; }
  body[data-shell="platform"][data-touch-layout] .kpi-label { font-size: 13px; color: var(--touch-muted); }
  body[data-shell="platform"][data-touch-layout] .kpi-value { margin-top: 8px; font-size: clamp(22px,2.6vw,30px); line-height: 1.3; overflow-wrap: normal; white-space: nowrap; color: var(--touch-ink); }
  body[data-shell="platform"][data-touch-layout] .kpi-note { font-size: 12px; color: var(--touch-muted); }
  body[data-shell="platform"][data-touch-layout] .kpi-action { min-height: 44px; color: #1555c5; background: #eaf1ff; border-color: #c8dafd; }
  body[data-shell="platform"][data-touch-layout] .platform-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
  body[data-shell="platform"][data-touch-layout] .platform-overview-grid > .panel { grid-column: auto; width: auto; min-width: 0; }
  body[data-shell="platform"][data-touch-layout] .platform-overview-grid > .platform-advanced { grid-column: 1 / -1; }
  body[data-shell="platform"][data-touch-layout] .platform-page .panel { padding: 18px; border: 1px solid var(--touch-line); border-radius: 16px; box-shadow: none; }
}
@media (max-width: 767px) {
  body[data-responsive][data-shell="platform"][data-touch-layout] .platform-shell { display: block; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; display: grid;
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 2px; width: 100%; height: auto;
    padding: 6px 8px max(8px,env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--touch-line); z-index: 100;
  }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav button { min-height: 54px; padding: 6px 0; font-size: 12px; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-nav .platform-touch-return { display: none; }
  body[data-shell="platform"][data-touch-layout] .platform-touch-menu { inset: auto 0 0; width: 100%; max-height: 90dvh; margin: 0; border-radius: 22px 22px 0 0; padding: 20px 16px max(24px,env(safe-area-inset-bottom)); }
  body[data-shell="platform"][data-touch-layout] .main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  body[data-shell="platform"][data-touch-layout] .main > .platform-title-stack { padding: 20px 16px 16px; }
  body[data-shell="platform"][data-touch-layout] .platform-title-stack h2 { font-size: 26px; }
  body[data-shell="platform"][data-touch-layout] .customer-context-switcher { max-width: none; }
  body[data-shell="platform"][data-touch-layout] .view-host { padding: 0 16px calc(88px + env(safe-area-inset-bottom)); }
  body[data-shell="platform"][data-touch-layout] .kpi-grid.platform-kpi-four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-shell="platform"][data-touch-layout] .kpi-value { font-size: 27px; }
  body[data-shell="platform"][data-touch-layout] .platform-overview-grid { grid-template-columns: minmax(0,1fr); }
  body[data-shell="platform"][data-touch-layout] #viewHost :is(button,a,input,select,textarea,summary) { scroll-margin-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
