/* Shared look of the dictation scenes: the desk, a desktop window and the
   Pysar widget (a port of frontend/src/components/WidgetFace.tsx). Each scene
   page adds its own window styles. */
:root{
  --u:1px;               /* widget design pixel; the app's sz() */
  --sys:-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI","Inter",sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
  --night:#1d150c;
}
body{padding:var(--sp-10) 0 var(--sp-16)}
.probe{width:100%;max-width:960px;margin:0 auto;padding:0 var(--sp-4)}
.probe__title{font-family:var(--font-display);font-weight:700;font-size:clamp(1.6rem,3.4vw,2.2rem);line-height:1.2;margin:0 0 var(--sp-2)}
.probe__lead{margin:0 0 var(--sp-10);color:var(--ink-2);max-width:62ch}
.probe__lead code{font-size:.9em;background:var(--surface-2);padding:1px 6px;border-radius:6px}

.variant{margin:0 0 var(--sp-16)}
.variant__head{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--sp-1) var(--sp-3);margin:0 0 var(--sp-4)}
.variant__name{font-size:1.15rem;font-weight:600;margin:0}
.variant__idea{margin:0;color:var(--ink-2)}

/* ---------- the desk: the screen the window and the widget stand on ---------- */
.desk{position:relative;border-radius:var(--radius);padding:var(--sp-10) var(--sp-12) 64px;overflow:hidden}
.desk--paper{background:transparent;border:1px solid var(--line)}
.desk--night{background:var(--night);border:1px solid rgba(226,172,64,.16)}

/* The demo plays like a video, not like page text: nothing in it can be
   selected or long-pressed. Screen readers get the invisible .scene-caption. */
.desk{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:default}
.scene-caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Embedded in another page: only the desk, edge to edge. */
.is-embed body{padding:0;background:transparent;overflow:hidden;touch-action:pan-y}
.is-embed .probe{max-width:none;padding:0}
.is-embed .probe__title,.is-embed .probe__lead,.is-embed .variant__head{display:none}
.is-embed .variant{margin:0}
.is-embed .desk--paper{border:0}
.is-embed .desk{padding:var(--sp-6) var(--sp-6) 56px}
/* Embedded, the desk is invisible: the window stands on the host page, and
   its shadow is short enough to fade out inside the frame instead of being
   cut into a faint rectangle at the iframe's edge. */
.is-embed .desk--night{background:transparent;border:0}
.is-embed .win--light{box-shadow:0 14px 28px -14px rgba(89,63,15,.30),0 3px 10px rgba(31,29,24,.07)}
.is-embed .win--dark{box-shadow:0 14px 28px -12px rgba(0,0,0,.45)}

/* ---------- a desktop window: familiar, not a replica ---------- */
/* Windows are 88% opaque (the terminal 80%) so the page shows through,
   without blur. A window split into panels (bar, sidebar, feed) sets its root transparent and gives
   each panel its own fill at that alpha, so no region stacks two fills. */
.win{position:relative;display:flex;flex-direction:column;border-radius:11px;overflow:hidden;font-family:var(--sys);font-size:14px;line-height:1.45}
.win--light{background:rgba(255,255,255,.93);color:#1d1d1f;border:1px solid rgba(0,0,0,.12);box-shadow:var(--shadow-lg)}
.win--dark{background:rgba(31,31,33,.93);color:#e8e6e3;border:1px solid rgba(255,255,255,.10);box-shadow:0 30px 70px -20px rgba(0,0,0,.6)}
.lights{display:flex;gap:8px;flex:none}
.lights i{width:12px;height:12px;border-radius:50%;display:block}
.lights i:nth-child(1){background:#f25f58}.lights i:nth-child(2){background:#f6be3b}.lights i:nth-child(3){background:#3cc84a}
.win__bar{height:44px;flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:var(--sp-3);padding:0 var(--sp-4)}
.win__title{font-size:13px;font-weight:600;color:#6e6e73}
.win--dark .win__title{color:#a1a1a6}
.win__end{justify-self:end;display:flex;gap:16px;color:#8e8e93}
.win__end svg{width:17px;height:17px;display:block}
.caret{display:inline-block;width:2px;height:1.15em;vertical-align:-.2em;margin-left:1px;border-radius:1px}
.line{margin:0;min-height:1.45em}
.line[hidden]{display:none}

/* ---------- the widget: WidgetFace.tsx, uiScale 1 ---------- */
.wdg{position:absolute;z-index:5;width:0;pointer-events:none;font-family:var(--font-sans)}
.wdg__face{position:absolute;bottom:0;left:0;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;will-change:transform,opacity}
.wdg__ribbon{height:calc(44*var(--u));width:calc(150*var(--u));position:relative;margin-bottom:calc(10*var(--u));border-radius:calc(12*var(--u));border:1px solid var(--w-ribbon-border);background:var(--w-ribbon-bg)}
.wdg__view{position:absolute;inset:calc(2*var(--u)) calc(9*var(--u));display:flex;flex-direction:column-reverse;overflow:hidden;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 35%,#000 100%);mask-image:linear-gradient(to bottom,transparent 0%,#000 35%,#000 100%)}
.wdg__text{flex:0 0 auto;font-size:calc(11*var(--u));font-weight:600;line-height:1.35;color:var(--w-gold);word-break:break-word}
.wdg__pill{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:calc(42*var(--u));padding:calc(8*var(--u)) calc(15*var(--u));gap:calc(8*var(--u));border-radius:999px;
  background:var(--w-pill-bg);border:1px solid var(--w-pill-border);box-shadow:var(--w-pill-shadow);overflow:hidden}
.wdg__bars{display:flex;align-items:center;gap:calc(2*var(--u));height:calc(24*var(--u));overflow:hidden;flex:none}
.wdg__bars i{display:block;flex:none;width:calc(3*var(--u));border-radius:calc(2*var(--u));background:linear-gradient(to top,#c07e2a,#d49a2e)}
.wdg__dot{width:calc(7*var(--u));height:calc(7*var(--u));border-radius:50%;background:#ef4444;box-shadow:0 0 6px rgba(239,68,68,.5);flex:none}
.wdg__pen{flex:none;width:calc(24*var(--u));height:calc(24*var(--u))}
.wdg__ring{position:absolute;left:1px;top:1px;overflow:visible}
.wdg__ring rect{fill:none;stroke:var(--w-ring);stroke-width:2;stroke-linecap:butt}
.wdg[data-theme="light"]{--w-ribbon-bg:rgba(252,251,248,.92);--w-ribbon-border:rgba(184,121,31,.55);--w-gold:#b8791f;
  --w-pill-bg:rgba(244,238,226,.98);--w-pill-border:rgba(184,121,31,.4);--w-pill-shadow:0 4px 16px rgba(89,63,15,.18);--w-ring:#b8791f}
.wdg[data-theme="dark"]{--w-ribbon-bg:rgba(24,24,27,.92);--w-ribbon-border:rgba(212,154,46,.3);--w-gold:#e8b84d;
  --w-pill-bg:rgba(24,24,27,.98);--w-pill-border:rgba(212,154,46,.3);--w-pill-shadow:none;--w-ring:#d49a2e}

@media (max-width:640px){
  body{padding-top:var(--sp-6)}
  .desk{padding:var(--sp-6) var(--sp-4) 64px}
  .is-embed .desk{padding:var(--sp-5) 10px 48px}
}
