/* Phone · 演练准备与对话 */
/* Preparation: title in the bar, one task line, two compact object cards, one device row, one start button. */
@media (max-width:599px) {
  .room .room-head { gap:4px; padding:0 6px 0 2px; border-bottom:1px solid var(--line); }
  .room .room-head .icon-btn { width:var(--m-tap); min-width:var(--m-tap); height:var(--m-tap); padding:0; border-radius:var(--m-r-pill); }
  .room .room-head>.icon-btn:first-child { flex:none; color:var(--t-1); }
  .room .room-head>.icon-btn:first-child>.i { width:20px; height:20px; }
  .room .room-head .scene b { font-size:var(--m-fs-body); font-weight:600; line-height:1.35; color:var(--t-1); }
  .prep-room { grid-template-rows:var(--m-top-h) minmax(0,1fr) auto; background:var(--paper); }
  .prep-room .room-head .scene { flex:1; display:flex; align-items:center; gap:8px; min-width:0; }
  .prep-room .room-head .prep-level-badge { flex:none; padding:3px 9px; border-radius:var(--m-r-pill); background:var(--blue-pale); color:var(--blue); font-size:var(--m-fs-meta); font-weight:500; line-height:1.5; }
  .prep-viewport.preparation-workspace { display:block; overflow-y:auto; overscroll-behavior:contain; background:var(--paper); }
  .prep-briefing-pane,.prep-setup-pane { overflow:visible; background:transparent; border:0; }
  .prep-briefing-scroll,.prep-setup-scroll { height:auto; overflow:visible; padding:0 var(--m-gutter); gap:var(--m-gap); }
  .prep-briefing-scroll { padding-top:16px; }
  .prep-briefing-scroll>.prep-content-heading { display:none; }
  .prep-task-line { margin:0 2px 2px; color:var(--t-1); font-size:var(--m-fs-head); font-weight:600; line-height:1.5; }
  .prep-selection-message { font-size:13px; }
  .prep-briefing-scroll>.prep-source-grid { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:none; gap:var(--m-gap); flex:none; }
  .prep-source-grid>.prep-object-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:'id id actions' 'body body body'; align-items:center; column-gap:8px; height:auto; padding:12px 8px 12px 12px; border:0; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); color:var(--t-1); }
  .prep-source-grid>.prep-object-card>header { display:contents; }
  .prep-source-grid>.prep-object-card>header>span { display:none; }
  .prep-source-grid>.prep-object-card .room-brief-actions { grid-area:actions; flex-wrap:nowrap; gap:0; align-self:center; }
  .prep-source-grid>.prep-object-card .room-brief-actions>button { justify-content:center; min-width:var(--m-tap); height:var(--m-tap); padding:0 6px; border-radius:var(--m-r-control); color:var(--t-3); transition:background var(--m-dur) var(--m-ease); }
  .prep-source-grid>.prep-object-card .room-brief-label { display:none; }
  .prep-source-grid>.prep-object-card .room-brief-actions>button:active { background:var(--mist); }
  .prep-source-grid>.prep-object-card .room-brief-actions>button>.i { width:20px; height:20px; }
  .prep-source-grid>.prep-object-card .room-brief-actions>.room-brief-change { gap:2px; padding-inline:8px; color:var(--blue); font-size:13px; }
  .prep-source-grid>.prep-object-card .room-brief-actions>.room-brief-change>.i { width:12px; height:12px; }
  .prep-source-grid>.prep-object-card>.room-brief-identity,.prep-source-grid>.prep-object-card>.room-doctor-profile { grid-area:id; gap:12px; min-width:0; }
  .prep-source-grid>.prep-object-card .room-brief-visual { display:grid; width:44px; height:52px; border-radius:var(--m-r-inner); background:var(--blue-pale); color:var(--blue); }
  .prep-source-grid>.prep-object-card.doctor .room-brief-visual { height:44px; border-radius:var(--m-r-pill); background:#DCEFEA; color:#2F7C72; }
  .prep-source-grid>.prep-object-card .room-brief-visual>.i { width:22px; height:22px; }
  .prep-source-grid .prep-object-card h2,.prep-source-grid .prep-object-card .room-doctor-copy h2 { display:-webkit-box; overflow:hidden; font-size:var(--m-fs-head); font-weight:600; line-height:1.4; white-space:normal; color:var(--t-1); -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .prep-source-grid .prep-object-card .room-brief-identity p,.prep-source-grid .prep-object-card .room-doctor-copy p { display:-webkit-box; overflow:hidden; margin-top:2px; font-size:13px; line-height:1.5; color:var(--t-3); opacity:1; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .prep-source-grid>.prep-object-card>.prep-card-body { grid-area:body; display:none; overflow:visible; margin:6px 4px 2px 0; padding:0; }
  .prep-source-grid.materials-open>.prep-object-card>.prep-card-body { display:block; }
  .prep-source-grid:not(.materials-open)>.prep-object-card.product>.prep-card-body:has(>.room-brief-fact.danger) { display:block; margin:8px 0 0; }
  .prep-source-grid:not(.materials-open)>.prep-object-card>.prep-card-body>:not(.room-brief-fact.danger) { display:none; }
  .prep-source-grid:not(.materials-open) .prep-card-body>.room-brief-fact.danger { display:flex; align-items:center; gap:6px; min-width:0; margin:0; padding:8px 12px; }
  .prep-source-grid:not(.materials-open) .prep-card-body>.room-brief-fact.danger>h3 { display:flex; align-items:center; gap:4px; flex:none; margin:0; color:inherit; font-size:13px; font-weight:600; }
  .prep-source-grid:not(.materials-open) .prep-card-body>.room-brief-fact.danger>h3 .i { width:14px; height:14px; }
  .prep-source-grid:not(.materials-open) .prep-card-body>.room-brief-fact.danger>p { overflow:hidden; min-width:0; font-size:13px; line-height:1.5; white-space:nowrap; text-overflow:ellipsis; }
  .prep-source-grid:not(.materials-open) .prep-card-body>.room-brief-fact.danger>small { display:none; }
  .prep-source-grid .prep-object-card.product .room-brief-identity p { -webkit-line-clamp:1; }
  .prep-source-grid .prep-object-card .room-brief-identity p.room-brief-repeat { display:none; }
  .prep-source-grid .prep-card-body>.room-brief-fact,.prep-source-grid .prep-card-body>.room-brief-fact:first-child { margin-top:12px; }
  .prep-source-grid .prep-card-body .room-brief-fact>h3 { font-size:13px; color:var(--t-2); }
  .prep-source-grid .prep-card-body .room-brief-fact>p { font-size:14px; line-height:1.75; color:var(--t-1); }
  .prep-source-grid .prep-card-body .room-brief-fact:is(.warning,.danger,.positive) { padding:10px 12px; border-left:0; border-radius:var(--m-r-inner); }
  .prep-source-grid .prep-card-body .room-brief-fact:is(.warning,.danger,.positive)>p { color:inherit; }
  .prep-source-grid .prep-card-body .room-brief-fact>small,.prep-source-grid .prep-card-body .room-brief-tags>span { font-size:12px; }
  .prep-materials-toggle { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; min-height:var(--m-tap); margin-top:-4px; border:0; border-radius:var(--m-r-control); background:transparent; color:var(--blue); font-size:14px; font-weight:500; transition:background var(--m-dur) var(--m-ease); }
  .prep-materials-toggle:active { background:var(--blue-pale); }
  .prep-materials-toggle>.i { width:16px; height:16px; }
  .prep-materials-toggle>.i:last-child { width:12px; height:12px; transform:rotate(90deg); transition:transform var(--m-dur) var(--m-ease); }
  .prep-materials-toggle[aria-expanded='true']>.i:last-child { transform:rotate(-90deg); }
  .prep-briefing-scroll>.prep-secondary-tools { flex-wrap:wrap; gap:8px; min-height:0; padding:0 0 2px; }
  .prep-secondary-tools>:is(.btn,.prep-template-trigger) { flex:1 1 calc(50% - 4px); justify-content:center; gap:6px; height:40px; min-height:40px; padding:0 14px; border:0; border-radius:var(--m-r-pill); background:var(--white); box-shadow:var(--m-shadow-card); color:var(--t-2); font-size:13px; white-space:nowrap; }
  .prep-secondary-tools>.prep-template-trigger>span { gap:6px; }
  .prep-secondary-tools>:is(.btn,.prep-template-trigger) .i { width:15px; height:15px; color:var(--t-3); }
  .prep-secondary-tools>.prep-template-message { flex:1 0 100%; font-size:13px; }
  .prep-secondary-tools>.prep-template-message:empty,.prep-secondary-tools>:is(.btn,.prep-template-trigger)[hidden] { display:none; }
  .prep-setup-pane>.prep-setup-scroll { display:flex; flex-direction:column; gap:0; }
  .prep-setup-scroll>* { order:5; }
  .prep-setup-scroll>.prep-answer-mode { order:1; }
  .prep-setup-scroll>.prep-device-summary { order:2; }
  .prep-setup-scroll>.prep-device-heading { order:3; }
  .prep-setup-scroll>.prep-device-stage { order:4; }
  .prep-setup-pane { padding:var(--m-gap) var(--m-gutter) 20px; }
  .prep-setup-pane>.prep-setup-scroll { padding:0 14px; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); }
  .prep-setup-scroll>.prep-answer-mode { display:flex; align-items:center; gap:12px; min-height:60px; margin:0; padding-block:8px; color:var(--t-2); font-size:var(--m-fs-body); }
  .prep-setup-scroll>.prep-answer-mode>span { margin-right:auto; }
  .prep-setup-scroll>.prep-answer-mode>.seg { height:44px; padding:2px; border:0; border-radius:var(--m-r-control); background:var(--mist); }
  .prep-setup-scroll>.prep-answer-mode>.seg button { height:40px; padding:0 14px; border:0; border-radius:calc(var(--m-r-control) - 2px); font-size:14px; }
  .prep-setup-scroll>.prep-answer-mode>.seg button .i { width:15px; height:15px; }
  .prep-device-summary { display:flex; align-items:center; gap:12px; width:100%; min-height:60px; border:0; margin:0; padding:0; border-top:1px solid var(--line); background:transparent; text-align:left; color:var(--t-1); transition:background-color var(--m-dur) var(--m-ease); }
  .prep-device-summary:active { background-color:var(--paper); }
  .prep-device-summary>.prep-device-symbol { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:var(--m-r-pill); background:var(--blue-pale); color:var(--blue); }
  .prep-device-summary>.prep-device-symbol>.i { width:16px; height:16px; }
  .prep-device-summary-copy { display:grid; gap:1px; flex:1; min-width:0; }
  .prep-device-summary-copy>b { font-size:var(--m-fs-body); font-weight:500; }
  .prep-device-summary-copy>.prep-device-progress { overflow:hidden; max-width:none; margin:0; color:var(--t-3); font-size:13px; line-height:1.5; white-space:nowrap; text-overflow:ellipsis; }
  .prep-device-summary>.i { width:12px; height:12px; flex:none; color:var(--t-4); transform:rotate(90deg); transition:transform var(--m-dur) var(--m-ease); }
  .prep-device-summary[aria-expanded='true']>.i { transform:rotate(-90deg); }
  .prep-setup-scroll:not(.devices-open)>:is(.prep-device-heading,.prep-device-stage,.prep-voice-settings) { display:none; }
  .prep-setup-scroll>.prep-device-heading { display:flex; padding-block:4px 10px; }
  .prep-setup-scroll>.prep-device-heading>span { display:none; }
  .prep-setup-scroll>.prep-device-heading>.btn { flex:1; min-height:var(--m-tap); padding:0 12px; border:0; background:var(--blue-pale); color:var(--blue); font-size:14px; }
  .prep-setup-scroll>.prep-device-stage { display:flex; flex-direction:column; gap:10px; padding-block:0 12px; }
  .prep-device-stage .prep-camera .mycam video { height:auto; max-height:180px; aspect-ratio:16/9; border-radius:var(--m-r-inner); }
  .prep-device-stage .prep-camera-placeholder { height:auto; min-height:96px; border-radius:var(--m-r-inner); }
  .prep-device-stage .prep-camera-placeholder>span { font-size:13px; }
  .prep-device-stage .prep-camera-caption { gap:4px 8px; }
  .prep-device-stage .prep-camera-caption .prep-device-result,.prep-device-stage .prep-device-row .prep-device-result { font-size:13px; line-height:1.5; }
  .prep-device-stage .prep-camera-caption .btn,.prep-device-stage .prep-device-row .btn { height:40px; min-height:40px; padding:0 10px; font-size:13px; }
  .prep-device-stage .prep-device-row { gap:10px; padding:8px 8px 8px 12px; border-radius:var(--m-r-inner); background:var(--paper); }
  .prep-device-stage .prep-device-row-copy>b { font-size:14px; }
  .prep-setup-scroll>.prep-voice-settings { display:flex; flex-direction:column; align-items:stretch; gap:0; margin:0; padding:0 0 6px; }
  .prep-setup-scroll>.prep-voice-settings>.prep-voice-trigger { min-height:48px; padding:0; border-top:1px solid var(--line); font-size:14px; }
  .prep-setup-scroll>.prep-voice-settings>.prep-voice-trigger>span:first-child { display:flex; font-size:14px; color:var(--t-2); }
  .prep-setup-scroll>.prep-voice-settings>.prep-voice-trigger>span:nth-child(2) { font-size:14px; }
  .prep-setup-scroll>.prep-voice-settings .prep-support-check { min-height:48px; align-items:center; gap:10px; border-top:1px solid var(--line); font-size:14px; }
  .prep-setup-scroll>.prep-voice-settings .prep-support-check input { width:18px; height:18px; }
  .prep-room>.prep-actions { padding:10px var(--m-gutter) calc(10px + var(--m-safe-b)); border-top:1px solid rgba(11,18,32,.06); background:var(--m-glass); backdrop-filter:var(--m-glass-blur); -webkit-backdrop-filter:var(--m-glass-blur); box-shadow:none; }
  .prep-room>.prep-actions>.btn-primary { flex:1; height:50px; min-height:50px; border-radius:var(--m-r-control); font-size:16px; font-weight:600; }
  .prep-room>.prep-actions>.btn-primary .i { width:18px; height:18px; }
  .prep-library-choice { min-height:52px; }
  .prep-library-choice b,.prep-template-choice b { font-size:var(--m-fs-body); }
  .prep-library-choice small,.prep-template-choice small,.prep-template-menu>.meta,.prep-voice-menu>.meta { font-size:13px; }
  .prep-tool-popover { font-size:14px; }
  .prep-tool-popover h2 { font-size:var(--m-fs-head); font-weight:600; }
  .prep-tool-popover textarea { font-size:16px; }
  .prep-tool-popover .prep-phrases h2 { font-size:13px; }
  .prep-tool-popover .prep-phrases p { font-size:14px; line-height:1.75; }
  .prep-tool-popover .prep-phrases small { font-size:12px; }
  .prep-element { min-height:40px; padding:6px 12px; font-size:14px; }
}

/* Live practice: bar (back · scene · time · more · end), one readable doctor line, one floating control group. */
@media (max-width:599px) {
  .room.room-active { grid-template-rows:var(--m-top-h) minmax(0,1fr); background:var(--paper); }
  .room-active .room-head { gap:2px; padding:0 4px 0 2px; }
  .room-active .room-head .scene { flex:1; min-width:0; padding-left:2px; }
  .room-active .room-head .scene b { font-size:var(--m-fs-body); font-weight:600; }
  .room-active .room-head:has(.room-more-button)>:is(.room-context-button,.btn-ghost:not(.icon-btn)) { display:none; }
  .room-active .room-head .room-time { gap:4px; padding:0 6px; color:var(--t-3); }
  .room-active .room-head .room-time>.i { display:block; width:14px; height:14px; }
  .room-active .room-head .room-time>small { display:none; font-size:12px; }
  .room-active .room-head .room-time:has(.frozen)>small { display:inline; }
  .room-active .room-head .timer { color:var(--t-1); font:500 var(--m-fs-body) var(--f-mono); font-variant-numeric:tabular-nums; }
  .room-active .room-head .timer.low { color:var(--signal); }
  .room-more-dots { display:block; width:18px; height:4px; background:radial-gradient(circle,currentColor 1.8px,transparent 2.2px) 0 50%/6px 4px repeat-x; }
  .room-active .room-head>.btn-danger { position:relative; z-index:0; height:var(--m-tap); min-height:var(--m-tap); margin-left:4px; padding:0 14px; border:0; background:transparent; color:var(--signal); font-size:14px; font-weight:600; }
  .room-active .room-head>.btn-danger::before { content:''; position:absolute; z-index:-1; inset:6px 0; border-radius:var(--m-r-pill); background:var(--signal-pale); transition:background var(--m-dur) var(--m-ease); }
  .room-active .room-head>.btn-danger:active::before { background:#F8D3D0; }
  .room-active .room-head>.btn-danger>.i { display:none; }
  .room-more-menu { display:grid; gap:2px; padding-bottom:4px; }
  .room-more-item { display:flex; align-items:center; gap:14px; min-height:52px; padding:0 6px; border:0; border-radius:var(--m-r-control); background:transparent; color:var(--t-1); font-size:var(--m-fs-body); text-align:left; transition:background var(--m-dur) var(--m-ease); }
  .room-more-item:active:not(:disabled) { background:var(--mist); }
  .room-more-item:disabled { color:var(--t-4); }
  .room-more-item>.i { width:20px; height:20px; color:var(--t-3); }
  .room-end-confirm { gap:16px!important; padding:4px 0 0!important; }
  .room-end-confirm>p { padding:0 4px; color:var(--t-2); font-size:var(--m-fs-body)!important; line-height:1.6; }
  .room-end-actions { display:grid!important; grid-template-columns:1fr 1fr; gap:10px!important; }
  .room-end-actions>.btn { height:48px; min-height:48px; border:0; border-radius:var(--m-r-control); font-size:var(--m-fs-body); font-weight:600; transition:transform var(--m-dur) var(--m-ease); }
  .room-end-actions>.btn:active:not(:disabled) { transform:scale(.97); }
  .room-end-actions>.btn-ghost { background:var(--mist); color:var(--t-1); }
  .room-end-actions>.btn-danger { background:var(--signal); color:var(--white); }

  .room-active .stage { background:var(--paper); }
  .room-active .stage-viewport { position:relative; --scroll-surface:var(--paper); }
  .room-active .stage-inner { width:100%; padding:12px var(--m-gutter) 16px; gap:10px; }
  .room-active .stage-scene { gap:10px; margin-bottom:4px; padding:12px 14px; border:0; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); }
  .room-active .stage-viewport:has(.room-self-tile:not([hidden])) .stage-scene { padding-right:64px; }
  .room-active .stage-scene-avatar { width:40px; height:40px; border-radius:var(--m-r-pill); font-size:16px; font-weight:600; }
  .room-active .stage-scene-name>b { font-size:var(--m-fs-body); font-weight:600; }
  .room-active .stage-scene-meta,.room-active .stage-scene-line,.room-active .stage-scene-hint { font-size:13px; line-height:1.5; }
  .room-active .stage-scene-meta { display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .room-active .stage-scene-line { margin-top:2px; }
  .room-active .room-role-badge { height:22px; padding:0 8px; border-radius:var(--m-r-pill); font-size:12px; }
  .room-active .msg { gap:8px; }
  .room-active .msg-avatar { width:30px; height:30px; border-radius:var(--m-r-pill); font-size:13px; font-weight:600; }
  .room-active .msg-avatar-gap { width:30px; }
  .room-active .msg-main { gap:4px; max-width:82%; }
  .room-active .msg.me .msg-main { max-width:86%; }
  .room-active .msg-meta { gap:2px 6px; font-size:12px; }
  .room-active .msg-meta>b { font-size:13px; font-weight:600; }
  .room-active .msg-meta>small,.room-active .msg-meta time,.room-active .msg-live { font-size:12px; }
  .room-active .msg.me .msg-meta:not(:has(.tag)) { display:none; }
  .room-active .msg-bubble { padding:10px 14px; border:0; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); font-size:var(--m-fs-body); line-height:1.65; }
  .room-active .msg.them .msg-bubble { border-top-left-radius:6px; }
  .room-active .msg.them.grouped .msg-bubble { border-top-left-radius:var(--m-r-card); }
  .room-active .msg.me .msg-bubble { border-top-right-radius:6px; background:var(--blue); box-shadow:0 6px 16px rgba(15,76,150,.18); }
  .room-active .msg.is-current .msg-bubble { border:0; box-shadow:inset 3px 0 0 var(--blue),var(--m-shadow-card); }
  .room-active .msg.nudge .msg-bubble { background:var(--mist); box-shadow:none; }
  .room-active .msg.blocked .msg-bubble { background:var(--signal-pale); color:var(--t-1); box-shadow:none; }
  .room-active .msg-note { padding:4px 12px; border-radius:var(--m-r-pill); background:rgba(11,18,32,.05); font-size:12px; }
  .room-self-tile { position:absolute; z-index:3; top:10px; right:10px; display:block; width:44px; height:56px; padding:0; overflow:hidden; border:0; border-radius:var(--m-r-inner); background:var(--ink); box-shadow:var(--m-shadow-float); transition:transform var(--m-dur) var(--m-ease); }
  .room-self-tile:active { transform:scale(.96); }
  .room-self-tile>video { display:block; width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
  .room-self-tile>.capture-dot { position:absolute; top:5px; right:5px; width:6px; height:6px; border-radius:var(--m-r-pill); background:var(--cyan); box-shadow:0 0 0 1.5px rgba(255,255,255,.9); }
  .room-self-tile.collapsed { display:inline-flex; align-items:center; gap:6px; width:auto; height:40px; padding:0 14px; border-radius:var(--m-r-pill); background:var(--white); box-shadow:var(--m-shadow-card); color:var(--t-2); font-size:13px; }
  .room-self-tile.collapsed>.capture-dot { position:static; box-shadow:none; }
  .room-self-tile[hidden] { display:none; }
  .room-context-contents .mycam:empty { display:none; }
  .room-latest { position:absolute; z-index:3; left:50%; bottom:10px; display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 16px; border:0; border-radius:var(--m-r-pill); background:var(--m-glass-strong); backdrop-filter:var(--m-glass-blur); -webkit-backdrop-filter:var(--m-glass-blur); box-shadow:var(--m-shadow-float); color:var(--blue); font-size:14px; font-weight:500; transform:translateX(-50%); }
  .room-latest>.i { width:12px; height:12px; transform:rotate(90deg); }
  .room-active .answer-area { border-top:0; background:transparent; }
  .room-active .dock { min-height:0; padding:4px 10px calc(10px + var(--m-safe-b)); }
  .room-active .seg { height:46px; padding:3px; border:0; border-radius:var(--m-r-control); background:var(--mist); box-shadow:none; }
  .room-active .seg>button { height:40px; min-height:40px; padding:0 14px; border:0; border-radius:calc(var(--m-r-control) - 3px); color:var(--t-3); font-size:14px; transition:background var(--m-dur) var(--m-ease),color var(--m-dur) var(--m-ease); }
  .room-active .seg>button>.i { display:none; }
  .room-active .seg>button[aria-pressed='true'] { background:var(--white); color:var(--blue); box-shadow:0 1px 3px rgba(11,18,32,.12); }
  .room-active .dock>.composer { display:grid; gap:4px; padding:6px; border:0; border-radius:var(--m-r-card); background:var(--m-glass); backdrop-filter:var(--m-glass-blur); -webkit-backdrop-filter:var(--m-glass-blur); box-shadow:var(--m-shadow-float); }
  .room-active .dock>.composer:focus-within { box-shadow:var(--m-shadow-float),0 0 0 2px var(--blue-line); }
  .room-active .composer textarea { min-height:44px; max-height:112px; padding:10px 10px 6px; font-size:16px; line-height:1.55; }
  .room-active .composer-bar { flex-wrap:nowrap; gap:8px; padding:0; }
  .room-active .composer-bar .seg { margin:0; }
  .room-active .composer-bar>.btn-primary { height:46px; min-height:46px; padding:0 18px; border-radius:var(--m-r-control); font-size:var(--m-fs-body); font-weight:600; }
  .room-active .composer-bar>.btn-primary .i { width:16px; height:16px; }
  .room-active .voice-controls { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); grid-template-areas:'state state state' 'cap cap cap' 'seg mic edit'; align-items:center; column-gap:8px; isolation:isolate; }
  .room-active .voice-controls::before { content:''; grid-row:3; grid-column:1/-1; z-index:-1; align-self:stretch; border-radius:var(--m-r-pill); background:var(--m-glass); backdrop-filter:var(--m-glass-blur); -webkit-backdrop-filter:var(--m-glass-blur); box-shadow:var(--m-shadow-float); }
  .room-active .voice-controls>.voicebar,.room-active .voicebar>.vtools { display:contents; }
  .room-active .voicebar>.vstate { grid-area:state; min-width:0; padding:0 8px 8px; text-align:center; }
  .room-active .vstate b { font-size:var(--m-fs-body); font-weight:600; }
  .room-active .vstate p { display:-webkit-box; overflow:hidden; margin-top:2px; color:var(--t-3); font-size:13px; line-height:1.5; white-space:normal; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .room-active .vstate .live { color:var(--t-1); font-size:var(--m-fs-body); }
  .room-active:not([data-voice-state='listening'],[data-voice-state='unavailable']) .vstate p { display:none; }
  .room-active .voicebar .mic { grid-area:mic; width:52px; height:52px; margin:3px 0; border:0; border-radius:var(--m-r-pill); box-shadow:0 6px 16px rgba(15,76,150,.28),inset 0 1px 0 rgba(255,255,255,.2); transition:transform var(--m-dur) var(--m-ease),background var(--m-dur) var(--m-ease); }
  .room-active .voicebar .mic:active:not(:disabled) { transform:scale(.94); }
  .room-active .voicebar .mic .i { width:26px; height:26px; }
  .room-active .voicebar .mic:is([data-state='listening'],[data-state='speaking'],:disabled,[data-state='unavailable']) { box-shadow:none; }
  .room-active .vtools>.seg { grid-area:seg; justify-self:start; margin-left:6px; }
  .room-active .vtools>.btn { grid-area:edit; justify-self:end; height:var(--m-tap); min-height:var(--m-tap); margin-right:6px; padding:0 14px; border:0; border-radius:var(--m-r-pill); background:rgba(255,255,255,.7); color:var(--blue); font-size:14px; font-weight:500; }
  .room-active .vtools>.btn:disabled { color:var(--t-4); }
  .room-active .vtools>.btn .i { display:none; }
  .room-active .vtools>.btn .tool-label { display:inline; }
  .room-active .voice-controls>.voice-caption { grid-area:cap; justify-content:center; gap:8px; min-height:0; padding:0 0 8px; font-size:13px; }
  .room-active .voice-caption:not(:has(.bars,button.voice-session-status,.voice-done:enabled)) { display:none; }
  .room-active .voice-caption>span.voice-session-status,.room-active .voice-caption>.voice-done:disabled { display:none; }
  .room-active .voice-caption>.voice-session-status,.room-active .voice-caption>.voice-done { min-height:40px; height:40px; margin:0; padding:0 14px; border-radius:var(--m-r-pill); font-size:13px; }
  .room-active .voice-caption>.voice-session-status { color:var(--t-2); background:rgba(255,255,255,.7); }
  .room-active .voice-caption>.voice-done { color:var(--blue); background:var(--blue-pale); }
  .room-active .voice-caption .i { width:14px; height:14px; }
  .voice-editor { width:auto; }
  .voice-editor-head { font-size:var(--m-fs-body); }
  .voice-editor-head .meta { font-size:13px; }
  .voice-editor textarea { font-size:16px; }
  .voice-editor-actions>.btn { flex:1; }
  .room-active .room-paused-controls { gap:12px; padding:12px 12px 12px 18px; border-radius:var(--m-r-card); background:var(--m-glass); backdrop-filter:var(--m-glass-blur); -webkit-backdrop-filter:var(--m-glass-blur); box-shadow:var(--m-shadow-float); }
  .room-active .room-paused-controls b { font-size:var(--m-fs-body); font-weight:600; color:var(--t-1); }
  .room-active .room-paused-controls p { margin-top:2px; font-size:13px; color:var(--t-3); }
  .room-active .room-paused-controls>.btn { min-width:0; height:var(--m-tap); padding:0 16px; border-radius:var(--m-r-control); font-size:14px; }
  .room-active .notice,.room-active .notice.room-recovery-notice { margin:0 10px 8px; padding:10px 12px; border-left:0; border-radius:var(--m-r-control); font-size:13px; }
  .room-active .notice p,.room-active .room-notice-content>p,.room-recovery-notice .room-notice-content>p { font-size:13px; line-height:1.6; }
  .room-active .room-notice-details,.room-active .room-notice-details>p { font-size:12px; }
  .room-active .room-recovery-actions>.btn { min-height:40px; height:40px; padding:0 12px; font-size:13px; }

  /* Round info sheet keeps the desktop structure, with readable phone sizes. */
  .room-context-contents { max-height:none; }
  .room-context-contents .doctor-panel,.room-context-contents .room-live-context { padding:4px 0 12px; background:transparent; }
  .room-context-contents :is(.room-round-summary span,.room-round-summary small,.doctor-meter>div,.room-state-meters .doctor-meter>div,.doctor-state>summary,.doctor-state>summary>.label,.state-evidence p,.camera-coverage-times dt,.camera-coverage-empty,.camera-current-details>summary,.camera-observations>div,.camera-observation-label,.camera-observation-detail,.room-round-position,.room-interaction-state>.label,.room-brief-fact h3,.room-brief-tags>span,.room-brief-target,.room-brief-redline,.room-role-label,.room-brief-provenance>p,.room-brief-provenance small,.room-brief-disclosure small,.room-brief-region,.room-brief-actions>button,.room-source-card>header>span,.room-source-card>footer,.room-doctor-copy p,.room-brief-identity p) { font-size:12px; }
  .room-context-contents :is(.room-brief-fact>p,.room-brief-disclosure,.room-brief-disclosure p,.state-evidence ul,.stage-label,.mycam-off) { font-size:14px; }
  .room-context-contents .room-brief-actions>button { min-height:40px; padding:0 6px; }
  .room-context-contents :is(.label,.camera-heading>.label) { font-size:12px; }
  .room-context-contents :is(.doctor-state>summary,.camera-current-details>summary) { display:flex; align-items:center; min-height:40px; }
  .room-context-contents .room-brief-disclosure>summary { min-height:40px; font-size:14px; }
  .room-context-contents .room-brief-target>b { font-size:13px; }
  .voice-item .name { font-size:var(--m-fs-body); }
  .voice-item .name small { font-size:13px; }
  .popover-sheet label:has(>input[type='checkbox']) { min-height:var(--m-tap); font-size:var(--m-fs-body)!important; }
  .popover-sheet label>input[type='checkbox'] { width:20px; height:20px; }
  .popover-sheet input[type='range'] { flex:1; height:32px; }
  .room-context-contents .camera-actions .btn { height:40px; min-height:40px; font-size:13px; }
  .room-context-sheet { width:auto; max-height:none; overflow:visible; }
  .room-context-sheet .room-live-context { display:grid; gap:var(--m-gap); padding:0; }
  .room-context-sheet .room-live-context>* { margin:0; }
  .room-context-sheet .room-round-position { justify-content:space-between; min-height:44px; padding:0 16px; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); color:var(--t-2); font-size:var(--m-fs-body); }
  .room-context-sheet .room-round-position>b { color:var(--t-1); font:600 var(--m-fs-head) var(--f-ui); font-variant-numeric:tabular-nums; }
  .room-context-sheet .room-round-summary { display:grid; grid-template-columns:1fr 1fr; gap:0; padding:0; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); color:var(--t-1); }
  .room-context-sheet .room-round-summary>div { display:flex; align-items:baseline; gap:4px; padding:14px 16px; }
  .room-context-sheet .room-round-summary>div+div { border-left:1px solid var(--line); }
  .room-context-sheet .room-round-summary span { margin-right:auto; color:var(--t-3); font-size:13px; }
  .room-context-sheet .room-round-summary b { font:600 22px var(--f-ui); font-variant-numeric:tabular-nums; color:var(--t-1); }
  .room-context-sheet .room-round-summary b.hot { color:var(--signal); }
  .room-context-sheet .room-round-summary small { color:var(--t-3); font-size:12px; }
  .room-context-sheet .context-section { padding:14px 16px; border:0; border-radius:var(--m-r-card); background:var(--white); box-shadow:var(--m-shadow-card); }
  .room-context-sheet .room-interaction-state>.label,.room-context-sheet .camera-heading>.label { color:var(--t-3); font-size:13px; }
  .room-context-sheet .room-interaction-state .stage-label { margin-top:6px; color:var(--t-1); font-size:var(--m-fs-body); font-weight:600; }
  .room-context-sheet .room-state-meters { gap:10px; margin-top:12px; }
  .room-context-sheet .room-state-meters .doctor-meter>div { font-size:13px; color:var(--t-2); }
  .room-context-sheet .doctor-meter-track { height:6px; border-radius:var(--m-r-pill); }
  .room-context-sheet .doctor-state { margin-top:6px; }
  .room-context-sheet .doctor-state>summary { min-height:var(--m-tap); color:var(--blue); font-size:14px; }
  .room-context-sheet .doctor-state>summary>.label { color:inherit; font-size:14px; }
  .room-context-sheet .camera-section { padding:8px 16px 12px; }
  .room-context-contents .mycam-off { min-height:var(--m-tap); padding:0; gap:12px; color:var(--blue); font-size:var(--m-fs-body); font-weight:500; }
  .room-context-contents .mycam-off>.i { width:20px; height:20px; }
  .room-context-contents .mycam-off>.i:last-child { width:12px; height:12px; color:var(--t-4); }
  .room-context-contents .mycam-off:disabled { color:var(--t-4); }
  .mycam-note { margin:0 0 2px 32px; color:var(--t-3); font-size:12px; line-height:1.5; }
  .room-voice-settings>.room-rate-row { min-height:var(--m-tap); padding:0 4px!important; }
  .room-voice-settings>.room-rate-row>input[type='range'] { height:var(--m-tap); }
  .room-voice-settings>.room-rate-row>output { min-width:44px; text-align:right; font-variant-numeric:tabular-nums; }
  .room-voice-settings>label { min-height:var(--m-tap); padding:0 4px!important; border-top:1px solid var(--line); font-size:var(--m-fs-body)!important; }
  .room-voice-settings>label>input[type='checkbox'] { width:20px; height:20px; }
  .room-voice-settings>.label:first-child { padding:0 4px 8px!important; color:var(--t-3); font-size:13px; }
  .room-voice-settings>.room-rate-row { margin-top:8px; border-top:1px solid var(--line); }
  body:has(:is(.popover-sheet,.drawer-sheet)) .room-active .dock { visibility:hidden; }
}

/* A short viewport can be landscape or the keyboard; preserve the composer. */
@media (max-width:599px) and (max-height:520px) {
  .room.room-active { grid-template-rows:44px minmax(0,1fr); }
  .room-active .stage-inner { padding-block:8px 10px; gap:8px; }
  .room-active .stage-scene-hint { display:none; }
  .room-active .dock { padding-bottom:6px; }
  .room-active .composer textarea { max-height:72px; }
  .room-active .voicebar>.vstate { padding-bottom:4px; }
  .room-active .vstate p { -webkit-line-clamp:1; }
  .room-active .voicebar .mic { width:52px; height:52px; margin-block:4px; }
  .room-active .notice { max-height:72px; overflow:auto; }
  .room-self-tile { width:36px; height:44px; }
}
