/* 髪が育つ生活診断 — 値はすべて DESIGN.md（色・書体は LP と同じ） */
:root {
  --surface: #F3F6F9;
  --text: #18273A;
  --muted: #5B6476;
  --line: #DCE3EC;
  --navy: #18273A;
  --pink: #C8136F;
  --pink-on-navy: #FF9CCB;
  --line-green: #06C755;

  --f-gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --f-num: "Poppins", var(--f-gothic);

  --fs1: 44px;
  --fs2: 28px;
  --fs3: 21px;
  --fs4: 16px;
  --fs5: 13px;

  --gap-in: 12px;
  --gap-between: 28px;
  --gap-section: 56px;
  --gutter: 20px;

  --r-s: 4px;
  --r-m: 10px;
}
@media (min-width: 900px) {
  :root { --fs1: 64px; --fs2: 36px; --fs3: 24px; --fs4: 17px; --fs5: 13.6px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #F7F7F5;
  color: var(--text);
  font-family: var(--f-gothic);
  font-size: var(--fs4);
  line-height: 1.85;
  line-break: strict;
  word-break: keep-all;      /* 文節の区切り（wrap.js の <wbr>）でだけ折る */
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
/* LP と同じ漆喰の壁を1枚。iOS でも動くように固定の疑似要素で敷く */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #F7F7F5 url(img/bg-plaster.webp) center / cover no-repeat;
  pointer-events: none;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
p { text-wrap: pretty; }
.u { display: inline-block; text-indent: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
h1, h2, .start__title, .r__type, .q__text, .score__num, .fact__num, .closing__word { font-feature-settings: "palt"; }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px var(--gutter) calc(48px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100svh;
}
/* 紙面ごと透かさない。中身だけ .45 から戻す（地が透けて点滅しないように） */
.screen.is-in { animation: rise .14s ease-out both; }
@keyframes rise { from { opacity: .45; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 文字の段階 */
.by { font-size: var(--fs5); font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.h3 { font-size: var(--fs3); font-weight: 900; line-height: 1.4; }
.note { margin-top: var(--gap-between); font-size: var(--fs5); color: var(--muted); line-height: 1.7; }

/* ボタン */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 60px; padding: 12px 20px;
  border: 0; border-radius: var(--r-m); cursor: pointer;
  font-weight: 700; font-size: var(--fs4); letter-spacing: .04em; line-height: 1.3;
}
.btn--main { background: var(--navy); color: #fff; }
.btn--main::after, .cta::after {
  content: ""; width: 9px; height: 9px; flex: none;
  border-top: 2px solid #fff; border-right: 2px solid #fff; transform: rotate(45deg);
}
.cta {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 12px 20px;
  border-radius: var(--r-m); background: var(--line-green); color: #fff;
  font-weight: 700; font-size: var(--fs4); line-height: 1.3; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
}
.cta:focus-visible { outline-color: #fff; }

/* ===== はじめ ===== */
.start__title { margin-top: var(--gap-in); font-weight: 900; line-height: 1.15; }
.start__pre { display: block; font-size: var(--fs3); line-height: 1.4; }
.start__big { display: block; font-size: var(--fs1); letter-spacing: -.02em; }
.start__big em { font-style: normal; color: var(--pink); }
/* 説明とイラストを1組にし、イラストの足元を札の列の上端に着ける（LP の「写真の脚元に札」と同じ組み方） */
.start__visual {
  margin-top: var(--gap-between);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}
.start__lead { align-self: start; line-height: 1.75; }
.start__ill { align-self: end; width: 96px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: var(--gap-between); }
.fact {
  display: block;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-s);
  padding: 8px 6px 7px;
  text-align: center;
  white-space: nowrap;
}
.fact__label { display: block; font-size: var(--fs5); font-weight: 700; line-height: 1.3; }
.fact__num { font-family: var(--f-num); font-weight: 800; font-size: var(--fs2); line-height: 1.1; letter-spacing: -.03em; color: var(--pink-on-navy); }
.fact__unit { font-size: var(--fs5); font-weight: 700; margin: 0 1px; }

.check { margin-top: var(--gap-between); padding-top: var(--gap-in); border-top: 1px dashed var(--line); }
.check__title { font-size: var(--fs5); font-weight: 700; color: var(--muted); }
.check__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.check__btn { border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); padding: 8px 10px; font-size: var(--fs5); cursor: pointer; min-height: 44px; }

/* ===== 質問 ===== */
.progress { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.progress__text { font-family: var(--f-num); font-weight: 800; font-size: var(--fs3); line-height: 1; }
.progress__all { font-size: var(--fs5); color: var(--muted); }
.progress__bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress__bar span { display: block; height: 100%; background: var(--navy); transition: width .25s ease-out; }
.q__label {
  display: inline-block;
  margin-top: var(--gap-between);
  font-size: var(--fs5); font-weight: 700; letter-spacing: .08em;
  color: #fff; background: var(--navy); padding: 2px 10px; border-radius: var(--r-s);
}
.q__text { margin-top: var(--gap-in); font-size: var(--fs3); font-weight: 900; line-height: 1.5; outline: none; }
.options { display: grid; gap: 10px; margin-top: var(--gap-between); }
.opt {
  display: flex; align-items: center;
  width: 100%; min-height: 60px; padding: 12px 16px;
  text-align: left; line-height: 1.5; font-weight: 700;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.opt:hover { border-color: var(--navy); }
.opt.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.back {
  display: block; margin: var(--gap-between) auto 0; min-height: 44px; padding: 8px 12px;
  border: 0; background: none; color: var(--muted); font-size: var(--fs5); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ===== 結果 ===== */
/* 上の1画面は、スクショして送る1枚のカルテ（サロンのカウンセリングシートから）。だから箱にする */
.karte {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 16px 20px 14px;
}
.karte__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-size: var(--fs5); font-weight: 700; color: var(--muted);
}
.karte__date { font-family: var(--f-num); font-weight: 800; letter-spacing: .02em; }
.r__worry { margin-top: var(--gap-in); font-size: var(--fs5); font-weight: 700; color: var(--muted); }
.r__type { margin-top: 2px; font-size: var(--fs2); font-weight: 900; line-height: 1.3; outline: none; }
.r__sub { margin-top: 4px; font-weight: 700; line-height: 1.6; }
.score {
  margin-top: var(--gap-in);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}
.score__left { display: grid; gap: 2px; }
.score__num { font-family: var(--f-num); font-weight: 800; font-size: var(--fs1); line-height: 1; letter-spacing: -.03em; color: var(--navy); }
.score__max { font-size: var(--fs4); margin-left: 2px; letter-spacing: 0; color: var(--muted); }
.score__label { font-size: var(--fs5); font-weight: 700; color: var(--muted); line-height: 1.4; }
.score__num { display: block; }
.score__band { font-size: var(--fs5); font-weight: 700; line-height: 1.6; padding-bottom: 2px; }
.areas { margin-top: var(--gap-in); display: grid; gap: 8px; }
.area {
  display: grid;
  grid-template-columns: 7.2em minmax(0, 1fr) 6.4em;
  align-items: center;
  gap: 10px;
  font-size: var(--fs5);
  font-weight: 700;
}
.area__bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.area__bar span { display: block; height: 100%; background: var(--navy); border-radius: 4px; }
.area__level { color: var(--muted); }
.area.is-type .area__name, .area.is-type .area__level { color: var(--pink); }
.area.is-type .area__bar span { background: var(--pink); }
.karte__by { margin-top: var(--gap-in); padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs5); font-weight: 700; color: var(--muted); }
.shot__hint { margin-top: var(--gap-in); font-size: var(--fs4); font-weight: 700; color: var(--navy); line-height: 1.6; }
.shot__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: var(--fs4); font-weight: 700; color: var(--navy);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.shot__link::after {
  content: ""; width: 7px; height: 7px; flex: none; margin-top: -3px;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg);
}

.r__body { margin-top: var(--gap-section); }
.r__explain { font-size: var(--fs4); }
.r__body .h3 { margin-top: var(--gap-between); }
.todo, .steps { margin-top: var(--gap-in); display: grid; gap: 14px; }
.todo__item, .steps__item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.todo__no, .steps__no { font-family: var(--f-num); font-weight: 800; font-size: var(--fs2); line-height: 1; color: var(--pink); text-align: left; }
.todo__text b { display: block; font-weight: 900; line-height: 1.5; }
.todo__text span { display: block; color: var(--muted); font-size: var(--fs5); line-height: 1.7; }
.r__next { margin-top: var(--gap-between); padding-top: var(--gap-in); border-top: 1px solid var(--line); }

/* 紺の帯は画面の端から端まで。中身は本文の列のまま */
html, body { overflow-x: clip; }
.band {
  margin: var(--gap-section) calc(50% - 50vw) 0;
  padding: var(--gap-section) calc(50vw - 50%);
  background: var(--navy); color: #fff;
}
.closing { display: flex; align-items: center; gap: 12px; }
.closing__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.closing__word { font-size: var(--fs4); font-weight: 700; line-height: 1.6; }
.closing__by { margin-top: 4px; font-size: var(--fs5); font-weight: 700; }
.band__head { margin-top: var(--gap-between); font-size: var(--fs3); font-weight: 900; line-height: 1.5; color: var(--pink-on-navy); }
.band__body { margin-top: var(--gap-in); }
.steps { margin-top: var(--gap-between); }
.steps__no { color: var(--pink-on-navy); }
.steps__text { font-weight: 700; line-height: 1.5; padding-top: 4px; }
.band .cta { margin-top: var(--gap-between); }
.again {
  display: block; width: 100%; margin-top: var(--gap-between); min-height: 56px;
  background: #fff; border: 1px solid var(--navy); border-radius: var(--r-m);
  font-weight: 700; cursor: pointer;
}

@media (min-width: 900px) {
  .start__visual { grid-template-columns: minmax(0, 1fr) 132px; }
  .start__ill { width: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen.is-in { animation: none; }
  .progress__bar span, .opt { transition: none; }
}
