/* ═══════════════════════════════════════════
   IKEOJI Hige Simulator v5 — Mobile-first CSS
   ═══════════════════════════════════════════ */
:root {
  --ihc-pri: #1d4ed8;
  --ihc-pri-l: #dbeafe;
  --ihc-bg: #f8fafc;
  --ihc-card: #fff;
  --ihc-bdr: #e2e8f0;
  --ihc-tx: #0f172a;
  --ihc-sub: #64748b;
  --ihc-mu: #94a3b8;
  --ihc-ok: #059669;
  --ihc-ok-bg: #ecfdf5;
  --ihc-wn: #d97706;
  --ihc-wn-bg: #fffbeb;
  --ihc-ng: #dc2626;
  --ihc-ng-bg: #fef2f2;
  --ihc-radius: 14px;
}

/* ── Reset & Base ── */
.ihc-root {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Helvetica Neue', sans-serif;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 12px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  color: var(--ihc-tx);
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}
.ihc-root *, .ihc-root *::before, .ihc-root *::after {
  box-sizing: border-box;
}
.ihc-root button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ihc-empty {
  padding: 20px;
  border: 1px solid var(--ihc-bdr);
  background: var(--ihc-bg);
  border-radius: var(--ihc-radius);
  text-align: center;
  color: var(--ihc-sub);
}

/* ── Header ── */
.ihc-header { text-align: center; margin-bottom: 16px; }
.ihc-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--ihc-pri); letter-spacing: 2px;
  background: var(--ihc-pri-l); padding: 3px 12px; border-radius: 99px;
}
.ihc-title { font-size: 19px; font-weight: 800; margin: 6px 0 2px; line-height: 1.3; }
.ihc-subtitle { font-size: 12px; color: var(--ihc-sub); margin: 0; }
.ihc-subtitle strong { color: var(--ihc-pri); }

/* ── Step Bar ── */
.ihc-steps {
  display: flex; gap: 4px; margin-bottom: 20px; align-items: center;
}
.ihc-step-item { display: flex; align-items: center; gap: 3px; }
.ihc-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex-shrink: 0;
  color: #fff;
}
.ihc-step-num--done { background: var(--ihc-ok); }
.ihc-step-num--active { background: var(--ihc-pri); }
.ihc-step-num--future { background: var(--ihc-bdr); color: var(--ihc-mu); }
.ihc-step-label { font-size: 11px; white-space: nowrap; }
.ihc-step-label--done { color: var(--ihc-ok); font-weight: 500; }
.ihc-step-label--active { color: var(--ihc-pri); font-weight: 800; }
.ihc-step-label--future { color: var(--ihc-mu); font-weight: 500; }
.ihc-step-line { width: 10px; height: 1.5px; flex-shrink: 0; }
.ihc-step-line--done { background: var(--ihc-ok); }
.ihc-step-line--future { background: var(--ihc-bdr); }

/* ── Section headings ── */
.ihc-sec-title { font-size: 18px; font-weight: 800; margin: 0 0 4px; line-height: 1.3; }
.ihc-sec-sub { font-size: 13px; color: var(--ihc-sub); margin: 0 0 16px; line-height: 1.5; }

/* ── Card button (goal, thickness, part group) ── */
.ihc-card-btn {
  width: 100%; text-align: left; cursor: pointer;
  border-radius: var(--ihc-radius); padding: 14px 16px;
  background: var(--ihc-card); transition: all .2s;
  display: flex; gap: 12px; align-items: flex-start;
}
.ihc-card-btn--off { border: 1.5px solid var(--ihc-bdr); }
.ihc-card-btn--on { border: 2.5px solid var(--ihc-pri); background: #1d4ed808; box-shadow: 0 0 0 3px #1d4ed815; }
.ihc-card-btn--dashed { border: 2px dashed #1d4ed880; }
.ihc-card-emoji { font-size: 30px; line-height: 1; flex-shrink: 0; }
.ihc-card-body { flex: 1; min-width: 0; }
.ihc-card-title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.ihc-card-life { font-size: 13px; font-weight: 600; margin-top: 2px; }
.ihc-card-detail { font-size: 12px; color: var(--ihc-sub); margin-top: 6px; line-height: 1.6; }
.ihc-card-pills { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* ── Pill / Tag ── */
.ihc-pill {
  font-size: 11px; padding: 4px 10px; border-radius: 99px;
  background: var(--ihc-bg); color: var(--ihc-sub);
  border: 1px solid var(--ihc-bdr); font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}

/* ── All-select (ヒゲ全体) ── */
.ihc-all-btn {
  width: 100%; text-align: center; cursor: pointer;
  padding: 16px; border-radius: var(--ihc-radius); margin-bottom: 12px;
  min-height: 56px; font-size: 16px; font-weight: 800;
  color: var(--ihc-pri); transition: all .2s;
}
.ihc-all-btn--off { border: 2px dashed #1d4ed880; background: var(--ihc-card); }
.ihc-all-btn--on { border: 2.5px solid var(--ihc-pri); background: var(--ihc-pri-l); box-shadow: 0 0 0 3px #1d4ed815; }

/* ── Part toggle chips ── */
.ihc-chip {
  padding: 10px 16px; border-radius: 99px; min-height: 44px;
  font-size: 14px; cursor: pointer; transition: all .15s;
}
.ihc-chip--off { border: 1.5px solid var(--ihc-bdr); background: var(--ihc-card); color: var(--ihc-sub); font-weight: 500; }
.ihc-chip--on { font-weight: 700; }

/* ── Condition question ── */
.ihc-cq { border: 1px solid var(--ihc-bdr); border-radius: var(--ihc-radius); padding: 14px 16px; background: var(--ihc-card); }
.ihc-cq-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.ihc-cq-desc { font-size: 12px; color: var(--ihc-sub); line-height: 1.5; }
.ihc-cq-tip {
  font-size: 11px; color: var(--ihc-wn); background: var(--ihc-wn-bg);
  padding: 8px 10px; border-radius: 10px; margin: 6px 0 10px; line-height: 1.6;
}
.ihc-cq-opts { display: flex; gap: 8px; }
.ihc-cq-opt {
  flex: 1; padding: 12px 8px; border-radius: 10px; min-height: 48px;
  font-size: 14px; cursor: pointer; transition: all .15s; text-align: center;
}
.ihc-cq-opt--off { border: 1.5px solid var(--ihc-bdr); background: var(--ihc-card); color: var(--ihc-tx); font-weight: 500; }
.ihc-cq-opt--on { border: 2.5px solid var(--ihc-pri); background: var(--ihc-pri-l); color: var(--ihc-pri); font-weight: 700; }

/* ── Bottom sticky nav ── */
.ihc-bottom-nav {
  position: sticky; bottom: 0; left: 0; right: 0;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--ihc-bg) 24%);
  display: flex; gap: 8px; margin-top: 16px; z-index: 10;
}
.ihc-btn-pri {
  flex: 1; padding: 14px; border-radius: 12px; border: none;
  background: var(--ihc-pri); color: #fff;
  font-weight: 700; font-size: 15px; cursor: pointer; min-height: 48px;
}
.ihc-btn-pri:disabled { opacity: .4; cursor: not-allowed; }
.ihc-btn-sec {
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--ihc-bdr); background: var(--ihc-card);
  color: var(--ihc-tx); font-weight: 600; font-size: 14px;
  cursor: pointer; min-height: 48px;
}

/* ── Nav buttons (results page) ── */
.ihc-nav-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ihc-nav-btn {
  padding: 8px 14px; border-radius: 10px;
  border: 1.5px solid var(--ihc-bdr); background: var(--ihc-card);
  color: var(--ihc-tx); font-weight: 600; font-size: 12px;
  cursor: pointer; min-height: 40px;
  display: flex; align-items: center; gap: 4px;
}

/* ── Tags row (horizontal scroll) ── */
.ihc-tags {
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 8px; margin-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

/* ── Recommend banner ── */
.ihc-recommend {
  padding: 8px 12px; border-radius: 10px;
  background: var(--ihc-pri-l); margin-bottom: 14px;
  font-size: 13px; font-weight: 600; color: var(--ihc-pri); text-align: center;
}

/* ── Result card ── */
.ihc-result { border-radius: 16px; overflow: hidden; background: var(--ihc-card); }
.ihc-result--top { border: 2.5px solid var(--ihc-pri); box-shadow: 0 4px 20px rgba(29,78,216,.1); }
.ihc-result--other { border: 1.5px solid var(--ihc-bdr); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.ihc-result--empty { border: 1.5px dashed var(--ihc-bdr); border-radius: var(--ihc-radius); padding: 16px; opacity: .55; }

.ihc-result-head {
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.ihc-result-head--top { background: var(--ihc-pri); }
.ihc-result-head--other { background: var(--ihc-bg); }
.ihc-result-clinic { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ihc-result-badge {
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.22); padding: 4px 12px; border-radius: 99px;
}

.ihc-result-body { padding: 14px 16px; }

/* Alert banners */
.ihc-alert {
  font-size: 12px; padding: 8px 10px; border-radius: 10px;
  margin-bottom: 6px; line-height: 1.5; font-weight: 600;
}
.ihc-alert--warn { background: var(--ihc-wn-bg); color: #92400e; }
.ihc-alert--info { background: #ede9fe; color: #5b21b6; }
.ihc-alert--danger { background: var(--ihc-ng-bg); color: #991b1b; }
.ihc-alert--ok { background: var(--ihc-ok-bg); color: var(--ihc-ok); }

/* Price box */
.ihc-price-box { background: var(--ihc-bg); border-radius: 12px; padding: 14px; margin: 8px 0 12px; }
.ihc-price-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ihc-price-label { font-size: 12px; color: var(--ihc-sub); }
.ihc-price-value { font-size: 14px; font-weight: 600; }
.ihc-price-divider { border-top: 1.5px dashed var(--ihc-bdr); margin: 8px 0; }
.ihc-price-total-label { font-size: 14px; font-weight: 700; }
.ihc-price-total { font-size: 24px; font-weight: 900; color: var(--ihc-pri); letter-spacing: -.5px; }
.ihc-price-unit { text-align: right; font-size: 12px; color: var(--ihc-sub); margin-top: 2px; }
.ihc-price-unit strong { color: var(--ihc-tx); font-size: 13px; }

/* After course */
.ihc-after { background: var(--ihc-wn-bg); border: 1px solid #fde68a; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ihc-after-title { font-size: 12px; font-weight: 700; color: #92400e; margin-bottom: 4px; }
.ihc-after-body { font-size: 12px; color: #78350f; line-height: 1.7; }

/* Accordion */
.ihc-accordion-btn {
  width: 100%; padding: 10px; border-radius: 10px;
  border: 1px solid var(--ihc-bdr); background: var(--ihc-card);
  cursor: pointer; font-size: 13px; color: var(--ihc-sub); font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.ihc-accordion-body { font-size: 12px; color: var(--ihc-sub); line-height: 1.8; padding: 0 4px; margin-bottom: 10px; }

/* Why box */
.ihc-why {
  font-size: 11px; color: var(--ihc-mu); background: var(--ihc-bg);
  padding: 8px 10px; border-radius: 10px; line-height: 1.6; margin-bottom: 12px;
}
.ihc-why strong { color: var(--ihc-tx); }

/* CTA link */
.ihc-cta {
  display: block; text-align: center; padding: 14px; border-radius: 12px;
  text-decoration: none; font-size: 15px; font-weight: 700;
  min-height: 48px; line-height: 20px;
}
.ihc-cta--top { background: var(--ihc-pri); color: #fff; border: none; }
.ihc-cta--other { background: var(--ihc-bg); color: var(--ihc-tx); border: 1.5px solid var(--ihc-bdr); }

/* Disclaimer */
.ihc-disclaimer {
  margin-top: 18px; padding: 12px; border-radius: 12px;
  background: var(--ihc-bg); font-size: 11px; color: var(--ihc-mu);
  line-height: 1.7; border: 1px solid var(--ihc-bdr);
}

/* Selection summary */
.ihc-sel-summary {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  background: var(--ihc-pri-l); text-align: center;
  font-size: 13px; font-weight: 700; color: var(--ihc-pri);
}

/* Tip box */
.ihc-tip {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  background: var(--ihc-wn-bg); font-size: 12px; color: var(--ihc-wn); line-height: 1.6;
}

/* Utility */
.ihc-gap-10 > * + * { margin-top: 10px; }
.ihc-gap-14 > * + * { margin-top: 14px; }
.ihc-small-label { font-size: 12px; font-weight: 600; color: var(--ihc-sub); margin-bottom: 8px; }
.ihc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
