/* Yoritto Article (Web) — 記事ページ共通スタイル
 * 元: docs/02_implementation_plans/adsense-rejection-response.md §4.3 / §5
 * /guide/* /scenarios/* 等の記事ページから使用する。
 *
 * 全ページ常時 link で読み込み、body.article-active class で scoped に適用する。
 */

/* ===== Expo Router の reset を解除 (article 限定で適用) ===== */
body.article-active {
  overflow: auto !important;
  height: auto !important;
  min-height: 100%;
}
body.article-active #root {
  display: block !important;
  height: auto !important;
  min-height: 100vh;
}

/* ===== Tokens ===== */
body.article-active {
  --y-primary: #FF7A6B;
  --y-primary-light: #FFE8E3;
  --y-primary-dark: #E55D4D;
  --y-secondary: #74C7B8;
  --y-secondary-light: #E6F6F3;
  --y-bg: #FFF9F2;
  --y-bg-warm: #FFF6EC;
  --y-surface: #FFFFFF;
  --y-text: #2F2A28;
  --y-text-sub: #7A6F6A;
  --y-text-mute: #A89E98;
  --y-border: #EADFD7;
  --y-border-soft: #F2E9E1;
  --y-warning: #F5A623;
  --y-shadow-card: 0 4px 18px rgba(47, 42, 40, 0.06);
  --y-shadow-pop: 0 12px 36px rgba(47, 42, 40, 0.12);

  font-family: "Hiragino Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.article-app *, .article-page * { box-sizing: border-box; }

/* ===== Header (記事の上部ナビ) ===== */
.article-header {
  height: 64px;
  background: var(--y-surface);
  border-bottom: 1px solid var(--y-border-soft);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 20px;
  position: sticky; top: 0;
  z-index: 50;
}
.article-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.article-brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--y-primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.article-brand-text { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; color: var(--y-text); }
.article-nav { display: flex; gap: 4px; margin-left: 8px; }
.article-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--y-text-sub);
  text-decoration: none;
}
.article-nav a:hover { background: var(--y-bg-warm); color: var(--y-text); }
.article-nav a.active { color: var(--y-primary-dark); background: var(--y-primary-light); font-weight: 600; }
.article-header-spacer { flex: 1; }
.article-cta {
  height: 36px; padding: 0 16px;
  border-radius: 999px;
  background: var(--y-primary);
  color: #fff;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.article-cta:hover { background: var(--y-primary-dark); }

/* ===== Page container ===== */
.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* ===== Crumbs ===== */
.article-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--y-text-sub);
  margin-bottom: 12px;
}
.article-crumbs a { color: var(--y-text-sub); text-decoration: none; }
.article-crumbs a:hover { color: var(--y-text); }
.article-crumbs .sep { color: var(--y-text-mute); }
.article-crumbs .current { color: var(--y-text); font-weight: 600; }

/* ===== Hero ===== */
.article-hero {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--y-border-soft);
}
.article-category {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--y-primary);
  background: var(--y-primary-light);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.article-title {
  font-size: 32px; font-weight: 800; letter-spacing: -0.8px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--y-text);
}
.article-lead {
  font-size: 16px; line-height: 1.8; color: var(--y-text-sub);
  margin: 0 0 18px;
}
.article-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--y-text-mute);
  margin-bottom: 18px;
}
.article-meta-item {
  display: inline-flex; align-items: center; gap: 4px;
}
.article-hero-cta {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  background: var(--y-primary);
  color: #fff;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  text-decoration: none;
}
.article-hero-cta:hover { background: var(--y-primary-dark); }

/* ===== TOC ===== */
.article-toc {
  background: var(--y-bg-warm);
  border: 1px solid var(--y-border-soft);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 32px;
}
.article-toc-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--y-text-sub);
  margin-bottom: 10px;
}
.article-toc ol {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: toc;
}
.article-toc li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--y-text);
  counter-increment: toc;
  padding-left: 28px;
  position: relative;
}
.article-toc li::before {
  content: counter(toc) ".";
  position: absolute;
  left: 0;
  color: var(--y-primary);
  font-weight: 700;
}

/* ===== Section ===== */
.article-section { margin-bottom: 32px; }
.article-section h2 {
  font-size: 24px; font-weight: 800; letter-spacing: -0.4px;
  line-height: 1.4;
  margin: 0 0 14px;
  color: var(--y-text);
}
.article-section h3 {
  font-size: 17px; font-weight: 700;
  margin: 24px 0 8px;
  color: var(--y-text);
}
.article-section p {
  font-size: 15px; line-height: 1.85;
  color: var(--y-text);
  margin: 0 0 14px;
}
.article-section ul, .article-section ol {
  font-size: 15px; line-height: 1.85;
  color: var(--y-text);
  margin: 0 0 14px;
  padding-left: 24px;
}
.article-section li { margin-bottom: 6px; }
.article-section strong {
  font-weight: 700;
  color: var(--y-text);
}

/* ===== Callout ===== */
.article-callout {
  background: var(--y-bg-warm);
  border-left: 3px solid var(--y-primary);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px; line-height: 1.7;
  color: var(--y-text);
}
.article-callout.kind-info { border-left-color: var(--y-primary); background: var(--y-primary-light); }
.article-callout.kind-warn { border-left-color: var(--y-warning); background: rgba(245, 166, 35, 0.08); }
.article-callout.kind-ok { border-left-color: var(--y-secondary); background: var(--y-secondary-light); }
.article-callout-title {
  font-weight: 700;
  margin-bottom: 6px;
}

/* ===== Example Table ===== */
.article-example-table {
  border: 1px solid var(--y-border-soft);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
  background: var(--y-surface);
}
.article-example-table table { width: 100%; border-collapse: collapse; }
.article-example-table th, .article-example-table td {
  padding: 12px 14px;
  font-size: 14px;
  text-align: left;
  border-bottom: 1px solid var(--y-border-soft);
}
.article-example-table th {
  background: var(--y-bg-warm);
  font-weight: 700;
  color: var(--y-text-sub);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.article-example-table tr:last-child td { border-bottom: none; }

/* ===== Related Articles ===== */
.article-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--y-border-soft);
}
.article-related-title {
  font-size: 18px; font-weight: 800;
  margin: 0 0 18px;
  color: var(--y-text);
}
.article-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .article-related-grid { grid-template-columns: 1fr; }
}
.article-related-card {
  background: var(--y-surface);
  border: 1px solid var(--y-border-soft);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.article-related-card:hover {
  border-color: var(--y-primary-light);
  transform: translateY(-1px);
}
.article-related-card-title {
  font-size: 14px; font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.5;
  color: var(--y-text);
}
.article-related-card-desc {
  font-size: 12px; line-height: 1.6;
  color: var(--y-text-sub);
  margin: 0;
}

/* ===== Bottom CTA ===== */
.article-bottom-cta {
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, var(--y-primary-light), var(--y-bg-warm));
  border: 1px solid var(--y-primary-light);
  border-radius: 16px;
  text-align: center;
}
.article-bottom-cta h3 {
  font-size: 22px; font-weight: 800;
  margin: 0 0 12px;
  color: var(--y-text);
}
.article-bottom-cta p {
  font-size: 14px; line-height: 1.7;
  color: var(--y-text-sub);
  margin: 0 0 18px;
}
.article-bottom-cta-button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 28px;
  border-radius: 999px;
  background: var(--y-primary);
  color: #fff;
  font-size: 15px; font-weight: 700;
  border: none; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 122, 107, 0.32);
}
.article-bottom-cta-button:hover { background: var(--y-primary-dark); }

/* ===== Affiliate disclosure ===== */
.article-affiliate-disclosure {
  font-size: 12px; line-height: 1.7;
  color: var(--y-text-mute);
  background: var(--y-bg-warm);
  border: 1px solid var(--y-border-soft);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 24px;
}

/* ===== Hotel affiliate card ===== */
.article-hotel-affiliate {
  margin: 40px 0;
  padding: 28px;
  background: var(--y-surface);
  border: 1px solid var(--y-border);
  border-radius: 16px;
  box-shadow: var(--y-shadow-card);
  text-align: center;
}
.article-hotel-affiliate-ad-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--y-text-mute);
  background: var(--y-bg-warm);
  border: 1px solid var(--y-border-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin: 0 6px 10px 0;
}
.article-hotel-affiliate-label {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--y-secondary);
  background: var(--y-secondary-light);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}
.article-hotel-affiliate-title {
  font-size: 20px; font-weight: 800;
  color: var(--y-text);
  margin: 0 0 10px;
}
.article-hotel-affiliate-body {
  font-size: 14px; line-height: 1.7;
  color: var(--y-text-sub);
  margin: 0 0 18px;
}
.article-hotel-affiliate-button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 28px;
  border-radius: 999px;
  background: var(--y-primary);
  color: #fff;
  font-size: 15px; font-weight: 700;
  border: none; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 122, 107, 0.32);
}
.article-hotel-affiliate-button:hover { background: var(--y-primary-dark); }
.article-hotel-affiliate-note {
  font-size: 11px;
  color: var(--y-text-mute);
  margin: 14px 0 0;
}

/* ===== Footer ===== */
.article-footer {
  border-top: 1px solid var(--y-border-soft);
  padding: 24px;
  background: var(--y-surface);
  text-align: center;
  font-size: 12px;
  color: var(--y-text-mute);
}

/* ===== Native fallback ===== */
.article-native-fallback {
  padding: 48px 24px;
  text-align: center;
}

/* ===== Print ===== */
@media print {
  .article-hotel-affiliate { display: none; }
  .article-affiliate-disclosure { display: none; }
}
