/* Roadvania Wiki（W1、2026-11-18）。公式サイトと同じ白・淡いグレー・赤。スマホを先に考える。
   外の物（フォント・画像）は読み込まない。インラインの style も使わない（CSP を厳しくするため） */
:root {
  --paper: #ffffff;
  --ground: #f6f7f8;
  --ink: #292d32;
  --muted: #626972;
  --accent: #d2574e;
  --link: #ad3f37;
  --soft: #fcf0ef;
  --line: #dce0e5;
  --ok: #2f8f4e;
  --font: 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic UI', system-ui, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.7 var(--font);
}
a {
  color: var(--link);
}
:focus-visible {
  outline: 3px solid #2f6fe0;
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 10;
  background: var(--paper);
  padding: 4px 8px;
}
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.logo {
  width: 28px;
  height: 28px;
}
.langs {
  display: flex;
  padding: 3px;
  border-radius: 99px;
  background: var(--ground);
  border: 1px solid var(--line);
}
.langs a {
  padding: 2px 10px;
  border-radius: 99px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
.langs a[aria-current] {
  background: var(--paper);
  color: var(--link);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
h1 {
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.3;
  margin: 8px 0;
}
h2 {
  font-size: 18px;
  margin: 24px 0 8px;
}
h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.lead {
  color: var(--muted);
}
.sub {
  color: var(--muted);
  font-size: 13px;
}
.note {
  font-size: 12px;
  color: var(--muted);
}
.warn {
  color: #a5352b;
  font-weight: 700;
}
.ic {
  width: 24px;
  height: 24px;
  vertical-align: -5px;
  image-rendering: auto;
}
.big {
  width: 64px;
  height: 64px;
  flex: none;
}
.tag {
  display: inline-block;
  padding: 0 8px;
  border-radius: 99px;
  background: var(--ground);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  vertical-align: 2px;
}
.tag.big {
  width: auto;
  height: auto;
  background: var(--soft);
  color: var(--link);
  border-color: var(--accent);
}
.stars {
  color: #e2a400;
  letter-spacing: 1px;
}
.stars .off {
  color: var(--line);
}
/* トップ */
.hero h1 {
  font-size: clamp(30px, 7vw, 44px);
}
.hero p {
  color: var(--muted);
  margin-top: 0;
}
.guide {
  padding: 16px;
  border-radius: 18px;
  background: var(--paper);
  border: 2px solid var(--accent);
  box-shadow: 0 8px 24px rgba(41, 45, 50, 0.08);
}
.guide h2 {
  margin-top: 0;
}
.gform {
  display: flex;
  gap: 8px;
}
.gform input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 17px;
}
.gform input:focus {
  border-color: #2f6fe0;
  outline: none;
}
.gform button,
.chip,
.filters button {
  min-height: 48px;
  padding: 6px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--link);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.chip {
  min-height: 34px;
  padding: 2px 12px;
  background: var(--ground);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 14px;
}
.gout {
  display: grid;
  gap: 10px;
}
.gcard {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ground);
  border: 1px solid var(--line);
}
.gcard p {
  margin: 4px 0;
}
.gcard .more {
  font-weight: 700;
}
.tiles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 10px;
}
.tiles a {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.tiles .big {
  grid-row: 1 / span 2;
}
.tiles span {
  color: var(--muted);
  font-size: 13px;
}
/* 図鑑の一覧 */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.filters button {
  min-height: 36px;
  padding: 2px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
  font-weight: 600;
}
.filters button[aria-pressed='true'] {
  background: var(--soft);
  border-color: var(--link);
  color: var(--link);
}
.dexlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 6px;
}
.dexlist a {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.dexlist .ic {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
}
.dexlist .nm {
  font-weight: 700;
}
.dexlist .meta {
  font-size: 12px;
  color: var(--muted);
}
.dexlist li[hidden] {
  display: none;
}
/* 1種のページ */
.sp-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.sp-head h1 {
  margin: 0;
}
.sp-head p {
  margin: 0;
}
.sci {
  color: var(--muted);
  font-size: 14px;
}
.flavor {
  padding: 10px 14px;
  border-left: 4px solid var(--line);
  background: var(--paper);
  border-radius: 0 12px 12px 0;
}
.answer {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--soft);
  border: 1.5px solid var(--accent);
}
.answer h2 {
  margin-top: 0;
}
.facts,
.list {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}
.facts th,
.facts td,
.list th,
.list td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.facts th {
  width: 9em;
  color: var(--muted);
  font-weight: 600;
}
.list thead th {
  background: var(--ground);
  font-size: 13px;
}
.list tbody th {
  font-weight: 700;
}
.scroll {
  overflow-x: auto;
}
.meter {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  align-items: end;
  height: 92px;
}
.meter li {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.meter .bar {
  align-self: end;
  border-radius: 6px 6px 0 0;
  background: var(--accent);
}
.meter .lv0 .bar {
  height: 3px;
  background: var(--line);
}
.meter .lv1 .bar {
  height: 25%;
  opacity: 0.45;
}
.meter .lv2 .bar {
  height: 55%;
  opacity: 0.7;
}
.meter .lv3 .bar {
  height: 90%;
}
.ways,
.items {
  padding-left: 1.2em;
}
.ways li,
.items li {
  margin-bottom: 8px;
}
.hint {
  padding: 8px 12px;
  border-radius: 12px;
  background: #f3f0ff;
  border: 1px dashed #8b7bd8;
}
.steps li {
  margin-bottom: 4px;
}
.cards2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
}
.card {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.foot {
  text-align: center;
  font-size: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
@media (max-width: 420px) {
  .brand span {
    font-size: 15px;
  }
  .langs a {
    padding: 2px 7px;
    font-size: 12px;
  }
  .facts th {
    width: 6.5em;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
.emo {
  display: inline-grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.big.emo {
  font-size: 52px;
}
.flabel {
  align-self: center;
  font-size: 13px;
  color: var(--muted);
  margin-right: 4px;
}
.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
.md h3 {
  margin-top: 22px;
}
.md li {
  margin-bottom: 4px;
}
.table {
  overflow-x: auto;
}
