/* 色はゲーム「タクアリヌスとモヒカンの島」と同じ */
:root {
  --sky-top: #9ad8ff;
  --sky-bottom: #45a8ef;
  --blue: #2a56d8;
  --blue-dark: #13237a;
  --blue-light: #6fb6ff;
  --green: #3fae4f;
  --green-dark: #2a7a36;
  --brown: #7a4a1e;
  --sand: #f3dc93;
  --red: #d8392b;
  --paper: #fffdf6;
  --ink: #1b2350;
  --ink-soft: #4a557f;
  --line: 3px solid var(--blue-dark);
  --shadow: 4px 4px 0 var(--blue-dark);
  --radius: 14px;
  --font-dot: "DotGothic16", system-ui, sans-serif;
  --font-body: "M PLUS Rounded 1c", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  background-image: radial-gradient(rgba(122, 74, 30, .12) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* 上の帯 */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px;
  background: var(--blue);
  border-bottom: var(--line);
  color: #fff;
}
.logo {
  font-family: var(--font-dot); font-size: 1.35rem; text-decoration: none;
  text-shadow: 2px 2px 0 var(--blue-dark); white-space: nowrap;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 4px 10px; border-radius: 999px;
}
.nav a:hover { background: rgba(255, 255, 255, .2); }

/* 最初の画面 */
.hero {
  position: relative; overflow: hidden;
  min-height: min(82vh, 720px);
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px;
  padding: 48px max(24px, 6vw);
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  border-bottom: var(--line);
}
.rays {
  position: absolute; inset: -50%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .22) 0 10deg, transparent 10deg 20deg);
  animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-inner { position: relative; z-index: 1; color: #fff; }
.hero-kicker { margin: 0; font-weight: 800; font-size: 1.1rem; text-shadow: 2px 2px 0 var(--blue-dark); }
.hero-title {
  margin: 0 0 12px; font-family: var(--font-dot); font-weight: 400;
  font-size: clamp(3rem, 9vw, 6rem); line-height: 1.1; letter-spacing: .02em;
  text-shadow: 4px 4px 0 var(--blue-dark), -2px -2px 0 var(--blue-dark), 2px -2px 0 var(--blue-dark), -2px 2px 0 var(--blue-dark);
}
.hero-lead {
  max-width: 30em; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .85); border: var(--line); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow);
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* 島に絵が3枚飾ってある */
.island {
  position: relative; z-index: 1; height: 420px;
  background: radial-gradient(ellipse 48% 14% at 50% 88%, var(--green) 0 92%, var(--sand) 93% 100%, transparent 101%);
}
.frame {
  position: absolute; width: 46%; aspect-ratio: 1; object-fit: cover;
  background: #fff; border: 6px solid var(--brown); border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(19, 35, 122, .5);
  animation: bob 4s ease-in-out infinite;
}
.f1 { left: 4%; top: 18%; --r: -8deg; transform: rotate(var(--r)); }
.f2 { left: 30%; top: 0; --r: 3deg; transform: rotate(var(--r)); animation-delay: -1.3s; z-index: 2; }
.f3 { right: 2%; top: 24%; --r: 9deg; transform: rotate(var(--r)); animation-delay: -2.6s; }
@keyframes bob {
  50% { transform: rotate(var(--r)) translateY(-12px); }
}

/* ボタン */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font: 800 1rem var(--font-body); color: #fff;
  padding: 10px 22px; border: var(--line); border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--blue-dark); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--blue-dark); }
.btn-blue { background: var(--blue); }
.btn-green { background: var(--green); }
.btn-brown { background: var(--brown); }
.btn-red { background: var(--red); }

/* 各段 */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sec { padding: 64px 0 8px; }
.sec-title { margin: 0 0 8px; font-family: var(--font-dot); font-weight: 400; font-size: 2.2rem; }
.sec-title span {
  display: inline-block; color: #fff; background: var(--blue);
  padding: 2px 22px 4px; border: var(--line); border-radius: 10px; box-shadow: var(--shadow);
  transform: rotate(-2deg);
}
.sec-note { margin: 12px 0 20px; color: var(--ink-soft); font-weight: 700; }
.more { text-align: center; margin-top: 24px; }

/* 絵 */
.masonry { columns: 4 220px; column-gap: 16px; }
.tile {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; cursor: zoom-in;
  background: #fff; border: var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); break-inside: avoid; transition: transform .15s;
}
.tile:hover { transform: rotate(-1.5deg) scale(1.02); }
.tile { position: relative; }
.tile:not(.loaded) img { animation: loading 1.2s ease-in-out infinite; }
@keyframes loading { 50% { opacity: .45; } }
.tile img { width: 100%; height: auto; }
.tile-date {
  display: block; padding: 4px 10px; text-align: left;
  font: 700 .8rem var(--font-body); color: var(--ink-soft);
  background: #fff; border-top: 2px solid var(--blue-dark);
}

/* すべての絵 */
.all-link { text-align: center; margin-top: 8px; }
.month-nav {
  position: sticky; top: 58px; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  margin: 0 0 8px; padding: 10px 12px;
  background: var(--paper); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.month-nav a {
  text-decoration: none; font-weight: 700; font-size: .9rem;
  padding: 1px 10px; border-radius: 999px; background: var(--sky-top); border: 2px solid var(--blue-dark);
}
.month-nav a:hover { background: var(--blue-light); }
.month-year { font-family: var(--font-dot); font-size: 1.05rem; margin: 0 2px 0 8px; }
.month-year:first-child { margin-left: 0; }
.month { padding-top: 32px; }
.date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.date-grid .tile { margin: 0; }
.date-grid .tile img { aspect-ratio: 16 / 9; height: auto; object-fit: contain; background: #3b3f4a; }
.month-title { font-family: var(--font-dot); font-weight: 400; font-size: 1.6rem; margin: 0 0 14px; }
.month-title small { font-family: var(--font-body); font-size: .9rem; color: var(--ink-soft); font-weight: 700; }

/* GIF */
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.gif-grid .tile { margin: 0; aspect-ratio: 4 / 3; }
.gif-grid .tile img { width: 100%; height: 100%; object-fit: contain; }

/* ゲーム */
.game-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
  background: var(--paper); border: var(--line); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--blue-dark); overflow: hidden;
}
.game-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--blue-dark); }
.game-shots img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.game-shots img:first-child { grid-column: 1 / -1; }
.game-body { padding: 24px 28px; }
.game-body h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--blue); }
.game-tags { list-style: none; padding: 0; margin: 14px 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.game-tags li {
  font-size: .85rem; font-weight: 700; padding: 2px 12px;
  background: var(--sky-top); border: 2px solid var(--blue-dark); border-radius: 999px;
}

/* 実況 */
.video {
  aspect-ratio: 16 / 9; border: var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 6px 6px 0 var(--blue-dark); background: #000;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* グッズ */
.goods-card {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; text-decoration: none;
  background: var(--paper); border: var(--line); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--blue-dark); overflow: hidden; transition: transform .15s;
}
.goods-card:hover { transform: translate(-2px, -2px); }
.goods-pics { display: flex; justify-content: center; gap: 12px; padding: 28px; background: var(--sky-top); height: 100%; align-items: center; }
.goods-pics img {
  width: 30%; aspect-ratio: 1; object-fit: cover; background: #fff;
  border: var(--line); border-radius: 50%;
}
.goods-pics img:nth-child(2) { transform: translateY(-10px); }
.goods-body { padding: 24px 28px; }
.goods-body h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--brown); }
.goods-body p { margin: 0 0 18px; }

/* リンク */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.link-list a {
  display: flex; flex-direction: column; text-decoration: none;
  padding: 14px 18px; background: #fff; border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .1s;
}
.link-list a:hover { transform: translate(-2px, -2px); }
.link-list b { font-size: 1.2rem; color: var(--blue); }
.link-list small { color: var(--ink-soft); font-weight: 700; }

.foot { margin-top: 72px; padding: 24px; text-align: center; color: #fff; background: var(--green-dark); border-top: var(--line); font-weight: 700; }
.foot p { margin: 0; }

/* 拡大表示 */
.viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(10, 18, 60, .92);
}
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: transparent; }
.viewer img {
  max-width: min(90vw, 1100px); max-height: 82vh; width: auto; height: auto;
  background: #fff; border: 6px solid var(--brown); border-radius: 8px;
}
.viewer button {
  position: absolute; cursor: pointer; color: #fff; background: var(--blue);
  border: var(--line); border-radius: 50%; width: 52px; height: 52px;
  font-size: 1.8rem; line-height: 1; box-shadow: 3px 3px 0 var(--blue-dark);
}
.v-close { top: 16px; right: 16px; }
.v-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.v-next { right: 16px; top: 50%; transform: translateY(-50%); }
.v-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #fff; font-family: var(--font-dot); margin: 0; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .island { height: 300px; max-width: 460px; width: 100%; margin: 0 auto; }
  .game-card, .goods-card { grid-template-columns: 1fr; }
  .masonry { columns: 2 140px; column-gap: 12px; }
  .tile { margin-bottom: 12px; }
}
@media (max-width: 520px) {
  .top { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 16px; }
  html { scroll-padding-top: 100px; }
  main { padding: 0 16px; }
  .nav { justify-content: flex-start; }
  .nav a { padding: 2px 8px; }
  .gif-grid, .date-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .month-nav { position: static; }
  .viewer button { width: 44px; height: 44px; font-size: 1.5rem; }
  .v-prev, .v-next { top: auto; bottom: 8px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rays, .frame { animation: none; }
  html { scroll-behavior: auto; }
}
