/* mp-attendee.css — mobile companion ("second screen") for audience phones. */
:root {
  --teal: #00A9AC; --teal-d: #017E80; --teal-ink: #053C3D; --teal-br: #41d3d5;
  --orange: #FA9D1E; --orange-d: #E07F06;
  --ink: #0E1518; --ink2: #0A1417; --mut-d: #9DBDBD; --line: rgba(255, 255, 255, .1);
  --disp: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--body); background: var(--ink); color: #fff;
  overflow: hidden; overscroll-behavior: none; touch-action: manipulation;
  -webkit-font-smoothing: antialiased; line-height: 1.5;
  background-image: radial-gradient(120% 80% at 80% 0%, rgba(0, 169, 172, .18), transparent 60%),
                    radial-gradient(90% 60% at 0% 100%, rgba(250, 157, 30, .1), transparent 60%);
}
h1, h2, h3 { font-family: var(--disp); font-weight: 800; line-height: 1.05; }

.app { display: flex; flex-direction: column; height: 100dvh; }

/* ---- top bar ---- */
.topbar { flex: none; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tb-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid rgba(255, 255, 255, .18); }
.tb-av svg { width: 100%; height: 100%; display: block; }
.tb-id { flex: 1; min-width: 0; }
.tb-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-prog { font-size: 11px; color: var(--mut-d); font-weight: 600; letter-spacing: .03em; }
.tb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mut-d); flex: none; }
.tb-dot.open { background: var(--teal-br); box-shadow: 0 0 8px var(--teal-br); }
.tb-dot.reconnecting { background: var(--orange); animation: blink 1s infinite; }
.tb-dot.offline { background: #FF8A6B; }
@keyframes blink { 50% { opacity: .25; } }

/* ---- stage (swaps per slide) ---- */
.stage { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 18px 18px 6px; position: relative; }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal-br); font-weight: 700; }

/* idle "eyes up" */
.idle { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; }
.idle .big { font-size: 46px; }
.idle h2 { font-size: 24px; max-width: 18ch; }
.idle p { color: var(--mut-d); font-size: 14px; max-width: 26ch; }

/* generic card */
.card { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }

/* ---- agent picker (swipe) ---- */
.pick-wrap { display: flex; flex-direction: column; height: 100%; gap: 12px; }
.pick-head { text-align: center; }
.pick-head h2 { font-size: 20px; margin-top: 2px; }
.pick-head p { color: var(--mut-d); font-size: 13px; margin-top: 4px; }
.pick-rail { flex: 1; display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; touch-action: pan-x; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
.pick-rail::-webkit-scrollbar { display: none; }
.agent-card { scroll-snap-align: center; flex: 0 0 84%; max-width: 340px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; }
.agent-card.chosen { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange) inset; }
.ac-top { display: flex; align-items: center; gap: 13px; }
.ac-img { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex: none; background: var(--teal-d); position: relative; }
.ac-img img { width: 100%; height: 100%; object-fit: cover; }
.ac-img .ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--disp); font-weight: 800; font-size: 18px; }
.ac-nm { font-family: var(--disp); font-weight: 800; font-size: 18px; }
.ac-br { font-size: 12px; color: var(--mut-d); margin-top: 2px; }
.ac-stats { display: flex; gap: 22px; margin: 14px 0; }
.ac-stats b { font-family: var(--disp); font-weight: 800; font-size: 22px; color: var(--teal-br); display: block; line-height: 1; }
.ac-stats span { font-size: 11px; color: var(--mut-d); }
.ac-choose { margin-top: auto; appearance: none; border: 0; border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 800; font-family: var(--disp); background: var(--orange); color: #241300; cursor: pointer; }
.agent-card.chosen .ac-choose { background: var(--teal); color: #fff; }
.pick-hint { text-align: center; font-size: 12px; color: var(--mut-d); }

/* ---- slider control ---- */
.slider-wrap { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.slider-wrap h2 { font-size: 20px; }
.slider-read { font-family: var(--disp); font-weight: 800; font-size: 60px; color: var(--teal-br); line-height: 1; margin: 8px 0 0; }
.slider-sub { color: var(--mut-d); font-size: 14px; margin-bottom: 10px; }
.slider-sub b { color: #fff; }
.big-range { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 14px; background: rgba(255, 255, 255, .14); outline: none; margin: 18px 0 6px; }
.big-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 42px; height: 42px; border-radius: 50%; background: var(--orange); border: 4px solid #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .5); cursor: pointer; }
.big-range::-moz-range-thumb { width: 38px; height: 38px; border-radius: 50%; background: var(--orange); border: 4px solid #fff; }
.range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut-d); font-weight: 600; }
.slider-pct { font-family: var(--disp); font-weight: 800; font-size: 22px; color: #fff; }

/* ---- guess control ---- */
.guess-wrap { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.guess-wrap h2 { font-size: 21px; max-width: 20ch; margin: 0 auto; }
.guess-wrap p { color: var(--mut-d); font-size: 13px; }
.guess-big { font-family: var(--disp); font-weight: 800; font-size: 64px; color: var(--orange); line-height: 1; }
.guess-submit { appearance: none; border: 0; border-radius: 12px; padding: 15px; font-size: 16px; font-weight: 800; font-family: var(--disp); background: var(--teal); color: #fff; cursor: pointer; margin-top: 6px; }
.guess-submit:disabled { opacity: .5; }
.guess-done { color: var(--teal-br); font-weight: 700; font-size: 15px; }

/* ---- reaction bar ---- */
.reactbar { flex: none; display: flex; justify-content: space-around; gap: 6px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.react-btn { appearance: none; border: 0; background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 10px 0; font-size: 26px; flex: 1; cursor: pointer; transition: transform .1s, background .2s; }
.react-btn:active { transform: scale(.86); background: rgba(255, 255, 255, .16); }
.react-fly { position: fixed; bottom: 70px; font-size: 34px; pointer-events: none; animation: flyUp 1.2s ease-out forwards; z-index: 60; }
@keyframes flyUp { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120px) scale(1.2); } }

/* ---- onboarding overlay ---- */
.onboard { position: fixed; inset: 0; z-index: 100; background: var(--ink2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 28px; text-align: center; }
.onboard .eyebrow { margin-bottom: 2px; }
.ob-av { width: 128px; height: 128px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255, 255, 255, .2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.ob-av svg { width: 100%; height: 100%; display: block; }
.ob-name { font-family: var(--disp); font-weight: 800; font-size: 30px; }
.ob-sub { color: var(--mut-d); font-size: 14px; max-width: 26ch; }
.ob-btns { display: flex; gap: 12px; margin-top: 6px; width: 100%; max-width: 340px; }
.ob-btn { flex: 1; appearance: none; border: 0; border-radius: 13px; padding: 15px; font-size: 16px; font-weight: 800; font-family: var(--disp); cursor: pointer; }
.ob-shuffle { background: rgba(255, 255, 255, .1); color: #fff; }
.ob-go { background: var(--orange); color: #241300; }

/* ---- connection banner ---- */
.banner { position: fixed; top: 0; left: 0; right: 0; z-index: 90; text-align: center; font-size: 13px; font-weight: 700; padding: 8px; background: var(--orange-d); color: #241300; transform: translateY(-100%); transition: transform .3s; }
.banner.show { transform: none; }

/* ---- offer choice buttons (offer slide) ---- */
.offer-wrap { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.offer-wrap h2 { font-size: 21px; }
.offer-wrap p { color: var(--mut-d); font-size: 14px; }
.offer-wrap p b { color: #fff; }
.offer-choices { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.offer-choice { display: flex; align-items: center; gap: 14px; text-align: left; appearance: none; cursor: pointer; border: 2px solid var(--line); border-radius: 16px; padding: 16px; background: rgba(255,255,255,.05); color: #fff; }
.offer-choice.oc-full { border-color: rgba(250,157,30,.5); }
.offer-choice.chosen { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange) inset; }
.oc-pct { font-family: var(--disp); font-weight: 800; font-size: 34px; color: var(--teal-br); line-height: 1; flex: none; width: 60px; text-align: center; }
.oc-full .oc-pct { color: var(--orange); }
.oc-lab { flex: 1; }
.oc-lab b { display: block; font-size: 16px; }
.oc-lab small { color: var(--mut-d); font-size: 12.5px; }
.oc-cta { font-family: var(--disp); font-weight: 800; font-size: 11.5px; color: var(--orange); flex: none; text-align: right; max-width: 32%; line-height: 1.2; }
.offer-choice.chosen .oc-cta { color: var(--teal-br); }
.offer-hint { color: var(--mut-d); font-size: 13px; margin-top: 6px; min-height: 18px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---- brand bar: free advertising to the room ---- */
.brandbar { flex: none; display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03); }
.brandbar img { height: 24px; width: auto; display: block; }
.brandbar .bb-mr { height: 21px; }
.bb-x { color: var(--mut-d); font-size: 13px; }
.bb-tag { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-br); }

/* ---- onboarding: name input ---- */
.ob-logos { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ob-logos img { height: 30px; }
.ob-logos .bb-x { font-size: 16px; }
.ob-shuffle-mini { appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; border-radius: 20px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ob-field { width: 100%; max-width: 340px; text-align: left; display: block; }
.ob-field span { display: block; font-size: 12px; color: var(--mut-d); font-weight: 700; margin-bottom: 6px; letter-spacing: .04em; }
.ob-input { width: 100%; box-sizing: border-box; font-size: 18px; font-family: var(--body); padding: 14px 16px; border-radius: 13px; border: 2px solid var(--line); background: rgba(255,255,255,.06); color: #fff; outline: none; }
.ob-input:focus { border-color: var(--teal-br); }
.ob-go { width: 100%; max-width: 340px; }

/* ---- mood button ---- */
.moodbar { flex: none; padding: 8px 14px 0; }
.mood-btn { width: 100%; appearance: none; border: 0; border-radius: 14px; padding: 13px; font-size: 16px; font-weight: 800; font-family: var(--disp); color: #241300; cursor: pointer; background: linear-gradient(90deg, var(--orange), var(--orange-d)); box-shadow: 0 4px 16px rgba(250,157,30,.3); transition: transform .12s; }
.mood-btn.pop { transform: scale(.94); }

.ob-go { flex: none; }
