:root { --ink: #17171a; --ink-2: #55565c; --ink-3: #8a8b91; --line: #dcdcd8; --page: #f5f5f2; --panel: #fff; --accent: #c2261c;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-padding-top: 68px; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: 52px; padding: 0 20px; background: var(--bar, #17171a); color: #fff; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-game { font: 700 20px/1 var(--cond); letter-spacing: 0.06em; white-space: nowrap; }
.brand-tool { font: 500 13px/1 var(--sans); color: #b9b9be; }
.links { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.links a { color: #c9c9ce; text-decoration: none; white-space: nowrap; }
.links a:hover, .links a[aria-current] { color: #fff; }
.links a[aria-current] { font-weight: 600; }
.links .build { border: 1px solid #4a4a50; padding: 6px 12px; color: #fff; }
.links .build:hover { background: #fff; color: #17171a; }
.wrap { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 56px; max-width: 1120px; margin: 0 auto; padding: 40px 20px 96px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.toc h2 { margin: 0 0 10px; font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.doc h1 { margin: 0 0 24px; font: 700 40px/1.1 var(--cond); letter-spacing: 0.01em; }
.doc h2 { margin: 56px 0 8px; padding-top: 20px; border-top: 2px solid var(--ink); font: 700 26px/1.2 var(--cond); }
.doc h3 { margin: 36px 0 8px; font: 600 18px/1.35 var(--sans); }
.doc h4 { margin: 24px 0 6px; font: 600 15px/1.4 var(--sans); color: var(--ink-2); }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc ul { list-style: none; padding-left: 22px; }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.doc em { color: var(--ink-2); }
.doc blockquote { margin: 0 0 14px; padding: 2px 0 2px 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc { position: static; max-height: none; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .doc h1 { font-size: 32px; }
}
@media (max-width: 520px) { .brand-tool, .links .build { display: none; } }

.games { display: flex; justify-content: center; background: #0b0b0d; border-bottom: 1px solid #2a2a2e; }
.games a { position: relative; display: grid; place-items: center; width: min(50%, 300px); height: 76px; padding: 10px 26px; opacity: 0.42; }
.games a img { display: block; height: 54px; width: auto; max-width: 100%; object-fit: contain; filter: invert(1); }
.games a:hover { opacity: 0.85; background: #17171b; }
.games a.on { opacity: 1; background: #1d1d22; }
.games a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--accent); }
:root[data-game='horobeat'] { --ink: #241a16; --ink-2: #5e5048; --ink-3: #94857a; --line: #e2d6c2; --page: #f6efe2; --panel: #fffdf8; --accent: #b3261e; --bar: #5c1512; }
:root[data-game='horobeat'] body { background: radial-gradient(1100px 520px at 88% -8%, rgba(179, 38, 30, 0.10), transparent 62%), var(--page); background-attachment: fixed; }
:root[data-game='horobeat'] .top { background: linear-gradient(90deg, #6b1814, #8f211b); border-bottom: 3px solid #c9a55a; }
:root[data-game='horobeat'] .brand-game { font-family: 'Cinzel', serif; color: #f3dfae; letter-spacing: 0.08em; }
:root[data-game='horobeat'] .doc h1, :root[data-game='horobeat'] .doc h2 { font-family: 'Cinzel', serif; color: #8f211b; letter-spacing: 0.03em; }
:root[data-game='horobeat'] .doc h2 { border-color: #c9a55a; }
:root[data-game='haikyu'] { --ink: #141414; --page: #f7f3ee; --accent: #f07800; --bar: #111; }
:root[data-game='haikyu'] body { background: repeating-linear-gradient(-58deg, transparent 0 46px, rgba(240, 120, 0, 0.045) 46px 50px), var(--page); background-attachment: fixed; }
:root[data-game='haikyu'] .top { border-bottom: 3px solid #f07800; }
:root[data-game='haikyu'] .brand-game, :root[data-game='haikyu'] .doc h1, :root[data-game='haikyu'] .doc h2 { font-family: 'Montserrat', sans-serif; font-style: italic; font-weight: 800; letter-spacing: 0; }
:root[data-game='haikyu'] .doc h2 { border-top: 4px solid #f07800; }
@media (max-width: 760px) { .games a { height: 58px; padding: 8px 16px; } .games a img { height: 40px; } .links { gap: 10px; font-size: 12px; } .links .build { display: none; } }
.doc img { display: block; width: 100%; height: auto; margin: 6px 0 14px; border: 1px solid var(--line); }
