/* Respondent experience. One question on stage at a time, calm water palette. */
:root {
  --bg1: #f3f7f8; --bg2: #e4eef1; --paper: #ffffff; --ink: #0e2531; --soft: #5a6f7a; --line: #d5e2e7;
  --aqua: #0a6c80; --aqua-deep: #07495a; --wash: #d9edf2; --water: #8fd0de; --coral: #e2603f;
  --shadow: 0 1px 2px rgba(14,37,49,.05), 0 12px 32px rgba(14,37,49,.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: linear-gradient(180deg, var(--bg1), var(--bg2)) fixed; font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app { max-width: 560px; margin: 0 auto; height: 100dvh; display: flex; flex-direction: column; }

/* ---------- illustrations ---------- */
.art-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.a-l, .a-t, .a-c, .a-h { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.a-l { stroke: var(--ink); stroke-width: 2.6; }
.a-t { stroke: #9db4bd; stroke-width: 2; }
.a-c { stroke: var(--aqua); stroke-width: 3.2; }
.a-h { stroke: var(--coral); stroke-width: 3.2; }
.a-f { fill: var(--wash); }
.a-p { fill: var(--paper); }
.a-w { fill: var(--water); }
.a-wf { fill: var(--aqua); }
.a-dash { stroke-dasharray: 3 7; }
.a-drip { animation: drip 1.8s ease-in infinite; }
.a-drip2 { animation: drip 1.8s ease-in .9s infinite; }
.a-bob { animation: bob 3s ease-in-out infinite; }
.a-flow { stroke-dasharray: 8 8; animation: flow 1.2s linear infinite; }
.a-heat { animation: heat 1.6s ease-in-out infinite; }
.a-pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.6s ease-in-out infinite; }
.a-spin { transform-box: fill-box; transform-origin: center; animation: spin 5s linear infinite; }
.a-eq { animation: heat 1.2s ease-in-out infinite; }
@keyframes drip { 0% { transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(22px); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes flow { to { stroke-dashoffset: -32; } }
@keyframes heat { 50% { opacity: .35; } }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .7; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .art-svg * { animation: none !important; } .stage-in { animation: none !important; } }

/* ---------- welcome ---------- */
.welcome { flex: 1; overflow-y: auto; padding: 22px 24px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.hero { height: 150px; margin: 6px auto 0; width: min(280px, 80%); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--aqua); }
.welcome h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; margin: 10px 0 10px; }
.welcome .lead { color: var(--soft); margin: 0; font-size: 16px; }
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 4px; }
.promise { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; line-height: 1.25; }
.promise b { display: block; font-family: var(--serif); font-size: 17px; white-space: nowrap; }
.promise span { font-size: 12px; color: var(--soft); }
.field-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); margin: 18px 0 6px; }
.select { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px 14px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--soft); margin: 16px 0; }
.consent input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--aqua); }
details.fine { font-size: 13px; color: var(--soft); margin-bottom: 14px; }
details.fine summary { color: var(--aqua); font-weight: 600; cursor: pointer; }
.cta { width: 100%; border: 0; border-radius: 16px; padding: 16px; font-weight: 700; font-size: 17px; color: #fff; background: linear-gradient(180deg, var(--aqua), var(--aqua-deep)); box-shadow: 0 10px 24px rgba(10,108,128,.28); }
.cta:disabled { opacity: .45; box-shadow: none; }
.quiet { width: 100%; margin-top: 10px; border: 1.5px solid var(--line); background: var(--paper); border-radius: 16px; padding: 13px; font-weight: 600; font-size: 15px; color: var(--aqua-deep); }
.quiet:disabled { opacity: .45; }
.voicepill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 7px 12px 7px 10px; font-size: 12px; font-weight: 700; color: var(--soft); white-space: nowrap; }
.voicepill svg { width: 16px; height: 16px; }
.voicepill .slash { display: block; } .voicepill .wave { display: none; }
.voicepill.on { color: var(--aqua); border-color: var(--aqua); background: var(--wash); }
.voicepill.on .slash { display: none; } .voicepill.on .wave { display: block; }
.note { font-size: 13px; color: var(--soft); min-height: 18px; margin-top: 10px; text-align: center; }

/* ---------- stage ---------- */
.top { padding: 14px 20px 6px; }
.top .row { display: flex; align-items: center; gap: 10px; }
.top .where { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--aqua); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .meta { display: flex; align-items: baseline; gap: 10px; margin-top: 7px; }
.top .left { font-size: 12px; color: var(--soft); white-space: nowrap; }
.backbtn { border: 0; background: none; color: var(--soft); font-weight: 700; font-size: 13px; padding: 6px 6px 6px 0; white-space: nowrap; }
.langsel { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 7px 8px; font-size: 12px; font-weight: 700; color: var(--soft); max-width: 96px; }
.explain { display: block; margin: -6px auto 14px; border: 0; background: none; color: var(--aqua); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tog { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--soft); padding: 0; }
.tog svg { width: 18px; height: 18px; }
.tog.on { color: var(--aqua); border-color: var(--aqua); background: var(--wash); }
.bar { height: 4px; border-radius: 99px; background: #cfdde2; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--water), var(--aqua)); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }

.scroll { flex: 1; overflow-y: auto; padding: 4px 20px 16px; }
.stage-in { animation: stageIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes stageIn { from { opacity: 0; transform: translateY(14px); } }
.art { height: 128px; width: 190px; margin: 0 auto 2px; }
.caption { min-height: 22px; font-size: 14px; color: var(--soft); text-align: center; margin: 0 6px 8px; }
.caption.long { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); }
.stem { font-size: 14px; color: var(--soft); text-align: center; margin: 0 8px 4px; }
.question { font-family: var(--serif); font-size: 24px; line-height: 1.22; font-weight: 600; letter-spacing: -.005em; text-align: center; margin: 0 4px 6px; text-wrap: balance; }
.hint { font-size: 13px; color: var(--soft); text-align: center; margin: 0 0 14px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 12px; }
.dots i { width: 22px; height: 4px; border-radius: 99px; background: #cfdde2; }
.dots i.done { background: var(--water); } .dots i.now { background: var(--aqua); }

.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt { text-align: left; width: 100%; background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; font-weight: 600; font-size: 16px; box-shadow: 0 1px 2px rgba(14,37,49,.04); transition: transform .12s ease, border-color .12s ease, background .12s ease; display: flex; align-items: center; gap: 12px; }
.opt:active { transform: scale(.985); }
.opt .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #b9cbd2; display: grid; place-items: center; }
.opt.sq .mark { border-radius: 7px; }
.opt.on { border-color: var(--aqua); background: var(--wash); }
.opt.on .mark { background: var(--aqua); border-color: var(--aqua); }
.opt.on .mark::after { content: ""; width: 10px; height: 6px; border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.opts.two .opt { justify-content: center; text-align: center; padding: 18px 10px; }
.opts.two .opt .mark { display: none; }
.scale { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.scale .opt { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 14px; }
.scale .opt .mark { display: none; }
.go { margin-top: 12px; }
.opentext { width: 100%; min-height: 96px; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; background: var(--paper); resize: vertical; outline: none; }
.opentext:focus { border-color: var(--aqua); }

/* ---------- dock ---------- */
.dock { padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(228,238,241,0), var(--bg2) 34%); }
.said { font-size: 13px; color: var(--soft); text-align: center; min-height: 20px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.said b { color: var(--ink); font-weight: 600; }
.voice { display: flex; align-items: center; gap: 14px; }
.orb { position: relative; flex: none; width: 62px; height: 62px; border-radius: 50%; border: 0; color: #fff; background: linear-gradient(180deg, var(--aqua), var(--aqua-deep)); display: grid; place-items: center; box-shadow: 0 10px 22px rgba(10,108,128,.3); padding: 0; }
.orb svg { width: 26px; height: 26px; position: relative; }
.orb::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--aqua); opacity: 0; transform: scale(var(--lvl, 1)); transition: transform .09s linear; }
.orb.live { background: linear-gradient(180deg, #ee7a5b, var(--coral)); box-shadow: 0 10px 22px rgba(226,96,63,.35); }
.orb.live::before { opacity: .55; border-color: var(--coral); }
.orb.speaking { background: linear-gradient(180deg, #7fb6c2, #5d9aa8); box-shadow: none; }
.orb.speaking::before { opacity: .5; animation: ring 1.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .5; } to { transform: scale(1.35); opacity: 0; } }
.status { flex: 1; min-width: 0; font-size: 14px; color: var(--soft); }
.status b { display: block; color: var(--ink); font-size: 15px; }
.typerow { display: flex; gap: 8px; margin-top: 10px; }
.typerow input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--paper); outline: none; }
.typerow input:focus { border-color: var(--aqua); }
.typerow button { border: 0; border-radius: 14px; padding: 0 18px; font-weight: 700; color: #fff; background: var(--aqua); }

/* ---------- finish ---------- */
.finish { flex: 1; overflow-y: auto; padding: 26px 24px calc(26px + env(safe-area-inset-bottom)); text-align: center; }
.finish h1 { font-family: var(--serif); font-size: 28px; margin: 6px 0 8px; }
.finish p { color: var(--soft); margin: 0 0 18px; }
.cmp { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.cmp h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 4px; }
.cmp .sub { font-size: 13px; color: var(--soft); margin-bottom: 12px; }
.cmp .r { margin-top: 12px; font-size: 14px; }
.cmp .r .t { display: flex; justify-content: space-between; gap: 10px; }
.cmp .r .t b { font-variant-numeric: tabular-nums; }
.cmp .track { height: 8px; border-radius: 99px; background: #e4eef1; overflow: hidden; margin-top: 5px; }
.cmp .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--water), var(--aqua)); border-radius: 99px; width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.cmp .you { font-size: 12px; color: var(--aqua); margin-top: 3px; font-weight: 600; }
