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

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e8e6e0;
  --dq: #3d6b9e;
  --poke: #c8a020;
  --tag-bg: #f0ede8;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}
.site-logo span { color: var(--text-muted); font-weight: 400; }

nav { display: flex; gap: 8px; }
nav a {
  text-decoration: none;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
}
nav a:hover { color: var(--text); border-color: var(--text); }
nav a.dq { border-color: var(--dq); color: var(--dq); }
nav a.dq:hover { background: var(--dq); color: #fff; }
nav a.poke { border-color: var(--poke); color: var(--poke); }
nav a.poke:hover { background: var(--poke); color: #fff; }

/* ── Hero ── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}
.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero h1 strong { font-weight: 700; }
.hero p { color: var(--text-muted); max-width: 520px; }

/* ── Filter ── */
.filter-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Noto Sans JP', sans-serif;
}
.filter-btn.active, .filter-btn:hover { background: var(--text); color: #fff; border-color: var(--text); }
.filter-btn.dq.active { background: var(--dq); border-color: var(--dq); color: #fff; }
.filter-btn.poke.active { background: var(--poke); border-color: var(--poke); color: #fff; }

/* ── Grid ── */
.grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  animation: fadeUp 0.4s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.card-thumb.dq-bg { background: linear-gradient(135deg, #e8f0f8 0%, #c5d8ee 100%); }
.card-thumb.poke-bg { background: linear-gradient(135deg, #fdf6e0 0%, #f5e0a0 100%); }

.card-thumb-label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  text-transform: uppercase;
}
.card-thumb-label.dq { background: var(--dq); color: #fff; }
.card-thumb-label.poke { background: var(--poke); color: #fff; }

.card-body { padding: 20px; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

.tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--tag-bg);
  color: var(--text-muted);
  font-weight: 500;
}
.tag-dq { background: var(--dq); color: #fff; }
.tag-poke { background: var(--poke); color: #fff; }

.date {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.card h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.read-time { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text-muted); }
.arrow { font-size: 18px; color: var(--text-muted); transition: transform 0.15s; }
.card:hover .arrow { transform: translateX(4px); }

.card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.card.featured .card-thumb { aspect-ratio: auto; min-height: 200px; font-size: 72px; }
.card.featured .card-body { padding: 32px; }
.card.featured h2 { font-size: 22px; }
.card.featured p { -webkit-line-clamp: 3; }

/* ── Sidebar layout ── */
.layout {
  max-width: 1100px;
  margin: 48px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}
.sidebar-section { margin-bottom: 32px; }
.sidebar-title {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-list { list-style: none; }
.sidebar-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { text-decoration: none; color: var(--text); transition: color 0.15s; }
.sidebar-list a:hover { color: var(--dq); }
.item-game { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.about-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Article ── */
.article-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }
.article-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.lead { font-size: 15px; color: var(--text-muted); margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }

.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 44px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--dq);
  line-height: 1.4;
}
.article-body h3 { font-size: 16px; font-weight: 700; margin: 28px 0 10px; }
.article-body p { margin-bottom: 18px; }
.article-body ul { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; }

.info-box {
  background: #eef4fb;
  border-left: 3px solid var(--dq);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-size: 14px;
}
.info-box-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dq); font-weight: 700; margin-bottom: 6px; }
.warn-box {
  background: #fff8e8;
  border-left: 3px solid #d4a017;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-size: 14px;
}
.warn-box-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #b88a00; font-weight: 700; margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
th { background: var(--dq); color: #fff; padding: 10px 16px; text-align: left; font-weight: 700; }
td { padding: 10px 16px; border: 1px solid var(--border); }
tr:nth-child(even) td { background: #f7f9fc; }

.badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.badge-new { background: #dff0e4; color: #2a7a48; }
.badge-del { background: #fde8e8; color: #b03030; }
.badge-chg { background: #e8f0fd; color: #2a4db0; }

/* ── Sidebar (article) ── */
.sidebar { position: sticky; top: 80px; }
.sidebar-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.spec-list { list-style: none; font-size: 13px; }
.spec-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); }
.spec-list li:last-child { border-bottom: none; }
.spec-label { color: var(--text-muted); }
.spec-value { font-weight: 500; text-align: right; }
.toc-list { list-style: none; font-size: 13px; }
.toc-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a { text-decoration: none; color: var(--text-muted); transition: color 0.15s; }
.toc-list a:hover { color: var(--dq); }

/* ── Footer ── */
footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .card.featured { grid-template-columns: 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ── 検索 ── */
.search-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 24px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: var(--dq);
  box-shadow: 0 0 0 3px rgba(61,107,158,0.1);
}
.search-results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 8px;
  overflow: hidden;
}
.search-item {
  display: block;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg); }
.search-item-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.search-item-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.search-item-desc { font-size: 13px; color: var(--text-muted); }
.search-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ── シェアボタン ── */
.share-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: opacity 0.15s;
}
.share-btn:hover { opacity: 0.8; }
.share-x { background: #000; color: #fff; }
