#preview-view.active { position: fixed; inset: 0; z-index: 30; min-height: 0; height: 100dvh; width: 100%; background: white; }
body:has(#preview-view.active) { overflow: hidden; }
#preview-view .preview-surface { min-height: 0; height: calc(100% - 42px); }
#preview-identity { height: 42px; padding: 10px 16px; background: var(--panel); color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 1px solid var(--line); }
#preview-view iframe { height: 100%; width: 100%; }
#preview-empty { padding: 24px; }
#preview-configure { margin-top: 18px; padding: 12px 18px; border: 0; border-radius: 20px; background: var(--blue); color: white; }
.preview-floating-tools { position: absolute; z-index: 5; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#preview-toggle { height: 52px; width: 52px; display: grid; place-items: center; padding: 0; background: var(--blue); color: white; border: 0; border-radius: 50%; box-shadow: 0 6px 22px rgba(64,35,27,.3); }
#preview-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#preview-process-state { padding: 5px 9px; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); font-size: 11px; color: var(--muted); }
.preview-actions { display: flex; flex-direction: column; gap: 8px; }
.preview-actions[hidden], .preview-terminal[hidden] { display: none; }
.preview-actions button { min-height: 44px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); text-align: right; }
.preview-terminal { position: absolute; inset: 14px 14px 100px auto; z-index: 4; width: min(560px, calc(100% - 28px)); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); box-shadow: 0 16px 48px rgba(0,0,0,.25); }
.preview-terminal-head { display: flex; gap: 10px; padding: 12px; align-items: center; justify-content: space-between; }
.preview-terminal-head strong, .preview-terminal-head span { display: block; }
.preview-terminal-head span { margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.preview-terminal-head button { min-height: 44px; border: 0; background: var(--raised); color: var(--blue); border-radius: 10px; padding: 10px; }
.preview-terminal .terminal-output { min-height: 0; }
.preview-settings-form { padding: 16px; }
.preview-settings-form label { display: grid; gap: 6px; margin-bottom: 16px; font-size: 12px; color: var(--muted); }
.preview-settings-form input { width: 100%; min-height: 44px; padding: 10px; font-size: 16px; }
.preview-settings-form p { font-size: 12px; line-height: 1.5; color: var(--muted); }
#preview-toggle:focus-visible, .preview-actions button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
