/* 0.18.40 Category 2 owner-approved UI corrective.
   Figma: 115:2 (Home/My settings), 117:2 (Transcription), 119:2 (Whiteboard). */

/* Home topbar settings entry: desktop text + icon, compact icon-only on narrow widths. */
.my-settings-button {
  min-height:35px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 13px;
  border:1px solid rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.24);
  border-radius:999px;
  color:rgb(var(--rooms-rgb-d7e4fb,215,228,251));
  background:rgba(var(--rooms-rgb-5c84ee,92,132,238),0.075);
  font-size:10px;
  font-weight:760;
  white-space:nowrap;
}
.my-settings-button:hover:not(:disabled),.my-settings-button:focus-visible { border-color:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.5); background:rgba(var(--rooms-rgb-5c84ee,92,132,238),0.15); }
.my-settings-button .home-settings-gear { width:22px; height:22px; flex:0 0 22px; display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.my-settings-card { width:min(940px,calc(100vw - 28px)); max-height:min(860px,calc(var(--app-viewport-height,100dvh) - 28px)); background:rgba(var(--rooms-rgb-0d1623,13,22,35),0.97); border:1px solid rgba(var(--rooms-rgb-6c84a8,108,132,168),0.38); backdrop-filter:blur(18px) saturate(115%); }
.my-settings-head { margin-bottom:12px; }
.my-settings-head>div { min-width:0; }
.my-settings-head h2 { margin:0 0 5px; }
.my-settings-head p { margin:0; color:var(--muted); font-size:10px; line-height:1.45; }
.my-settings-form { display:block; }
.my-settings-section { padding:15px 0; border-top:1px solid var(--line); }
.my-settings-section:first-child { border-top:0; padding-top:4px; }
.my-settings-section h3 { margin:0 0 11px; color:rgb(var(--rooms-rgb-dce7f7,220,231,247)); font-size:12px; }
.my-settings-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; align-items:stretch; }
.my-settings-grid.devices { grid-template-columns:repeat(2,minmax(0,1fr)) minmax(200px,1fr); }
.my-settings-grid.interface { grid-template-columns:repeat(3,minmax(0,1fr)); }
.my-settings-form label { min-width:0; }
.my-settings-form label>span:not(.sr-only) { display:block; margin:0 0 5px; color:rgb(var(--rooms-rgb-8393a9,131,147,169)); font-size:9px; font-weight:700; line-height:1.35; }
.my-settings-form input[type="text"],.my-settings-form input:not([type]),.my-settings-form select { width:100%; min-width:0; min-height:42px; border:1px solid var(--line-strong); border-radius:11px; background:rgb(var(--rooms-rgb-0a111c,10,17,28)); color:rgb(var(--rooms-rgb-e7edf7,231,237,247)); padding:0 10px; font:inherit; font-size:11px; }
.my-settings-form .home-pref-toggle { min-width:0; min-height:42px; height:100%; padding:9px 10px; white-space:normal; }
.my-settings-form .home-pref-toggle>span { margin:0!important; white-space:normal!important; overflow-wrap:anywhere; }
.my-settings-form .home-pref-timezone small { display:block; margin-top:6px; color:rgb(var(--rooms-rgb-718198,113,129,152)); font-size:9px; line-height:1.45; }
.my-settings-actions { display:flex; justify-content:flex-end; gap:9px; padding-top:14px; border-top:1px solid var(--line); }
.my-settings-actions button { min-width:150px; white-space:nowrap; }
html[data-theme="light"] .my-settings-card { background:rgba(var(--rooms-rgb-f8fbff,248,251,255),0.97); border-color:rgba(var(--rooms-rgb-486288,72,98,136),0.22); }
html[data-theme="light"] .my-settings-section h3 { color:rgb(var(--rooms-rgb-1d2e46,29,46,70)); }
html[data-theme="light"] .my-settings-form input[type="text"],html[data-theme="light"] .my-settings-form input:not([type]),html[data-theme="light"] .my-settings-form select { background:#fff; color:rgb(var(--rooms-rgb-17243a,23,36,58)); }

/* My Rooms: controls stay in their own row/cluster and never collide with the heading. */
.my-rooms-head { min-width:0; flex-wrap:wrap; align-items:flex-start; }
.my-rooms-head>div:first-child { flex:1 1 320px; min-width:0; }
.my-rooms-head>div:first-child p { max-width:100%; overflow-wrap:anywhere; }
.my-rooms-head-controls { flex:0 0 auto; margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:8px; min-width:0; }
.section-collapse-control { flex:0 0 auto; white-space:nowrap; }
.my-room-row { min-width:0; }
.my-room-actions { min-width:0; flex-wrap:wrap; justify-content:flex-end; }
.my-room-actions button { white-space:nowrap; }
.my-room-quick { width:100%; }

/* Transcription status: one resilient component with explicit wide and compact states. */
.transcription-action { min-width:0; height:40px; min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:0 10px; white-space:nowrap; overflow:visible; }
.transcription-action .transcription-action-label { white-space:nowrap; }
.transcription-action-state { width:auto; min-width:7px; height:24px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; padding:0 7px; border-radius:999px; box-shadow:none; background:rgba(var(--rooms-rgb-8697b4,134,151,180),0.14); }
.transcription-action-state-text { display:block; font-style:normal; color:inherit; font-size:8px; line-height:1; font-weight:850; white-space:nowrap; }
.transcription-action.is-active .transcription-action-state { background:rgba(255,91,111,.18); box-shadow:none; }
.transcription-action.is-ready .transcription-action-state { background:rgba(75,211,137,.15); box-shadow:none; }
.transcription-run-action { min-width:0; height:40px; min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:0 10px; white-space:nowrap; }
.transcription-run-action svg,.transcription-run-action span { flex:0 0 auto; }

/* Dense transcript window: glass is decorative; readable surface is the authority. */
.transcript-modal { background:rgba(var(--rooms-rgb-02060c,2,6,12),0.74); backdrop-filter:blur(15px) saturate(112%); }
.transcript-card { width:min(1040px,calc(100vw - 24px)); max-height:min(860px,calc(var(--app-viewport-height,100dvh) - 24px)); background:rgba(var(--rooms-rgb-0d1623,13,22,35),0.97); border:1px solid rgba(var(--rooms-rgb-607799,96,119,153),0.42); box-shadow:0 34px 110px rgba(0,0,0,.70); backdrop-filter:blur(20px) saturate(112%); overflow:hidden; display:flex; flex-direction:column; }
.transcript-modal-head { min-width:0; align-items:flex-start; gap:14px; margin-bottom:14px; flex:0 0 auto; }
.transcript-head-copy { flex:1 1 240px; min-width:0; }
.transcript-head-copy h2 { margin:0 0 5px; font-size:clamp(21px,2.4vw,28px); line-height:1.15; overflow-wrap:anywhere; }
.transcript-head-copy p { margin:0; color:var(--muted); font-size:10px; line-height:1.4; overflow-wrap:anywhere; }
.transcript-head-actions { flex:0 1 auto; min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap; }
.transcript-head-actions button { min-height:38px; display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; flex:0 0 auto; }
.transcript-head-actions button svg { width:15px; height:15px; flex:0 0 15px; fill:none; stroke:currentColor; stroke-width:1.8; }
#transcriptContinueBtn { min-width:126px; }
#transcriptCloseBtn { width:38px; min-width:38px; padding:0; }
.transcript-body.transcript-sessions { flex:1 1 auto; min-height:0; max-height:none; overflow:auto; padding:10px; white-space:normal; font:inherit; display:grid; grid-auto-rows:max-content; align-content:start; gap:9px; background:rgba(var(--rooms-rgb-03080f,3,8,15),0.54); }
.transcript-session { min-width:0; border:1px solid var(--line); border-radius:13px; overflow:hidden; background:rgba(var(--rooms-rgb-091421,9,20,33),0.76); }
.transcript-session-toggle { width:100%; min-width:0; min-height:64px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:10px 13px; border:0; border-radius:0; color:inherit; background:transparent; text-align:left; }
.transcript-session-toggle:hover:not(:disabled) { transform:none; background:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.055); }
.transcript-session-title { min-width:0; display:flex; flex-direction:column; gap:3px; }
.transcript-session-title b,.transcript-session-title small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.transcript-session-title b { font-size:11px; }
.transcript-session-title small { color:var(--muted); font-size:9px; }
.transcript-session-status { flex:0 0 auto; min-width:68px; padding:5px 8px; border-radius:999px; color:#64e6ac; background:rgba(31,102,68,.24); border:1px solid rgba(100,230,172,.24); font-size:8px; font-weight:850; text-align:center; white-space:nowrap; }
.transcript-session-chevron { flex:0 0 20px; width:20px; color:rgb(var(--rooms-rgb-7e8da2,126,141,162)); text-align:center; }
.transcript-session-body { min-width:0; padding:0 13px 13px; }
.transcript-session-text { min-width:0; max-height:36vh; overflow:auto; padding:12px; border:1px solid rgba(var(--rooms-rgb-738bae,115,139,174),0.2); border-radius:10px; background:rgba(var(--rooms-rgb-03080f,3,8,15),0.64); color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; font:500 12px/1.6 "Segoe UI",sans-serif; }
.transcript-session-footer { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding-top:10px; }
.transcript-session-retention { flex:1 1 260px; min-width:0; color:rgb(var(--rooms-rgb-718198,113,129,152)); font-size:9px; line-height:1.4; overflow-wrap:anywhere; }
.transcript-session-actions { flex:0 0 auto; display:flex; align-items:center; justify-content:flex-end; gap:7px; min-width:0; }
.transcript-session-actions button { min-height:36px; display:inline-flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; }
.transcript-session-actions button svg { width:14px; height:14px; flex:0 0 14px; fill:none; stroke:currentColor; stroke-width:1.8; }
.transcript-session-delete { color:#ff9aa4; border-color:rgba(255,127,139,.28); background:rgba(126,43,55,.18); }
.transcript-session-delete:hover:not(:disabled) { color:#ffd9dd; border-color:rgba(255,127,139,.48); background:rgba(126,43,55,.30); }
.transcript-delete-card { width:min(500px,calc(100vw - 28px)); background:rgba(var(--rooms-rgb-0d1623,13,22,35),0.98); border-color:rgba(255,127,139,.28); }
.transcript-delete-card p { margin:0 0 14px; color:var(--muted); line-height:1.55; }
.transcript-delete-warning { margin:0 0 18px; padding:11px 12px; border:1px solid rgba(255,127,139,.26); border-radius:11px; color:#ffb0b9; background:rgba(111,32,44,.21); font-size:10px; line-height:1.45; }
.transcript-delete-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; justify-content:stretch; }
.transcript-delete-actions button { width:100%; min-height:42px; white-space:nowrap; }
html[data-theme="light"] .transcript-card,html[data-theme="light"] .transcript-delete-card { background:rgba(var(--rooms-rgb-f8fbff,248,251,255),0.98); border-color:rgba(var(--rooms-rgb-465e80,70,94,128),0.24); }
html[data-theme="light"] .transcript-session { background:rgba(var(--rooms-rgb-f7fafe,247,250,254),0.92); }
html[data-theme="light"] .transcript-session-text { background:#fff; }

/* Transcription launch: equal scope choices; selected means selected, not "primary". */
.transcription-scope-card { width:min(760px,calc(100vw - 28px)); background:rgba(var(--rooms-rgb-0d1623,13,22,35),0.98); }
.transcription-scope-card>h2 { margin:0 0 7px; }
.transcription-scope-card>p { margin:0 0 16px; color:var(--muted); font-size:11px; }
.transcription-scope-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.transcription-scope-option { min-width:0; min-height:142px; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:7px; padding:15px; border:1px solid var(--line-strong); border-radius:14px; color:var(--text); background:rgba(255,255,255,.024); text-align:left; box-shadow:none; }
.transcription-scope-option:hover:not(:disabled) { transform:none; border-color:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.36); background:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.055); }
.transcription-scope-option.selected { border-color:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.7); background:rgba(var(--rooms-rgb-5c84ee,92,132,238),0.13); box-shadow:0 0 0 2px rgba(var(--rooms-rgb-5c84ee,92,132,238),0.07); }
.transcription-scope-option strong { font-size:14px; }
.transcription-scope-option span { color:var(--muted); font-size:10px; line-height:1.48; overflow-wrap:anywhere; }
.transcription-scope-option em { margin-top:auto; color:rgb(var(--rooms-rgb-718198,113,129,152)); font-size:9px; font-style:normal; font-weight:800; }
.transcription-scope-option.selected em { color:rgb(var(--rooms-rgb-9dbbff,157,187,255)); }
.transcription-scope-actions { display:grid; grid-template-columns:minmax(120px,.36fr) minmax(160px,.64fr); gap:9px; margin-top:14px; }
.transcription-scope-actions button { width:100%; min-height:42px; white-space:nowrap; }
html[data-theme="light"] .transcription-scope-card { background:rgba(var(--rooms-rgb-f8fbff,248,251,255),0.98); }

/* Whiteboard: only actual tool state is active. Pencil settings form one compact group. */
.board-toolbar { overflow:visible; align-content:flex-start; }
.board-tool { white-space:nowrap; }
.board-pencil-controls { min-width:228px; min-height:36px; display:flex; align-items:center; gap:7px; padding:4px 7px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.022); }
.board-pencil-controls>label:first-child { min-width:0; flex:1 1 auto; display:grid; grid-template-columns:auto minmax(70px,1fr); align-items:center; gap:7px; color:rgb(var(--rooms-rgb-94a4b9,148,164,185)); font-size:9px; font-weight:760; }
.board-pencil-controls input[type="range"] { width:100%; min-width:70px; accent-color:rgb(var(--rooms-rgb-7ca6ff,124,166,255)); }
.board-pencil-controls output { width:34px; min-width:34px; height:26px; display:grid; place-items:center; border:1px solid var(--line); border-radius:7px; color:rgb(var(--rooms-rgb-e8eef8,232,238,248)); background:rgba(255,255,255,.035); font-size:10px; font-weight:800; }
.board-chalk-toggle { min-width:58px; height:28px; display:inline-flex!important; align-items:center; justify-content:center; gap:5px; margin:0; padding:0 7px; border:1px solid var(--line); border-radius:8px; color:#d8c37e; background:rgba(255,255,255,.025); cursor:pointer; }
.board-chalk-toggle input { position:absolute; opacity:0; pointer-events:none; }
.board-chalk-toggle b { color:rgb(var(--rooms-rgb-dbe6f7,219,230,247)); font-size:9px; }
.board-chalk-toggle:has(input:checked) { border-color:rgba(241,203,118,.46); background:rgba(241,203,118,.11); }
.board-pencil-controls.is-disabled { opacity:.42; }
.board-pencil-controls.is-disabled .board-chalk-toggle { cursor:default; }
.board-text-box.text-bold .board-text-editor { font-weight:800; }
.board-text-box.text-italic .board-text-editor { font-style:italic; }
.board-text-box.text-heading .board-text-editor { font-size:25px; line-height:1.2; font-weight:800; }
.board-window-actions { flex:0 0 auto; display:flex!important; align-items:center; gap:5px!important; }
.board-window-actions .icon-button { width:40px; min-width:40px; height:40px; min-height:40px; padding:0; display:grid; place-items:center; }
.board-window-actions .icon-button svg { width:17px; height:17px; }
.board-window-actions #boardWindowToggleBtn.active { color:rgb(var(--rooms-rgb-dce9ff,220,233,255)); border-color:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.48); background:rgba(var(--rooms-rgb-7ca6ff,124,166,255),0.14); }

@media (max-width:1180px) {
  .room-head-actions { flex-wrap:wrap; justify-content:flex-end; }
  .transcription-action { width:40px!important; min-width:40px!important; max-width:40px; padding:0!important; gap:0; flex:0 0 40px; overflow:visible; }
  .transcription-action .transcription-action-label,.transcription-action .transcription-action-state-text { display:none!important; }
  .transcription-action-state { position:absolute; right:-5px; top:-6px; width:17px!important; min-width:17px!important; height:17px; padding:0!important; border:1px solid rgba(255,255,255,.10); background:rgb(var(--rooms-rgb-56657a,86,101,122)); box-shadow:0 0 0 2px rgb(var(--rooms-rgb-09121e,9,18,30)); }
  .transcription-action-state::after { content:""; display:grid; place-items:center; width:100%; height:100%; font-size:10px; line-height:1; font-weight:900; }
  .transcription-action.is-ready .transcription-action-state { background:#1b5d3e; border-color:#64e6ac; }
  .transcription-action.is-ready .transcription-action-state::after { content:"✓"; color:#64e6ac; }
  .transcription-action.is-active .transcription-action-state { background:#6f2431; border-color:#ff7f8b; }
  .transcription-action.is-active .transcription-action-state::after { content:"•"; color:#ffb7bf; font-size:16px; }
  .transcription-run-action { width:40px!important; min-width:40px!important; max-width:40px; padding:0!important; gap:0; flex:0 0 40px; }
  .transcription-run-action span { display:none!important; }
  .transcription-run-action svg { margin:0; }

  .my-settings-grid,.my-settings-grid.interface { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .my-settings-grid.devices { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .my-settings-grid.devices .home-pref-toggle { grid-column:1 / -1; }

  .my-room-row { grid-template-columns:minmax(0,1fr); align-items:stretch; }
  .my-room-actions { width:100%; justify-content:flex-start; }
  .my-room-actions button { flex:1 1 140px; }
}

@media (max-width:900px) {
  /* Legacy mobile CSS used to hide transcription between 761-900px. Keep both controls available. */
  .room-head-actions #transcriptionBtn:not(.hidden),
  .room-head-actions #transcriptionRunBtn:not(.hidden) { display:inline-flex!important; }
  .topbar-actions { min-width:0; gap:6px; }
  .my-settings-button { width:36px; min-width:36px; height:36px; min-height:36px; padding:0; border-radius:50%; }
  .my-settings-button span { display:none; }
  .my-settings-card { width:100%; max-height:calc(var(--app-viewport-height,100dvh) - 16px); padding:18px; border-radius:22px; }
  .my-settings-grid,.my-settings-grid.devices,.my-settings-grid.interface { grid-template-columns:1fr 1fr; }
  .my-settings-actions { position:sticky; bottom:-18px; margin:12px -18px -18px; padding:12px 18px max(12px,env(safe-area-inset-bottom)); background:rgba(var(--rooms-rgb-0d1623,13,22,35),0.97); }
  html[data-theme="light"] .my-settings-actions { background:rgba(var(--rooms-rgb-f8fbff,248,251,255),0.98); }

  /* Override the old blanket mobile rule: these three header controls stay usable. */
  #whiteboardModal .board-window-actions #boardStageBtn,
  #whiteboardModal .board-window-actions #boardWindowToggleBtn,
  #whiteboardModal .board-window-actions #whiteboardCloseBtn { display:grid!important; }
  .board-window-head>div:first-child { min-width:0; flex:1 1 auto; }
  .board-window-head>div:first-child small { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .board-window-actions { margin-left:auto; }
  .board-toolbar { overflow:auto; align-content:flex-start; }
  .board-pencil-controls { min-width:min(100%,300px); }

  .transcript-modal { align-items:end; padding:8px 8px max(8px,env(safe-area-inset-bottom)); }
  .transcript-card { width:100%; max-height:calc(var(--app-viewport-height,100dvh) - 16px); padding:16px; border-radius:22px; }
  .transcript-modal-head { flex-direction:column; gap:10px; }
  .transcript-head-copy { width:100%; flex-basis:auto; padding-right:44px; }
  .transcript-head-actions { width:100%; justify-content:flex-start; }
  #transcriptCloseBtn { position:absolute; right:16px; top:16px; }
  #transcriptContinueBtn { order:-3; flex:1 0 100%; width:100%; }
  #transcriptDownloadBtn,#transcriptCopyBtn { flex:1 1 160px; }
  #transcriptCloseFooterBtn { flex:1 1 110px; }
  .transcript-body.transcript-sessions { padding:8px; }

  .transcription-scope-card { width:100%; }
  .transcription-scope-options { grid-template-columns:1fr; }
  .transcription-scope-option { min-height:96px; }
}

@media (max-width:760px) {
  /* Task 2.2: the transcription status control must never disappear on mobile. */
  .room-head-actions #transcriptionBtn:not(.hidden) { display:inline-flex!important; }
  .room-head-actions #transcriptionRunBtn:not(.hidden) { display:inline-flex!important; }
  .room-head-actions { max-width:none; flex:0 1 auto; min-width:0; }
  .room-title-group { min-width:0; flex:1 1 150px; }

  .my-rooms { padding:16px; }
  .my-rooms-head>div:first-child { flex-basis:100%; }
  .my-rooms-head-controls { width:100%; margin-left:0; justify-content:space-between; }
  .my-room-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .my-room-actions button { width:100%; min-width:0; padding-inline:8px; }

  .transcript-session-toggle { grid-template-columns:minmax(0,1fr) auto; gap:7px; }
  .transcript-session-status { grid-column:2; grid-row:1; min-width:0; width:17px; height:17px; padding:0; overflow:hidden; color:transparent; border-radius:9px; position:relative; }
  .transcript-session-status::after { content:"✓"; position:absolute; inset:0; display:grid; place-items:center; color:#64e6ac; font-size:10px; line-height:1; }
  .transcript-session-chevron { grid-column:2; grid-row:2; justify-self:center; }
  .transcript-session-footer { align-items:stretch; }
  .transcript-session-retention { flex-basis:100%; }
  .transcript-session-actions { width:100%; justify-content:stretch; }
  .transcript-session-actions .transcript-session-delete { flex:0 0 96px; }
  .transcript-session-actions .transcript-session-copy { flex:1 1 auto; min-width:0; }
  .transcript-delete-actions { grid-template-columns:1fr 1fr!important; }
  .transcript-delete-actions button { width:100%!important; }
}

@media (max-width:560px) {
  .brand-copy small { display:none; }
  .account-button { min-width:0; max-width:128px; padding-inline:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .my-settings-grid,.my-settings-grid.devices,.my-settings-grid.interface { grid-template-columns:1fr; }
  .my-settings-grid.devices .home-pref-toggle { grid-column:auto; }
  .my-settings-actions { display:grid; grid-template-columns:1fr 1fr; }
  .my-settings-actions button { min-width:0; width:100%; padding-inline:6px; font-size:11px; }

  .transcript-head-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
  #transcriptContinueBtn { grid-column:1 / -1; width:100%; }
  #transcriptDownloadBtn,#transcriptCopyBtn,#transcriptCloseFooterBtn { width:100%; min-width:0; }
  #transcriptCloseFooterBtn { grid-column:1 / -1; }
  .transcript-session-title b,.transcript-session-title small { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
  .transcript-session-text { font-size:16px; }

  .transcription-scope-actions { grid-template-columns:minmax(100px,.38fr) minmax(140px,.62fr); }
  .transcription-scope-option span { font-size:11px; }

  .board-toolbar { gap:6px; padding:7px 8px; }
  .board-divider { display:none; }
  .board-pencil-controls { order:2; flex:1 1 100%; min-width:0; width:100%; }
  .board-pencil-controls>label:first-child { grid-template-columns:auto minmax(60px,1fr); }
  .board-text-formatting { flex:1 1 auto; flex-wrap:wrap; }
}

/* Final selector authority after the legacy client-surface stylesheet. */
.transcript-session-heading { min-width:0; display:flex; flex-direction:column; gap:3px; }
.transcript-session-heading b,.transcript-session-heading small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.transcript-session-heading b { font-size:11px; }
.transcript-session-heading small { color:var(--muted); font-size:9px; }
.transcript-session-right { flex:0 0 auto; display:flex; align-items:center; gap:8px; }
.transcript-session-footer>small { flex:1 1 260px; min-width:0; color:rgb(var(--rooms-rgb-718198,113,129,152)); font-size:9px; line-height:1.4; overflow-wrap:anywhere; }

html.buddy-room-active .br-room-header-responsive .transcription-action {
  min-width:0!important; height:40px!important; min-height:40px!important; display:inline-flex!important; align-items:center!important; justify-content:center!important; gap:7px!important; padding:0 10px!important; white-space:nowrap!important; overflow:visible!important;
}
html.buddy-room-active .br-room-header-responsive .transcription-action > .transcription-action-label { display:inline-block!important; white-space:nowrap!important; }
html.buddy-room-active .br-room-header-responsive .transcription-action-state { position:relative!important; inset:auto!important; width:auto!important; min-width:7px!important; height:24px!important; padding:0 7px!important; display:inline-flex!important; align-items:center!important; justify-content:center!important; border:0!important; border-radius:999px!important; box-shadow:none!important; background:rgba(var(--rooms-rgb-8697b4,134,151,180),0.14)!important; }
html.buddy-room-active .br-room-header-responsive .transcription-action-state-text { display:block!important; font-size:8px!important; line-height:1!important; }
html.buddy-room-active .br-room-header-responsive .transcription-action.is-ready .transcription-action-state { min-width:66px!important; color:#d9f7e5!important; border:1px solid rgba(75,211,137,.42)!important; background:rgba(24,118,72,.34)!important; }
html.buddy-room-active .br-room-header-responsive .transcription-action.is-ready .transcription-action-state::before { content:"✓"!important; flex:0 0 14px!important; width:14px!important; height:14px!important; display:grid!important; place-items:center!important; border-radius:50%!important; color:#f5fff9!important; background:#24c979!important; font:900 10px/14px "Segoe UI Variable","Segoe UI",sans-serif!important; }

@media (max-width:1180px) {
  html.buddy-room-active .br-room-header-responsive .transcription-action { width:40px!important; min-width:40px!important; max-width:40px!important; padding:0!important; gap:0!important; flex:0 0 40px!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-action > .transcription-action-label,
  html.buddy-room-active .br-room-header-responsive .transcription-action-state-text,
  html.buddy-room-active .br-room-header-responsive .transcription-action.is-ready .transcription-action-state-text,
  html.buddy-room-active .br-room-header-responsive .transcription-action.is-active .transcription-action-state-text { display:none!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-action-state { position:absolute!important; left:auto!important; right:-5px!important; top:-6px!important; bottom:auto!important; width:17px!important; min-width:17px!important; height:17px!important; padding:0!important; border:2px solid rgb(var(--rooms-rgb-0d1725,13,23,37))!important; border-radius:50%!important; box-shadow:none!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-action.is-ready .transcription-action-state { width:17px!important; min-width:17px!important; height:17px!important; padding:0!important; background:#1b5d3e!important; border-color:rgb(var(--rooms-rgb-0d1725,13,23,37))!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-action.is-ready .transcription-action-state::before { content:"✓"!important; flex:0 0 13px!important; width:13px!important; height:13px!important; background:#24c979!important; font-size:8px!important; line-height:13px!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-action.is-active .transcription-action-state { width:17px!important; min-width:17px!important; height:17px!important; padding:0!important; border:2px solid rgb(var(--rooms-rgb-0d1725,13,23,37))!important; background:#6f2431!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-action.is-active .transcription-action-state::before { content:"•"!important; flex:0 0 13px!important; width:13px!important; height:13px!important; display:grid!important; place-items:center!important; border-radius:50%!important; color:#ffd3d8!important; background:#b83b4d!important; font-size:13px!important; line-height:13px!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-run-action { width:40px!important; min-width:40px!important; max-width:40px!important; padding:0!important; flex:0 0 40px!important; }
  html.buddy-room-active .br-room-header-responsive .transcription-run-action > span { display:none!important; }
}

@media (max-width:900px) {
  #whiteboardModal .board-toolbar { overflow:visible!important; flex-wrap:wrap!important; }
  .transcript-session-footer>small { flex:0 0 auto; width:100%; }
  .transcript-session-actions { width:100%; justify-content:stretch; }
}

@media (max-width:760px) {
  .transcript-session-toggle { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
  .transcript-session-heading { flex:1 1 auto; }
  .transcript-session-right { flex:0 0 22px; width:22px; display:grid; grid-template-rows:18px 18px; place-items:center; gap:3px; }
  .transcript-session-status { grid-row:1; width:17px!important; min-width:17px!important; height:17px!important; min-height:17px!important; padding:0!important; overflow:hidden; color:transparent!important; border-radius:50%!important; position:relative; }
  .transcript-session-status::after { position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-size:9px; line-height:1; font-style:normal; font-weight:900; }
  .transcript-session-status.ready::after { content:"✓"; color:#eafff2; }
  .transcript-session-status.active::after { content:"•"; font-size:14px; color:rgb(var(--rooms-rgb-e8f0ff,232,240,255)); }
  .transcript-session-status.pending::after { content:"…"; color:#fff0c9; }
  .transcript-session-status.failed::after { content:"!"; color:#ffe1e5; }
  .transcript-session-chevron { grid-row:2; width:18px; }
}


/* Buddy Rooms 0.21.108 – Stage 5 whiteboard toolbar docking.
   Local-only presentation preference. It never participates in board sync/state. */

.whiteboard-shell .board-window-head,
.whiteboard-shell .board-toolbar,
.whiteboard-shell .board-canvas-wrap {
  grid-column:1;
}

.whiteboard-shell .board-window-head { grid-row:1; }
.whiteboard-shell .board-toolbar { grid-row:2; }
.whiteboard-shell .board-canvas-wrap { grid-row:3; }

.whiteboard-shell.board-toolbar-dock-bottom {
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
}
.whiteboard-shell.board-toolbar-dock-bottom .board-window-head { grid-row:1!important; }
.whiteboard-shell.board-toolbar-dock-bottom .board-canvas-wrap { grid-row:2!important; }
.whiteboard-shell.board-toolbar-dock-bottom .board-toolbar {
  grid-row:3!important;
  border-top:1px solid var(--line)!important;
  border-bottom:0!important;
  padding-bottom:max(8px, env(safe-area-inset-bottom))!important;
}

.whiteboard-shell:not(.board-toolbar-dock-bottom) .board-toolbar {
  border-top:0;
}

.board-toolbar-dock-toggle {
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  margin-left:auto;
  font-size:18px!important;
  line-height:1!important;
  font-weight:850!important;
  color:rgb(var(--rooms-rgb-bdd2ff,189,210,255));
}
.board-toolbar-dock-toggle[aria-pressed="true"] {
  color:#f4d687;
  border-color:rgba(241,203,118,.42);
  background:rgba(241,203,118,.10);
}
.board-toolbar-dock-toggle > span { transform:translateY(-1px); }
.whiteboard-shell.board-toolbar-dock-bottom .board-toolbar-dock-toggle > span { transform:translateY(1px); }

/* Stage surface had an older !important row contract. Stage 5 deliberately overrides
   only the row placement while keeping all existing stage geometry intact. */
html.buddy-room-active [data-buddy-board-root="true"][data-buddy-board-surface="stage"] .whiteboard-shell.board-toolbar-dock-bottom {
  grid-template-rows:auto minmax(0,1fr) auto!important;
}
html.buddy-room-active [data-buddy-board-root="true"][data-buddy-board-surface="stage"] .whiteboard-shell.board-toolbar-dock-bottom .board-canvas-wrap {
  grid-row:2!important;
}
html.buddy-room-active [data-buddy-board-root="true"][data-buddy-board-surface="stage"] .whiteboard-shell.board-toolbar-dock-bottom .board-toolbar {
  grid-row:3!important;
}

/* The shell is re-parented into the same-origin popout. Keeping the state class on
   the shell makes docking survive that move without any board-state rewrite. */
html.buddy-board-popout .whiteboard-shell.board-toolbar-dock-bottom {
  grid-template-rows:auto minmax(0,1fr) auto!important;
}
html.buddy-board-popout .whiteboard-shell.board-toolbar-dock-bottom .board-canvas-wrap { grid-row:2!important; }
html.buddy-board-popout .whiteboard-shell.board-toolbar-dock-bottom .board-toolbar { grid-row:3!important; }

@media (max-width:900px) {
  .board-toolbar-dock-toggle {
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    flex:0 0 32px!important;
  }
  .whiteboard-shell.board-toolbar-dock-bottom .board-toolbar {
    padding-bottom:max(7px, env(safe-area-inset-bottom))!important;
  }
}

/* Stage 6 – ephemeral whiteboard pointer. Presentation-only overlay; never board history. */
.board-pointer-tool { display:inline-flex; align-items:center; gap:6px; }
.board-pointer-dot { width:8px; height:8px; flex:0 0 8px; border-radius:50%; background:#ff4f8b; box-shadow:0 0 0 2px rgba(255,79,139,.16),0 0 10px rgba(255,79,139,.52); }
.board-pointer-tool.active { border-color:rgba(255,79,139,.58); background:rgba(255,79,139,.12); }
.board-pointer-tool.active .board-pointer-dot { box-shadow:0 0 0 2px rgba(255,79,139,.24),0 0 14px rgba(255,79,139,.78); }
.board-pointer-canvas { position:absolute; inset:0; z-index:1; display:block; width:100%; height:100%; pointer-events:none; border-radius:10px; }
#boardCanvas { z-index:0; }
.board-text-layer { z-index:2; }
#boardCanvas.board-mode-pointer { cursor:crosshair; }
.board-pencil-controls.is-pointer-mode .board-chalk-toggle { opacity:.35; }

