/* ============================================================
   /diagnose/ — 英語力3分診断
   Design System v2（ティール基調 + Zen Maru Gothic）準拠
   トークンは assets/global-design.css / design-v2.css を継承
   ============================================================ */

:root {
  --dg-teal-deep: #0E7490;
  --dg-teal: #0891B2;
  --dg-teal-light: #2BC8E4;
  --dg-teal-tint: #ECF6F9;
  --dg-teal-tint-2: #E0F2F6;
  --dg-coral: #FF8E7A;
}

.dg-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}

.dg-screen { display: none; }
.dg-screen.active { display: block; }

/* ─── 見出し・共通 ─── */
.dg-main h1, .dg-main h2, .dg-main h3,
.dg-level-name, .dg-hero-title {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  letter-spacing: 0;
  text-wrap: balance;
}

.dg-marker {
  background: linear-gradient(transparent 64%, rgba(43,200,228,0.38) 64% 94%, transparent 94%);
  color: var(--dg-teal-deep);
}

.dg-privacy-note {
  font-size: 12px;
  color: var(--text-3, rgba(26,26,26,0.42));
  margin-top: 14px;
  text-align: center;
}

/* ─── CTA ─── */
.dg-cta {
  display: inline-block;
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  background: linear-gradient(135deg, var(--dg-teal-deep), var(--dg-teal) 55%, var(--dg-teal-light));
  border-radius: 9999px;
  padding: 16px 42px;
  min-height: 52px;
  box-shadow: 0 6px 18px rgba(14,116,144,0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dg-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(14,116,144,0.34); }
.dg-cta:active { transform: translateY(0); }

.dg-ghost {
  appearance: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-strong, #D8D2C6);
  border-radius: 9999px;
  padding: 12px 24px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2, rgba(26,26,26,0.62));
}
.dg-ghost:hover { background: var(--surface, rgba(26,26,26,0.04)); }

/* ─── LP ─── */
.dg-hero { text-align: center; padding: 28px 0 8px; }
.dg-hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--dg-teal-deep);
  background: var(--dg-teal-tint-2);
  border-radius: 9999px;
  padding: 5px 14px;
  margin-bottom: 14px;
}
.dg-hero-title { font-size: 40px; font-weight: 800; margin: 0 0 14px; color: var(--text-1, rgba(26,26,26,0.88)); }
.dg-hero-sub { font-size: 15px; line-height: 1.9; color: var(--text-2, rgba(26,26,26,0.62)); margin: 0 0 20px; }
.dg-badges { justify-content: center; margin-bottom: 18px; }
.dg-hero .cta-micro { margin-bottom: 10px; }

.dg-last {
  margin: 18px auto 0;
  max-width: 380px;
  font-size: 13px;
  color: var(--text-2, rgba(26,26,26,0.62));
  background: var(--dg-teal-tint);
  border: 1px solid var(--dg-teal-tint-2);
  border-radius: 12px;
  padding: 10px 16px;
}

.dg-steps { margin-top: 40px; }
.dg-steps-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .dg-steps-row { grid-template-columns: 1fr 1fr 1fr; } }

.dg-about { margin-top: 36px; }
.dg-about h2 { font-size: 20px; margin: 0 0 10px; }
.dg-about p { font-size: 14px; line-height: 1.9; color: var(--text-2, rgba(26,26,26,0.62)); max-width: 38em; text-wrap: pretty; }
.dg-about a { color: var(--dg-teal-deep); font-weight: 700; }

/* ─── クイズ ─── */
.dg-quiz-top { margin-bottom: 18px; }
.dg-progress {
  height: 8px;
  background: var(--surface-2, rgba(26,26,26,0.07));
  border-radius: 9999px;
  overflow: hidden;
}
.dg-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--dg-teal-deep), var(--dg-teal-light));
  transition: width 0.3s ease;
}
.dg-quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2, rgba(26,26,26,0.62));
}
.dg-qcat {
  font-weight: 700;
  color: var(--dg-teal-deep);
  background: var(--dg-teal-tint-2);
  border-radius: 9999px;
  padding: 3px 12px;
}

.dg-qcard {
  background: var(--bg-elevated, #FDFCF9);
  border: 1px solid var(--border, #E8E4DC);
  border-radius: 16px;
  padding: 22px 18px;
}
.dg-qprompt { font-size: 13px; color: var(--text-3, rgba(26,26,26,0.42)); margin: 0 0 12px; }
.dg-qstem { font-size: 19px; line-height: 1.7; font-weight: 600; color: var(--text-1, rgba(26,26,26,0.88)); margin: 0 0 6px; overflow-wrap: break-word; }
.dg-qja { font-size: 13px; color: var(--text-2, rgba(26,26,26,0.62)); margin: 0 0 6px; }

.dg-audio { text-align: center; padding: 10px 0 16px; }
.dg-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  cursor: pointer;
  border: none;
  min-height: 52px;
  padding: 12px 30px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--dg-teal-deep), var(--dg-teal));
  box-shadow: 0 4px 14px rgba(14,116,144,0.25);
}
.dg-play:active { transform: scale(0.98); }
.dg-audio-hint { font-size: 12px; color: var(--text-3, rgba(26,26,26,0.42)); margin: 10px 0 0; }

.dg-choices { display: grid; gap: 10px; margin-top: 14px; }
.dg-choice {
  appearance: none;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong, #D8D2C6);
  background: var(--bg-elevated, #FDFCF9);
  color: var(--text-1, rgba(26,26,26,0.88));
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dg-choice:not(:disabled):hover { border-color: var(--dg-teal); background: var(--dg-teal-tint); }
.dg-choice:disabled { cursor: default; opacity: 0.55; }
.dg-choice.locked { opacity: 0.45; }
.dg-choice.correct {
  border-color: var(--dg-teal);
  background: var(--dg-teal-tint);
  color: var(--dg-teal-deep);
  font-weight: 700;
  opacity: 1;
}
.dg-choice.wrong {
  border-color: var(--dg-coral);
  background: rgba(255,142,122,0.12);
  opacity: 1;
}

.dg-feedback {
  margin-top: 16px;
  border-top: 1px dashed var(--border, #E8E4DC);
  padding-top: 14px;
}
.dg-fb-verdict { font-size: 16px; font-weight: 800; margin: 0 0 8px; font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; }
.dg-fb-verdict.ok { color: var(--dg-teal-deep); }
.dg-fb-verdict.ng { color: #D8341F; }
.dg-fb-script { font-size: 14px; font-weight: 600; color: var(--text-1, rgba(26,26,26,0.88)); background: var(--surface, rgba(26,26,26,0.04)); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
.dg-fb-expl { font-size: 13px; line-height: 1.8; color: var(--text-2, rgba(26,26,26,0.62)); margin: 0 0 14px; }
.dg-next {
  appearance: none;
  cursor: pointer;
  border: none;
  width: 100%;
  min-height: 52px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  background: linear-gradient(135deg, var(--dg-teal-deep), var(--dg-teal) 55%, var(--dg-teal-light));
}
.dg-quit {
  display: block;
  margin: 18px auto 0;
  appearance: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-3, rgba(26,26,26,0.42));
  text-decoration: underline;
  min-height: 44px;
}

/* ─── 結果 ─── */
.dg-result-card {
  text-align: center;
  background: var(--bg-elevated, #FDFCF9);
  border: 1px solid var(--border, #E8E4DC);
  border-radius: 16px;
  padding: 28px 18px;
}
.dg-result-eyebrow { font-size: 12px; font-weight: 700; color: var(--dg-teal-deep); margin: 0 0 6px; }
.dg-level { color: var(--dg-teal-deep); line-height: 1; }
.dg-level-pre { font-size: 26px; font-weight: 800; vertical-align: 18px; }
.dg-level-num { font-size: 72px; font-weight: 800; font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; }
.dg-level-name { font-size: 24px; font-weight: 800; margin: 6px 0 10px; color: var(--text-1, rgba(26,26,26,0.88)); }
.dg-level-desc { font-size: 14px; line-height: 1.9; color: var(--text-2, rgba(26,26,26,0.62)); max-width: 34em; margin: 0 auto; text-wrap: pretty; }

.dg-skills, .dg-weak, .dg-recs { margin-top: 28px; }
.dg-skills h3, .dg-weak h3, .dg-recs h3 { font-size: 17px; margin: 0 0 12px; }

.dg-skill-row { margin-bottom: 12px; }
.dg-skill-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.dg-skill-name { font-weight: 700; color: var(--text-1, rgba(26,26,26,0.88)); }
.dg-skill-pct { color: var(--dg-teal-deep); font-weight: 700; }
.dg-skill-bar { height: 10px; background: var(--surface-2, rgba(26,26,26,0.07)); border-radius: 9999px; overflow: hidden; }
.dg-skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--dg-teal-deep), var(--dg-teal-light));
  transition: width 0.6s ease;
}
.dg-skill-row.weakest .dg-skill-fill { background: linear-gradient(90deg, var(--dg-coral), #F2705B); }
.dg-skill-row.weakest .dg-skill-pct { color: #F2705B; }

.dg-weak-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-weak-chip {
  font-size: 13px;
  font-weight: 700;
  color: var(--dg-teal-deep);
  background: var(--dg-teal-tint);
  border: 1px solid var(--dg-teal-tint-2);
  border-radius: 9999px;
  padding: 7px 14px;
}

.dg-rec-ai {
  text-align: center;
  background: var(--dg-teal-tint);
  border: 1px solid var(--dg-teal-tint-2);
  border-radius: 16px;
  padding: 22px 18px;
  margin-bottom: 14px;
}
.dg-rec-ai-t { font-size: 16px; font-weight: 800; margin: 0 0 8px; font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; color: var(--text-1, rgba(26,26,26,0.88)); }
.dg-rec-ai-d { font-size: 13px; line-height: 1.8; color: var(--text-2, rgba(26,26,26,0.62)); max-width: 34em; margin: 0 auto 12px; }
.dg-rec-ai .cta-micro { margin-bottom: 8px; }

.dg-rec-tools { display: grid; gap: 12px; }
@media (min-width: 640px) { .dg-rec-tools { grid-template-columns: 1fr 1fr; } }
.dg-rec-tool {
  display: block;
  text-decoration: none;
  background: var(--bg-elevated, #FDFCF9);
  border: 1px solid var(--border, #E8E4DC);
  border-radius: 14px;
  padding: 16px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.dg-rec-tool:hover { border-color: var(--dg-teal); box-shadow: 0 6px 16px rgba(14,116,144,0.14); }
.dg-rec-tool-cat { font-size: 11px; font-weight: 700; color: var(--dg-teal-deep); margin: 0 0 4px; }
.dg-rec-tool-name { font-size: 16px; font-weight: 800; color: var(--text-1, rgba(26,26,26,0.88)); margin: 0 0 4px; font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; }
.dg-rec-tool-why { font-size: 13px; line-height: 1.7; color: var(--text-2, rgba(26,26,26,0.62)); margin: 0; }

.dg-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

@media (max-width: 480px) {
  .dg-hero-title { font-size: 32px; }
  .dg-br-pc { display: none; }
  .dg-level-num { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .dg-progress-bar, .dg-skill-fill, .dg-cta { transition: none; }
}
