/* Phone compositions share interaction sizes, not a visual theme. */
.phone-workspace-tabs,.workflow-save-short { display: none; }
.sc-phone-tools,.rv-phone-stages,.catalogue-phone-controls { display: none; }
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  .catalogue-phone-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block: 12px; }
  .catalogue-phone-controls button { min-height: 44px; padding: 8px 12px; border: 1px solid #aebbe5; border-radius: 6px; color: #19375d; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
  .catalogue-phone-controls button:disabled { opacity: .45; cursor: default; }
  .catalogue-phone-controls > span { font-size: 11px; color: #52647f; text-align: center; }
  .home-showcase { height: auto; display: grid; grid-template-columns: 1fr; gap: 14px; padding-top: 28px; perspective: none; }
  .home-showcase .showcase-index { left: 0; top: 0; font-size: 9px; }
  .home-showcase .showcase-browser { position: relative; inset: auto; width: 100%; height: 300px; min-height: 300px; transform: none; margin: 0 0 4px; }
  .home-showcase .showcase-browser:hover { transform: none; }
  .home-showcase .showcase-workflow { position: relative; inset: auto; width: 100%; min-width: 0; padding: 18px; transform: none; }
  .home-showcase .showcase-workflow-label { font-size: 10px; }
  .home-showcase .showcase-workflow-label i { font-size: 9px; }
  .home-showcase .showcase-workflow > div { font-size: 14px; gap: 12px; }
  .home-showcase .showcase-workflow > div strong { font-size: 16px; line-height: 1.4; }
  .home-showcase .showcase-flow-end { font-size: 12px; }
  .home-showcase .showcase-talent { position: relative; inset: auto; width: 100%; transform: none; padding: 16px; }
  .home-showcase .showcase-talent > span,.home-showcase .showcase-talent strong { font-size: 14px; line-height: 1.4; }
  .home-showcase .showcase-caption { position: static; justify-self: end; font-size: 11px; margin-top: 4px; }
  .service-page main :is(select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])) {
    font-size: 16px;
    max-width: 100%;
    min-width: 0;
  }
  .service-page main :is(.control-toolbar, .workflow-entry, .rv-workspace, .sc-app-toolbar) { min-width: 0; }
  .ai-control.workflow-presentation .control-toolbar { gap: 8px; padding: 12px; }
  .ai-control.workflow-presentation .control-toolbar :is(button, summary, select) { min-height: 44px; font-size: 13px; }
  .ai-control.workflow-presentation .control-toolbar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .ai-control.workflow-presentation .workflow-preset-label { grid-column: 1/-1; display: block; min-width: 0; font-size: 0; }
  .ai-control.workflow-presentation .workflow-preset-label select { width: 100%; max-width: none; font-size: 16px; }
  .ai-control.workflow-presentation .control-toolbar > #edit-workflow,
  .ai-control.workflow-presentation .control-toolbar > .workflow-edit-tools,
  .ai-control.workflow-presentation .control-toolbar > .focus-tool { margin: 0; width: 100%; min-width: 0; }
  .ai-control.workflow-presentation .control-toolbar > .focus-tool { font-size: 12px; padding: 6px; }
  .ai-control.workflow-presentation .control-toolbar > .workflow-edit-tools > summary { display: flex; align-items: center; justify-content: center; padding: 7px 5px; font-size: 12px; white-space: normal; }
  .ai-control.workflow-presentation .control-toolbar .workflow-edit-tools .board-toolbar-actions { flex-wrap: wrap; min-width: 0; }
  .ai-control.workflow-presentation:not(.robot-assembling) .control-toolbar > .ra-controls { display: none; }
  .ai-control.workflow-presentation.board-focused .workflow-entry { display: none; }
  .ai-control.workflow-presentation.board-focused .workflow-recovery { display: none; }
  body.theme-ai:not([data-world=robots]) .ai-control.workflow-presentation.board-focused > .control-grid { flex: 1 1 0; height: auto; min-height: 0; overflow-y: auto; }
  body.theme-ai:not([data-world=robots]) .ai-control.workflow-presentation.board-focused .workflow-area { height: auto; min-height: 0; overflow: visible; }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused:not(.robot-assembling) .robot-board-viewport > .workflow-entry.workflow-example { display: none; }
  .ai-control:has(.planner-view-label select option[value="steps"]:checked) .canvas-zoom { display: none; }
  .ai-control.workflow-presentation .workflow-entry-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .ai-control.workflow-presentation .workflow-entry-actions button { min-height: 46px; padding: 10px; font-size: 14px; white-space: normal; }
  .ai-control.workflow-presentation .canvas-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 6px 10px; min-height: 58px; }
  .ai-control.workflow-presentation .canvas-label > span:first-child { display: none; }
  .ai-control.workflow-presentation .canvas-label .planner-view-label { display: flex; align-items: center; margin: 0; padding: 0; font-size: 0; flex: 0 1 112px; min-width: 90px; }
  .ai-control.workflow-presentation .canvas-label .planner-view-label select { width: 100%; max-width: 112px; min-height: 44px; padding: 7px; font-size: 14px; }
  .ai-control.workflow-presentation .canvas-zoom { margin: 0 0 0 auto; gap: 0; }
  .ai-control.workflow-presentation .canvas-zoom strong { display: none; }
  .ai-control.workflow-presentation .canvas-zoom button { min-width: 40px; height: 44px; font-size: 16px; }
  .ai-control.workflow-presentation .canvas-zoom output { min-width: 36px; font-size: 12px; }
  .ai-control.workflow-presentation .workflow-canvas { height: clamp(360px, 58svh, 540px); min-height: 360px; }
  .ai-control.workflow-presentation .node-port::before { inset: -13px; }
  .ai-control.workflow-presentation .planner-readable { max-height: none; overflow: visible; }
  .ai-control.workflow-presentation .planner-readable article { padding: 16px; }
  .ai-control.workflow-presentation .planner-readable article > button { min-height: 48px; text-align: left; }
  .ai-control.workflow-presentation .workflow-navigation-hint { font-size: 12px; }
  .ai-control.workflow-presentation .workflow-navigation-hint p { font-size: 12px; line-height: 1.5; }
  .ai-control.workflow-presentation .planner-request-bar { gap: 8px; padding: 12px; }
  .ai-control.workflow-presentation .planner-request-bar button { min-height: 44px; font-size: 13px; }

  /* Focus is the working screen. The site masthead must not consume its space. */
  body.ai-board-open > .site-header { visibility: hidden; pointer-events: none; }
  body.theme-ai .ai-control.workflow-presentation.board-focused,
  body.theme-ai .ai-control.workflow-presentation.board-focused.robot-dock-present {
    position: fixed; inset: 0; top: 0; width: 100%; height: 100dvh;
    max-height: none; max-width: none; margin: 0; border-radius: 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box; z-index: 2000; overflow: hidden;
  }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused.robot-dock-compact > .control-top {
    height: 104px; min-height: 104px; padding: 12px; display: flex; align-items: flex-start;
  }
  body[data-world=robots] .ai-control.board-focused .control-brand { gap: 10px; align-items: center; }
  body[data-world=robots] .ai-control.board-focused .control-brand h2 { font-size: 16px; line-height: 1.3; white-space: normal; }
  body[data-world=robots] .ai-control.board-focused .control-brand .robot-core { width: 36px; height: 36px; min-width: 36px; }
  body[data-world=robots] .ai-control.board-focused.robot-dock-compact .control-actions {
    position: absolute; bottom: 9px; left: 12px; width: auto; min-height: 0;
    margin: 0; flex-basis: auto; gap: 8px;
  }
  body[data-world=robots] .ai-control.board-focused .control-actions .small-button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
  body[data-world=robots] .ai-control.board-focused > .robot-board-viewport { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
  body[data-world=robots] .ai-control.board-focused .robot-board-viewport > .control-grid { height: auto; min-height: 0; overflow: visible; }
  body[data-world=robots] .ai-control.board-focused .robot-board-viewport .workflow-canvas { height: clamp(340px, 54dvh, 520px); min-height: 340px; }
  body[data-world=robots] .ai-control.board-focused .library-heading,
  body[data-world=robots] .ai-control.board-focused .inspector-heading { min-height: 48px; padding: 7px 12px; }
  body[data-world=robots] .ai-control.board-focused .library-content { max-height: 300px; overflow-y: auto; }
  body[data-world=robots] .ai-control.board-focused .panel-toggle { width: 38px; height: 38px; }
  body[data-world=robots] .ai-control.board-focused .rw-crew-strip { min-height: 40px; padding: 6px 10px; }
  body[data-world=robots] .ai-control.board-focused .rw-crew-message { font-size: 11px; max-width: 220px; }
  body[data-world=robots] .ai-control.board-focused .rw-crew-caption > strong { display: none; }
  body[data-world=robots] .ai-control.board-focused .rw-crew-strip button { min-height: 36px; font-size: 11px; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .robot-board-viewport > .control-grid { flex: 1 1 0; height: 100%; overflow: hidden; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .workflow-area { flex: 1 1 0; min-height: 0; overflow: hidden; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .robot-board-viewport .workflow-canvas { flex: 1 1 0; height: auto; min-height: 0; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .library-content { padding: 4px 10px; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .node-library { padding-bottom: 0; grid-auto-columns: 160px; max-height: 60px; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .library-item { min-height: 56px; padding: 6px 9px; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .library-item strong { font-size: 12px; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .library-item small { display: none; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .planner-view-label { visibility: hidden; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .canvas-label { display: none; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .ra-progress { display: none; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .workflow-preset-label { font-size: 0; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .workflow-preset-label select { font-size: 14px; }
  body[data-world=robots] .ai-control.board-focused .ra-progress { font-size: 11px; line-height: 1.4; }

  /* Keep the character recognisable without putting it across module controls. */
  body.ai-board-open #ai-guide { z-index: 2200; right: 8px; bottom: max(8px,env(safe-area-inset-bottom)); width: min(360px,calc(100vw - 16px)); }
  body.ai-board-open #ai-guide .guide-teaser { display: none; }
  body.ai-board-open #ai-guide .guide-launch { width: 76px; min-height: 94px; }
  body.ai-board-open #ai-guide :is(.guide-character,.guide-character-rig) { width: 70px; height: 78px; }
  body.ai-board-open #ai-guide .guide-launch-label { font-size: 9px; padding: 4px 7px; }
  body.ai-board-open #ai-guide .guide-panel { max-height: calc(100dvh - 145px); }

  /* Reserve the guide's space, so its hit target never covers board actions. */
  body.theme-ai { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.theme-ai .ai-control.workflow-presentation.board-focused,
  body.theme-ai .ai-control.workflow-presentation.board-focused.robot-dock-present { bottom: calc(64px + env(safe-area-inset-bottom)); height: calc(100dvh - 64px - env(safe-area-inset-bottom)); }
  body.theme-ai #ai-guide.ai-guide { right: 0; left: 0; bottom: 0; width: 100%; padding-bottom: env(safe-area-inset-bottom); }
  body.theme-ai #ai-guide.ai-guide .guide-character-dock { height: 64px; align-items: center; justify-content: flex-end; padding-right: 8px; border-top: 1px solid #749bb34d; background: #0b1d30f5; }
  body.theme-ai #ai-guide.ai-guide .guide-launch { flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; width: 192px; height: 64px; min-height: 64px; border-radius: 0; }
  body.theme-ai #ai-guide.ai-guide :is(.guide-character,.guide-character-rig) { flex: 0 0 52px; width: 52px; height: 58px; }
  body.theme-ai #ai-guide.ai-guide .guide-launch-label { display: block; position: static; width: auto; height: auto; clip: auto; overflow: visible; font-size: 11px; padding: 8px 10px; white-space: normal; }
  body.theme-ai #ai-guide.ai-guide .guide-launch-label::before { content: 'Hello. '; }
  body.theme-ai[data-world=robots] #ai-guide.ai-guide .guide-launch-label::before { content: 'Oi, meatbag. '; }
  body.theme-ai #ai-guide.ai-guide .guide-motion-toggle { right: 210px; left: auto; bottom: 11px; width: 42px; height: 42px; }
  body.theme-ai #ai-guide.ai-guide .guide-speech-shell { margin: 0 8px 8px; }
  body.theme-ai #ai-guide.ai-guide .guide-panel { max-height: calc(100dvh - 90px); }
  body.theme-ai #ai-guide.ai-guide .guide-teaser { display: none; }

  /* App content gets the phone width; the computer bezel remains a thin frame. */
  .sc-device.application-window.sc-device--expanded { inset: 0; padding: 0 4px; border-radius: 0; height: 100dvh; box-sizing: border-box; }
  .sc-device.application-window.sc-device--expanded::after { border-radius: 0; }
  .sc-device--expanded .sc-bezel { height: 40px; padding: 0 10px; }
  .sc-device--expanded .sc-device-foot { height: 20px; }
  .sc-app-toolbar { display: grid; grid-template-columns: 82px minmax(0,1fr) 74px; gap: 8px; padding: 8px; align-items: center; }
  .sc-device--expanded .sc-app-toolbar { gap: 8px; padding: 8px; }
  .sc-device--expanded .sc-app-toolbar > button { min-height: 40px; font-size: 12px; }
  .sc-app-toolbar > div { min-width: 0; }
  .sc-app-toolbar > div strong { font-size: 13px; line-height: 1.35; }
  .sc-app-toolbar > div > span { display: none; }
  .sc-phone-tools { display: block; position: relative; min-width: 0; }
  .sc-phone-tools > summary { cursor: pointer; display: flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid #7891c077; border-radius: 8px; background: #263952; color: #edf2ff; font-size: 12px; }
  .sc-phone-tools > summary::after { content: '⌄'; margin-left: 6px; }
  .sc-phone-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(270px,calc(100vw - 32px)); z-index: 100; padding: 8px; border: 1px solid #6e87ae; border-radius: 10px; background: #15233b; box-shadow: 0 14px 30px #03102066; }
  .sc-phone-menu :is(button,a) { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px; border: 0; border-radius: 5px; background: transparent; color: #edf2ff; font-size: 14px; text-align: left; text-decoration: none; }
  .sc-phone-menu :is(button,a):hover { background: #304766; }
  .sc-phone-menu .icon { width: 18px; height: 18px; flex-shrink: 0; }
  .sc-phone-menu :is(button,a):focus-visible { outline-offset: -2px; }
  .theme-software .ps-app .ps-guide { padding: 12px; margin-block: 14px; }
  .theme-software .ps-app .ps-guide-head { gap: 10px; }
  .theme-software .ps-app .ps-guide-head > div > span { display: none; }
  .theme-software .ps-app .ps-guide-current { gap: 12px; padding-block: 12px; }
  .theme-software .ps-app .ps-guide-current p { font-size: 13px; line-height: 1.55; }
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-body > .ps-tab-row,
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-current p,
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-result > p { display: none; }
  .theme-software .ps-app .ps-guide-result { padding-block: 12px; gap: 8px; }
  .theme-software .ps-app .ps-guide-result .ps-btn { min-height: 44px; padding: 9px 12px; font-size: 13px; }
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-head { padding: 0 0 8px; min-height: 44px; }
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-current { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 0; }
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-current > .ps-btn { min-height: 44px; padding: 8px 12px; }
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-result { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 0; padding: 10px 0; }
  .theme-software .ps-app .ps-guide:has(.ps-guide-result) .ps-guide-outline { margin: 0; padding-top: 4px; }
  .rv-phone-stages { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: end; gap: 8px; margin: 0 4px 14px; }
  .rv-phone-stages label { display: grid; gap: 4px; color: #52667a; font-size: 12px; }
  .rv-phone-stages :is(button,select) { min-height: 44px; border: 1px solid #cfb997; border-radius: 5px; background: #fffdf8; color: #29465a; }
  .rv-phone-stages button { font-size: 21px; cursor: pointer; }
  .rv-phone-stages select { width: 100%; padding: 8px 10px; }
  .recruitment-visual .candidate-board { grid-auto-columns: minmax(220px,calc(100% - 26px)); scroll-snap-type: x mandatory; scroll-padding-inline: 2px; }
  .recruitment-visual .candidate-column { scroll-snap-align: start; }
  .recruitment-visual .candidate-column { min-height: 230px; width: auto; }
  .recruitment-visual .candidate-board { min-height: 230px; align-items: start; }
  .recruitment-visual .candidate-card { min-height: 64px; }
  .recruitment-visual .candidate-card strong { font-size: 15px; }
  .recruitment-visual .candidate-card small { font-size: 12px; }
  .rv-sources { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .rv-sources .rv-source { min-height: 58px; font-size: 13px!important; padding: 9px; gap: 8px; }
  .rv-prospect-list { grid-template-columns: 1fr; max-height: 320px; }
  .rv-prospect-list .rv-prospect { min-height: 72px; padding: 10px; }
  .rv-prospect strong { font-size: 14px; }
  .rv-prospect small { font-size: 12px; }
  .rv-channel { min-height: 48px; }
  .sc-preview-scroll { -webkit-overflow-scrolling: touch; }
  /* Dispatch becomes an agenda on phones; every assignment keeps its real action. */
  .theme-software .do-shell .do-timeline { min-width: 0; padding: 0; }
  .theme-software .do-shell .do-timeline-labels,
  .theme-software .do-shell .do-time-cursor { display: none; }
  .theme-software .do-shell .do-timeline-row { grid-template-columns: 1fr; min-height: 0; gap: 12px; padding: 18px 12px; border-bottom: 1px solid #ced9c4; }
  .theme-software .do-shell .do-timeline-person strong { font-size: 15px; }
  .theme-software .do-shell .do-timeline-person small { font-size: 11px; }
  .theme-software .do-shell .do-timeline-track { display: grid; gap: 8px; height: auto; min-width: 0; border: 0; background: none; }
  .theme-software .do-shell .do-timeline-bar { position: static; inset: auto; width: 100%; min-width: 0; height: auto; min-height: 82px; padding: 12px; overflow: visible; box-sizing: border-box; }
  .theme-software .do-shell .do-timeline-bar :is(b,span,time,small) { white-space: normal; font-size: 13px; }
  .theme-software .do-shell .do-unassigned { padding: 8px 0; font-size: 13px; }
  .theme-software .do-shell .do-timeline-key { padding: 14px 12px; font-size: 11px; }
  .sc-help > summary { min-height: 40px; display: flex; align-items: center; }
  .sc-hardware #software-ufo, .sc-power-key { min-width: 40px; width: 40px; height: 40px; }
}

@media (max-width: 1000px) and (max-height: 500px) {
  body.theme-ai .ai-control.workflow-presentation.board-focused > .control-top { height: 56px; min-height: 56px; padding: 8px 16px; }
  body.theme-ai .ai-control.workflow-presentation.board-focused .control-brand h2 { font-size: 18px; }
  .ai-control.workflow-presentation.board-focused #workflow-preset-label { display: none; }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused.robot-dock-compact > .control-top { height: 56px; min-height: 56px; }
  body[data-world=robots] .ai-control.board-focused.robot-dock-compact .control-actions { left: auto; right: 116px; bottom: 6px; }
  .ai-control.workflow-presentation.board-focused .control-toolbar { display: flex; flex-wrap: nowrap; padding: 6px 12px; max-height: 64px; overflow: auto; flex-shrink: 0; align-items: center; }
  .ai-control.workflow-presentation.board-focused .workflow-preset-label { flex: 1 0 190px; }
  .ai-control.workflow-presentation.board-focused .control-toolbar > :is(button,details,.focus-tool) { flex: 0 0 auto; width: auto; }
  .ai-control.workflow-presentation.board-focused .control-toolbar > #edit-workflow { flex: 0 0 80px; width: 80px; }
  .ai-control.workflow-presentation.board-focused .control-toolbar > .workflow-edit-tools { flex: 0 0 100px; width: 100px; }
  .ai-control.workflow-presentation.board-focused .control-toolbar > .focus-tool { flex: 0 0 90px; width: 90px; }
  .ai-control.workflow-presentation.board-focused .control-toolbar .ra-controls { flex: 0 0 auto; }
  .ai-control.workflow-presentation.board-focused .canvas-label { min-height: 44px; padding: 0 10px; }
  body.theme-ai .ai-control.workflow-presentation.board-focused .workflow-canvas { height: clamp(112px,calc(100dvh - 224px),180px); min-height: 112px; flex: 0 0 auto; }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused:not(.robot-assembling) .robot-board-viewport { display: block; }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused:not(.robot-assembling) .robot-board-viewport > .control-grid { flex: 0 0 auto; grid-template-rows: auto; height: auto; min-height: 0; overflow: visible; }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused:not(.robot-assembling) .robot-board-viewport .workflow-area { height: auto; min-height: 0; overflow: visible; }
  body[data-world=robots] .ai-control.workflow-presentation.board-focused:not(.robot-assembling) .robot-board-viewport .workflow-canvas { height: clamp(112px,calc(100dvh - 224px),180px); min-height: 112px; flex: 0 0 auto; }
  body[data-world=robots] .ai-control.board-focused.robot-assembling .library-item { min-height: 42px; }
}

@media (max-width: 360px) {
  .theme-software .dl-date-nav { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; width: 100%; gap: 8px; }
  .theme-software .dl-date-nav .dl-today { grid-column: 1/-1; justify-self: start; min-height: 44px; }
  .theme-software .dl-date-nav h1 { min-width: 0; white-space: normal; text-align: center; font-size: 19px; line-height: 1.3; }
  .theme-software .dl-date-nav .dl-square { min-width: 44px; min-height: 44px; }
  .theme-software .dl-calendar-actions { display: grid; grid-template-columns: 1fr; width: 100%; gap: 10px; }
  .theme-software .dl-calendar-actions .dl-segment { display: grid; grid-template-columns: 1fr 1fr; }
  .theme-software .dl-calendar-actions .dl-button { min-height: 44px; }
}

/* Keep the diagram, request and result a single reachable phone workspace. */
@media (max-width:760px), (max-width:1000px) and (max-height:500px) {
  .theme-ai .ai-control.wrap { width:calc(100% - 16px); margin-inline:auto; }
  .ai-control.phone-workspace .board-anchor { top:0;scroll-margin-top:8px; }
  .ai-control.phone-workspace:not(.board-focused) { display:flex; flex-direction:column; }
  .ai-control.phone-workspace > .control-top { order:0; }
  .ai-control.phone-workspace > .workflow-entry { order:1; }
  .ai-control.phone-workspace > .control-toolbar { order:2; }
  .ai-control.phone-workspace > .phone-workspace-tabs { order:3; }
  .ai-control.phone-workspace > .control-grid,.ai-control.phone-workspace > .robot-board-viewport { order:4; }
  body[data-world=robots] .ai-control.phone-workspace:not(.board-focused) > .robot-board-viewport { display:flex;flex-direction:column;width:100%;min-width:0; }
  .ai-control.phone-workspace .robot-board-viewport > .workflow-entry { order:0; }
  .ai-control.phone-workspace .robot-board-viewport > .control-grid { order:1; }
  .ai-control.phone-workspace .robot-board-viewport > .workflow-bench { order:2; }
  .ai-control.phone-workspace .robot-board-viewport > :is(.workflow-reference,.workflow-followup,.demo-disclaimer,.board-test-row) { order:3; }
  .ai-control.phone-workspace > .workflow-bench { order:5; }
  .ai-control.phone-workspace > :is(.workflow-reference,.workflow-followup,.workflow-comparison,.workflow-tools,.board-test-row,.demo-disclaimer) { order:6; }
  .ai-control.phone-workspace :is(.control-grid,.workflow-bench,.task-dock,.guide-results)[hidden] { display:none!important; }
  .ai-control.phone-workspace:not([data-phone-panel=result]) #workflow-test { display:none!important; }
  .ai-control.phone-workspace:not(.phone-review-detail) #workflow-test { display:none!important; }
  .ai-control.phone-workspace :is(.workflow-request-follow,#workflow-test) { scroll-margin-top:64px; }
  .phone-workspace-tabs { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px 10px;background:#071a2a;border:1px solid #385971;position:sticky;top:0;z-index:50;flex-shrink:0; }
  .phone-workspace-tabs[hidden] { display:none; }
  .phone-workspace-tabs button { min-width:0;min-height:44px;padding:8px 6px;border:1px solid transparent;border-radius:5px;background:transparent;color:#b9d2e8;font:600 14px/1.2 'DM Sans',sans-serif;cursor:pointer; }
  .phone-workspace-tabs button[aria-pressed=true] { color:#fff;background:#254b70;border-color:#7ccbdd;box-shadow:inset 0 -2px #91e5ef; }
  .phone-workspace-tabs button.needs-review { color:#ffe3a2;border-color:#b99b65; }
  .phone-workspace-tabs button:disabled { opacity:.45;cursor:wait; }
  body[data-world=robots] .phone-workspace-tabs button[aria-pressed=true] { background:#37443c;border-color:#d4bc80;box-shadow:inset 0 -2px #d4bc80; }
  .ai-control.phone-workspace .workflow-bench { margin:0!important;border-top:0;display:block!important; }
  .ai-control.phone-workspace .workflow-inspect-board { display:none; }
  .ai-control.phone-workspace .workflow-bench .task-dock,.ai-control.phone-workspace .workflow-bench .guide-results { padding:16px!important;border:0;max-width:100%; }
  .ai-control.phone-workspace .workflow-bench .task-dock { gap:12px;grid-template-columns:minmax(0,1fr); }
  .ai-control.phone-workspace .workflow-request-heading .workflow-kicker { display:none; }
  .ai-control.phone-workspace .workflow-request-heading h3 { font-size:18px;margin:0 0 6px; }
  .ai-control.phone-workspace .workflow-request-heading p { font-size:13px;line-height:1.5;margin:0; }
  .ai-control.phone-workspace .workflow-request-heading #workflow-intended-review { font-size:12px;margin-top:6px; }
  .ai-control.phone-workspace .workflow-entry.workflow-example { gap:10px;padding:12px; }
  .ai-control.phone-workspace .workflow-example-copy { padding-left:9px; }
  .ai-control.phone-workspace .workflow-example-copy h3 { font-size:15px;margin-bottom:3px; }
  .ai-control.phone-workspace .workflow-example-copy p { font-size:12px;line-height:1.45; }
  .ai-control.phone-workspace .workflow-entry-actions button { font-size:12px;min-height:40px;padding:7px; }
  .ai-control.phone-workspace .workflow-example-copy { flex-basis:100%; }
  .ai-control.phone-workspace .workflow-example-copy > :is(h3,p) { display:none; }
  .ai-control.phone-workspace .workflow-example-copy details { margin:0; }
  .ai-control.phone-workspace .control-top { gap:10px;padding:12px; }
  .ai-control.phone-workspace .control-brand h2 { font-size:19px; }
  .ai-control.phone-workspace .control-brand p { font-size:12px;line-height:1.4; }
  body:not([data-world=robots]) .ai-control.phone-workspace > .control-top { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center; }
  body:not([data-world=robots]) .ai-control.phone-workspace .control-brand { gap:8px; }
  body:not([data-world=robots]) .ai-control.phone-workspace .control-brand,
  body:not([data-world=robots]) .ai-control.phone-workspace .control-brand > div { min-width:0; }
  body:not([data-world=robots]) .ai-control.phone-workspace .control-brand h2 { font-size:16px;white-space:normal;line-height:1.2; }
  body:not([data-world=robots]) .ai-control.phone-workspace .control-brand p,
  body:not([data-world=robots]) .ai-control.phone-workspace .control-actions .demo-label { display:none; }
  body:not([data-world=robots]) .ai-control.phone-workspace .control-actions { width:auto;gap:4px; }
  body:not([data-world=robots]) .ai-control.phone-workspace .control-actions .small-button { font-size:12px;padding:8px; }
  .ai-control.phone-workspace .workflow-recovery { display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:10px;font-size:12px; }
  .ai-control.phone-workspace .workflow-recovery :is(strong,span) { grid-column:1/-1;line-height:1.4; }
  .ai-control.phone-workspace .workflow-recovery span { font-size:11px; }
  .ai-control.phone-workspace .workflow-recovery button { min-height:40px;padding:6px;font-size:12px; }
  .ai-control.phone-workspace .control-toolbar { padding:8px;gap:6px; }
  .ai-control.phone-workspace .control-toolbar :is(button,summary) { white-space:nowrap;line-height:1.25;min-width:0;font-size:13px; }
  .ai-control.phone-workspace .workflow-save-short { display:inline; }
  .ai-control.phone-workspace .workflow-save-label { display:none; }
  .ai-control.phone-workspace .control-toolbar .workflow-edit-tools > summary { justify-content:center;gap:6px;padding:8px 5px;font-size:13px; }
  .ai-control.phone-workspace .control-toolbar > .focus-tool { font-size:12px;padding-inline:4px; }
  .ai-control.phone-workspace .focus-tool > .icon { display:none; }
  .ai-control.phone-workspace select { height:44px;min-height:44px;padding:8px 28px 8px 10px;font:16px/1.25 'DM Sans',sans-serif;letter-spacing:normal;text-transform:none;text-overflow:ellipsis;white-space:nowrap; }
  .ai-control.phone-workspace .workflow-preset-label > span { display:none; }
  .ai-control.phone-workspace.library-collapsed:not(.robot-assembling) .module-library { display:none; }
  .ai-control.phone-workspace.inspector-collapsed .ai-inspector { display:none; }
  .ai-control.phone-workspace .canvas-label { min-height:52px;padding:4px 8px;gap:4px; }
  .ai-control.phone-workspace .canvas-label .planner-view-label { flex-basis:104px; }
  .ai-control.phone-workspace .canvas-label .planner-view-label select { font-size:14px;min-height:40px;height:40px;padding:7px 23px 7px 8px; }
  .ai-control.phone-workspace .canvas-zoom { margin:0; }
  .ai-control.phone-workspace .canvas-zoom button { min-width:36px; }
  .ai-control.phone-workspace .workflow-navigation-hint { padding:6px 10px;gap:8px;align-items:center; }
  .ai-control.phone-workspace .workflow-navigation-hint p { font-size:11px;line-height:1.35; }
  .ai-control.phone-workspace .workflow-controls-help { min-height:38px;padding:7px;font-size:11px; }
  .ai-control.phone-workspace .workflow-canvas { height:clamp(300px,42svh,410px);min-height:300px; }
  .ai-control.phone-workspace .flow-node h3 { font-size:17px; }
  .ai-control.phone-workspace .canvas-footer { min-height:46px;padding:5px 8px; }
  .ai-control.phone-workspace .canvas-footer #workflow-state { flex-basis:auto; }
  .ai-control.phone-workspace .workflow-request-follow { padding:10px; }
  .ai-control.phone-workspace .request-follow-message { display:none; }
  .ai-control.phone-workspace .request-follow-copy p { font-size:12px;line-height:1.4; }
  .ai-control.phone-workspace .request-follow-steps { max-height:80px;overflow:auto; }
  .ai-control.phone-workspace.board-focused { width:100%; }
  .ai-control.phone-workspace.board-focused .workflow-bench { flex:1 1 0;overflow:auto;min-height:0; }
  .ai-control.phone-workspace.phone-review-detail .workflow-bench { display:none!important; }
  .ai-control.phone-workspace.board-focused :is(.workflow-reference,.workflow-followup,.demo-disclaimer) { display:none; }
  .ai-control.phone-workspace.board-focused #workflow-test { flex:1 1 0;min-height:0;max-height:none;overflow:auto; }
  .ai-control.phone-workspace.board-focused > .phone-workspace-tabs { position:relative; }
  .ai-control.phone-workspace .planner-readable { max-height:430px;overflow:auto; }
}
