/* ============================================
   FXツール図鑑 — オレンジ基調カードデザイン
   参考：ユーザー指定のスクリーンショット（2026-09-29）
   ============================================ */
:root {
  --text: #222;
  --muted: #8a8378;
  --bg: #fff;
  --cream: #fdf1e7;
  --cream-deep: #fbe6d4;
  --line: #f0e6da;
  --accent: #f26b1d;
  --accent-dark: #d95a10;
  --card-shadow: 0 2px 10px rgba(120, 80, 40, .08);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent-dark); }
img { max-width: 100%; }
.sp-only { display: none; }

/* ---------- header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo { width: 30px; height: 30px; flex: none; align-self: center; }
.tagline { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.site-nav { display: flex; gap: 4px; flex: none; }
.site-nav a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--cream); color: var(--accent-dark); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  padding: 48px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: .02em;
  margin: 0 0 10px;
}
.hero-sub { color: #7a6a58; margin: 0 0 24px; font-size: .95rem; }
.hero-search {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(120, 80, 40, .12);
}
.hero-search input {
  flex: 1;
  border: 0;
  padding: 16px 18px;
  font-size: 1rem;
  outline: none;
  min-width: 0;
}
.hero-search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 34px;
  cursor: pointer;
}
.hero-search button:hover { background: var(--accent-dark); }
.hero-keywords {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.hk-label { font-size: .8rem; color: #7a6a58; margin-right: 4px; }

/* ---------- pills ---------- */
.pill {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent-dark); }
.pill-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-active:hover { color: #fff; }
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 8px;
}

/* ---------- section titles ---------- */
.sec-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 36px 0 18px;
}
.page-title { font-size: 1.5rem; font-weight: 800; margin: 32px 0 8px; }

/* ---------- card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--line);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(120, 80, 40, .16);
}
.card-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff9a4d 0%, var(--accent) 100%);
  padding: 12px;
}
.thumb-ph span {
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.5;
  text-align: center;
}
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.55; }
.card-desc { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.6; }
.card-meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .75rem;
}
.card-cat {
  background: var(--cream);
  color: var(--accent-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
}
.card-date { color: var(--muted); }

/* ranking badges */
.ranked { counter-reset: rank; }
.ranked li { position: relative; list-style: none; counter-increment: rank; }
.ranked li::before {
  content: counter(rank);
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #b7b0a6;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.ranked li:nth-child(1)::before { background: #f5b301; }
.ranked li:nth-child(2)::before { background: #9aa4ad; }
.ranked li:nth-child(3)::before { background: #c77b45; }

.more { text-align: center; margin: 28px 0; }
.btn-more {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  padding: 10px 32px;
  border-radius: 999px;
}
.btn-more:hover { background: var(--accent); color: #fff; }
.empty-note { color: var(--muted); text-align: center; margin: 32px 0; }

/* ---------- search page ---------- */
.search-page-form { margin: 16px 0 24px; border: 1px solid var(--line); box-shadow: var(--card-shadow); }

/* ---------- article ---------- */
.post { max-width: 760px; margin: 0 auto; }
.post h1 { font-size: 1.5rem; line-height: 1.5; margin: 32px 0 8px; font-weight: 800; }
.post-meta { color: var(--muted); font-size: .85rem; margin: 0 0 6px; }
.post-meta .cat {
  margin-left: 8px;
  background: var(--cream);
  color: var(--accent-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  text-decoration: none;
  font-size: .78rem;
}
.pr-note {
  font-size: .78rem;
  color: var(--muted);
  background: #faf6f1;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
}
.toc {
  background: #fdf8f3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: .9rem;
  margin: 20px 0;
}
.toc summary { cursor: pointer; font-weight: 700; }
.toc ul { margin: 6px 0; padding-left: 20px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent-dark); }
.post-body h2 {
  font-size: 1.25rem;
  background: var(--cream);
  border-left: 6px solid var(--accent);
  border-radius: 6px;
  padding: 8px 14px;
  margin-top: 48px;
  font-weight: 800;
}
.post-body h3 {
  font-size: 1.05rem;
  border-bottom: 2px solid var(--cream-deep);
  padding-bottom: 4px;
  margin-top: 34px;
  font-weight: 700;
}
.post-body img {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: auto;
}
.post-body blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--accent);
  background: #fdf8f3;
  border-radius: 0 8px 8px 0;
  color: #5c554c;
}
.post-body table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 6px 10px; }
.post-body th { background: var(--cream); }

/* affiliate button */
.aff-btn { text-align: center; margin: 30px 0; }
.aff-btn a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  padding: 15px 36px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(242, 107, 29, .35);
}
.aff-btn a:hover { background: var(--accent-dark); }

/* pagination (Hugo internal) */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 32px 0;
}
.pagination .page-link {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
}
.pagination .active .page-link {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--cream);
  margin-top: 64px;
  padding: 28px 0 40px;
  font-size: .85rem;
  color: #7a6a58;
  text-align: center;
}
.f-links a { color: #7a6a58; }
.notfound { text-align: center; padding: 60px 0; }

/* ============================================
   responsive
   ============================================ */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .tagline { display: none; }
}
@media (max-width: 680px) {
  .sp-only { display: inline; }
  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 1.45rem; }
  .hero-search input { padding: 13px 14px; font-size: .95rem; }
  .hero-search button { padding: 0 20px; font-size: .95rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-title { font-size: .85rem; }
  .card-desc { display: none; }
  .site-nav a { font-size: .8rem; padding: 5px 7px; }
  .site-title { font-size: 1.05rem; }
  .sec-title { font-size: 1.2rem; }
  .post h1 { font-size: 1.25rem; }
  .post-body h2 { font-size: 1.1rem; margin-top: 38px; }
  .post-body h3 { font-size: 1rem; }
}
@media (max-width: 380px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-desc { display: block; }
}
