/*
  簡単診断 — the ten-question version.

  All ten questions are on one page, the way the shop asked for: a visitor can see how much
  is left before starting, which one question at a time never shows. Scoped under .cmx_diag
  so nothing here can reach into the copied theme's own styles.
*/

.cmx_diag {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px 64px;
  box-sizing: border-box;
}

.cmx_diag *,
.cmx_diag *::before,
.cmx_diag *::after { box-sizing: border-box; }

/* ── progress ─────────────────────────────────────────────────────────────── */
.cmx_diag__meter {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  padding: 14px 0 10px;
  margin-bottom: 18px;
}

.cmx_diag__bar {
  height: 5px;
  border-radius: 99px;
  background: #ececec;
  overflow: hidden;
}

.cmx_diag__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #d81f26;
  transition: width .25s ease;
}

.cmx_diag__counts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cmx_diag__counts .step { color: #d81f26; }
.cmx_diag__counts .of { color: #666; font-weight: 500; }

/* ── a question ───────────────────────────────────────────────────────────── */
.cmx_q {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cmx_q.is-answered { border-color: #f3c9cb; }

/* Highlighted only while it is the one the visitor still has to answer. */
.cmx_q.is-next {
  border-color: #d81f26;
  box-shadow: 0 0 0 3px rgba(216, 31, 38, .10);
}

.cmx_q__no {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: #d81f26;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cmx_q__text { flex: 1 1 auto; min-width: 0; }

.cmx_q__ttl {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 2px;
  color: #1a1a1a;
}

.cmx_q__sub {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  color: #7a7a7a;
}

.cmx_q__ans {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.cmx_q__ans button {
  appearance: none;
  border: 1.5px solid #d81f26;
  background: #fff;
  color: #d81f26;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.cmx_q__ans button:hover { background: #fdeced; }

.cmx_q__ans button[aria-pressed="true"] {
  background: #d81f26;
  color: #fff;
}

/* ── submit ───────────────────────────────────────────────────────────────── */
.cmx_diag__go {
  display: block;
  width: 100%;
  margin: 22px 0 12px;
  padding: 18px;
  border: 0;
  border-radius: 99px;
  background: #d81f26;
  color: #fff;
  font-family: inherit;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s ease;
}

.cmx_diag__go:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.cmx_diag__note {
  font-size: 12px;
  color: #7a7a7a;
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

/* ── result ───────────────────────────────────────────────────────────────── */
.cmx_diag__result {
  text-align: center;
  padding: 32px 20px 28px;
  border: 2px solid #d81f26;
  border-radius: 16px;
  background: #fff;
}

.cmx_diag__resultLabel {
  font-size: 15px;
  font-weight: 700;
  color: #444;
  margin: 0 0 6px;
}

.cmx_diag__pct {
  font-size: 68px;
  font-weight: 700;
  color: #d81f26;
  line-height: 1;
  letter-spacing: -.02em;
}

.cmx_diag__pct em {
  font-size: 26px;
  font-style: normal;
  margin-left: 2px;
}

.cmx_diag__gauge {
  height: 10px;
  border-radius: 99px;
  background: #f0f0f0;
  overflow: hidden;
  margin: 20px auto 18px;
  max-width: 420px;
}

.cmx_diag__gauge i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #d81f26;
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}

.cmx_diag__verdict {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin: 0 auto 22px;
  max-width: 520px;
}

/* Call and LINE side by side - two equal ways to do the same thing. */
.cmx_diag__cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cmx_diag__cta a {
  flex: 1 1 200px;
  max-width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 18px;
  border-radius: 99px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.cmx_diag__cta .tel { background: #d81f26; }
.cmx_diag__cta .line { background: #06c755; }

.cmx_diag__again {
  margin-top: 18px;
  background: none;
  border: 0;
  color: #666;
  font-family: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* ── phones ───────────────────────────────────────────────────────────────── */
@media screen and (max-width: 600px) {
  .cmx_diag { padding: 0 12px 48px; }

  /* The answer buttons drop under the question rather than squeezing it to two words. */
  .cmx_q {
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px 14px;
  }

  .cmx_q__text { flex: 1 1 calc(100% - 42px); }

  .cmx_q__ans {
    flex: 1 1 100%;
    justify-content: stretch;
  }

  .cmx_q__ans button {
    flex: 1 1 50%;
    padding: 11px 0;
  }

  .cmx_q__ttl { font-size: 15px; }
  .cmx_diag__pct { font-size: 56px; }
  .cmx_diag__go { font-size: 19px; padding: 16px; }
}
