/* Local-only visual experiment. Removing the capability flag leaves this dormant. */
.live-build-preview[hidden] { display: none !important; }
.live-build-preview {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 15% 15%, #e9eefb, transparent 60%), radial-gradient(ellipse at 85% 85%, #e7f5ef, transparent 65%), #f7f9fc;
  color: #173042;
}
.has-live-build-preview > #outputviewmode, .has-live-build-preview > #workspaceCanvasLoading { visibility: hidden !important; pointer-events: none !important; }
.live-build-preview-frame-slot, .live-build-preview-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-build-preview-frame { pointer-events: none; background: #fff; }
.live-build-preview-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: progress;
  touch-action: none;
  background: rgba(239, 245, 251, .16);
  box-shadow: inset 0 0 0 5px rgba(90, 129, 184, .18);
}
.live-build-preview-note {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: max(88px, calc(env(safe-area-inset-top) + 72px));
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  width: min(480px, calc(100% - 32px));
  padding: 16px 19px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(205, 221, 249, .94), rgba(220, 244, 232, .94));
  box-shadow: 0 8px 35px rgba(33, 62, 91, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
  font-family: system-ui, sans-serif;
}
.live-build-preview-note h2 { margin: 0 0 5px; font-size: 15px; line-height: 1.4; font-weight: 700; color: #193344; }
.live-build-preview-note p { margin: 0; font-size: 12px; line-height: 1.55; color: #375468; }
.live-build-preview-orbit { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; border: 2px solid rgba(57, 92, 113, .18); border-top-color: #45718a; border-right-color: #528d78; border-radius: 50%; animation: livePreviewSpin 1.8s linear infinite; }
@keyframes livePreviewSpin { to { transform: rotate(360deg); } }
@media (max-width: 420px) {
  .live-build-preview-note { top: max(78px, calc(env(safe-area-inset-top) + 65px)); gap: 9px; padding: 13px 14px; width: calc(100% - 24px); border-radius: 17px; }
  .live-build-preview-note h2 { font-size: 13px; }
  .live-build-preview-note p { font-size: 11px; }
}
@media (max-width: 620px) {
  /* A captured desktop page is scaled on small screens. Keep the notice out
     of that thumbnail instead of covering it with the expanded explanation. */
  .has-live-snapshot .live-build-preview-note {
    top: max(16px, env(safe-area-inset-top));
    left: 64px;
    right: 12px;
    width: auto;
    transform: none;
    padding: 10px 11px;
    gap: 8px;
    border-radius: 16px;
    align-items: center;
  }
  .has-live-snapshot .live-build-preview-note h2 { margin: 0; font-size: 12px; line-height: 1.4; }
  .has-live-snapshot .live-build-preview-orbit { width: 12px; height: 12px; margin: 0; }
  .has-live-snapshot .live-build-preview-note p {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) { .live-build-preview-orbit { animation: none; } }

/* Friendly visual-first layer. The backdrop is raster pixels, never candidate
   execution. Technical text is available only after opening native details. */
.live-build-preview [hidden] { display: none !important; }
body#devbody.has-friendly-build #loadingMessage.guided-build-status > :not(.guided-live-status-row) { display: none !important; }
body#devbody.has-friendly-build #loadingMessage.guided-build-status { padding: 13px 16px; }
.live-build-preview.is-friendly { --friendly-dock-space: 260px; background: radial-gradient(ellipse at 12% 18%, #d7e1fa, transparent 65%), radial-gradient(ellipse at 92% 75%, #d7f0e5, transparent 66%), #f1f6f8; }
.is-friendly .live-build-preview-note { top: 88px; width: min(620px, calc(100% - 48px)); max-height: calc(100% - 88px - var(--friendly-dock-space)); overflow: auto; padding: 26px; gap: 15px; border-radius: 26px; pointer-events: auto; background: linear-gradient(115deg, #e3edffef, #e4f5eeef); box-shadow: 0 18px 70px #3655771c, inset 0 1px #ffffffd1; }
.is-friendly .live-build-preview-note :where(*) { font-family: inherit; }
.is-friendly .live-build-preview-copy { width: 100%; min-width: 0; }
.is-friendly .live-build-preview-note h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.7px; margin: 0 0 10px; color: #183950; }
.is-friendly .live-build-preview-note p { font-size: 12px; line-height: 1.6; color: #4b6678; }
.is-friendly .live-build-preview-orbit { width: 20px; height: 20px; margin-top: 4px; border-width: 2px; }
.live-build-friendly { margin-top: 22px; }
.live-build-friendly-status { display: flex; align-items: flex-start; gap: 9px; min-height: 20px; }
.live-build-friendly-status strong { font-size: 13px; font-weight: 600; color: #245b56; line-height: 1.6; }
.live-build-friendly-dot { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: #3b9a7d; flex-shrink: 0; }
.live-build-friendly-meta { display: flex; justify-content: space-between; gap: 12px; margin: 15px 0 0; font-size: 10px; color: #617787; font-variant-numeric: tabular-nums; }
.live-build-friendly-meta > span:first-child { color: #476878; background: #fff5; border: 1px solid #ffffffa3; border-radius: 20px; padding: 3px 8px; }
.live-build-friendly-meta > span:last-child { align-self: center; }
.is-friendly .live-build-preview-note .live-build-preview-label { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid #52748320; font-size: 10px; color: #426777; }
.is-friendly .live-build-preview-note .live-build-long-wait { font-size: 10px; color: #695e3e; margin-top: 12px; }
.live-build-behind-scenes { margin-top: 18px; padding-top: 14px; border-top: 1px solid #52748320; }
.live-build-behind-scenes > summary { cursor: pointer; color: #385f76; font-size: 11px; font-weight: 600; line-height: 1.5; }
.live-build-behind-scenes > summary > span { float: right; color: #758998; font-size: 9px; font-weight: 400; }
.live-build-behind-scenes > summary:focus-visible { outline: 2px solid #417e8e; outline-offset: 5px; border-radius: 3px; }
.is-friendly.has-live-snapshot .live-build-preview-shield { background: #ecf3f51f; box-shadow: inset 0 0 0 4px #82aeac35; }
.is-friendly.has-live-snapshot .live-build-preview-note { top: auto; bottom: var(--friendly-dock-space); }
@media (max-width: 620px) {
  .is-friendly .live-build-preview-note, .is-friendly.has-live-snapshot .live-build-preview-note { top: 74px; left: 12px; right: 12px; width: auto; transform: none; padding: 18px 16px; max-height: calc(100% - 74px - var(--friendly-dock-space)); border-radius: 20px; gap: 10px; align-items: flex-start; }
  .is-friendly.has-live-snapshot .live-build-preview-note { top: auto; bottom: var(--friendly-dock-space); }
  .is-friendly .live-build-preview-note h2, .is-friendly.has-live-snapshot .live-build-preview-note h2 { font-size: 20px; line-height: 1.3; margin-bottom: 8px; letter-spacing: -.4px; }
  .is-friendly.has-live-snapshot .live-build-preview-note p { position: static; width: auto; height: auto; clip-path: none; overflow: visible; white-space: normal; }
  .is-friendly .live-build-preview-note p { font-size: 11px; }
  .is-friendly .live-build-preview-orbit, .is-friendly.has-live-snapshot .live-build-preview-orbit { width: 15px; height: 15px; margin-top: 4px; }
  .live-build-friendly { margin-top: 16px; }
  .live-build-friendly-status strong { font-size: 11px; }
  .live-build-friendly-meta { font-size: 9px; }
  .live-build-behind-scenes { margin-top: 14px; padding-top: 12px; }
  .live-build-behind-scenes > summary { font-size: 10px; }
  .live-build-behind-scenes > summary > span { font-size: 8px; }
}

/* Keep progress compact once the latest working preview is available. */
.is-friendly.has-live-snapshot .live-build-preview-note {
  top: auto;
  bottom: var(--friendly-dock-space);
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 88px - var(--friendly-dock-space));
  padding: 14px 16px;
  border-radius: 18px;
  gap: 10px;
}
.is-friendly.has-live-snapshot .live-build-preview-note :is(h2, #liveBuildPreviewDetail) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.is-friendly.has-live-snapshot .live-build-friendly { margin-top: 0; }
.is-friendly.has-live-snapshot .live-build-friendly-meta { margin-top: 8px; }
.is-friendly.has-live-snapshot .live-build-preview-note .live-build-preview-label { margin-top: 8px; padding-top: 8px; }
.is-friendly.has-live-snapshot .live-build-preview-orbit { width: 14px; height: 14px; margin-top: 3px; }
.is-friendly.has-live-snapshot .live-build-preview-shield { background: transparent; box-shadow: none; }
@media (max-width: 620px) {
  .is-friendly.has-live-snapshot .live-build-preview-note { left: 12px; right: 12px; width: auto; padding: 12px 14px; }
}
