/* Sparkler · base-phone.css
   The audience's phone page, written against the same tokens as the slides. Adapted from
   reference/masterclass-kit/audience.html (springprompt-masterclass, MIT).

   The phone takes a theme's colours, families, weights, radii and border from groups A, B, C, E
   and G. It does NOT take the stage's type scale (--fs-*) or margins: sizes here are fixed for
   thumbs and small screens. A theme styles it under [data-theme="x"] .aud … and may not go below
   the floors marked FIXED: text 15px, option labels 17px, tap targets 52px (options 56px). */

@font-face{font-family:Inter;src:url(fonts/inter/inter-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

/* token defaults for a page with no theme: the same values as base.css */
:root{
  --bg:#FAF7F0; --paper:#F1ECE0; --panel:#fff; --line:#E2DCCD; --line-strong:#E2DCCD; --night:#1C2420; --on-night:#F4F1E8;
  --ink:#1C2420; --mute:#4A544F; --faint:#7A827D;
  --accent:#3E7A4F; --accent-text:#3E7A4F; --on-accent:#fff; --accent-soft:#C4E8A4;
  --accent-2:#C9822B; --accent-2-text:#8A5412; --bad:#B4472F; --good:#3E7A4F;
  --font-display:Inter,-apple-system,"Segoe UI",system-ui,sans-serif;
  --font-body:Inter,-apple-system,"Segoe UI",system-ui,sans-serif;
  --font-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --font-label:Inter,-apple-system,"Segoe UI",system-ui,sans-serif;
  --w-display:600; --w-body:400; --w-strong:650; --w-label:650;
  --tr-title:-.032em; --tr-label:.14em; --case-label:uppercase;
  --radius:18px; --radius-sm:14px; --radius-xs:6px; --radius-pill:99px; --border:1px;
  --shadow:0 1px 1px #1c24200a,0 18px 40px -26px #1c24203d;
  --ease:cubic-bezier(.16,1,.3,1);
}
.surface{
  --c-surface:var(--bg); --c-hl:var(--accent);
  --c-ctx:color-mix(in srgb,var(--faint) 50%,var(--bg));
  /* a selected option: the soft accent, lifted towards the panel */
  --sel:color-mix(in srgb,var(--accent-soft) 45%,var(--panel));
  --r:min(var(--radius),22px); --r-sm:min(var(--radius-sm),16px);
  --bw:max(var(--border),1.5px);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
html,body{margin:0;min-height:100%}
.aud{background:var(--bg);color:var(--ink);font-family:var(--font-body);font-weight:var(--w-body);font-size:17px;line-height:1.4;-webkit-font-smoothing:antialiased;
  padding:max(18px,env(safe-area-inset-top)) 18px max(28px,env(safe-area-inset-bottom));max-width:560px;margin:0 auto}

/* FIXED: the header and its connection dot keep their place */
.aud header{display:flex;justify-content:space-between;align-items:center;gap:12px;font-family:var(--font-label);font-weight:var(--w-label);font-size:13px;letter-spacing:var(--tr-label);text-transform:var(--case-label);color:var(--faint);margin-bottom:26px}
.aud header i{width:9px;height:9px;border-radius:50%;background:var(--good);flex:none;transition:background .3s}
.aud header.off i{background:var(--bad)}

.aud h1{font-family:var(--font-display);font-weight:var(--w-display);font-size:28px;line-height:1.14;letter-spacing:var(--tr-title);margin:0 0 10px;text-wrap:balance}
.aud h2{font-family:var(--font-display);font-weight:var(--w-display);font-size:21px;line-height:1.2;margin:0 0 6px}
.aud p{margin:0 0 14px;color:var(--mute)}
.aud main{animation:aud-in .5s var(--ease) both}
@keyframes aud-in{from{opacity:0;transform:translateY(10px)}}
.aud .hint{font-size:15px;color:var(--faint);margin:10px 0 0}
.aud .anon{font-size:15px;color:var(--faint);margin:10px 0 0;text-align:center}
.aud button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;touch-action:manipulation}
.aud .label{font-family:var(--font-label);font-weight:var(--w-label);font-size:13px;letter-spacing:var(--tr-label);text-transform:var(--case-label);color:var(--faint);margin:26px 0 10px}

/* FIXED: options are full width, at least 56px tall, 12px apart, label at least 17px;
   the selected one shows by border AND fill */
.aud .opt{display:flex;align-items:center;gap:14px;width:100%!important;min-height:56px!important;text-align:left;background:var(--panel);border:var(--bw) solid var(--line);border-radius:var(--r);padding:12px 16px;margin-bottom:12px;font-size:max(18px,17px);line-height:1.3;transition:border-color .15s,background .15s,transform .1s}
.aud .opt:active{transform:scale(.985)}
.aud .opt b{flex:none;width:34px;height:34px;border-radius:50%;background:var(--paper);font-size:15px;line-height:34px;text-align:center;color:var(--mute);font-weight:var(--w-strong);transition:background .15s,color .15s}
.aud .opt.on{border-color:var(--accent);background:var(--sel)}
.aud .opt.on b{background:var(--accent);color:var(--on-accent)}
.aud .opt small{display:block;font-size:15px;color:var(--mute);margin-top:2px}
.aud .chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 16px}
.aud .chip{min-height:44px;border:var(--bw) solid var(--line);background:var(--panel);border-radius:var(--radius-pill);padding:9px 14px;font-size:15px}
.aud .chip.on{border-color:var(--accent);background:var(--accent);color:var(--on-accent)}

/* FIXED: the Send button is full width, at least 52px, accent with on-accent text */
.aud .go{display:block;width:100%!important;min-height:52px!important;background:var(--accent)!important;color:var(--on-accent)!important;font-weight:var(--w-strong);font-size:18px;border-radius:var(--r);padding:16px;margin-top:14px;transition:opacity .2s,transform .1s}
.aud .go:active{transform:scale(.985)}
.aud .go[disabled]{opacity:.35}
.aud .go.ghost{background:none!important;color:var(--accent-text)!important;border:var(--bw) solid var(--line);font-weight:600}
/* FIXED: the Sent confirmation is always shown, with its tick */
.aud .sent{display:flex!important;align-items:center;gap:12px;background:var(--sel);border-radius:var(--r);padding:16px;font-weight:600;margin:16px 0 4px}
.aud .sent::before{content:"✓";width:30px;height:30px;border-radius:50%;background:var(--accent);color:var(--on-accent);text-align:center;line-height:30px;flex:none}

/* scale */
.aud .big{font-family:var(--font-display);font-size:64px;font-weight:var(--w-strong);letter-spacing:-.04em;text-align:center;margin:18px 0 6px;font-variant-numeric:tabular-nums}
.aud .slider{display:grid;grid-template-columns:52px 1fr 52px;gap:12px;align-items:center}
.aud .slider button{height:52px;border-radius:50%;background:var(--panel);border:var(--bw) solid var(--line);font-size:24px}
.aud input[type=range]{width:100%;accent-color:var(--accent);height:44px}
.aud .ends{display:flex;justify-content:space-between;font-size:15px;color:var(--faint);padding:0 64px}

/* words, questions, get-slides */
.aud input[type=text],.aud input[type=email],.aud textarea{width:100%;min-height:52px;font:inherit;font-size:18px;color:var(--ink);background:var(--panel);border:var(--bw) solid var(--line);border-radius:var(--r-sm);padding:14px 15px;margin-bottom:10px;outline:none;resize:none}
.aud input[type=text]:focus,.aud input[type=email]:focus,.aud textarea:focus{border-color:var(--accent)}
.aud ::placeholder{color:var(--faint);opacity:1}
.aud .qs{margin-top:22px;display:grid;gap:8px}
.aud .qrow{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;background:var(--panel);border:var(--bw) solid var(--line);border-radius:var(--r-sm);padding:12px 12px 12px 16px;font-size:16px}
.aud .qrow.done{opacity:.5}
.aud .up{min-width:56px;height:44px;border-radius:min(var(--radius-sm),12px);border:var(--bw) solid var(--line);font-weight:var(--w-strong);font-variant-numeric:tabular-nums}
.aud .up.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
/* FIXED: consent wording and its tick box are always shown */
.aud .consent{display:grid!important;grid-template-columns:28px 1fr;gap:10px;align-items:start;font-size:15px;color:var(--mute);margin:6px 0 4px}
.aud .consent input{width:24px;height:24px;margin:0;accent-color:var(--accent)}

/* results on the phone: the room so far, the person's own pick marked */
.aud .bars{margin-top:18px;display:grid;gap:8px}
.aud .bar{font-size:15px}
.aud .bar span{display:flex;justify-content:space-between;gap:10px;margin-bottom:4px}
.aud .bar i{display:block;height:10px;border-radius:0 var(--radius-xs) var(--radius-xs) 0;background:var(--c-ctx);min-width:2px;transition:width .6s var(--ease)}
.aud .bar.me i{background:var(--c-hl)}

/* pairwise: two cards, tap one */
.aud .pair{display:grid;gap:10px;margin-top:16px}
.aud .pair .opt{flex-direction:column;align-items:flex-start;gap:4px;min-height:120px!important;justify-content:center;padding:18px;margin:0}
.aud .pair .opt strong{font-family:var(--font-display);font-weight:var(--w-display);font-size:21px;line-height:1.2}
.aud .pair .or{text-align:center;font-family:var(--font-label);font-weight:var(--w-label);font-size:13px;letter-spacing:var(--tr-label);text-transform:var(--case-label);color:var(--faint)}
.aud .count{text-align:center;font-size:15px;color:var(--faint);margin-top:10px}

/* take-home */
.aud .link{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:56px;background:var(--panel);border:var(--bw) solid var(--line);border-radius:var(--r);padding:16px;margin-bottom:10px;color:var(--ink);text-decoration:none;font-weight:600}
.aud .link::after{content:"→";color:var(--accent-text)}
.aud .copy{background:var(--panel);border:var(--bw) solid var(--line);border-radius:var(--r);padding:14px 16px;margin-bottom:10px}
.aud .copy b{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.aud .copy button{color:var(--accent-text);font-weight:var(--w-strong);font-size:15px;min-height:44px;padding:6px 0 6px 10px}
.aud .copy pre{margin:0;white-space:pre-wrap;font-family:var(--font-mono);font-size:15px;line-height:1.45;color:var(--mute);max-height:150px;overflow:auto}
.aud .pulse{display:flex;gap:6px;margin-top:26px}
.aud .pulse i{width:8px;height:8px;border-radius:50%;background:var(--accent);animation:aud-p 1.4s ease-in-out infinite}
.aud .pulse i:nth-child(2){animation-delay:.2s}.aud .pulse i:nth-child(3){animation-delay:.4s}
@keyframes aud-p{0%,100%{opacity:.2}50%{opacity:1}}

/* the test page only: every screen stacked, each under a plain label */
.aud .screen{padding-bottom:34px;margin-bottom:34px;border-bottom:1px dashed var(--line-strong)}
.aud .screen:last-child{border-bottom:0;margin-bottom:0}
.aud .screen-name{font:600 12px/1 ui-monospace,Menlo,monospace;color:var(--faint);margin-bottom:14px}
.aud .screen main{animation:none}

@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
