/* ============================================
   Factoring Hub - Feature: 手数料シミュレーター
   専用クラスはすべて feature-* 接頭辞（styles.css と衝突させない）
   ============================================ */

/* 見出しの1文字行残り（ウィドウ）対策: 全見出しに適用 */
.feature-hero h1,
.feature-section h2,
.feature-section h3,
.feature-section h4 {
  text-wrap: balance;
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: break-word;
}

/* AdSense Auto ads のヒーロー侵入抑止 */
.feature-hero ins.adsbygoogle,
.feature-hero > ins {
  display: none !important;
}

/* ---------- Hero ---------- */
.feature-hero {
  position: relative;
  margin-top: 72px;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
  background: var(--navy-800);
}

.feature-hero-bg {
  position: absolute;
  inset: 0;
}

.feature-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  opacity: 0.55;
}

.feature-hero-inner {
  position: relative;
  z-index: 1;
}

.feature-ribbon {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  padding: 6px 18px;
  background: #1f9d55;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(31, 157, 85, 0.45);
}

.feature-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.feature-breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-muted);
}

.feature-hero-title {
  font-size: clamp(1.9rem, 3.9vw, 3.4rem);
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(6, 14, 26, 0.8), 0 1px 2px rgba(6, 14, 26, 0.9);
  letter-spacing: 0.02em;
}

.feature-hero-sub {
  max-width: 720px;
  color: var(--text-primary);
  text-shadow: 0 1px 6px rgba(6, 14, 26, 0.85);
  margin-bottom: 0.8rem;
}

.feature-hero-updated {
  font-size: 0.8rem;
  color: var(--gold-300);
  text-shadow: 0 1px 4px rgba(6, 14, 26, 0.85);
}

.feature-hero-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.feature-hero-anchors a {
  padding: 10px 18px;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: var(--gold-300);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(6, 14, 26, 0.55);
  transition: var(--transition-fast);
}

.feature-hero-anchors a:hover {
  background: var(--gold-500);
  color: var(--navy-900);
}

/* ---------- Section 共通 ---------- */
.feature-section {
  padding: clamp(48px, 7vw, 80px) 0;
}

.feature-section-alt {
  background: var(--navy-800);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.feature-section-head {
  margin-bottom: 30px;
}

.feature-section-head h2 {
  position: relative;
  padding-bottom: 14px;
}

.feature-section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

.feature-section-head p {
  max-width: 760px;
}

/* ---------- シミュレーターフォーム ---------- */
.feature-sim-form {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 4vw, 34px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-gold);
}

.feature-field label:first-child,
.feature-field legend {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-300);
  margin-bottom: 8px;
}

.feature-mode-group {
  border: none;
  padding: 0;
}

.feature-field input[type="text"],
.feature-field select {
  width: 100%;
  max-width: 420px;
  padding: 13px 15px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--navy-900);
  border: 1px solid var(--slate);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.feature-field input[type="text"]:focus,
.feature-field select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.feature-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.feature-quick-chips button {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--slate);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.feature-quick-chips button:hover,
.feature-quick-chips button.is-active {
  color: var(--gold-300);
  border-color: var(--border-gold);
  background: rgba(201, 168, 76, 0.08);
}

.feature-radio,
.feature-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 8px;
}

.feature-radio input,
.feature-check input {
  margin-top: 5px;
  accent-color: var(--gold-500);
}

.feature-submit {
  justify-self: start;
  padding: 14px 44px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--navy-900);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.25);
}

.feature-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(201, 168, 76, 0.35);
}

/* ---------- 試算結果 ---------- */
.feature-sim-result {
  margin-top: 30px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
}

.feature-result-title {
  color: var(--gold-300);
}

.feature-result-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0;
}

@media (min-width: 720px) {
  .feature-result-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-result-card {
  padding: 18px;
  background: var(--navy-900);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.feature-result-card h4 {
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.feature-result-card .feature-card-mode {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gold-400);
  border-radius: 999px;
}

.feature-result-card strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}

.feature-result-card .feature-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.feature-result-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-left: 3px solid var(--gold-500);
  padding-left: 12px;
  margin-bottom: 22px;
}

.feature-result-note span {
  color: var(--gold-300);
  font-weight: 700;
}

/* 結果連動 CTA */
.feature-result-match {
  margin-bottom: 24px;
}

.feature-match-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-match-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 12px 16px;
  background: var(--navy-900);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.feature-match-list a {
  font-weight: 700;
}

.feature-match-list .feature-match-fee {
  font-size: 0.85rem;
  color: var(--gold-300);
}

.feature-match-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feature-result-cta {
  position: relative;
  padding: 20px;
  background: linear-gradient(160deg, rgba(201, 168, 76, 0.12), rgba(15, 30, 48, 0.6));
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  margin-bottom: 24px;
}

.feature-pr-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold-200);
  border: 1px solid var(--gold-500);
  border-radius: 4px;
}

.feature-cta-text {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.feature-cta-btn {
  display: inline-block;
  padding: 13px 30px;
  font-weight: 700;
  color: var(--navy-900);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.3);
  transition: var(--transition);
}

.feature-cta-btn:hover {
  color: var(--navy-900);
  transform: translateY(-2px);
}

.feature-cta-sub {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 関連記事 */
.feature-related h4 {
  color: var(--gold-300);
}

.feature-related ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.feature-related li a {
  display: block;
  padding: 10px 14px;
  background: var(--navy-900);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.feature-related li a:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

/* ---------- 比較表 ---------- */
.feature-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.feature-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--bg-card);
}

.feature-table th,
.feature-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle);
}

.feature-table thead th {
  background: var(--navy-700);
  color: var(--gold-300);
  font-size: 0.85rem;
  white-space: nowrap;
}

.feature-table tbody th {
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(42, 74, 110, 0.18);
}

.feature-table tbody td {
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-table tbody tr:last-child th,
.feature-table tbody tr:last-child td {
  border-bottom: none;
}

.feature-table-note,
.feature-db-note,
.feature-about-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feature-table-link,
.feature-howto-link {
  margin-top: 14px;
}

/* ---------- 業者DB ---------- */
.feature-db-controls {
  margin-bottom: 24px;
}

.feature-db-search {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--slate);
  border-radius: 8px;
  margin-bottom: 14px;
}

.feature-db-search:focus {
  outline: none;
  border-color: var(--gold-500);
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.feature-chips button {
  padding: 8px 16px;
  font-size: 0.83rem;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--slate);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.feature-chips button[aria-pressed="true"] {
  color: var(--navy-900);
  background: var(--gold-400);
  border-color: var(--gold-400);
  font-weight: 700;
}

.feature-db-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.feature-db-selects label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 150px;
}

.feature-db-selects select {
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--slate);
  border-radius: 8px;
}

.feature-db-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.feature-db-reset {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--slate);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.feature-db-reset:hover {
  color: var(--gold-300);
  border-color: var(--border-gold);
}

.feature-db-help {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-db-count {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--gold-300);
}

.feature-db-list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.feature-db-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: var(--transition-fast);
}

.feature-db-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.feature-db-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.feature-db-card-head h3 {
  margin: 0;
  font-size: 1.12rem;
}

.feature-db-card-head h3 a {
  color: var(--text-primary);
}

.feature-db-card-head h3 a:hover {
  color: var(--gold-300);
}

.feature-db-operator {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.feature-db-fee {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--gold-300);
  margin-bottom: 10px;
}

.feature-db-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin-bottom: 12px;
}

.feature-db-tags li {
  padding: 3px 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(42, 74, 110, 0.35);
  border-radius: 999px;
}

.feature-db-tags li.feature-tag-yes {
  color: var(--navy-900);
  background: #7fd1a4;
  font-weight: 700;
}

.feature-db-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.feature-db-stale {
  color: #e0a458;
  font-weight: 700;
}

.feature-db-notes {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-left: 2px solid var(--border-subtle);
  padding-left: 10px;
}

.feature-db-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-db-official {
  display: inline-block;
  padding: 9px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-300);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.feature-db-official:hover {
  color: var(--navy-900);
  background: var(--gold-400);
}

.feature-db-error {
  color: #e08585;
  font-size: 0.9rem;
}

/* ---------- チェックリスト ---------- */
.feature-checklist {
  list-style: none;
  display: grid;
  gap: 10px;
  counter-reset: feature-check;
}

.feature-checklist li {
  counter-increment: feature-check;
}

.feature-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-checklist label::before {
  content: counter(feature-check);
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-300);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
}

.feature-checklist input {
  margin-top: 6px;
  accent-color: #c0564f;
}

.feature-checklist li.is-hit label {
  border-color: rgba(192, 86, 79, 0.6);
  background: rgba(192, 86, 79, 0.08);
  color: var(--text-primary);
}

.feature-checklist-verdict {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.feature-checklist-verdict.is-clear {
  color: #7fd1a4;
  background: rgba(31, 157, 85, 0.1);
  border: 1px solid rgba(31, 157, 85, 0.4);
}

.feature-checklist-verdict.is-warn {
  color: #f0b0a8;
  background: rgba(192, 86, 79, 0.12);
  border: 1px solid rgba(192, 86, 79, 0.5);
}

/* ---------- howto ---------- */
.feature-howto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 860px) {
  .feature-howto-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-howto-card {
  display: block;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: var(--transition);
}

.feature-howto-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.feature-howto-step {
  display: inline-block;
  margin-bottom: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--gold-500);
}

.feature-howto-card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-howto-card p {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- about ページ ---------- */
.feature-about {
  padding: clamp(40px, 6vw, 72px) 0;
}

.feature-about article {
  max-width: 860px;
  margin: 0 auto;
}

.feature-about h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  color: var(--text-primary);
}

.feature-about h2 {
  margin-top: 2.4rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1.3rem;
  color: var(--gold-300);
}

.feature-about h3 {
  margin-top: 1.6rem;
  font-size: 1.05rem;
}

.feature-about ul,
.feature-about ol {
  margin: 0 0 1.5rem;
  padding-left: 1.4em;
  color: var(--text-secondary);
}

.feature-about li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.feature-about table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.feature-about th,
.feature-about td {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
  color: var(--text-secondary);
}

.feature-about th {
  background: var(--navy-700);
  color: var(--gold-300);
  white-space: nowrap;
}

.feature-about code {
  padding: 2px 8px;
  font-size: 0.85em;
  color: var(--gold-200);
  background: var(--navy-900);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.feature-source-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.feature-source-list li {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.84rem;
  word-break: break-all;
}

@media (max-width: 600px) {
  .feature-hero {
    margin-top: 64px;
  }
  .feature-ribbon {
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    font-size: 0.7rem;
  }
  .feature-submit {
    width: 100%;
  }
}
