:root {
  --bg-paper: #F6F5F0;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EFECE6;
  --ink: #141413;
  --ink-secondary: #575652;
  --ink-muted: #85837D;
  --line: #DFDDD4;
  --line-dark: #141413;
  --accent-red: #C83A2B;
  --accent-red-bg: #FDF3F2;
  --accent-green: #1A6344;
  --accent-green-bg: #EFF7F3;
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--ink);
  line-height: 1.7;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

.mono-num,
.mono-label {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }
}

/* --------------------------------------------------------------------------
   最上部ステータスバー（リアルタイム為替＆次回更新時刻）
   -------------------------------------------------------------------------- */
.status-bar {
  background: var(--ink);
  color: #F6F5F0;
  font-size: 0.78rem;
  padding: 9px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #2C2C2A;
}

.status-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.live-indicator.fetching {
  background: #FBBF24;
  transform: scale(1.3);
}

.mono-label {
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.status-bar .mono-label {
  color: #A3A19A;
}

.spot-value {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 500;
  color: #FFFFFF;
}

.spot-unit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #A3A19A;
}

.spot-diff {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.spot-diff.up {
  color: #FCA5A5;
}

.spot-diff.down {
  color: #6EE7B7;
}

.slash-divider {
  color: #575652;
  transform: rotate(15deg);
  display: inline-block;
}

.update-meta {
  color: #C7C5BD;
  font-size: 0.75rem;
}

.refresh-btn {
  background: transparent;
  color: #F6F5F0;
  border: 1px solid #4A4945;
  padding: 2px 9px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.refresh-btn:hover {
  background: #F6F5F0;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   マストヘッド＆エディトリアルヒーロー (feau.jp 風の余白・30度斜線モチーフ)
   -------------------------------------------------------------------------- */
.masthead {
  padding: 36px 0 56px;
  border-bottom: 1px solid var(--line);
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 30度の傾きを持つシグネチャーライン */
.slash-mark {
  display: inline-block;
  width: 2px;
  height: 22px;
  background: var(--ink);
  transform: rotate(30deg);
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.masthead-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.masthead-nav a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.masthead-nav a:hover {
  color: var(--ink);
}

.hero-editorial {
  max-width: 880px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.hero-editorial h1 {
  font-size: clamp(1.65rem, 3.3vw, 2.65rem);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.underline-accent {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.hero-lead {
  font-size: 0.98rem;
  color: var(--ink-secondary);
  line-height: 1.85;
  max-width: 780px;
}

/* --------------------------------------------------------------------------
   共通セクション見出し
   -------------------------------------------------------------------------- */
.section-heading-row {
  margin-bottom: 28px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--ink-secondary);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   セクション1：なぜこのサイトを使うべきか (WHY THIS MATTERS)
   -------------------------------------------------------------------------- */
.why-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 920px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-card {
  padding: 28px 26px;
  background: var(--bg-paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.why-card + .why-card {
  border-left: 1px solid var(--line);
}

@media (max-width: 920px) {
  .why-card + .why-card {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

.why-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.why-card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  line-height: 1.45;
}

.why-card p {
  font-size: 0.87rem;
  color: var(--ink-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.mini-comparison {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 0.82rem;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: var(--ink-secondary);
}

.mini-row + .mini-row {
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding-top: 8px;
}

.mini-row.highlight-row {
  color: var(--ink);
  font-weight: 600;
}

.mini-row.highlight-row strong {
  color: var(--accent-red);
}

/* --------------------------------------------------------------------------
   セクション2：メインシミュレーター 2カラム
   -------------------------------------------------------------------------- */
.simulator-section {
  padding: 56px 28px;
}

@media (max-width: 640px) {
  .simulator-section {
    padding: 40px 18px;
  }
}

.main-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 28px;
}

.step-block + .step-block {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.step-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: #FFF;
  padding: 2px 8px;
}

.step-header h3 {
  font-size: 1.1rem;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

/* カテゴリフィルタータブ */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.filter-tab {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.filter-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-tab.active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

/* AIサービス選択グリッド（ブランドアイコン付き） */
.saas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  .saas-grid {
    grid-template-columns: 1fr;
  }
}

.saas-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 11px 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  gap: 10px;
}

.saas-item:hover {
  border-color: var(--ink);
}

.saas-item.active {
  background: var(--bg-paper);
  border-color: var(--ink);
  box-shadow: inset 3px 0 0 var(--ink);
}

.saas-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.saas-left input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.brand-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.saas-meta {
  min-width: 0;
}

.saas-name {
  font-weight: 700;
  font-size: 0.86rem;
  display: block;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-plan {
  font-size: 0.72rem;
  color: var(--ink-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--ink);
  flex-shrink: 0;
}

/* カスタムUSD入力 */
.custom-usd-box {
  margin-top: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.custom-usd-info label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
}

.custom-usd-hint {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 6px;
}

.unit-prefix,
.unit-suffix {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.input-with-unit input {
  background: var(--bg-surface);
  border: 1px solid var(--line-dark);
  color: var(--ink);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  width: 96px;
  text-align: right;
}

/* フォーム・スライダー */
.form-group {
  margin-top: 18px;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

.select-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-paper);
  border: 1px solid var(--line-dark);
  color: var(--ink);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  border-radius: 0;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-val {
  font-size: 0.95rem;
}

input[type="range"] {
  width: 100%;
  margin: 8px 0 4px;
  accent-color: var(--ink);
}

.slider-hints {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.rate-quick-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip-btn {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   右カラム：結果表示＆アフィリエイト導線
   -------------------------------------------------------------------------- */
.result-sticky {
  position: sticky;
  top: 52px;
}

.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-dark);
  padding: 24px;
}

.result-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.usd-summary {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.rate-comparison-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.strip-col {
  display: flex;
  flex-direction: column;
}

.strip-label {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.strip-val {
  font-size: 0.96rem;
}

.active-strip .strip-val {
  color: var(--accent-red);
  font-weight: 700;
}

.strip-arrow {
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.main-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .main-numbers {
    grid-template-columns: 1fr;
  }
}

.num-box {
  border: 1px solid var(--line);
  padding: 16px;
  background: var(--bg-surface);
}

.num-box.highlight-box {
  background: var(--bg-paper);
  border-color: var(--line-dark);
}

.num-label {
  font-size: 0.76rem;
  color: var(--ink-secondary);
  display: block;
}

.num-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  margin: 4px 0;
  letter-spacing: -0.02em;
}

.num-value small {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 4px;
}

.num-sub {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  display: block;
}

.loss-breakdown {
  margin-top: 16px;
  background: var(--accent-red-bg);
  border-left: 3px solid var(--accent-red);
  padding: 14px 16px;
}

.loss-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 4px;
}

.loss-amount {
  font-size: 1.05rem;
}

.loss-note {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.share-box {
  margin-top: 16px;
}

.share-x-btn {
  width: 100%;
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
  padding: 11px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.share-x-btn:hover {
  background: #2C2C2A;
}

/* ソリューションCTA群 */
.solutions-block {
  margin-top: 24px;
}

.solutions-header {
  margin-bottom: 12px;
}

.solutions-header h3 {
  font-size: 1rem;
}

.cta-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 18px;
  margin-bottom: 12px;
}

.cta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cta-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.saving-pill {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
}

.cta-card h4 {
  font-size: 0.94rem;
  margin-bottom: 6px;
}

.cta-card p {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-bottom: 12px;
  line-height: 1.65;
}

.cta-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.cta-btn-dark {
  background: var(--ink);
  color: #FFFFFF;
}

.cta-btn-dark:hover {
  background: #2C2C2A;
}

.cta-btn-outline {
  background: var(--bg-paper);
  color: var(--ink);
  border: 1px solid var(--line-dark);
}

.cta-btn-outline:hover {
  background: var(--ink);
  color: #FFFFFF;
}

.btn-arrow {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   セクション3：利用スタイル別・年間差額マトリクス表
   -------------------------------------------------------------------------- */
.comparison-section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-surface);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: var(--bg-surface);
}

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

.comparison-table th {
  background: var(--bg-paper);
  font-weight: 700;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--line-dark);
}

.comparison-table th small {
  font-weight: 400;
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.comparison-table td.num-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.comparison-table .col-Highlight {
  background: #FAF8F5;
  font-weight: 700;
}

.comparison-table .loss-cell {
  color: var(--accent-red);
  font-weight: 600;
}

.comparison-table .save-cell {
  color: var(--accent-green);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   フッター
   -------------------------------------------------------------------------- */
.footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-note {
  max-width: 720px;
  margin-top: 10px;
  line-height: 1.7;
}

.footer-pr-note {
  max-width: 720px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   PR表記・ステマ規制対応 & 最大効率CTA・余白広告スロット・FAQ
   -------------------------------------------------------------------------- */
.pr-disclosure-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  background: var(--bg-surface);
  padding: 2px 8px;
  white-space: nowrap;
}

.solutions-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pr-inline-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  background: var(--bg-surface);
  padding: 1px 7px;
}

.cta-card-recommended {
  border-color: var(--line-dark);
  border-left: 3px solid var(--ink);
  box-shadow: 0 2px 10px rgba(20, 20, 19, 0.05);
}

.tracking-pixel-host {
  display: block;
  width: 1px;
  height: 1px;
  overflow: hidden;
  line-height: 0;
}

/* 余白活用バナー帯（横長・レスポンシブ） */
.ad-banner-band {
  padding: 20px 0;
  background: var(--bg-paper);
  border-top: 1px solid var(--line);
}

.ad-banner-band-subtle {
  background: var(--bg-subtle);
}

.ad-banner-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ad-slot-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: center;
}

.ad-slot-body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 100%;
  overflow: hidden;
}

.ad-slot-body img {
  max-width: 100%;
  height: auto;
}

/* ワイドPC画面（幅1520px以上）専用：左右余白追従レール */
.ad-side-rail {
  display: none;
}

@media (min-width: 1520px) {
  .ad-side-rail:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: fixed;
    top: 96px;
    width: 164px;
    z-index: 30;
  }

  .ad-side-rail-left {
    left: 16px;
  }

  .ad-side-rail-right {
    right: 16px;
  }
}

/* セクション4：FAQ */
.faq-section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-paper);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 20px 22px;
}

.faq-item h3 {
  font-size: 0.94rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.faq-item p {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.75;
}
