@font-face {
  font-family: "DotGothic16 Site";
  src: url("/fonts/dotgothic16.28c5c1d2e5.woff") format("woff");
  font-display: swap;
}

:root {
  --paper: #F3EFE4;
  --card: #FFFDF7;
  --bar: #E4DFD1;
  --ink: #262421;
  --muted: #5F5E5A;
  --accent: #993C1D;
  --accent-ink: #FAECE7;
  --accent-edge: #4A1B0C;
  --feature: #FAECE7;
  --line: 3px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "DotGothic16 Site", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }
:lang(ja) { line-break: strict; word-break: auto-phrase; }
h1, h2, h3 { font-weight: 400; line-height: 1.4; margin: 0; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* 上の帯 */
.site-head { background: var(--bar); border-bottom: var(--line) solid var(--ink); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; text-decoration: none; letter-spacing: 0.04em; }
.brand img { width: 40px; height: 35px; image-rendering: pixelated; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav a { text-decoration: none; border-bottom: var(--line) solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }

/* 見出しと地の文 */
.lead { margin: 32px 0 8px; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 24px; margin: 40px 0 16px; }
.section-title::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--ink); }
.crumb { margin: 24px 0 16px; }
.crumb a::before { content: "< "; }

/* 札（角を1ドット欠いて、ドットの角丸にする） */
.card {
  background: var(--card);
  border: var(--line) solid var(--ink);
  padding: 16px;
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px),
    calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px);
}
.icon { border: var(--line) solid var(--ink); background: var(--bar); }

.feature {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 16px 20px; background: var(--feature); margin-bottom: 16px;
}
.feature .icon { width: 96px; height: 96px; }
.feature h3, .feature h1 { font-size: 24px; margin: 6px 0 2px; }
.feature h3 a { text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; }
.feature .actions { display: flex; flex-direction: column; gap: 10px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.work { display: flex; flex-direction: column; gap: 10px; }
.work .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.work .icon { width: 64px; height: 64px; flex: none; }
.work h3 { font-size: 20px; }
.work p { color: var(--muted); flex: 1; }
.next {
  display: flex; align-items: center; justify-content: center; min-height: 200px;
  border-style: dashed; color: var(--muted); text-align: center; background: transparent;
}
.about p + p { margin-top: 4px; }

.tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.feature .tags { justify-content: flex-start; }
.tag { font-size: 14px; line-height: 1.5; padding: 0 6px; border: 2px solid var(--ink); background: var(--card); white-space: nowrap; }
.tag.strong { background: var(--ink); color: var(--card); }

/* ボタン（下の線を太くして、押せる板に見せる） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 6px 18px;
  background: var(--card); color: var(--ink);
  border: var(--line) solid var(--ink); border-bottom-width: 7px;
  text-decoration: none; line-height: 1.3; white-space: nowrap;
}
.btn:hover { background: var(--bar); }
.btn:active { border-bottom-width: var(--line); transform: translateY(4px); }
.btn:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-edge); }
.btn.primary:hover { background: #B4451F; }
.btn.small { min-height: 40px; padding: 4px 14px; border-bottom-width: 5px; }
.play::before {
  content: ""; flex: none; width: 8px; height: 14px; background: currentColor;
  clip-path: polygon(0 0, 2px 0, 2px 2px, 4px 2px, 4px 4px, 6px 4px, 6px 6px, 8px 6px, 8px 8px, 6px 8px,
    6px 10px, 4px 10px, 4px 12px, 2px 12px, 2px 14px, 0 14px);
}

/* ボコボーイのページ */
.hero { margin-top: 0; }
.catch { font-size: 18px; }
.intro { margin: 24px 0 0; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin: 0 auto; }
.shots img { width: 100%; border: var(--line) solid var(--ink); background: var(--bar); }
.dots { list-style: none; margin: 0; padding: 16px 16px 16px 16px; }
.dots li { position: relative; padding-left: 22px; }
.dots li + li { margin-top: 8px; }
.dots li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 8px; background: var(--ink); }
.actions.center { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 32px 0 0; }
.links { display: flex; justify-content: center; gap: 24px; margin: 20px 0 0; }

.lost { margin: 40px 0; text-align: center; }
.lost h1 { font-size: 48px; }
.lost p + p { margin-top: 4px; }
.lost .actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }

/* 下の帯 */
.site-foot { margin-top: 56px; background: var(--bar); border-top: var(--line) solid var(--ink); }
.site-foot .wrap { padding-top: 20px; padding-bottom: 24px; }
.sns { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.copy { color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .feature { grid-template-columns: auto minmax(0, 1fr); }
  .feature .icon { width: 72px; height: 72px; }
  .feature .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .feature .actions .btn { flex: 1 1 auto; }
  .shots { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}
