/*
Theme Name: OtonaGadget
Theme URI: https://otonagadget.com
Author: OtonaGadget Lab
Description: 高速・依存ゼロのレビュー特化テーマ。年齢確認・PR表記・アフィリボタン・構造化データを標準装備。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: otonagadget
*/

:root {
  --ink: #1c1c22;
  --ink-soft: #55555e;
  --paper: #fafaf7;
  --card: #ffffff;
  --line: #e4e4dd;
  --accent: #14507a;
  --accent-soft: #e8f0f6;
  --cta: #c96a1e;
  --cta-dark: #a5540f;
  --radius: 10px;
  --maxw: 760px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt";
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Layout */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}
.site-title a { color: var(--ink); }
.site-title a:hover { text-decoration: none; }
.site-tagline { font-size: 12px; color: var(--ink-soft); }

.main-nav ul { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; }
.main-nav a { font-size: 14px; color: var(--ink-soft); }

.site-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* Cards / entries */
.entry-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.entry-card h2 { font-size: 18px; line-height: 1.5; }
.entry-card h2 a { color: var(--ink); }
.entry-meta { font-size: 12px; color: var(--ink-soft); margin: 6px 0 8px; }
.entry-excerpt { font-size: 14px; color: var(--ink-soft); }

/* Single article */
.post-title { font-size: 26px; line-height: 1.45; margin-bottom: 8px; }
.post-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 20px; }

.pr-notice {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 20px;
}

.post-content h2 {
  font-size: 21px;
  line-height: 1.5;
  margin: 44px 0 16px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0;
}
.post-content h3 {
  font-size: 18px;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}
.post-content p { margin: 0 0 1.4em; }
.post-content ul, .post-content ol { margin: 0 0 1.4em 1.4em; }
.post-content li { margin-bottom: .4em; }
.post-content strong { background: linear-gradient(transparent 65%, #fce9b8 65%); }

/* Spec tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 14px;
  background: var(--card);
}
.post-content th, .post-content td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.post-content th { background: var(--accent-soft); font-weight: 700; white-space: nowrap; }
.post-content tr:nth-child(even) td { background: #f6f6f2; }
.table-scroll { overflow-x: auto; }

/* CTA button */
.aff-btn {
  display: block;
  max-width: 420px;
  margin: 20px auto 6px;
  padding: 15px 22px;
  background: var(--cta);
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--cta-dark);
  transition: transform .08s ease;
}
.aff-btn:hover { text-decoration: none; transform: translateY(1px); box-shadow: 0 2px 0 var(--cta-dark); }
.aff-note { font-size: 11px; color: var(--ink-soft); text-align: center; margin-bottom: 20px; }

/* Info boxes */
.box-point, .box-caution {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 1.6em;
  font-size: 15px;
}
.box-point { background: var(--accent-soft); border: 1px solid #c3d8e8; }
.box-caution { background: #fdf1ec; border: 1px solid #efcdbc; }
.box-point::before { content: "ポイント"; }
.box-caution::before { content: "注意"; }
.box-point::before, .box-caution::before {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
}

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.pagination .page-numbers {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  font-size: 14px;
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 28px 16px 36px;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-nav ul { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.badge-r18 {
  display: inline-block;
  border: 2px solid #b3352b;
  color: #b3352b;
  font-weight: 700;
  font-size: 12px;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
}

/* Age gate */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 24, .96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.age-gate-box {
  background: var(--card);
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  padding: 32px 26px;
  text-align: center;
}
.age-gate-box h2 { font-size: 20px; margin-bottom: 12px; }
.age-gate-box p { font-size: 14px; color: var(--ink-soft); margin-bottom: 22px; }
.age-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.age-yes, .age-no {
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.age-yes { background: var(--accent); color: #fff; }
.age-no { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }

@media (max-width: 600px) {
  .post-title { font-size: 22px; }
  .post-content h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
