:root {
  --yellow: #ffc300;
  --ink: #220000;
  --paper: #fff8e1;
  --magenta: #ff00aa;
  --blue: #0058cc;
  --red: #e00000;
  --muted: #6b4a3a;
  --shadow: 4px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff url(bomberman-tile.jpg) repeat;
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; }
video.pixel { image-rendering: pixelated; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--magenta); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

header { padding: 40px 0 0; }
.brand { display: flex; align-items: center; gap: 16px; background: #ffc200; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 12px 22px 12px 14px; }
.brand img { width: 256px; height: 256px; flex: none; margin: -12px -8px -12px -14px; }
@media (max-width: 760px) { .brand { display: flex; } .brand img { width: 120px; height: 120px; margin: -12px -6px -12px -14px; } }
h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1; font-weight: 900; letter-spacing: -0.02em; }
.tagline { margin: 6px 0 0; font-size: 1.1rem; font-weight: 600; }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: stretch; margin: 32px 0; }
.hero figure { margin: 0; display: flex; }
.hero figure img, .hero figure video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--ink); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.hero p { margin: 0 0 10px; font-size: .95rem; line-height: 1.5; }
.hero > div { background: var(--paper); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 16px 20px; display: flex; flex-direction: column; justify-content: center; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.hero .btn { padding: 7px 12px; }
.hero .brew { padding: 7px 12px; font-size: .85rem; }
.btn {
  display: inline-block; padding: 10px 16px; font-weight: 800; text-decoration: none; line-height: 1.3;
  color: var(--ink); background: #fff; border: 3px solid var(--ink); box-shadow: var(--shadow);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { color: var(--ink); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn.primary { background: var(--magenta); color: #fff; }
.btn small { display: block; font-weight: 600; font-size: .75rem; opacity: .85; }
.brew {
  display: inline-flex; align-items: center; padding: 10px 14px; background: var(--ink); color: var(--yellow);
  border: 3px solid var(--ink); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem;
}

.card { background: var(--paper); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 26px 28px; margin: 0 0 32px; }
h2 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; gap: 10px; }
h2 img { width: 28px; height: 28px; flex: none; }
h3 { margin: 22px 0 8px; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.chips li { background: #fff; border: 2px solid var(--ink); padding: 3px 10px; font-weight: 600; font-size: .92rem; }
.chips li:nth-child(3n+1) { background: #ffe066; }
.chips li:nth-child(3n+2) { background: #c9f0ff; }
.chips li:nth-child(3n) { background: #ffd1ec; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.tiles li { background: #fff; border: 2px solid var(--ink); padding: 12px 14px; }
.tiles b { display: block; font-size: 1.05rem; }
.tiles span { color: var(--muted); font-size: .92rem; }
.tiles code { background: var(--ink); color: var(--yellow); padding: 2px 6px; white-space: nowrap; font-size: .85rem; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.video { position: relative; aspect-ratio: 16 / 9; border: 3px solid var(--ink); background: var(--ink); display: block; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.video::after {
  content: "▶"; position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; line-height: 58px; text-align: center;
  background: var(--red); color: #fff; font-size: 28px; border: 3px solid var(--ink);
}
.video:hover img { opacity: 1; }

.dl { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .dl { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dl { grid-template-columns: 1fr; } }
.hero > *, .two > * { min-width: 0; }
.ad { text-align: center; overflow: hidden; }
.ad ins.adsbygoogle[data-ad-status="filled"] { margin-bottom: 32px; }
.ad ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

@media (max-width: 760px) {
  .hero, .two { grid-template-columns: 1fr; }
  .hero figure img, .hero figure video { height: auto; }
  .card { padding: 20px 18px; }
  header { padding-top: 24px; }
}

/* documentation page */
.brand.small img { width: 128px; height: 128px; }
.brand.small h1 { font-size: clamp(1.7rem, 6vw, 3.2rem); overflow-wrap: anywhere; }
.brand > div { min-width: 0; }
@media (max-width: 760px) { .brand.small img { width: 96px; height: 96px; } }
.back { display: inline-block; margin: 0 0 24px; font-weight: 700; }
.toc { columns: 2 280px; padding-left: 1.2em; margin: 0; }
.toc li { break-inside: avoid; margin-bottom: 4px; }
.card ul:not([class]) { padding-left: 1.3em; }
.card ul:not([class]) > li { margin-bottom: 6px; }
.card li ul { margin-top: 6px; }
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em;
  background: #fff; border: 2px solid var(--ink); border-bottom-width: 3px; padding: 0 6px; white-space: nowrap;
}
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0 0 14px; }
.keys > div { background: #fff; border: 2px solid var(--ink); padding: 12px 14px; }
.keys h3 { margin: 0 0 6px; }
.keys p { margin: 0 0 4px; }
.opts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 14px 0 0; }
.opts dt { font-weight: 800; }
.opts dd { margin: 0; }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr; gap: 2px; } .opts dd { margin-bottom: 10px; } }
.note { color: var(--muted); font-style: italic; }

header + main { margin-top: 32px; }
