/* 口コミアンケート — 落ち着いた和のトーン。店頭QRからスマホで開く前提のモバイルファースト。 */

:root {
  --bg: #faf8f4;          /* 生成り */
  --surface: #ffffff;
  --ink: #2b2723;         /* 墨 */
  --ink-soft: #6b635a;
  --ink-faint: #9c948a;
  --line: #e6e0d6;
  --accent: #3f5b70;      /* 藍鼠 */
  --accent-soft: #eef2f5;
  --accent-ink: #2c4152;
  --ok: #4a7c59;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 39, 35, .04), 0 8px 24px rgba(43, 39, 35, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

body { padding: 0 0 64px; }

/* ---------- ヘッダー ---------- */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header__store { font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.header__sub { font-size: 11px; color: var(--ink-faint); font-weight: 400; letter-spacing: .08em; }

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  min-height: 32px;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------- レイアウト ---------- */
.wrap { max-width: 620px; margin: 0 auto; padding: 0 20px; }

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 0 6px;
}
.steps span {
  width: 28px; height: 3px; border-radius: 2px;
  background: var(--line);
  transition: background .25s;
}
.steps span.on { background: var(--accent); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  margin-top: 18px;
}

h1 { font-size: 21px; line-height: 1.5; margin: 0 0 12px; font-weight: 600; letter-spacing: .01em; }
h2 { font-size: 17px; line-height: 1.6; margin: 0 0 10px; font-weight: 600; }
p  { margin: 0 0 14px; color: var(--ink-soft); font-size: 14.5px; }
p.lead { color: var(--ink); }
.muted { color: var(--ink-faint); font-size: 12.5px; line-height: 1.7; }

/* ---------- 設問 ---------- */
.q { padding: 22px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 4px; }
.q__label { font-size: 15.5px; font-weight: 600; margin: 0 0 4px; line-height: 1.6; }
.q__hint { font-size: 12px; color: var(--ink-faint); margin: 0 0 12px; }

.opts { display: flex; flex-direction: column; gap: 8px; }

.opt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s;
  min-height: 48px;
}
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin: 5px 0 0; accent-color: var(--accent); flex: none; width: 17px; height: 17px; }
.opt span { font-size: 14.5px; line-height: 1.6; }

textarea {
  width: 100%;
  min-height: 100px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
}
textarea:focus, .opt:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea::placeholder { color: var(--ink-faint); }
textarea.opt-other { min-height: 56px; margin: -2px 0 4px; font-size: 14.5px; }

/* ---------- ボタン ---------- */
.btn {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: 16px 20px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-height: 54px;
  transition: opacity .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--line { background: #06c755; color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 14.5px;
  min-height: 48px;
  padding: 12px 20px;
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }

.btn-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.textlink {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13.5px;
  padding: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.textlink:hover { color: var(--ink); }

/* ---------- 生成結果 ---------- */
.review {
  width: 100%;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink);
  background: #fdfcfa;
  resize: vertical;
}
.review:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.notice {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--accent-ink);
  margin: 14px 0 0;
}

/* ---------- 手順 ---------- */
.howto { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: s; }
.howto li {
  counter-increment: s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.65;
}
.howto li::before {
  content: counter(s);
  flex: none;
  width: 23px; height: 23px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

/* ---------- 完了 ---------- */
.done-mark {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ok);
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.done-mark svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.center { text-align: center; }

/* ---------- 読み込み中 ---------- */
.loading { text-align: center; padding: 44px 0; }
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.err {
  background: #fdf1ef;
  border: 1px solid #f0d5d0;
  color: #8a3428;
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 13.5px;
  margin: 0 0 14px;
}

[hidden] { display: none !important; }

.footnote {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-faint);
  margin: 26px 0 0;
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
