/* survey2.css — VARIANT B. Same primitives as survey.css, navy accent, full-screen steps. */
:root {
  --bg: #ffffff; --ink: #1a2433; --muted: #5b6b7e; --line: #e2e8f0;
  --brand: #15803d; --brand-soft: #dcfce7; --brand-tint: #f6fdf8;
  --accent: #0f4c81; --accent-soft: #eef4fb;
  --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #dc2626; --bad-soft: #fee2e2;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { min-height: 100dvh; }
.wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 90px; }

header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.logo { font-weight: 800; font-size: 17px; color: var(--brand); letter-spacing: .3px; line-height: 1.1; }
.logo small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 2px solid var(--brand); background: var(--brand); color: #fff; font-weight: 700; font-size: 16px;
  padding: 13px 20px; border-radius: 12px; cursor: pointer; font-family: inherit; transition: transform .05s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.sm { width: auto; font-size: 13px; padding: 7px 12px; border-width: 1px; border-radius: 9px; }

.datebar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.datebar button { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  font-size: 18px; cursor: pointer; color: var(--ink); }
.datebar .d { flex: 1; text-align: center; font-weight: 700; font-size: 14px; }

.gate { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; margin-top: 8vh;
  box-shadow: 0 8px 30px rgba(20, 40, 60, .08); }
.gate h1 { margin: 0 0 6px; font-size: 22px; }
.gate p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

input[type=password], input[type=text], textarea { width: 100%; font-size: 17px; padding: 12px;
  border: 2px solid var(--line); border-radius: 12px; outline: none; font-family: inherit; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--brand); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 8px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 2px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px;
  padding: 11px 16px; border-radius: 999px; cursor: pointer; user-select: none; font-family: inherit; transition: all .12s; }
.chip:active { transform: scale(.97); }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font-family: inherit; color: inherit;
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px;
  cursor: pointer; transition: border-color .12s, transform .05s; }
.card:active { transform: scale(.99); }
.card.sel { border-color: var(--brand); background: var(--brand-tint); }
.card .time { min-width: 64px; text-align: center; font-weight: 800; font-size: 15px; color: var(--accent);
  background: var(--accent-soft); border-radius: 10px; padding: 7px 4px; }
.card .who { flex: 1; min-width: 0; }
.card .who .n { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .who .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge.quote { background: var(--accent-soft); color: var(--accent); }

.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0 16px; }
.progress i { display: block; height: 100%; background: var(--brand); transition: width .25s; }

.q { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; margin-bottom: 12px; }
.q .num { font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: 1px; text-transform: uppercase; }
.q .text { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 4px 0 14px; }
.opts { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 12px; cursor: pointer; font-size: 16px; background: #fff; font-family: inherit; color: var(--ink);
  text-align: left; transition: all .12s; }
.option:active { transform: scale(.98); }
.option.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.other { margin-top: 8px; }

.nav { display: flex; gap: 10px; margin-top: 6px; }
.nav .btn { flex: 1; }

.done { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 22px; text-align: center; }
.done h2 { margin: 0 0 8px; font-size: 22px; color: var(--brand); }
.done p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.warnbox { background: var(--warn-soft); border: 1px solid #fcd34d; color: var(--warn); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; margin: 12px 0; }

/* ── VARIANT B layout ─────────────────────────────────────────────── */
.rail { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding:4px 4px 14px; margin:0 -4px; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.rail::-webkit-scrollbar { display:none; }
.rail .card.v2 { flex:0 0 min(78vw, 320px); scroll-snap-align:center; min-height:150px;
  display:flex; flex-direction:column; justify-content:center; text-align:left; gap:4px; position:relative;
  border-radius:18px; border:1.5px solid var(--line); transition:transform .12s, border-color .12s, box-shadow .12s; }
.rail .card.v2:active { transform:scale(.98); }
.rail .card.v2.sel { border-color:var(--brand); box-shadow:0 0 0 4px var(--brand-soft); }
.rail .card.v2 .time { font-size:26px; font-weight:700; color:var(--brand); letter-spacing:-.01em; }
.rail .card.v2 .n { font-size:18px; font-weight:700; color:var(--ink); line-height:1.2; }
.rail .card.v2 .a { font-size:14px; color:var(--muted); }
.rail .card.v2 .idx { position:absolute; top:10px; right:12px; font-size:11px; font-weight:700; color:#c3ccd8; letter-spacing:.08em; }
.rail .card.v2 .badge { position:absolute; top:10px; right:10px; }
.hint { margin-top:4px; font-size:13px; color:var(--muted); text-align:center; }
.datebar.v2 .d { font-weight:700; font-size:17px; }

.q.v2 { display:flex; flex-direction:column; flex:1; min-height:0; }
.q.v2 .text { font-size:clamp(22px, 6vw, 30px); font-weight:800; line-height:1.2; letter-spacing:-.015em; margin:6px 0 18px; }
.opts.v2 { display:flex; flex-direction:column; gap:10px; flex:1; min-height:0; }
.opts.v2 .option { min-height:62px; font-size:18px; font-weight:600; border-radius:16px; padding:14px 18px; text-align:left;
  display:flex; align-items:center; justify-content:space-between; }
.opts.v2 .option::after { content:"›"; font-size:24px; font-weight:700; color:#c3ccd8; margin-left:12px; transition:transform .12s, color .12s; }
.opts.v2 .option.on { border-color:var(--brand); background:var(--brand-soft); color:var(--brand-ink); }
.opts.v2 .option.on::after { color:var(--brand); transform:translateX(3px); }
.opts.v2 textarea { min-height:180px; font-size:18px; border-radius:16px; }
.opts.v2 .other input { min-height:52px; font-size:17px; border-radius:14px; }

.progress.v2 { display:flex; align-items:center; gap:10px; }
.progress.v2 .bar { flex:1; height:6px; background:var(--line); border-radius:99px; overflow:hidden; }
.progress.v2 .bar i { display:block; height:100%; background:var(--brand); border-radius:99px; transition:width .25s; }
.progress.v2 .count { font-size:12px; font-weight:700; color:var(--muted); white-space:nowrap; letter-spacing:.02em; }

.nav.v2 { margin-top:auto; padding-top:14px; display:flex; gap:10px; align-items:center; position:sticky; bottom:0;
  background:linear-gradient(to top, #fff 75%, rgba(255,255,255,0)); }
.nav.v2 .btn { min-height:58px; font-size:18px; font-weight:800; border-radius:16px; flex:1; }
.nav.v2 .btn.ghost { flex:0 0 auto; min-width:88px; font-weight:600; }

#app { display:flex; flex-direction:column; min-height:100dvh; padding-bottom:env(safe-area-inset-bottom); }
body { overscroll-behavior-y: contain; }
