/* Workshop agent demo — unbranded. Design tokens and the bundled typeface. */

@font-face{
  font-family:"DemoSans";
  src:url("font1.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}
@font-face{
  font-family:"DemoSans";
  src:url("font2.woff2") format("woff2");
  font-weight:600 700;
  font-display:swap;
}

:root{
  --ink:#14121a;
  --body:#3a3346;
  --muted:#6b6478;
  --purple:#7439df;
  --purple-deep:#5b2bb8;
  --pink:#e83f9f;
  --green:#35d07f;
  --card:#ffffff;
  --page:#f7f4fb;
  --chip:#f2ecfb;
  --border:#ece7f2;
  --shadow:rgba(50,31,91,.12);
  --r-lg:26px;
  --r-md:20px;
  --r-sm:14px;
}

*{box-sizing:border-box;margin:0;padding:0;}
[hidden]{display:none !important;}

html{-webkit-text-size-adjust:100%;}
html,body{max-width:100%;overflow-x:hidden;}
body{
  font-family:"DemoSans",system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--page);
  color:var(--body);
  line-height:1.45;
  -webkit-tap-highlight-color:transparent;
}
img{-webkit-user-drag:none;}
button{font-family:inherit;}
svg{display:block;}
code{font-family:ui-monospace,SFMono-Regular,"Cascadia Mono",Consolas,monospace;}

/* view switch */
body[data-view="setup"] #playView{display:none;}
body[data-view="play"] #setupView{display:none;}
body[data-view="play"]{overflow:hidden;}

:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}

/* ---------- shared bits ---------- */
.eyebrow{
  display:block;
  font-size:11px;
  font-weight:700;letter-spacing:.16em;
  color:var(--purple);
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  box-shadow:0 20px 60px var(--shadow);
  padding:clamp(18px,4.4vw,28px);
}
.btn-primary,.btn-ghost{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:14px 24px;
  border-radius:999px;
  font-size:15.5px;
  font-weight:700;letter-spacing:-.005em;
  cursor:pointer;
  border:none;
  min-height:50px;
}
.btn-primary{
  background:linear-gradient(100deg,var(--pink),var(--purple));
  color:#fff;
  box-shadow:0 12px 30px rgba(116,57,223,.32);
}
.btn-primary svg{width:16px;height:16px;flex:none;}
.btn-primary:active{transform:translateY(1px);}
.btn-ghost{
  background:#fff;
  border:1px solid var(--border);
  color:var(--body);
}
.btn-ghost svg{width:16px;height:16px;flex:none;}
.btn-ghost:hover{border-color:#cbbfda;}
.btn-primary.small,.btn-ghost.small{padding:10px 18px;font-size:14px;min-height:42px;}
.btn-primary.big{padding:17px 30px;font-size:17px;min-height:58px;}
.btn-link{
  background:none;border:none;
  padding:12px 6px;
  color:var(--muted);
  font-size:14px;font-weight:600;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.btn-link:hover{color:var(--purple-deep);}

/* ============================================================= */
/* SETUP VIEW                                                    */
/* ============================================================= */
.setup{
  max-width:1120px;
  margin:0 auto;
  padding:22px 16px calc(40px + env(safe-area-inset-bottom));
}
.setup-head{margin-bottom:18px;}
/* Product mark, divider, then the presenter's own business and the name they
   gave their agent. The mark is a fixed height and never shrinks the identity
   line: `min-width:0` on the wrapper and on .brand-id is what lets the business
   name ellipsise instead of pushing the language switch off a phone. */
.head-id{display:flex;align-items:center;gap:11px;min-width:0;}
.brand-logo{flex:none;display:block;height:26px;width:auto;}
.head-id .brand-id{padding-left:11px;border-left:1px solid var(--border);}
.brand-id{min-width:0;}
.brand-id b{
  display:block;
  font-size:17px;
  font-weight:700;letter-spacing:-.015em;
  color:var(--ink);
  line-height:1.2;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.brand-id small{
  display:block;
  margin-top:2px;
  font-size:12.5px;font-weight:600;
  color:var(--muted);
}
.setup-head .eyebrow{margin-bottom:6px;}
.setup-head h1{
  font-size:clamp(25px,6.2vw,36px);
  font-weight:700;letter-spacing:-.022em;
  line-height:1.12;
  color:var(--ink);
}
.lede{
  margin-top:8px;
  font-size:clamp(14px,3.6vw,16.5px);
  line-height:1.5;
  color:var(--muted);
  max-width:56ch;
}

.setup-grid{
  display:grid;gap:16px;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
}

.field-group + .field-group{
  margin-top:22px;padding-top:22px;
  border-top:1px solid var(--border);
}
.group-title{
  font-size:16px;
  font-weight:700;letter-spacing:-.01em;
  color:var(--ink);
  margin-bottom:12px;
}
.row{display:grid;gap:12px;grid-template-columns:minmax(0,1fr);}
.field{display:block;min-width:0;}
.field-group > .field + .field,.field-group > .row + .field{margin-top:12px;}
.label{
  display:block;
  font-size:11.5px;
  font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);
  margin-bottom:6px;
}
input[type="text"],input[type="email"],select,textarea{
  width:100%;
  min-height:50px;
  padding:13px 15px;
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  background:#fff;
  font-family:inherit;
  font-size:16px;              /* 16px keeps iOS from zooming the field */
  font-weight:600;
  color:var(--ink);
  line-height:1.4;
}
input::placeholder,textarea::placeholder{color:#a8a0b5;font-weight:400;}
input:focus,select:focus,textarea:focus{border-color:#c9b6ea;}
select{
  appearance:none;-webkit-appearance:none;
  padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6478' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:17px;
  text-overflow:ellipsis;
}
textarea{min-height:82px;resize:vertical;font-weight:400;}
.hint{
  display:block;
  margin-top:8px;
  font-size:12.5px;
  line-height:1.5;
  color:var(--muted);
}
.hint code{
  padding:1px 5px;border-radius:5px;
  background:var(--chip);color:var(--purple-deep);
  font-size:12px;font-weight:600;
}
.preview{
  margin-top:12px;
  padding:12px 15px;
  border-radius:var(--r-sm);
  background:var(--chip);
  color:var(--purple-deep);
  font-size:14.5px;
  font-weight:600;
  line-height:1.45;
}
.inline-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;}
.inline-actions .hint,.inline-actions .cover-now{margin-top:0;}

/* one-tap hints under a text field — the agent's name in step 1 */
.sugrow{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px;}
.sugrow-label{
  font-size:11.5px;
  font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);
}
.sug{
  display:inline-flex;align-items:center;
  min-height:36px;
  padding:7px 15px;
  border:1px dashed var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--body);
  font-family:inherit;
  font-size:14px;font-weight:700;
  cursor:pointer;
  transition:background .15s,color .15s,border-color .15s;
}
.sug:hover{background:var(--chip);border-style:solid;}
.sug.on{
  background:var(--chip);
  border-style:solid;border-color:var(--purple);
  color:var(--purple-deep);
}
.sug:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}

/* toggle pills — days and use cases */
.pillset{display:flex;flex-wrap:wrap;gap:8px;}
.pill{
  position:relative;
  display:inline-flex;align-items:center;
  min-height:44px;
  padding:10px 17px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--body);
  font-size:14.5px;
  font-weight:600;
  cursor:pointer;
  user-select:none;
  -webkit-user-select:none;
  transition:background .15s,color .15s,border-color .15s;
}
.pill:hover{border-color:#cbbfda;}
.pill[aria-pressed="true"],.pill.on{
  background:var(--purple);
  border-color:transparent;
  color:#fff;
}
.pill.check input{
  position:absolute;
  width:1px;height:1px;
  opacity:0;
  pointer-events:none;
}
.pill.check:has(input:checked){background:var(--purple);border-color:transparent;color:#fff;}
.pill.check:focus-within{outline:2px solid var(--purple);outline-offset:2px;}

.actions{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  margin-top:26px;
}
.actions .btn-primary{flex:1 1 auto;}
.form-note{
  margin-top:12px;
  min-height:18px;
  font-size:13.5px;
  font-weight:600;
  color:var(--purple-deep);
}
.form-note.warn{color:var(--pink);}

/* "Download this demo" — setup footer and the closing card use the same bar */
.dlbar{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;
  margin-top:14px;padding-top:14px;
  border-top:1px solid var(--border);
}
.closing .dlbar{margin-top:14px;}
.dl-link{
  display:inline-flex;align-items:center;gap:7px;
  font-size:13.5px;font-weight:700;
  color:var(--purple-deep);
  text-decoration:none;
  border-bottom:1.5px solid rgba(116,57,223,.28);
  padding-bottom:1px;
}
.dl-link svg{width:16px;height:16px;flex:none;}
.dl-link:hover{border-bottom-color:var(--purple);}
.dl-link:focus-visible{outline:2px solid var(--purple);outline-offset:3px;border-radius:4px;}
.dlbar .hint{flex:1 1 200px;min-width:0;}
.btn-link.danger{color:var(--pink);}
.btn-link.danger:hover{color:#b52a77;}

/* share / QR card */
.share-card{text-align:center;}
.share-card h2{
  font-size:19px;
  font-weight:700;letter-spacing:-.015em;
  color:var(--ink);
  margin:6px 0 14px;
}
.qr-wrap{
  display:grid;place-items:center;
  padding:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--r-md);
}
#qr{
  display:block;
  width:100%;max-width:320px;height:auto;
  image-rendering:pixelated;
}
.share-note{
  margin-top:12px;
  font-size:13px;line-height:1.5;
  color:var(--muted);
}
.share-label{
  display:block;
  margin-top:14px;
  font-size:10.5px;
  font-weight:700;letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);
}
.share-link{
  display:block;
  margin-top:6px;
  padding:9px 10px;
  border-radius:10px;
  background:var(--chip);
  color:var(--purple-deep);
  font-size:12px;
  line-height:1.5;
  word-break:break-all;
}

@media (min-width:860px){
  .setup{padding:34px 28px 56px;}
  .setup-grid{grid-template-columns:minmax(0,1fr) 372px;gap:20px;}
  .row.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  .share-card{position:sticky;top:26px;}
  .actions .btn-primary{flex:0 0 auto;}
}
@media (min-width:560px) and (max-width:859px){
  .row.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
}

/* ============================================================= */
/* PLAY VIEW                                                     */
/* ============================================================= */
.play{
  position:relative;
  display:flex;flex-direction:column;
  height:100vh;
  height:100dvh;
}

/* header */
.playbar{
  flex:none;
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;
  padding-top:calc(10px + env(safe-area-inset-top));
  background:#fff;
  border-bottom:1px solid var(--border);
}
.pb-id{display:flex;align-items:center;gap:10px;flex:1;min-width:0;}
/* The product mark in the call header. Smaller than the setup one because this
   bar also carries the language switch and four icon buttons on a phone. */
.pb-logo{flex:none;display:block;height:20px;width:auto;}
.pb-txt{min-width:0;}
.pb-txt b{
  display:block;
  font-size:14.5px;
  font-weight:700;letter-spacing:-.01em;
  color:var(--ink);
  line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.pb-txt span{
  display:block;
  font-size:11.5px;
  color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* the agent's own name, from step 1 — kept even on the narrowest phone, where
   the hours line is dropped for width */
.pb-agent{
  display:block;
  font-size:11.5px;
  font-weight:700;
  color:var(--purple-deep);
  line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.pb-agent:empty{display:none;}
.pb-actions{display:flex;align-items:center;gap:6px;flex:none;}
.pb-flow{display:none;}
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-width:40px;min-height:40px;
  padding:9px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--body);
  font-size:13.5px;
  font-weight:700;
  cursor:pointer;
}
.icon-btn:hover{border-color:#cbbfda;}
.icon-btn svg{width:17px;height:17px;flex:none;}
.icon-btn .lbl{display:none;}
.icon-btn.voice{
  background:linear-gradient(100deg,var(--pink),var(--purple));
  border-color:transparent;
  color:#fff;
  box-shadow:0 8px 20px rgba(116,57,223,.26);
}
.icon-btn.voice .ico-off{display:none;}
.icon-btn.voice[aria-pressed="false"]{
  background:#fff;
  border-color:var(--border);
  color:var(--muted);
  box-shadow:none;
}
.icon-btn.voice[aria-pressed="false"] .ico-on{display:none;}
.icon-btn.voice[aria-pressed="false"] .ico-off{display:block;}

/* use-case switcher */
.flowbar{
  flex:none;
  display:flex;gap:8px;
  padding:10px 12px;
  background:#fff;
  border-bottom:1px solid var(--border);
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.flowbar::-webkit-scrollbar{display:none;}
.flowbar > *{flex:0 0 auto;}
.flowbar button,.fpill{
  display:inline-flex;align-items:center;
  min-height:38px;
  padding:8px 16px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--body);
  font-size:13.5px;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
}
.flowbar button[aria-pressed="true"],.flowbar button.on,.fpill.on,.ws-pill-on{
  background:var(--purple);
  border-color:transparent;
  color:#fff;
}

.playgrid{
  flex:1;min-height:0;
  display:flex;flex-direction:column;
}

/* --- chat column --- */
.chat{
  flex:1;min-height:0;
  display:flex;flex-direction:column;
  min-width:0;
}
.thread{
  flex:1;min-height:0;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  display:flex;flex-direction:column;gap:10px;
  padding:14px 12px 6px;
}
.thread > *{max-width:100%;}

/* message rows — chat.js markup contract: .msg.agent / .msg.visitor > .bubble */
.msg,.ws-turn{display:flex;align-items:flex-end;gap:8px;}
.msg.agent,.ws-turn-agent{justify-content:flex-start;}
.msg.visitor,.ws-turn-visitor{justify-content:flex-end;}
.msg .avatar,.ws-avatar{
  display:grid;place-items:center;flex:none;
  width:28px;height:28px;
  border-radius:50%;
  background:linear-gradient(120deg,var(--pink),var(--purple));
  color:#fff;
  box-shadow:0 6px 16px rgba(116,57,223,.28);
}
.msg .avatar svg,.ws-avatar svg{width:15px;height:15px;}
.bubble,.ws-bubble{
  max-width:min(80%,540px);
  padding:11px 15px;
  border-radius:19px;
  font-size:15.5px;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.msg.agent .bubble,.ws-bubble-agent{
  background:#fff;
  border:1px solid var(--border);
  border-bottom-left-radius:8px;
  color:var(--ink);
  box-shadow:0 6px 18px rgba(50,31,91,.07);
}
.msg.visitor .bubble,.ws-bubble-visitor{
  background:linear-gradient(120deg,var(--purple),var(--purple-deep));
  border-bottom-right-radius:8px;
  color:#fff;
}
.bubble.typing::after{
  content:"";
  display:inline-block;
  width:2px;height:1.05em;
  margin-left:3px;
  vertical-align:-2px;
  background:var(--purple);
  animation:caret .9s steps(2,start) infinite;
}
@keyframes caret{0%,100%{opacity:1;}50%{opacity:0;}}

/* inline "action taken" chip inside the transcript */
.act{
  align-self:center;
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 15px 6px 7px;
  border:1px solid #c9eeda;
  border-radius:999px;
  background:#e9f9f0;
  color:#0f7f4f;
  font-size:12.5px;
  font-weight:700;
  animation:chipin .3s cubic-bezier(.2,.8,.25,1);
}
.act i{
  display:grid;place-items:center;flex:none;
  width:19px;height:19px;
  border-radius:50%;
  background:var(--green);
  color:#0b3322;
}
.act i svg{width:11px;height:11px;}
@keyframes chipin{from{opacity:0;transform:translateY(8px) scale(.95);}to{opacity:1;transform:none;}}

/* suggested reply chips */
.chips{
  flex:none;
  display:flex;gap:8px;
  padding:8px 12px 4px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.chips::-webkit-scrollbar{display:none;}
.chips:empty{display:none;}
.chips > *{flex:0 0 auto;}
.chips button,.chip,.ws-chip{
  display:inline-flex;align-items:center;
  min-height:40px;
  padding:9px 17px;
  border:1px solid #dccef3;
  border-radius:999px;
  background:#fff;
  color:var(--purple-deep);
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(50,31,91,.06);
}
.chips button:hover,.chip:hover,.ws-chip:hover{background:var(--chip);}
.chips button:active,.chip:active,.ws-chip:active{transform:translateY(1px);}

/* composer */
.composer{
  flex:none;
  display:flex;align-items:center;gap:8px;
  padding:10px 12px;
  padding-bottom:calc(10px + env(safe-area-inset-bottom));
  background:#fff;
  border-top:1px solid var(--border);
}
#say{
  flex:1;min-width:0;
  min-height:48px;
  border-radius:999px;
  background:var(--page);
  font-weight:400;
}
.mic-btn,.send-btn{
  display:grid;place-items:center;flex:none;
  width:48px;height:48px;
  border-radius:50%;
  border:1px solid var(--border);
  background:var(--chip);
  color:var(--purple-deep);
  cursor:pointer;
}
.mic-btn svg,.send-btn svg{width:20px;height:20px;}
.mic-btn[aria-pressed="true"],.mic-btn.on,.ws-mic-live{
  background:var(--pink);
  border-color:transparent;
  color:#fff;
  animation:micpulse 1.6s ease-out infinite;
}
@keyframes micpulse{
  0%,100%{box-shadow:0 0 0 0 rgba(232,63,159,.45);}
  55%{box-shadow:0 0 0 10px rgba(232,63,159,0);}
}
.send-btn{
  background:linear-gradient(100deg,var(--pink),var(--purple));
  border-color:transparent;
  color:#fff;
  box-shadow:0 10px 24px rgba(116,57,223,.3);
}

/* --- workflow rail + closing card --- */
.side{
  flex:none;order:-1;
  background:#fff;
  border-bottom:1px solid var(--border);
  min-width:0;
}
.rail{padding:10px 12px;}
.rail .eyebrow{margin-bottom:8px;}
.steps{
  list-style:none;
  display:flex;flex-direction:row;gap:8px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  padding-bottom:2px;
}
.steps::-webkit-scrollbar{display:none;}
.steps > *{flex:0 0 auto;width:208px;}

/* step rows — same states as the kiosk rail */
.step,.ws-step{
  display:grid;grid-template-columns:auto minmax(0,1fr);
  gap:11px;align-items:center;
  padding:10px 13px;
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  background:#fff;
  transition:background .25s,border-color .25s,opacity .25s;
}
.step .n,.ws-step-n{
  position:relative;
  display:grid;place-items:center;flex:none;
  width:28px;height:28px;
  border-radius:50%;
  background:var(--chip);
  color:var(--purple);
  font-size:12px;
  font-weight:700;
}
.step .n svg,.ws-step-n svg{width:55%;height:55%;}
.step .txt,.ws-step-txt{min-width:0;}
.step .txt b,.ws-step-label{
  display:block;
  font-size:13.5px;
  font-weight:600;letter-spacing:-.01em;
  color:var(--ink);
  line-height:1.3;
}
.step .txt p,.ws-step-state{
  margin-top:2px;
  font-size:11px;
  font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);
}
.step.queued,.ws-step-queued{opacity:.6;}
.step.active,.ws-step-active{background:#f6f3fa;border-color:#d9c8ef;opacity:1;}
.step.active .n,.ws-step-active .ws-step-n{background:var(--purple);color:#fff;}
.step.active .n::after,.ws-step-active .ws-step-n::after{
  content:"";
  position:absolute;inset:-4px;
  border-radius:50%;
  border:2px solid rgba(116,57,223,.45);
  animation:steppulse 1.6s ease-out infinite;
}
@keyframes steppulse{
  0%{transform:scale(.8);opacity:.9;}
  70%,100%{transform:scale(1.18);opacity:0;}
}
.step.active .txt b,.ws-step-active .ws-step-label{font-weight:700;}
.step.active .txt p,.ws-step-active .ws-step-state{color:var(--purple);}
.step.done .n,.ws-step-done .ws-step-n{background:var(--purple);color:#fff;}
.step.done .txt p,.ws-step-done .ws-step-state{color:var(--purple-deep);}

/* ticked action chips in the rail */
.act-chip,.ws-action{
  display:inline-flex;align-items:center;gap:7px;
  padding:5px 13px 5px 6px;
  border:1px solid #c9eeda;
  border-radius:999px;
  background:#e9f9f0;
  color:#0f7f4f;
  font-size:12px;
  font-weight:700;
  animation:chipin .3s cubic-bezier(.2,.8,.25,1);
}
.act-chip i,.ws-action-ico{
  display:grid;place-items:center;flex:none;
  width:17px;height:17px;
  border-radius:50%;
  background:var(--green);
  color:#0b3322;
}
.act-chip i svg,.ws-action-ico svg{width:10px;height:10px;}
.rail-acts,.ws-step-actions{display:flex;flex-wrap:wrap;gap:6px;}
.ws-step-actions:not(:empty){margin-top:8px;}

/* closing card — a bottom sheet on a phone, a rail panel on a tablet */
.closing{
  position:fixed;left:0;right:0;bottom:0;z-index:30;
  max-height:78dvh;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  background:#fff;
  border-top:1px solid var(--border);
  border-radius:var(--r-lg) var(--r-lg) 0 0;
  box-shadow:0 -22px 60px rgba(50,31,91,.22);
  padding:18px 16px calc(18px + env(safe-area-inset-bottom));
  animation:sheetin .3s cubic-bezier(.2,.8,.25,1);
}
.closing:empty{display:none;}
@keyframes sheetin{from{transform:translateY(16px);opacity:0;}to{transform:none;opacity:1;}}

.closing .eyebrow,.ws-card-kicker{margin-bottom:8px;}
.closing h2,.closing h3,.ws-card-head{
  font-size:19px;
  font-weight:700;letter-spacing:-.015em;
  color:var(--ink);
  line-height:1.25;
  margin-bottom:6px;
}
.closing p,.ws-card-setup,.ws-card-after{font-size:14.5px;line-height:1.5;color:var(--body);}
.closing ul,.closing ol{list-style:none;display:flex;flex-direction:column;gap:7px;margin:11px 0;}
.closing li{display:flex;gap:9px;font-size:14px;line-height:1.45;color:var(--body);}
.closing li b{color:var(--ink);font-weight:700;}

/* green outcome banner, matching the kiosk's resolved state */
.outcome{
  display:flex;align-items:center;gap:12px;
  padding:13px 15px;
  border:1px solid #c9eeda;
  border-radius:var(--r-sm);
  background:#e9f9f0;
}
.outcome .tick{
  display:grid;place-items:center;flex:none;
  width:32px;height:32px;
  border-radius:50%;
  background:var(--green);
  color:#fff;
}
.outcome .tick svg{width:16px;height:16px;}
.outcome b{
  display:block;
  font-size:11.5px;
  font-weight:700;letter-spacing:.11em;
  color:#0f9d58;
}
.outcome span{font-size:14px;color:#3f7a5c;}

/* recap block (inert) */
.recap{
  margin-top:14px;padding-top:14px;
  border-top:1px solid var(--border);
}
.recap-line{margin-bottom:10px;}
.recap-form{display:flex;flex-wrap:wrap;gap:8px;}
#fEmailClose{flex:1 1 180px;min-height:46px;}
.recap-form .btn-primary{flex:0 0 auto;}
.fineprint{
  display:block;
  margin-top:10px;
  font-size:11.5px;
  color:var(--muted);
}

/* tap gate */
.tapstart{
  position:fixed;inset:0;z-index:50;
  display:grid;place-items:center;
  padding:24px;
  background:radial-gradient(circle at 78% 14%, rgba(232,63,159,.22), transparent 46%),
             radial-gradient(circle at 10% 90%, rgba(116,57,223,.22), transparent 44%),
             var(--page);
}
.tapstart-card{
  width:100%;max-width:420px;
  text-align:center;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  box-shadow:0 30px 80px var(--shadow);
  padding:34px 26px 28px;
}
/* The product mark above the attendee's business name on the tap gate — the
   first thing a phone sees after scanning the QR code. */
.ts-logo{display:block;height:28px;width:auto;margin:0 auto 16px;}
.ts-biz{
  display:block;
  font-size:23px;
  font-weight:700;letter-spacing:-.02em;
  color:var(--ink);
  line-height:1.2;
}
.ts-sub{
  margin:8px 0 22px;
  font-size:14.5px;line-height:1.5;
  color:var(--muted);
}
.tapstart-card .btn-primary{width:100%;}
.ts-note{
  display:block;
  margin-top:14px;
  font-size:12px;
  color:var(--muted);
}

/* ---------- tablet / laptop ---------- */
@media (min-width:900px){
  .playbar{padding:12px 20px;}
  .pb-logo{height:24px;}
  .pb-txt b{font-size:16px;}
  .pb-txt span{font-size:12.5px;}
  .icon-btn .lbl{display:inline;}
  .pb-flow{
    display:inline-flex;align-items:center;
    margin-right:6px;
    padding:7px 15px;
    border-radius:999px;
    background:var(--chip);
    color:var(--purple-deep);
    font-size:12.5px;
    font-weight:700;
    white-space:nowrap;
    max-width:220px;
    overflow:hidden;text-overflow:ellipsis;
  }
  .flowbar{padding:12px 20px;}
  .flowbar button,.fpill{font-size:14px;padding:9px 18px;min-height:42px;}

  .playgrid{
    flex-direction:row;
    gap:18px;
    padding:18px 20px;
    align-items:stretch;
  }
  .chat{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--r-lg);
    box-shadow:0 20px 60px var(--shadow);
    overflow:hidden;
  }
  .thread{padding:20px 20px 8px;gap:12px;}
  .chips{padding:8px 20px 4px;flex-wrap:wrap;overflow:visible;}
  .composer{padding:14px 20px;background:transparent;}
  #say{background:var(--page);}

  .side{
    order:0;flex:0 0 clamp(300px,33%,400px);
    display:flex;flex-direction:column;gap:16px;
    min-height:0;
    overflow-y:auto;
    background:transparent;border-bottom:none;
    scrollbar-width:thin;
  }
  .rail{
    flex:none;
    padding:20px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--r-lg);
    box-shadow:0 20px 60px var(--shadow);
  }
  .steps{flex-direction:column;overflow:visible;gap:9px;}
  .steps > *{width:auto;}
  .step,.ws-step{padding:12px 15px;}

  .closing{
    position:static;flex:none;
    max-height:none;overflow:visible;
    border:1px solid var(--border);
    border-radius:var(--r-lg);
    box-shadow:0 20px 60px var(--shadow);
    padding:20px;
    animation:panelin .3s cubic-bezier(.2,.8,.25,1);
  }
  @keyframes panelin{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
}

/* very narrow phones: keep the header from wrapping */
@media (max-width:420px){
  /* Both marks step down rather than vanishing: the bar is tight here, but the
     product mark is the point of putting it there. */
  .pb-logo{height:17px;}
  .brand-logo{height:22px;}
  .head-id{gap:9px;}
  .head-id .brand-id{padding-left:9px;}
}
@media (max-width:359px){
  .pb-txt span{display:none;}
  .icon-btn{padding:9px 10px;}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .step.active .n::after,.ws-step-active .ws-step-n::after,.act,.act-chip,.ws-action,.closing,
  .mic-btn[aria-pressed="true"],.mic-btn.on,.ws-mic-live,.bubble.typing::after{
    animation:none !important;
  }
  *{scroll-behavior:auto !important;}
}

/* ============================================================= */
/* chat.js markup (ws-*) — the bits with no counterpart above    */
/* ============================================================= */

/* after-hours clock strip, mounted above the transcript */
.ws-clock{
  flex:none;
  display:flex;align-items:center;justify-content:center;gap:10px;
  flex-wrap:wrap;
  margin:12px 12px 0;
  padding:9px 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--chip);
  font-size:12.5px;
  font-weight:700;
  color:var(--purple-deep);
}
.ws-clock:empty{display:none;}
.ws-clock-open{background:#e9f9f0;border-color:#c9eeda;color:#0f7f4f;}
.ws-clock-closed{background:#fdeaf4;border-color:#f7cbe3;color:#b52a77;}
.ws-clock-now{white-space:nowrap;}
.ws-clock-btn{
  padding:5px 13px;
  border:1px solid currentColor;
  border-radius:999px;
  background:transparent;
  color:inherit;
  font-size:11.5px;
  font-weight:700;
  cursor:pointer;
}
.ws-clock-btn:hover{background:rgba(255,255,255,.7);}

/* busy state: chips stay put but stop inviting a tap */
.ws-chips-busy{opacity:.45;pointer-events:none;}

/* closing card */
.ws-card-kicker{
  font-size:11px;
  font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:#0f9d58;
}
.ws-card-outcome{
  margin:8px 0 14px;
  padding:13px 15px;
  border:1px solid #c9eeda;
  border-radius:var(--r-sm);
  background:#e9f9f0;
  font-size:15.5px;
  font-weight:700;letter-spacing:-.01em;
  line-height:1.4;
  color:#0b6b43;
}
.ws-card-setup{color:var(--muted);}
.ws-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 12px;}
.ws-card-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;
  padding:11px 18px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--body);
  font-family:inherit;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
}
.ws-card-btn:hover{border-color:#cbbfda;}
.ws-card-btn-call{
  background:linear-gradient(100deg,var(--pink),var(--purple));
  border-color:transparent;
  color:#fff;
  box-shadow:0 10px 26px rgba(116,57,223,.28);
}
.ws-card-after{font-weight:600;color:var(--ink);}
.ws-card-fine,.ws-inert-note{
  display:block;
  margin-top:10px;
  font-size:11.5px;
  line-height:1.5;
  color:var(--muted);
}
.ws-inert-note{font-weight:700;color:var(--pink);}

/* fallback: the card lands in the transcript when there is no closing shell */
.ws-turn-card{display:block;}
.ws-turn-card .ws-card{
  padding:16px;
  border:1px solid var(--border);
  border-radius:var(--r-md);
  background:#fff;
  box-shadow:0 10px 30px var(--shadow);
}

/* ---------- phone: the rail shows only what is happening now ----------
   Below 900px the rail sits above the chat as a horizontal strip, where five
   step cards get clipped mid-word and steal room from the conversation. Show
   the in-progress step alone; the transcript is the thing worth scrolling. */
@media (max-width:899px){
  .rail{padding:10px 14px 12px;}
  .steps{
    display:block;
    overflow:visible;
    max-height:none;
  }
  .ws-step{
    display:none;
    width:auto;min-width:0;max-width:none;
    margin:0;
  }
  .ws-step.ws-step-active{display:grid;}
  /* nothing in progress (resolved, or between turns): keep the last done step
     visible so the strip never collapses to an empty box */
  .steps:not(:has(.ws-step-active)) .ws-step-done:last-of-type{display:grid;}
  .ws-step-actions{flex-wrap:wrap;}
  .ws-action{white-space:normal;}
}

/* ============================================================= */
/* V2 — stepper, generators, voice studio, use-case cards        */
/* ============================================================= */

.offscreen{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

/* the always-available fast path */
.fastbar{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;}
.btn-ghost.small,.btn-primary.small{
  min-height:42px;
  padding:10px 16px;
  font-size:14px;
}
.btn-ghost.small svg,.btn-primary.small svg{width:16px;height:16px;}

/* stepper */
.stepper{
  display:flex;gap:8px;
  margin-bottom:14px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.stepper::-webkit-scrollbar{display:none;}
.st{
  flex:0 0 auto;
  display:inline-flex;align-items:center;gap:9px;
  min-height:44px;
  padding:9px 16px 9px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:background .15s,color .15s,border-color .15s;
}
.st:hover{border-color:#cbbfda;}
.st i{
  display:grid;place-items:center;flex:none;
  width:26px;height:26px;
  border-radius:50%;
  background:var(--chip);
  color:var(--purple-deep);
  font-size:13px;
  font-style:normal;
  font-weight:700;
}
.st[aria-current="step"]{
  background:var(--purple);
  border-color:transparent;
  color:#fff;
}
.st[aria-current="step"] i{background:rgba(255,255,255,.22);color:#fff;}
.st.done i{background:var(--green);color:#0b3322;}

/* one panel at a time */
.step-panel{display:none;}
body[data-step="1"] .step-panel[data-step="1"],
body[data-step="2"] .step-panel[data-step="2"],
body[data-step="3"] .step-panel[data-step="3"],
body[data-step="4"] .step-panel[data-step="4"],
body[data-step="5"] .step-panel[data-step="5"]{display:block;}

/* footer buttons per step */
body[data-step="1"] #btnBack{display:none;}
body[data-step="5"] #btnNext{display:none;}
body:not([data-step="5"]) #btnStart,
body:not([data-step="5"]) #btnLink{display:none;}
.actions #btnNext,.actions #btnStart{flex:1 1 auto;}

/* derived fact chips */
.factset{display:flex;flex-wrap:wrap;gap:8px;}
.fact{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 15px;
  border:1px solid #e0d4f4;
  border-radius:999px;
  background:var(--chip);
  color:var(--purple-deep);
  font-size:13.5px;
  font-weight:600;
  line-height:1.35;
}
.fact b{font-weight:700;color:var(--ink);}
.fact:empty{display:none;}

/* tone cards (step 2) */
.tonecards{display:grid;gap:10px;grid-template-columns:minmax(0,1fr);}
.tone{
  display:flex;flex-direction:column;
  border:1px solid var(--border);
  border-radius:var(--r-md);
  background:#fff;
  overflow:hidden;
}
.tone.on{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple) inset;}
.tone-pick{
  display:block;
  flex:1;
  padding:14px 15px 12px;
  border:0;
  background:transparent;
  font-family:inherit;
  text-align:left;
  cursor:pointer;
}
.tone-pick b{
  display:block;
  font-size:11.5px;
  font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--purple-deep);
  margin-bottom:6px;
}
.tone-text{
  display:block;
  font-size:14.5px;
  line-height:1.45;
  color:var(--ink);
  font-weight:600;
}
.tone-foot{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:9px 12px 10px 15px;
  border-top:1px solid var(--border);
  background:#fcfaff;
}
.tone-hear{
  display:inline-flex;align-items:center;gap:7px;
  min-height:38px;
  padding:8px 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--body);
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.tone-hear:hover{border-color:#cbbfda;}
.tone-hear svg{width:15px;height:15px;}
.tone-use{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}
.tone.on .tone-use{color:var(--purple-deep);}

/* no-speech notice */
.novoice{
  padding:16px 18px;
  border:1px solid #f7cbe3;
  border-radius:var(--r-md);
  background:#fdeaf4;
}
.novoice b{display:block;font-size:16px;color:var(--ink);margin-bottom:4px;}
.novoice p{font-size:14px;line-height:1.5;color:var(--body);}

.group-title .count{
  font-size:12.5px;
  font-weight:600;
  color:var(--muted);
  letter-spacing:0;
}

/* ---------- step 3: the curated voice set ----------
   Five or six voices per language under our own names, grouped by language. The
   system voice underneath is never printed, so a card only ever shows our name,
   the accent, the sex and whether it survives a dead wifi. */
.vgroups{display:grid;gap:18px;margin-top:14px;}
.vgroup-title{
  display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;
  margin:0 0 9px;
  font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:var(--purple-deep);
}
.vgroup-title small{
  font-size:11.5px;font-weight:600;letter-spacing:0;text-transform:none;
  color:var(--muted);
}
.vgroup:not(.on) .vgroup-title{color:var(--muted);}
.vgroup-note{margin-top:9px;font-size:12.5px;line-height:1.45;color:#b52a77;}
/* the pick this language holds, spelled out: two independent slots, and the one
   that is not being spoken is kept rather than overridden */
.vgroup-sel{
  margin:0 0 8px;
  font-size:13px;line-height:1.45;
  color:var(--muted);
}
.vgroup-sel b{color:var(--purple-deep);font-weight:700;}
.vgroup.on .vgroup-sel{color:var(--body);}
/* the other language's chosen card: clearly chosen, clearly not speaking now */
.vgroup:not(.on) .vcard.on{
  border-color:#c9b6ea;
  box-shadow:0 0 0 1px #e3d8f5 inset;
  background:#fcfaff;
}

.vcards{display:grid;gap:8px;grid-template-columns:minmax(0,1fr);}
.vcard{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  background:#fff;
  overflow:hidden;
}
.vcard.on{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple) inset;}
.vcard-pick{
  display:block;
  min-width:0;
  padding:11px 13px;
  border:0;
  background:transparent;
  font-family:inherit;
  text-align:left;
  cursor:pointer;
}
.vcard-name{
  display:block;
  font-size:15.5px;
  font-weight:800;
  color:var(--ink);
  line-height:1.25;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* What the voice sounds like, in the visitor's own language. Wraps rather than
   truncating: on a 390px phone "professional, warm" needs the second line. */
.vcard-tag{
  display:block;
  margin-top:2px;
  font-size:12.5px;
  line-height:1.35;
  color:var(--body);
}
.vcard-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:5px;}
.vcard-lang{font-size:12px;font-weight:600;color:var(--muted);}
.vcard-badge{
  padding:2px 8px;
  border-radius:999px;
  background:#e9f9f0;
  color:#0f7f4f;
  font-size:10.5px;
  font-weight:700;letter-spacing:.06em;text-transform:uppercase;
}
.vcard-badge.net{background:#fdeaf4;color:#b52a77;}
.vcard-badge.sex{background:#f3ecff;color:var(--purple-deep);}
.vcard-badge.sel{background:var(--chip);color:var(--purple-deep);}
.vcard-play{
  display:grid;place-items:center;
  flex:none;
  width:54px;
  border:0;
  border-left:1px solid var(--border);
  background:#fcfaff;
  color:var(--purple-deep);
  cursor:pointer;
}
.vcard-play:hover{background:var(--chip);}
.vcard-play-ico{display:grid;place-items:center;}
.vcard-play svg{width:17px;height:17px;}
.vcard-play .ico-stop{display:none;}
.vcard.playing{border-color:var(--pink);}
.vcard.playing .vcard-play{background:var(--pink);color:#fff;border-left-color:transparent;}
.vcard.playing .vcard-play .ico-play{display:none;}
.vcard.playing .vcard-play .ico-stop{display:block;}

/* ---------- warming the lines up ----------
   Three states with no ambiguity: idle, a counted bar while it runs, and a
   green finished state meaning those lines no longer need the connection. */
.warmbar{
  position:relative;
  height:8px;
  margin-top:12px;
  border-radius:999px;
  background:var(--chip);
  overflow:hidden;
}
.warmbar > span{
  display:block;
  height:100%;
  width:0;
  border-radius:999px;
  background:var(--purple);
  transition:width .22s ease;
}
.warmbar.done > span{background:#0f7f4f;}
#btnWarmVoice.busy{opacity:.72;cursor:default;}
#btnWarmVoice.done{border-color:#0f7f4f;color:#0f7f4f;}
#warmNote{min-width:0;flex:1 1 220px;}

/* the lines you can play */
.lines{display:grid;gap:8px;grid-template-columns:minmax(0,1fr);}
.lineb{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;gap:12px;
  width:100%;
  padding:11px 13px;
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  background:#fff;
  font-family:inherit;
  text-align:left;
  cursor:pointer;
}
.lineb:hover{border-color:var(--purple);}
.lineb-name{grid-column:1;font-size:14.5px;font-weight:700;color:var(--ink);line-height:1.25;}
.lineb-text{
  grid-column:1;
  font-size:12.5px;line-height:1.4;color:var(--muted);
  overflow:hidden;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.lineb-go{
  grid-column:2;grid-row:1 / span 2;
  display:grid;place-items:center;flex:none;
  width:38px;height:38px;border-radius:50%;
  background:#fcfaff;color:var(--purple-deep);
  border:1px solid var(--border);
}
.lineb-go svg{width:16px;height:16px;}
.lineb-go .ico-stop{display:none;}
.lineb.playing{border-color:var(--pink);}
.lineb.playing .lineb-go{background:var(--pink);color:#fff;border-color:transparent;}
.lineb.playing .lineb-go .ico-play{display:none;}
.lineb.playing .lineb-go .ico-stop{display:block;}

/* the one honest line about the wifi */
.cover-now{
  margin-top:10px;
  font-size:13px;line-height:1.45;font-weight:600;color:var(--muted);
}
.cover-now.ok{color:#0f7f4f;}
.cover-now.warn{color:#b52a77;}

/* use-case cards (step 4) */
.uccards{display:grid;gap:10px;grid-template-columns:minmax(0,1fr);}
.uc{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;align-items:center;
  padding:14px 15px;
  border:1px solid var(--border);
  border-radius:var(--r-md);
  background:#fff;
  cursor:pointer;
  user-select:none;-webkit-user-select:none;
}
.uc input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}
.uc:focus-within{outline:2px solid var(--purple);outline-offset:2px;}
.uc-body{display:block;min-width:0;}
.uc-body b{
  display:block;
  font-size:15.5px;
  font-weight:700;letter-spacing:-.01em;
  color:var(--ink);
}
.uc-body em{
  display:block;
  margin-top:4px;
  font-size:13.5px;
  font-style:normal;
  line-height:1.45;
  color:var(--muted);
}
.uc-body small{
  display:block;
  margin-top:6px;
  font-size:11px;
  font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--purple-deep);
}
.uc-tick{
  display:grid;place-items:center;flex:none;
  width:28px;height:28px;
  border:1px solid var(--border);
  border-radius:50%;
  background:#fff;
  color:transparent;
}
.uc-tick svg{width:14px;height:14px;}
.uc.on{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple) inset;}
.uc.on .uc-tick{background:var(--purple);border-color:transparent;color:#fff;}

/* phone: the QR card belongs to the last step only */
@media (max-width:859px){
  .share-card{display:none;}
  body[data-step="4"] .share-card{display:block;}
  .st span{display:none;}
  .st[aria-current="step"] span{display:inline;}
  .st{padding:9px 12px 9px 9px;}
}
@media (min-width:560px){
  .tonecards{grid-template-columns:repeat(3,minmax(0,1fr));}
  .uccards{grid-template-columns:repeat(2,minmax(0,1fr));}
  .lines{grid-template-columns:repeat(2,minmax(0,1fr));}
  .vcards{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (min-width:860px){
  .setup-head .fastbar{margin-top:18px;}
}


/* ---------- share sheet in the play view ---------- */
.sharedlg{
  position:fixed;inset:0;z-index:45;
  display:grid;place-items:center;
  padding:22px;
  background:rgba(20,18,26,.5);
}
.sharedlg-card{
  width:100%;max-width:400px;
  max-height:92dvh;
  overflow-y:auto;
  text-align:center;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  box-shadow:0 30px 80px rgba(20,18,26,.4);
  padding:22px 20px 20px;
}
.sharedlg-card h2{
  font-size:19px;
  font-weight:700;letter-spacing:-.015em;
  color:var(--ink);
  margin:6px 0 14px;
}
.sharedlg-card #qr2{
  display:block;
  width:100%;max-width:300px;height:auto;
  margin:0 auto;
  image-rendering:pixelated;
}
.sharedlg-acts{display:flex;gap:8px;justify-content:center;margin-top:16px;}


/* ============================================================= */
/* "Try these" panel — chat.js builds .ws-try inside #tryPanel    */
/* ============================================================= */

/* #tryPanel is a bare host: chat.js clears it and appends its own .ws-try
   wrapper (head + body + groups). All the looks live on those classes so the
   panel is identical whether it mounts here or in chat.js's own fallback
   shell above the transcript. */
#tryPanel{display:block;min-width:0;}
.ws-try,.ws-try-shell > .ws-try{
  flex:none;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  margin:0 12px 10px;
  overflow:hidden;
}
.ws-try-shell{flex:none;min-width:0;}
.ws-try-head{
  display:flex;align-items:center;gap:10px;
  width:100%;
  min-height:46px;
  padding:11px 14px;
  border:0;
  background:transparent;
  font-family:inherit;
  text-align:left;
  cursor:pointer;
}
.ws-try-title{
  flex:none;
  font-size:11.5px;
  font-weight:700;letter-spacing:.14em;text-transform:uppercase;
  color:var(--purple-deep);
}
.ws-try-hint{
  flex:1;min-width:0;
  font-size:12px;
  color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* chat.js appends an empty <span class="ws-try-caret">, so draw the chevron. */
.ws-try-caret{
  flex:none;
  width:9px;height:9px;
  margin-right:3px;
  border-right:2.2px solid var(--muted);
  border-bottom:2.2px solid var(--muted);
  border-radius:1px;
  transform:rotate(45deg);
  transition:transform .18s;
}
.ws-try-closed .ws-try-caret{transform:rotate(-135deg);}
.ws-try-closed .ws-try-body{display:none;}
.ws-try-body{
  padding:0 14px 14px;
  display:flex;flex-direction:column;gap:14px;
}
.ws-try-group{display:block;min-width:0;}
.ws-try-group-title{
  display:block;
  font-size:11px;
  font-weight:700;letter-spacing:.11em;text-transform:uppercase;
  color:var(--muted);
  margin-bottom:3px;
}
.ws-try-group-note{
  display:block;
  font-size:12.5px;
  line-height:1.45;
  color:var(--muted);
  margin-bottom:8px;
}
.ws-try-items{display:flex;flex-wrap:wrap;gap:7px;}
.ws-try-item{
  display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;
  max-width:100%;min-width:0;
  min-height:38px;
  padding:8px 13px;
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  background:#fff;
  color:var(--body);
  font-family:inherit;
  font-size:13.5px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}
.ws-try-item:hover{border-color:#cbbfda;background:#fcfaff;}
.ws-try-item:active{background:var(--chip);}
.ws-try-item-label{display:block;color:var(--ink);line-height:1.3;}
.ws-try-item-text{
  display:block;
  font-size:12px;
  font-weight:400;
  line-height:1.35;
  color:var(--muted);
  overflow-wrap:anywhere;
}
.ws-try-item-note{
  display:block;
  font-size:11px;
  font-weight:600;
  line-height:1.35;
  color:var(--purple-deep);
}
.ws-try-flowtag{
  display:inline-block;
  margin-top:4px;
  padding:2px 8px;
  border-radius:999px;
  background:var(--chip);
  color:var(--purple-deep);
  font-size:10.5px;
  font-weight:700;letter-spacing:.06em;text-transform:uppercase;
}
/* the item's use case is the one on screen */
.ws-try-item-here{border-color:#d8c6f2;background:#fcfaff;}
.ws-try-item-here .ws-try-flowtag{background:var(--purple);color:#fff;}
/* the one just tapped */
.ws-try-item-on{
  border-color:var(--purple);
  box-shadow:0 0 0 1px var(--purple) inset;
  background:var(--chip);
}
.ws-try-empty{display:block;font-size:13px;color:var(--muted);}

/* phone: an open panel becomes a bottom sheet over the chat */
@media (max-width:899px){
  .ws-try,.ws-try-shell > .ws-try{margin:0 14px 10px;}
  .ws-try:not(.ws-try-closed) .ws-try-body{
    position:fixed;left:0;right:0;bottom:0;z-index:39;
    max-height:70dvh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding:16px 16px calc(18px + env(safe-area-inset-bottom));
    background:#fff;
    border-top:1px solid var(--border);
    border-radius:var(--r-lg) var(--r-lg) 0 0;
    box-shadow:0 -22px 60px rgba(50,31,91,.22);
    animation:sheetin .26s cubic-bezier(.2,.8,.25,1);
  }
  .ws-try:not(.ws-try-closed)::before{
    content:"";
    position:fixed;inset:0;z-index:38;
    background:rgba(20,18,26,.34);
    pointer-events:none;
  }
}
@media (max-width:1279px){
  .ws-try-hint{display:none;}
}
@media (min-width:900px){
  .ws-try,.ws-try-shell > .ws-try{
    margin:0;
    box-shadow:0 20px 60px var(--shadow);
    border-radius:var(--r-lg);
  }
  .ws-try-head{padding:14px 20px;}
  .ws-try-body{padding:0 20px 18px;max-height:min(46dvh,420px);overflow-y:auto;scrollbar-width:thin;}
}
@media (prefers-reduced-motion:reduce){
  .ws-try-caret{transition:none !important;}
  .ws-try:not(.ws-try-closed) .ws-try-body{animation:none !important;}
}

/* ---------- v2 polish ---------- */
#fDesc{min-height:152px;}
.tone-hear{white-space:nowrap;}
.tone-use{min-width:0;overflow:hidden;}
.vcard-pick{min-width:0;}

/* ---------- desktop/projector: keep "Try these" on screen ----------
   The side column scrolls as one, so a six-step rail pushed the Try panel —
   the presenter's prompt list — below the fold. Let the rail take the slack
   and scroll inside itself, and pin the panel under it. */
@media (min-width:900px){
  .side{overflow:hidden;}
  .rail{
    flex:1 1 auto;
    min-height:0;
    display:flex;flex-direction:column;
    overflow:hidden;
  }
  .rail .steps{
    min-height:0;
    overflow-y:auto;
    scrollbar-width:thin;
    padding-right:2px;
  }
  .ws-try{flex:0 0 auto;}
  /* the outcome card still gets room when it appears */
  .play:has(.closing:not([hidden])) .rail{flex:0 1 auto;}
}
/* the rail is what the audience watches; the panel is the presenter's tool */
@media (min-width:900px){
  .ws-try{max-height:min(38dvh,330px);}
  .ws-try .ws-try-body{max-height:min(30dvh,260px);overflow-y:auto;}
}

/* ============================================================= */
/* V3 — language switch, agent picker, workflow editor            */
/* ============================================================= */

/* --- the EN | ES switch (setup head, play header, tap gate) --- */
.setup-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.langsw{
  display:inline-flex;align-items:center;gap:2px;flex:none;
  background:#fff;border:1px solid var(--border);border-radius:999px;padding:3px;
  box-shadow:0 2px 8px rgba(50,31,91,.06);
}
.lsw{
  appearance:none;border:0;background:transparent;cursor:pointer;
  font:inherit;font-weight:800;font-size:13px;letter-spacing:.04em;
  color:var(--muted);padding:7px 14px;min-height:34px;border-radius:999px;
  transition:background .14s ease,color .14s ease;
}
.lsw:hover{color:var(--ink);}
.lsw[aria-pressed="true"],.lsw.on{background:var(--purple);color:#fff;}
.lsw:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}
.pb-lang{padding:2px;}
.pb-lang .lsw{font-size:12px;padding:6px 10px;min-height:30px;}
.ts-lang{margin:16px auto 0;}

.share-note.dim{color:var(--muted);font-size:12.5px;margin-top:8px;}

/* --- step 4: the agent picker --- */
.acards{display:grid;gap:10px;grid-template-columns:minmax(0,1fr);}
.acard{
  background:#fff;border:1.5px solid var(--border);border-radius:20px;
  padding:14px 15px 13px;min-width:0;
}
.acard.on{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple) inset;}
.acard-pick{
  appearance:none;border:0;background:transparent;padding:0;margin:0;
  font:inherit;text-align:left;cursor:pointer;display:block;width:100%;min-width:0;
}
.acard-pick:focus-visible{outline:2px solid var(--purple);outline-offset:3px;border-radius:12px;}
.acard-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.acard-name{font-size:16px;font-weight:800;color:var(--ink);line-height:1.25;}
.acard-badge{
  flex:none;font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;
  padding:4px 9px;border-radius:999px;background:var(--chip);color:var(--purple-deep);
}
.acard-badge.on{background:var(--green);color:#0b3322;}
.acard-role{display:block;font-size:12.5px;font-weight:700;color:var(--purple-deep);margin-top:5px;}
.acard-blurb{display:block;font-size:14px;line-height:1.5;color:var(--body);margin-top:6px;}
.acard-tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
.atool{
  font-size:11.5px;font-weight:700;color:var(--purple-deep);background:var(--chip);
  border-radius:999px;padding:4px 10px;white-space:nowrap;
}
.acard-esc{font-size:12.5px;line-height:1.45;color:var(--muted);margin-top:9px;}
.acard-esc b{color:var(--ink);font-weight:700;}

/* --- step 5: the workflow editor --- */
.wftools{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:12px;}
.wftools:empty{display:none;}
.wftools-label{
  font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);margin-right:2px;
}
.wflist{list-style:none;display:flex;flex-direction:column;gap:8px;margin:0;padding:0;}
.wfstep{
  display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:start;gap:10px;
  background:#fff;border:1.5px solid var(--border);border-radius:18px;padding:11px 12px;
}
.wfstep.custom{border-style:dashed;border-color:#d9c8ef;}
.wfstep-n{
  flex:none;width:28px;height:28px;border-radius:50%;background:var(--chip);
  color:var(--purple-deep);font-size:13px;font-weight:800;
  display:flex;align-items:center;justify-content:center;margin-top:3px;
}
.wfstep-main{min-width:0;}
.wfstep-label{
  display:block;width:100%;min-width:0;box-sizing:border-box;
  font:inherit;font-size:15px;font-weight:700;color:var(--ink);
  background:#fbf9fd;border:1px solid transparent;border-radius:11px;
  padding:7px 9px;
}
.wfstep-label:hover{border-color:var(--border);}
.wfstep-label:focus{outline:none;background:#fff;border-color:var(--purple);box-shadow:0 0 0 3px rgba(116,57,223,.12);}
.wfstep-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.wfact{
  display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;
  color:#0f7f4f;background:#e9f9f0;border-radius:999px;padding:4px 9px;
}
.wfact svg{width:10px;height:10px;flex:none;}
.wfstep-tag{
  display:block;font-size:11.5px;font-weight:700;color:var(--muted);margin-top:7px;
}
.wfstep-btns{display:flex;align-items:center;gap:4px;flex:none;padding-top:2px;}
.wfbtn{
  appearance:none;width:34px;height:34px;flex:none;border-radius:11px;cursor:pointer;
  background:#fff;border:1px solid var(--border);color:var(--ink);
  display:flex;align-items:center;justify-content:center;
}
.wfbtn svg{width:16px;height:16px;}
.wfbtn:hover:not(:disabled){border-color:#cbbfda;background:var(--chip);}
.wfbtn:disabled{opacity:.3;cursor:default;}
.wfbtn.del{color:var(--pink);}
.wfbtn:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}

.wfsugs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px;}
/* .wfsug is restyled in the v4 board block below: a pill plus a drag handle. */

/* step 5 shows the agent's name beside the heading */
.group-title .count{font-weight:700;}

@media (min-width:760px){
  .acards{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (min-width:1100px){
  .acards{grid-template-columns:repeat(3,minmax(0,1fr));}
}
/* Phones: the buttons drop under the name so a 390px row never overflows. */
@media (max-width:429px){
  .wfstep{grid-template-columns:26px minmax(0,1fr);}
  .wfstep-n{width:26px;height:26px;font-size:12px;}
  .wfstep-btns{grid-column:2;justify-content:flex-end;padding-top:0;}
  .setup-top{align-items:center;}
  .lsw{padding:7px 12px;}
}
@media (max-width:359px){
  .pb-lang{display:none;}   /* the setup switch still covers it */
}
@media (prefers-reduced-motion:reduce){
  .lsw{transition:none;}
}

/* ================================================================= */
/* v4 — THE WORKFLOW BOARD (.wsb-*)                                   */
/* One set of classes for both callers: step 5 of the setup           */
/* (.wsb-edit) and the live rail in the demo (.wsb-ro .wsb-compact).  */
/* ================================================================= */

/* The View switches (step 5's List | Board, the demo's Rail | Board) */
.wfviews{display:flex;align-items:center;gap:9px;margin:2px 0 10px;}
.wfviews-label{
  font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);
}
.viewsw{
  display:inline-flex;gap:3px;padding:3px;
  background:var(--chip);border-radius:999px;
}
.viewsw .vsw{
  appearance:none;cursor:pointer;font:inherit;font-size:13px;font-weight:700;
  color:var(--purple-deep);background:transparent;border:0;border-radius:999px;
  padding:7px 15px;min-height:34px;transition:background .18s,color .18s,box-shadow .18s;
}
.viewsw .vsw.on{background:#fff;color:var(--ink);box-shadow:0 2px 8px rgba(50,31,91,.14);}
.viewsw .vsw:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}
.viewsw.small .vsw{font-size:12px;padding:5px 12px;min-height:28px;}

/* which view is on screen in step 5 (the play view's Rail | Board switch and
   its board host belong to chat.js, which styles them itself) */
body[data-wf-view="board"] #wfList{display:none;}
body[data-wf-view="list"] #wfBoard{display:none;}
body[data-wf-view="list"] #wfBoardHint,
body[data-wf-view="list"] #wfDragHint{display:none;}

/* ---- the board itself ---- */
.wsb{
  --wsb-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a4dd' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h15'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:26px 32px;
  align-items:stretch;
  width:100%;max-width:100%;
  list-style:none;margin:0;padding:0;
}
.wsb[data-cols="2"]{grid-template-columns:repeat(2,minmax(0,1fr));}
.wsb[data-cols="3"]{grid-template-columns:repeat(3,minmax(0,1fr));}
.wsb.wsb-compact{gap:22px 26px;}

.wsb-empty{font-size:14px;color:var(--muted);}

.wsb-card{
  position:relative;min-width:0;
  display:flex;flex-direction:column;gap:8px;
  background:#fff;border:1.5px solid var(--border);border-radius:18px;
  padding:11px 12px 12px;
  box-shadow:0 2px 10px rgba(50,31,91,.05);
  transition:border-color .2s,background .2s,box-shadow .2s,opacity .25s;
}
.wsb-card:focus-visible{outline:2px solid var(--purple);outline-offset:3px;}
.wsb-card.wsb-added{border-style:dashed;border-color:#d9c8ef;}

/* The connector arrow is a pseudo-element sitting in the grid gap, so the
   board's DOM is nothing but cards and a drag only ever moves a card. The
   column count comes from JS (data-cols, measured from the host's own width),
   which is how we know whether a card ends a row: down arrow if it does,
   right arrow if it does not. Single column is the default. */
.wsb-card::after{
  content:"";position:absolute;pointer-events:none;
  width:24px;height:24px;
  background:var(--wsb-arrow) center/contain no-repeat;
  left:50%;margin-left:-12px;bottom:-25px;transform:rotate(90deg);
}
.wsb[data-cols="2"] .wsb-card:nth-child(2n+1)::after,
.wsb[data-cols="3"] .wsb-card:nth-child(3n+1)::after,
.wsb[data-cols="3"] .wsb-card:nth-child(3n+2)::after{
  top:50%;margin-top:-12px;right:-28px;bottom:auto;left:auto;margin-left:0;transform:none;
}
.wsb .wsb-card:last-child::after{content:none;}

.wsb-top{display:flex;align-items:center;gap:8px;min-width:0;}
.wsb-num{
  position:relative;flex:none;
  width:28px;height:28px;border-radius:50%;
  background:var(--chip);color:var(--purple-deep);
  font-size:13px;font-weight:800;
  display:grid;place-items:center;
}
.wsb-num svg{width:55%;height:55%;}
.wsb-state{
  font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* the drag handle — the ONLY element that gives up native touch scrolling */
.wsb-grip{
  margin-left:auto;flex:none;
  width:38px;height:38px;border-radius:12px;
  display:grid;place-items:center;
  color:#9c8cb5;background:#fbf9fd;border:1px solid var(--border);
  cursor:grab;touch-action:none;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.wsb-grip svg{width:20px;height:20px;}
.wsb-grip:hover{background:var(--chip);color:var(--purple-deep);border-color:#cbbfda;}
.wsb-grip:active{cursor:grabbing;}

.wsb-btn{
  appearance:none;flex:none;width:34px;height:34px;border-radius:11px;cursor:pointer;
  background:#fff;border:1px solid var(--border);color:var(--ink);
  display:grid;place-items:center;
}
.wsb-btn svg{width:16px;height:16px;}
.wsb-btn:hover:not(:disabled){border-color:#cbbfda;background:var(--chip);}
.wsb-btn:disabled{opacity:.3;cursor:default;}
.wsb-btn:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}
.wsb-del{color:var(--pink);}

.wsb-label{
  display:block;width:100%;min-width:0;box-sizing:border-box;
  font:inherit;font-size:15px;font-weight:700;line-height:1.32;color:var(--ink);
  background:#fbf9fd;border:1px solid transparent;border-radius:11px;padding:7px 9px;
}
textarea.wsb-label{
  /* rows="2" is the no-JS fallback height; bdFit() sizes it to its text */
  resize:none;overflow:hidden;min-height:0;
  font-family:inherit;
}
.wsb-label:hover{border-color:var(--border);}
.wsb-label:focus{outline:none;background:#fff;border-color:var(--purple);box-shadow:0 0 0 3px rgba(116,57,223,.12);}
.wsb-label-ro{background:none;border:0;padding:0;font-size:15px;}

.wsb-acts{display:flex;flex-wrap:wrap;gap:6px;}
.wsb-acts:empty{display:none;}
.wsb-act{
  display:inline-flex;align-items:center;gap:6px;
  font-size:11.5px;font-weight:700;color:#0f7f4f;
  background:#e9f9f0;border:1px solid #c9eeda;border-radius:999px;
  padding:4px 10px 4px 5px;
  animation:chipin .3s cubic-bezier(.2,.8,.25,1);
}
.wsb-act-ico{
  display:grid;place-items:center;flex:none;width:15px;height:15px;
  border-radius:50%;background:var(--green);color:#0b3322;
}
.wsb-act-ico svg{width:9px;height:9px;}

.wsb-nav{display:flex;gap:5px;margin-top:auto;padding-top:2px;}

/* ---- demo view: read-only, compact, readable from across a room ---- */
.wsb-ro .wsb-card{cursor:default;}
.wsb-queued{opacity:.55;}
.wsb-active{
  background:#f6f3fa;border-color:#c9b1ec;opacity:1;
  box-shadow:0 0 0 3px rgba(116,57,223,.16),0 6px 18px rgba(50,31,91,.1);
}
.wsb-active .wsb-num{background:var(--purple);color:#fff;}
.wsb-active .wsb-num::after{
  content:"";position:absolute;inset:-4px;border-radius:50%;
  border:2px solid rgba(116,57,223,.45);
  animation:steppulse 1.6s ease-out infinite;
}
.wsb-active .wsb-state{color:var(--purple);}
.wsb-ro.wsb-compact .wsb-active .wsb-label{font-size:17px;}
.wsb-done .wsb-num{background:var(--purple);color:#fff;}
.wsb-done .wsb-state{color:var(--purple-deep);}
.wsb-compact .wsb-card{padding:10px 12px;gap:7px;}
.wsb-compact .wsb-label-ro{font-size:14px;}
.wsb-compact .wsb-num{width:26px;height:26px;font-size:12px;}

/* ---- dragging ---- */
.wsb-dragging{cursor:grabbing;}
.wsb-dragging .wsb-card{transition:none;}
.wsb-hole{
  background:#f6f2fc;border-style:dashed;border-color:var(--purple);
  box-shadow:inset 0 0 0 2px rgba(116,57,223,.08);
}
.wsb-hole > *{visibility:hidden;}
.wsb-hole::after{opacity:.35;}
.wsb-outside .wsb-hole{border-color:#e0d6ef;background:#fbf9fd;}

.wsb-float{
  position:fixed;left:0;top:0;z-index:70;
  pointer-events:none;
  margin:0;
  border-color:var(--purple);
  box-shadow:0 18px 44px rgba(50,31,91,.3);
  transform-origin:center;
  opacity:.97;
}
.wsb-float::after{content:none;}
.wsb-float-out{opacity:.45;}
.wsb-settled{animation:wsbsettle .36s cubic-bezier(.2,.8,.25,1);}
@keyframes wsbsettle{
  0%{box-shadow:0 0 0 0 rgba(116,57,223,.34);}
  100%{box-shadow:0 0 0 14px rgba(116,57,223,0);}
}
/* while a card is in the air nothing else should start selecting text */
body.wsb-drag-on{-webkit-user-select:none;user-select:none;}

/* ---- the suggestion tray: a pill plus its own handle ---- */
.wfsug{
  display:inline-flex;align-items:stretch;
  background:#fff;border:1px dashed #cbbfda;border-radius:999px;
  overflow:hidden;min-height:38px;
}
.wfsug-add{
  appearance:none;cursor:pointer;font:inherit;font-size:13.5px;font-weight:700;
  color:var(--purple-deep);background:transparent;border:0;
  padding:8px 6px 8px 14px;
}
.wfsug:not(.added) .wfsug-add{padding-right:2px;}
.wfsug.added{opacity:.5;border-style:solid;border-color:var(--border);}
.wfsug.added .wfsug-add{color:var(--muted);cursor:default;padding-right:14px;}
.wfsug-add::before{content:"+ ";font-weight:800;}
.wfsug.added .wfsug-add::before{content:"";}
.wfsug:not(.added):hover{background:var(--chip);border-style:solid;}
.wfsug:not(.added):hover .wfsug-add{background:transparent;}
.wfsug-add:focus-visible{outline:2px solid var(--purple);outline-offset:-2px;border-radius:999px;}
.wfsug-grip{
  display:grid;place-items:center;flex:none;
  width:32px;padding-right:4px;
  color:#9c8cb5;cursor:grab;touch-action:none;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.wfsug-grip svg{width:18px;height:18px;}
.wfsug-grip:active{cursor:grabbing;}

@media (max-width:429px){
  .wsb-card{padding:10px 11px 11px;}
  .wsb-label{font-size:14.5px;}
  .wsb{gap:24px 0;}
  .wfviews{flex-wrap:wrap;}
}
@media (prefers-reduced-motion:reduce){
  .wsb-card,.wsb-float{transition:none !important;}
  .wsb-act,.wsb-settled{animation:none;}
  .wsb-active .wsb-num::after{animation:none;}
}

/* chat.js's live board sits in the same slot as the rail (.ws-board-host): it
   takes the slack on a projector and is capped + scrollable on a phone, with
   WS.board.setState() keeping the in-progress card in view */
.ws-board-host{min-width:0;}
@media (min-width:900px){
  .rail .ws-viewtog{flex:0 0 auto;}
  .ws-board-host{
    flex:1 1 auto;min-height:0;
    overflow-y:auto;scrollbar-width:thin;
    padding:2px 2px 4px;
  }
}
@media (max-width:899px){
  .ws-board-host{
    max-height:min(40dvh,320px);
    overflow-y:auto;-webkit-overflow-scrolling:touch;
    padding-bottom:2px;
  }
}

/* ---------- the live board deserves room ----------
   In the rail's normal width the board shows about one and a half cards, which
   is no use from the back of a room. When the presenter switches to Board on a
   wide screen, give the side column more width: A's renderer measures its host
   and lays the cards out in two columns on its own. */
@media (min-width:1200px){
  body[data-ws-work="board"] .side{
    flex:0 0 clamp(420px,44%,620px);
  }
  body[data-ws-work="board"] .ws-board-host{
    max-height:none;
  }
  body[data-ws-work="board"] .rail{
    flex:1 1 auto;
  }
}
