/* LiveLoop Render (owner, 2026-10-05). body.liveloop-render keeps LiveLoop
   where the Portal docked it and turns it into a framed final render: a title
   bar inside the frame, the stage, and one dock at the foot with voice, the
   prompt box and the Camera control. Driven by liveloop-render.js. */
:root { --llr-bar-h: 52px; --llr-dock-h: 92px; --llr-w: min(760px, calc(100% - 190px)); }

#llr-bar, #llr-mic, #llr-camera { display: none; }

/* The frame. */
:root:root:root:root body.liveloop-render #liveloop-container {
  border-radius: 22px !important; overflow: hidden !important;
  border: 1px solid rgba(196, 181, 253, .28) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 30px 80px rgba(0,0,0,.55), 0 0 60px rgba(124, 58, 237, .18) !important;
  background: #050507 !important;
}
:root:root:root:root body.liveloop-render #liveloop-container .liveloop-header,
:root:root:root:root body.liveloop-render #liveloop-bridge-panel,
:root:root:root:root body.liveloop-render #liveloop-git-panel,
:root:root:root:root body.liveloop-render #liveloop-terminal { display: none !important; }

/* The title bar, inside the frame. */
:root:root:root:root body.liveloop-render #llr-bar {
  display: flex; align-items: center; gap: 12px; flex: 0 0 var(--llr-bar-h); height: var(--llr-bar-h);
  padding: 0 14px 0 20px; position: relative; z-index: 5;
  background: linear-gradient(180deg, rgba(24, 20, 38, .96), rgba(10, 10, 16, .96));
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #ececf4; font: 600 13px/1 Inter, system-ui, sans-serif;
}
body.liveloop-render #llr-bar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .7), rgba(244, 114, 182, .5), transparent);
}
#llr-bar .llr-brand { display: inline-flex; align-items: baseline; gap: 8px; font: 800 17px/1 ui-monospace, Menlo, monospace; letter-spacing: .02em; color: #fff; }
#llr-bar .llr-brand small { font: 700 10px/1 Inter, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #9d9db4; }
#llr-bar .llr-sep { width: 1px; height: 18px; background: rgba(255,255,255,.12); }
#llr-bar .llr-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b9b9cc; font-weight: 600; }
#llr-bar .llr-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: #d6d6e4; font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
#llr-bar .llr-status i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
#llr-bar .llr-status[data-state="working"] i { background: #a78bfa; box-shadow: 0 0 8px #a78bfa; animation: llr-pulse 1.1s ease-in-out infinite; }
#llr-bar .llr-close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: #e8e8f0; cursor: pointer; font-size: 14px; }
#llr-bar .llr-close:hover { border-color: #a78bfa; color: #fff; background: rgba(167,139,250,.14); }
@keyframes llr-pulse { 0%,100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* The stage fills the frame above the dock. */
:root:root:root:root body.liveloop-render #liveloop-viewport,
:root:root:root:root body.liveloop-render #liveloop-code-view,
:root:root:root:root body.liveloop-render #liveloop-project-files-view { bottom: var(--llr-dock-h) !important; }
:root:root:root:root body.liveloop-render #liveloop-stage { background: #050507 !important; }

/* The dock: voice, the prompt box alone, Camera. */
:root:root:root:root body.liveloop-render #liveloop-chat.live-chat-panel {
  position: absolute !important; display: block !important; left: 50% !important; right: auto !important; top: auto !important;
  bottom: 16px !important; width: var(--llr-w) !important; height: auto !important; max-height: none !important; min-height: 0 !important;
  transform: translateX(-50%) !important; padding: 7px !important; z-index: 6 !important;
  border: 1px solid rgba(255,255,255,.14) !important; border-radius: 18px !important;
  background: rgba(14, 13, 22, .96) !important; box-shadow: 0 12px 40px rgba(0,0,0,.45) !important;
}
:root:root:root:root body.liveloop-render #liveloop-chat.live-chat-panel > :not(.live-chat-compose):not(.live-chat-files) { display: none !important; }
:root:root:root:root body.liveloop-render #llr-mic,
:root:root:root:root body.liveloop-render #llr-camera {
  display: grid; place-items: center; position: absolute; bottom: 22px; z-index: 6; width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16); background: rgba(14, 13, 22, .96); color: #e8e8f0; font-size: 17px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
body.liveloop-render #llr-mic { left: calc(50% - var(--llr-w) / 2 - 66px); }
body.liveloop-render #llr-camera { left: calc(50% + var(--llr-w) / 2 + 16px); }
body.liveloop-render .llr-round:hover { border-color: #a78bfa; color: #fff; }
body.liveloop-render .llr-round[aria-pressed="true"] { background: linear-gradient(135deg, #7c3aed, #c026d3); border-color: rgba(255,255,255,.35); color: #fff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .25), 0 10px 30px rgba(124, 58, 237, .45); }
body.liveloop-render.llr-voice #llr-mic { animation: llr-ring 1.6s ease-out infinite; }
@keyframes llr-ring { 0% { box-shadow: 0 0 0 0 rgba(167,139,250,.55); } 100% { box-shadow: 0 0 0 16px rgba(167,139,250,0); } }

/* Narrow frames: the round buttons sit inside the dock's width. */
@media (max-width: 900px) {
  :root { --llr-w: calc(100% - 150px); }
}
@media (prefers-reduced-motion: reduce) {
  #llr-bar .llr-status[data-state="working"] i, body.liveloop-render.llr-voice #llr-mic { animation: none; }
}
