/* =================================================================
   島原ITクリニック — Design System
   Style: Accessible & Ethical (WCAG-friendly, medical/trustworthy)
   ================================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand / neutrals */
  --color-primary: #0f172a;        /* navy ink */
  --color-on-primary: #ffffff;
  --color-secondary: #334155;
  --color-accent: #0369a1;         /* trustworthy clinical blue */
  --color-accent-strong: #075985;
  --color-accent-soft: #e0f2fe;
  --color-teal: #0ea5e9;
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-foreground: #0f172a;
  --color-muted-fg: #475569;
  --color-faint-fg: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  /* Semantic severity (health checkup traffic-light) */
  --c-healthy: #16a34a;
  --c-healthy-bg: #dcfce7;
  --c-mild: #65a30d;
  --c-mild-bg: #ecfccb;
  --c-watch: #d97706;
  --c-watch-bg: #fef3c7;
  --c-treat: #ea580c;
  --c-treat-bg: #ffedd5;
  --c-severe: #dc2626;
  --c-severe-bg: #fee2e2;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Shadow (consistent elevation scale) */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --sh-2: 0 4px 12px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04);
  --sh-3: 0 18px 40px -12px rgba(15, 23, 42, .18), 0 6px 14px rgba(15, 23, 42, .06);

  /* Spacing rhythm (8pt) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* Type */
  --font-body: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-head: "Figtree", "Noto Sans JP", var(--font-body);
  --font-brand: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --container: 1140px;
  --nav-h: 68px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-foreground);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-strong); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; color: var(--color-primary); margin: 0; font-weight: 700; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--color-primary); color: #fff;
  padding: 10px 18px; border-radius: var(--r-sm); z-index: 200;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(56px, 9vw, 104px); }
.section--tint { background: var(--color-surface); }
.section--ink { background: var(--color-primary); color: #cbd5e1; }
.section--ink h2, .section--ink h3 { color: #fff; }

.section-head { max-width: 680px; margin-bottom: var(--sp-7); }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: var(--sp-3);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--color-accent); border-radius: 2px; }
.center .eyebrow { justify-content: center; }

.h-display { font-size: clamp(2rem, 5.2vw, 3.3rem); letter-spacing: .015em; }
.h-section { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--color-muted-fg); margin-top: var(--sp-4); }

.grid { display: grid; gap: var(--sp-5); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: var(--sh-2); }
.btn-primary:hover { background: var(--color-accent-strong); color: #fff; transform: translateY(-2px); box-shadow: var(--sh-3); }
.btn-ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border-strong); }
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }
.btn-on-ink { background: #fff; color: var(--color-primary); }
.btn-on-ink:hover { background: var(--color-accent-soft); color: var(--color-accent-strong); transform: translateY(-2px); }
.btn-lg { min-height: 56px; padding: 16px 34px; font-size: 1.06rem; }
.btn-block { width: 100%; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--color-accent-soft); color: var(--color-accent-strong);
}
.badge svg { width: 15px; height: 15px; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); padding: var(--sp-6);
  box-shadow: var(--sh-1); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--color-border-strong); }
@media (prefers-reduced-motion: reduce) { .card-hover:hover { transform: none; } }
.card h3 { font-size: 1.2rem; margin-bottom: var(--sp-3); }
.card p { color: var(--color-muted-fg); font-size: .96rem; }

.icon-chip {
  display: inline-grid; place-items: center;
  width: 54px; height: 54px; border-radius: var(--r-md);
  background: var(--color-accent-soft); color: var(--color-accent-strong);
  margin-bottom: var(--sp-4);
}
.icon-chip svg { width: 28px; height: 28px; }

/* ================================================================
   Header / Nav
   ================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 250, 252, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--color-primary); }
.brand:hover { color: var(--color-primary); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--font-brand); font-weight: 700; font-size: 1.24rem; letter-spacing: .04em; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--font-head); font-size: .62rem; letter-spacing: .22em; color: var(--color-faint-fg); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 600; font-size: .94rem; padding: 9px 14px; border-radius: var(--r-sm); transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--color-surface-2); color: var(--color-primary); }
.nav-cta { margin-left: 10px; }

.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--color-border-strong); background: var(--color-surface); border-radius: var(--r-sm); color: var(--color-primary); align-items: center; justify-content: center; }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--color-surface); border-bottom: 1px solid var(--color-border);
    padding: 14px 20px 22px; box-shadow: var(--sh-2);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 12px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ================================================================
   Hero
   ================================================================ */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 85% -10%, #e0f2fe 0%, rgba(224,242,254,0) 55%), var(--color-background); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-8); align-items: center; padding-block: clamp(48px, 7vw, 88px); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: var(--sp-6); } }

.hero h1 { font-family: var(--font-brand); font-weight: 700; }
.hero .accent { color: var(--color-accent); }
.hero-list { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: grid; gap: 10px; }
.hero-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--color-secondary); font-size: .98rem; }
.hero-list svg { width: 22px; height: 22px; color: var(--c-healthy); flex: none; margin-top: 2px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: var(--sp-6); }
.hero-note { margin-top: var(--sp-4); font-size: .85rem; color: var(--color-faint-fg); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 16px; height: 16px; }

/* Hero visual: vitals card */
.vitals {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: var(--sp-6);
}
.vitals-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: var(--sp-4); border-bottom: 1px dashed var(--color-border-strong); }
.vitals-top .who { font-family: var(--font-head); font-weight: 700; color: var(--color-primary); }
.vitals-top .who small { display: block; font-weight: 600; font-size: .72rem; color: var(--color-faint-fg); letter-spacing: .1em; }
.ekg { margin: var(--sp-5) 0; }
.ekg svg { width: 100%; height: 64px; }
.vital-rows { display: grid; gap: 12px; }
.vital-row { display: grid; grid-template-columns: 132px 1fr 46px; align-items: center; gap: 12px; font-size: .86rem; }
.vital-row .vname { color: var(--color-secondary); font-weight: 600; }
.vital-row .vval { font-family: var(--font-head); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 9px; border-radius: var(--r-pill); background: var(--color-surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: var(--r-pill); }

/* ================================================================
   Symptom check / sections
   ================================================================ */
.symptom-list { display: grid; gap: 14px; }
.symptom {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-left: 4px solid var(--c-watch); border-radius: var(--r-md);
  padding: 18px 20px; box-shadow: var(--sh-1);
}
.symptom svg { width: 24px; height: 24px; color: var(--c-watch); flex: none; margin-top: 2px; }
.symptom p { color: var(--color-secondary); }
.symptom strong { color: var(--color-primary); }

/* Steps (診療の流れ) */
.steps { counter-reset: step; }
.step { position: relative; }
.step .num {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-pill); background: var(--color-primary); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin-bottom: var(--sp-4);
}
.step h3 { font-size: 1.16rem; margin-bottom: 8px; }
.step p { color: var(--color-muted-fg); font-size: .95rem; }

/* Disease cards (創作病名) */
.disease { border-top: 4px solid var(--color-border-strong); }
.disease-illust {
  width: 100%; height: auto; border-radius: 16px;
  background: #fff;
  object-fit: cover; margin-bottom: var(--sp-4);
}
/* 診断結果バナーの病名イラスト（白角丸の台座に乗せる） */
.dx-illust {
  width: 132px; height: 132px; margin: 16px auto 0;
  background: #fff; border-radius: 22px; padding: 6px;
  box-shadow: var(--sh-2);
}
.dx-illust img { width: 100%; height: 100%; border-radius: 16px; display: block; object-fit: cover; }
.disease .tag { font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: var(--color-faint-fg); text-transform: uppercase; }
.disease h3 { font-size: 1.18rem; margin: 6px 0 4px; }
.disease .alias { font-size: .82rem; color: var(--color-faint-fg); margin-bottom: 12px; }
.disease ul { list-style: none; padding: 0; display: grid; gap: 7px; }
.disease li { position: relative; padding-left: 20px; font-size: .9rem; color: var(--color-secondary); }
.disease li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }

/* Doctors (専門医のご紹介) */
.doctor-group {
  font-size: 1.05rem; color: var(--color-accent-strong);
  margin: var(--sp-6) 0 var(--sp-4); padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}
.doctor-group:first-child { margin-top: 0; }
.doctor-grid { margin-bottom: var(--sp-2); }
.doctor-card {
  display: block; color: inherit;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-1);
  text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.doctor-card:hover { color: inherit; }
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
@media (prefers-reduced-motion: reduce) { .doctor-card:hover { transform: none; } }
.doctor-photo {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto var(--sp-4);
  object-fit: cover; border: 3px solid var(--color-accent-soft); display: block;
}
.doctor-photo.placeholder {
  display: grid; place-items: center;
  background: var(--color-accent-soft); color: var(--color-accent-strong); border: none;
}
.doctor-photo.placeholder svg { width: 48px; height: 48px; }
.doctor-dept {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .76rem;
  letter-spacing: .04em; color: var(--color-accent-strong);
  background: var(--color-accent-soft); padding: 4px 12px; border-radius: var(--r-pill);
}
.doctor-name { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--color-primary); margin-top: 12px; }
.doctor-name span { display: block; font-size: .8rem; font-weight: 600; color: var(--color-faint-fg); margin-top: 2px; }
.doctor-name.pending { color: var(--color-faint-fg); font-weight: 600; font-size: .95rem; }
.doctor-spec { font-size: .85rem; color: var(--color-muted-fg); margin-top: 10px; }
.doctor-policy { font-size: .92rem; color: var(--color-secondary); line-height: 1.75; margin-top: 10px; }
.doctor-career { font-size: .82rem; color: var(--color-faint-fg); margin-top: 8px; }

/* ================================================================
   Department page (dept.html)
   ================================================================ */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--color-faint-fg); margin-bottom: var(--sp-5); }
.breadcrumb a { color: var(--color-muted-fg); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb span[aria-current] { color: var(--color-primary); font-weight: 600; }

.dept-hero-section { padding-bottom: clamp(32px, 5vw, 56px); }
.dept-hero { max-width: 760px; }
.dept-hero-title { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: var(--sp-4) 0 0; }
.dept-hero-catch { font-family: var(--font-head); font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--color-accent-strong); font-weight: 700; margin-top: var(--sp-4); }
.dept-hero-spec { font-size: .95rem; color: var(--color-muted-fg); margin-top: var(--sp-3); }
.dept-hero-summary { font-size: 1.05rem; line-height: 1.9; color: var(--color-secondary); margin-top: var(--sp-4); }
.dept-hero-disease { font-size: .9rem; color: var(--color-faint-fg); margin-top: var(--sp-4); padding: 10px 16px; background: var(--color-surface-2); border-radius: var(--r-md); display: inline-block; }
.dept-hero-disease strong { color: var(--color-secondary); }
.dept-hero-disease span { display: block; font-size: .82rem; margin-top: 2px; }
.dept-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: var(--sp-6); }

.dept-symptoms { list-style: none; padding: 0; display: grid; gap: var(--sp-4); max-width: 760px; margin-inline: auto; }
.dept-symptoms li {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  font-size: 1.02rem; color: var(--color-secondary); box-shadow: var(--sh-1);
}
.dept-sym-mark {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-watch-bg); color: var(--c-watch);
  font-family: var(--font-head); font-weight: 800; font-size: .95rem;
  display: grid; place-items: center; margin-top: 1px;
}

.svc-card { display: flex; flex-direction: column; }
.svc-card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.svc-tools { font-size: .8rem; color: var(--color-accent-strong); background: var(--color-accent-soft); display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); margin-bottom: var(--sp-3); align-self: flex-start; }

.voice-card {
  position: relative; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); padding: var(--sp-6); margin: 0; box-shadow: var(--sh-1);
}
.voice-quote-icon { color: var(--color-accent-soft); width: 40px; height: 40px; margin-bottom: -8px; }
.voice-quote-icon svg { width: 40px; height: 40px; }
.voice-card blockquote { margin: 0; font-size: 1.02rem; line-height: 1.9; color: var(--color-secondary); }
.voice-card figcaption { display: flex; align-items: center; gap: 8px; margin-top: var(--sp-4); font-weight: 700; font-family: var(--font-head); color: var(--color-primary); font-size: .92rem; }
.voice-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c-healthy-bg); color: var(--c-healthy); }
.voice-check svg { width: 13px; height: 13px; }

.dept-doctor-card {
  display: flex; gap: var(--sp-6); align-items: center; max-width: 720px; margin-inline: auto;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-1);
}
.dept-doctor-card .doctor-photo { width: 120px; height: 120px; margin: 0; flex: none; }
.dept-doctor-body { text-align: left; }
.dept-doctor-body .doctor-name { margin-top: 8px; }
.link-arrow { font-weight: 700; font-family: var(--font-head); color: var(--color-accent); }
.link-arrow:hover { color: var(--color-accent-strong); }
@media (max-width: 600px) { .dept-doctor-card { flex-direction: column; text-align: center; } .dept-doctor-body { text-align: center; } }

.dept-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.dept-chip {
  display: inline-flex; align-items: center; font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  color: var(--color-secondary); padding: 10px 18px; border-radius: var(--r-pill);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.dept-chip:hover { background: var(--color-accent-soft); color: var(--color-accent-strong); border-color: var(--color-accent); transform: translateY(-2px); }

/* Departments (診療科目) */
.dept { display: flex; gap: 16px; align-items: flex-start; color: inherit; }
.dept:hover { color: inherit; }
.dept .icon-chip { margin-bottom: 0; }
.dept-group {
  font-size: 1.05rem; color: var(--color-accent-strong);
  margin: var(--sp-6) 0 var(--sp-4); padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}
.dept-more { display: inline-block; margin-top: 10px; font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: var(--color-accent); }
.dept .dept-more { transition: transform .18s ease; }
.dept:hover .dept-more { color: var(--color-accent-strong); }
.dept-mini { display: flex; gap: 14px; align-items: flex-start; color: inherit; }
.dept-mini:hover { color: inherit; }
.dept-mini .icon-chip { margin-bottom: 0; width: 46px; height: 46px; flex: none; }
.dept-mini .icon-chip svg { width: 24px; height: 24px; }
.dept-mini h3 { font-size: 1rem; margin-bottom: 4px; }
.dept-mini p { font-size: .85rem; color: var(--color-muted-fg); }
.dept-illust {
  width: 84px; height: 84px; flex: none;
  background: #fff; object-fit: cover;
}
.dept h3 { font-size: 1.1rem; margin-bottom: 6px; }
.dept p { font-size: .92rem; color: var(--color-muted-fg); }

/* Testimonials */
.quote { display: flex; flex-direction: column; gap: var(--sp-4); }
.quote p { font-size: 1.02rem; color: var(--color-primary); line-height: 1.85; }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent-strong); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; flex: none; }
.quote .who b { display: block; font-size: .92rem; color: var(--color-primary); }
.quote .who span { font-size: .8rem; color: var(--color-faint-fg); }
.stars { display: flex; gap: 3px; color: #f59e0b; }
.stars svg { width: 18px; height: 18px; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); text-align: center; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .n { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .88rem; color: #94a3b8; margin-top: 8px; }

/* FAQ accordion */
.faq { max-width: 800px; margin-inline: auto; }
.acc { border-bottom: 1px solid var(--color-border); }
.acc-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; background: none; border: none; padding: 22px 4px; font-family: var(--font-head); font-weight: 700; font-size: 1.04rem; color: var(--color-primary); }
.acc-q .chev { width: 22px; height: 22px; flex: none; color: var(--color-accent); transition: transform .25s ease; }
.acc[open] .chev { transform: rotate(180deg); }
.acc-a { padding: 0 4px 22px; color: var(--color-muted-fg); font-size: .96rem; }
.acc summary { list-style: none; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--color-accent-strong), var(--color-primary)); color: #fff; border-radius: var(--r-lg); padding: clamp(36px, 6vw, 64px); text-align: center; box-shadow: var(--sh-3); }
.cta-band h2 { color: #fff; font-family: var(--font-brand); }
.cta-band p { color: #cbd5e1; max-width: 560px; margin: 16px auto 28px; }

/* ================================================================
   Footer
   ================================================================ */
.site-footer { background: var(--color-primary); color: #94a3b8; padding-block: var(--sp-8) var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: #fff; }
.site-footer h4 { color: #e2e8f0; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: #94a3b8; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-about { color: #94a3b8; font-size: .9rem; line-height: 1.8; margin-top: 14px; max-width: 320px; }
.footer-bottom { margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid #1e293b; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .82rem; color: #64748b; }

/* ================================================================
   Reveal on scroll
   ================================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================================================================
   Page hero (sub pages)
   ================================================================ */
.page-hero { background: radial-gradient(120% 100% at 80% -20%, #e0f2fe 0%, rgba(224,242,254,0) 60%), var(--color-background); padding-block: clamp(40px, 6vw, 72px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--color-border); }
.page-hero h1 { font-family: var(--font-brand); font-size: clamp(1.8rem, 4.4vw, 2.7rem); }
.page-hero p { color: var(--color-muted-fg); margin-top: 14px; max-width: 640px; }

/* ================================================================
   Diagnosis (問診) app
   ================================================================ */
.quiz-wrap { max-width: 760px; margin-inline: auto; }
.quiz-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: clamp(22px, 4vw, 40px); }

.progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: .85rem; color: var(--color-faint-fg); font-family: var(--font-head); font-weight: 600; }
.progress-track { height: 8px; background: var(--color-surface-2); border-radius: var(--r-pill); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--color-teal), var(--color-accent)); border-radius: var(--r-pill); transition: width .4s ease; }

.q-cat { display: inline-flex; align-items:center; gap:8px; font-family: var(--font-head); font-weight: 700; font-size: .78rem; letter-spacing: .08em; color: var(--color-accent); text-transform: uppercase; margin: var(--sp-6) 0 10px; }
.q-cat svg { width: 18px; height: 18px; }
.q-text { font-family: var(--font-head); font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 700; color: var(--color-primary); line-height: 1.5; }
.q-help { color: var(--color-faint-fg); font-size: .9rem; margin-top: 10px; }

.options { display: grid; gap: 10px; margin-top: var(--sp-6); }
.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; background: var(--color-surface);
  border: 1.5px solid var(--color-border); border-radius: var(--r-md);
  padding: 15px 18px; min-height: 56px; color: var(--color-primary);
  font-size: 1rem; font-weight: 600; transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.option:active { transform: scale(.99); }
.option.selected { border-color: var(--color-accent); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent); }
.option .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--color-border-strong); flex: none; display: grid; place-items: center; transition: .15s; }
.option.selected .dot { border-color: var(--color-accent); background: var(--color-accent); }
.option .dot svg { width: 14px; height: 14px; color: #fff; opacity: 0; transition: opacity .15s; }
.option.selected .dot svg { opacity: 1; }

.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: var(--sp-6); }
.quiz-nav .btn-ghost[disabled] { opacity: .45; pointer-events: none; }

.quiz-intro { text-align: center; }
.quiz-intro .icon-chip { margin-inline: auto; width: 64px; height: 64px; }
.quiz-intro .icon-chip svg { width: 34px; height: 34px; }
.intro-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: var(--sp-5) 0 var(--sp-6); color: var(--color-muted-fg); font-size: .9rem; }
.intro-meta span { display: inline-flex; align-items: center; gap: 7px; }
.intro-meta svg { width: 18px; height: 18px; color: var(--color-accent); }

/* ---------- Result ---------- */
.result { display: none; }
.result.show { display: block; }
.diagnosis-banner { text-align: center; padding: var(--sp-6) var(--sp-5) var(--sp-7); border-radius: var(--r-lg); color: #fff; box-shadow: var(--sh-3); }
.diagnosis-banner .sev-label { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.2); padding: 6px 16px; border-radius: var(--r-pill); font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .05em; }
.diagnosis-banner .sev-label svg { width: 18px; height: 18px; }
.diagnosis-banner .dname { font-family: var(--font-brand); font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 700; margin: 16px 0 6px; line-height: 1.25; }
.diagnosis-banner .dalias { opacity: .85; font-size: .95rem; }

.score-ring { display: grid; place-items: center; margin: var(--sp-6) auto 0; }
.score-ring svg { width: 168px; height: 168px; transform: rotate(-90deg); }
.score-ring .track { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 12; }
.score-ring .val { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.score-ring .pct { position: absolute; font-family: var(--font-head); font-weight: 700; color: #fff; }
.score-ring .pct b { font-size: 2.6rem; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.score-ring .pct small { font-size: .76rem; opacity: .85; letter-spacing: .1em; }

.result-block { margin-top: var(--sp-7); }
.result-block h3 { font-size: 1.25rem; margin-bottom: var(--sp-4); display: flex; align-items: center; gap: 10px; }
.result-block h3 svg { width: 24px; height: 24px; color: var(--color-accent); }

.sym-grid { display: grid; gap: 10px; }
.sym-grid li { list-style: none; display: flex; gap: 10px; align-items: flex-start; background: var(--color-surface-2); padding: 14px 16px; border-radius: var(--r-md); font-size: .95rem; color: var(--color-secondary); }
.sym-grid svg { width: 20px; height: 20px; color: var(--c-watch); flex: none; margin-top: 2px; }

/* category breakdown bars */
.cat-bars { display: grid; gap: 14px; }
.cat-bar .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cat-bar .cname { font-weight: 600; font-size: .92rem; color: var(--color-primary); }
.cat-bar .cval { font-family: var(--font-head); font-weight: 700; font-size: .86rem; font-variant-numeric: tabular-nums; }
.cat-bar .track { height: 10px; background: var(--color-surface-2); border-radius: var(--r-pill); overflow: hidden; }
.cat-bar .fill { height: 100%; border-radius: var(--r-pill); width: 0; transition: width .9s ease; }

/* prescription */
.rx-list { display: grid; gap: 16px; }
.rx {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid var(--color-border); border-radius: var(--r-md);
  padding: 20px; background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
}
.rx .rx-icon { width: 46px; height: 46px; border-radius: var(--r-sm); background: var(--color-accent-soft); color: var(--color-accent-strong); display: grid; place-items: center; flex: none; }
.rx .rx-icon svg { width: 26px; height: 26px; }
.rx h4 { font-family: var(--font-head); font-size: 1.04rem; color: var(--color-primary); margin: 0 0 4px; }
.rx .rx-tools { font-size: .82rem; color: var(--color-accent-strong); font-weight: 600; margin-bottom: 6px; }
.rx p { font-size: .9rem; color: var(--color-muted-fg); }

.result-cta { margin-top: var(--sp-7); }

.print-hide { }
@media print {
  .site-header, .site-footer, .quiz-nav, .result-cta, .nav-toggle, .print-hide { display: none !important; }
  body { background: #fff; }
}

/* misc */
.text-center { text-align: center; }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.hidden { display: none !important; }
/* hidden 属性を常に優先（.btn-spinner 等の display 指定に勝たせる） */
[hidden] { display: none !important; }
.disclaimer { font-size: .82rem; color: var(--color-faint-fg); }

/* ================================================================
   Lead gate（病名以外をモザイクで隠す → 連絡先入力で解除）
   ================================================================ */
.result-details { transition: filter .5s ease, opacity .5s ease; }
.result-details.locked {
  position: relative;
  max-height: 520px;
  overflow: hidden;
  filter: blur(9px) saturate(.8);
  opacity: .92;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, rgba(0,0,0,.25) 78%, transparent 96%);
          mask-image: linear-gradient(180deg, #000 30%, rgba(0,0,0,.25) 78%, transparent 96%);
}
@media (prefers-reduced-motion: reduce) { .result-details { transition: none; } }

.result-gate { position: relative; z-index: 3; margin: var(--sp-5) 0 var(--sp-6); }
.gate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}
.gate-lock {
  display: inline-grid; place-items: center;
  width: 60px; height: 60px; border-radius: var(--r-pill);
  background: var(--color-accent-soft); color: var(--color-accent-strong);
  margin-bottom: var(--sp-4);
}
.gate-lock svg { width: 30px; height: 30px; }
.gate-card h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
.gate-card p { color: var(--color-muted-fg); font-size: .96rem; margin: 12px auto 22px; max-width: 460px; line-height: 1.85; }
.gate-card .btn { box-shadow: 0 10px 26px -8px rgba(3,105,161,.55); }

.sent-banner {
  display: flex; align-items: center; gap: 14px;
  max-width: 600px; margin-inline: auto;
  background: var(--c-healthy-bg); border: 1px solid #86efac;
  border-radius: var(--r-md); padding: 18px 22px;
  transition: opacity .6s ease, transform .6s ease;
}
.sent-banner.fade-out { opacity: 0; transform: translateY(-8px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sent-banner { transition: none; } }
.sent-banner svg { width: 30px; height: 30px; color: var(--c-healthy); flex: none; }
.sent-banner strong { display: block; color: #14532d; }
.sent-banner span { display: block; font-size: .85rem; color: #166534; margin-top: 2px; }

/* ================================================================
   料金プラン（IT人間ドック）
   ================================================================ */
.plan { display: flex; flex-direction: column; position: relative; }
.plan h3 { font-size: 1.18rem; }
.plan-price { font-family: var(--font-head); font-weight: 800; font-size: 2.1rem; color: var(--color-primary); margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: .82rem; font-weight: 600; color: var(--color-faint-fg); margin-left: 4px; }
.plan > p { color: var(--color-muted-fg); font-size: .92rem; min-height: 2.8em; }
.plan-feat { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 9px; }
.plan-feat li { position: relative; padding-left: 26px; font-size: .9rem; color: var(--color-secondary); line-height: 1.5; }
.plan-feat li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; background: var(--color-accent-soft); border-radius: 50%; }
.plan-feat li::after { content: ""; position: absolute; left: 5px; top: 9px; width: 5px; height: 8px; border: solid var(--color-accent-strong); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan .btn { margin-top: auto; }
.plan-pop { border-color: var(--color-accent); box-shadow: var(--sh-3); }
.plan-badge { position: absolute; top: -12px; right: 22px; background: var(--color-accent); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .76rem; padding: 5px 14px; border-radius: var(--r-pill); }

.dock-select, .dock-textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font-family: var(--font-body); font-size: 1rem; color: var(--color-foreground);
  background: var(--color-surface); border: 1.5px solid var(--color-border-strong);
  border-radius: var(--r-sm);
}
.dock-textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.dock-select:focus, .dock-textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }

/* ================================================================
   SNSシェア / 補助金ノート / 紹介
   ================================================================ */
.share-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 16px; margin: var(--sp-5) 0 0; padding: 16px 18px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-md);
}
.share-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--color-primary); }
.share-label svg { width: 18px; height: 18px; color: var(--color-accent); }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  border: 1.5px solid var(--color-border-strong); background: var(--color-surface);
  color: var(--color-primary); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.share-btn.x { background: #111827; color: #fff; border-color: #111827; }
.share-btn.line { background: #06c755; color: #fff; border-color: #06c755; }
.share-btn.fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.copy:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }
@media (prefers-reduced-motion: reduce) { .share-btn:hover { transform: none; } }

.subsidy-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: var(--sp-5); padding: 16px 18px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--r-md);
}
.subsidy-note svg { width: 26px; height: 26px; color: #b45309; flex: none; margin-top: 2px; }
.subsidy-note p { font-size: .9rem; color: #78350f; line-height: 1.75; }
.subsidy-note strong { color: #92400e; }

.referral-line {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 12px 18px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.12); color: #e2e8f0; font-size: .9rem;
}
.referral-line svg { width: 20px; height: 20px; color: #fff; flex: none; }

/* ================================================================
   Modal（連絡先フォーム）
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(16px, 5vh, 64px) 16px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease;
  overflow-y: auto;
}
.modal-overlay.show { opacity: 1; }
.modal-card {
  position: relative; width: 100%; max-width: 480px;
  background: var(--color-surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); padding: clamp(24px, 5vw, 40px);
  transform: translateY(14px) scale(.98); transition: transform .22s ease;
}
.modal-overlay.show .modal-card { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-card { transition: none; }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  border: none; background: var(--color-surface-2); color: var(--color-secondary);
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--color-border); color: var(--color-primary); }
.modal-close svg { width: 20px; height: 20px; }

/* Form */
.form-field { margin-top: var(--sp-4); }
.form-field label, .consent { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--color-primary); }
.form-field label { display: block; margin-bottom: 6px; }
.req { color: var(--color-destructive); font-weight: 700; }
.form-field input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font-family: var(--font-body); font-size: 1rem; color: var(--color-foreground);
  background: var(--color-surface); border: 1.5px solid var(--color-border-strong);
  border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s;
}
.form-field input::placeholder { color: #94a3b8; }
.form-field input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.form-field input.invalid { border-color: var(--color-destructive); }
.field-error { color: var(--color-destructive); font-size: .82rem; margin-top: 5px; min-height: 1em; }
.form-error { text-align: center; font-weight: 600; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--sp-5); font-weight: 500; line-height: 1.6; color: var(--color-secondary); }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--color-accent); }
.consent a { text-decoration: underline; }

#lead-submit { margin-top: var(--sp-5); }
.btn-spinner { display: inline-flex; align-items: center; gap: 8px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.4s; } }

/* Honeypot（不可視） */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media print {
  .result-details.locked { filter: none !important; max-height: none !important; -webkit-mask-image: none !important; mask-image: none !important; opacity: 1 !important; }
  .result-gate, .modal-overlay { display: none !important; }
}
