:root {
  --ink: #1d1a2b;
  --paper: #fff8e7;
  --white: #ffffff;
  --green: #8fd16a;
  --pink: #ff5c8a;
  --yellow: #ffd23f;
  --purple: #7b5cff;
  --sky: #6fd3ff;
  --muted: #5b5670;
  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-small: 4px 4px 0 var(--ink);
  --radius: 18px;
  --gutter: 16px;
  --display: "Dela Gothic One", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(29, 26, 43, 0.08) 1.3px, transparent 1.4px);
  background-size: 16px 16px;
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", Meiryo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

h1, h2, h3 { font-weight: 400; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 上の帯（見出し・切り替え） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: var(--line);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-family: var(--display);
  font-size: 18px;
  text-decoration: none;
}

.brand img { width: 34px; height: 34px; }

.site-nav { display: flex; gap: 16px; font-weight: 800; }
.site-nav a { text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--yellow); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--pink); }

.lang {
  display: inline-flex;
  border: var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

.lang a, .lang span { padding: 8px 14px; text-decoration: none; }
.lang a:hover { background: var(--yellow); }
.lang [aria-current] { background: var(--ink); color: var(--paper); }

/* ---------- 区切り（全幅の色の帯） ---------- */
.band { padding: 80px 0; border-top: var(--line); }
.band-plain { border-top: 0; }
.bg-green { background: var(--green); }
.bg-sky { background: var(--sky); }
.bg-yellow { background: var(--yellow); }
.bg-pink { background: var(--pink); }
.bg-purple { background: var(--purple); color: var(--white); }
.bg-purple .card { color: var(--ink); }

.section-title {
  display: inline-block;
  margin: 0 0 32px;
  padding: 6px 18px;
  background: var(--yellow);
  border: var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-small);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.4;
  transform: rotate(-1.5deg);
}

.bg-yellow .section-title { background: var(--white); }

.section-lead { margin: -12px 0 32px; font-weight: 700; }

/* ---------- 共通の部品 ---------- */
.card {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card h3 {
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.4;
}

.card p { margin: 0; }
.card .icon { display: block; width: 64px; height: 64px; }

.grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--yellow);
  border: var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-small);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-pink { background: var(--pink); color: var(--white); }
.btn-white { background: var(--white); }

.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.sticker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 16px;
  background: var(--pink);
  border: var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-small);
  color: var(--white);
  font-family: var(--display);
  font-size: 15px;
  transform: rotate(-3deg);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 4px 14px;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}

/* 吹き出し */
.bubble {
  position: relative;
  margin: 0 0 22px;
  padding: 14px 18px;
  background: var(--white);
  border: var(--line);
  border-radius: 18px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.6;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: -12px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-right: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg);
}

/* セリフの引用 */
.quote {
  margin: 16px 0 0;
  padding: 10px 16px;
  background: var(--paper);
  border-left: 6px solid var(--ink);
  border-radius: 0 12px 12px 0;
  font-weight: 800;
}

.quote p { margin: 0; }
.quote cite { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; font-style: normal; }

/* ---------- 一番上 ---------- */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero-head { min-width: 0; }

@media (min-width: 820px) {
  .hero { grid-template-columns: 1.3fr 1fr; row-gap: 8px; padding-top: 72px; padding-bottom: 88px; }
  .hero-head { grid-column: 1 / -1; }
}

/* 単語の途中では折らない。幅は 1 行目の「SUPERMARKET」が収まる大きさにする */
.game-title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: clamp(30px, 8.2vw, 100px);
  line-height: 1.02;
}

.game-title span { display: block; color: var(--green); text-shadow: 4px 4px 0 var(--ink); -webkit-text-stroke: 2px var(--ink); }
.game-title span + span { color: var(--pink); }

.person-name {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(34px, 8.6vw, 104px);
  line-height: 1.08;
  text-shadow: 5px 5px 0 var(--yellow);
  overflow-wrap: anywhere;
}

.person-sub { margin: 0 0 18px; color: var(--muted); font-size: 20px; font-weight: 800; }

.lead { margin: 0 0 22px; font-size: 19px; max-width: 34em; }

.hero-art { display: flex; flex-direction: column; align-items: center; }
.hero-art .bubble { max-width: 320px; font-size: 18px; transform: rotate(2deg); }

.mascot { width: min(250px, 48vw); }

.bob { animation: bob 3.2s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.soon strong { font-family: var(--display); font-size: 20px; }

/* 流れる帯 */
.ticker {
  overflow: hidden;
  margin: 0 -24px;
  background: var(--ink);
  border-block: var(--line);
  color: var(--yellow);
  font-family: var(--display);
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-1.2deg);
}

.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker-track span { padding: 16px 0; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 住人のセリフ ---------- */
.residents {
  display: grid;
  gap: 28px 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.resident { margin: 0; }
.resident .bubble { transition: transform 0.15s ease; }

@media (min-width: 560px) {
  .resident .bubble { min-height: 96px; }
}
.resident:nth-child(odd) .bubble { transform: rotate(-1deg); }
.resident:nth-child(even) .bubble { transform: rotate(1deg); }
.resident:hover .bubble { transform: rotate(-2deg) scale(1.04); }

.resident figcaption { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.resident figcaption img { width: 48px; height: 48px; }

.tint-1 { filter: hue-rotate(40deg); }
.tint-2 { filter: hue-rotate(160deg); }
.tint-3 { filter: hue-rotate(250deg); }
.tint-4 { filter: hue-rotate(300deg) saturate(1.3); }
.tint-5 { filter: hue-rotate(90deg); }
.tint-6 { filter: hue-rotate(200deg) saturate(0.8); }
.tint-7 { filter: grayscale(0.6); }
.tint-8 { filter: hue-rotate(330deg); }

/* ---------- 一番上の決め台詞とあらすじ ---------- */
.hook {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.45;
}

/* ---------- 売り（短いカード） ---------- */
.features { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.features h3 { font-size: 19px; }
.features .card:nth-child(4n+1) { transform: rotate(-1deg); }
.features .card:nth-child(4n+2) { transform: rotate(0.8deg); }
.features .card:nth-child(4n+3) { transform: rotate(-0.6deg); }
.features .card:nth-child(4n) { transform: rotate(1deg); }

/* ---------- 作っている人のひとこと ---------- */
.dev-note { max-width: 44em; transform: rotate(-0.6deg); }
.dev-note p { margin: 0 0 14px; font-size: 18px; }
.dev-note .sign { margin: 0; font-weight: 800; text-align: right; }

/* ---------- 開発中の機能 ---------- */
.ai {
  display: grid;
  gap: 12px 24px;
  align-items: center;
}

@media (min-width: 720px) {
  .ai { grid-template-columns: auto 1fr; }
}

.ai .icon { width: 96px; height: 96px; }
.ai h3 { margin-top: 0; }
.ai p + p { margin-top: 10px; }
.ai .small { color: var(--muted); font-size: 15px; font-weight: 800; }

/* ---------- 作品カード（自己紹介） ---------- */
.work {
  display: grid;
  gap: 20px;
  align-items: center;
  background: var(--green);
}

@media (min-width: 720px) {
  .work { grid-template-columns: 1fr auto; }
}

.work .game-title { font-size: clamp(26px, 6vw, 58px); margin-bottom: 12px; }
.work .game-title span { color: var(--white); }
.work .game-title span + span { color: var(--yellow); }
.work p { margin: 0 0 18px; font-weight: 800; }
.work .mascot { width: min(190px, 50vw); justify-self: center; }

.about { max-width: 46em; }
.about p { margin: 0 0 16px; }

/* ---------- 終わりの案内 ---------- */
.cta { text-align: center; }
.cta h2 { margin: 0 0 8px; font-family: var(--display); font-size: clamp(26px, 5vw, 40px); line-height: 1.4; color: var(--white); text-shadow: 3px 3px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); }
.cta p { margin: 0 0 24px; font-weight: 800; }
.cta .buttons { justify-content: center; }

.site-footer {
  padding: 28px 0 40px;
  border-top: var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}

.site-footer p { margin: 0; }

/* ---------- 見つからないページ ---------- */
.lost { text-align: center; padding-top: 64px; padding-bottom: 80px; }
.lost .game-title { margin-bottom: 12px; }
.lost .bubble { display: inline-block; max-width: 440px; text-align: left; }
.lost .mascot { display: block; margin: 0 auto 28px; width: min(180px, 50vw); }
.lost .buttons { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
