/* ワン寿ゲームズ（wanju-games.com）— ゲームの公式サイトの見た目
   部品はアプリ（app/lib/ui/kit.dart）をそのまま写す：こげ茶の細い縁・厚みのあるボタン・布目の板・燕尾のリボン・縁取りの字。
   背景は ななめ（右上）へ歩く肉球の2層（奥は小さく、ゆっくり）。いちばん上は層に分けた舞台（tools/site/gen_kv.py）。
   動きは transform と opacity だけ（毎フレーム描き直さない）。動きを減らす設定では止める。 */

:root {
  --cream: #fff6ea;
  --paper: #fffdf7;
  --paper-2: #fce9cf;
  --edge: #4a2a18;
  --ink: #4a2e1f;
  --ink-soft: #7a5a48;
  --line: #ead3b2;
  --orange: #f08a3c;
  --orange-deep: #d9651c;
  --link: #c45a12;
  --pink: #f26a8d;
  --leaf: #6cc04a;
  --sky: #6ec6f0;
  --gold: #ffc53d;
  --display: "Mochiy Pop One", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --hard: 0 6px 0 rgba(74, 42, 24, 0.16);
  --soft: 0 24px 44px -20px rgba(74, 42, 24, 0.38);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header: 70px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* 背景：ななめ（右上）へ歩く肉球。奥の層は小さく薄く、ゆっくり。1枚ぶん動くと元の絵に戻るので、つなぎ目なく歩き続ける */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -256px;
  z-index: -1;
  pointer-events: none;
  background: url(../img/paws-walk-far.svg?v=b6b3ede7) 0 0 / 128px 128px;
}

body::after {
  background: url(../img/paws-walk.svg?v=2aa9fc56) 0 0 / 200px 200px;
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: walk-far 42s linear infinite;
    will-change: transform;
  }

  body::after {
    animation: walk-near 28s linear infinite;
    will-change: transform;
  }
}

@keyframes walk-near {
  to {
    transform: translate3d(200px, -200px, 0);
  }
}

@keyframes walk-far {
  to {
    transform: translate3d(128px, -128px, 0);
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--orange-deep);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.4;
  font-weight: 900;
}

p {
  margin: 0 0 1em;
}

main {
  display: block;
  overflow-x: clip;
}

.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--edge);
  color: #fff;
}

.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

/* ---------- 字：縁取り（アプリの GameText と同じ：白い字・字の大きさの 1 割の縁・下へ落ちる濃い影） ---------- */
.wa {
  --o: #5a3825;
  --d: #3b2315;
  font-family: var(--display);
  font-weight: 400;
  color: #fff;
  line-height: 1.32;
  letter-spacing: 0.03em;
  -webkit-text-stroke: 0.2em var(--o);
  paint-order: stroke fill;
  filter: drop-shadow(0 0.08em 0 var(--d));
}

.wa em {
  font-style: normal;
  color: #ffe070;
}

/* ---------- リボンの見出し（アプリの燕尾のリボン。左右の尾は伸ばさず、真ん中の帯だけ伸ばす） ---------- */
.ribbon {
  --lab: #2a6a17;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  min-width: 9em;
  margin: 0;
  padding: 0 14px 15px;
  border-style: solid;
  border-width: 0 60px;
  border-image: url(../img/ribbon-green.svg?v=2d040334) 0 64 fill / 0 60px / 0 stretch;
  font-family: var(--display);
  font-weight: 400;
  font-size: 27px;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}

.ribbon > span {
  -webkit-text-stroke: 0.2em var(--lab);
  paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--lab) 60%, #000));
}

.ribbon.orange {
  --lab: #8a3d0c;
  border-image-source: url(../img/ribbon-orange.svg?v=09049393);
}

.ribbon.pink {
  --lab: #8e2549;
  border-image-source: url(../img/ribbon-pink.svg?v=be6936e3);
}

.ribbon.blue {
  --lab: #1b5a8a;
  border-image-source: url(../img/ribbon-blue.svg?v=2b4ea495);
}

.ribbon.purple {
  --lab: #4a1c80;
  border-image-source: url(../img/ribbon-purple.svg?v=ba537741);
}

.sec-head {
  text-align: center;
  margin: 0 auto clamp(30px, 4.4vw, 48px);
  max-width: 44em;
}

.sec-head .en {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 12.5px;
  letter-spacing: 0.26em;
  color: var(--orange-deep);
}

.sec-head .en::before,
.sec-head .en::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url(../img/icon-paw.webp?v=bcb957bf) center / contain no-repeat;
}

.sec-head .lead {
  margin: 18px auto 0;
  font-size: clamp(15px, 1.55vw, 17px);
  font-weight: 700;
  color: var(--ink-soft);
}

.note {
  margin: 18px auto 0;
  max-width: 46em;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- ボタン（アプリの GameButton：縁 → 厚み → 上の 46% が明るい面 → 上の縁の細い光。押すと沈む） ---------- */
.btn {
  --top: #9bea62;
  --bot: #4db82e;
  --dep: #2f8a1d;
  --lab: #2a6a17;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 60px;
  padding: 0 1.5em 7px;
  border: 2.5px solid var(--edge);
  border-radius: 20px;
  background: linear-gradient(var(--top), color-mix(in srgb, var(--top) 62%, var(--bot)) 46%, var(--bot) 46.5%);
  box-shadow: inset 0 -7px 0 var(--dep), inset 0 2px 0 rgba(255, 255, 255, 0.72), 0 4px 0 rgba(74, 42, 24, 0.28);
  color: #fff;
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--pop), filter 0.2s;
}

.btn > span {
  -webkit-text-stroke: 0.2em var(--lab);
  paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--lab) 60%, #000));
}

.btn .ic {
  width: 1.5em;
  height: 1.5em;
  flex: none;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.2));
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.06) saturate(1.05);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: inset 0 -3px 0 var(--dep), inset 0 2px 0 rgba(255, 255, 255, 0.72), 0 1px 0 rgba(74, 42, 24, 0.28);
}

.btn-orange {
  --top: #ffbe6b;
  --bot: #f07d2a;
  --dep: #c45a12;
  --lab: #8a3d0c;
}

.btn-pink {
  --top: #ffa8c2;
  --bot: #f0588a;
  --dep: #c23a68;
  --lab: #8e2549;
}

.btn-cream {
  --top: #ffffff;
  --bot: #f6e4cc;
  --dep: #cfb290;
  color: var(--ink);
}

.btn-cream:hover {
  color: var(--ink);
}

.btn-cream > span {
  -webkit-text-stroke: 0;
  filter: none;
}

.btn-sm {
  min-height: 44px;
  padding: 0 1.1em 5px;
  border-radius: 15px;
  font-size: 14px;
  box-shadow: inset 0 -5px 0 var(--dep), inset 0 2px 0 rgba(255, 255, 255, 0.72), 0 3px 0 rgba(74, 42, 24, 0.24);
}

.btn-lg {
  min-height: 70px;
  padding: 0 1.7em 8px;
  border-radius: 22px;
  font-size: 21px;
  box-shadow: inset 0 -8px 0 var(--dep), inset 0 2px 0 rgba(255, 255, 255, 0.72), 0 5px 0 rgba(74, 42, 24, 0.28);
}

/* いちばん押してほしいボタンだけ、光の筋がときどき走る */
.shine::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.7) 47%, rgba(255, 255, 255, 0.15) 55%, transparent 62%);
  transform: translateX(-120%);
}

@media (prefers-reduced-motion: no-preference) {
  .shine::after {
    animation: shine 4.2s ease-in-out 1.6s infinite;
  }
}

@keyframes shine {
  0%,
  58% {
    transform: translateX(-120%);
  }

  86%,
  100% {
    transform: translateX(120%);
  }
}

/* 近日公開の札（公開したら App Store のバッジに差しかえる） */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 7px 18px 7px 14px;
  border: 2.5px solid #000;
  border-radius: 14px;
  background: linear-gradient(#2a2a2e, #0e0e10);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.22), 0 4px 0 rgba(74, 42, 24, 0.28);
  color: #fff;
  line-height: 1.15;
  text-align: left;
}

.soon svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.soon small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.soon b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
}

/* ---------- 板（アプリの GamePanel：影 → 縁 → 上下のグラデーション → 布目 → 下の沈む影 → 上の縁の光 → 内側の枠） ---------- */
.panel {
  position: relative;
  border: 2.5px solid var(--edge);
  border-radius: 28px;
  background: url(../img/tex-linen.webp?v=0f8dd2ff) 0 0 / 256px 256px, linear-gradient(var(--paper), var(--paper-2));
  background-blend-mode: multiply, normal;
  box-shadow: inset 0 2px 0 #fff, inset 0 -8px 0 rgba(122, 74, 32, 0.08), var(--hard), var(--soft);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(217, 185, 142, 0.55);
  border-radius: 21px;
  pointer-events: none;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  color: var(--ink);
}

.panel-title img {
  width: 34px;
  height: 34px;
}

/* ---------- スマホの枠（iPhone Pro の割合） ----------
   devices.css（iPhone 14 Pro：本体 428×868・画面 390×830・本体の角 68・画面の角 49・アイランド 120×35 を画面の上から 10・
   左に 3つ・右に 1つのボタン・2重の金属の輪）を、本体の幅に対する割合に直した。
   本体の縦横比は「画面の写真（1206×2622）＋四方の同じ厚さの縁（幅の 4%）」から出すので、画面の写真は切れない（1 : 2.0802）。
   画面は padding ではなく割合の位置で置く（padding の % は親の幅に対する割合になり、置き場所ごとに縁の厚さが変わるため）。
   縦の割合は 横の割合 ÷ 2.0802（縁 4% → 上下 1.923%）。 */
.phone {
  position: relative;
  width: var(--pw, 280px);
  aspect-ratio: 1000 / 2080.2;
  border-radius: 15.9% / 7.64%;
  background: #0c0b0f;
  box-shadow:
    inset 0 0 0 1.5px #211c26,
    inset 0 0 3px 2.5px #cbc2d6,
    inset 0 0 0 4.5px #3b3443,
    0 34px 60px -26px rgba(60, 36, 20, 0.6),
    0 8px 0 rgba(74, 42, 24, 0.14);
  flex: none;
}

.phone > img {
  position: absolute;
  left: 4%;
  top: 1.923%;
  width: 92%;
  height: 96.154%;
  object-fit: cover;
  border-radius: 12.6% / 5.8%;
  background: #f5ead9;
  z-index: 1;
}

/* ダイナミックアイランド（右にカメラのレンズ） */
.phone::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 3.057%;
  left: 35.83%;
  width: 28.34%;
  height: 3.968%;
  border-radius: 999px;
  background: radial-gradient(circle at 79% 50%, #3c4f86 0 7%, #17213d 11%, transparent 15%), #050507;
}

/* 画面のガラス（ふちの白い光と、ななめの映り込み） */
.phone::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 4%;
  top: 1.923%;
  width: 92%;
  height: 96.154%;
  border-radius: 12.6% / 5.8%;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03) 33%, transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* 横のボタン（左：アクション・音量の上下、右：サイド）。本体の外へ 3px 出す */
.phone-hw {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -3px;
  right: -3px;
  pointer-events: none;
  background:
    linear-gradient(90deg, #4a4252, #2a2430) left 0 top 13.76% / 3.5px 3.69% no-repeat,
    linear-gradient(90deg, #4a4252, #2a2430) left 0 top 21.71% / 3.5px 7.14% no-repeat,
    linear-gradient(90deg, #4a4252, #2a2430) left 0 top 31.64% / 3.5px 7.14% no-repeat,
    linear-gradient(270deg, #4a4252, #2a2430) right 0 top 26.04% / 3.5px 11.52% no-repeat;
}

/* ---------- 上の帯 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 253, 247, 0.94);
  border-bottom: 2.5px solid var(--edge);
  box-shadow: 0 4px 0 rgba(74, 42, 24, 0.1);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgba(255, 253, 247, 0.84);
    backdrop-filter: blur(10px) saturate(1.2);
  }
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header);
}

.brand {
  display: block;
  flex: none;
  transition: transform 0.25s var(--pop);
}

.brand img {
  height: 44px;
  width: auto;
}

.brand:hover {
  transform: rotate(-3deg) scale(1.04);
}

.nav {
  display: flex;
  gap: 10px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px 4px;
  border: 2.5px solid var(--edge);
  border-radius: 14px;
  background: linear-gradient(#fff, #fff 46%, #f6e4cc 46.5%);
  box-shadow: inset 0 -4px 0 #cfb290, 0 3px 0 rgba(74, 42, 24, 0.2);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s var(--pop);
}

.nav a img {
  width: 22px;
  height: 22px;
}

.nav a:hover {
  transform: translateY(-2px);
}

.nav a[aria-current="page"] {
  background: linear-gradient(#ffbe6b, #f59d4f 46%, #f07d2a 46.5%);
  box-shadow: inset 0 -4px 0 #c45a12, inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 3px 0 rgba(74, 42, 24, 0.2);
  color: #fff;
}

.nav a[aria-current="page"] span {
  -webkit-text-stroke: 0.2em #8a3d0c;
  paint-order: stroke fill;
}

/* ---------- キービジュアル（層に分けた舞台） ----------
   舞台 .kv-stage は 2:1 の絵（2560×1280）を、ヒーローいっぱいに覆う大きさで下ぞろえに置く。帯・雲は舞台の割合で置く。
   桜と手前の花は、舞台ではなくヒーローの左右の端へ寄せる（スマホで見切れないように）。高さは舞台の高さ --sh から。
   重なり：空（舞台の地）→ 雲 → 遠くの丘 → 桜 → 柵 → 芝生 → 中身（スマホ・うちの子）→ 手前の花・花びら */
.kv,
.kv-front {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  pointer-events: none;
}

.kv {
  z-index: 0;
  background: #cbeffd;
}

.kv-front {
  z-index: 3;
}

.kv-stage {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: max(100cqw, 200cqh);
  height: max(50cqw, 100cqh);
  margin-left: calc(max(100cqw, 200cqh) / -2);
  background: linear-gradient(#6dc0fc, #80cafd 30%, #95d5fd 50%, #b9e7fc 80%, #cbeffd);
}

.kv-stage img,
.kv-tree,
.kv-near {
  position: absolute;
  max-width: none;
  user-select: none;
}

.kv-cloud {
  z-index: 1;
  height: auto;
}

.kv-cloud.c1 {
  left: 5.43%;
  top: 13.36%;
  width: 22.66%;
}

.kv-cloud.c2 {
  left: 27.11%;
  top: 33.67%;
  width: 12.34%;
}

.kv-cloud.c3 {
  left: 61.88%;
  top: 33.12%;
  width: 13.2%;
}

.kv-cloud.c4 {
  left: 72.81%;
  top: 13.91%;
  width: 24.34%;
}

.kv-far,
.kv-fence,
.kv-ground {
  left: 0;
  width: 100%;
  height: auto;
}

.kv-far {
  z-index: 2;
  top: 37.73%;
}

.kv-fence {
  z-index: 4;
  top: 43.36%;
}

.kv-ground {
  z-index: 5;
  top: 50.86%;
}

.kv-tree,
.kv-near {
  --sh: max(50cqw, 100cqh);
  width: auto;
}

.kv-tree {
  z-index: 3;
  --edge-s: 0.86;
}

.kv-tree.t1 {
  left: calc(var(--sh) * -0.03);
  bottom: calc(var(--sh) * 0.5391);
  height: calc(var(--sh) * 0.4367 * var(--edge-s));
  transform-origin: 30% 100%;
}

.kv-tree.t2 {
  right: calc(var(--sh) * -0.03);
  bottom: calc(var(--sh) * 0.5305);
  height: calc(var(--sh) * 0.3953 * var(--edge-s));
  transform-origin: 70% 100%;
}

.kv-near {
  --edge-s: 0.62;
  bottom: -2px;
}

.kv-near.n1 {
  left: calc(var(--sh) * -0.04);
  height: calc(var(--sh) * 0.3312 * var(--edge-s));
}

.kv-near.n2 {
  right: calc(var(--sh) * -0.04);
  height: calc(var(--sh) * 0.3195 * var(--edge-s));
}

/* 花びら（桜）：右上から左下へ、ゆらゆら舞う */
.petals i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 13px;
  height: 10px;
  border-radius: 100% 0 100% 0 / 100% 0 100% 0;
  background: radial-gradient(circle at 30% 30%, #fff 0 18%, #ffc6d6 46%, #f49ab6);
  opacity: 0;
}

.petals i:nth-child(1) { --x: 18%; --d: 13s; --t: 0s; --s: 1; }
.petals i:nth-child(2) { --x: 34%; --d: 16s; --t: -4s; --s: 0.8; }
.petals i:nth-child(3) { --x: 52%; --d: 12s; --t: -8s; --s: 1.15; }
.petals i:nth-child(4) { --x: 66%; --d: 15s; --t: -2s; --s: 0.9; }
.petals i:nth-child(5) { --x: 82%; --d: 14s; --t: -10s; --s: 1.05; }
.petals i:nth-child(6) { --x: 94%; --d: 17s; --t: -6s; --s: 0.75; }
.petals i:nth-child(7) { --x: 8%; --d: 18s; --t: -12s; --s: 0.85; }
.petals i:nth-child(8) { --x: 74%; --d: 13.5s; --t: -7s; --s: 1.2; }
.petals i:nth-child(9) { --x: 44%; --d: 19s; --t: -15s; --s: 0.7; }
.petals i:nth-child(10) { --x: 102%; --d: 15.5s; --t: -11s; --s: 1; }

@media (prefers-reduced-motion: no-preference) {
  .petals i {
    animation: petal var(--d) linear var(--t) infinite;
  }

  .kv-cloud {
    animation: cloud 26s ease-in-out infinite alternate;
  }

  .kv-cloud.c2,
  .kv-cloud.c4 {
    animation-duration: 34s;
    animation-direction: alternate-reverse;
  }

  .kv-tree {
    animation: sway 6s ease-in-out infinite alternate;
  }

  .kv-tree.t2 {
    animation-delay: -3s;
  }
}

@keyframes petal {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0) scale(var(--s));
  }

  8% {
    opacity: 0.95;
  }

  50% {
    transform: translate3d(-12cqw, 52cqh, 0) rotate(260deg) scale(var(--s));
  }

  92% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translate3d(-30cqw, 104cqh, 0) rotate(560deg) scale(var(--s));
  }
}

@keyframes cloud {
  to {
    transform: translateX(3.5cqw);
  }
}

@keyframes sway {
  from {
    rotate: -0.6deg;
  }

  to {
    rotate: 0.8deg;
  }
}

/* マウスで舞台が少しずれる（site.js が --mx・--my を -1〜1 で入れる）。スクロールでも奥ほどゆっくり動く */
.hero .kv-far {
  transform: translate3d(calc(var(--mx, 0) * -5px), calc(var(--my, 0) * -3px), 0);
}

.hero .kv-fence {
  transform: translate3d(calc(var(--mx, 0) * -9px), calc(var(--my, 0) * -4px), 0);
}

.hero .kv-tree {
  transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -6px), 0);
}

.hero .kv-near {
  transform: translate3d(calc(var(--mx, 0) * -26px), calc(var(--my, 0) * -8px), 0);
}

.hero .kv-far,
.hero .kv-fence,
.hero .kv-tree,
.hero .kv-near {
  transition: transform 0.9s var(--out);
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero .kv-far {
      animation: drop-60 linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }

    .hero .kv-fence {
      animation: drop-30 linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }

    .hero .kv-cloud {
      animation: cloud 26s ease-in-out infinite alternate, drop-90 linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 100vh;
    }

    .hero .hero-copy {
      animation: rise-40 linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
}

@keyframes drop-90 {
  to {
    translate: 0 90px;
  }
}

@keyframes drop-60 {
  to {
    translate: 0 60px;
  }
}

@keyframes drop-30 {
  to {
    translate: 0 30px;
  }
}

@keyframes rise-40 {
  to {
    translate: 0 -40px;
  }
}

/* ---------- ヒーロー（うちの子パズル） ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(660px, calc(100svh - var(--header)), 900px);
  /* 下の縁は雲のもこもこ（下の節のクリームへ） */
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 42px) no-repeat, url(../img/edge-cloud-b.svg?v=3de5d862) 0 100% / 400px 44px repeat-x;
  mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 42px) no-repeat, url(../img/edge-cloud-b.svg?v=3de5d862) 0 100% / 400px 44px repeat-x;
}

.hero-in {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 12px;
  width: min(100% - var(--gutter) * 2, 1240px);
  min-height: inherit;
  margin-inline: auto;
  padding: 24px 0 70px;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 40px;
}

.hero-logo {
  margin: 0;
  width: min(100%, 500px);
}

.hero-logo img {
  width: 100%;
  filter: drop-shadow(0 10px 14px rgba(40, 70, 110, 0.28));
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 16px 7px 10px;
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 3px 0 rgba(74, 42, 24, 0.2);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink);
}

.hero-tag img {
  width: 26px;
  height: 26px;
}

.hero-catch {
  margin: 2px 0 6px;
  font-size: clamp(26px, 3.1vw, 42px);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-stage {
  position: relative;
  height: clamp(540px, calc(100svh - var(--header) - 110px), 760px);
}

.hero-stage .phone {
  --pw: clamp(230px, 20.5vw, 290px);
  position: absolute;
  left: 50%;
  bottom: 10%;
  z-index: 2;
  translate: -48% 0;
  rotate: 4deg;
}

.hero-stage .phone::before {
  z-index: 3;
}

/* 足もとの影（地面に立たせる） */
.hero-stage .phone + .ground-shadow {
  position: absolute;
  left: 50%;
  bottom: calc(10% - 16px);
  width: calc(var(--pw, 260px) * 1.1);
  height: 34px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 70, 20, 0.35), transparent);
  z-index: 1;
}

.pet {
  position: absolute;
  z-index: 3;
  display: block;
}

.pet img {
  width: 100%;
  transform-origin: 50% 100%;
}

.pet::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -5%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 70, 20, 0.34), transparent);
  z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
  .pet img {
    animation: breathe 2.8s ease-in-out infinite;
  }

  .pet.omochi img {
    animation-delay: -0.9s;
  }

  .pet.mame img {
    animation-delay: -1.8s;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }

  50% {
    transform: translateY(-5px) scale(1.012, 0.99);
  }
}

.hero-stage .pet.komugi {
  left: 0;
  bottom: 2%;
  width: 40%;
}

.hero-stage .pet.omochi {
  right: 6%;
  bottom: 22%;
  width: 26%;
  z-index: 1;
}

.hero-stage .pet.mame {
  right: 0;
  bottom: 1%;
  width: 29%;
}

/* ステッカー（ななめの札。ふわふわ浮く） */
.sticker {
  position: absolute;
  z-index: 4;
  /* 親が flex のとき、縦に引き伸ばされないように */
  align-self: start;
  height: max-content;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--display);
  line-height: 1.2;
  color: #fff;
}

/* ギザギザのシール（seal-orange.svg：縁の山・ツヤ・白い点線の輪）。縦横は同じ大きさの変数から出す（ゆがまない） */
.sticker.free {
  --s: 108px;
  top: 5%;
  right: 7%;
  width: var(--s);
  height: var(--s);
  background: url(../img/seal-orange.svg?v=475320f6) center / 100% 100% no-repeat;
  font-size: calc(var(--s) * 0.19);
  rotate: 10deg;
}

.sticker.free span {
  -webkit-text-stroke: 0.2em #8a3d0c;
  paint-order: stroke fill;
}

.sticker.bubble {
  display: block;
  width: max-content;
  top: 16%;
  left: 2%;
  padding: 12px 18px 14px;
  border: 3px solid var(--edge);
  border-radius: 22px;
  background: var(--paper);
  filter: drop-shadow(0 5px 0 rgba(74, 42, 24, 0.2));
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
  rotate: -6deg;
}

/* ふきだしのしっぽ（tail.svg）：上 4px を ふきだしの縁に重ね、付け根で縁の線を隠して、しっぽの線を縁につなげる。
   先は左寄りの形なので、右へ向けるときは左右を反転する */
.sticker.bubble::after,
.bubble::after {
  content: "";
  position: absolute;
  top: calc(100% - 4px);
  width: 40px;
  height: 30px;
  background: url(../img/tail.svg?v=b558c8d1) 0 0 / 40px 30px no-repeat;
}

.sticker.bubble::after {
  right: 14px;
  scale: -1 1;
}

.sticker.bubble em {
  font-style: normal;
  color: var(--orange-deep);
}

@media (prefers-reduced-motion: no-preference) {
  .sticker {
    animation: bob 3.4s ease-in-out infinite;
  }

  .sticker.bubble {
    animation-delay: -1.2s;
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

/* 開いたときに順に出てくる（行きすぎて戻る） */
@media (prefers-reduced-motion: no-preference) {
  .hero-logo,
  .hero-tag,
  .hero-catch,
  .hero-cta,
  .hero-stage .phone,
  .hero-stage .pet,
  .hero-stage .sticker,
  .hero-studio .studio-pets .pet {
    animation: pop-in 0.8s var(--pop) both;
  }

  .hero-tag {
    animation-delay: 0.12s;
  }

  .hero-catch {
    animation-delay: 0.22s;
  }

  .hero-cta {
    animation-delay: 0.34s;
  }

  .hero-stage .phone {
    animation-name: phone-in;
    animation-delay: 0.2s;
  }

  .hero-stage .pet.komugi {
    animation-delay: 0.45s;
  }

  .hero-stage .pet.omochi {
    animation-delay: 0.55s;
  }

  .hero-stage .pet.mame {
    animation-delay: 0.65s;
  }

  .hero-stage .sticker {
    animation: pop-in 0.7s var(--pop) 0.9s both, bob 3.4s ease-in-out 1.6s infinite;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    scale: 0.6;
  }
}

@keyframes phone-in {
  from {
    opacity: 0;
    translate: -48% 60px;
  }
}

/* ---------- 流れる帯（ななめ） ---------- */
.ticker {
  position: relative;
  z-index: 5;
  width: calc(100% + 120px);
  margin: -26px 0 0 -60px;
  rotate: -2deg;
  background: linear-gradient(#ffa860, #f07d2a);
  border-block: 2.5px solid var(--edge);
  box-shadow: 0 5px 0 rgba(74, 42, 24, 0.14);
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
}

@media (prefers-reduced-motion: no-preference) {
  .ticker-track {
    animation: ticker 40s linear infinite;
  }
}

.ticker span {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 11px 16px 12px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  -webkit-text-stroke: 0.2em #8a3d0c;
  paint-order: stroke fill;
}

.ticker span::after {
  content: "";
  width: 22px;
  height: 22px;
  background: url(../img/icon-paw.webp?v=bcb957bf) center / contain no-repeat;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 節と色の帯 ---------- */
.sec {
  position: relative;
  padding: clamp(76px, 10vw, 124px) 0;
}

/* 色の帯：上は雲のもこもこ・下は波（mask で形を切る）。中を白い肉球がななめに歩く */
.band {
  --et: 44px;
  --eb: 30px;
  isolation: isolate;
  overflow: hidden;
  margin: -30px 0;
  padding-top: calc(clamp(76px, 10vw, 124px) + var(--et));
  padding-bottom: calc(clamp(76px, 10vw, 124px) + var(--eb));
  -webkit-mask: url(../img/edge-cloud-t.svg?v=5dbc1c6d) 0 0 / 400px var(--et) repeat-x, linear-gradient(#000 0 0) 0 calc(var(--et) - 1px) / 100% calc(100% - var(--et) - var(--eb) + 2px) no-repeat, url(../img/edge-wave-b.svg?v=5a466720) 0 100% / 240px var(--eb) repeat-x;
  mask: url(../img/edge-cloud-t.svg?v=5dbc1c6d) 0 0 / 400px var(--et) repeat-x, linear-gradient(#000 0 0) 0 calc(var(--et) - 1px) / 100% calc(100% - var(--et) - var(--eb) + 2px) no-repeat, url(../img/edge-wave-b.svg?v=5a466720) 0 100% / 240px var(--eb) repeat-x;
}

.band::before {
  content: "";
  position: absolute;
  inset: -200px;
  z-index: -1;
  background: url(../img/paws-walk-w.svg?v=37a10413) 0 0 / 200px 200px;
}

@media (prefers-reduced-motion: no-preference) {
  .band::before {
    animation: walk-near 28s linear infinite;
  }
}

/* 色の帯どうしが続くときは、上の帯の下を平らにし、下の帯の もこもこを上の帯へ重ねる（あいだに地の色を出さない） */
.band.flat-b {
  --eb: 0px;
  margin-bottom: 0;
  -webkit-mask: url(../img/edge-cloud-t.svg?v=5dbc1c6d) 0 0 / 400px var(--et) repeat-x, linear-gradient(#000 0 0) 0 calc(var(--et) - 1px) / 100% calc(100% - var(--et) + 1px) no-repeat;
  mask: url(../img/edge-cloud-t.svg?v=5dbc1c6d) 0 0 / 400px var(--et) repeat-x, linear-gradient(#000 0 0) 0 calc(var(--et) - 1px) / 100% calc(100% - var(--et) + 1px) no-repeat;
}

.band.flat-b + .band,
.band.flat-b + .finale {
  margin-top: -44px;
}

.band-sky {
  background: linear-gradient(#c4ecff, #94d6f6);
}

.band-leaf {
  background: linear-gradient(#a3e07c, #6fc24c);
}

.band-pink {
  background: linear-gradient(#ffe6ee, #ffc9d8);
}

.band-leaf .sec-head .lead,
.band-sky .sec-head .lead {
  color: #fff;
  text-shadow: 0 2px 0 rgba(30, 80, 20, 0.35), 0 0 12px rgba(30, 80, 20, 0.25);
}

.band-sky .sec-head .lead {
  text-shadow: 0 2px 0 rgba(20, 70, 110, 0.35), 0 0 12px rgba(20, 70, 110, 0.25);
}

.band-leaf .sec-head .en,
.band-sky .sec-head .en {
  color: #fff;
}

.band-leaf .sec-head .en {
  text-shadow: 0 2px 0 rgba(30, 80, 20, 0.4);
}

.band-sky .sec-head .en {
  text-shadow: 0 2px 0 rgba(20, 70, 110, 0.4);
}

/* ---------- 写真 → うちの子 ---------- */
.demo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.demo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr);
  align-items: center;
  gap: 6px;
  padding: 30px 22px 26px;
}

.demo-card figure {
  position: relative;
  margin: 0;
}

.polaroid {
  padding: 9px 9px 34px;
  background: #fff;
  border: 2px solid #e6d6c0;
  box-shadow: 0 10px 18px -8px rgba(74, 42, 24, 0.45);
  rotate: -5deg;
}

.polaroid img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* マスキングテープ */
.polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 70px;
  height: 22px;
  translate: -50% 0;
  rotate: 4deg;
  background: repeating-linear-gradient(45deg, rgba(255, 200, 120, 0.85) 0 7px, rgba(255, 225, 170, 0.85) 7px 14px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.polaroid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-family: var(--display);
  font-size: 13px;
  color: var(--ink-soft);
}

.demo-arrow {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-family: var(--display);
  font-size: 12.5px;
  color: var(--orange-deep);
}

.demo-arrow svg {
  width: 56px;
  height: 38px;
}

.made {
  display: grid;
  justify-items: center;
}

.made img {
  position: relative;
  z-index: 1;
  width: 100%;
  filter: drop-shadow(0 8px 6px rgba(74, 42, 24, 0.22));
}

/* うちの子の後ろの光（回る後光） */
.made::before {
  content: "";
  position: absolute;
  inset: -6% -6% 12%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 110, 0.55) 0 9deg, rgba(255, 244, 214, 0.1) 9deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask: radial-gradient(closest-side, #000 30%, transparent 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .made::before {
    animation: spin 18s linear infinite;
  }
}

@keyframes spin {
  to {
    rotate: 1turn;
  }
}

.made figcaption {
  position: relative;
  z-index: 2;
  margin-top: -6px;
  padding: 4px 14px 5px;
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  background: linear-gradient(#ffbe6b, #f07d2a);
  box-shadow: 0 3px 0 rgba(74, 42, 24, 0.22);
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.2;
  color: #fff;
}

.made figcaption span {
  -webkit-text-stroke: 0.2em #8a3d0c;
  paint-order: stroke fill;
}

/* ---------- あそびかた ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4.4vw, 60px);
  margin: 0;
  padding: 26px 0 0;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 22px 26px;
  text-align: center;
}

.step-no {
  position: absolute;
  top: -26px;
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2.5px solid var(--edge);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff3b0, #ffc53d 46%, #e59a12);
  box-shadow: inset 0 -5px 0 rgba(160, 90, 10, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 4px 0 rgba(74, 42, 24, 0.25);
  font-family: var(--display);
  font-size: 27px;
  line-height: 1;
  color: #fff;
}

.step-no span {
  -webkit-text-stroke: 0.2em #9a5a0a;
  paint-order: stroke fill;
}

.step .phone {
  --pw: min(200px, 100%);
  margin-bottom: 18px;
}

.step h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 19px;
  color: var(--ink);
}

.step p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* 手順のあいだの足あと（右へ歩く） */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 40%;
  right: calc(clamp(28px, 4.4vw, 60px) / -2 - 45px);
  width: 90px;
  height: 33px;
  background: url(../img/paws-row.svg?v=72875219) 0 50% / 90px 33px no-repeat;
  z-index: 3;
  -webkit-mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 260% 100% no-repeat;
  mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 260% 100% no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  .step:not(:last-child)::after {
    animation: tread 2.4s steps(4, jump-none) infinite;
  }
}

@keyframes tread {
  from {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }

  to {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
}

/* ---------- パズル ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0 30px;
}

.phones .phone {
  --pw: clamp(190px, 21vw, 260px);
}

.phones .tilt-l {
  rotate: -6deg;
  z-index: 1;
  margin-top: 40px;
}

.phones .tilt-r {
  rotate: 5deg;
  margin-left: -46px;
}

.word {
  position: absolute;
  z-index: 3;
  width: clamp(150px, 16vw, 220px);
  filter: drop-shadow(0 6px 0 rgba(74, 42, 24, 0.18));
}

.word.w1 {
  top: -6px;
  right: -2%;
  rotate: 8deg;
}

.word.w2 {
  bottom: 4px;
  left: -2%;
  width: clamp(120px, 12vw, 170px);
  rotate: -8deg;
}

@media (prefers-reduced-motion: no-preference) {
  .word {
    animation: bob 3s ease-in-out infinite;
  }

  .word.w2 {
    animation-delay: -1.5s;
  }
}

.play-panel {
  padding: 30px clamp(20px, 3vw, 34px) 28px;
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.chips li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

/* 台座のアイコン（丸い台の上に乗せる） */
.pedestal {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border: 2.5px solid var(--edge);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, #ffe9c9 60%, #f6cf96);
  box-shadow: inset 0 -5px 0 rgba(200, 140, 60, 0.35), 0 3px 0 rgba(74, 42, 24, 0.2);
}

.pedestal img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(74, 42, 24, 0.2));
}

.chips b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.35;
}

.chips span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding: 7px 0 7px 32px;
  border-top: 2px dashed var(--line);
  font-weight: 700;
  font-size: 15px;
}

.points li:first-child {
  border-top: 0;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 22px;
  height: 22px;
  background: url(../img/icon-paw.webp?v=bcb957bf) center / contain no-repeat;
}

/* ---------- おせわ・きせかえ ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.shot .phone {
  --pw: min(230px, 100%);
  z-index: 1;
}

.shot:nth-child(odd) .phone {
  rotate: -2.5deg;
}

.shot:nth-child(even) .phone {
  rotate: 2.5deg;
  margin-top: 18px;
}

.shot figcaption {
  position: relative;
  width: 100%;
  margin-top: -26px;
  padding: 34px 16px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: center;
}

.shot figcaption b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
}

/* ---------- せいかく ---------- */
.voices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
  max-width: 980px;
  margin: 0 auto;
}

.voice {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bubble {
  position: relative;
  margin: 0 0 18px;
  padding: 14px 20px 15px;
  border: 3px solid var(--edge);
  border-radius: 22px;
  background: var(--paper);
  /* 影は filter で（しっぽにも同じ影が落ちる） */
  filter: drop-shadow(0 4px 0 rgba(74, 42, 24, 0.16));
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

/* 声のふきだしは、しっぽの先を うちの子の頭の上（まん中）に */
.bubble::after {
  left: calc(50% - 12.5px);
}

.voice-pet {
  position: relative;
  display: grid;
  place-items: end center;
  width: min(210px, 100%);
  aspect-ratio: 1;
}

/* うちの子の立つ丸い台 */
.voice-pet::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 30%;
  border: 2.5px solid var(--edge);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #fff 0 30%, #ffe0ea 70%, #f7b9cc);
  box-shadow: inset 0 -6px 0 rgba(200, 90, 130, 0.25), 0 4px 0 rgba(74, 42, 24, 0.18);
}

.voice-pet img {
  position: relative;
  width: 84%;
  margin-bottom: 9%;
}

.voice-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}

.voice-name b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
}

.type {
  padding: 3px 12px 4px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.3;
}

.type.wanpaku {
  background: #ffe0c2;
}

.type.nagomi {
  background: #d9f2c6;
}

.type.amae {
  background: #ffd6e3;
}

/* ---------- ともだち ---------- */
.split.flip > :first-child {
  order: 2;
}

.friends-phone {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 0 20px;
}

.friends-phone .phone {
  --pw: clamp(210px, 22vw, 270px);
  rotate: -3deg;
}

.friends-phone .sticker.bubble {
  top: 8%;
  left: auto;
  right: 4%;
  rotate: 6deg;
}

/* ともだちのふきだしは スマホの右にあるので、しっぽは左（スマホの方）へ */
.friends-phone .sticker.bubble::after {
  right: auto;
  left: 14px;
  scale: 1 1;
}

.safety-panel {
  padding: 28px clamp(20px, 3vw, 32px) 24px;
}

.safety {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.safety li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.safety .pedestal {
  width: 52px;
  height: 52px;
}

.safety .pedestal svg {
  width: 30px;
  height: 30px;
}

.safety b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15.5px;
  color: var(--ink);
}

/* ---------- よくある質問 ---------- */
.faq-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px);
}

.faq details {
  border-bottom: 2px dashed var(--line);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 44px 16px 4px;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "Q";
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: linear-gradient(#ffbe6b, #f07d2a);
  box-shadow: 0 2px 0 rgba(74, 42, 24, 0.2);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1;
  color: #fff;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: linear-gradient(var(--edge), var(--edge)) center / 12px 2.5px no-repeat, #fff;
  transition: rotate 0.3s var(--pop);
}

.faq details:not([open]) summary::after {
  background: linear-gradient(var(--edge), var(--edge)) center / 12px 2.5px no-repeat, linear-gradient(var(--edge), var(--edge)) center / 2.5px 12px no-repeat, #fff;
}

.faq details[open] summary::after {
  rotate: 180deg;
}

.faq details > div {
  padding: 0 8px 18px 48px;
  font-size: 15px;
  color: var(--ink-soft);
}

.faq details > div p:last-child {
  margin: 0;
}

/* ---------- さいごの舞台 ---------- */
.finale {
  position: relative;
  isolation: isolate;
  min-height: clamp(560px, 62vw, 700px);
  margin-top: -20px;
  -webkit-mask: url(../img/edge-cloud-t.svg?v=5dbc1c6d) 0 0 / 400px 44px repeat-x, linear-gradient(#000 0 0) 0 43px / 100% calc(100% - 43px) no-repeat;
  mask: url(../img/edge-cloud-t.svg?v=5dbc1c6d) 0 0 / 400px 44px repeat-x, linear-gradient(#000 0 0) 0 43px / 100% calc(100% - 43px) no-repeat;
}

.finale-in {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 84px var(--gutter) 0;
  text-align: center;
}

.finale-in .logo {
  width: min(360px, 70vw);
  filter: drop-shadow(0 8px 12px rgba(40, 70, 110, 0.25));
}

.finale-in .wa {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 34px);
}

.finale-pets {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 2%;
  width: min(540px, 88vw);
  margin: 6px auto 0;
  padding-bottom: 34px;
}

.finale-pets .pet {
  position: relative;
  flex: 1;
}

.finale-pets .pet:nth-child(2) {
  flex: 1.2;
}

/* ---------- ワン寿ゲームズのトップ ---------- */
.hero-studio .hero-in {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: 0;
  padding-top: clamp(40px, 7vh, 84px);
  text-align: center;
}

.hero-studio .hero-copy {
  align-items: center;
  padding-bottom: 0;
}

.hero-studio .hero-logo {
  width: min(640px, 86vw);
}

.hero-studio .hero-catch {
  font-size: clamp(28px, 3.6vw, 48px);
}

.hero-studio .hero-note {
  margin: 0;
  padding: 8px 18px 9px;
  border: 2.5px solid var(--edge);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 3px 0 rgba(74, 42, 24, 0.18);
  font-weight: 700;
  font-size: 15px;
}

.studio-pets {
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  width: min(660px, 94vw);
  translate: -50% 0;
}

.studio-pets .pet {
  position: relative;
  flex: 1;
}

.studio-pets .pet:nth-child(2) {
  flex: 1.25;
  margin-inline: -3%;
  z-index: 1;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(24px, 3.6vw, 44px);
}

.game-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 460px;
  border: 2.5px solid var(--edge);
  border-radius: 22px;
  overflow: hidden;
  background: url(../img/kv-ground-c.webp?v=05293e33) 50% 100% / cover no-repeat, linear-gradient(#80cafd, #cbeffd);
}

.game-visual .phone {
  --pw: 210px;
  position: relative;
  z-index: 1;
  margin-bottom: 30px;
  rotate: -4deg;
}

.game-visual .pet {
  position: absolute;
  bottom: 18px;
}

.game-visual .pet.omochi {
  left: 4%;
  width: 34%;
}

.game-visual .pet.mame {
  right: 3%;
  width: 32%;
}

.game-body .logo {
  width: min(320px, 80%);
  margin-bottom: 8px;
}

.game-body h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
}

.game-body p {
  color: var(--ink-soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 3px 14px 4px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.tags li:nth-child(1) {
  background: #ffe0c2;
}

.tags li:nth-child(2) {
  background: #d9f2c6;
}

.tags li:nth-child(3) {
  background: #ffd6e3;
}

.tags li:nth-child(4) {
  background: #d4efff;
}

.about-card {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(24px, 3.6vw, 40px);
}

.about-card dl {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 0;
  margin: 18px 0 0;
}

.about-card dt,
.about-card dd {
  margin: 0;
  padding: 12px 4px;
  border-top: 2px dashed var(--line);
}

.about-card dt {
  font-weight: 900;
}

/* ---------- 規約などの文書 ---------- */
.doc {
  padding: clamp(36px, 6vw, 70px) 0 clamp(80px, 10vw, 120px);
}

.doc-card {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 60px) clamp(28px, 5vw, 56px);
  border: 2.5px solid var(--edge);
  border-radius: 28px;
  background: url(../img/tex-linen.webp?v=0f8dd2ff) 0 0 / 256px 256px, linear-gradient(var(--paper), #fdf1df);
  background-blend-mode: multiply, normal;
  box-shadow: inset 0 2px 0 #fff, var(--hard), var(--soft);
}

.doc-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(217, 185, 142, 0.55);
  border-radius: 21px;
  pointer-events: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-soft);
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: #c9a074;
}

.doc-card h1 {
  display: inline-block;
  margin: 0 0 8px;
  padding: 10px 22px 12px;
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  background: linear-gradient(#ffbe6b, #f59d4f 46%, #f07d2a 46.5%);
  box-shadow: inset 0 -6px 0 #c45a12, inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 4px 0 rgba(74, 42, 24, 0.22);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(21px, 3vw, 30px);
  line-height: 1.35;
  color: #fff;
  -webkit-text-stroke: 0.2em #8a3d0c;
  paint-order: stroke fill;
}

.doc-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.doc-card h2 {
  position: relative;
  margin: 2.2em 0 0.8em;
  padding: 0 0 8px 36px;
  border-bottom: 2.5px dashed var(--line);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 21px);
}

.doc-card h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  background: url(../img/icon-paw.webp?v=bcb957bf) center / contain no-repeat;
}

.doc-card h3 {
  margin: 1.5em 0 0.5em;
  font-size: 16.5px;
}

.doc-card ul,
.doc-card ol:not(.breadcrumb) {
  padding-left: 1.4em;
}

.doc-card li {
  margin: 0.3em 0;
}

.doc-card .faq {
  margin-top: 10px;
}

.contact-card {
  margin: 18px 0 8px;
  padding: 18px 22px;
  border: 2.5px solid var(--edge);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 0 rgba(74, 42, 24, 0.14);
}

.contact-card p {
  margin: 0.3em 0;
}

.contact-card .mail {
  font-family: var(--display);
  font-size: clamp(15px, 2.2vw, 19px);
  word-break: break-all;
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 2px dashed var(--line);
  text-align: left;
  vertical-align: top;
}

.table tr:last-child th,
.table tr:last-child td {
  border-bottom: 0;
}

.table th {
  width: 11em;
  background: #fff4e3;
  font-weight: 900;
  white-space: nowrap;
}

.table ul {
  margin: 0.4em 0 0;
}

/* ---------- 見つからない ---------- */
.lost {
  padding: clamp(60px, 10vw, 110px) 0 clamp(90px, 12vw, 140px);
  text-align: center;
}

.lost img {
  width: 200px;
  margin: 0 auto 10px;
}

.lost h1 {
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 10px;
}

.lost .lead {
  font-weight: 700;
  color: var(--ink-soft);
}

.lost .hero-cta {
  justify-content: center;
}

/* ---------- 下の帯（土の色。上の縁は波） ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: -28px;
  padding: 72px 0 36px;
  color: #fbe9d2;
  background: linear-gradient(#6b452b, #4a2e1f);
  -webkit-mask: url(../img/edge-wave-t.svg?v=8af48927) 0 0 / 240px 30px repeat-x, linear-gradient(#000 0 0) 0 29px / 100% calc(100% - 29px) no-repeat;
  mask: url(../img/edge-wave-t.svg?v=8af48927) 0 0 / 240px 30px repeat-x, linear-gradient(#000 0 0) 0 29px / 100% calc(100% - 29px) no-repeat;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: -200px;
  z-index: -1;
  background: url(../img/paws-walk-w.svg?v=37a10413) 0 0 / 200px 200px;
  opacity: 0.25;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-brand img {
  width: 230px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  color: #eed7bb;
}

.site-footer h2 {
  margin: 4px 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  color: #fff;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 6px 0;
  font-size: 14px;
}

.site-footer a {
  color: #fbe9d2;
  text-decoration-color: rgba(251, 233, 210, 0.4);
}

.site-footer a:hover {
  color: #fff;
}

.copyright {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 2px dashed rgba(251, 233, 210, 0.25);
  font-size: 12.5px;
  color: #d9bea0;
  text-align: center;
}

/* ---------- 見えたら出てくる（JS が .is-in を付ける。JS がなければ最初から見える） ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) [data-reveal] {
    opacity: 0;
    translate: 0 34px;
    scale: 0.96;
    transition: opacity 0.6s var(--out), translate 0.8s var(--pop), scale 0.8s var(--pop);
  }

  html:not(.no-js) [data-reveal].is-in {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }

  [data-reveal]:nth-child(2) {
    transition-delay: 0.1s;
  }

  [data-reveal]:nth-child(3) {
    transition-delay: 0.2s;
  }

  [data-reveal]:nth-child(4) {
    transition-delay: 0.3s;
  }
}

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

/* ---------- 幅ごと ---------- */
@media (max-width: 1080px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 36px;
  }

  .shot:nth-child(even) .phone {
    margin-top: 0;
  }
}

@media (max-width: 960px) {
  .hero-in {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0;
    padding: 22px 0 64px;
  }

  .hero-copy {
    align-items: center;
    padding-bottom: 8px;
  }

  .hero-logo {
    width: min(78vw, 420px);
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stage {
    width: min(100%, 520px);
    height: clamp(440px, 120vw, 600px);
    margin-top: 6px;
  }

  .hero-stage .phone {
    --pw: clamp(170px, 44vw, 240px);
    bottom: 9%;
  }

  .kv-tree {
    --edge-s: 0.5;
  }

  .kv-near {
    --edge-s: 0.42;
  }

  .demo {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
    gap: 64px;
  }

  .step:not(:last-child)::after {
    top: auto;
    right: auto;
    left: 50%;
    bottom: -44px;
    translate: -50% 0;
    rotate: 90deg;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split.flip > :first-child {
    order: 0;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* スマホ幅（〜600px）：舞台の帯は、真ん中だけの細かい絵（-c）に替わる。真ん中の 36% に置く */
@media (max-width: 600px) {
  :root {
    --header: 60px;
  }

  body {
    font-size: 15px;
  }

  .kv-far,
  .kv-fence,
  .kv-ground {
    left: 32%;
    width: 36%;
  }

  .brand img {
    height: 34px;
  }

  .nav {
    gap: 6px;
  }

  .nav a {
    min-height: 36px;
    padding: 0 10px 4px;
    border-radius: 12px;
    font-size: 12px;
  }

  .nav a img {
    display: none;
  }

  .ribbon {
    height: 62px;
    min-width: 7em;
    padding: 0 6px 12px;
    border-width: 0 49px;
    border-image-width: 0 49px;
    font-size: 21px;
  }

  .hero-catch {
    font-size: clamp(24px, 7vw, 30px);
  }

  .hero-tag {
    font-size: 12.5px;
  }

  .sticker.free {
    --s: 86px;
    right: 1%;
  }

  .sticker.bubble {
    font-size: 14px;
    padding: 9px 13px 11px;
    left: 0;
  }

  .btn-lg {
    min-height: 62px;
    font-size: 18px;
  }

  .ticker span {
    font-size: 14px;
    padding: 9px 12px 10px;
  }

  .demo-card {
    padding: 26px 14px 22px;
  }

  .chips {
    grid-template-columns: 1fr;
  }

  .phones .phone {
    --pw: min(44vw, 200px);
  }

  .phones .tilt-r {
    margin-left: -28px;
  }

  .gallery {
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .gallery::-webkit-scrollbar {
    display: none;
  }

  .shot {
    flex: 0 0 min(72vw, 260px);
    scroll-snap-align: center;
  }

  .voices {
    grid-template-columns: 1fr;
    max-width: 320px;
    gap: 26px;
  }

  .bubble {
    font-size: 15px;
  }

  .game-visual {
    min-height: 380px;
  }

  .game-visual .phone {
    --pw: 170px;
  }

  .about-card dl {
    grid-template-columns: 1fr;
  }

  .about-card dd {
    border-top: 0;
    padding-top: 0;
  }

  /* 表は、見出しを上・中身を下に積む（せまい列で1文字ずつ折れないように） */
  .table th,
  .table td {
    display: block;
    width: auto;
    white-space: normal;
  }

  .table th {
    padding: 9px 14px 7px;
    border-bottom: 0;
  }

  .table td {
    padding: 8px 14px 14px;
    overflow-wrap: anywhere;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .faq summary {
    font-size: 15px;
  }

  .faq details > div {
    padding-left: 12px;
  }
}
