/* MORI ARCADE ― 明るい森（白地・緑・押せるボタン） */
:root {
  --green: #47be1e;
  --green-d: #2f9a12;
  --green-ink: #2b8f10;
  --green-l: #7ed957;
  --green-bg: #effae6;
  --blue: #1ca7ec;
  --blue-d: #1585bc;
  --sky: #e4f6ff;
  --yellow: #ffc800;
  --yellow-d: #e0a000;
  --ink: #3c3c3c;
  --sub: #777777;
  --line: #e5e5e5;
  --line-d: #d4d4d4;
  --hh: 64px;          /* ヘッダーの高さ */
  --bar: 64px;         /* ゲームの下の帯の高さ */
  --font: "M PLUS Rounded 1c", system-ui, -apple-system, "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --head: "Nunito", "M PLUS Rounded 1c", system-ui, -apple-system, "Hiragino Maru Gothic ProN", sans-serif;
}
* { box-sizing: border-box; }
html { background: #fff; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--font); font-weight: 500; line-height: 1.75; color: var(--ink); background: #fff;
  -webkit-font-smoothing: antialiased;
  word-break: auto-phrase;   /* 日本語を文節で折り返す（対応ブラウザのみ） */
}
img { max-width: 100%; display: block; }
a { color: var(--blue-d); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; z-index: 99; background: var(--yellow); color: #3a2a00; padding: 6px 12px; border-radius: 10px; }
.lottie { display: block; }
.lottie svg { display: block; }

/* ---------- ボタン（下に厚みがあって、押すと沈む） ---------- */
.btn {
  --c: var(--green); --d: var(--green-d); --t: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--c); color: var(--t); text-decoration: none; white-space: nowrap;
  font-family: var(--head); font-weight: 800; font-size: 16px; letter-spacing: .06em;
  box-shadow: 0 4px 0 var(--d);
  transition: transform .08s, box-shadow .08s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.05); }
.btn:active, .feat:active .btn { transform: translateY(4px); box-shadow: 0 0 0 var(--d); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-green { --c: var(--green); --d: var(--green-d); }
.btn-white { --c: #fff; --d: var(--line-d); --t: var(--blue); border: 2px solid var(--line); }
.btn-dark { --c: #222; --d: #000; --t: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; box-shadow: 0 3px 0 var(--d); }
.btn-sm:active { transform: translateY(3px); }
.btn-block { display: flex; width: 100%; min-height: 56px; font-size: 20px; letter-spacing: .14em; }

/* ---------- ヘッダー ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--hh);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.wordmark { font-family: var(--head); font-weight: 900; font-size: 22px; letter-spacing: .01em; color: var(--green); white-space: nowrap; }

/* ---------- トップ ---------- */
.hero { background: linear-gradient(#ffffff 0%, #ffffff 55%, var(--green-bg) 100%); }
.hero-in { max-width: 1080px; margin: 0 auto; padding: 14px 20px 36px; display: grid; gap: 10px; align-items: center; }
.hero-art { position: relative; width: min(100%, 360px); aspect-ratio: 1.18; margin: 0 auto; }
.blob {
  position: absolute; inset: 6% 3% 4%; overflow: hidden;
  border-radius: 48% 52% 46% 54% / 56% 50% 50% 44%;
  background: linear-gradient(var(--sky), #f4fbff 62%);
}
.blob::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -4%; height: 40%;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0; background: var(--green-l);
  box-shadow: inset 0 10px 0 rgba(255, 255, 255, .25);
}
.cloud {
  position: absolute; height: 9%; border-radius: 999px; background: #fff;
  box-shadow: 0 3px 0 rgba(28, 167, 236, .12);
  animation: drift 16s ease-in-out infinite alternate;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 46%; aspect-ratio: 1; left: 14%; bottom: 30%; }
.cloud::after { width: 34%; aspect-ratio: 1; right: 14%; bottom: 25%; }
.cloud.c1 { width: 26%; left: 12%; top: 18%; }
.cloud.c2 { width: 20%; right: 10%; top: 28%; animation-duration: 20s; animation-delay: -6s; }
@keyframes drift { from { transform: translateX(-8px); } to { transform: translateX(10px); } }
.art-pines { position: absolute; left: 4%; bottom: 20%; width: 34%; aspect-ratio: 503 / 519; clip-path: inset(0 0 15% 0); }
.art-tree { position: absolute; right: 5%; bottom: 25%; width: 26%; aspect-ratio: 250 / 300; }
.art-gamer { position: absolute; left: 50%; bottom: 2%; width: 60%; aspect-ratio: 1633 / 1400; transform: translateX(-50%); }

.hero-text { text-align: center; }
.kicker { margin: 0 0 4px; font-weight: 800; font-size: 14px; letter-spacing: .24em; color: var(--green-ink); }
.hero h1 {
  margin: 0; font-family: var(--head); font-weight: 800; color: var(--ink);
  font-size: clamp(30px, 8vw, 50px); line-height: 1.3; letter-spacing: .02em;
}
.hero h1 em { font-style: normal; color: var(--green); }
.lead { margin: 10px 0 20px; font-size: 15px; color: var(--sub); }
.hero-btns { display: grid; gap: 14px; max-width: 340px; margin: 0 auto; }
@media (min-width: 860px) {
  .hero-in { grid-template-columns: 1.05fr 1fr; gap: 48px; padding: 44px 32px 64px; }
  .hero-art { width: 100%; max-width: 500px; }
  .hero-text { text-align: left; }
  .hero-btns { margin: 0; max-width: 360px; }
}

/* ---------- 本文 ---------- */
main { display: block; max-width: 1080px; margin: 0 auto; padding: 0 16px 24px; }
.sec {
  display: flex; align-items: center; gap: 10px; margin: 40px 2px 16px;
  font-family: var(--head); font-weight: 800; font-size: 24px; line-height: 1.3; color: var(--ink);
}
.sec-pill {
  display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--yellow); color: #4a3300;
  font-family: "Nunito", var(--font); font-weight: 900; font-size: 13px; letter-spacing: .08em;
  box-shadow: 0 3px 0 var(--yellow-d);
}
#games { scroll-margin-top: calc(var(--hh) + 8px); }
.feature .sec { margin-top: 28px; }

/* 新作 */
.feat {
  display: grid; grid-template-columns: 1fr; overflow: hidden; text-decoration: none; color: inherit;
  background: #fff; border: 2px solid var(--line); border-bottom-width: 6px; border-radius: 24px;
  transition: transform .15s, border-color .15s;
}
.feat:hover { border-color: var(--line-d); transform: translateY(-2px); }
.feat-img { position: relative; aspect-ratio: 1200 / 630; background: var(--sky); }
.feat-img img { width: 100%; height: 100%; object-fit: cover; }
.feat-body { padding: 14px 18px 20px; }
.feat-body h3 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.35; color: var(--ink); }
.feat-body p { margin: 2px 0 12px; font-size: 14px; line-height: 1.65; color: var(--sub); }
.feat-body { min-width: 0; }
@media (min-width: 1000px) {
  .feat { grid-template-columns: 1.35fr 1fr; }
  .feat-body { display: flex; flex-direction: column; justify-content: center; padding: 28px 30px; }
  .feat-body h3 { font-size: 36px; }
  .feat-body p { font-size: 15px; margin: 4px 0 14px; }
}

.badge {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 12px 3px 8px; border-radius: 999px; background: var(--yellow); color: #4a3300;
  font-family: "Nunito", var(--font); font-weight: 900; font-size: 14px; letter-spacing: .06em;
  box-shadow: 0 3px 0 var(--yellow-d);
}
.badge .spark { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.card .badge { top: 8px; left: auto; right: 8px; font-size: 12px; padding: 1px 10px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.tags li {
  padding: 1px 10px; border-radius: 999px; border: 2px solid var(--line);
  font-size: 12px; font-weight: 800; line-height: 1.6; color: var(--sub);
}

/* 一覧 */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 18px;
  transition: transform .15s, border-color .15s;
}
a.card:hover { transform: translateY(-2px); border-color: var(--line-d); }
.card-img { position: relative; aspect-ratio: 1200 / 630; background: var(--sky); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px 12px; }
.card-body h3 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 16px; line-height: 1.4; color: var(--ink); }
.card-body p {
  margin: 2px 0 0; font-size: 12px; line-height: 1.55; color: var(--sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.soon { border-style: dashed; border-bottom-width: 2px; background: #fbfbfb; }
.soon-img { display: grid; place-items: center; background: linear-gradient(var(--sky), #f7fcff); }
.soon-img .cab { width: 44%; height: 92%; }
.soon.solo { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .soon.solo { flex-direction: row; align-items: center; }
  .soon.solo .card-img { flex: 0 0 42%; }
  .soon.solo .card-body { padding: 18px 22px; }
  .soon.solo h3 { font-size: 20px; }
  .soon.solo p { font-size: 14px; }
}

/* ---------- ゲームのページ ---------- */
.game { max-width: 1200px; padding-top: 14px; }
.game-layout { display: grid; gap: 14px; }
.stage {
  position: relative; margin: 0 auto; overflow: hidden; background: #fff;
  border: 2px solid var(--line); border-bottom-width: 6px; border-radius: 22px;
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.stage-portrait { width: 100%; height: calc(100vh - var(--hh) - var(--bar) - 34px); height: calc(100svh - var(--hh) - var(--bar) - 34px); min-height: 440px; }
.stage-landscape { width: 100%; aspect-ratio: 16 / 9; }
.stage-square { width: 100%; aspect-ratio: 1 / 1; }
.stage:fullscreen { border: 0; border-radius: 0; width: 100vw; height: 100vh; max-width: none; }
.loader {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 2px;
  background: linear-gradient(var(--sky), var(--green-bg));
  transition: opacity .45s ease, visibility .45s;
}
.loader .sprout { width: 130px; height: 130px; }
.loader p { margin: 0; font-family: var(--head); font-weight: 800; font-size: 15px; letter-spacing: .14em; color: var(--green-ink); }
.loader.hide { opacity: 0; visibility: hidden; }

.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--bar); padding: 0 2px; }
.game-bar h1 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-btns { display: flex; gap: 10px; flex-shrink: 0; padding-bottom: 3px; }

.title-logo { width: 100%; height: auto; margin: 0 0 12px; border-radius: 18px; border: 2px solid var(--line); border-bottom-width: 5px; }
.game-side .summary { margin: 0 0 10px; font-size: 15px; }
.panel { margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.panel h2 { margin: 0 0 6px; font-family: var(--head); font-weight: 800; font-size: 17px; color: var(--green-ink); }
.panel ol { margin: 0; padding-left: 1.3em; }
.panel li { margin: 3px 0; font-size: 14px; line-height: 1.65; }
.panel p { margin: 0 0 6px; font-size: 14px; }
.meta { font-size: 12px; color: var(--sub); }

@media (min-width: 900px) {
  .game-layout { grid-template-columns: auto minmax(300px, 400px); justify-content: center; align-items: start; gap: 30px; }
  .stage-portrait { height: calc(100vh - var(--hh) - var(--bar) - 46px); width: auto; aspect-ratio: 9 / 16; min-height: 560px; }
  .stage-landscape { width: min(780px, calc(100vw - 500px)); }
  .stage-square { width: min(620px, calc(100vh - 170px)); }
  .game-side { position: sticky; top: calc(var(--hh) + 16px); padding-top: 4px; }
}

/* ---------- 広告の枠（広告を入れたときだけ出る） ---------- */
.ad { margin: 16px auto; text-align: center; min-height: 100px; }
.ad ins { display: block; }
.ad-label { display: block; margin-bottom: 4px; font-size: 10px; letter-spacing: .12em; color: var(--sub); }
.grid .infeed { grid-column: 1 / -1; margin: 4px 0; }

/* ---------- 文章のページ ---------- */
.doc { max-width: 760px; padding-top: 30px; }
.doc h1 { margin: 0 0 12px; font-family: var(--head); font-weight: 800; font-size: 28px; line-height: 1.4; }
.doc h2 { margin: 28px 0 6px; font-family: var(--head); font-weight: 800; font-size: 19px; color: var(--green-ink); }
.doc p, .doc li { font-size: 15px; }
.lost { text-align: center; padding-top: 36px; }
.lost h1 { font-size: 22px; }
.squirrel.big { width: 190px; height: 178px; margin: 0 auto 6px; }

/* ---------- いちばん下（緑の帯と木） ---------- */
.foot {
  position: relative; margin-top: 110px; background: var(--green); color: #fff; text-align: center;
  padding: 0 16px max(32px, env(safe-area-inset-bottom));
}
.foot-forest {
  position: absolute; left: 0; right: 0; top: -54px; height: 56px;
  background: url(/assets/forest.svg) repeat-x left bottom / 400px 60px;
}
.foot-in { position: relative; padding-top: 6px; }
.foot .squirrel { width: 108px; height: 102px; margin: -64px auto 4px; }
.foot-msg { margin: 0 0 16px; font-weight: 800; font-size: 15px; }
.foot .btn-white { --t: var(--green-ink); border-color: #fff; --d: var(--green-d); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; margin: 20px 0 6px; font-size: 13px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: #f0ffe6; text-decoration: none; font-weight: 800; }
.foot nav a:hover { color: #fff; text-decoration: underline; }
.copy { margin: 0; font-family: var(--head); font-weight: 800; font-size: 13px; opacity: .85; }
@media (min-width: 760px) {
  .foot-forest { top: -78px; height: 80px; background-size: 600px 90px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
