.html-shell { width: 100%; max-width: none; }
.preview-layout {
  --editor-pane: 50%;
  grid-template-columns: minmax(300px, var(--editor-pane)) 14px minmax(300px, 1fr);
  gap: 0;
  align-items: stretch;
}
.editor-panel, .preview-panel { min-width: 0; min-height: 660px; }
.editor-panel { border-top-right-radius: 16px; border-bottom-right-radius: 16px; }
.preview-panel { border-top-left-radius: 16px; border-bottom-left-radius: 16px; }
.code-editor { flex: 1; min-height: 520px; font: 13px/1.55 var(--mono); tab-size: 2; }
#previewFrame { width: 100%; min-height: 540px; flex: 1; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.preview-resizer {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 14px;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
.preview-resizer::before { content: ""; position: absolute; width: 3px; height: calc(100% - 28px); border-radius: 99px; background: #cbd5e1; transition: background .15s ease, width .15s ease; }
.preview-resizer span { position: relative; width: 34px; height: 48px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--accent); background: #fff; box-shadow: var(--shadow-sm); }
.preview-resizer .fa-icon { width: 14px; height: 14px; }
.preview-resizer:hover::before, .preview-resizer:focus-visible::before, .preview-resizer.is-dragging::before { width: 5px; background: #60a5fa; }
.preview-resizer:focus-visible span { box-shadow: 0 0 0 4px rgba(96,165,250,.2); }
.preview-panel:fullscreen { padding: 18px; background: #fff; }
.preview-panel:fullscreen #previewFrame { height: calc(100vh - 90px); }
.preview-actions .btn { white-space: nowrap; }
@media (max-width: 980px) {
  .preview-layout { grid-template-columns: 1fr; gap: 14px; }
  .preview-resizer { display: none; }
  .editor-panel, .preview-panel { min-height: 0; border-radius: var(--radius-lg); }
  .code-editor, #previewFrame { min-height: 440px; }
}
