/* Synthesize uses the same triggers in both layouts. */
#toolOverlay [hidden] { display: none !important; }
.synth-layout-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #bbb; border-radius: 6px; }
.synth-layout-switch .about-button { min-width: 58px; min-height: 28px; border: 0; padding: 0 10px; }
.synth-layout-switch .about-button[aria-pressed="true"] { background: #ffcf00; color: #111; }
/* The scene occupies the viewport; the capture dock and navigation float above it. */
#toolOverlay[data-layout="cloud"] > .main { position: absolute; inset: 0; height: 100%; padding: 0 !important; overflow: hidden; }
#synthCloud { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
#synthCloud .cloud-workspace { position: absolute; inset: 0; border: 0; border-radius: 0; overflow: visible; }
#synthCloud #cloudStage { width: 100%; height: 100%; min-height: 0; overflow: hidden; overflow: clip; }
#synthCloud .cloud-shift-hint { position: absolute; z-index: 700; top: calc(var(--synth-toolbar-offset, var(--synth-toolbar-height, 58px)) + 12px); right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; pointer-events: none; color: #666; font-size: 11px; line-height: 1.4; transition: top 220ms ease; }
#synthCloud .cloud-shift-hint kbd { padding: 3px 9px; border: 1px solid #aaa; border-bottom-width: 2px; border-radius: 4px; background: #fafaf7e8; color: #333; font: 11px/1.4 ui-monospace, monospace; }
#synthCloud .cloud-shift-hint.is-active kbd { background: #ffcf00; border-color: #171717; }
#toolOverlay.is-toolbar-hidden #synthCloud .cloud-shift-hint { top: 40px; }
#synthCloud .cloud-screen-reader-help { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#synthCloud .trigger-preview { max-height: calc(100dvh - var(--capture-visible-height, var(--capture-dock-height, 200px)) - var(--synth-toolbar-offset, var(--synth-toolbar-height, 58px)) - 52px); }
#synthCloud.is-empty #cloudStage::after { content: 'Choose trigger sources in the menu to fill your cloud.'; position: absolute; inset: 45% 24px auto; color: #666; font-size: 14px; text-align: center; }
#synthCloud .preview-actions { flex-wrap: wrap; }
#toolOverlay > .topbar { position: relative; z-index: 80; margin-top: 0; transition: margin-top 220ms ease, opacity 180ms ease; }
#toolOverlay > .main { height: calc(100dvh - var(--synth-toolbar-offset, var(--synth-toolbar-height, 58px))); transition: height 220ms ease; }
#toolOverlay.is-toolbar-hidden { --synth-toolbar-offset: 0px; }
#toolOverlay.is-toolbar-hidden > .topbar { margin-top: calc(-1 * var(--synth-toolbar-height, 58px)); opacity: 0; pointer-events: none; }
#toolOverlay .synth-toolbar-reveal { position: absolute; z-index: 90; top: 0; left: 50%; transform: translateX(-50%) !important; min-height: 24px; padding: 3px 12px; border: 1px solid #aaa; border-top: 0; border-radius: 0 0 6px 6px; background: #fff; color: #444; font-size: 11px; }
/* Keep small handles on mobile, where generic buttons otherwise fill the width. */
#toolOverlay .synth-toolbar-reveal, #toolOverlay .synth-capture-toggle { width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; }
#toolOverlay .synth-toolbar-reveal, #toolOverlay .synth-capture-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 5px; line-height: 16px; }
#toolOverlay .synth-tab-chevron { display: block; flex: 0 0 12px; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
#toolOverlay .synth-toolbar-reveal .synth-tab-chevron,
#toolOverlay .synth-capture-toggle[aria-expanded="true"] .synth-tab-chevron { transform: rotate(180deg); }
/* Keep a small, reachable handle when the input slides offscreen. */
#toolOverlay > .bottom-dock { transition: transform 220ms ease, opacity 180ms ease; }
#toolOverlay .synth-capture-toggle { position: absolute; z-index: 30; left: 50%; bottom: calc(var(--capture-dock-bottom, 18px) + var(--capture-dock-height, 200px) - 2px); transform: translateX(-50%) !important; min-height: 28px; padding: 3px 12px; border: 1px solid #aaa; border-bottom: 0; border-radius: 6px 6px 0 0; background: #fff; color: #444; font-size: 11px; line-height: 20px; cursor: pointer; touch-action: manipulation; transition: bottom 220ms ease; }
#toolOverlay .synth-capture-toggle:is(:hover, :focus-visible) { background: #ffcf00; color: #111; }
#toolOverlay.is-capture-hidden { --capture-visible-height: 0px; }
#toolOverlay.is-capture-hidden > .bottom-dock { transform: translate(-50%, calc(100% + var(--capture-dock-bottom, 18px) + 20px)); opacity: 0; pointer-events: none; }
#toolOverlay.is-capture-hidden .synth-capture-toggle { bottom: 0; padding-bottom: calc(3px + env(safe-area-inset-bottom, 0px)); }
#toolOverlay:is(.sources-only, .brainsync-host) > .synth-capture-toggle,
#toolOverlay:is(.sources-only, .brainsync-host) > .synth-toolbar-reveal,
#toolOverlay:has(> #flowOverlay:not([hidden]), > #brainsyncOverlay:not([hidden])) > :is(.synth-capture-toggle, .synth-toolbar-reveal) { display: none; }
@media (max-width: 480px) {
  #toolOverlay.is-capture-hidden .synth-capture-toggle { left: auto; right: 12px; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  #toolOverlay > .topbar, #toolOverlay > .main, #synthCloud .cloud-shift-hint, #toolOverlay > .bottom-dock, #toolOverlay .synth-capture-toggle { transition-duration: 0s; }
}
@media (max-width: 640px) {
  #toolOverlay .topbar .brand { margin-right: auto; }
  #toolOverlay .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  #toolOverlay .synth-layout-switch { padding: 2px; gap: 2px; }
  #toolOverlay .synth-layout-switch .about-button { min-width: 44px; min-height: 28px; padding: 0 7px; }
  #synthCloud .cloud-shift-hint { right: 12px; font-size: 10px; }
}
