:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #254335; background: #f4f6ef; }
body { margin: 0; }
[hidden] { display: none !important; }
.participant-header { height: 68px; padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; }
.participant-header > span:first-child { font-size: 34px; font-weight: 800; letter-spacing: -2px; }
.interview-label { font-size: 13px; color: #62775a; }
#experience { min-height: calc(100dvh - 68px); display: grid; place-items: center; padding: 24px; box-sizing: border-box; }
.welcome, .microphone-step { width: min(100%, 400px); text-align: center; animation: step-in .24s ease-out; }
h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.15; letter-spacing: -1.5px; margin: 0 0 20px; overflow-wrap: anywhere; }
p { font-size: 15px; line-height: 1.55; }
.welcome-details { margin: 28px 0 22px; text-align: left; color: #596e59; }
.welcome-details p { font-size: 13px; }
#reward { font-size: 14px; }
#reward:empty { display: none; }
.consent { display: flex; align-items: flex-start; gap: 10px; text-align: left; font-size: 13px; line-height: 1.5; margin: 20px 0; }
.consent input { margin: 3px 0 0; accent-color: #2a503b; }
button { border: 0; border-radius: 28px; min-height: 48px; padding: 14px 24px; background: #2a503b; color: white; font: inherit; font-size: 14px; cursor: pointer; transition: background .18s, opacity .18s; }
button:hover:not(:disabled) { background: #1d402e; }
button:disabled { opacity: .42; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #609e76; outline-offset: 4px; }
.welcome > button, .microphone-step > button:not(.quiet-button), #begin { width: 100%; }
.quiet-button { background: transparent; color: #48634c; font-size: 12px; padding: 10px 14px; min-height: 40px; }
.quiet-button:hover:not(:disabled) { background: #e8ede2; }
#readiness, #opening-status { font-size: 13px; color: #62775a; }
#readiness:empty { display: none; }
.microphone-symbol { margin: 0 auto 25px; width: 72px; height: 72px; border-radius: 50%; background: #e6edde; display: grid; place-items: center; }
.microphone-symbol svg { width: 34px; height: 34px; fill: none; stroke: #2a503b; stroke-width: 2.5; stroke-linecap: round; }
.microphone-step h1 { font-size: 30px; letter-spacing: -1px; }
#microphone-status { min-height: 24px; }
#microphone-level { display: block; width: 100%; height: 12px; margin: 24px 0 18px; accent-color: #35704b; }
.local-check-note { font-size: 12px; color: #62775a; margin-bottom: 26px; }
#phone-stage { font-size: 17px; line-height: 1.4; }
#phone-elapsed, #phone-estimate { font-size: 12px; color: #c7d6c3; line-height: 1.5; }
#phone-elapsed { order: 4; opacity: .75; }
#phone-progress-bar { display: block; appearance: none; width: min(190px, 100%); height: 5px; border: none; border-radius: 8px; background: #3b5946; overflow: hidden; }
#phone-progress-bar::-webkit-progress-bar { background: #3b5946; border-radius: 8px; }
#phone-progress-bar::-webkit-progress-value { background: #b8d0a8; border-radius: 8px; transition: width 1s linear; }
#phone-progress-bar::-moz-progress-bar { background: #b8d0a8; border-radius: 8px; }
.preparing-spinner { width: 24px; height: 24px; border: 2px solid #496753; border-top-color: #eaf0e2; border-radius: 50%; animation: preparing-spin 1.2s linear infinite; }
.failed .preparing-spinner { animation: none; border-color: #d6b986; }
#voice-state:empty { display: none; }
@keyframes preparing-spin { to { transform: rotate(360deg); } }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* One idea per screen. Shared layout keeps desktop and mobile equally concise. */
#experience { min-height: 100dvh; padding: 28px 24px; }
.walkthrough-step, .speaker-step { width: min(100%, 400px); text-align: center; animation: step-in .24s ease-out; }
.walkthrough-step > button, .speaker-step > button:not(.quiet-button) { width: 100%; margin-top: 12px; }
.session-meta { color: #62775a; font-size: 14px; margin: 22px 0; }
.welcome-details { text-align: center; margin: 24px 0; }
#phone-progress.failed .preparing-spinner { display: none; }
.mini-phone { width: 86px; height: 145px; border: 4px solid #254335; border-radius: 20px; margin: 0 auto 30px; background: #e4ecd9; position: relative; overflow: hidden; }
.mini-phone span { display: block; height: 45px; margin: 24px 10px; border-radius: 10px; background: #b7ceab; }
.mini-phone i { position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #2a503b; left: 34px; top: 55px; animation: demo-touch 2.5s ease-in-out infinite; }
.sound-rings { height: 76px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; }
.sound-rings span { width: 8px; height: 26px; border-radius: 8px; background: #5e8559; }
.sound-rings span:nth-child(2) { height: 48px; }
@keyframes demo-touch { 0%,100% { transform: translateY(18px); opacity: .5; } 50% { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mini-phone i { animation: none; } }

.interview-debug { position:relative; z-index:20; max-width:620px; margin:12px auto; padding:12px 16px; background:#e8eddf; border-radius:16px; font-size:13px; }
.interview-debug summary { cursor:pointer; font-weight:600; }
.interview-debug p { margin:12px 0; font-size:13px; line-height:1.45; }
.interview-debug select { width:100%; min-height:44px; padding:8px; border:1px solid #91a28e; border-radius:8px; background:#f6f7f0; color:#203e31; }
.interview-debug button { margin-top:12px; min-height:44px; font-size:14px; }
@media(max-width:640px) { .interview-debug { margin:8px 16px; } }

/* September16 participant review: benefit, real app preview and one action. */
#greeting { margin:0 0 16px; font-size:14px; color:#62775a; }
.welcome-preview { height:145px; width:100%; overflow:hidden; border-radius:24px; margin-bottom:24px; background:#e4ecd9; }
.welcome-preview img { width:100%; height:100%; object-fit:cover; object-position:50% 25%; }
#welcome-benefit { font-size:clamp(28px,5vw,36px); }
.app-preview { width:136px; height:294px; object-fit:cover; border-radius:22px; margin:0 auto 28px; box-shadow:0 8px 28px #25433520; }
#walkthrough-description, #speaker-status { font-size:26px; line-height:1.25; letter-spacing:-.6px; }
.speaker-step { display:flex; flex-direction:column; align-items:stretch; }
#speaker-continue { order:2; }
#speaker-play.quiet-button { order:3; margin-top:8px; width:auto; align-self:center; }
.session-meta:has(#reward:empty) { display:none; }
@media(max-height:740px) { .welcome-preview { height:110px; margin-bottom:18px; } .app-preview { height:240px; width:110px; } }

/* Voice-first interview room (October 2026). The conversation is a voice orb;
   the interviewer brings up the real phone only when it helps. */
.voice-room {
  --orb-zone: 118px; --foot: 112px; --frame: 11px; --glass: 3px;
  --sh: min(calc(100dvh - var(--orb-zone) - var(--foot) - 2 * (var(--frame) + var(--glass)) - env(safe-area-inset-top) - env(safe-area-inset-bottom)), calc((100vw - 48px - 2 * (var(--frame) + var(--glass))) * 874 / 402), 740px);
  --sw: calc(var(--sh) * 402 / 874); --sr: calc(var(--sw) * .135);
  position: fixed; inset: 0; z-index: 5; overflow: hidden; text-align: center;
  background: radial-gradient(120% 80% at 50% 38%, #f8faf3 0%, #f1f4ea 55%, #e9eee1 100%);
  animation: step-in .3s ease-out;
}
body:has(.voice-room:not([hidden])) { overflow: hidden; }

/* Orb */
.orb-wrap { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 18px;
  transition: top .55s cubic-bezier(.22,.8,.24,1), gap .55s; z-index: 3; }
.voice-orb { --lvl: 0; --size: clamp(150px, 34vmin, 200px); position: relative; width: var(--size); height: var(--size); border-radius: 50%;
  transform: scale(calc(1 + var(--lvl))); transition: width .55s cubic-bezier(.22,.8,.24,1), height .55s cubic-bezier(.22,.8,.24,1), transform .08s linear, box-shadow .4s;
  background: radial-gradient(circle at 34% 30%, #e9f3df 0%, #a9cf98 26%, #4f8b62 58%, #24503a 100%);
  box-shadow: 0 18px 50px rgba(36,80,58,.28), 0 0 0 1px rgba(36,80,58,.06), inset 0 -10px 30px rgba(15,40,28,.35);
  animation: orb-breathe 4.8s ease-in-out infinite; overflow: hidden; }
.voice-orb i { position: absolute; border-radius: 50%; pointer-events: none; }
.voice-orb .orb-core { inset: 18%; background: radial-gradient(circle at 50% 50%, rgba(246,251,239,.55), rgba(246,251,239,0) 70%); filter: blur(6px); }
.voice-orb .orb-swirl { inset: -20%; background: conic-gradient(from 0deg, rgba(196,226,174,.0), rgba(196,226,174,.55), rgba(98,160,118,.0) 40%, rgba(232,244,220,.45) 70%, rgba(196,226,174,0)); filter: blur(14px); animation: orb-spin 9s linear infinite; mix-blend-mode: soft-light; }
.voice-orb .orb-swirl.two { inset: -10%; animation-duration: 13s; animation-direction: reverse; opacity: .8; }
.voice-orb .orb-sheen { left: 18%; top: 12%; width: 36%; height: 26%; background: radial-gradient(ellipse at center, rgba(255,255,255,.55), rgba(255,255,255,0) 70%); filter: blur(2px); }
.voice-room[data-voice="speaking"] .voice-orb { box-shadow: 0 18px 60px rgba(70,140,95,.45), 0 0 0 calc(4px + 26px * var(--lvl)) rgba(120,180,135,.16), inset 0 -10px 30px rgba(15,40,28,.3); }
.voice-room[data-voice="speaking"] .orb-swirl { animation-duration: 3.2s; }
.voice-room[data-voice="listening"] .voice-orb { background: radial-gradient(circle at 34% 30%, #f3f7ec 0%, #c3dcb5 26%, #6d9e7a 58%, #2d5b43 100%); }
.stage-caption { margin: 0; min-height: 0; font-size: 13px; color: #5d7559; max-width: 280px; opacity: 0; transition: opacity .3s; }
.voice-room[data-phone="shown"] .orb-wrap { top: calc(env(safe-area-inset-top) + 42px); gap: 0; }
.voice-room[data-phone="shown"] .voice-orb { --size: 54px; box-shadow: 0 8px 22px rgba(36,80,58,.25), inset 0 -4px 12px rgba(15,40,28,.35); }
.voice-room[data-phone="shown"] .stage-caption { position: absolute; top: calc(100% + 9px); white-space: nowrap; opacity: 1; font-size: 12px; }
.voice-room:has(#control-pill:not([hidden])) .stage-caption { opacity: 0; }

/* Phone stage */
.phone-stage { position: absolute; left: 0; right: 0; top: calc(var(--orb-zone) + env(safe-area-inset-top)); bottom: calc(var(--foot) + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(26px) scale(.94); pointer-events: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.22,.8,.24,1); z-index: 2; }
.voice-room[data-phone="shown"] .phone-stage { opacity: 1; transform: none; pointer-events: auto; transition-delay: .08s; }

/* iPhone: titanium band, black glass border, screen with the live stream. */
.iphone { position: relative; padding: var(--frame); border-radius: calc(var(--sr) + var(--frame) + var(--glass));
  background: linear-gradient(145deg, #5d5d61 0%, #2d2d30 18%, #1c1c1e 50%, #3a3a3d 82%, #6a6a6e 100%);
  box-shadow: 0 0 0 1px #0b0b0c, inset 0 0 0 1.5px rgba(255,255,255,.18), inset 0 0 0 3px rgba(0,0,0,.55), 0 30px 70px rgba(20,40,30,.32), 0 8px 18px rgba(20,40,30,.18);
  transition: box-shadow .4s; }
.iphone-glass { padding: var(--glass); border-radius: calc(var(--sr) + var(--glass)); background: #050505; box-shadow: inset 0 0 0 1px #000; }
.iphone .side { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #2a2a2d, #6c6c70 55%, #303033); }
.iphone .side.action { left: -3px; top: calc(var(--sh) * .17); height: calc(var(--sh) * .045); }
.iphone .side.volume-up { left: -3px; top: calc(var(--sh) * .245); height: calc(var(--sh) * .085); }
.iphone .side.volume-down { left: -3px; top: calc(var(--sh) * .345); height: calc(var(--sh) * .085); }
.iphone .side.power { right: -3px; top: calc(var(--sh) * .27); height: calc(var(--sh) * .12); }
.phone-shell { position: relative; width: var(--sw); height: var(--sh); border-radius: var(--sr); overflow: hidden; background: #0d1a13; isolation: isolate; }
.phone-shell #phone, .phone-shell .live-panel { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.voice-room .live-panel > :not(canvas):not(video) { display: none; }
.voice-room .live-panel canvas { display: block; width: 100%; height: 100%; border: 0; border-radius: var(--sr); background: #0d1a13; touch-action: none; box-sizing: border-box; }
.voice-room .live-panel canvas.input-blocked { cursor: not-allowed; }
.voice-room .live-panel canvas:focus { outline: none; }
.touch-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; border-radius: var(--sr); }
#phone-progress:not([hidden]) { position: absolute; inset: 0; z-index: 5; border-radius: var(--sr); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; padding: 22px; background: #183626; color: #f4f6ef; }

/* Interviewer control: calm banner and a slow glow; the participant's touches pause. */
.control-pill { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 76px); transform: translateX(-50%); z-index: 6; margin: 0;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 999px; background: rgba(32,62,46,.92); color: #f1f6ea;
  font-size: 12.5px; line-height: 1.2; box-shadow: 0 6px 18px rgba(20,40,30,.25); white-space: nowrap; animation: step-in .25s ease-out; }
.control-dot { width: 8px; height: 8px; border-radius: 50%; background: #9fe0ae; box-shadow: 0 0 0 0 rgba(159,224,174,.7); animation: control-dot 1.6s ease-out infinite; }
.iphone.controlled { box-shadow: 0 0 0 1px #0b0b0c, inset 0 0 0 1.5px rgba(255,255,255,.18), inset 0 0 0 3px rgba(0,0,0,.55), 0 0 0 4px rgba(126,196,146,.55), 0 0 38px 8px rgba(126,196,146,.45), 0 30px 70px rgba(20,40,30,.32);
  animation: control-glow 2.2s ease-in-out infinite; }

/* Highlight: the interviewer points at an element. */
.highlight { position: absolute; z-index: 3; box-sizing: border-box; margin: -5px; padding: 5px; border-radius: 14px; pointer-events: none;
  border: 3px solid #8fe0a6; box-shadow: 0 0 0 4px rgba(143,224,166,.28), 0 0 22px rgba(143,224,166,.55); content-visibility: visible; }
.highlight { width: auto; }
.highlight.pulse { animation: highlight-pulse 1.4s ease-in-out infinite; }
.highlight-label { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  padding: 5px 10px; border-radius: 999px; background: rgba(32,62,46,.94); color: #f1f6ea; font-size: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.highlight.label-below .highlight-label { bottom: auto; top: calc(100% + 8px); }

/* Footer: status and controls stay small and out of the way. */
.voice-footer { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 18px); display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 6; padding: 0 16px; }
#setup-controls { width: min(360px, 100%); margin: 0; }
#voice-state { font-size: 12.5px; color: #62775a; max-width: 360px; margin: 0; min-height: 18px; }
#voice-state:empty { display: block; }
.voice-controls { display: flex; gap: 10px; justify-content: center; }
.voice-controls button { padding: 10px 18px; min-height: 40px; font-size: 13px; background: rgba(255,255,255,.75); color: #2b5038; border: 1px solid #d3dccb; backdrop-filter: blur(6px); }
.voice-controls button:hover:not(:disabled) { background: #fff; }
.voice-controls #finish { background: #2a503b; color: #fff; border-color: #2a503b; }
.voice-controls #finish:hover:not(:disabled) { background: #1d402e; }

@keyframes orb-breathe { 0%, 100% { filter: saturate(1) brightness(1); } 50% { filter: saturate(1.08) brightness(1.04); } }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes control-dot { 0% { box-shadow: 0 0 0 0 rgba(159,224,174,.7); } 100% { box-shadow: 0 0 0 9px rgba(159,224,174,0); } }
@keyframes control-glow { 0%, 100% { filter: none; } 50% { filter: brightness(1.04); } }
@keyframes highlight-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(143,224,166,.28), 0 0 22px rgba(143,224,166,.55); } 50% { transform: scale(1.035); box-shadow: 0 0 0 8px rgba(143,224,166,.16), 0 0 30px rgba(143,224,166,.7); } }
@media (max-width: 600px) { .voice-room { --orb-zone: 112px; --foot: 104px; --frame: 9px; } .control-pill { font-size: 12px; max-width: calc(100vw - 40px); overflow: hidden; text-overflow: ellipsis; } }
@media (max-height: 640px) { .voice-room { --orb-zone: 104px; --foot: 96px; } }

/* Debug overlay: small, out of the way, never intercepts input. */
.debug-overlay { position: fixed; left: 8px; bottom: 8px; z-index: 50; margin: 0; padding: 6px 8px; max-width: calc(100vw - 16px);
  font: 10px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e8efe2; background: rgba(20, 32, 22, .72);
  border-radius: 6px; pointer-events: none; white-space: pre; overflow: hidden; }
