/* ==========================================================================
   Product renders — device frames and faithful recreations of the app UI
   (prompter, editor, phone remote, settings) plus explanatory illustrations.
   Everything scales with its container (container queries, cqw units).
   ========================================================================== */

:root {
  --ui-font: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --prompt-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ui-bg: #0a0a0a;
  --ui-card: #141414;
  --ui-border: #2a2a2a;
  --ui-muted: #737373;
  --ui-blue: #3b82f6;
  --ui-green: #30d158;
  --cue-red: #ef4444;
  --peer-a: #f59e0b;   /* collaborator colors */
  --peer-b: #22d3ee;
}

/* Renders sit inside centered sections; the app itself left-aligns. */
.ui-prompter, .ui-editor, .ui-settings, .ui-remote { text-align: left; }

/* ---------- Device frames ---------- */
.device { position: relative; margin: 0 auto; }

.device-mac { width: 100%; }
.device-mac .device-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border: clamp(6px, 1.1vw, 14px) solid #0b0b0d;
  border-radius: clamp(12px, 1.8vw, 22px) clamp(12px, 1.8vw, 22px) 6px 6px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 0 0 1px #3a3a3e, 0 40px 120px -30px rgba(0, 0, 0, 0.9);
}
.device-mac .device-screen::before {   /* camera notch */
  content: ""; position: absolute; z-index: 5; top: -1px; left: 50%;
  width: 11%; height: 3.2%; min-height: 8px;
  background: #0b0b0d; border-radius: 0 0 10px 10px; transform: translateX(-50%);
}
.device-mac .device-base {
  position: relative; height: clamp(8px, 1.2vw, 16px); width: 116%; margin-left: -8%;
  background: linear-gradient(180deg, #4a4a4e 0%, #2a2a2d 40%, #161618 100%);
  border-radius: 2px 2px 14px 14px / 2px 2px 100% 100%;
  box-shadow: 0 1px 0 #5a5a5e inset;
}
.device-mac .device-base::before {    /* thumb groove */
  content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 40%;
  background: #1a1a1c; border-radius: 0 0 8px 8px; transform: translateX(-50%);
}

.device-ipad .device-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  border: clamp(8px, 1.3vw, 16px) solid #0b0b0d;
  border-radius: clamp(18px, 2.6vw, 34px);
  background: #000; overflow: hidden;
  box-shadow: 0 0 0 1.5px #3a3a3e, 0 40px 100px -30px rgba(0, 0, 0, 0.9);
}

.device-iphone { width: 100%; max-width: 300px; }
.device-iphone .device-screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border: 9px solid #0b0b0d;
  border-radius: 46px;
  background: var(--ui-bg); overflow: hidden;
  box-shadow: 0 0 0 1.5px #48484c, 0 0 0 4px #1c1c1e, 0 40px 100px -30px rgba(0, 0, 0, 0.9);
}
.device-iphone .device-screen::before {   /* Dynamic Island */
  content: ""; position: absolute; z-index: 5; top: 10px; left: 50%;
  width: 32%; height: 26px; background: #000; border-radius: 20px; transform: translateX(-50%);
}

/* ---------- Prompter (recreation of PrompterView) ---------- */
.ui-prompter {
  container-type: inline-size;
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: #000; color: #fff;
  font-family: var(--ui-font);
  user-select: none;
}
.uip-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 6.4cqw; min-height: 22px; padding: 0 2.4cqw;
  font-size: max(9px, 1.45cqw); color: rgba(255, 255, 255, 0.92);
}
.uip-back { width: 1.2cqw; min-width: 6px; aspect-ratio: 1; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.85; }
.uip-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uip-stats { justify-self: end; display: flex; gap: 1.6cqw; font-variant-numeric: tabular-nums; }
.uip-stats .dim { color: var(--ui-muted); }
.uip-progress { height: 3px; background: #1c1c1e; }
.uip-progress i { display: block; height: 100%; width: 0; background: var(--ui-blue); transition: width 0.25s linear; }

.uip-stage { position: relative; flex: 1; overflow: hidden; }
.uip-text {
  --size: 4.4;
  position: absolute; left: 10%; right: 10%; top: 42%;
  font-family: var(--prompt-font);
  font-size: calc(var(--size) * 1cqw); line-height: 1.42; font-weight: 400; letter-spacing: -0.005em;
  will-change: transform;
}
.uip-text p { margin: 0 0 0.9em; }
.uip-text b { font-weight: 700; }
.uip-text u { text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
.ui-prompter.is-mirrored .uip-flipper { transform: scaleX(-1); }
.ui-prompter.is-flipped .uip-flipper { transform: scaleY(-1); }
.ui-prompter.is-mirrored.is-flipped .uip-flipper { transform: scale(-1, -1); }
.uip-flipper { position: absolute; inset: 0; transition: transform 0.6s var(--ease, ease); }
.uip-cue {
  position: absolute; left: 0; right: 0; top: 42%; height: 1px; z-index: 2;
  background: rgba(239, 68, 68, 0.75);
  pointer-events: none;
}
.uip-cue::before, .uip-cue::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0;
  border-top: max(5px, 1cqw) solid transparent; border-bottom: max(5px, 1cqw) solid transparent;
  transform: translateY(-50%);
}
.uip-cue::before { left: 0; border-left: max(7px, 1.4cqw) solid var(--cue-red); }
.uip-cue::after { right: 0; border-right: max(7px, 1.4cqw) solid var(--cue-red); }
/* Text above the cue has been read: dim it, like the app does near the edges. */
.uip-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#000 0%, rgba(0, 0, 0, 0.55) 22%, transparent 40%, transparent 78%, rgba(0, 0, 0, 0.6) 100%);
}

.uip-bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 8cqw; min-height: 28px; padding: 0 2.2cqw;
  color: rgba(255, 255, 255, 0.9);
}
.uip-speed { display: flex; align-items: center; gap: 1cqw; font-size: max(8px, 1.1cqw); color: var(--ui-muted); }
.uip-speed svg { width: max(12px, 2.2cqw); height: max(12px, 2.2cqw); color: #fff; opacity: 0.85; }
.uip-track { position: relative; width: 14cqw; height: 4px; border-radius: 2px; background: #2a2a2a; }
.uip-thumb { position: absolute; top: 50%; width: max(9px, 1.5cqw); aspect-ratio: 1; border-radius: 50%; background: var(--ui-blue); transform: translate(-50%, -50%); transition: left 0.3s; }
.uip-play {
  width: max(22px, 4.6cqw); aspect-ratio: 1; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); display: grid; place-items: center;
}
.uip-play::before { content: ""; margin-left: 12%; border-left: max(7px, 1.3cqw) solid #fff; border-top: max(5px, 0.85cqw) solid transparent; border-bottom: max(5px, 0.85cqw) solid transparent; }
.ui-prompter.is-playing .uip-play::before { margin: 0; width: max(7px, 1.25cqw); height: max(9px, 1.6cqw); border: 0; border-left: max(2.5px, 0.42cqw) solid #fff; border-right: max(2.5px, 0.42cqw) solid #fff; }
.uip-icons { justify-self: end; display: flex; gap: 2cqw; }
.uip-icons span { width: max(10px, 1.9cqw); aspect-ratio: 1; border: 1.5px solid rgba(255, 255, 255, 0.75); border-radius: 50%; }
.uip-icons span:first-child { border-color: var(--ui-blue); border-style: dotted; }
.uip-icons span:last-child { border-radius: 2px; border-style: dashed; }
.uip-hints {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4cqw 1.8cqw;
  padding: 0 2cqw 1.4cqw; font-size: max(7px, 0.85cqw); color: rgba(255, 255, 255, 0.35); letter-spacing: 0.02em;
}
.ui-prompter.is-compact .uip-hints { display: none; }

/* Live controls (the Try It prompter). Same layout as the app's bar, but every part works. */
.ui-prompter[data-interactive] .uip-top { height: auto; min-height: max(44px, 6.4cqw); }
.ui-prompter[data-interactive] .uip-stage, .ui-prompter[data-controls] .uip-stage { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ui-prompter.is-scrubbing .uip-stage { cursor: grabbing; }
.ui-prompter.is-scrubbing .uip-progress i { transition: none; }
.ui-prompter button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ui-prompter button:focus-visible, .uip-range:focus-visible { outline: 2px solid var(--ui-blue); outline-offset: 2px; }
.ui-prompter .uip-own {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  height: max(30px, 3.4cqw); padding: 0 max(12px, 1.3cqw); border-radius: 980px;
  font-size: max(12px, 1.3cqw) !important; font-weight: 500;
  background: rgba(255, 255, 255, 0.1) !important; color: #fff;
  transition: background 0.2s;
}
.uip-own svg { width: max(14px, 1.6cqw); height: max(14px, 1.6cqw); }
.uip-own:hover { background: rgba(255, 255, 255, 0.2) !important; }
.ui-prompter .uip-start {
  position: absolute; z-index: 3; left: 50%; top: 21%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px 12px 18px; border-radius: 980px;
  font-size: max(14px, 1.6cqw) !important; font-weight: 600;
  background: #fff !important; color: #000 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: opacity 0.4s, transform 0.4s;
  animation: start-pulse 2.4s ease-in-out infinite;
}
.uip-start svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.uip-start:hover { transform: translate(-50%, -50%) scale(1.04); }
.ui-prompter.has-started .uip-start { opacity: 0; pointer-events: none; animation: none; }
@keyframes start-pulse { 50% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 10px rgba(255, 255, 255, 0.12); } }

.uip-bottom.is-live { height: auto; min-height: max(60px, 8cqw); padding: 8px max(14px, 2.2cqw); gap: 10px 16px; }
.is-live .uip-speed { gap: 2px; font-size: max(11px, 1.1cqw); }
.ui-prompter .uip-step {
  display: grid; place-items: center; flex-shrink: 0;
  width: max(34px, 3.6cqw); aspect-ratio: 1; border-radius: 50%;
  transition: background 0.2s, transform 0.15s;
}
@media (hover: hover) { .ui-prompter .uip-step:hover { background: rgba(255, 255, 255, 0.12); } }
.ui-prompter .uip-step:active { transform: scale(0.88); }
.is-live .uip-speed .uip-step svg { width: 62%; height: 62%; opacity: 1; }
.is-live .uip-range { margin: 0 4px; }
.is-live .uip-speed span { min-width: 2.4em; font-variant-numeric: tabular-nums; color: #fff; opacity: 0.8; }
.uip-range {
  --fill: 22%;
  -webkit-appearance: none; appearance: none; width: max(110px, 14cqw); height: 4px; margin: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--ui-blue) var(--fill), #333 var(--fill)); cursor: pointer;
}
.uip-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--ui-blue), 0 1px 4px rgba(0, 0, 0, 0.5); }
.uip-range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--ui-blue); }
.is-live .uip-play { width: max(44px, 5cqw); background: #fff !important; transition: transform 0.15s; }
.is-live .uip-play::before { border-left-color: #000; }
.ui-prompter.is-playing .is-live .uip-play::before { border-left-color: #000; border-right-color: #000; }
.is-live .uip-play:hover { transform: scale(1.06); }
.is-live .uip-play:active, .uip-btn:active { transform: scale(0.92); }
.is-live .uip-icons { gap: max(4px, 0.6cqw); align-items: center; }
/* Showpiece prompters: just speed + play, balanced like the app's bar. */
.uip-bottom.is-basic::after { content: ""; }
/* Undo the static bar's placeholder icon styles. */
.is-live .uip-icons span { width: auto; aspect-ratio: auto; border: 0; border-radius: 0; }
.uip-pair { display: inline-flex; flex-shrink: 0; gap: 2px; margin-right: max(4px, 0.6cqw); }
.uip-pair .uip-btn { flex-shrink: 0; }
.uip-btn {
  display: grid; place-items: center;
  width: max(36px, 3.8cqw); aspect-ratio: 1; border-radius: 50%;
  color: rgba(255, 255, 255, 0.85) !important;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.uip-btn svg { width: 55%; height: 55%; }
@media (hover: hover) { .uip-btn:hover { background: rgba(255, 255, 255, 0.12) !important; color: #fff !important; } }
.uip-btn[aria-pressed="true"] { background: var(--ui-blue) !important; color: #fff !important; }
.uip-a { font-family: var(--prompt-font, Georgia, serif); font-size: max(13px, 1.3cqw); line-height: 1; }
.uip-a-lg { font-size: max(19px, 1.9cqw); }
@container (max-width: 640px) {
  .uip-bottom.is-live { grid-template-columns: 1fr auto; grid-template-areas: "speed play" "icons icons"; padding-bottom: 12px; }
  .is-live .uip-speed { grid-area: speed; }
  .is-live .uip-play { grid-area: play; }
  .uip-bottom.is-basic { grid-template-areas: "speed play"; }
  .uip-bottom.is-basic::after { display: none; }
  .is-live .uip-icons { grid-area: icons; justify-self: stretch; justify-content: space-between; }
  .is-live .uip-range { flex: 1; width: auto; min-width: 0; }
  .is-live .uip-speed { min-width: 0; }
  .ui-prompter[data-interactive] .uip-title { display: none; }
  .ui-prompter[data-interactive] .uip-top { grid-template-columns: 1fr auto; }
  .ui-prompter[data-interactive] .uip-text { left: 7%; right: 7%; font-size: calc(var(--size) * 1.6cqw); }
}
@media (hover: none) { .ui-prompter[data-interactive] .uip-hints { display: none; } }

/* Edge fade: the script dissolves toward the top and bottom of the screen and is
   fully opaque around the cue line (at 42%). A mask, so it works on any background. */
.ui-prompter { --fade-top: 28%; --fade-bottom: 30%; }
.ui-prompter.has-fade .uip-stage {
  --fm: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.08) calc(var(--fade-top) * 0.25),
    rgba(0, 0, 0, 0.35) calc(var(--fade-top) * 0.55),
    rgba(0, 0, 0, 0.75) calc(var(--fade-top) * 0.82),
    #000 var(--fade-top),
    #000 calc(100% - var(--fade-bottom)),
    rgba(0, 0, 0, 0.75) calc(100% - var(--fade-bottom) * 0.82),
    rgba(0, 0, 0, 0.35) calc(100% - var(--fade-bottom) * 0.55),
    rgba(0, 0, 0, 0.08) calc(100% - var(--fade-bottom) * 0.25),
    transparent 100%);
  -webkit-mask-image: var(--fm); mask-image: var(--fm);
}
.ui-prompter.has-fade .uip-stage::after { display: none; }   /* the mask replaces the dimming overlay */

/* Voice follow demo */
.voice-demo .w { opacity: 0.42; transition: opacity 0.25s; }
.voice-demo .w.is-said { opacity: 1; }
.voice-badge {
  position: absolute; z-index: 4; top: max(30px, 8.6cqw); left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: max(6px, 0.8cqw);
  padding: max(5px, 0.6cqw) max(12px, 1.4cqw); border-radius: 980px;
  font-family: var(--ui-font); font-size: max(10px, 1.2cqw); font-weight: 600; white-space: nowrap;
  color: #fff; background: rgba(48, 209, 88, 0.16); box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.5);
  transition: background 0.3s, box-shadow 0.3s;
}
.voice-bars { display: inline-flex; align-items: center; gap: 2px; height: max(10px, 1.2cqw); }
.voice-bars i { width: 2.5px; height: 100%; border-radius: 2px; background: #30d158; animation: voicebar 0.9s ease-in-out infinite; }
.voice-bars i:nth-child(2) { animation-delay: 0.15s; } .voice-bars i:nth-child(3) { animation-delay: 0.3s; } .voice-bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes voicebar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.voice-demo.is-holding .voice-badge { background: rgba(255, 159, 10, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.55); }
.voice-demo.is-holding .voice-bars i { background: #ff9f0a; }
.voice-demo.is-holding .uip-cue { background: #ff9f0a; box-shadow: 0 0 14px rgba(255, 159, 10, 0.7); }
.voice-demo .uip-play { opacity: 0.35; }

/* Run of show (rundown) */
.ui-rundown {
  container-type: inline-size; position: relative;
  padding: 18px; border-radius: 22px; background: #0b0b0d; color: #fff; font-family: var(--ui-font);
  box-shadow: 0 0 0 1px #2a2a2e, 0 40px 100px -40px rgba(0, 0, 0, 0.9);
}
.urd-top { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; font-size: 14px; }
.urd-title { font-weight: 600; margin-right: auto; white-space: nowrap; }
@container (max-width: 420px) {
  .urd-top { gap: 8px; font-size: 13px; }
  .urd-air { font-size: 0; gap: 0; }   /* just the red dot */
  .urd-ou { min-width: 0; }
  .urd-list li { grid-template-columns: 20px 1fr auto 44px; padding: 11px 12px; font-size: 14px; }
}
.urd-air { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ff453a; }
.urd-air i { width: 7px; height: 7px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 10px #ff453a; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.urd-clock { font-variant-numeric: tabular-nums; font-weight: 600; }
.urd-ou { min-width: 92px; text-align: right; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: #30d158; }
.urd-ou.is-over { color: #ff9f0a; }
.urd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.urd-list li {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 26px 1fr auto 56px; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; background: #161618; font-size: 15px; color: rgba(255, 255, 255, 0.82);
  transition: background 0.3s;
}
.urd-n { font-size: 12px; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.urd-plan, .urd-act { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ui-muted); text-align: right; }
.urd-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--cue-red); box-shadow: 0 0 8px var(--cue-red); }
.urd-list li.is-live { background: #232326; color: #fff; }
.urd-list li.is-live .urd-act { color: #fff; font-weight: 600; }
.urd-list li.is-done { color: rgba(255, 255, 255, 0.42); }
.urd-list li.is-done .urd-bar { display: none; }
.urd-cue {
  position: absolute; top: 14px; left: 50%; transform: translate(-50%, -8px); opacity: 0;
  padding: 6px 14px; border-radius: 980px; font-size: 13px; font-weight: 700;
  background: #ff9f0a; color: #000; transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.urd-cue.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Video calls panel: a call grid with the prompter hanging from the camera notch */
.call-panel { background: #1c1c1e; display: block; }
.call-grid { position: absolute; inset: 9% 4% 4%; display: grid; grid-template-columns: 1fr 1fr; gap: 2%; }
.call-tile { position: relative; border-radius: 10px; overflow: hidden; }
.call-tile i { position: absolute; left: 8px; bottom: 6px; font-style: normal; font-size: 11px; color: #fff; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); }
.call-tile.t1 { background: radial-gradient(circle at 50% 42%, #7c6a5a 0 16%, #3a3532 17% 30%, #24272c 31%); }
.call-tile.t2 { background: radial-gradient(circle at 50% 42%, #a07a62 0 16%, #4b3b52 17% 30%, #2a2533 31%); }
.call-tile.t3 { background: radial-gradient(circle at 50% 42%, #c89a7c 0 16%, #2f4a5c 17% 30%, #1e2a33 31%); box-shadow: inset 0 0 0 2px #30d158; }
.call-tile.t4 { background: radial-gradient(circle at 50% 42%, #6d5646 0 16%, #3b4a3a 17% 30%, #252b25 31%); }
.call-notch { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); width: 46%; display: flex; flex-direction: column; align-items: center; }
.call-notch::before { content: ""; width: 26%; height: 14px; border-radius: 0 0 10px 10px; background: #000; }
.call-strip {
  position: relative; width: 100%; aspect-ratio: 4 / 1; margin-top: -2px; border-radius: 0 0 16px 16px; overflow: hidden;
  background: rgba(0, 0, 0, 0.88); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.call-strip > .ui-prompter { position: absolute; inset: 0; }
.call-badge {
  position: absolute; z-index: 2; right: 5%; bottom: 7%; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 980px; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.call-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ui-editor {
  container-type: inline-size;
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: #000; color: #fff; font-family: var(--ui-font);
}
.uie-top {
  display: flex; align-items: center; gap: 1.6cqw;
  height: 6.4cqw; min-height: 24px; padding: 0 2cqw; border-bottom: 1px solid #1f1f1f;
  font-size: max(9px, 1.45cqw);
}
.uie-title { font-weight: 500; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uie-saved { color: var(--ui-muted); font-size: max(8px, 1.15cqw); }
.uie-words { color: var(--ui-muted); background: #161616; padding: 0.3cqw 0.8cqw; border-radius: 4px; font-size: max(8px, 1.15cqw); font-variant-numeric: tabular-nums; }
.uie-presence { display: flex; }
.uie-presence span {
  width: max(16px, 2.6cqw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; font-size: max(7px, 1cqw); font-weight: 600; color: #000;
  border: 2px solid #000; margin-left: -0.6cqw;
}
.uie-start { background: var(--ui-blue); color: #fff; font-weight: 500; padding: 0.7cqw 1.8cqw; border-radius: 0.8cqw; font-size: max(9px, 1.3cqw); }
.uie-toolbar {
  display: flex; align-items: center; gap: 1.4cqw;
  height: 5.4cqw; min-height: 22px; padding: 0 2cqw; border-bottom: 1px solid #1f1f1f;
  font-size: max(8px, 1.2cqw); color: rgba(255, 255, 255, 0.8);
}
.uie-select { border: 1px solid #2a2a2a; border-radius: 0.6cqw; padding: 0.4cqw 1cqw; width: 18cqw; }
.uie-size { border: 1px solid #2a2a2a; border-radius: 0.6cqw; padding: 0.4cqw 1cqw; }
.uie-sep { width: 1px; height: 50%; background: #2a2a2a; }
.uie-body {
  flex: 1; overflow: hidden; padding: 3.4cqw 10cqw;
  font-family: var(--prompt-font); font-size: 3.1cqw; line-height: 1.5;
}
.uie-body p { margin: 0 0 1em; }
.uie-body b { font-weight: 700; transition: font-weight 0.2s; }
.peer-caret {
  position: relative; display: inline-block; width: 2px; height: 1.15em; margin: 0 -1px;
  vertical-align: -0.2em; background: var(--peer); animation: caret-blink 1.1s steps(2) infinite;
}
.peer-caret::after {
  content: attr(data-name); position: absolute; left: 0; bottom: 100%;
  padding: 0.15em 0.45em; border-radius: 0.3em 0.3em 0.3em 0;
  background: var(--peer); color: #000; font-family: var(--ui-font); font-size: 0.42em; font-weight: 600; white-space: nowrap;
}
.peer-select { background: color-mix(in srgb, var(--peer) 35%, transparent); border-radius: 2px; }
.peer-typed { background: color-mix(in srgb, var(--peer) 16%, transparent); }
@keyframes caret-blink { 50% { opacity: 0.25; } }

/* ---------- Phone remote (recreation of Control Center on iPhone) ---------- */
.ui-remote {
  height: 100%; display: flex; flex-direction: column; gap: 14px;
  padding: 52px 16px 34px; font-family: var(--ui-font); color: #fff; background: var(--ui-bg);   /* bottom clears the home-indicator area */
}
.uir-head { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.uir-device {
  background: var(--ui-card); border: 1px solid var(--ui-border); border-radius: 14px; padding: 12px 14px;
  display: grid; gap: 8px;
}
.uir-device-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.uir-device-row strong { font-weight: 600; }
.uir-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ui-green); }
.uir-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.2); }
.ui-remote:not(.is-playing) .uir-live { color: var(--ui-muted); }
.ui-remote:not(.is-playing) .uir-live::before { box-shadow: none; }
.uir-line {
  min-height: 52px; padding: 10px 12px; border-radius: 10px; background: #000;
  font-family: var(--prompt-font); font-size: 13px; line-height: 1.35; color: #fff;
  border-left: 3px solid var(--cue-red);
}
.uir-bar { height: 3px; border-radius: 2px; background: #2a2a2a; overflow: hidden; }
.uir-bar i { display: block; height: 100%; width: 0; background: var(--ui-blue); transition: width 0.25s linear; }
.uir-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.uir-controls { margin-top: auto; display: grid; gap: 14px; }
.uir-transport { display: flex; align-items: center; justify-content: center; gap: 22px; }
.uir-btn {
  width: 52px; height: 52px; border-radius: 50%; background: #1c1c1e; color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 600;
  transition: transform 0.15s, background 0.2s;
}
.uir-btn:active { transform: scale(0.92); }
.uir-btn svg { width: 22px; height: 22px; fill: currentColor; }
.uir-btn-main { width: 76px; height: 76px; background: var(--ui-blue); }
.uir-btn-main svg { width: 30px; height: 30px; }
/* A pill whose ends follow the round buttons inside it. */
.uir-speed { display: flex; align-items: center; justify-content: space-between; background: var(--ui-card); border: 1px solid var(--ui-border); border-radius: 999px; padding: 5px; }
.uir-speed > div { display: flex; align-items: baseline; gap: 5px; line-height: 1; }
.uir-speed span { font-size: 13px; color: var(--ui-muted); }
.uir-speed strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.uir-speed .uir-btn { width: 40px; height: 40px; font-size: 20px; line-height: 1; }

/* ---------- Remote pair (phone driving the Mac) ---------- */
.pair {
  max-width: var(--content-box); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr minmax(200px, 280px); gap: clamp(28px, 5vw, 72px); align-items: center;
}
.pair-link { position: relative; }
.pair-signal {
  position: absolute; top: 50%; left: calc(-1 * clamp(28px, 5vw, 72px)); width: clamp(28px, 5vw, 72px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--ui-blue) 0 6px, transparent 6px 12px);
  background-size: 24px 2px; animation: signal 0.8s linear infinite; opacity: 0.8;
}
@keyframes signal { to { background-position: -24px 0; } }
.pair-caption { grid-column: 1 / -1; text-align: center; color: var(--ink-muted); font-size: 15px; }
.pair-caption kbd { color: var(--ink); }
@media (max-width: 833px) {
  .pair { grid-template-columns: 1fr; }
  .pair-signal { display: none; }
  .pair .device-iphone { max-width: 260px; }
}

/* ---------- Settings panel (speed & type) ---------- */
.ui-settings {
  container-type: inline-size;
  height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; background: #000; font-family: var(--ui-font); color: #fff;
}
.uis-preview { position: relative; display: grid; place-items: center; padding: 6cqw; border-right: 1px solid #1f1f1f; }
.uis-sample { font-family: var(--prompt-font); font-size: 4.2cqw; line-height: 1.35; transition: font-size 0.6s var(--ease, ease), color 0.6s, font-family 0.3s; }
.uis-panel { padding: 4cqw; display: flex; flex-direction: column; gap: 3cqw; font-size: max(9px, 1.6cqw); background: var(--ui-bg); }
.uis-row { display: grid; gap: 1.2cqw; }
.uis-label { color: var(--ui-muted); font-size: max(8px, 1.3cqw); text-transform: uppercase; letter-spacing: 0.06em; }
.uis-slider { position: relative; height: 4px; border-radius: 2px; background: #2a2a2a; }
.uis-slider i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--ui-blue); transition: width 0.6s var(--ease, ease); }
.uis-slider i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--ui-blue); transform: translateY(-50%); }
.uis-chips { display: flex; flex-wrap: wrap; gap: 1cqw; }
.uis-chip { padding: 0.8cqw 1.6cqw; border-radius: 1cqw; border: 1px solid #2a2a2a; transition: background 0.3s, border-color 0.3s; }
.uis-chip.is-on { background: rgba(59, 130, 246, 0.18); border-color: var(--ui-blue); }
.uis-swatches { display: flex; gap: 1.4cqw; }
.uis-swatch { width: 4cqw; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; outline: 1px solid #333; transition: border-color 0.3s; }
.uis-swatch.is-on { border-color: var(--ui-blue); }

/* ---------- Illustrations (SVG) ---------- */
.illo { width: 100%; height: 100%; display: block; }
.illo text { font-family: var(--font); }
.illo .stroke { fill: none; stroke: rgba(245, 245, 247, 0.55); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.illo .stroke-strong { fill: none; stroke: #f5f5f7; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.illo .label { fill: rgba(245, 245, 247, 0.7); font-size: 13px; letter-spacing: 0.01em; }
.illo .label-strong { fill: #f5f5f7; font-size: 14px; font-weight: 600; }
.illo .ray { fill: none; stroke: var(--cue-red); stroke-width: 2; stroke-dasharray: 6 6; animation: ray 1.2s linear infinite; }
@keyframes ray { to { stroke-dashoffset: -24; } }
.illo .flow { fill: none; stroke-width: 2; stroke-dasharray: 4 8; animation: ray 1.4s linear infinite; }
.illo .wave { fill: none; stroke: var(--ui-blue); stroke-width: 2; stroke-linecap: round; opacity: 0; animation: wave 2.4s var(--ease, ease) infinite; }
.illo .wave:nth-of-type(2) { animation-delay: 0.4s; }
.illo .wave:nth-of-type(3) { animation-delay: 0.8s; }
@keyframes wave { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

/* Light-theme illustration variant */
[data-theme="light"] .illo .stroke { stroke: rgba(29, 29, 31, 0.4); }
[data-theme="light"] .illo .stroke-strong { stroke: #1d1d1f; }
[data-theme="light"] .illo .label { fill: #6e6e73; }
[data-theme="light"] .illo .label-strong { fill: #1d1d1f; }

/* Stage that holds a render inside a gallery or panel */
.render {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg);
  background: radial-gradient(90% 120% at 50% 0%, #1d1f2b 0%, #0b0b10 60%, #050507 100%);
  display: grid; place-items: center;
}
.render > .device { width: 78%; }
.render > .device-iphone { width: 22%; max-width: none; }
/* The remote is laid out for a full-size phone; scale it down to fit small frames. */
.render .ui-remote { zoom: 0.62; }
.render-pad { padding: 5%; }
/* Photo slides: a real scene with a slice of the app floating over it. */
.render-photo { background: #000; }
.render-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.render-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.7) 100%);
}
.float-panel {
  position: absolute; z-index: 1; right: 4.5%; bottom: 7%; width: 54%; aspect-ratio: 16 / 10;
  border-radius: 14px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 80px -10px rgba(0, 0, 0, 0.85);
}
.render-photo > .float-phone { position: absolute; z-index: 1; right: 9%; top: 50%; width: 21%; transform: translateY(-50%); }
@media (max-width: 734px) {
  .render-photo > .float-phone { right: 7%; width: 22%; }
  .render-photo > .float-phone .device-screen { border-width: 4px; border-radius: 18px; }
  .render-photo > .float-phone .device-screen::before { top: 4px; height: 8px; }
  .render-photo .float-phone .ui-remote { zoom: 0.3; }
  .float-panel { width: 62%; right: 4%; bottom: 6%; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .uip-start, .voice-bars i, .urd-air i { animation: none; }
  .peer-caret, .pair-signal, .illo .ray, .illo .flow, .illo .wave { animation: none !important; }
  .illo .wave { opacity: 1; }
}
