/* ===== Base ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

:root{
  --navy: #1d2c44;
  --accent: #1f3e60;          /* ボタン */
  --accentFill: #1b2a41;      /* 選択塗り */

  --bg: #ffffff;
  --text: #111827;

  --line: rgba(17, 24, 39, .18);
  --dotBorder: rgba(17,24,39,.28);

  --wrap: 980px;
}

body{
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
button{ font: inherit; }

.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* ===== Top area ===== */
.diag-top{
  background: #ffffff;
  border-bottom: 1px solid rgba(17,24,39,.10);
}
.diag-top__inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  text-align: center;
}
.diag-top__tag{
  margin: 0;
  font-weight: 900;
  letter-spacing: .08em;
  color: rgba(63, 109, 146, .85);
}

/* ===== Header title bar ===== */
.diag-header{
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.diag-header__inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  text-align: center;
}
.diag-header__title{
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff;
}

/* ===== Main ===== */
.diag-main{
  padding: 22px 0 120px; /* bottom fixed bar分 */
  background: var(--bg);
}
.diag-main__inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Questions ===== */
.q-list{ margin: 0; }
.q-item{
  padding: 22px 0 18px;
}
.q-item__q{
  margin: 0;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.q-item__num{
  min-width: 44px;
  font-weight: 900;
  color: rgba(63, 109, 146, .95);
}
.q-item__text{
  font-size: 18px;
  font-weight: 800;
  color: rgba(17, 24, 39, .85);
  line-height: 1.5;
}

.q-sep{
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* choices row */
.q-choices{
  border: 0;
  padding: 0;
  margin: 18px 0 0;
}
.q-choices__row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

/* ===== Radio (input hidden + label styled) ===== */
.q-radio{
  text-align: center;
}
.q-radio input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.q-radio label{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.q-radio__dot{
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 4px solid var(--dotBorder);
  background: transparent;
  display: inline-block;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.q-radio__label{
  font-size: 13px;
  font-weight: 800;
  color: rgba(17,24,39,.70);
  line-height: 1.25;
  text-align: center;
}

/* checked */
.q-radio input:checked + label .q-radio__dot{
  background: var(--accentFill);
  border-color: var(--accentFill);
  transform: scale(1.02);
}
.q-radio input:checked + label .q-radio__label{
  color: rgba(17,24,39,.85);
}

/* hover */
@media (hover:hover){
  .q-radio label:hover .q-radio__dot{
    border-color: rgba(17,24,39,.40);
    transform: scale(1.03);
  }
}

/* ===== CTA ===== */
.diag-cta{
  padding: 28px 0 0;
  text-align: center;
}
.diag-btn{
  width: 360px;
  max-width: 100%;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .04em;
  transition: opacity .15s ease, transform .15s ease;
}
.diag-btn:active{ transform: translateY(1px); }
.diag-btn.is-disabled,
.diag-btn:disabled{
  background: rgba(29,44,68,.20);
  color: rgba(17,24,39,.45);
  cursor: not-allowed;
}
.diag-error{
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: rgba(210, 50, 50, .90);
}

/* ===== Bottom progress fixed ===== */
.diag-progress{
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 86px;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.10);
  z-index: 20;
}
.diag-progress__inner{
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.diag-progress__pct{
  width: 64px;
  text-align: right;
  font-weight: 900;
  color: rgba(255,255,255,.95);
}
.diag-progress__bar{
  width: min(520px, 70vw);
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  overflow: hidden;
}
.diag-progress__fill{
  height: 100%;
  width: 0%;
  background: rgba(130, 175, 210, .95);
  border-radius: 999px;
  transition: width .18s ease;
}

/* ===== Result (simple) ===== */
.result-box{
  padding: 26px 0 0;
}
.result-title{
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}
.result-type{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: rgba(63, 109, 146, .95);
}
.result-lead{
  margin: 0 0 18px;
  line-height: 1.8;
  color: rgba(17,24,39,.80);
}

/* ===== Responsive ===== */
@media (max-width: 768px){
  .diag-top__inner{ padding: 16px 16px; }
  .diag-header__inner{ padding: 16px 16px; }
  .diag-header__title{ font-size: 22px; }

  .diag-main{ padding: 18px 0 120px; }
  .diag-main__inner{ padding: 0 16px; }

  .q-item{ padding: 18px 0 14px; }

  .q-item__text{
    font-size: 15px;
    line-height: 1.55;
  }

  .q-choices__row{ gap: 10px; }

  .q-radio__dot{
    width: 42px;
    height: 42px;
    border-width: 4px;
  }

  .q-radio__label{
    font-size: 12px;
  }

  .diag-progress{ height: 82px; }
  .diag-progress__pct{ width: 52px; }
  .diag-progress__bar{ width: 72vw; height: 12px; }
}
