/* ============================================================
   5大成分マッチング診断 — ingredient-check.css  v2
   Clinic-like design: White / Light-gray / Near-black
   Shared by: index.html, results/result-*.html
   ============================================================ */

/* ── DESIGN TOKENS ── */
:root {
  --bg:      #F9FAFB;
  --surface: #FFFFFF;
  --ink:     #111827;
  --sub:     #4B5563;
  --hint:    #9CA3AF;
  --line:    #E5E7EB;
  --fill:    #F3F4F6;
  --accent:  #111827;
  --r:       10px;
  --max:     640px;
  --font:    "Noto Sans JP","Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,system-ui,sans-serif;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 2px 8px rgba(0,0,0,.07);
  --sh-md: 0 4px 16px rgba(0,0,0,.09);
}

/* ── Ingredient color themes ── */
.theme-az   { --c: #5C7A68; --ct: #EFF5F1; --ctxt: #3D5E4C; }
.theme-pdrn { --c: #3B6FA8; --ct: #EBF2FA; --ctxt: #2A5282; }
.theme-gsh  { --c: #8B691A; --ct: #FBF3E3; --ctxt: #6D4F12; }
.theme-vc   { --c: #B85C1A; --ct: #FBF0E8; --ctxt: #8B3E0E; }
.theme-eql  { --c: #7058A0; --ct: #F2EEF8; --ctxt: #543D80; }

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── BASE ── */
.ic-body, .ic-result-page {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── UTILITIES ── */
.ic-hidden { display: none !important; }
.ic-wrap   { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.ic-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ic-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 58px; display: flex; align-items: center; justify-content: space-between;
}
.ic-brand img { display: block; height: 30px; width: auto; }
.ic-header__link {
  font-size: 11.5px; color: var(--hint); text-decoration: none;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .12s, color .12s;
}
.ic-header__link:hover { border-color: var(--ink); color: var(--ink); }

/* ============================================================
   START SCREEN
   ============================================================ */
.ic-start {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid background */
.ic-start::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(0,0,0,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .5;
}

/* Fade mask edges */
.ic-start::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 80% at 50% 50%,
    transparent 40%, var(--bg) 75%);
}

.ic-start > * { position: relative; z-index: 1; }

.ic-eyebrow {
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--hint); text-align: center; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.ic-eyebrow::before, .ic-eyebrow::after {
  content: ''; flex: 1; max-width: 48px; height: 1px; background: var(--line);
}

.ic-title {
  font-size: clamp(24px, 7vw, 32px); font-weight: 700;
  line-height: 1.4; text-align: center; margin-bottom: 24px; color: var(--ink);
}
.ic-title strong {
  position: relative; display: inline;
  background: linear-gradient(transparent 70%, rgba(17,24,39,.12) 70%);
}
.ic-title__sub {
  display: block; font-size: 12px; font-weight: 400;
  color: var(--hint); letter-spacing: .1em; margin-top: 14px;
}

.ic-desc {
  font-size: 13.5px; color: var(--sub); line-height: 2;
  text-align: center; margin-bottom: 48px;
}

/* 5 component list on start */
.ic-components {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 44px;
}
.ic-components span {
  font-size: 12px; color: var(--sub);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  letter-spacing: .04em;
}

/* Chips */
.ic-chips {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap; list-style: none; margin-top: 24px;
}
.ic-chips li {
  font-size: 10px; color: var(--hint);
  padding: 3px 12px; border: 1px solid var(--line); border-radius: 100px;
}

/* ── BUTTONS ── */
.ic-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: var(--r);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  letter-spacing: .04em; cursor: pointer; border: none;
  text-decoration: none;
  transition: opacity .14s, box-shadow .14s, transform .1s;
}
.ic-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ic-btn--primary {
  background: var(--ink); color: #fff;
  display: block; width: 100%; max-width: 300px;
  margin: 0 auto; padding: 16px;
  box-shadow: var(--sh-sm);
}
.ic-btn--primary:hover { opacity: .86; box-shadow: var(--sh-md); transform: translateY(-1px); }
.ic-btn--ghost {
  background: transparent; color: var(--sub);
  border: 1px solid var(--line); padding: 11px 22px;
}
.ic-btn--ghost:hover { background: var(--fill); }
.ic-btn--ghost:disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }
.ic-btn--outline {
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--ink); padding: 14px 32px;
}
.ic-btn--outline:hover { background: var(--fill); }

/* ── KV / HERO image on start screen ── */
.ic-kv {
  display: block; width: 100%;
  margin: 28px auto 32px;
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--sh-md);
}
.ic-kv__img {
  width: 100%;
  display: block;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  object-position: center;
}
@media (min-width: 640px) {
  .ic-kv__img { aspect-ratio: 16/9; object-position: center; }
}

/* ============================================================
   QUIZ SCREEN
   ============================================================ */
.ic-quiz { padding: 44px 0 72px; }

/* ── Progress dots ── */
.ic-prog {
  display: flex; align-items: center; gap: 16px; margin-bottom: 48px;
}
.ic-steps { display: flex; align-items: center; gap: 6px; flex: 1; }
.ic-step-dot {
  height: 6px; border-radius: 3px;
  background: var(--line);
  transition: width .3s cubic-bezier(.4,0,.2,1), background .3s;
  width: 6px;
}
.ic-step-dot.is-done { background: var(--accent); }
.ic-step-dot.is-current { width: 22px; background: var(--accent); }
.ic-prog__label { font-size: 11px; color: var(--hint); white-space: nowrap; }

/* ── Question ── */

/* Meta row: Q number + selection counter (multi-select) */
.ic-q__meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.ic-q__num {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--hint); flex: 1;
  display: flex; align-items: center; gap: 8px;
}
.ic-q__num::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Selection counter "あとXつ選べます" / "選択完了" */
.ic-q__count {
  font-size: 11px; color: var(--hint); letter-spacing: .04em;
  white-space: nowrap; flex-shrink: 0;
  transition: color .2s, font-weight .2s;
}
.ic-q__count.is-full { color: var(--accent); font-weight: 600; }

.ic-q__text {
  font-size: clamp(17px, 5vw, 20px); font-weight: 700;
  line-height: 1.5; margin-bottom: 10px; color: var(--ink);
}

/* Sub-hint below question text */
.ic-q__hint {
  font-size: 12px; color: var(--hint); line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Fade transition ── */
@keyframes icFadeSlide {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0);    }
}
.ic-q-enter { animation: icFadeSlide .22s ease; }

/* ── Options ── */
.ic-opts { display: flex; flex-direction: column; gap: 10px; }
.ic-opt {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 18px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r); cursor: pointer;
  font-size: 13.5px; line-height: 1.65; color: var(--sub);
  transition: border-color .12s, background .12s, color .12s,
              box-shadow .14s, transform .1s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.ic-opt:hover {
  border-color: #9CA3AF; color: var(--ink);
  box-shadow: var(--sh-xs); transform: translateY(-1px);
}
.ic-opt.is-selected {
  border-color: var(--accent); background: var(--accent);
  color: #fff; transform: none; box-shadow: var(--sh-sm);
}
/* Dimmed state when max selections reached and option is not chosen */
.ic-opt.is-maxed {
  opacity: .42; cursor: default; pointer-events: none;
}
.ic-opt input[type="radio"],
.ic-opt input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

/* Letter badge */
.ic-opt__badge {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 5px; border: 1.5px solid var(--line);
  font-size: 11px; font-weight: 700; color: var(--hint);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .12s, color .12s, background .12s;
  font-variant: small-caps; letter-spacing: .02em;
  margin-top: 1px;
}
.ic-opt:hover .ic-opt__badge { border-color: #9CA3AF; color: var(--sub); }
.ic-opt.is-selected .ic-opt__badge {
  background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff;
}

.ic-opt__label { flex: 1; }

/* Actions */
.ic-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 36px; gap: 12px;
}
.ic-note {
  margin-top: 20px; font-size: 11px; color: var(--hint); text-align: center;
}

/* Toast */
.ic-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: #fff; font-size: 13px;
  padding: 10px 20px; border-radius: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  white-space: nowrap; z-index: 999;
  font-family: var(--font);
}
.ic-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   RESULT PAGES  ( results/result-*.html )
   ============================================================ */

/* Header */
.ir-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ir-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.ir-header__brand img { display: block; height: 28px; width: auto; }
.ir-back {
  font-size: 11.5px; color: var(--hint); text-decoration: none;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px;
  transition: all .12s;
}
.ir-back:hover { border-color: var(--ink); color: var(--ink); }

.ir-wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── HERO ── */
.ir-hero { padding: 60px 0 44px; text-align: center; }

.ir-hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; letter-spacing: .12em;
  background: var(--ct); color: var(--c);
  padding: 5px 16px; border-radius: 100px; margin-bottom: 24px;
  font-weight: 600; border: 1px solid transparent;
}

.ir-hero__pre {
  font-size: 11px; color: var(--hint); letter-spacing: .12em;
  margin-bottom: 10px; text-transform: uppercase;
}

/* Name with vertical accent bar */
.ir-hero__name-wrap {
  display: inline-flex; align-items: center;
  gap: 16px; margin-bottom: 16px;
}
.ir-hero__name-wrap::before {
  content: '';
  width: 4px; border-radius: 2px;
  background: var(--c); flex-shrink: 0;
  align-self: stretch;
}
.ir-hero__name {
  font-size: clamp(30px, 9vw, 44px); font-weight: 700;
  letter-spacing: .02em; color: var(--ink); line-height: 1.15;
}

.ir-hero__catch {
  font-size: clamp(15px, 4.5vw, 18px); font-weight: 500;
  color: var(--sub); line-height: 1.6; margin-bottom: 6px;
}
.ir-hero__sub {
  font-size: 13px; color: var(--hint); line-height: 1.75; margin-bottom: 32px;
}
.ir-hero__img {
  width: 100%; max-width: 480px; border-radius: 12px;
  display: block; margin: 0 auto;
  aspect-ratio: 16/9; object-fit: cover;
}

/* ── SECTION ── */
.ir-section { padding: 40px 0; border-top: 1px solid var(--line); }

/* Numbered section tag "01 / Type Characteristics" */
.ir-section__tag {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--hint); margin-bottom: 14px;
}
.ir-section__tag b {
  font-size: 13px; color: var(--c); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.ir-section__tag span { flex: 1; height: 1px; background: var(--line); max-width: 40px; }

.ir-section__title {
  font-size: 18px; font-weight: 700; color: var(--ink);
  margin-bottom: 14px; line-height: 1.45;
}
.ir-section p { font-size: 14px; color: var(--sub); line-height: 1.9; margin-bottom: 14px; }
.ir-section p:last-child { margin-bottom: 0; }

/* List — bullet は absolute で mark/inline 要素を壊さない */
.ir-list { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.ir-list li {
  position: relative;
  padding-left: 17px;
  font-size: 14px; color: var(--sub); line-height: 1.8;
}
.ir-list li::before {
  content: '';
  position: absolute; left: 0; top: 0.72em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c);
}

/* Tags */
.ir-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ir-tag {
  font-size: 12px; padding: 5px 14px;
  background: var(--ct); color: var(--ctxt);
  border-radius: 100px; font-weight: 500;
}

/* Info box */
.ir-box {
  background: var(--ct); border-radius: var(--r);
  padding: 20px 22px; margin-top: 16px;
  border-left: 3px solid var(--c);
}
.ir-box p { font-size: 13.5px; color: var(--ctxt); margin-bottom: 0 !important; }

/* ── Lifestyle visual break in text-heavy sections ── */
.ir-visual-break {
  width: 100%; margin: 22px 0;
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--sh-sm);
}
.ir-visual-break img {
  width: 100%; display: block;
  aspect-ratio: 16/9; object-fit: cover;
  object-position: center;
}

/* ── Serum product image in CTA blocks ── */
.ir-cta__serum-img {
  width: min(240px, 72%);
  aspect-ratio: 2/3;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto 24px;
}

/* ── CTA BLOCK ── */
.ir-cta {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-top: 3px solid var(--c);
  border-radius: 0 0 14px 14px;
  padding: 32px 28px; text-align: center; margin: 0 0 40px;
}
.ir-cta__eyebrow {
  font-size: 10px; letter-spacing: .18em; color: var(--hint); margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ir-cta__eyebrow::before, .ir-cta__eyebrow::after {
  content: ''; flex: 1; max-width: 32px; height: 1px; background: var(--line);
}
.ir-cta__title {
  font-size: 17px; font-weight: 700; color: var(--ink);
  margin-bottom: 10px; line-height: 1.45;
}
.ir-cta__sub { font-size: 13px; color: var(--hint); line-height: 1.75; margin-bottom: 24px; }
.ir-cta__btn {
  display: flex; align-items: center; justify-content: center;
  max-width: 310px; margin: 0 auto 12px;
  padding: 15px; background: var(--ink); color: #fff;
  text-decoration: none; border-radius: 8px;
  font-size: 14px; font-weight: 500; letter-spacing: .04em;
  transition: opacity .14s, box-shadow .14s, transform .1s;
  box-shadow: var(--sh-sm);
}
.ir-cta__btn:hover { opacity: .84; box-shadow: var(--sh-md); transform: translateY(-1px); }
.ir-cta__note { font-size: 10.5px; color: var(--hint); line-height: 1.65; }

/* ── Footnote markers & list ── */
.ir-sup {
  font-size: 0.65em;
  color: var(--hint);
  vertical-align: super;
  margin-left: 1px;
  font-style: normal;
}
.ir-footnotes {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.ir-footnotes li {
  font-size: 10.5px;
  color: var(--hint);
  line-height: 1.7;
  padding: 1px 0;
}

/* ── DISCLAIMER ── */
.ir-disclaimer {
  background: #FAFAFA; border: 1px solid var(--line);
  border-radius: 8px; padding: 20px 22px; margin-bottom: 40px;
  border-left: 3px solid var(--line);
}
.ir-disclaimer p { font-size: 11px; color: var(--hint); line-height: 1.75; margin-bottom: 6px; }
.ir-disclaimer p:last-child { margin-bottom: 0; }
.ir-disclaimer__heading {
  font-size: 11px; font-weight: 700; color: #6B7280;
  letter-spacing: .06em; margin-bottom: 8px;
}

/* Reset */
.ir-reset {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  text-align: center; font-size: 13px; color: var(--hint);
  text-decoration: none; margin-bottom: 48px;
  padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .12s, color .12s;
}
.ir-reset:hover { border-color: var(--ink); color: var(--ink); }

/* ── FOOTER ── */
.ir-footer { border-top: 1px solid var(--line); padding: 24px 0; text-align: center; }
.ir-footer small { font-size: 11px; color: var(--hint); }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  /* ラップ・ヒーロー */
  .ic-wrap, .ir-wrap { padding: 0 16px; }
  .ic-start  { padding: 40px 0 36px; }
  .ir-hero   { padding: 32px 0 24px; }
  .ir-hero__pre  { font-size: 10px; }
  .ir-hero__name em { font-size: 34px; }
  .ir-hero__catch { font-size: 14px; }
  .ir-hero__sub   { font-size: 12px; margin-bottom: 20px; }
  .ir-hero__badge { font-size: 10px; padding: 4px 12px; }

  /* セクション */
  .ir-section { padding: 28px 0; }
  .ir-section__title { font-size: 16px; }
  .ir-section p  { font-size: 13px; line-height: 1.8; margin-bottom: 10px; }
  .ir-box        { padding: 14px 16px; }
  .ir-box p      { font-size: 13px; }

  /* リスト */
  .ir-list { gap: 8px; }
  .ir-list li    { font-size: 13px; line-height: 1.75; }

  /* タグ */
  .ir-tags { gap: 5px; }
  .ir-tag  { font-size: 11px; padding: 3px 9px; }

  /* CTA */
  .ir-cta { padding: 22px 16px; }
  .ir-cta__title { font-size: 14px; }
  .ir-cta__sub   { font-size: 12px; }
  .ir-cta__btn   { font-size: 13px; padding: 13px 18px; }

  /* クイズ */
  .ic-actions { flex-direction: column-reverse; gap: 10px; }
  .ic-actions .ic-btn { width: 100%; max-width: 100%; }
  .ir-hero__name-wrap { gap: 12px; }
  .ic-q__text  { font-size: 15px; }
  .ic-opt__label { font-size: 13px; }

  /* 免責 */
  .ir-disclaimer { padding: 14px 16px; }
  .ir-footnotes li { font-size: 10px; }
}
