:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-alt: #eceef2;
  --border: #d7dce2;
  --text: #1b1e24;
  --text-muted: #667085;
  --accent: #c2672a;
  --accent-strong: #a3551f;
  --accent-soft: #f3e1cd;
  --track: #e2e5ea;
  --wired-bg: #e7e9ed;
  --wired-text: #4a505a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171c;
    --surface: #1b1f26;
    --surface-alt: #232830;
    --border: #323944;
    --text: #e7e9ed;
    --text-muted: #98a1ae;
    --accent: #e08a45;
    --accent-strong: #f0a066;
    --accent-soft: #3a2c1c;
    --track: #2a2f38;
    --wired-bg: #2a2f38;
    --wired-text: #b5bcc7;
  }
}

:root[data-theme="dark"] {
  --bg: #14171c;
  --surface: #1b1f26;
  --surface-alt: #232830;
  --border: #323944;
  --text: #e7e9ed;
  --text-muted: #98a1ae;
  --accent: #e08a45;
  --accent-strong: #f0a066;
  --accent-soft: #3a2c1c;
  --track: #2a2f38;
  --wired-bg: #2a2f38;
  --wired-text: #b5bcc7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.6;
}

.site-header {
  position: relative;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-brand {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

/* Header menu: マウス / キーボード / モニター each open a small menu (診断・一覧・おすすめ), then 読み物 and 用語集.
   The menus are <details>; nav.js closes the others and marks the current section. */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.nav-group > summary {
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  user-select: none;
}

.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 3px 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.nav-group[open] > summary::after { transform: translateY(2px) rotate(-135deg); }

.nav-link:hover,
.nav-group > summary:hover,
.nav-group[open] > summary { color: var(--text); background: var(--surface-alt); }

.nav-link.active,
.nav-group.active > summary { color: var(--accent-strong); background: var(--accent-soft); }

.nav-group { position: relative; }

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* モニター sits near the right edge, so its menu opens leftward. */
.nav-group:last-of-type .nav-menu { left: auto; right: 0; }

.nav-menu a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav-menu a:hover { background: var(--surface-alt); }
.nav-menu a[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }

/* Phones: brand on its own line, the five items share the second line, and an open menu spans the header width. */
@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; row-gap: 6px; padding: 12px 12px 8px; }
  .site-brand { padding-left: 4px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 0; }
  .nav-link, .nav-group > summary { padding: 7px 8px; }
  .nav-group { position: static; }
  .nav-menu, .nav-group:last-of-type .nav-menu { top: 100%; left: 12px; right: 12px; }
  .nav-menu a { padding: 12px; font-size: 15px; }
}


/* Advertising disclosure required for affiliate links (景品表示法のステマ規制), shown on every page. */
.pr-note {
  margin: 0;
  padding: 6px 24px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 24px 36px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-muted);
}
.site-footer > * { max-width: 880px; margin-left: auto; margin-right: auto; }
.site-footer p { margin-top: 0; margin-bottom: 8px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px auto 10px; }
.site-footer-links a { color: var(--text-muted); font-size: 13px; }
.site-footer-links a:hover { color: var(--accent-strong); }
.site-footer-copy { font-family: "IBM Plex Mono", monospace; font-size: 11px; }
body.has-compare-bar .site-footer { padding-bottom: 110px; }

.eyebrow {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1 {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 6px 0 0;
  text-wrap: balance;
  /* Break Japanese headings between phrases (「選び／を」 not 「選／びを」). Browsers without support ignore it. */
  word-break: auto-phrase;
}

.lede {
  color: var(--text-muted);
  font-size: 15px;
  margin: 10px 0 0;
}

/* Block rather than inline-flex: as a flex container each text run and <span> became its own item, and on
   narrow screens "掲載" wrapped one character per line. */
.sample-note {
  display: block;
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 10px;
  width: fit-content;
}

.sample-note::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
}

button.btn {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

button.btn:disabled { opacity: 0.4; cursor: not-allowed; }

button.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.btn.primary:disabled { background: var(--track); border-color: var(--track); color: var(--text-muted); }

.btn.ghost { border-color: transparent; background: transparent; color: var(--text-muted); }

.related-categories {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related-categories-title {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.related-categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-category-card {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.related-category-card:hover { border-color: var(--accent); background: var(--surface-alt); }
.related-category-card .rc-label { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 15px; color: var(--text); }
.related-category-card .rc-desc { font-size: 12px; color: var(--text-muted); }

.compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.compare-bar.active { transform: translateY(0); }

.compare-bar-label {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.compare-bar-items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }

.compare-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
  white-space: nowrap;
}

.compare-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}

.compare-chip button:hover { color: var(--text); }

.compare-cell { text-align: center; }
.compare-cell input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

body.has-compare-bar .page { padding-bottom: 110px; }

@media (max-width: 700px) {
  .compare-bar { flex-wrap: wrap; padding: 12px 16px; }
  .compare-bar-items { order: 3; width: 100%; }
}

/* Head-to-head comparison pages (/vs/) */
.page.vs { max-width: 800px; margin: 0 auto; padding: 40px 24px 64px; }
.page.vs h1 { font-size: clamp(22px, 3.6vw, 30px); line-height: 1.35; }
.page.vs h2 { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 20px; margin: 40px 0 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.page.vs .lede { font-size: 15px; line-height: 1.85; margin-top: 16px; }
.page.vs p, .page.vs li { font-size: 14.5px; line-height: 1.85; }
.page.vs a { color: var(--accent-strong); }

.vs-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.vs-table th, .vs-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.vs-table thead th { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.vs-table thead th span { display: block; font-size: 15px; color: var(--text); }
.vs-table tbody th { width: 32%; font-weight: 500; font-size: 12.5px; color: var(--text-muted); }
.vs-table tbody td { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; font-weight: 600; }
.vs-table tr.differs td { background: var(--accent-soft); color: var(--accent-strong); }
.vs-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.vs-diffs { padding-left: 20px; }
.vs-diffs li { margin-top: 6px; }

.vs-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.vs-pick { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.vs-pick-name { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 16px; line-height: 1.4; }
.vs-pick ul { margin: 10px 0 0; padding-left: 20px; }
.vs-pick li { font-size: 13.5px; line-height: 1.7; }
.vs-pick-links { margin-top: 12px; }
.vs-pick-links a.detail { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent-strong); }
.vs-buy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vs-buy a.buy { font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 7px; color: #fff; background: var(--accent); }
.vs-buy a.buy:hover { background: var(--accent-strong); }

.vs-hub-group ul { padding-left: 20px; }
.vs-hub-group li { margin-top: 6px; }

@media (max-width: 640px) {
  .vs-picks { grid-template-columns: 1fr; }
  .vs-table th, .vs-table td { padding: 9px 8px; font-size: 13px; }
}
.vs-pick-tag { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; line-height: 1.7; }

/* Links back into the comparison pages, on articles and product pages */
.vs-links-back { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--border); }
.vs-links-back h2 { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 18px; margin: 0 0 8px; }
.vs-links-back p { font-size: 13.5px; color: var(--text-muted); margin: 0 0 8px; }
.vs-links-back ul { margin: 0; padding-left: 20px; }
.vs-links-back li { font-size: 14px; line-height: 1.9; }
.vs-links-back a { color: var(--accent-strong); }

/* Pages for one pro player / streamer (/player/) */
.page.player { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.page.player h1 { font-size: clamp(22px, 3.6vw, 30px); line-height: 1.35; }
.page.player h2 { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 20px; margin: 40px 0 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.page.player .lede { font-size: 15px; line-height: 1.85; margin-top: 14px; }
.page.player p, .page.player li { font-size: 14.5px; line-height: 1.85; }
.page.player a { color: var(--accent-strong); }

.player-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.player-kind { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.05em; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.player-chip { font-size: 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.player-date { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--text-muted); }

.player-gear { margin-top: 20px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.player-gear-label { font-size: 11px; letter-spacing: 0.05em; color: var(--text-muted); }
.player-gear-name { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 22px; line-height: 1.3; margin-top: 2px; }
.player-specs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; }
.player-specs div { display: flex; gap: 6px; align-items: baseline; }
.player-specs dt { font-size: 11px; color: var(--text-muted); }
.player-specs dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.player-buy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.player-buy a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 7px; }
.player-buy a.buy { color: #fff; background: var(--accent); }
.player-buy a.buy:hover { background: var(--accent-strong); }
.player-buy a.detail { color: var(--accent-strong); border: 1px solid var(--border); }
.player-missing { font-size: 13px; color: var(--text-muted); margin: 12px 0 0; }

.player-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.player-links li { display: flex; align-items: baseline; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; }
.player-links a { text-decoration: none; font-weight: 600; font-size: 14px; }
.player-team { font-size: 11px; color: var(--text-muted); }
.player-sources-note { font-size: 13px; color: var(--text-muted); }
.player-sources { padding-left: 20px; }
.player-more ul { padding-left: 20px; }

.player-team-block { margin-top: 18px; }
.player-team-name { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; }
.player-cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.player-cards a { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; }
.player-cards a:hover { border-color: var(--accent); }
.pc-name { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 16px; color: var(--text); }
.pc-mouse { font-size: 12px; color: var(--text-muted); }
.player-profile { margin-top: 16px; padding: 14px 16px; background: var(--surface-alt); border-radius: 10px; }
.player-profile-row { display: flex; gap: 10px; align-items: baseline; }
.player-profile-row + .player-profile-row { margin-top: 6px; }
.player-profile-row dt { font-size: 12px; color: var(--text-muted); min-width: 8em; }
.player-profile-row dd { margin: 0; font-size: 13.5px; }
.player-gear-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.player-gear-table th, .player-gear-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.player-gear-table th { width: 32%; font-weight: 500; font-size: 12.5px; color: var(--text-muted); }
.player-past { padding-left: 20px; margin: 4px 0 0; }
.player-past li { font-size: 14px; line-height: 1.8; }

/* Footer in three groups: finding devices, reading, and the site itself (legal pages live only here). */
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; margin-bottom: 22px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-head { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 13px; color: var(--text); letter-spacing: 0.02em; margin-bottom: 2px; }
.footer-col a { color: var(--text-muted); font-size: 13px; text-decoration: none; line-height: 1.6; }
.footer-col a:hover { color: var(--accent-strong); text-decoration: underline; }
.footer-notes { border-top: 1px solid var(--border); padding-top: 16px; }
@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols .footer-col:last-child { grid-column: 1 / -1; }
}

/* The プロ・配信者 link is shortened to プロ where five menu items share one line. */
@media (max-width: 420px) { .nav-long { display: none; } }

/* Category filter on the 読み物 page */
.article-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 4px; }
.article-filter-btn { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.article-filter-btn:hover { border-color: var(--accent); color: var(--text); }
.article-filter-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.article-card[hidden] { display: none; }

/* Product pages: articles that feature the product */
.product-articles { margin-top: 32px; }
.product-articles ul { list-style: none; margin: 10px 0 0; padding: 0; }
.product-articles li { display: flex; align-items: baseline; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 14px; }
.product-articles li a { color: var(--accent-strong); }
.product-article-rank { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.player-confirmed { display: inline-block; margin-left: 8px; font-size: 11px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.player-gear + .player-gear, section + .player-gear { margin-top: 14px; }

/* 新作・発売予定 (new.html and the same section on the top page) */
.new-group + .new-group { margin-top: 34px; }
.new-group h2 { font-size: 20px; }
.new-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.new-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.new-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.new-cat { font-size: 11px; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; }
.new-date { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-muted); }
.new-soon { font-size: 11px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 3px 9px; }
.new-name { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.3; margin: 8px 0 0; }
.new-tag { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.new-specs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; }
.new-specs div { display: flex; gap: 6px; align-items: baseline; }
.new-specs dt { font-size: 11px; color: var(--text-muted); }
.new-specs dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.new-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 14px; }
.new-price { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 15px; }
.new-price-tbd { font-family: inherit; font-size: 13px; color: var(--text-muted); }
.new-source { font-size: 12px; color: var(--text-muted); }
.new-empty { margin-top: 28px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text-muted); }
.new-note { margin-top: 40px; }
.new-note h2 { font-size: 18px; }
.new-note ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--text-muted); font-size: 14px; line-height: 1.9; }
