:root {
  --bg: #fbf6ee;
  --card: rgba(255, 252, 246, 0.84);
  --line: rgba(180, 149, 87, 0.24);
  --text: #43311f;
  --muted: #84705c;
  --gold-strong: #9b7534;
  --shadow: 0 18px 45px rgba(112, 85, 38, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top left, rgba(255,255,255,.7), transparent 32%), linear-gradient(180deg, #fffdf9 0%, #fbf6ee 42%, #f7efdf 100%);
  color: var(--text);
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
}
body { padding: env(safe-area-inset-top) 0 calc(env(safe-area-inset-bottom) + 92px); }
.page-shell { position: relative; min-height: 100vh; overflow: hidden; }
.ambient { position: fixed; width: 240px; height: 240px; border-radius: 999px; filter: blur(18px); opacity: .55; pointer-events: none; }
.ambient-left { top: -70px; left: -90px; background: radial-gradient(circle, rgba(237,216,178,.9), transparent 70%); }
.ambient-right { right: -60px; top: 28%; background: radial-gradient(circle, rgba(255,244,228,.9), transparent 68%); }
.phone-frame { position: relative; z-index: 1; width: min(100%, 430px); margin: 0 auto; padding: 18px 16px 40px; }
.has-tabbar { padding-bottom: 26px; }
.hero-card, .progress-card, .question-card, .submit-card { background: var(--card); backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-card {
  padding: 28px 22px; border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(251,243,229,.9)), linear-gradient(180deg, rgba(177,138,71,.1), transparent 55%);
}
.eyebrow, .question-kicker { margin: 0 0 8px; color: var(--gold-strong); letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; font-weight: 700; }
.hero-card h1 { margin: 0; font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: clamp(2rem, 7vw, 2.7rem); line-height: 1.05; font-weight: 600; }
.hero-copy, .question-note, .submit-copy, .insight-copy { color: var(--muted); line-height: 1.75; font-size: .95rem; }
.hero-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--gold-strong); font-size: .8rem; font-weight: 600; }
.progress-card, .submit-card, .question-card { margin-top: 14px; border-radius: var(--radius-lg); padding: 18px; }
.progress-header, .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.progress-header { font-size: .9rem; color: var(--muted); }
.progress-track { margin-top: 10px; height: 9px; background: rgba(177,138,71,.12); border-radius: 999px; overflow: hidden; }
.progress-bar { width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ceb07a 0%, #ae8443 100%); transition: width .28s ease; }
.questionnaire-form { display: grid; gap: 14px; margin-top: 14px; }
.question-title { margin: 0; font-family: "Noto Serif JP", serif; font-size: 1.15rem; line-height: 1.5; font-weight: 600; }
.question-note { margin: 10px 0 0; }
.option-list, .cast-list, .voice-stack { display: grid; gap: 10px; margin-top: 18px; }
.option-chip { position: relative; display: block; }
.option-chip input { position: absolute; opacity: 0; inset: 0; }
.option-surface, .voice-card, .quick-link-tile, .metric-tile, .cast-row {
  display: flex; gap: 12px; width: 100%; padding: 15px 16px; border-radius: 18px; border: 1px solid rgba(177,138,71,.16); background: rgba(255,255,255,.84); color: var(--text);
}
.option-surface { align-items: center; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.option-chip input:checked + .option-surface { border-color: rgba(177,138,71,.62); background: linear-gradient(180deg, rgba(255,252,246,1), rgba(246,234,210,.9)); box-shadow: 0 10px 24px rgba(177,138,71,.16); transform: translateY(-1px); }
.option-marker { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(177,138,71,.5); background: rgba(255,255,255,.95); display: inline-flex; align-items: center; justify-content: center; }
.option-chip input:checked + .option-surface .option-marker::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(180deg, #cfb27d 0%, #a8803e 100%); }
.option-list-checkbox .option-marker { border-radius: 7px; }
.option-chip input:checked + .option-surface .option-marker.checkbox::after { width: 8px; height: 8px; border-radius: 3px; }
.option-text { font-size: .96rem; line-height: 1.55; }
.textarea-wrap { display: block; margin-top: 18px; }
textarea { width: 100%; resize: vertical; min-height: 128px; border: 1px solid rgba(177,138,71,.18); border-radius: 18px; padding: 15px 16px; background: rgba(255,255,255,.82); color: var(--text); font: inherit; line-height: 1.7; outline: none; }
.paired-groups { display: grid; gap: 18px; margin-top: 18px; }
.paired-group-title { margin: 0 0 10px; font-size: .95rem; font-weight: 700; color: var(--gold-strong); }
.field-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: rgba(177,138,71,.08); color: #8a5a28; font-size: .86rem; }
.submit-button { width: 100%; border: 0; border-radius: 999px; padding: 17px 20px; background: linear-gradient(135deg, #b58b44 0%, #d8bb88 48%, #9f7631 100%); color: #fffdf8; font: inherit; font-weight: 700; letter-spacing: .04em; box-shadow: 0 16px 32px rgba(177,138,71,.28); }
.submit-message { min-height: 24px; margin: 14px 4px 0; color: var(--muted); text-align: center; line-height: 1.6; font-size: .9rem; }
.question-card.is-invalid { border-color: rgba(170,101,58,.4); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.pill-gold { background: rgba(177,138,71,.14); color: var(--gold-strong); }
.metric-grid, .quick-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.metric-tile, .quick-link-tile { flex-direction: column; text-decoration: none; }
.accent-positive { background: linear-gradient(180deg, rgba(250,245,234,1), rgba(241,235,216,.95)); }
.accent-soft { background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(249,243,231,.95)); }
.metric-label { display: block; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.metric-value { display: block; margin-top: 8px; font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: 2.1rem; line-height: 1; }
.metric-note { display: block; margin-top: 6px; color: var(--gold-strong); font-size: .8rem; }
.quick-link-tile strong, .voice-card strong { font-size: 1rem; }
.quick-link-tile span, .voice-card p, .cast-row p { color: var(--muted); line-height: 1.6; font-size: .86rem; margin: 6px 0 0; }
.muted-tile { opacity: .82; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.lux-tag { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid rgba(177,138,71,.16); color: var(--text); font-size: .88rem; }
.lux-tag.strong { background: linear-gradient(180deg, rgba(251,245,233,1), rgba(241,232,212,.96)); }
.coach-panel { margin-top: 18px; padding: 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(247,239,226,.92)); border: 1px solid rgba(177,138,71,.14); }
.coach-panel p { margin: 0; color: var(--muted); line-height: 1.85; }
.coach-panel p + p { margin-top: 12px; }
.cast-row { align-items: center; justify-content: space-between; gap: 14px; }
.cast-row strong { display: block; font-size: .98rem; }
.soft-alerts { margin: 18px 0 0; padding-left: 18px; color: var(--muted); }
.soft-alerts li + li { margin-top: 10px; }
.soft-alerts li { line-height: 1.8; }
.tabbar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; width: min(calc(100% - 24px), 420px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; border-radius: 24px; background: rgba(255,252,246,.92); backdrop-filter: blur(18px); border: 1px solid rgba(177,138,71,.18); box-shadow: 0 18px 36px rgba(112,85,38,.14);
}
.tabbar-item {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 16px; color: var(--muted); text-decoration: none; font-size: .84rem; font-weight: 700;
}
.tabbar-item.is-active { background: linear-gradient(180deg, rgba(247,238,221,1), rgba(236,221,192,.94)); color: var(--gold-strong); }
@media (min-width: 431px) { .phone-frame { padding-top: 26px; } }
