:root {
  --bg: #faf6f1;
  --card: #ffffff;
  --text: #3d3530;
  --muted: #8a7f77;
  --accent: #b5776b;
  --accent-soft: #f1e3df;
  --border: #e3d8cf;
  --line: #06c755;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "Yu Gothic", sans-serif;
  line-height: 1.8;
  font-size: 16px;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 32px 16px 48px; }
.screen[hidden], [hidden] { display: none !important; }
.title { font-size: 26px; line-height: 1.4; margin: 8px 0 16px; color: var(--accent); }
.eyebrow { margin: 0; color: var(--muted); font-size: 14px; }
.lead { font-size: 17px; }
.note { color: var(--muted); font-size: 12px; text-align: center; }
.btn {
  display: block; width: 100%; margin: 24px 0 8px; padding: 16px;
  border: none; border-radius: 999px; background: var(--accent); color: #fff;
  font: inherit; font-size: 17px; font-weight: bold; text-align: center; text-decoration: none; cursor: pointer;
}
.btn-line { background: var(--line); }
.btn.is-disabled { background: #cfc6bf; cursor: default; pointer-events: none; }
.btn-text {
  display: block; margin: 16px auto 0; padding: 8px; border: none; background: none;
  color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer;
}
.progress { height: 6px; background: var(--accent-soft); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.q-count { color: var(--muted); font-size: 14px; margin: 16px 0 4px; }
.q-text { font-size: 18px; line-height: 1.6; margin: 0 0 20px; }
.options { display: flex; flex-direction: column; gap: 10px; }

.check {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  font-size: 15px; line-height: 1.6; cursor: pointer; touch-action: manipulation;
}
.check input {
  flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent);
}
.check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }

.choice {
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer;
  touch-action: manipulation;
}
.choice[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: bold; }

.card { background: var(--card); border-radius: 16px; padding: 20px; margin: 16px 0; }
.card h3 { margin: 0 0 12px; font-size: 15px; color: var(--accent); }
.card p { margin: 0; }

.scores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scores li { display: grid; grid-template-columns: 6.5em 1fr 3em; align-items: center; gap: 8px; font-size: 14px; }
.scores .bar { height: 10px; background: var(--accent-soft); border-radius: 5px; overflow: hidden; }
.scores .bar span { display: block; height: 100%; background: var(--accent); }
.scores .num { text-align: right; color: var(--muted); }
.scores li.is-top { font-weight: bold; }

.line-box { margin-top: 24px; text-align: center; }
#r-line-text { white-space: pre-line; }
