/* 勇者の墓場 ― ゲームの面から。暗い紫の地に、提灯の金。
   配色はアプリの色（--bg / --pan / --line / --tx / --dim / --gold）に合わせてある。
   外部のフォントは読まない（ゲームのドット字は再配布の条件が重いので、サイトでは使わない）。 */
:root {
  --bg: #0b0912;
  --panel: #15111f;
  --panel-2: #1b1626;
  --line: #2b2438;
  --ink: #ece6d8;
  --dim: #a199ad;      /* 背景に対して 4.5:1 以上 */
  --gold: #e8c46a;
  --lantern: #f0b25a;
  --radius: 14px;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; color-scheme: dark; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  font-size: 15px; line-height: 1.95; letter-spacing: .02em;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--gold); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; border-radius: 6px; }
b, strong { font-weight: 700; }

.skip {
  position: absolute; top: -60px; left: 16px; z-index: 20;
  padding: 8px 14px; border-radius: 999px; background: var(--gold); color: #1a1a1a;
  font-size: 12px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---- 上のバー ---- */
.topbar {
  display: flex; align-items: center; gap: 6px; min-height: 58px;
  padding: 0 max(16px, env(safe-area-inset-left));
  background: rgba(11, 9, 18, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar a {
  padding: 6px 12px; border-radius: 999px;
  color: var(--dim); font-size: 12px; text-decoration: none; white-space: nowrap;
}
.topbar a:hover, .topbar a[aria-current="page"] { color: var(--ink); background: var(--panel-2); }
.topbar .home {
  display: flex; align-items: center; gap: 7px; margin-right: auto; padding-left: 0;
  color: var(--dim); font-size: 11px; letter-spacing: .1em;
}
.topbar .home:hover { background: none; }
.topbar .home img { width: 16px; opacity: .6; }

/* ---- はじめの画面：提灯ひとつの灯り ---- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 72px 20px 60px; isolation: isolate;
  background: radial-gradient(ellipse at 50% 34%, #2a1d3d 0, #15111f 46%, var(--bg) 82%);
}
.hero .icon {
  width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 20px; image-rendering: pixelated;
  box-shadow: 0 0 0 1px rgba(232,196,106,.28), 0 10px 40px rgba(240,178,90,.25);
}
.hero h1 {
  font-family: var(--serif); font-weight: 700; color: var(--gold);
  font-size: clamp(36px, 10vw, 56px); letter-spacing: .22em; text-indent: .22em; line-height: 1.3;
}
.hero .en-title { margin-top: 4px; color: var(--dim); font-size: 12px; letter-spacing: .5em; text-indent: .5em; }
.hero .tag { margin-top: 24px; font-size: 18px; font-weight: 700; letter-spacing: .08em; }
.hero .sub { margin-top: 8px; color: var(--dim); font-size: 13px; }
.hero .status {
  display: inline-block; margin-top: 26px; padding: 5px 16px; border-radius: 999px;
  border: 1px solid rgba(240,178,90,.5); color: var(--lantern); font-size: 12px; letter-spacing: .12em;
}

/* ---- 本文 ---- */
.wrap { width: min(100% - 32px, 760px); margin: 0 auto; }
main.wrap { padding-bottom: 20px; }
section { padding: 56px 0 8px; }
h2 { margin-bottom: 18px; font-size: 20px; letter-spacing: .06em; line-height: 1.5; font-weight: 700; }
h2 .en { display: block; margin-bottom: 4px; color: var(--lantern); font-size: 11px; letter-spacing: .22em; font-weight: 400; }
h3 { margin: 22px 0 4px; font-size: 15px; line-height: 1.6; }
p + p { margin-top: 12px; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 5px; }
.note, .updated { color: var(--dim); font-size: 12.5px; }
.lead { font-size: 16px; line-height: 1.9; }

/* 画面のならび（横にめくれる）。ドット絵なので拡大してもにじませない */
.screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 16px;
  margin-top: 26px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.screens figure { scroll-snap-align: start; }
.screens img {
  width: 100%; border-radius: 22px; background: var(--panel); image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(0, 0, 0, .5);
}

/* カード */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 6px; }
.card {
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.card.mark { margin: 22px 0; border-color: #4a3d22; background: var(--panel-2); }
.card h3 { margin: 0 0 4px; color: var(--gold); }
.card p { color: var(--dim); font-size: 13px; line-height: 1.8; }
.card.mark p { color: var(--ink); font-size: 14px; }
.card.mark ul { margin-top: 8px; }

/* 表 */
.spec { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { padding: 11px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec th { width: 30%; color: var(--dim); font-weight: 400; }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  font-size: 13px; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.links a:hover { border-color: var(--gold); color: var(--gold); }

.contact { margin-top: 16px; padding: 18px 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.contact .addr { font-size: 15px; font-weight: 700; letter-spacing: .03em; overflow-wrap: anywhere; }

/* 規約・ポリシー・サポート */
.doc { width: min(100% - 32px, 680px); }
.doc > section:first-child { padding-top: 40px; }
.doc h1 {
  padding-bottom: 14px; border-bottom: 1px solid var(--gold); color: var(--gold);
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(21px, 5vw, 26px); letter-spacing: .05em; line-height: 1.5;
}
.doc h1 { text-wrap: balance; }
.doc h1 + .updated, .doc h1 + .lead { margin-top: 12px; }
.doc h2 { margin-top: 38px; margin-bottom: 10px; font-size: 16px; }
.doc section > h2:first-child { margin-top: 0; }

/* 英語 */
section.en { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
section.en > h2 { font-size: 18px; }

.wrap.foot { padding-bottom: 48px; }
footer {
  margin-top: 40px; padding: 28px 0; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 11px; text-align: center;
}
footer .row { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
footer .row a { color: var(--dim); text-decoration: none; }
footer .row a:hover { color: var(--gold); }

@media (max-width: 640px) {
  .topbar { gap: 2px; overflow-x: auto; }
  .topbar a { padding: 6px 9px; font-size: 11px; }
  .hero { padding-top: 52px; padding-bottom: 48px; }
  .hero .tag { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .spec th { width: 34%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
