/**
 * @file
 * メインCSSファイル
 */

/* global */
body {
  font-family: "shippori-mincho", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  color: #1b395e
}

/* component */
.c-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #FFF;
  color: #000;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s ease-in-out;
}
.c-skip-link:focus {
  top: 10px;
  z-index: 302;
}
.c-inner {
  width: 100%;
  padding: 0 clamp(var(--size-16), 5.20vw, var(--size-100));
}

/* page */
main {
  padding: 64px 0;
  background: url(../img/bg.webp) no-repeat center center / cover;
  min-height: 100vh;
}
#diagnosis-app {
  max-width: 600px;
  margin: 0 auto;
  padding: 64px 32px;
  border-radius: 16px;
  box-shadow: 0 6px 30px 0 rgba(80, 150, 220,.10);
}
#progress {
  font-weight: 500;
  letter-spacing: .03em;
  text-align: right;
  margin-bottom: 20px;
  font-size: 1em;
}
h2#progress {
  text-align: center;
  font-size: 32px;
}
#question-box {
  margin-bottom: 14px;
}
#question {
  margin: 0 0 30px 0;
  font-size: 1.26em;
  line-height: 1.44;
  font-weight: 500;
  text-align: left;
}
#answerA, #answerB {
  display: block;
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 18px;
  font-size: 14px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 6px 0 rgba(80,150,220,0.04);
  font-weight: 600;
  letter-spacing: .03em;
  color: #1b395e;
  background: #fff;
  transition: all 0.3s ease;
  cursor: pointer;
}
/* PCなどhover可能なデバイスのみに適用 */
@media (min-width: 769px) {
  #answerA:hover:not(:disabled), #answerB:hover:not(:disabled) {
    background: #f0f5f9;
    color: #1b395e;
    box-shadow: 0 4px 16px 0 rgba(80,150,220,0.10);
  }
}
#answerA:disabled, #answerB:disabled {
  opacity: .65;
  cursor: default;
}
/* タッチデバイスでのタップハイライトを無効化 */
#answerA, #answerB {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
/* タップ時のフィードバックなし */
#answerA:active, #answerB:active {
  background: #fff !important;
  box-shadow: 0 2px 6px 0 rgba(80,150,220,0.04) !important;
}
#prev-button {
  display: block;
  width: 100%;
  margin-top: 24px;
  font-size: 14px;
  text-align: center;
  text-decoration: underline;
  color: #2579c6;
  cursor: pointer;
}

/* 診断開始画面 */
#start-screen {
  text-align: center;
  padding: 20px 0;
  height: 100%;
}
.start-logo {
  max-width: 64px;
  margin-bottom: 48px;
}
.start-title {
  position: relative;
  font-size: 28px;
  letter-spacing: 0.15em;
  font-weight: 500;
  line-height: 1.4;
  width: fit-content;
  margin: 0 auto 24px;
}
.start-title::before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: #ccc;
}
.start-subtitle {
  font-size: 16px;
  margin-bottom: 32px;
  line-height: 2;
}
.start-section {
  text-align: left;
  margin-bottom: 32px;
}
.start-section-title {
  font-size: 18px;
  font-weight: 500;
  color: #3576b3;
  margin-bottom: 12px;
}
.start-text {
  font-size: 14px;
  line-height: 1.8;
  color: #274360;
  margin-bottom: 0;
}
.footer-text {
  font-size: 10px;
}
.start-catchcopy {
  font-size: 18px;
  font-weight: 500;
  color: #3576b3;
  margin-bottom: 0;
  text-align: center;
}
.start-btn {
  display: inline-block;
  background: #94AEB5;
  color: #fff;
  font-weight: 500;
  padding: 20px 15px;
  width: 100%;
  border-radius: 100vmax;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 320px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.start-btn-text {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
}
.start-btn-text:after {
  content: '〉';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(-50%, -50%);
}
@media (hover: hover) {
  .start-btn:hover {
    background: #7a98a1;
    transform: translateY(-4px);
  }
}
.start-btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}
#result-box {
  text-align: center;
  margin: 0 auto;
}
#result-title {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 500;
  color: #1b395e;
  margin-bottom: 64px;
  letter-spacing: .05em;
}
#result-description {
  margin-top: 40px;
  line-height: 1.8;
  font-size: 14px;
  text-align: left;
}
#score-bars {
  margin: 20px auto 0;
  text-align: left;
}
#score-bars h3 {
  font-size: 18px;
  margin-bottom: 24px;
  color: #2579c6;
  font-weight: 500;
}
#score-bars > div {
  font-size: 1em;
}
#score-bars span[style*='width:2.5em'] {
  min-width: 2.5em;
}

@media (max-width: 768px) {
  #diagnosis-app {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #score-bars {
    padding: 0;
  }
  .start-title {
    font-size: 24px;
  }
  .start-subtitle {
    font-size: 14px;
  }
}

/* スコアバーUI用クラススタイル */
.score-bar-row {
  margin: 10px 0 8px;
  display: flex;
  align-items: center;
  gap: 0.8em;
}
.score-bar-label {
  display: inline-block;
  min-width: 8.6em;
  font-weight: 500;
  font-size: 16px;
  color: #335c93;
}
.score-bar-bg {
  background: #eee;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  min-width: 120px;
  width: 47%;
}
.score-bar-inner {
  height: 100%;
  border-radius: 9px 9px 9px 9px;
  transition: width .5s;
}
.score-bar-score {
  display: inline-block;
  font-size: 1em;
  color: #194c7b;
  font-weight: 500;
  flex: 1;
}
.shintega-link-wrap {
  margin: 64px auto 0;
  padding: 64px 32px 48px 32px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 6px 30px 0 rgba(80, 150, 220,.10);
  max-width: 600px;
  background: rgba(255,255,255,0.5);
}
.shintega-img {
  display: block;
  margin: 0 auto 12px auto;
  max-width: 250px;
  box-shadow: 0 2px 8px 0 rgba(80, 150, 220,.10);
}
.shintega-message {
  font-size: 1.09em;
  margin: 10px 0 18px 0;
  font-weight: 500;
  color: #285b98;
}
.shintega-btn {
  display: inline-block;
  background:  #94AEB5;
  color: #fff;
  font-weight: 500;
  padding: 20px 15px;
  width: 100%;
  border-radius: 100vmax;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.18s, color 0.18s;
  max-width: 320px;
  margin: 24px auto 0;
  transition: transform 0.3s ease, background 0.3s ease;
}
@media (hover: hover) {
  .shintega-btn:hover {
    background: #7a98a1;
    color: #fff;
    transform: translateY(-4px);
  }
}

/* 診断結果画面 */
.result-section {
  margin-bottom: 40px;
}
.result-section:first-child {
  margin-top: 0;
}
.result-section:last-child {
  margin-bottom: 0;
}
.result-section-title {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 8px;
  color: #3576b3;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.8;
}
.result-section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 1px;
  background: #3576b3;
}
.result-section-txt {
  margin-bottom: 0;
  line-height: 1.8;
  font-size: 14px;
  text-align: left;
}
.result-section-txt p {
  margin: 0 0 12px;
  line-height: 1.8;
  font-size: 14px;
}
.shintega-lead {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.shintega-copy {
  font-size: 14px;
  line-height: 1.8;
}
.result-section {
  padding: 32px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  box-shadow: 0 6px 30px 0 rgba(80, 150, 220,.10);
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .shintega-link-wrap {
    padding: 32px 16px 24px 16px;
  }
  .shintega-lead {
    font-size: 18px;
  }
  .result-section {
    padding: 24px;
  }
}