/* ════════════════════════════════════════════════
   components.css — 再利用可能なUIコンポーネント
   ════════════════════════════════════════════════ */


/* ── Section heading ─────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section-heading__en {
  display: inline-block;
  font-family: var(--f-serif);
  font-size: 15px;
  font-weight: var(--fw-normal);
  letter-spacing: 0.16em;
  color: var(--c-gold-dark);
  margin-bottom: var(--sp-4);
}

.section-heading__en::before,
.section-heading__en::after { content: none; }

/* On dark backgrounds */
.section-heading--inverted .section-heading__en {
  color: var(--c-gold-light);
  border-color: var(--c-border-dark);
}

.section-heading__ja {
  display: block;
  font-family: var(--f-serif);
  font-size: 2.5rem;
  font-weight: var(--fw-medium);
  color: var(--c-dark);
  line-height: var(--lh-tight);
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-5);
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}

.section-heading--inverted .section-heading__ja {
  color: var(--c-on-dark);
}

.section-heading__line {
  display: block;
  width: 180px;
  height: 20px;
  position: relative;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
}

.section-heading__line::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--c-gold) 15%,
    var(--c-gold) 85%,
    transparent 100%
  );
  transform: translateY(-50%);
  opacity: 0.55;
}

.section-heading__line::after {
  content: '◈';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.55rem;
  color: var(--c-gold);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading--inverted .section-heading__line::before {
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--c-gold-light) 15%,
    var(--c-gold-light) 85%,
    transparent 100%
  );
}

.section-heading--inverted .section-heading__line::after {
  color: var(--c-gold-light);
}

.section-heading__desc {
  display: block;
  font-size: var(--fs-md);
  font-weight: var(--fw-light);
  color: var(--c-text-muted);
  line-height: var(--lh-loose);
  max-width: 560px;
  margin-inline: auto;
}

.section-heading--inverted .section-heading__desc {
  color: var(--c-on-dark-muted);
}

.section-heading--left {
  text-align: left;
}

.section-heading--left .section-heading__line {
  margin-inline: 0;
}

.section-heading--left .section-heading__line::after {
  left: 48px;
  transform: translateY(-50%);
}

.section-heading--left .section-heading__desc {
  margin-inline: 0;
}

@media (max-width: 768px) {
  .section-heading__ja {
    font-size: var(--fs-3xl);
  }
  .section-heading { margin-bottom: var(--sp-10); }
}


/* ── Mizuhiki divider ────────────────────────────── */
.mizuhiki {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  padding-block: 0;
}

.mizuhiki svg { display: block; width: 100%; }


/* ── Cards ──────────────────────────────────────── */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-sm);
  padding: var(--sp-8);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--tr-base), transform var(--tr-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card--gold-top {
  border-top: 2px solid var(--c-gold);
}

.card--gold-left {
  border-left: 2px solid var(--c-gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.card--featured {
  border: 1.5px solid var(--c-gold);
  box-shadow: var(--shadow-md);
}

.card__label {
  font-family: var(--f-accent);
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  letter-spacing: var(--ls-accent);
  text-transform: uppercase;
  color: var(--c-gold-dark);
  margin-bottom: var(--sp-3);
}

.card__icon {
  width: 108px;
  height: 108px;
  margin: 0 auto var(--sp-5);
  filter: drop-shadow(0 6px 16px rgba(42,39,35,0.15));
}

.card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.8);
}

.card__title {
  font-family: var(--f-serif);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semi);
  color: var(--c-dark);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-4);
  letter-spacing: var(--ls-wide);
}

.card__body {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--c-text-muted);
  line-height: var(--lh-loose);
}

@media (max-width: 768px) {
  .card {
    padding: var(--sp-6);
    min-width: 0;
  }
  .card__title {
    font-size: var(--fs-lg);
  }
}


/* ── Badge ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  letter-spacing: var(--ls-wide);
  border-radius: var(--r-sm);
}

.badge-gold {
  background: var(--c-gold-pale);
  color: var(--c-gold-dark);
  border: 1px solid var(--c-border-gold);
}

.badge-popular {
  background: var(--c-beni);
  color: var(--c-on-dark);
}

.badge-new {
  background: #E8F4F0;
  color: #2D7A6B;
  border: 1px solid rgba(45, 122, 107, 0.25);
}


/* ── Tag ────────────────────────────────────────── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-light);
  background: var(--c-gold-pale);
  color: var(--c-gold-dark);
  border-radius: var(--r-sm);
  letter-spacing: var(--ls-wide);
  border: 1px solid var(--c-border-gold);
}


/* ── Lead text ──────────────────────────────────── */
.lead {
  font-family: var(--f-serif);
  font-size: var(--fs-md);
  font-weight: var(--fw-normal);
  color: var(--c-text-muted);
  line-height: var(--lh-loose);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}


/* ── Step flow (kanji numerals) ──────────────────── */
.step-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin-inline: auto;
}

.step-flow__item {
  display: flex;
  gap: var(--sp-6);
  padding-bottom: var(--sp-10);
  position: relative;
}

.step-flow__item:last-child { padding-bottom: 0; }

.step-flow__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.step-flow__num {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--c-gold);
  background: var(--c-bg-alt);
  color: var(--c-gold-dark);
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-full);
  box-shadow: 0 6px 16px rgba(184, 154, 91, 0.22);
  position: relative;
  z-index: 1;
}

.step-flow__line {
  flex: 1;
  width: 2px;
  min-height: var(--sp-8);
  background: linear-gradient(to bottom, var(--c-gold) 0%, rgba(184, 154, 91, 0.3) 100%);
  margin-top: var(--sp-2);
}

.step-flow__item:last-child .step-flow__line { display: none; }

.step-flow__content {
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-2);
  min-width: 0;
}

.step-flow__title {
  font-family: var(--f-serif);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  color: var(--c-dark);
  margin-bottom: var(--sp-2);
  letter-spacing: var(--ls-wide);
}

.step-flow__body {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--c-text-muted);
  line-height: var(--lh-loose);
}


/* ── FAQ accordion ───────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 740px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color var(--tr-base);
}

.faq-item.is-open { border-color: var(--c-gold); }

.faq-question {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-bg);
  cursor: pointer;
  transition: background var(--tr-fast);
}

.faq-question:hover { background: var(--c-gold-ultra); }

.faq-q-label {
  font-family: var(--f-accent);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  letter-spacing: var(--ls-widest);
  color: var(--c-gold);
  flex-shrink: 0;
}

.faq-q-text {
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  color: var(--c-dark);
  flex: 1;
  line-height: var(--lh-snug);
}

.faq-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid var(--c-border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  transition: background var(--tr-fast), transform var(--tr-base);
  color: var(--c-gold);
  font-size: 1rem;
  line-height: 1;
}

.faq-item.is-open .faq-toggle {
  background: var(--c-gold);
  color: var(--c-bg);
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: var(--sp-1) var(--sp-6) var(--sp-6);
  background: var(--c-gold-ultra);
  border-top: 1px solid var(--c-border-light);
}

.faq-item.is-open .faq-answer { display: block; }

.faq-a-label {
  font-family: var(--f-accent);
  font-size: var(--fs-base);
  letter-spacing: var(--ls-widest);
  color: var(--c-text-muted);
  margin-right: var(--sp-3);
}

.faq-a-text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--c-text-muted);
  line-height: var(--lh-loose);
  padding-top: var(--sp-4);
}


/* ── Comparison table ────────────────────────────── */
.compare-table {
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
}

.compare-table th,
.compare-table td {
  padding: var(--sp-4) var(--sp-5);
  text-align: center;
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: middle;
}

.compare-table th {
  font-family: var(--f-serif);
  font-weight: var(--fw-semi);
  background: var(--c-bg-alt);
  letter-spacing: var(--ls-wide);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: var(--fw-normal);
  padding-left: var(--sp-6);
  color: var(--c-dark);
}

.compare-table thead th {
  background: var(--c-dark);
  color: var(--c-on-dark);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  border-bottom: none;
}

.compare-table thead th.col-featured {
  background: var(--c-gold);
  color: var(--c-bg);
}

.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: var(--c-gold-ultra); }

.compare-table .check  { color: var(--c-gold);    font-size: var(--fs-lg); }
.compare-table .cross  { color: var(--c-border);  font-size: var(--fs-lg); }
.compare-table .partial { color: var(--c-text-muted); font-size: var(--fs-sm); }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-sm);
}


/* ── Price card ──────────────────────────────────── */
.price-card {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: box-shadow var(--tr-base), transform var(--tr-base);
}

.price-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.price-card--featured {
  border: 1.5px solid var(--c-gold);
  box-shadow: var(--shadow-md);
}

.price-card__name {
  font-family: var(--f-serif);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semi);
  color: var(--c-dark);
  letter-spacing: var(--ls-wide);
}

.price-card__sub {
  font-family: var(--f-accent);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-accent);
  color: var(--c-text-muted);
}

.price-card__price { margin: var(--sp-4) 0; }

.price-card__price .amount {
  font-family: var(--f-accent);
  font-size: 2.5rem;
  font-weight: var(--fw-normal);
  color: var(--c-gold-dark);
  letter-spacing: 0.02em;
}

.price-card__price .unit {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.price-card__details {
  text-align: left;
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--c-text-muted);
  border-top: 1px solid var(--c-border-light);
  padding-top: var(--sp-6);
  margin-top: var(--sp-2);
  line-height: var(--lh-loose);
}

.price-card__details li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.price-card__details li::before {
  content: '—';
  color: var(--c-gold);
  flex-shrink: 0;
}

.price-card__cta {
  margin-top: auto;
  padding-top: var(--sp-6);
}


/* ── Form components ─────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  color: var(--c-dark);
  letter-spacing: var(--ls-wide);
}

.form-label .required {
  color: var(--c-beni);
  margin-left: var(--sp-1);
  font-size: var(--fs-xs);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  color: var(--c-dark);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(184, 154, 91, 0.15);
}

.form-input.error,
.form-select.error,
.form-textarea.error { border-color: var(--c-beni); }

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--c-beni);
  min-height: 1em;
}

.form-hint {
  font-size: var(--fs-xs);
  font-weight: var(--fw-light);
  color: var(--c-text-muted);
}

.form-select-wrap { position: relative; }

.form-select-wrap::after {
  content: '';
  position: absolute;
  right: var(--sp-5);
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--c-text-muted);
  pointer-events: none;
}


/* ── CTA section ─────────────────────────────────── */
.cta-section {
  background-color: var(--c-beni);
  color: var(--c-on-dark);
  padding: var(--sp-24) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(251, 248, 240, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section__en {
  font-family: var(--f-serif);
  font-size: var(--fs-sm);
  letter-spacing: 0.16em;
  color: rgba(251, 248, 240, 0.70);
  margin-bottom: var(--sp-4);
  display: block;
}

.cta-section__title {
  font-family: var(--f-serif);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-6);
  letter-spacing: var(--ls-wide);
}

.cta-section__desc {
  font-size: var(--fs-md);
  font-weight: var(--fw-light);
  color: var(--c-on-dark-muted);
  margin-bottom: var(--sp-10);
  line-height: var(--lh-loose);
}

.cta-section__btns {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cta-section__title { font-size: var(--fs-3xl); }
  .cta-section__btns { flex-direction: column; align-items: center; }
}


/* ── Gold line divider ───────────────────────────── */
.divider-gold {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-12) 0;
}

.divider-gold::before,
.divider-gold::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-gold), transparent);
  opacity: 0.4;
}

.divider-gold__mark {
  font-size: 0.5rem;
  color: var(--c-gold);
  letter-spacing: 0;
}


/* ── Diagnosis Floating Banner ───────────────────── */
.diag-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  width: min(900px, calc(100% - 48px));
  z-index: 60;
  background: var(--c-dark);
  border-top: 2px solid var(--c-gold);
  border-radius: var(--r-md);
  box-shadow: 0 24px 64px rgba(42, 39, 35, 0.44), 0 6px 18px rgba(42, 39, 35, 0.22);
  transform: translateX(-50%) translateY(calc(100% + 48px));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.diag-banner.is-visible {
  transform: translateX(-50%) translateY(0);
}

.diag-banner__inner {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.diag-banner__text {
  flex: 1;
  min-width: 0;
}

.diag-banner__label {
  display: block;
  font-family: var(--f-accent);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--c-gold-light);
  margin-bottom: 5px;
}

.diag-banner__desc {
  display: block;
  font-family: var(--f-serif);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  color: var(--c-on-dark);
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.diag-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.diag-banner__btn {
  display: inline-block;
  font-family: var(--f-serif);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: var(--r-full);
  transition: background var(--tr-fast), border-color var(--tr-fast), color var(--tr-fast),
              transform var(--tr-fast), box-shadow var(--tr-fast);
}

.diag-banner__btn--primary {
  background: var(--c-on-dark);
  color: var(--c-dark);
  border: 1px solid var(--c-on-dark);
}

.diag-banner__btn--primary:hover {
  background: var(--c-gold-light);
  border-color: var(--c-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(42, 39, 35, 0.25);
}

.diag-banner__btn--secondary {
  background: linear-gradient(100deg, var(--c-gold) 0%, var(--c-beni) 100%);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(176, 72, 79, 0.35);
}

.diag-banner__btn--secondary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 32px rgba(176, 72, 79, 0.48);
}

.diag-banner__btn:active {
  transform: translateY(0) scale(0.98);
}

.diag-banner__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(218, 201, 161, 0.4);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 4px 6px 10px;
  margin-left: var(--sp-1);
  transition: color var(--tr-fast);
}

.diag-banner__close:hover {
  color: var(--c-on-dark);
}

@media (max-width: 720px) {
  .diag-banner {
    width: calc(100% - 32px);
    bottom: 16px;
  }
  .diag-banner__inner {
    padding: 14px 16px;
    gap: var(--sp-4);
    flex-wrap: wrap;
  }
  .diag-banner__text {
    flex: 0 0 100%;
  }
  .diag-banner__desc {
    display: none;
  }
  .diag-banner__actions {
    flex: 1;
  }
  .diag-banner__btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: var(--fs-xs);
  }
  .diag-banner__close {
    margin-left: 0;
    padding: 6px 0 6px 8px;
  }
}

@media (max-width: 400px) {
  .diag-banner__actions {
    gap: var(--sp-2);
  }
  .diag-banner__btn {
    padding: 9px 8px;
  }
}
