:root{
  --bg:#0b120e; --panel:#121c16; --panel2:#18241d; --line:#2d3f35;
  --ink:#eef2ea; --muted:#a6b5ab; --accent:#4cc98a; --ok:#3ddc97;
  --warn:#ffb454; --rec:#ff4d4f; --radius:12px;
  --on-accent:#06140d; --stage:#000; --bar:rgba(11,18,14,.9); --hint:#3d5046; --kbd:#0b120e; --logbg:#08100b;
  --display:"Bricolage Grotesque","Instrument Sans",system-ui,sans-serif;
  color-scheme:dark;
}
/* Light theme: chosen explicitly, or the system default when no choice is stamped. */
/* Light theme: the system preference when nothing is stamped, or an explicit choice. */
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]){
  --bg:#f3f4ee; --panel:#ffffff; --panel2:#eef1e9; --line:#d5dad0;
  --ink:#0f1a14; --muted:#5c6a62; --accent:#0b6b45; --ok:#1f9e6a;
  --warn:#b26a00; --rec:#e03131;
  --on-accent:#ffffff; --stage:#e4e8df; --bar:rgba(243,244,238,.94); --hint:#8a968e; --kbd:#ffffff; --logbg:#f8f9f4;
  color-scheme:light;
} }
:root[data-theme="light"]{
  --bg:#f3f4ee; --panel:#ffffff; --panel2:#eef1e9; --line:#d5dad0;
  --ink:#0f1a14; --muted:#5c6a62; --accent:#0b6b45; --ok:#1f9e6a;
  --warn:#b26a00; --rec:#e03131;
  --on-accent:#ffffff; --stage:#e4e8df; --bar:rgba(243,244,238,.94); --hint:#8a968e; --kbd:#ffffff; --logbg:#f8f9f4;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font:15px/1.55 "Instrument Sans",-apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;
  padding-bottom:60px;
}
.topbar{
  position:sticky; top:0; z-index:20; display:flex; align-items:center;
  justify-content:space-between; gap:16px; padding:14px 22px;
  background:var(--bar); backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:11px}
.brand h1{font:700 18px/1.1 var(--display);margin:0;letter-spacing:-.1px}
.brand .mark{width:26px;height:26px;display:block;border-radius:7px}
.brandlink{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none;border-radius:8px}   /* the mark and name go to the home page */
.brandlink:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.dot{width:11px;height:11px;border-radius:50%;background:var(--hint);flex:none}
.dot.live{background:var(--rec);animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.85)}}
.clockwrap{display:flex;align-items:baseline;gap:14px}
.clock{font-variant-numeric:tabular-nums;font:700 22px/1 var(--display);letter-spacing:.5px}
.written{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}

main{max-width:900px;margin:0 auto;padding:22px;display:flex;flex-direction:column;gap:16px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px}
.cardhead{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.cardhead h2{font:700 17px/1.2 var(--display);margin:0;letter-spacing:-.1px}
.step{
  width:22px;height:22px;border-radius:6px;background:var(--panel2);
  border:1px solid var(--line);display:grid;place-items:center;
  font-size:12px;color:var(--muted);flex:none
}
.muted{color:var(--muted);font-size:13px;margin:6px 0 12px}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 0}
.bigrow{margin-top:14px}

.btn{
  appearance:none;border:1px solid var(--line);background:var(--panel2);color:var(--ink);
  padding:9px 15px;border-radius:9px;font-size:14px;font-weight:500;cursor:pointer;
  transition:.14s border-color,.14s background,.14s transform;
}
.btn:hover:not(:disabled){border-color:#3d4a5e;background:#232c3a}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:650}
.btn.primary:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 86%,var(--ink));border-color:color-mix(in srgb,var(--accent) 86%,var(--ink))}
.btn.danger{background:var(--rec);border-color:var(--rec);color:#fff;font-weight:650}
.btn.ghost{background:transparent}
kbd{background:var(--kbd);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:11px;margin-left:5px}

.text{
  background:var(--panel2);border:1px solid var(--line);color:var(--ink);
  padding:9px 12px;border-radius:9px;font-size:14px;min-width:300px;flex:1
}
.text:focus{outline:none;border-color:var(--accent)}
.pill{background:var(--panel2);border:1px solid var(--line);border-radius:20px;padding:5px 12px;font-size:12px;color:var(--muted)}
.pill.set{color:var(--ok);border-color:rgba(61,220,151,.35)}
.check{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--muted);cursor:pointer;user-select:none}
.check input{accent-color:var(--accent);width:15px;height:15px}

.devices{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.devices .empty{color:var(--muted);font-size:13px;padding:8px 0}
.dev{
  display:flex;align-items:center;gap:12px;background:var(--panel2);
  border:1px solid var(--line);border-radius:10px;padding:10px 13px
}
.dev input{accent-color:var(--accent);width:16px;height:16px;flex:none}
.dev .name{flex:1;font-size:13.5px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dev .tag{font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);
  border:1px solid var(--line);border-radius:5px;padding:2px 6px;flex:none}
.dev .tag.bt{color:var(--warn);border-color:rgba(255,180,84,.4)}
.meter{width:110px;height:7px;border-radius:4px;background:#0c0f14;overflow:hidden;flex:none}
.meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--ok),#ffd166 78%,var(--rec));transition:width .07s linear}

.warn{
  background:rgba(255,180,84,.09);border:1px solid rgba(255,180,84,.32);
  color:#ffd9a1;border-radius:10px;padding:11px 14px;font-size:13px;margin-top:12px
}
.warn strong{color:var(--warn)}
.hidden{display:none !important}

.markers{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:5px}
.markers li{
  display:flex;gap:12px;font-size:13px;background:var(--panel2);
  border:1px solid var(--line);border-radius:8px;padding:7px 12px
}
.markers .t{font-variant-numeric:tabular-nums;color:var(--accent);font-weight:600;flex:none}

.previews{display:flex;gap:12px;flex-wrap:wrap}
video{width:100%;max-width:520px;background:var(--stage);border-radius:10px;border:1px solid var(--line);aspect-ratio:16/9}
video.cam{max-width:200px}

.log{
  background:var(--logbg);border:1px solid var(--line);border-radius:10px;padding:12px;
  font:12px/1.6 "SF Mono",ui-monospace,Menlo,monospace;color:#a9b6c8;
  max-height:230px;overflow:auto;white-space:pre-wrap;margin:6px 0 0
}
.log .e{color:#ff8a8b}
.log .w{color:var(--warn)}
.log .g{color:var(--ok)}

.toast{
  position:fixed;left:50%;bottom:26px;transform:translateX(-50%);
  background:var(--panel2);border:1px solid var(--line);border-radius:10px;
  padding:11px 18px;font-size:13.5px;box-shadow:0 12px 34px rgba(0,0,0,.5);z-index:50
}

.muted.sub{margin:-2px 0 4px;padding-left:2px;font-size:12.5px;opacity:.85}
.pill.warnpill{color:var(--warn);border-color:rgba(255,180,84,.4)}

/* ── v2: features, layouts, captions, editor ─────────────── */
.card.slim{padding:12px 20px}
.cardhead .pill{margin-left:auto}
.link{color:var(--accent);font-size:12.5px;text-decoration:none;margin-left:10px}
.link:hover{text-decoration:underline}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chip{font-size:11.5px;border:1px solid var(--line);border-radius:6px;padding:3px 8px;color:var(--muted);background:var(--panel2);display:inline-flex;gap:6px;align-items:center}
.chip i{width:7px;height:7px;border-radius:50%;background:#3a4453;display:inline-block}
.chip.on{color:var(--ink)}.chip.on i{background:var(--ok)}
.chip.reserved{opacity:.7}.chip.reserved i{background:var(--warn)}
.chip.partial.on i{background:#8fd3ff}
.feat.unavailable{display:none !important}
.select{background:var(--panel2);border:1px solid var(--line);color:var(--ink);padding:8px 10px;border-radius:9px;font-size:13.5px;max-width:320px}
.lbl{font-size:13px;color:var(--muted)}
.text.short{min-width:0;width:90px;flex:none}
textarea.text{min-height:56px;resize:vertical;font-family:inherit}
.stage{position:relative;width:100%;max-width:760px}
.stage video{display:block;width:100%;max-width:none;max-height:70vh}
/* The drag handle over the camera in the picture; the camera itself is drawn into the video. */
.campip{position:absolute;border:1.5px dashed rgba(255,255,255,.55);border-radius:10px;cursor:grab;touch-action:none;outline:none;transition:border-color .15s,box-shadow .15s}
.campip:hover,.campip:focus-visible,.campip.dragging{border:2px solid var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 30%,transparent)}
.campip.dragging{cursor:grabbing;transition:none}
.campip::after{content:'Drag to move';position:absolute;left:50%;bottom:calc(100% + 6px);transform:translateX(-50%);white-space:nowrap;font-size:11px;padding:3px 8px;border-radius:6px;background:var(--panel2);border:1px solid var(--line);color:var(--ink);opacity:0;pointer-events:none;transition:opacity .15s}
.campip:hover::after,.campip:focus-visible::after{opacity:1}
.campip.dragging::after{opacity:0}
@media (prefers-reduced-motion: reduce){.campip,.campip::after{transition:none}}
.caption{position:absolute;left:4%;right:4%;bottom:8%;text-align:center;font-size:16px;line-height:1.35;color:#fff;text-shadow:0 1px 2px #000,0 0 6px #000;background:rgba(0,0,0,.45);border-radius:6px;padding:4px 8px;pointer-events:none}
.speakers{gap:8px}
.speakers label{font-size:12.5px;color:var(--muted);display:flex;gap:6px;align-items:center}
.speakers input{background:var(--panel2);border:1px solid var(--line);color:var(--ink);border-radius:6px;padding:4px 7px;font-size:12.5px;width:150px}
.transcript{background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:12px 14px;max-height:340px;overflow:auto;font-size:14px;line-height:1.9;margin:8px 0}
.transcript .seg{margin-bottom:6px}
.transcript .t{font-variant-numeric:tabular-nums;color:var(--accent);font-size:12px;margin-right:8px}
.transcript .sp{color:var(--muted);font-weight:600;margin-right:6px;font-size:12.5px}
.transcript .w{cursor:pointer;border-radius:4px;padding:0 2px}
.transcript .w:hover{background:#2a3444}
.transcript .w.cut{text-decoration:line-through;color:#ff8a8b;background:rgba(255,77,79,.12)}
.aiout{background:#0a0d12;border:1px solid var(--line);border-radius:10px;padding:12px;font:13px/1.55 -apple-system,system-ui,sans-serif;white-space:pre-wrap;color:var(--ink);margin-top:8px}
/* A busy button keeps its label and gains a turning ring, so it reads as working, not as switched off. */
.btn.busy,.btn.busy:disabled{opacity:.85;pointer-events:none;cursor:progress}
.btn.busy::before{content:'';display:inline-block;width:11px;height:11px;margin-right:7px;vertical-align:-1px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes sweep{from{left:-35%}to{left:100%}}
@media (prefers-reduced-motion:reduce){.btn.busy::before,.convertstatus .spin{animation-duration:2.4s}.convertstatus .meter.working i{animation:none;left:0;width:100%;opacity:.45}}

/* ── v3: checklist, start bar, appearance ────────────────── */
body{padding-bottom:110px}
.who{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted)}
.who .select{padding:6px 10px;font-size:13px}
.summaryrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.summary{font-size:13.5px;color:var(--muted)}
.summary b{color:var(--ink)}
button.link{background:none;border:0;cursor:pointer;font:inherit;padding:0}
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width:640px){.tiles{grid-template-columns:1fr}}
.tile{display:flex;align-items:flex-start;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:11px 13px;text-align:left;color:var(--ink);cursor:pointer;font:inherit}
.tile b{display:block;font-size:13px}
.tile small{display:block;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
/* Each tile carries its own icon; a finished tile swaps it for a tick. */
.tile .mark{width:24px;height:24px;border-radius:7px;background:var(--panel2);border:1px solid var(--line);display:grid;place-items:center;font-size:12px;color:var(--muted);flex:none}
.tile .mark svg{display:block;grid-area:1/1}
.tile .mark .tick{display:none}
.tile.done{border-color:rgba(61,220,151,.35)}
.tile.done .mark{background:var(--ok);border-color:var(--ok);color:var(--on-accent);font-weight:700}
.tile.done .mark .ico{display:none}
.tile.done .mark .tick{display:block}
.tile.done small{color:var(--ok)}
.tile.next{border-color:var(--accent)}
.tile.next .mark{border-color:var(--accent);color:var(--accent)}
.tile.next small{color:var(--warn)}
.tile.optional{opacity:.75}
.tile.wide{grid-column:1/-1}
.callbox{margin-top:10px;display:grid;gap:10px}
.callbox .invite{flex-wrap:nowrap}
.callbox .invite .text{flex:1;min-width:0;font-size:12.5px}
.callchat{display:grid;gap:8px}
.callchat .text{flex:1;min-width:0}
.chatlines{list-style:none;margin:0;padding:8px 10px;display:grid;gap:6px;max-height:180px;overflow-y:auto;border:1px solid var(--line);border-radius:10px;background:var(--panel2);font-size:13px;overflow-wrap:anywhere}
.chatlines:empty::before{content:attr(aria-label);color:var(--muted);font-size:12.5px}
.chatlines li.mine b{color:var(--green)}
.chatlines small{color:var(--muted);font-size:11.5px}
.guestlist{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.guestlist li{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:7px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.guestlist li.empty{color:var(--muted);font-size:12.5px;border-style:dashed;background:transparent}
.guestlist .gname{font-weight:600;font-size:13px}
.guestlist small{font-size:12px;color:var(--muted)}
.guestlist .s-connected{color:var(--ok)}
.guestlist .s-failed{color:var(--warn)}
.guestlist .gnote{color:var(--warn)}
.guestlist button{margin-inline-start:auto}
.callmode{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);margin-inline-end:auto}
.tile:focus-visible{outline:2px solid var(--accent)}
.card.next{border-color:var(--accent)}
.card.done .step{background:var(--ok);border-color:var(--ok);color:var(--on-accent);font-weight:700}
.subhead{display:flex;align-items:center;gap:10px;margin:16px 0 4px}
.subhead h3{font-size:14px;margin:0;font-weight:600}
.subhead .tag{font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);border:1px solid var(--line);border-radius:5px;padding:1px 6px}
.details summary{list-style:none;display:flex;align-items:center;gap:12px;cursor:pointer}
.details summary::-webkit-details-marker{display:none}
.details summary::before{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:.15s;flex:none;margin-left:4px}
.details[open] summary::before{transform:rotate(45deg)}
.details summary h2{font:700 17px/1.2 var(--display);margin:0;letter-spacing:-.1px}
.details[open] summary{margin-bottom:8px}
.stagehint{position:absolute;inset:0;display:grid;place-items:center;color:var(--hint);font-size:13px;pointer-events:none}
.stage video:not([src]):not(.playing)+.stagehint{opacity:1}
.stagehint.hidden{display:none}
.startbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 22px;background:var(--bar);backdrop-filter:blur(12px);border-top:1px solid var(--line)}
.startleft{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.startleft .text{min-width:220px;flex:none}
.why{font-size:13px;color:var(--warn)}
.why.ok{color:var(--ok)}
.startright{display:flex;gap:10px;align-items:center}
.btn.big{padding:11px 22px;font-size:15px}
.appearance-hidden{display:none !important}

/* ── v4: top nav (theme switch, account), sign-in dialog ─── */
.topnav{display:flex;align-items:center;gap:14px}
.themeswitch{display:flex;gap:2px;background:var(--panel2);border:1px solid var(--line);border-radius:20px;padding:3px}
.themeswitch button{width:30px;height:24px;border-radius:14px;border:0;background:none;color:var(--muted);cursor:pointer;font:inherit;font-size:13px;line-height:1;display:grid;place-items:center;padding:0}
.themeswitch svg{display:block}
.themeswitch button[aria-checked="true"]{background:var(--line);color:var(--ink)}
.themeswitch button:focus-visible{outline:2px solid var(--accent)}
.account{position:relative;display:flex;align-items:center;gap:8px}
.btn.small{padding:7px 13px;font-size:13px}
.account.signedin .btn.small{display:none}
.account.signedout #whoWrap{display:flex}
.userchip{display:flex;align-items:center;gap:8px;background:var(--panel2);border:1px solid var(--line);border-radius:9px;padding:6px 12px;color:var(--ink);cursor:pointer;font:inherit;font-size:13px}
.userchip b{font-weight:600}
.userchip small{color:var(--muted);font-size:12px}
.userchip .caret{color:var(--muted);font-size:12px;line-height:0;margin-top:-6px}
.avatar{width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-weight:700;font-size:11px;display:grid;place-items:center}
.menu{position:absolute;top:calc(100% + 6px);right:0;min-width:220px;max-height:calc(100vh - 80px);overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px rgba(0,0,0,.25);padding:6px;z-index:40}
/* The account menu: who, then the plan block, then the folded feature list, then the actions. */
.menu{width:min(360px,calc(100vw - 44px))}
.menuhead{padding:8px 10px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);margin-bottom:4px}
.menuhead .avatar{width:32px;height:32px;font-size:13px}
.menuwho{display:flex;flex-direction:column;min-width:0}
.menuhead b{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.menuhead small{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.menuline{padding:4px 10px 8px;font-size:12.5px;color:var(--muted);border-bottom:1px solid var(--line);margin-bottom:4px}
.menuplan{padding:6px 10px 8px;display:flex;flex-direction:column;gap:2px}
.menuplanhead{display:block;font-size:13.5px;font-weight:600}
.menuplanline{display:block;font-size:12.5px;color:var(--muted)}
.menuplanline:empty{display:none}
.menuplan .trial{padding:4px 0 0;border:0;margin:0}
.menu .warn{margin:6px 0 0;font-size:12.5px}
/* What the plan allows: folded under its heading (the admin can retitle or hide it), one plain column when opened. */
.menuabilities{border-bottom:1px solid var(--line);margin-bottom:4px;padding:0 10px 6px}
.menuplantitle{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);cursor:pointer;list-style:none;padding:4px 0;font-weight:400}
.menuplantitle::-webkit-details-marker{display:none}
.menuplantitle::before{content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(-45deg);transition:.14s transform;flex:none;margin-left:2px}
.menuabilities[open] .menuplantitle::before{transform:rotate(45deg)}
.menu .abilities{grid-template-columns:1fr;gap:6px;font-size:13px;margin:4px 0 4px}
.menuitem{display:block;text-decoration:none;box-sizing:border-box;width:100%;text-align:left;background:none;border:0;color:var(--ink);font:inherit;font-size:13.5px;padding:8px 10px;border-radius:7px;cursor:pointer}
.menuitem:hover{background:var(--panel2)}
/* The person's language, saved to their account: a label and the same picker as the header. */
.menulang{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;font-size:13.5px;color:var(--ink);border-top:1px solid var(--line);margin-top:4px}
.menulang .langpick select{max-width:14em}
.tabs{display:flex;gap:4px;background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:3px}
.tab{flex:1;text-align:center;font:inherit;font-size:13px;padding:7px;border-radius:7px;border:0;background:none;color:var(--muted);cursor:pointer}
.tab[aria-selected="true"]{background:var(--panel2);color:var(--ink);font-weight:600}
.field{display:flex;flex-direction:column;gap:5px}
.field>span{font-size:12.5px;color:var(--muted)}
.field small{font-size:12px;color:var(--muted)}
.field .text{width:100%}
.gate.signin .only-create{display:none}
.planpick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.planpick label{border:1px solid var(--line);border-radius:9px;padding:8px;text-align:center;cursor:pointer}
.planpick label:has(input:checked){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}
.planpick input{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.planpick label:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.planpick b{display:block;font-size:13px}
.planpick small{display:block;font-size:12px;color:var(--muted)}
.row.end{justify-content:flex-end}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

.tilebody{flex:1;min-width:0}
.tilebody b{display:block;font-size:14px}
.tilebody small{display:block;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.tilebody .row{margin:8px 0 0}
.tilebody .devices{margin-top:8px}
.tilebody .sub{margin:6px 0 0}
.tile .tag{font-size:11px;color:var(--muted);font-weight:400;margin-left:6px}
.btn.small{padding:6px 11px;font-size:13px}
.abilities{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:1fr;gap:7px;font-size:13.5px}
.abilities li{display:flex;align-items:flex-start;gap:8px;line-height:1.4}
.abilities li i{flex:none;width:16px;height:16px;border-radius:4px;border:1px solid var(--line);background:var(--panel2);margin-top:2px;position:relative}
.abilities li.on i::after{content:'';position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid var(--ok);border-width:0 2px 2px 0;transform:rotate(45deg)}
.abilities li.off{color:var(--muted)}.abilities li.off i{border-style:dashed}
.abilities li small{display:block;font-size:12px;color:var(--muted)}

/* The finished recording: the picture fills the card's width at its own shape (a 16:9 placeholder until the
   file's size is known), centred, capped in height, with black bars only where the shape needs them. */
.finished .player{background:#000;border-radius:10px;overflow:hidden;margin:6px 0 12px;display:grid;place-items:center}
.finished .player video{display:block;width:100%;max-width:none;max-height:min(70vh,560px);aspect-ratio:auto 16/9;object-fit:contain;border:0;border-radius:0;background:#000}
/* One even row of downloads; the format picker and its Get button move as a pair. */
.finished .getrow{gap:8px}
.finished .morerow{display:flex;align-items:center;gap:8px;flex:1 1 260px;min-width:0}
.finished .morerow .select{flex:1;min-width:0;width:auto;max-width:280px}
/* While a file converts: which stage, how far, how long, and a way out. A failure stays here in words until the next try. */
.convertstatus:not(.hidden){display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);font-size:13.5px}
.convertstatus .spin{width:14px;height:14px;flex:none;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}
.convertstatus .what{font-weight:600;font-variant-numeric:tabular-nums;min-width:0}
.convertstatus .meter{flex:1 1 120px;min-width:80px;height:6px;border-radius:3px;background:var(--line);overflow:hidden;position:relative}
.convertstatus .meter i{position:absolute;top:0;bottom:0;left:0;width:0;background:var(--accent);border-radius:3px;transition:width .2s}
.convertstatus .meter.working i{width:35%;animation:sweep 1.1s ease-in-out infinite;transition:none}
.convertstatus .elapsed{font-variant-numeric:tabular-nums}
.convertstatus .btn.small{padding:5px 11px;font-size:13px}
.convertstatus.finished{border-color:var(--ok)}
.convertstatus.finished .spin{animation:none;width:6px;height:11px;margin:0 4px 3px;border:solid var(--ok);border-width:0 2px 2px 0;border-radius:0;transform:rotate(45deg)}
.convertstatus.finished .what{color:var(--ok)}
.convertstatus.failed{border-color:var(--rec)}
.convertstatus.failed .spin,.convertstatus.failed .meter,.convertstatus.failed .elapsed,.convertstatus.failed #convertCancel,
.convertstatus.finished .meter,.convertstatus.finished .elapsed,.convertstatus.finished #convertCancel{display:none}
.convertstatus.failed .what{font-weight:500;color:var(--rec)}
.pill.ok{border-color:var(--ok);color:var(--ok)}
#step-edit .cardhead{flex-wrap:wrap;row-gap:8px}
/* ── Edit video: the window over the page (public/lib/video-editor.js) ── */
.veditor{width:min(1040px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 32px);padding:0;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink);box-shadow:0 30px 80px rgba(0,0,0,.45)}
.veditor[open]{display:flex;flex-direction:column}
.veditor::backdrop{background:rgba(6,9,13,.62);backdrop-filter:blur(3px)}
.vehead{display:flex;align-items:center;gap:10px;padding:14px 20px;border-bottom:1px solid var(--line)}
.vehead h2{font-size:15px;margin:0;font-weight:600;flex:none}
.vehead .sub{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vehead #veClose{margin-left:auto}
.vebody{padding:16px 20px;overflow:auto;display:flex;flex-direction:column;gap:12px;min-height:0}
.vestage{background:#000;border-radius:10px;display:grid;place-items:center;overflow:hidden}
.vestage canvas{display:block;max-width:100%;max-height:min(46vh,470px);width:auto;height:auto}
.vetransport{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.vetime,.velen{font-size:13.5px;font-variant-numeric:tabular-nums}
.velen{margin-left:auto}
.velen .muted{margin:0}
.vetimeline{display:flex;flex-direction:column;gap:5px}
.vetrack{position:relative;height:42px;border-radius:8px;background:color-mix(in srgb,var(--accent) 16%,var(--panel2));border:1px solid var(--line);cursor:crosshair;touch-action:none;overflow:hidden;user-select:none}
.vetrack .gone{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--rec) 40%,transparent) 0 6px,color-mix(in srgb,var(--rec) 12%,var(--panel2)) 6px 12px);box-shadow:inset 1px 0 var(--rec),inset -1px 0 var(--rec)}
.vetrack .sel{position:absolute;top:0;bottom:0;background:color-mix(in srgb,var(--accent) 30%,transparent);box-shadow:inset 0 0 0 2px var(--accent)}
.vetrack .head{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:var(--ink);pointer-events:none}
.veditor{margin:16px auto auto}   /* anchored to the top: what is added below never moves the timeline */
.vebody>*{flex-shrink:0}          /* the picture keeps its size as edits are added; the body scrolls instead */
.veedits .velist{max-height:168px;overflow:auto}   /* about five edits, then the list scrolls on its own */
.vetrack .gone,.vetrack .sel{min-width:3px}   /* a short part of a long recording stays in sight */
.velane.music .chip{border-color:var(--ok);background:color-mix(in srgb,var(--ok) 20%,var(--panel2))}
.veedits h3{margin:0 0 6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.veedits .velist{margin:0}
.velist li .k{flex:none;min-width:5.5em;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase}
.velist li[data-kind=cut] .k{color:var(--rec)}
.velist li[data-kind=music] .k{color:var(--ok)}
.velist li[data-kind=sound] .k{color:var(--accent)}
.velist li[data-kind=image] .k{color:var(--warn)}
.velist .go{padding:0;border:0;background:none;color:var(--ink);font:inherit;cursor:pointer;text-decoration:underline dotted color-mix(in srgb,var(--ink) 40%,transparent);text-underline-offset:3px}
.velist .go:hover{color:var(--accent)}
.velist .go:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}
.velane .chip.zoom{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 20%,var(--panel2));cursor:pointer}
.velane .chip.zoom.on{outline:2px solid var(--accent)}
.velist li[data-kind=zoom] .k{color:var(--accent)}
.velist li:not(.on) .zhint{display:none}
#veZooms li.on{border-color:var(--accent)}
.velane .chip.off{opacity:.45;border-style:dashed}   /* a picture inside a removed part: it will not show */
.velist li.off .nm{opacity:.6}
.velist li .offnote{color:var(--warn);font-size:12.5px}
.velane{position:relative;height:26px;border-radius:6px;background:var(--panel2)}
.velane:empty{display:none}
.velane .chip{position:absolute;top:3px;bottom:3px;min-width:8px;padding:0 6px;border-radius:5px;border:1px solid var(--warn);background:color-mix(in srgb,var(--warn) 22%,var(--panel2));color:var(--ink);font:inherit;font-size:11px;line-height:18px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.velane .chip:focus-visible,.vetrack:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.veticks{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.vetabs{align-self:flex-start;width:min(580px,100%)}
.vepanel .muted{margin:0 0 8px}
.vepanel .row{margin:8px 0}
.vesel{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.velist{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.velist:empty{display:none}
.velist li{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);font-size:13.5px}
.velist li .t{font-variant-numeric:tabular-nums}
.velist li .muted{margin:0}
.velist li>.btn{margin-left:auto}
.velist img{width:40px;height:40px;object-fit:contain;border-radius:6px;background:var(--bg);flex:none}
.velist .nm{font-weight:600;max-width:12em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.velist label{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12.5px}
.velist .text{width:72px;min-width:0;padding:5px 8px}
.velist .select{padding:5px 8px;font-size:13px}
.vemusic{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.vemusic input[type=range]{accent-color:var(--accent);width:160px}
.vemusic output{font-variant-numeric:tabular-nums;min-width:3.5em;font-size:13px}
.vecheck{display:flex;align-items:center;gap:6px;font-size:13.5px}
/* An equalizer: a row a band (name, slider, dB), under its title, with Reset at the end. */
.veeq{display:grid;grid-template-columns:auto minmax(120px,200px) 4.5em;align-items:center;justify-content:start;gap:6px 10px;margin-top:12px;font-size:13.5px}
.veeq .veeqname{grid-column:1/-1;font-weight:600;font-size:13px}
.veeq input[type=range]{accent-color:var(--accent);width:100%}
.veeq output{font-variant-numeric:tabular-nums;font-size:13px}
.veeq .btn{grid-column:1/-1;justify-self:start}
.veditor .convertstatus:not(.hidden){margin:0 20px 12px}
.vefoot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 20px;border-top:1px solid var(--line)}
.vefoot .muted{margin:0}
@media (max-width:600px){.velen{margin-left:0}.vehead,.vebody,.vefoot{padding-left:16px;padding-right:16px}}
.fold{border-top:1px solid var(--line);margin-top:10px;padding-top:10px}
.fold summary{cursor:pointer;font-weight:600;font-size:14px}
.fold summary .sub{font-weight:400;margin-left:8px}
a.menuline.trial{display:block;color:var(--ok);text-decoration:none;font-weight:600}
a.menuline.trial:hover{text-decoration:underline}

/* ── phones and tablets ──────────────────────────────────── */
/* Fingers need 44px. Applies on any touch device, whatever its width. */
@media (pointer:coarse){
  .btn,.text,.select,.tab,.themeswitch button,.check,.userchip{min-height:44px}
  .btn.small,.btn.ghost.small{min-height:40px}
  .themeswitch button{width:36px}
  .devices li{min-height:44px}
}
@media (max-width:640px){
  body{padding-bottom:220px}                          /* room for the stacked start bar */
  .card,.tile,.check,.btn,.text,.select{scroll-margin-bottom:230px;scroll-margin-top:120px}   /* scrolled-to controls land between the sticky top bar and the start bar */
  .topbar{flex-wrap:wrap;gap:10px 12px;padding:10px 14px}
  .topbar .brand{order:0;flex:1}
  .topbar .clockwrap{order:1}
  .topbar .topnav{order:2;width:100%;justify-content:space-between;gap:8px}
  .topnav .account,.userchip{min-width:0}                /* a long name shortens with an ellipsis instead of pushing the bar past the screen edge */
  .userchip b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .userchip small{white-space:nowrap}                    /* the chip is the one place the plan is named */
  .brand h1{font-size:15px}
  .clock{font-size:18px}
  main{padding:14px}
  .card{padding:14px}
  .text{min-width:0;width:100%}
  .select{max-width:100%;width:100%}
  .tiles{grid-template-columns:minmax(0,1fr)}
  .tile,.tilebody{min-width:0;max-width:100%}
  .dev{flex-wrap:wrap}
  .meter{width:100%;flex:1 0 100%;order:9}
  .clockwrap{gap:8px;flex-wrap:wrap;justify-content:flex-end}
  .written{font-size:11px}
  .row{gap:8px}
  .abilities{grid-template-columns:1fr}
  .planpick{grid-template-columns:repeat(2,minmax(0,1fr))}
  video,.stage{max-width:100%}
  .startbar{flex-direction:column;align-items:stretch;gap:8px;padding:10px 14px}
  .startleft{flex-direction:column;align-items:stretch;gap:6px}
  .startleft .text{min-width:0;width:100%;flex:1}
  .startright{width:100%}
  .startright .btn{flex:1;justify-content:center}
  .markers:not(.hidden){left:14px;right:14px;bottom:230px;max-width:none}
  .toast{left:14px;right:14px;transform:none;bottom:234px}
  .topbar .topnav{position:relative}                     /* the menu hangs from the whole bar, not the chip, so it never leaves the screen */
  .topnav .account{position:static}
  .menu{left:0;right:0;max-width:none;width:auto}
  .gate{padding:22px 16px 40px;gap:26px}
  .gate-card{padding:20px 18px;box-shadow:none}
  .gate-intro h2{font-size:28px}
}

/* ── the phone page: a phone or tablet browser cannot capture the screen ── */
/* The script in index.html's head marks the page html.phone there; the recorder never loads. */
html.phone .gate,html.phone main,html.phone .startbar,html.phone .markers,html.phone #accountWrap,html.phone #themeSwitch,html.phone #supportBtn,html.phone .clockwrap{display:none !important}
html.phone body{padding-bottom:0}
html.phone .phone-wall{display:grid !important}
.phone-wall{min-height:calc(100dvh - 53px);display:grid;place-items:center;padding:28px 18px}
.phone-card{max-width:440px;width:100%;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:30px 26px;text-align:center;display:flex;flex-direction:column;gap:14px;align-items:center}
.phone-card .eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.phone-card h1{font-size:24px;line-height:1.2;margin:0;letter-spacing:-.01em;text-wrap:balance}
.phone-card p{margin:0;color:var(--muted)}
.phone-card .btn{width:100%;justify-content:center;min-height:48px;font-size:16px}
.phone-card .muted{font-size:13px}

/* ── the wall: signed out, only the account card is on screen ── */
/* ── the sign-in page and the wall ───────────────────────── */
/* The page is served with body.walled; the script removes it only once a session is confirmed. */
body.walled main,body.walled .startbar,body.walled .markers:not(.hidden),body.walled #accountWrap .btn,body.walled #startAccount,body.walled .clock,body.walled .written{display:none !important}
body:not(.walled) .gate{display:none}
body.walled{padding-bottom:0}
/* Fixed columns, set from the top: switching Create account and Sign in never moves the text. */
.gate{min-height:calc(100dvh - 53px);display:grid;grid-template-columns:minmax(0,440px) 420px;gap:72px;align-items:start;justify-content:center;max-width:980px;margin:0 auto;padding:clamp(40px,11vh,120px) 24px 40px;box-sizing:border-box}
.gate-intro{max-width:460px}
.gate-intro .eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600;margin-bottom:14px}
.gate-intro h2{font-size:42px;line-height:1.08;letter-spacing:-.02em;margin:0 0 14px;text-wrap:balance}
.gate-intro p{font-size:16.5px;line-height:1.55;color:var(--muted);margin:0 0 22px;max-width:44ch}
.gate-points{list-style:none;margin:0;padding:0;display:grid;gap:10px;font-size:14.5px}
.gate-points li{display:flex;gap:10px;align-items:flex-start}
.gate-points i{flex:none;width:18px;height:18px;border-radius:5px;background:var(--panel2);border:1px solid var(--line);margin-top:2px;position:relative}
.gate-points i::after{content:'';position:absolute;left:5px;top:2px;width:5px;height:9px;border:solid var(--ok);border-width:0 2px 2px 0;transform:rotate(45deg)}
.gate-card{width:100%;max-width:420px;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:28px;box-shadow:0 20px 50px rgba(0,0,0,.12);display:flex;flex-direction:column;gap:16px;box-sizing:border-box}
.gate-card .btn.primary{width:100%;padding:13px;font-size:15px}
.gate-card .tab{padding:9px;font-size:13.5px}
.gate-card .muted{margin:0;font-size:12.5px;line-height:1.5;text-align:center}
.gate-card .warn{margin:0}
.gate-card .gate-next{margin:0;padding:10px 12px;border-radius:10px;background:var(--panel2);font-size:13.5px;line-height:1.45}
@media (max-width:860px){
  .gate{grid-template-columns:1fr;gap:32px;align-items:start;justify-items:center;min-height:0}
  .gate-card{order:0}
  .gate-intro{order:1;max-width:520px;text-align:left}
  .gate-intro h2{font-size:32px}
}

/* the Create row: core feature cards */
.card.create .tiles.core{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.tile.core{align-items:center}
.tile.core .mark{width:38px;height:38px;border-radius:10px;color:var(--accent)}
.tile.core:hover:not(.soon){border-color:var(--accent)}
.tile.core.soon{opacity:.62;cursor:default}
.tile .tag{font-size:10px;font-weight:400;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);border:1px solid var(--line);border-radius:5px;padding:1px 5px;margin-left:6px;vertical-align:middle;white-space:nowrap}

/* step 2: the three screen buttons, the webcam switch, the folded microphone list */
.surfaces .btn{display:inline-flex;align-items:center;gap:7px}
.surfaces svg{flex:none}
/* The pane used last is outlined, not painted: only a confirmed pick fills the button. */
.btn.remembered{border-color:var(--accent);color:var(--accent);background:var(--panel)}
.tilehead{display:flex;align-items:flex-start;gap:10px}
.tilehead>div{flex:1;min-width:0}
.switch{position:relative;width:40px;height:22px;flex:none;margin-top:3px;cursor:pointer}
.switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}
.switch .knob{position:absolute;inset:0;border-radius:11px;background:var(--hint);transition:.14s background}
.switch .knob::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:.14s transform}
.switch input:checked+.knob{background:var(--accent)}
.switch input:checked+.knob::after{transform:translateX(18px)}
.switch input:focus-visible+.knob{outline:2px solid var(--accent);outline-offset:2px}
.more{margin-top:8px}
.more summary{cursor:pointer;font-size:13px;color:var(--muted);list-style:none;display:flex;align-items:center;gap:8px;padding:2px 0}
.more summary::-webkit-details-marker{display:none}
.more summary::before{content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(-45deg);transition:.14s transform;flex:none;margin-left:2px}
.more[open] summary::before{transform:rotate(45deg)}
@media (pointer:coarse){
  .switch{width:48px;height:28px;margin-top:0}
  .switch .knob::after{width:24px;height:24px}
  .switch input:checked+.knob::after{transform:translateX(20px)}
  .more summary{min-height:44px}
}

/* ── webcam size and blur ─────────────────────────────────── */
.camtools{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-top:8px}
.sizectl{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);flex:1 1 180px;min-width:0}
.sizectl input[type=range]{flex:1;min-width:80px;accent-color:var(--accent)}
.sizectl output{font-variant-numeric:tabular-nums;min-width:3.2ch;text-align:right;font-size:12.5px}
.blurstate{color:var(--muted);font-size:12px;margin-left:4px}
/* ── webcam background: one choice, drawn as small pictures ── */
.bgpick{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.bghead{display:flex;align-items:baseline;gap:8px}
.bghead b{font-size:13px}
.swatches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pics{display:contents}
.swatch{appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:var(--muted);display:flex;flex-direction:column;gap:4px;min-width:0;cursor:pointer;text-align:center}
.swatch .sw{display:grid;place-items:center;aspect-ratio:16/10;border-radius:8px;border:1px solid var(--line);background:var(--panel2);background-size:cover;background-position:center;color:var(--muted)}
.swatch .sw.soft{background:linear-gradient(135deg,#bfc7d2,#e6eaf0);color:#3d4757}
.swatch .swname{font-size:11.5px;line-height:1.3;overflow-wrap:anywhere}   /* names wrap, never cut off */
.swatch[aria-pressed="true"] .sw{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),inset 0 0 0 2px var(--panel)}
.swatch[aria-pressed="true"] .swname{color:var(--ink);font-weight:600}
.swatch:focus-visible{outline:none}
.swatch:focus-visible .sw{outline:2px solid var(--accent);outline-offset:2px}
.swatch:disabled{cursor:default;opacity:.5}
.swatch.add .sw{border-style:dashed;border-color:var(--hint);background-color:var(--panel);color:var(--accent)}
.swatch.add[aria-pressed="true"] .sw{border-style:solid}
.linkbtn{appearance:none;background:none;border:0;padding:0;color:var(--accent);font:inherit;font-size:12.5px;cursor:pointer;align-self:flex-start}
.check.keytick{align-items:flex-start;color:var(--ink)}
.check.keytick input{margin-top:2px;flex:none}
.check.keytick small{display:block;color:var(--muted);font-size:12px}
/* ── layout sits in the Preview card's header, beside the picture it changes ── */
#step-preview .cardhead{flex-wrap:wrap}
.layoutpick{margin-left:auto;display:flex;align-items:center;gap:8px;min-width:0}
.layoutpick.hidden{display:none}   /* webcam only: nothing to lay out */
/* ── Options: the control, its name, and one plain line under it ── */
.opt{display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 10px;align-items:start;padding:10px 0;border-top:1px solid var(--line)}
.details summary+.opt{border-top:0}
.opt>input[type=checkbox]{accent-color:var(--accent);width:15px;height:15px;margin:3px 0 0}
.optbody label{font-size:13.5px;font-weight:500;cursor:pointer}
.optline{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.optnote{margin:2px 0 0;font-size:12.5px;color:var(--muted)}
@media (max-width:640px){
  .layoutpick{margin-left:0;flex:1 1 100%}
  .layoutpick .select{flex:1}
  .opt>input[type=checkbox]{width:20px;height:20px;margin-top:12px}
  .optbody label{display:inline-flex;align-items:center;min-height:44px}
}
.pipgrip{position:absolute;right:-6px;bottom:-6px;width:16px;height:16px;border-radius:50%;background:var(--accent);border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.4);cursor:nwse-resize;touch-action:none;opacity:0;transition:opacity .15s}
.campip:hover .pipgrip,.campip:focus-visible .pipgrip,.campip.dragging .pipgrip,.campip.resizing .pipgrip{opacity:1}
.campip.resizing{cursor:nwse-resize;transition:none}
.campip.resizing::after{opacity:0}
@media (pointer:coarse){.pipgrip{opacity:1;width:22px;height:22px;right:-8px;bottom:-8px}}

/* ── customer support ─────────────────────────────────────── */
.supportbtn{display:inline-flex;align-items:center;gap:6px;position:relative}
.supportbtn .badge,.support .badge{background:var(--accent);color:var(--on-accent);border-radius:999px;padding:0 7px;font-size:11px;font-weight:700;line-height:18px;min-width:18px;text-align:center}
.support{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--panel);border-left:1px solid var(--line);box-shadow:0 14px 40px rgba(0,0,0,.25);z-index:60;display:flex;flex-direction:column}
.supporthead{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}
.supporthead b{font-size:15px}
.supportbody{overflow:auto;padding:14px;display:flex;flex-direction:column;gap:12px}
.supportnew{display:flex;flex-direction:column;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.supportlabel{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.subjects{display:flex;flex-wrap:wrap;gap:8px}
.subject{appearance:none;border:1px solid var(--line);background:var(--panel2);color:var(--ink);border-radius:999px;padding:7px 13px;font:inherit;font-size:13px;cursor:pointer}
.subject[aria-checked="true"]{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:650}
.subject:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.supportnew textarea.text{width:100%;box-sizing:border-box}
.supportrow{display:flex;align-items:center;justify-content:space-between;gap:10px}
.support .threads{display:flex;flex-direction:column;gap:10px}
.support .thread{border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}
.support .thread.answered{border-color:var(--accent)}
.support .thread .thead{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.support .thread .thead b{color:var(--ink);font-size:13px;margin-right:auto}
.support .msg{max-width:100%;padding:8px 10px;border-radius:10px;background:var(--panel2);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
/* bug bounty terms and files on support messages */
.bountynote{margin:0;font-size:12.5px;line-height:1.45;padding:8px 10px;border:1px dashed var(--accent);border-radius:10px;color:var(--ink)}
.bountynote .tiers{display:flex;flex-wrap:wrap;gap:2px 14px;margin-top:4px;font-weight:600}
.attachrow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;position:relative}
.fileinput{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}
.fileinput:focus-visible+label{outline:2px solid var(--accent);outline-offset:2px}
.picked{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px;flex:1 1 100%}
.picked li{display:inline-flex;align-items:center;gap:6px;font-size:12px;border:1px solid var(--line);border-radius:999px;padding:3px 4px 3px 10px;background:var(--panel2);max-width:100%;overflow-wrap:anywhere}
.picked small,.support .file small{color:var(--muted)}
.unpick{appearance:none;border:0;background:transparent;color:var(--muted);font-size:15px;line-height:1;cursor:pointer;padding:0 5px;border-radius:50%}
.unpick:hover,.unpick:focus-visible{color:var(--ink);outline:1px solid var(--line)}
.support .files{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;white-space:normal}
.support .file{appearance:none;font:inherit;font-size:12px;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:4px 8px;cursor:pointer;text-align:left;overflow-wrap:anywhere}
.support .file:hover{border-color:var(--accent)}
.support .file:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.support .reply{position:relative}
.bountyline{font-size:12px;font-weight:600;color:var(--muted)}
.bountyline.won{color:var(--accent)}
.support .msg.staff{background:var(--accent);color:var(--on-accent)}
.support .msg small{display:block;font-size:11px;opacity:.75;margin-bottom:2px}
.support .thread .reply{display:flex;gap:8px;align-items:flex-end}
.support .thread .reply textarea.text{flex:1;min-height:40px;min-width:0}
@media (max-width:640px){
  .support{width:100%;border-left:0}
  .supportbtn span:not(.badge){display:none}          /* the icon and the badge are enough on a phone */
}

/* Why this device was signed out: the first thing on the sign-in card. */
.gate-notice{border:1px solid var(--line);background:var(--panel2);border-radius:12px;padding:13px 15px;display:flex;flex-direction:column;gap:5px}
.gate-notice strong{font-size:14px;line-height:1.35;color:var(--ink)}
.gate-notice p{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
/* A minute before the quiet-time sign-out: a heads-up above the start bar. */
.idlewarn{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:14px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:12px 14px 12px 18px;box-shadow:0 16px 40px rgba(0,0,0,.28);max-width:calc(100vw - 32px);box-sizing:border-box}
.idlewarn p{margin:0;font-size:14px;line-height:1.45;font-variant-numeric:tabular-nums}
@media (max-width:600px){.idlewarn{flex-direction:column;align-items:stretch;bottom:150px;width:calc(100vw - 32px)}.idlewarn .btn{width:100%}}

/* Deleting the account: a small window over the page. */
.menuitem.danger{color:var(--rec)}
.deletewin{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:16px;background:rgba(10,13,18,.5)}
.deletebox{width:min(440px,100%);box-sizing:border-box;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;display:flex;flex-direction:column;gap:10px;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.deletebox h2{margin:0;font-size:17px}
.deletebox > p{margin:0;font-size:14px;line-height:1.5}
.deletebox > p:not(.warn){color:var(--muted)}
.deletebox .deletenote{color:var(--ink)}
.aiown{display:contents}
.aiownbox{width:min(560px,100%);max-height:calc(100vh - 32px);overflow:auto}
.aiownlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.aiownlist li{display:grid;grid-template-columns:1fr auto;gap:6px;padding:10px;border:1px solid var(--line);border-radius:var(--radius)}
.aiownlist li textarea{grid-column:1 / -1;min-height:64px;resize:vertical;font:inherit}
.deleteactions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:4px}
.deletebox .warn{margin-top:0;color:var(--warn)}   /* the shared .warn text is pale, made for the dark page; here it follows the theme */

/* ── the set-up cards (1 Where to save, 2 What to capture): easy to hit, little room ── */
/* The folder is one line: the step, its name, the chosen folder and the folder button. */
.folderbar .cardhead{flex-wrap:wrap;row-gap:8px;margin-bottom:0}
.folderbar #pickFolder{display:inline-flex;align-items:center;gap:7px}
.folderbar #pickFolder svg{flex:none}
.folderbar .pill:empty{display:none}
.folderbar .pill:empty+#pickFolder{margin-left:auto}
.card.done #pickFolder{background:var(--panel2);border-color:var(--line);color:var(--ink);font-weight:500}   /* chosen: the button stays, quietly, to change the folder */
.folderextra{margin:10px 0 0}
.folderextra:not(:has(>:not(.hidden))){display:none}
/* Nothing to hit under 40 px here, and 44 px on touch screens. */
#step-folder .btn,#step-capture .btn,#step-capture .select{min-height:40px}
/* The four screen choices: an even two-by-two grid instead of a ragged wrap. */
.surfaces{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.surfaces .btn{justify-content:flex-start;min-width:0}
/* The switch keeps its look; the invisible box that takes the click reaches 44 x 44. */
.switch input{inset:-11px -2px;width:auto;height:auto}
/* Once a screen (or Webcam only) is chosen, the note on how to choose one has done its job. */
.tile.done #surfaceNote{display:none}
@media (pointer:coarse){
  #step-folder .btn,#step-capture .btn,#step-capture .select{min-height:44px}
  .switch input{inset:-8px -2px}
}
/* A narrow screen cannot fit it on one line: the folder button takes the whole second line, the easiest thing to tap. */
@media (max-width:640px){.folderbar #pickFolder{flex:1 1 100%;justify-content:center;margin-left:0}}

/* ── the sign-in page wears the site's look ──────────────── */
/* body.walled is on only while the sign-in page (or the phone page) is on screen. There the recorder's own
   colours give way to the landing page's (:root in site/index.html): paper, green and lime, with its two
   typefaces, linked in index.html. Set on body, they also beat the --accent that renderFeatures() writes on
   the root. Signed in, the class is gone and the recorder looks as it did. test/signin-theme.test.mjs holds
   these values to the landing page's. */
body.walled{
  --bg:#0f1a14; --panel:#182a20; --panel2:#213629; --line:#2e4537;
  --ink:#eef2ea; --muted:#a3b3a8; --accent:#22a06c; --on-accent:#06110b; --ok:#22a06c;
  --bar:rgba(15,26,20,.9); --hint:#5d7568; --radius:16px;
  font-family:"Instrument Sans",-apple-system,system-ui,sans-serif;
}
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]) body.walled{
  --bg:#f3f4ee; --panel:#ffffff; --panel2:#e9ece3; --line:#d5dad0;
  --ink:#0f1a14; --muted:#5c6a62; --accent:#0b6b45; --on-accent:#ffffff; --ok:#0b6b45;
  --warn:#a35b00; --bar:rgba(243,244,238,.94); --hint:#8b978f;
} }
:root[data-theme="light"] body.walled{
  --bg:#f3f4ee; --panel:#ffffff; --panel2:#e9ece3; --line:#d5dad0;
  --ink:#0f1a14; --muted:#5c6a62; --accent:#0b6b45; --on-accent:#ffffff; --ok:#0b6b45;
  --warn:#a35b00; --bar:rgba(243,244,238,.94); --hint:#8b978f;
}
body.walled .brand h1{font:700 18px/1.2 "Bricolage Grotesque","Instrument Sans",system-ui,sans-serif;letter-spacing:0}
body.walled .pill{background:var(--panel)}
body.walled .pill.warnpill{border-color:var(--line)}
body.walled .themeswitch{border-color:transparent;border-radius:999px}
body.walled .themeswitch button{border-radius:999px}
body.walled .themeswitch button[aria-checked="true"]{background:var(--panel)}
body.walled .btn,body.walled .text{font-family:inherit}
body.walled .btn{border-radius:12px;text-decoration:none}
body.walled .btn.primary{font-weight:600}
body.walled .btn.primary:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 86%,var(--ink));border-color:color-mix(in srgb,var(--accent) 86%,var(--ink))}
body.walled .btn:focus-visible,body.walled .tab:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
body.walled .warn{background:color-mix(in srgb,var(--warn) 9%,transparent);border-color:color-mix(in srgb,var(--warn) 35%,transparent);color:var(--ink)}
body.walled .eyebrow{display:flex;align-items:center;gap:8px;font-size:13px;letter-spacing:.06em;color:var(--accent)}
body.walled .eyebrow::before{content:"";width:22px;height:2px;background:var(--accent)}
body.walled .phone-card .eyebrow{justify-content:center}
body.walled .gate-intro h2,body.walled .phone-card h1{font-family:"Bricolage Grotesque","Instrument Sans",system-ui,sans-serif;font-weight:800;line-height:1.05;letter-spacing:-.01em}
body.walled .gate-points i{background:none;border:0}
body.walled .gate-points i::after{left:6px;top:1px;width:6px;height:11px;border-color:var(--accent);border-width:0 2.5px 2.5px 0}
body.walled .gate-card{border-radius:24px;box-shadow:none}
body.walled .gate-card .tabs{background:var(--panel2);border-color:transparent;border-radius:999px;padding:4px}
body.walled .gate-card .tab{border-radius:999px;font-weight:600}
body.walled .gate-card .tab[aria-selected="true"]{background:var(--panel);box-shadow:0 1px 2px rgba(0,0,0,.08)}
body.walled .gate-card .text{background:var(--bg);border-radius:12px;padding:12px 14px;font-size:16px}
body.walled .gate-card .text:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
body.walled .gate-card .field>span{font-size:13px;font-weight:500}

/* ── Meetings booked ahead (lib/meetings.js) ── */
.card.meetings .cardhead{flex-wrap:wrap}
.mtabs{margin-left:auto;flex:0 0 auto}
.mtabs .tab{flex:0 0 auto;padding:6px 14px}
.mcount{display:inline-block;min-width:18px;margin-left:4px;padding:0 5px;border-radius:9px;background:var(--line);font-size:11.5px;font-weight:600;line-height:18px}
.mcount:empty{display:none}
.mlist{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.mrow{display:grid;grid-template-columns:132px minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.mrow.live{border-color:var(--ok);box-shadow:inset 3px 0 0 var(--ok)}
.mrow.cancelled .mtitle b,.mrow.cancelled .mwhen{text-decoration:line-through;color:var(--muted)}
.mrow.past{opacity:.8}
.mwhen{display:flex;flex-direction:column;gap:2px;font-size:13px}
.mwhen span{color:var(--muted);font-variant-numeric:tabular-nums}
.mwhat{min-width:0;display:flex;flex-direction:column;gap:3px}
.mtitle{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mtitle b{font-size:14.5px;overflow-wrap:anywhere}
.mtitle .pill{padding:2px 9px;font-size:11.5px}
.mwhat small{color:var(--muted);font-size:12.5px;overflow-wrap:anywhere}
.mact{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.mempty{color:var(--muted);font-size:13px;padding:10px 2px}
.pill.live{color:var(--ok);border-color:var(--ok);font-weight:600}
.pill.rec{color:var(--rec);border-color:var(--rec);font-weight:600}
@media (max-width:640px){
  .mtabs{margin-left:0;width:100%}.mtabs .tab{flex:1}
  .mrow{grid-template-columns:1fr;gap:8px}
  .mwhen{flex-direction:row;gap:8px}
  .mact{justify-content:stretch}.mact .btn{flex:1}
}

/* ── the set-up page on a computer: the preview large on the left, the set-up cards beside it ──
   The cards keep their order in the page (the admin's Appearance order); only the grid places them. A finished
   recording spans both columns above. Narrower windows keep one column. */
@media (min-width:1100px){
  main#sections{max-width:1440px;display:grid;grid-template-columns:minmax(0,1fr) 440px;column-gap:22px;row-gap:0;align-items:start}
  main#sections>*{grid-column:2;margin-bottom:16px;min-width:0}
  main#sections>#step-preview{grid-column:1;grid-row:1/span 40;position:sticky;top:78px}
  main#sections:has(>#step-edit:not(.hidden))>#step-preview{grid-row:2/span 40}
  main#sections>#step-edit{grid-column:1/-1;grid-row:1}
  main#sections:has(>#step-preview.appearance-hidden){display:flex}
  main#sections .tiles,main#sections .card.create .tiles.core{grid-template-columns:1fr}
  main#sections .card.create .tiles.core{gap:8px}
  main#sections .tile.core{padding:8px 12px}
  main#sections .tile.core .mark{width:32px;height:32px}
  main#sections .tile.wide{grid-column:auto}
  #step-preview .stage{max-width:none}
  #step-preview .stage video{max-height:calc(100vh - 230px)}
  .folderbar .cardhead{flex-wrap:nowrap}
  .folderbar .cardhead h2{white-space:nowrap}
  .folderbar .pill{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media (min-width:1250px){main#sections{grid-template-columns:minmax(0,1fr) 470px}}

/* ── the recording view (index.html #recView): always dark, like the meeting room (lib/room.css), under the top bar ── */
.recview{--st:#0b120e;--tile:#18241d;--ctl:#22322a;--ln:#2d3f35;--ink:#eef2ea;--mut:#a6b5ab;--live:#3ddc97;--rec:#d6403a;--hand:#f5b642;--pan:#121c16;
  position:fixed;left:0;right:0;bottom:0;top:0;z-index:19;display:flex;flex-direction:column;background:var(--st);color:var(--ink);color-scheme:dark}
body.recording{overflow:hidden}
body.recording .startbar,body.recording .topbar .clockwrap{display:none}   /* the view has its own clock */
body.recording .toast{bottom:96px}
.rvhead{flex:none;display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 20px}
.rvrec{display:inline-flex;align-items:center;gap:8px;background:var(--rec);color:#fff;border-radius:999px;padding:5px 12px;font-weight:700;font-size:13px;letter-spacing:.5px}
.rvrec i{width:8px;height:8px;border-radius:50%;background:#fff;animation:pulse 1.4s ease-in-out infinite}
.rvclock{font:700 24px/1 var(--display);font-variant-numeric:tabular-nums;letter-spacing:.5px}
.rvname{color:var(--mut);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:28ch}
.rvlights{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.rvlight{display:inline-flex;align-items:center;gap:7px;background:var(--tile);border:1px solid var(--ln);border-radius:999px;padding:6px 12px;font-size:13px}
.rvlight>i{width:8px;height:8px;border-radius:50%;background:var(--mut)}
.rvlight.on>i{background:var(--live)}
.rvlight.lost{border-color:rgba(245,182,66,.55);color:var(--hand)}
.rvlight.lost>i{background:var(--hand)}
.rvlight.quiet{color:var(--mut);font-variant-numeric:tabular-nums}
.rvlevel{display:inline-flex;gap:2px;align-items:flex-end;height:12px}
.rvlevel i{width:3px;border-radius:1px;background:var(--ln)}
.rvlevel i:nth-child(1){height:4px}.rvlevel i:nth-child(2){height:6px}.rvlevel i:nth-child(3){height:8px}.rvlevel i:nth-child(4){height:10px}.rvlevel i:nth-child(5){height:12px}
.rvlevel i.lit{background:var(--live)}
.rvbody{flex:1;min-height:0;display:flex;gap:16px;padding:0 20px}
.rvstage{flex:1;min-width:0;position:relative;display:grid;place-items:center;border-radius:16px;background:#000;border:2px solid var(--rec);overflow:hidden;container-type:size}
.recview .stage{width:min(100cqw,100cqh * 16 / 9);max-width:none}
.recview .stage video{max-height:none;border:0;border-radius:0;background:#000}
.rvtag{position:absolute;left:14px;top:12px;z-index:2;background:rgba(11,18,14,.82);border-radius:999px;padding:5px 12px;font-size:12px;pointer-events:none}
.rvlost{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);z-index:3;width:min(620px,calc(100% - 32px));background:var(--pan);border:1px solid rgba(245,182,66,.55);border-radius:16px;padding:18px 20px;box-shadow:0 18px 50px rgba(0,0,0,.55)}
.rvlost h2{font:700 20px/1.2 var(--display);margin:0 0 6px;color:var(--hand)}
.rvlost p{margin:0 0 14px;color:var(--mut);font-size:14px}
.rvlostbtns{display:flex;gap:10px;flex-wrap:wrap}
.rvside{width:320px;flex:none;display:flex;flex-direction:column;gap:14px;background:var(--pan);border:1px solid var(--ln);border-radius:16px;padding:16px;overflow:auto}
.rvpart h3{font:700 14px/1.2 var(--display);margin:0 0 8px;color:var(--ink)}
.rvlines{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:13px;line-height:1.5;color:var(--mut);max-height:40vh;overflow:auto}
.rvlines li:last-child{color:var(--ink)}
.rvlines .t,.recview .markers .t{font-variant-numeric:tabular-nums;color:var(--ink);font-weight:600}
.recview .markers{margin:0}
.recview .markers li{background:var(--tile);border-color:var(--ln)}
.rvtip{margin-top:auto;font-size:12px;color:var(--mut);border-top:1px solid var(--ln);padding-top:12px;margin-bottom:0}
.rvcontrols{flex:none;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:14px 20px 18px}
.recview .btn{background:var(--ctl);border-color:var(--ctl);color:var(--ink);min-height:46px;padding:0 18px;border-radius:999px;display:inline-flex;align-items:center;gap:8px}
.recview .btn:hover{background:#2c4036}
.recview .btn.primary{background:#d4f74a;border-color:#d4f74a;color:#0b120e}
.recview .btn.danger,.recview .btn.rvstop{background:var(--rec);border-color:var(--rec);color:#fff;font-weight:700}
.recview .rvstop{margin-left:12px;padding:0 24px}
.rvstop i{width:12px;height:12px;border-radius:3px;background:#fff}
.recview kbd{background:var(--st);border-color:var(--ln);color:var(--ink)}
.recview :focus-visible{outline:3px solid #d4f74a;outline-offset:2px}
.stopreason{margin:0 0 10px;padding:9px 12px;border-radius:9px;border:1px solid rgba(255,180,84,.4);background:rgba(255,180,84,.08);color:var(--warn);font-size:13.5px}
@media (max-width:900px){.rvbody{flex-direction:column}.rvside{width:auto;max-height:30vh}}
@media (prefers-reduced-motion:reduce){.rvrec i{animation:none}}
