/* 色は猫のドット絵(ミント・緑・黄・こげ茶)に合わせている */
:root {
  --bg: #d9f7e8;
  --grid: rgba(59, 28, 18, .06);
  --surface: #fdf3e0;
  --text: #3b1c12;
  --muted: #6b4a3c;
  --title: #14512a;
  --title-shadow: #ffffff;
  --line: #3b1c12;
  --shadow: rgba(59, 28, 18, .28);
  --button: #ffd21a;
  --button-text: #3b1c12;
  --mint: #99fad5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11172b;
    --grid: rgba(153, 250, 213, .06);
    --surface: #1b2442;
    --text: #fdf3e0;
    --muted: #bcc6e0;
    --title: #99fad5;
    --title-shadow: #1d6b35;
    --line: #fdf3e0;
    --shadow: rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid) 2px, transparent 2px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: "DotGothic16", "Yu Gothic UI", Meiryo, monospace;
  line-height: 1.9;
}

/* DotGothic16 は1ウェイトのみ。擬似太字でドットが崩れるのを防ぐ */
h1, h2, h3, a, small { font-weight: 400; }

a:focus-visible {
  outline: 3px dashed var(--title);
  outline-offset: 4px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding: 12px max(16px, calc((100% - 960px) / 2));
  background: var(--surface);
  border-bottom: 4px solid var(--line);
}

.header a { color: var(--text); text-decoration: none; }
.header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .95rem; }
.header nav .lang { padding: 0 10px; border: 2px solid var(--line); }
.header nav .lang::before { content: none; }
.header nav .lang:hover { background: var(--button); color: var(--button-text); }
.header nav a::before { content: "▶"; margin-right: 2px; visibility: hidden; font-size: .7em; }
.header nav a:hover::before,
.header nav a:focus-visible::before { visibility: visible; }

@media (max-width: 420px) {
  .header nav { column-gap: 6px; font-size: .85rem; }
  .header nav .lang { padding: 0 6px; }
}

.hero {
  text-align: center;
  padding: 48px 16px 64px;
}

/* 角を階段状に欠いて、ドット風の角丸にする */
.mascot {
  display: block;
  width: min(300px, 72%);
  height: auto;
  margin: 0 auto 16px;
  background: var(--mint);
  clip-path: polygon(
    0 16px, 8px 16px, 8px 8px, 16px 8px, 16px 0,
    calc(100% - 16px) 0, calc(100% - 16px) 8px, calc(100% - 8px) 8px, calc(100% - 8px) 16px, 100% 16px,
    100% calc(100% - 16px), calc(100% - 8px) calc(100% - 16px), calc(100% - 8px) calc(100% - 8px), calc(100% - 16px) calc(100% - 8px), calc(100% - 16px) 100%,
    16px 100%, 16px calc(100% - 8px), 8px calc(100% - 8px), 8px calc(100% - 16px), 0 calc(100% - 16px));
}

h1 {
  margin: 12px 0;
  color: var(--title);
  font-size: clamp(1.6rem, 6.6vw, 3rem);
  line-height: 1.4;
  text-shadow: 3px 3px 0 var(--title-shadow);
}
h1 span { display: inline-block; }

.button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 32px;
  background: var(--button);
  color: var(--button-text);
  border: 4px solid #3b1c12;
  box-shadow: 0 6px 0 #a86f00;
  font-size: 1.1rem;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.button:active { transform: translateY(6px); box-shadow: none; }

.cursor { display: inline-block; margin-right: 8px; animation: blink 1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

.section {
  max-width: 992px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

h2 {
  margin: 0 0 20px;
  color: var(--title);
  font-size: 1.5rem;
  text-shadow: 2px 2px 0 var(--title-shadow);
}
h2::before { content: "■"; margin-right: 10px; font-size: .7em; vertical-align: .15em; }

/* ゲームのウィンドウ風の枠 */
.window {
  background: var(--surface);
  border: 4px solid var(--line);
  box-shadow: 0 0 0 4px var(--surface), 8px 8px 0 4px var(--shadow);
  margin: 4px 12px 8px 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card { padding: 14px; }
.card h3 { margin: 12px 0 0; font-size: 1.2rem; }
.card p { margin: 4px 0 12px; color: var(--muted); }

.thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #11172b;
  color: #ffd21a;
  border: 4px solid #3b1c12;
  font-size: 3rem;
}

.badge {
  display: inline-block;
  padding: 0 12px;
  background: var(--button);
  color: var(--button-text);
  font-size: .85rem;
}

.news { padding: 14px 20px; list-style: none; }
.news li { position: relative; padding-left: 1.4em; }
.news li::before { content: "▶"; position: absolute; left: 0; font-size: .75em; top: .15em; }

.about { padding: 8px 20px; }
.note { color: var(--muted); }

.footer {
  margin-top: 24px;
  padding: 20px 16px;
  text-align: center;
  background: var(--surface);
  border-top: 4px solid var(--line);
}
