/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
input, button, textarea, select { font: inherit; }
img { max-width: 100%; vertical-align: middle; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* メインカラー：ミント/ティール系 */
  --mint:        #6eccc6;
  --mint-dark:   #4db8b0;
  --mint-light:  #eaf9f8;
  --mint-mid:    #c2edea;
  --mint-border: #9ddbd7;
  --mint-btn:    #5bc4bc;   /* ボタン */

  /* 背景・テキスト */
  --bg:          #f9fffe;
  --white:       #ffffff;
  --text:        #333333;
  --text-sub:    #888888;
  --text-light:  #aaaaaa;

  /* 影 */
  --shadow-sm:   0 2px 10px rgba(110,204,198,.12);
  --shadow-md:   0 4px 20px rgba(110,204,198,.2);
  --shadow-btn:  0 4px 12px rgba(91,196,188,.35);

  /* 角丸 */
  --r-sm:  8px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-full: 50px;

  /* フォント */
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN",
          "Hiragino Sans", Meiryo, sans-serif;
}

/* ============================================================
   BASE
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   HEADER
   ============================================================ */
.p-header {
  background: var(--white);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 16px 14px;
  position: relative;
  box-shadow: var(--shadow-sm);
  border-bottom: 2px solid var(--mint-border);
}

/* 両脇キャラ */
.p-header__chara {
  position: absolute;
  bottom: 0;
}
.p-header__chara--left  { left: 8px; }
.p-header__chara--right { right: 8px; }

/* 中央タイトルブロック */
.p-header__center {
  text-align: center;
  line-height: 1.2;
}

/* 「あなたのタイプは?!」バッジ */
.p-header__badge {
  display: inline-block;
  background: var(--mint-btn);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 16px;
  border-radius: var(--r-full);
  margin-bottom: 6px;
}

/* タイトル */
.p-header__title {
  font-size: clamp(20px, 5.5vw, 26px);
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--text);
}
.p-header__title-sub {
  color: var(--mint-dark);
  font-size: .8em;
  display: block;
  font-weight: 700;
  letter-spacing: .1em;
}
.p-header__title-main {
  color: var(--text);
}

/* ============================================================
   MAIN
   ============================================================ */
.l-main { padding-bottom: 40px; }

/* ============================================================
   STEPPER
   ============================================================ */
.p-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 8px;
  gap: 0;
}

.p-stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.p-stepper__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #d8d8d8;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #c0c0c0;
  transition: all .3s;
}

.p-stepper__label {
  font-size: 9px;
  font-weight: 600;
  color: #c0c0c0;
  letter-spacing: .06em;
  transition: color .3s;
}

/* 接続線 */
.p-stepper__line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: #e0e0e0;
  margin-bottom: 14px;
  transition: background .4s;
}

/* アクティブ */
.p-stepper__item.is-active .p-stepper__dot {
  border-color: var(--mint-btn);
  color: var(--mint-btn);
  background: var(--mint-light);
  box-shadow: 0 0 0 4px rgba(91,196,188,.15);
}
.p-stepper__item.is-active .p-stepper__label {
  color: var(--mint-btn);
}

/* 完了 */
.p-stepper__item.is-done .p-stepper__dot {
  background: var(--mint-btn);
  border-color: var(--mint-btn);
  color: var(--white);
}
.p-stepper__item.is-done .p-stepper__label {
  color: var(--mint-btn);
}
.p-stepper__item.is-done + .p-stepper__line {
  background: var(--mint-btn);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.p-progress {
  height: 4px;
  background: var(--mint-light);
  border-radius: 99px;
  margin: 0 20px 20px;
  overflow: hidden;
}
.p-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mint) 0%, var(--mint-dark) 100%);
  border-radius: 99px;
  width: 0%;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   QUIZ AREA
   ============================================================ */
.p-quiz-area {
  padding: 0 16px 16px;
}

/* ページ */
.p-quiz-page { display: none; }
.p-quiz-page.is-active {
  display: block;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ページラベル（Q1〜8/Q24） */
.p-quiz-page__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: .08em;
  text-align: center;
  margin-bottom: 14px;
}

/* ── 質問アイテム ── */
.p-quiz-item {
  padding: 20px 0 8px;
  border-bottom: 1px dashed var(--mint-mid);
}
.p-quiz-item:last-child { border-bottom: none; }

/* 「 — Q1 — 」番号 */
.p-quiz-item__num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.p-quiz-item__num-line {
  flex: 1;
  max-width: 50px;
  height: 1px;
  background: var(--mint-border);
}
.p-quiz-item__num-text {
  font-size: 15px;
  font-weight: 900;
  color: var(--mint-dark);
  letter-spacing: .1em;
  font-style: italic;
}

/* 質問テキスト */
.p-quiz-item__text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 14px;
  padding: 0 4px;
}

/* 回答ボタン群 */
.p-quiz-item__answers {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 4px;
}
.p-quiz-item__answer {
  flex: 1;
  position: relative;
}
.p-quiz-item__answer input[type="radio"] { display: none; }

/* ボタン本体 */
.p-quiz-item__answer-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 8px 6px;
  border-radius: var(--r-full);
  border: 2px solid var(--mint-border);
  background: var(--white);
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
}
.p-quiz-item__answer-label:hover {
  background: var(--mint-light);
  border-color: var(--mint-btn);
}

/* 選択済み */
.p-quiz-item__answer input:checked + .p-quiz-item__answer-label {
  background: var(--mint-btn);
  color: var(--white);
  border-color: var(--mint-btn);
  box-shadow: var(--shadow-btn);
  transform: scale(1.04);
}

/* 回答済みカードのスタイル */
.p-quiz-item.is-answered {
  opacity: .85;
}

/* ============================================================
   NEXT BUTTON
   ============================================================ */
.p-next-wrap {
  padding: 24px 0 36px;
  text-align: center;
}
.p-next-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mint-btn);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 0 56px;
  height: 58px;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all .22s ease;
}
.p-next-btn:hover {
  background: var(--mint-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91,196,188,.45);
}
.p-next-btn.is-disabled {
  background: var(--mint-mid);
  color: rgba(255,255,255,.6);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
.p-next-btn.is-last {
  background: var(--mint-dark);
  padding: 0 40px;
  font-size: 14px;
}
.p-next-btn__arrow {
  font-size: 12px;
  opacity: .8;
}

/* ============================================================
   LOADING
   ============================================================ */
.p-loading {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.p-loading__spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--mint-light);
  border-top-color: var(--mint-btn);
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.p-loading__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--mint-dark);
  margin-bottom: 6px;
}
.p-loading__sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 28px;
}
.p-loading__steps {
  text-align: left;
  width: 100%;
  max-width: 290px;
}
.p-loading__step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-sub);
  opacity: 0;
  transition: opacity .4s;
}
.p-loading__step.is-show  { opacity: 1; }
.p-loading__step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ddd;
  flex-shrink: 0;
  transition: background .3s;
}
.p-loading__step.is-done .p-loading__step-dot {
  background: var(--mint-btn);
}

/* ============================================================
   RESULT
   ============================================================ */
.p-result { padding-bottom: 40px; }

/* ── 結果ヒーロー ── */
.p-result-hero {
  background: var(--white);
  border-bottom: 2px solid var(--mint-border);
  padding: 24px 20px 28px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.p-result-hero__label {
  display: inline-block;
  background: var(--mint-btn);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 4px 20px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}
.p-result-hero__icon-wrap {
  margin: 0 auto 12px;
  width: 88px;
  height: 88px;
}
.p-result-hero__icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--mint-light);
  border: 3px solid var(--mint-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: var(--shadow-md);
}
.p-result-hero__type {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}
.p-result-hero__type span {
  color: var(--mint-dark);
  border-bottom: 2px dotted var(--mint-border);
  padding-bottom: 2px;
}
.p-result-hero__catch {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ── 結果カード共通 ── */
.p-result-card {
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  margin: 0 14px 12px;
  border: 1px solid var(--mint-light);
}
.p-result-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--mint-dark);
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.p-result-card__title-bar {
  display: block;
  width: 4px;
  height: 14px;
  background: var(--mint-btn);
  border-radius: 2px;
}

/* スコアバー */
.p-score-item { margin-bottom: 12px; }
.p-score-item:last-child { margin-bottom: 0; }
.p-score-item__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
.p-score-item__label { font-size: 12px; font-weight: 600; color: var(--text); }
.p-score-item__val   { font-size: 12px; font-weight: 700; color: var(--mint-dark); }
.p-score-item__track {
  height: 8px;
  background: var(--mint-light);
  border-radius: 99px;
  overflow: hidden;
}
.p-score-item__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint) 0%, var(--mint-dark) 100%);
  width: 0%;
  transition: width 1.1s cubic-bezier(.4,0,.2,1);
}

/* 説明文 */
.p-result-desc {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}

/* タグ */
.p-result-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.p-result-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--mint-btn);
  color: var(--mint-dark);
  background: var(--mint-light);
}

/* 強み・注意点 */
.p-sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-sw-box {
  padding: 12px 10px;
  border-radius: var(--r-sm);
}
.p-sw-box--plus  { background: #edfaf7; border: 1.5px solid #a8e8e0; }
.p-sw-box--minus { background: #fff8f0; border: 1.5px solid #f8d0a8; }
.p-sw-box__title {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}
.p-sw-box--plus  .p-sw-box__title { color: #38b89e; }
.p-sw-box--minus .p-sw-box__title { color: #e07830; }
.p-sw-box ul li {
  font-size: 11px;
  line-height: 1.7;
  padding: 1px 0 1px 12px;
  color: var(--text);
  position: relative;
}
.p-sw-box ul li::before { content: "·"; position: absolute; left: 0; color: #bbb; }

/* おすすめ副業 */
.p-rec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--mint-mid);
  background: var(--mint-light);
  margin-bottom: 8px;
  transition: border-color .2s;
}
.p-rec-item:last-child { margin-bottom: 0; }
.p-rec-item.is-top {
  border-color: var(--mint-btn);
  background: #d8f5f2;
}
.p-rec-item__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1.5px solid var(--mint-mid);
}
.p-rec-item.is-top .p-rec-item__icon {
  background: var(--mint-btn);
  border-color: var(--mint-btn);
}
.p-rec-item__text { flex: 1; min-width: 0; }
.p-rec-item__name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 1px; }
.p-rec-item__desc { font-size: 11px; color: var(--text-sub); }
.p-rec-item__badge {
  flex-shrink: 0;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--r-full);
  white-space: nowrap;
}
.p-rec-item.is-top .p-rec-item__badge {
  background: var(--mint-btn);
  color: var(--white);
}
.p-rec-item:not(.is-top) .p-rec-item__badge {
  background: var(--white);
  color: var(--mint-dark);
  border: 1px solid var(--mint-btn);
}

/* CTA */
.p-cta {
  background: linear-gradient(135deg, var(--mint-btn) 0%, var(--mint-dark) 100%);
  border-radius: var(--r-md);
  padding: 24px 20px;
  text-align: center;
  margin: 0 14px 12px;
  box-shadow: var(--shadow-md);
}
.p-cta__title {
  font-size: 17px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
}
.p-cta__sub {
  font-size: 13px;
  color: rgba(255,255,255,.88);
  line-height: 1.7;
  margin-bottom: 18px;
}
.p-cta__sub strong { color: var(--white); font-weight: 800; }
.p-cta__btn {
  display: block;
  background: var(--white);
  color: var(--mint-dark);
  font-family: var(--font);
  font-size: 15px; font-weight: 800;
  padding: 15px;
  border-radius: var(--r-full);
  box-shadow: 0 3px 12px rgba(0,0,0,.1);
  transition: .22s;
  margin-bottom: 10px;
}
.p-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.p-cta__note { font-size: 10px; color: rgba(255,255,255,.65); }

/* ============================================================
   REDIRECT PANEL
   ============================================================ */
.p-redirect {
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--mint-light);
  padding: 28px 20px 24px;
  margin: 0 14px 12px;
  text-align: center;
}

/* カウントダウン数字 */
.p-redirect__count-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.p-redirect__count {
  font-size: 56px;
  font-weight: 900;
  color: var(--mint-btn);
  line-height: 1;
  display: inline-block;
  min-width: 64px;
  text-align: center;
  transition: transform .2s;
}
.p-redirect__count-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
}

/* プログレスバー */
.p-redirect__bar-wrap {
  height: 6px;
  background: var(--mint-light);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 20px;
}
.p-redirect__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mint) 0%, var(--mint-dark) 100%);
  border-radius: 99px;
  width: 100%;
  transition: width 1s linear;
}

/* 今すぐボタン */
.p-redirect__btn {
  display: inline-block;
  background: var(--mint-btn);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  padding: 14px 40px;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all .22s ease;
  letter-spacing: .04em;
}
.p-redirect__btn:hover {
  background: var(--mint-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91,196,188,.45);
}

/* もう一度 */
.p-retry { text-align: center; margin: 4px 0 20px; }
.p-retry__btn {
  background: none;
  border: 1.5px solid var(--mint-btn);
  color: var(--mint-dark);
  font-family: var(--font);
  font-size: 13px; font-weight: 700;
  padding: 10px 28px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: .2s;
}
.p-retry__btn:hover { background: var(--mint-light); }

/* ============================================================
   FOOTER
   ============================================================ */
.p-footer {
  background: var(--white);
  border-top: 1px solid var(--mint-light);
  padding: 20px 20px 48px;
  text-align: center;
}
.p-footer__logo {
  font-size: 13px;
  font-weight: 700;
  color: var(--mint-dark);
  margin-bottom: 10px;
}
.p-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 10px;
}
.p-footer__links li { font-size: 10px; color: var(--text-sub); }
.p-footer__links li:not(:last-child)::after { content: "／"; margin: 0 4px; }
.p-footer__links a:hover { color: var(--mint-dark); }
.p-footer__copy { font-size: 10px; color: #bbb; }

/* ============================================================
   UTILITY
   ============================================================ */
.u-hide { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 360px) {
  .p-quiz-item__answer-label { font-size: 11px; min-height: 44px; }
  .p-next-btn { font-size: 14px; padding: 0 36px; height: 52px; }
  .p-sw-grid { grid-template-columns: 1fr; }
  .p-header__chara { display: none; }
}
