/* ワン寿ゲームズ トップ：「うちの子と すごす 1日の おさんぽ」
   スクロールで あさ（ヒーロー・写真の まほう）→ おひる（うちの子パズル）→ ゆうがた（おもい）→ よる（おやすみ）。
   空の色は 節ごとの背景を 次の節へ つなげて かえる（固定の層を JS で切りかえない＝軽く、JS が無くても同じ）。
   動きは transform・opacity・stroke-dashoffset だけ。動きを減らす設定では、最後の形で止める。
   共通の部品（ボタン・スマホの枠・縁取りの字 .wa・流れる帯）は wanju.css。 */

body.page-top {
  --t-ink: #3d2416;
  --t-morning: #e6f4ff;
  --t-noon: #fff4df;
  --t-dusk-1: #ffe2c2;
  --t-dusk-2: #f6a98c;
  --t-night-1: #1b2552;
  --t-night-2: #0c1330;
  background: var(--t-morning);
}

/* 背景の歩く肉球は、トップでは使わない（空の色を主役に） */
body.page-top::before,
body.page-top::after {
  display: none;
}

/* ---------- はじまりの演出：足あとが3つ ぽん・ぽん・ぽん → 足あとの所から 丸く ひらく（CSS だけ・約1.3秒。さわるのは じゃましない） ---------- */
@property --t-iris {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.t-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--cream);
  pointer-events: none;
  -webkit-mask: radial-gradient(circle at 50% 52%, transparent var(--t-iris), #000 calc(var(--t-iris) + 1px));
  mask: radial-gradient(circle at 50% 52%, transparent var(--t-iris), #000 calc(var(--t-iris) + 1px));
  animation: t-intro-out 0.62s cubic-bezier(0.55, 0, 0.25, 1) 0.72s both;
}

.t-intro .paw {
  position: absolute;
  width: 46px;
  height: 46px;
  background: url(../img/icon-paw.webp?v=bcb957bf) center / contain no-repeat;
  opacity: 0;
  animation: t-stamp 0.42s var(--pop) both;
}

.t-intro .a {
  left: calc(50% - 86px);
  top: calc(52% + 22px);
  rotate: -18deg;
  animation-delay: 0.04s;
}

.t-intro .b {
  left: calc(50% - 23px);
  top: calc(52% - 30px);
  rotate: 6deg;
  animation-delay: 0.2s;
}

.t-intro .c {
  left: calc(50% + 40px);
  top: calc(52% - 82px);
  rotate: 24deg;
  animation-delay: 0.36s;
}

@keyframes t-stamp {
  from {
    opacity: 0;
    transform: scale(1.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes t-intro-out {
  to {
    --t-iris: 150vmax;
    visibility: hidden;
  }
}

/* ---------- 上の帯：ヒーローの上では すきとおり、スクロールすると板になる。下に おさんぽの すすみ具合 ---------- */
/* すきとおるのは スクリプトが 動くときだけ（JS が無いと .is-solid が 付かず、メニューが 字の上に 浮いたままに なる） */
body.page-top .site-header {
  position: fixed;
  inset: 0 0 auto;
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
}

body.page-top .site-header .brand {
  transition: opacity 0.4s, translate 0.4s var(--out);
}

html:not(.no-js) body.page-top .site-header:not(.is-solid) {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

html:not(.no-js) body.page-top .site-header:not(.is-solid) .brand:not(:focus-visible) {
  opacity: 0;
  translate: 0 -8px;
}

@supports (backdrop-filter: blur(8px)) {
  body.page-top .site-header.is-solid {
    background: rgba(255, 253, 247, 0.74);
    backdrop-filter: blur(12px) saturate(1.3);
  }
}

body.page-top.is-night .site-header.is-solid {
  background: rgba(14, 21, 52, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

/* おさんぽの道：上の帯の ロゴと メニューの あいだを、こむぎが スクロールに あわせて あるく
   （top.js が ロゴの後ろに 差しこみ、--p を 0〜1 で入れる）。せまい画面では 帯の下の 細い線だけ */
.t-walk {
  position: relative;
  flex: 1;
  align-self: stretch;
  margin: 0 clamp(16px, 3vw, 44px);
  container-type: inline-size;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.site-header.is-solid .t-walk {
  opacity: 1;
}

.t-walk i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 21px;
  border-top: 2.5px dashed rgba(122, 74, 32, 0.26);
}

.t-walk i::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2.5px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffc56b, #f07d2a);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

.t-walk b {
  position: absolute;
  left: 0;
  bottom: 22px;
  width: 30px;
  height: 34px;
  background: url(../img/pet-komugi.webp?v=acd0aeb9) 50% 100% / contain no-repeat;
  translate: calc(var(--p, 0) * (100cqw - 30px)) 0;
  transform-origin: 50% 100%;
}

.t-walk.is-back b {
  scale: -1 1;
}

@media (prefers-reduced-motion: no-preference) {
  .t-walk.is-walking b {
    animation: t-trot 0.34s ease-in-out infinite alternate;
  }
}

@keyframes t-trot {
  from {
    transform: translateY(0) rotate(-5deg);
  }

  to {
    transform: translateY(-4px) rotate(5deg);
  }
}

body.page-top.is-night .t-walk i {
  border-top-color: rgba(255, 255, 255, 0.24);
}

@media (max-width: 759px) {
  .t-walk {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2.5px;
    height: 3px;
    margin: 0;
  }

  .t-walk i {
    inset: 0;
    border: 0;
  }

  .t-walk i::after {
    top: 0;
    height: 100%;
    border-radius: 0;
  }

  .t-walk b {
    display: none;
  }
}

/* ---------- 章の札：時計（その時刻を さす）・時刻・ひとこと ---------- */
.t-chapter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.06em;
  /* 小さな字なので、明るい空の上でも 読める こさ（4.5:1 以上） */
  color: #b4480c;
}

.t-chapter b {
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--t-ink);
}

.t-clock {
  --h: 10;
  --m: 0;
  position: relative;
  width: 26px;
  height: 26px;
  border: 2.5px solid currentColor;
  border-radius: 50%;
  background: #fff;
  flex: none;
}

.t-clock::before,
.t-clock::after {
  content: "";
  position: absolute;
  left: calc(50% - 1.25px);
  bottom: 50%;
  width: 2.5px;
  border-radius: 2px;
  background: var(--t-ink);
  transform-origin: 50% 100%;
}

.t-clock::before {
  height: 6px;
  rotate: calc((var(--h) * 30 + var(--m) * 0.5) * 1deg);
}

.t-clock::after {
  height: 8.5px;
  rotate: calc(var(--m) * 6deg);
}

.t-magic .t-clock { --h: 10; --m: 0; }
.t-game .t-clock { --h: 13; --m: 0; }
.t-about .t-clock { --h: 17; --m: 30; }
.t-night .t-clock { --h: 21; --m: 0; }

/* ---------- 見出しと字 ---------- */
.t-h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.3vw, 62px);
  line-height: 1.26;
  letter-spacing: 0.02em;
  color: var(--t-ink);
  font-feature-settings: "palt";
}

.t-h2 .ln,
.t-manifesto .ln,
.t-catch .ln {
  display: block;
}

.t-lead {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: clamp(15.5px, 1.35vw, 18px);
  font-weight: 700;
  line-height: 1.95;
  color: #6a4a38;
}

.t-fine {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: #8a6a58;
}

.t-sec {
  position: relative;
  z-index: 1;
  padding-block: clamp(96px, 11vw, 168px);
}

/* ---------- あさ：ヒーロー ----------
   うちの子たちの幅 --pw と 下の すきま --pb は、うちの子と「おしてみてね」で 同じ値を使う */
.t-hero {
  --pw: min(700px, 92vw, 78svh);
  --pb: clamp(48px, 8svh, 96px);
  min-height: max(100svh, 620px);
}

.t-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header) + clamp(10px, 4vh, 48px)) var(--gutter) 0;
  text-align: center;
}

.t-logo {
  margin: 0;
  width: min(720px, 84vw, 78vh);
}

.t-logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(40, 70, 110, 0.26));
}

.t-catch {
  margin: clamp(4px, 1.2vh, 14px) 0 0;
  font-size: clamp(28px, min(4vw, 6.4vh), 58px);
  line-height: 1.24;
}

.t-catch .ln {
  display: inline-block;
}

.t-note {
  margin: clamp(10px, 1.8vh, 18px) 0 0;
  padding: 8px 18px 9px;
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 3px 0 rgba(74, 42, 24, 0.18);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--t-ink);
}

/* うちの子たち：押すと よろこぶ。マウスの ほうを 少し むく。ときどき まばたき */
.t-pets {
  position: absolute;
  left: 50%;
  bottom: var(--pb);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  width: var(--pw);
  translate: -50% 0;
}

.t-pet {
  --lx: 0;
  position: relative;
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 100%;
  rotate: calc(var(--lx) * 3.5deg);
  translate: calc(var(--lx) * 5px) 0;
  transition: rotate 0.6s var(--out), translate 0.6s var(--out);
  -webkit-tap-highlight-color: transparent;
}

.t-pet.komugi {
  flex: 1.25;
  margin-inline: -3%;
  z-index: 1;
}

.t-pet .body {
  position: relative;
  display: block;
  transform-origin: 50% 100%;
}

.t-pet img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 8px rgba(50, 80, 20, 0.28));
  user-select: none;
  -webkit-user-drag: none;
}

.t-pet .shut {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* 目を閉じた絵は ページの 読みこみが 終わってから 読む（top.js が 読めたら .has-shut を付ける） */
.t-pet.has-shut.is-blink .shut,
.t-pet.has-shut.is-happy .shut {
  opacity: 1;
}

.t-pet.has-shut.is-blink .open,
.t-pet.has-shut.is-happy .open {
  opacity: 0;
}

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

  .t-pet.omochi .body {
    animation-delay: -1.1s;
  }

  .t-pet.mame .body {
    animation-delay: -2.2s;
  }

  .t-pet.is-happy .body {
    animation: t-hop 0.75s var(--pop);
  }
}

@keyframes t-breathe {
  50% {
    transform: scale(1.012, 0.985);
  }
}

@keyframes t-hop {
  0% {
    transform: scale(1.08, 0.88);
  }

  35% {
    transform: translateY(-16%) scale(0.94, 1.08);
  }

  70% {
    transform: translateY(0) scale(1.06, 0.92);
  }

  100% {
    transform: none;
  }
}

.t-pet .name {
  position: absolute;
  left: 50%;
  bottom: -6px;
  translate: -50% 0;
  padding: 4px 12px 5px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--display);
  font-size: 13px;
  line-height: 1;
  color: var(--t-ink);
  white-space: nowrap;
  opacity: 0;
  scale: 0.8;
  transition: opacity 0.25s, scale 0.3s var(--pop);
  pointer-events: none;
}

.t-pet:hover .name,
.t-pet:focus-visible .name {
  opacity: 1;
  scale: 1;
}

/* キーボードで 選んだ子：芝生の上でも 見える 白い輪と こい ふち */
.t-pet:focus-visible {
  outline: 3.5px solid #fff;
  outline-offset: 2px;
  border-radius: 28px;
  box-shadow: 0 0 0 7px rgba(74, 42, 24, 0.6);
}

.t-pet .bubble {
  position: absolute;
  left: 50%;
  bottom: 96%;
  translate: -50% 0;
  padding: 8px 14px 9px;
  border: 2.5px solid var(--edge);
  border-radius: 16px;
  background: #fff;
  font-family: var(--display);
  font-size: clamp(13px, 1.25vw, 16px);
  line-height: 1.3;
  color: var(--t-ink);
  white-space: nowrap;
  filter: drop-shadow(0 4px 0 rgba(74, 42, 24, 0.18));
  opacity: 0;
  scale: 0.6;
  transform-origin: 50% 100%;
  transition: opacity 0.2s, scale 0.35s var(--pop);
  pointer-events: none;
}

.t-pet .bubble::before,
.t-pet .bubble::after,
.t-hint span::before,
.t-hint span::after,
.t-hello::before,
.t-hello::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - 11px);
  width: 22px;
  height: 14px;
  background: var(--edge);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.t-pet .bubble::after,
.t-hint span::after,
.t-hello::after {
  top: calc(100% - 2.5px);
  left: calc(50% - 7.5px);
  width: 15px;
  height: 10px;
  background: #fff;
}

.t-hint span::before {
  left: 18px;
  clip-path: polygon(0 0, 100% 0, 20% 100%);
}

.t-hint span::after {
  left: 21.5px;
  clip-path: polygon(0 0, 100% 0, 20% 100%);
}

/* 「はじめまして！」は うちの子の 顔の 左に出て、しっぽは 右下（顔の ほう）へ */
.t-hello::before {
  left: auto;
  right: 18px;
  clip-path: polygon(0 0, 100% 0, 80% 100%);
}

.t-hello::after {
  left: auto;
  right: 21.5px;
  clip-path: polygon(0 0, 100% 0, 80% 100%);
}

.t-pet.is-talk .bubble {
  opacity: 1;
  scale: 1;
}

.t-heart {
  position: absolute;
  left: var(--hx, 50%);
  top: 22%;
  width: 26px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 24'%3E%3Cpath d='M13 22C5 16 1.5 12 1.5 7.5A5.5 5.5 0 0 1 13 5a5.5 5.5 0 0 1 11.5 2.5C24.5 12 21 16 13 22Z' fill='%23ff6f9a' stroke='%234a2a18' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  animation: t-heart 0.95s var(--out) forwards;
}

@keyframes t-heart {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }

  20% {
    opacity: 1;
    transform: translate(calc(var(--hd, 0) * 0.3px), -14px) scale(1.15);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--hd, 0) * 1px), -92px) scale(0.85) rotate(calc(var(--hd, 0) * 0.4deg));
  }
}

.t-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--pb) + var(--pw) * 0.42);
  z-index: 3;
  margin: 0;
  translate: calc(-50% + var(--pw) * 0.06) 0;
  pointer-events: none;
  transition: opacity 0.4s, scale 0.4s var(--out);
}

.t-hint span {
  position: relative;
  display: inline-block;
  padding: 7px 14px 8px;
  border: 2.5px solid var(--edge);
  border-radius: 14px;
  background: #fff;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1;
  color: var(--orange-deep);
  box-shadow: 0 3px 0 rgba(74, 42, 24, 0.18);
}


@media (prefers-reduced-motion: no-preference) {
  .t-hint span {
    animation: t-bob 2.4s ease-in-out infinite;
  }
}

.t-hero.is-touched .t-hint {
  opacity: 0;
  scale: 0.8;
}

@keyframes t-bob {
  50% {
    translate: 0 -6px;
  }
}

.t-scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 74px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 11px 18px;
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 3px 0 rgba(74, 42, 24, 0.18);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1;
  color: var(--t-ink);
  text-decoration: none;
  transition: translate 0.25s var(--pop);
}

.t-scroll:hover {
  translate: 0 -2px;
}

.t-scroll i {
  width: 18px;
  height: 18px;
  background: url(../img/icon-paw.webp?v=bcb957bf) center / contain no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  .t-scroll i {
    animation: t-step 1.6s ease-in-out infinite;
  }
}

@keyframes t-step {
  0%,
  100% {
    translate: 0 -3px;
    rotate: -8deg;
  }

  50% {
    translate: 0 4px;
    rotate: 8deg;
  }
}

/* はじまりの 登場：足あとの 丸が ひらくのに あわせて、ロゴ → 字 → うちの子が ぽん・ぽん・ぽん（ロゴは 形だけ 動かし、消さない） */
@media (prefers-reduced-motion: no-preference) {
  .t-logo {
    animation: t-in-pop 0.85s var(--pop) 0.62s both;
  }

  .t-catch .ln {
    animation: t-in-up 0.7s var(--out) 0.86s both;
  }

  .t-catch .ln + .ln {
    animation-delay: 0.98s;
  }

  .t-note {
    animation: t-in-up 0.7s var(--out) 1.1s both;
  }

  .t-pet {
    animation: t-in-hop 0.75s var(--pop) 0.96s both;
  }

  .t-pet.omochi {
    animation-delay: 1.08s;
  }

  .t-pet.mame {
    animation-delay: 1.2s;
  }

  .t-hint {
    animation: t-in-pop 0.5s var(--pop) 1.7s both;
  }
}

@keyframes t-in-pop {
  from {
    transform: translateY(26px) scale(0.6);
  }
}

@keyframes t-in-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

@keyframes t-in-hop {
  from {
    opacity: 0;
    transform: translateY(55%) scale(0.86);
  }

  55% {
    opacity: 1;
  }
}

/* スクロールで ヒーローを はなれるとき：字は 先に 上へ、うちの子は 少し おくれて（奥ゆき） */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .t-hero-copy {
      animation: t-copy-away linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90svh;
    }

    .t-pets {
      animation: t-pets-away linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90svh;
    }
  }
}

@keyframes t-copy-away {
  to {
    transform: translateY(-90px);
    opacity: 0.15;
  }
}

@keyframes t-pets-away {
  to {
    transform: translateY(36px);
  }
}

/* 流れる帯は ヒーローと あさの節の あいだ */
body.page-top .ticker {
  z-index: 6;
}

/* ---------- あさ（10:00）：写真の まほう ---------- */
.t-magic {
  background: linear-gradient(180deg, #d8eefe 0%, var(--t-morning) 30%, #fdf8ee 100%);
  margin-top: -30px;
  padding-top: clamp(110px, 12vw, 180px);
}

.t-magic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.t-steps {
  display: grid;
  gap: 6px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.t-steps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 16px 14px 14px;
  border: 2px solid transparent;
  border-radius: 20px;
  transition: background-color 0.45s, border-color 0.45s, box-shadow 0.45s, translate 0.45s var(--out);
}

/* 番号：アプリの 丸い札。字は こい茶（白い字は 明るい地の上で 読みにくい） */
.t-steps .no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--edge);
  border-radius: 50%;
  background: linear-gradient(#ffe2a0, #ffbe55);
  box-shadow: inset 0 -4px 0 rgba(214, 120, 30, 0.35), 0 3px 0 rgba(74, 42, 24, 0.2);
  font-family: var(--display);
  font-size: 19px;
  line-height: 1;
  color: var(--t-ink);
  transition: background 0.45s, border-color 0.45s, color 0.45s;
}

.t-steps h3 {
  margin: 4px 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
  color: var(--t-ink);
  transition: color 0.45s;
}

.t-steps p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
  color: #6a4a38;
  transition: color 0.45s;
}

.t-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}

/* 写真：--pad は 白い ふち。中の絵の 位置（.t-born）を ふちから 計るので、ここで決める */
.t-polaroid {
  --pad: 16px;
  position: relative;
  z-index: 1;
  width: min(420px, 82vw);
  margin: 0;
  padding: var(--pad) var(--pad) calc(var(--pad) * 3.6);
  container-type: inline-size;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(74, 42, 24, 0.08), 0 30px 50px -24px rgba(60, 40, 20, 0.5);
  rotate: -3deg;
}

.t-polaroid::before {
  content: "";
  position: absolute;
  left: calc(50% - 56px);
  top: -16px;
  width: 112px;
  height: 32px;
  background: rgba(255, 214, 140, 0.82);
  rotate: 2deg;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.t-pic {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 3px;
  background: #e8f3df;
}

.t-photo,
.t-paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t-paint {
  display: none;
}

.t-paint .s {
  fill: none;
  stroke: #fff;
  stroke-width: 150;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

.t-polaroid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--pad) * 0.9);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1;
  text-align: center;
  color: #5a3c2a;
  rotate: -1.5deg;
}

/* うちの子：JS が無い・動きを減らす ときは、写真の右に とびだした形で止まっている */
.t-born {
  position: absolute;
  z-index: 2;
  right: -34%;
  bottom: -6%;
  width: 60%;
  rotate: 8deg;
  transform-origin: 50% 100%;
}

.t-popout {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 18px rgba(60, 40, 20, 0.32));
}

.t-hello {
  position: absolute;
  z-index: 3;
  right: 70%;
  top: -12%;
  padding: 10px 16px 11px;
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  background: #fff;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--t-ink);
  filter: drop-shadow(0 4px 0 rgba(74, 42, 24, 0.18));
  rotate: -8deg;
  transform-origin: 90% 100%;
}

.t-spark {
  position: absolute;
  z-index: 3;
  width: 34px;
  height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2c2 10 8 16 18 18-10 2-16 8-18 18-2-10-8-16-18-18C12 18 18 12 20 2Z' fill='%23ffe066' stroke='%234a2a18' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.t-spark.k1 { left: 8%; top: 16%; }
.t-spark.k2 { right: 2%; top: 30%; width: 24px; height: 24px; }
.t-spark.k3 { left: 16%; bottom: 12%; width: 26px; height: 26px; }
.t-spark.k4 { right: 8%; bottom: 6%; }

/* 動く形（top.js が .is-anim を付ける）：節を長くして、中を画面に止め（sticky）、スクロールで すすめる。
   --in 写真が 入ってくる・--pop うちの子が とびだす・--hop とびだす 弧（0→1→0）。どれも 0〜1 */
.t-magic.is-anim {
  height: 270vh;
  padding: 0;
}

.t-magic.is-anim .t-pin {
  position: sticky;
  top: 0;
  display: grid;
  align-items: center;
  height: 100svh;
  padding-top: var(--header);
  overflow: hidden;
}

.t-magic.is-anim .t-h2 {
  font-size: clamp(28px, min(4.3vw, 6.2svh), 62px);
}

.t-magic.is-anim .t-steps {
  margin-top: clamp(14px, 3.2svh, 34px);
}

.t-magic.is-anim .t-steps li {
  padding-block: clamp(8px, 1.5svh, 14px);
}

.t-magic.is-anim .t-fine {
  margin-top: clamp(8px, 1.8svh, 18px);
}

.t-magic.is-anim .t-paint {
  display: block;
  opacity: calc(1 - var(--pop, 0) * 1.6);
}

/* 描いた絵は、とびだす子と 入れかわった しゅんかんに 消す（同じ位置・同じ大きさ なので つなぎ目が 見えない） */
.t-magic.is-anim .t-drawn {
  opacity: calc(1 - min(1, var(--pop, 0) * 60));
}

.t-magic.is-anim .t-polaroid {
  opacity: var(--in, 0);
  translate: calc(var(--pop, 0) * -16%) calc((1 - var(--in, 0)) * 70px);
  rotate: calc(-3deg - (1 - var(--in, 0)) * 8deg);
}

.t-magic.is-anim .t-born {
  right: auto;
  bottom: auto;
  left: calc(var(--pad) + (100cqw - 2 * var(--pad)) * 0.1484);
  top: calc(var(--pad) + (100cqw - 2 * var(--pad)) * 0.0625);
  width: calc((100cqw - 2 * var(--pad)) * 0.7031);
  opacity: min(1, calc(var(--pop, 0) * 60));
  translate: calc(var(--pop, 0) * 80%) calc(var(--pop, 0) * 5% - var(--hop, 0) * 18%);
  scale: calc(1 + var(--pop, 0) * 0.14);
  rotate: calc(var(--pop, 0) * 9deg);
}

.t-magic.is-anim .t-spark {
  opacity: var(--pop, 0);
  scale: calc(0.3 + var(--pop, 0) * 0.7);
  rotate: calc(var(--pop, 0) * 90deg);
}

.t-magic.is-anim .t-hello {
  opacity: 0;
  scale: 0.5;
  transition: opacity 0.2s, scale 0.45s var(--pop);
}

.t-magic.is-anim.is-hello .t-hello {
  opacity: 1;
  scale: 1;
}

/* いまの手順だけ 白い板。ほかは 字を うすく（うすくても 4.5:1 は 残す） */
.t-magic.is-anim .t-steps li:not(.is-on) .no {
  border-color: #9c8a7c;
  background: linear-gradient(#fbf5ec, #ece0d0);
  color: #74645a;
}

.t-magic.is-anim .t-steps li:not(.is-on) h3,
.t-magic.is-anim .t-steps li:not(.is-on) p {
  color: #74645a;
}

.t-magic.is-anim .t-steps li.is-on {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 28px -18px rgba(50, 80, 120, 0.45);
  translate: 8px 0;
}

/* ---------- おひる（13:00）：うちの子パズル ---------- */
.t-game {
  background:
    radial-gradient(60% 45% at 18% 38%, rgba(255, 236, 170, 0.75), transparent 70%),
    linear-gradient(180deg, #fdf8ee 0%, var(--t-noon) 40%, #fff0d6 100%);
}

.t-game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.t-game-stage {
  --gp: 0;
  position: relative;
  display: flex;
  justify-content: center;
  padding: 40px 0 30px;
}

.t-phone {
  --pw: clamp(250px, 24vw, 330px);
  z-index: 2;
  rotate: -4deg;
}

/* 動画は 再生が はじまってから 出す（それまでは 下の 止まった絵 .t-poster） */
.t-phone > video {
  opacity: 0;
  transition: opacity 0.4s;
  position: absolute;
  left: 4%;
  top: 1.923%;
  width: 92%;
  height: 96.154%;
  object-fit: cover;
  border-radius: 12.6% / 5.8%;
  background: #cfe7a6;
  z-index: 1;
}

.t-phone > video.is-playing {
  opacity: 1;
}

.t-piece {
  --d: 1;
  position: absolute;
  z-index: 1;
  width: clamp(46px, 4.6vw, 72px);
  height: auto;
  filter: drop-shadow(0 10px 10px rgba(140, 80, 20, 0.22));
  translate: 0 calc(var(--gp) * var(--d) * -1px);
}

.t-piece.q1 { left: 6%; top: 10%; --d: 60; rotate: -12deg; }
.t-piece.q2 { left: 0%; top: 46%; --d: 30; width: clamp(52px, 5.2vw, 80px); rotate: 8deg; }
.t-piece.q3 { left: 12%; bottom: 8%; --d: 80; rotate: 14deg; }
.t-piece.q4 { right: 4%; top: 6%; --d: 50; rotate: 10deg; }
.t-piece.q5 { right: 0%; top: 40%; --d: 90; width: clamp(54px, 5.6vw, 86px); rotate: -16deg; }
.t-piece.q6 { right: 12%; bottom: 6%; --d: 40; rotate: -6deg; }
.t-piece.q7 { left: 24%; top: -2%; --d: 110; width: clamp(40px, 3.8vw, 58px); z-index: 3; }

@media (prefers-reduced-motion: no-preference) {
  .t-piece {
    animation: t-float 5.4s ease-in-out infinite;
  }

  .t-piece.q2 { animation-duration: 6.2s; animation-delay: -2s; }
  .t-piece.q3 { animation-duration: 4.8s; animation-delay: -1s; }
  .t-piece.q4 { animation-duration: 5.9s; animation-delay: -3s; }
  .t-piece.q5 { animation-duration: 6.6s; animation-delay: -4s; }
  .t-piece.q6 { animation-duration: 5.1s; animation-delay: -2.6s; }
  .t-piece.q7 { animation-duration: 4.4s; animation-delay: -1.4s; }
}

@keyframes t-float {
  50% {
    transform: translateY(-12px) rotate(6deg);
  }
}

.t-word {
  position: absolute;
  z-index: 3;
  height: auto;
  filter: drop-shadow(0 6px 0 rgba(74, 42, 24, 0.16));
}

.t-word.w1 {
  right: 0;
  top: 18%;
  width: clamp(150px, 15vw, 220px);
  rotate: 8deg;
}

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

.t-game .t-h2 {
  font-size: clamp(30px, 3.6vw, 52px);
}

html:not(.no-js) .t-word {
  opacity: 0;
  scale: 0.4;
  transition: opacity 0.3s, scale 0.6s var(--pop);
}

html:not(.no-js) .t-game.is-in .t-word {
  opacity: 1;
  scale: 1;
}

html:not(.no-js) .t-game.is-in .t-word.w2 {
  transition-delay: 0.25s;
}

.t-game-logo {
  display: block;
  width: min(300px, 70%);
  height: auto;
  margin: 0 0 14px;
  filter: drop-shadow(0 8px 10px rgba(120, 70, 20, 0.2));
}

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

/* 特長：アプリの 板の 札（こげ茶の ふち・下に 厚み）。絵は アプリと 同じ 丸い 台座（.pedestal は wanju.css）に のせる */
.t-features li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  padding: 10px 14px 13px 10px;
  border: 2.5px solid var(--edge);
  border-radius: 20px;
  background: linear-gradient(#fffdf7, #fff1dc);
  box-shadow: inset 0 -5px 0 rgba(214, 160, 90, 0.22), inset 0 2px 0 #fff, 0 4px 0 rgba(74, 42, 24, 0.16);
}

.t-features .pedestal {
  width: 52px;
  height: 52px;
}

.t-features b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.3;
  color: var(--t-ink);
}

/* 説明の字だけ（台座の span に 当てない） */
.t-features li > div > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: #85644f;
}

.t-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

/* ---------- ゆうがた（17:30）：おもい ---------- */
.t-about {
  overflow: hidden;
  background: linear-gradient(180deg, #fff0d6 0%, var(--t-dusk-1) 34%, #ffc9a2 72%, var(--t-dusk-2) 100%);
  padding-bottom: clamp(140px, 16vw, 230px);
}

/* しずむ お日さま */
/* 上の ふちは くっきり、下は もやに とけて 節の さかいめ（よるの空の はじまり）で 消える */
.t-about::before {
  --sun: min(46vw, 640px);
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--sun) * -0.57);
  width: var(--sun);
  height: var(--sun);
  border-radius: 50%;
  translate: -50% 0;
  background: radial-gradient(circle, #fff6d2 0 33%, #ffd47e 45%, rgba(255, 170, 110, 0.38) 60%, transparent 70%);
  -webkit-mask: linear-gradient(#000 18%, transparent 43%);
  mask: linear-gradient(#000 18%, transparent 43%);
  pointer-events: none;
}

.t-about .wrap {
  position: relative;
  z-index: 1;
}

/* ゆうやけの 空：雲は ヒーローと 同じ絵を 夕日の 色に（読みこみ済みなので 新しく とどかない）、鳥は 左から 右へ ねぐらに かえる */
.t-dusk {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.t-dusk .cl {
  position: absolute;
  height: auto;
  opacity: 0.75;
  filter: sepia(0.55) saturate(1.8) hue-rotate(-24deg) brightness(1.04);
}

.t-dusk .c1 {
  right: -4%;
  top: 9%;
  width: clamp(220px, 26vw, 420px);
}

.t-dusk .c2 {
  left: -6%;
  top: 52%;
  width: clamp(200px, 22vw, 360px);
  opacity: 0.6;
}

.t-dusk .bird {
  --y: 20%;
  --s: 1;
  --d: 34s;
  position: absolute;
  left: 0;
  top: var(--y);
  width: 36px;
  height: 17px;
  scale: var(--s);
}

.t-dusk .bird::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 14'%3E%3Cpath d='M2 9 Q8 1 15 8 Q22 1 28 9' fill='none' stroke='%237a3f4e' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform-origin: 50% 60%;
}

/* 字の ない 帯だけを 飛ぶ：上の すきま（章の札より 上）と、夕日の まわり（下の すきま） */
.t-dusk .b1 { --y: 6%; --d: 38s; --t: -4s; }
.t-dusk .b2 { --y: 9%; --s: 0.8; --d: 38s; --t: -5.2s; }
.t-dusk .b3 { --y: 4%; --s: 0.7; --d: 38s; --t: -6.1s; }
.t-dusk .b4 { --y: 88%; --s: 0.9; --d: 46s; --t: -20s; }
.t-dusk .b5 { --y: 91%; --s: 0.65; --d: 46s; --t: -21.4s; }

@media (prefers-reduced-motion: no-preference) {
  .t-dusk .cl {
    animation: t-drift 40s ease-in-out infinite alternate;
  }

  .t-dusk .c2 {
    animation-duration: 52s;
    animation-direction: alternate-reverse;
  }

  .t-dusk .bird {
    animation: t-fly var(--d) linear var(--t, 0s) infinite;
  }

  .t-dusk .bird::before {
    animation: t-flap 0.62s ease-in-out infinite alternate;
  }

  .t-dusk .b2::before { animation-delay: -0.2s; }
  .t-dusk .b3::before { animation-delay: -0.4s; }
  .t-dusk .b5::before { animation-delay: -0.3s; }
}

/* 動きを減らす設定では 空の まんなかあたりで 止まる */
@media (prefers-reduced-motion: reduce) {
  .t-dusk .b1 { translate: 58vw 0; }
  .t-dusk .b2 { translate: 61vw 0; }
  .t-dusk .b3 { translate: 64vw 0; }
  .t-dusk .b4 { translate: 22vw 0; }
  .t-dusk .b5 { translate: 25vw 0; }
}

@keyframes t-drift {
  to {
    transform: translateX(-4vw);
  }
}

@keyframes t-fly {
  from {
    transform: translate(-10vw, 0);
  }

  50% {
    transform: translate(50vw, -18px);
  }

  to {
    transform: translate(112vw, 6px);
  }
}

@keyframes t-flap {
  from {
    transform: scaleY(1);
  }

  to {
    transform: scaleY(0.35) translateY(2px);
  }
}

.t-manifesto {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 5.2vw, 76px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #3a2114;
  font-feature-settings: "palt";
}

.t-manifesto em {
  font-style: normal;
  color: #c2410c;
}

html:not(.no-js) .t-manifesto .ln {
  opacity: 0;
  translate: 0 0.5em;
  transition: opacity 0.9s var(--out), translate 1s var(--out);
}

html:not(.no-js) .t-manifesto.is-in .ln {
  opacity: 1;
  translate: 0 0;
}

html:not(.no-js) .t-manifesto.is-in .ln:nth-child(2) {
  transition-delay: 0.14s;
}

html:not(.no-js) .t-manifesto.is-in .ln:nth-child(3) {
  transition-delay: 0.28s;
}

.t-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(40px, 5vw, 72px);
  align-items: start;
}

.t-about-text {
  margin: 0;
  font-size: clamp(15.5px, 1.3vw, 17.5px);
  font-weight: 700;
  line-height: 2;
  color: #5a3826;
}

.t-company {
  margin: 0;
}

.t-company div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1.5px solid rgba(90, 56, 38, 0.22);
}

.t-company div:last-child {
  border-bottom: 1.5px solid rgba(90, 56, 38, 0.22);
}

.t-company dt {
  font-family: var(--display);
  font-size: 14px;
  color: #8a4a26;
}

.t-company dd {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: #4a2e1f;
  overflow-wrap: anywhere;
}

.t-company a {
  color: #a43c0c;
}

/* ---------- よる（21:00）：おなじ 公園の よる ---------- */
.t-night {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  min-height: max(100svh, 700px);
  padding-top: clamp(96px, min(14vw, 20svh), 200px);
  /* 下は ねむる 3びきと 公園の ぶん（3びきの 高さ ≒ 幅の 0.36） */
  padding-bottom: calc(min(640px, 92vw) * 0.36 + clamp(30px, 5vw, 72px) + 40px);
  background: linear-gradient(180deg, var(--t-dusk-2) 0%, #8a6a9c 9%, #3a3f7c 22%, var(--t-night-1) 42%, var(--t-night-2) 100%);
  color: #fff;
  text-align: center;
}

.t-night .t-chapter {
  color: #ffd27a;
}

.t-night .t-chapter b {
  color: #fff;
}

.t-night .t-clock {
  background: #1b2552;
}

.t-night .t-clock::before,
.t-night .t-clock::after {
  background: #ffd27a;
}

.t-night .t-h2 {
  color: #fff;
  text-shadow: 0 4px 24px rgba(10, 16, 48, 0.6);
}

.t-night .t-lead {
  margin-inline: auto;
  color: #dfe3ff;
}

.t-night .t-cta {
  justify-content: center;
}

.t-night-copy {
  position: relative;
  z-index: 3;
}

/* 公園の 下の ふちは、下の帯（夜空の色）へ とかす */
.t-night::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(60px, 9vw, 130px);
  background: linear-gradient(rgba(12, 19, 48, 0), var(--t-night-2));
  pointer-events: none;
}

.t-moon {
  position: absolute;
  z-index: 0;
  right: 12%;
  top: 18%;
  width: clamp(70px, 8vw, 120px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fffbe8, #ffe9a8 60%, #f6d27a);
  box-shadow: 0 0 40px 10px rgba(255, 232, 160, 0.35), 0 0 120px 40px rgba(255, 232, 160, 0.14);
}

.t-stars i {
  position: absolute;
  z-index: 0;
  left: var(--x);
  top: var(--y);
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  opacity: 0.85;
}

.t-stars i:nth-child(1) { --x: 6%; --y: 22%; --s: 3px; }
.t-stars i:nth-child(2) { --x: 14%; --y: 12%; --s: 2px; }
.t-stars i:nth-child(3) { --x: 22%; --y: 30%; --s: 4px; }
.t-stars i:nth-child(4) { --x: 31%; --y: 17%; --s: 2px; }
.t-stars i:nth-child(5) { --x: 38%; --y: 8%; --s: 3px; }
.t-stars i:nth-child(6) { --x: 46%; --y: 24%; --s: 2px; }
.t-stars i:nth-child(7) { --x: 55%; --y: 13%; --s: 3px; }
.t-stars i:nth-child(8) { --x: 63%; --y: 28%; --s: 2px; }
.t-stars i:nth-child(9) { --x: 70%; --y: 10%; --s: 4px; }
.t-stars i:nth-child(10) { --x: 78%; --y: 36%; --s: 2px; }
.t-stars i:nth-child(11) { --x: 92%; --y: 16%; --s: 3px; }
.t-stars i:nth-child(12) { --x: 96%; --y: 30%; --s: 2px; }
.t-stars i:nth-child(13) { --x: 3%; --y: 44%; --s: 2px; }
.t-stars i:nth-child(14) { --x: 18%; --y: 50%; --s: 3px; }
.t-stars i:nth-child(15) { --x: 27%; --y: 42%; --s: 2px; }
.t-stars i:nth-child(16) { --x: 41%; --y: 38%; --s: 2px; }
.t-stars i:nth-child(17) { --x: 59%; --y: 44%; --s: 3px; }
.t-stars i:nth-child(18) { --x: 67%; --y: 52%; --s: 2px; }
.t-stars i:nth-child(19) { --x: 84%; --y: 48%; --s: 3px; }
.t-stars i:nth-child(20) { --x: 90%; --y: 58%; --s: 2px; }
.t-stars i:nth-child(21) { --x: 10%; --y: 60%; --s: 2px; }
.t-stars i:nth-child(22) { --x: 50%; --y: 56%; --s: 2px; }
.t-stars i:nth-child(23) { --x: 74%; --y: 22%; --s: 2px; }
.t-stars i:nth-child(24) { --x: 34%; --y: 58%; --s: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .t-stars i {
    animation: t-twinkle 3.2s ease-in-out infinite;
  }

  .t-stars i:nth-child(3n) { animation-delay: -1s; animation-duration: 2.6s; }
  .t-stars i:nth-child(3n + 1) { animation-delay: -2s; animation-duration: 3.8s; }
  .t-stars i:nth-child(4n) { animation-duration: 4.4s; }
}

@keyframes t-twinkle {
  50% {
    opacity: 0.25;
    transform: scale(0.6);
  }
}

/* よるの公園：あさと おなじ 層の絵を くらく（読みこみ済みの絵なので 新しく とどかない） */
.t-night-park {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: max(100%, 1400px);
  aspect-ratio: 2560 / 760;
  translate: -50% 0;
  /* 月あかりの 青い ひと色に（色を 消して 茶に → 色相を 回して 青に） */
  filter: grayscale(1) sepia(0.85) hue-rotate(185deg) saturate(1.8) brightness(0.36);
}

.t-night-park img {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
}

.t-night-park .far { top: 0; }
.t-night-park .fence { top: 21.2%; }
.t-night-park .ground { bottom: 0; }

.t-sleepers {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(30px, 5vw, 72px);
  display: flex;
  align-items: flex-end;
  gap: 0;
  width: min(640px, 92vw);
  translate: -50% 0;
  filter: brightness(0.8) saturate(0.82) drop-shadow(0 0 30px rgba(255, 236, 170, 0.18));
}

/* 月あかりの たまり（3びきの 下だけ 草が 明るい） */
.t-sleepers::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18%;
  right: -18%;
  bottom: -14%;
  height: 46%;
  background: radial-gradient(closest-side, rgba(255, 242, 196, 0.34), rgba(255, 242, 196, 0.1) 60%, transparent);
}

.t-sleepers img {
  flex: 1;
  width: 0;
  height: auto;
}

.t-sleepers .komugi {
  flex: 1.15;
  margin-inline: -4%;
  z-index: 1;
}

.t-sleepers .z {
  position: absolute;
  font-family: var(--display);
  font-style: normal;
  color: #e9edff;
  opacity: 0;
  text-shadow: 0 0 10px rgba(180, 190, 255, 0.6);
}

.t-sleepers .z1 { left: 54%; top: 0%; font-size: 18px; }
.t-sleepers .z2 { left: 60%; top: -12%; font-size: 24px; }
.t-sleepers .z3 { left: 67%; top: -26%; font-size: 32px; }

@media (prefers-reduced-motion: no-preference) {
  .t-sleepers .z {
    animation: t-zz 3.6s ease-in-out infinite;
  }

  .t-sleepers .z2 { animation-delay: 0.6s; }
  .t-sleepers .z3 { animation-delay: 1.2s; }
}

@media (prefers-reduced-motion: reduce) {
  .t-sleepers .z {
    opacity: 0.8;
  }
}

@keyframes t-zz {
  0% {
    opacity: 0;
    transform: translate(0, 10px);
  }

  30%,
  60% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translate(14px, -20px);
  }
}

/* よるの下の帯（トップだけ 夜空の色に） */
body.page-top .site-footer {
  margin-top: 0;
  background: linear-gradient(var(--t-night-2), #080d22);
  -webkit-mask: none;
  mask: none;
}

body.page-top .site-footer::before {
  opacity: 0.08;
}

/* ---------- せまい画面 ---------- */
@media (max-width: 900px) {
  .t-magic-grid,
  .t-game-grid,
  .t-about-grid {
    grid-template-columns: 1fr;
  }

  /* 上ぞろえ（いまの手順だけ 説明を出すので、高さが かわっても 写真が 動かないように） */
  .t-magic.is-anim .t-pin {
    align-items: start;
    padding-top: calc(var(--header) + 30px);
  }

  .t-magic.is-anim .t-magic-grid {
    grid-template-rows: auto auto;
    gap: 14px;
  }

  .t-magic.is-anim .t-steps li:not(.is-on) p {
    display: none;
  }

  .t-magic.is-anim .t-stage {
    order: -1;
    min-height: 0;
    height: 36svh;
  }

  /* 写真は 舞台の高さに あわせる（白い ふち 10px・下 36px → 幅 : 高さ ≒ 0.912 : 1） */
  .t-magic.is-anim .t-polaroid {
    --pad: 10px;
    width: auto;
    height: 100%;
    aspect-ratio: 0.912;
    translate: calc(var(--pop, 0) * -12%) calc((1 - var(--in, 0)) * 24px);
    rotate: calc(-3deg - (1 - var(--in, 0)) * 4deg);
  }

  .t-magic.is-anim .t-polaroid figcaption {
    font-size: 15px;
  }

  .t-hello {
    top: -2%;
    padding: 8px 12px 9px;
    font-size: 15px;
  }

  .t-magic.is-anim .t-steps {
    margin-top: 16px;
    gap: 2px;
  }

  .t-magic.is-anim .t-steps li {
    padding: 8px 10px;
  }

  .t-magic.is-anim .t-steps p {
    font-size: 13.5px;
    line-height: 1.6;
  }

  .t-magic.is-anim .t-h2 {
    font-size: clamp(24px, 6.4vw, 34px);
  }

  .t-magic.is-anim .t-chapter {
    margin-bottom: 10px;
  }

  .t-magic.is-anim .t-fine {
    margin-top: 8px;
    font-size: 11px;
  }

  .t-game-stage {
    order: -1;
  }

  .t-features {
    grid-template-columns: 1fr 1fr;
  }
}

/* 背の低い スマホ（SE など）：写真を 小さく して 手順まで 1画面に */
@media (max-width: 900px) and (max-height: 700px) {
  .t-magic.is-anim .t-stage {
    height: 31svh;
  }

  .t-magic.is-anim .t-pin {
    padding-top: calc(var(--header) + 22px);
  }
}

/* 動かない形（JS なし・動きを減らす）の せまい画面：写真の下に うちの子が はみ出す ぶん あける */
@media (max-width: 900px) {
  .t-magic:not(.is-anim) .t-stage {
    min-height: 0;
    padding: 20px 0 60px;
  }

  .t-magic:not(.is-anim) .t-polaroid {
    width: min(300px, 70vw);
    translate: -12% 0;
  }
}

@media (max-width: 600px) {
  .t-scroll {
    display: none;
  }

  .t-note {
    font-size: 13px;
    padding: 7px 14px 8px;
  }

  .t-catch {
    font-size: clamp(26px, 8.2vw, 34px);
  }

  .t-catch .ln {
    display: block;
  }

  .t-company div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .t-sleepers {
    width: 96vw;
  }

  .t-night-park {
    width: 220%;
  }

  /* うちの子たちは 画面の幅 ほぼ いっぱい。少し 上げて 芝生の まんなかに */
  .t-hero {
    --pw: min(96vw, 70svh);
    --pb: clamp(60px, 11svh, 110px);
  }

  /* おもいの文：1行が 画面に おさまる大きさ（「うちの子が、ゲームの 中でも」が 13字） */
  .t-manifesto {
    font-size: clamp(22px, 6.5vw, 30px);
  }

  /* 特長：2列の 小さな板（絵を 上に） */
  .t-features {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .t-features li {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 6px;
    padding: 12px 8px 14px;
    text-align: center;
  }

  .t-features .pedestal {
    width: 48px;
    height: 48px;
  }

  .t-features b {
    font-size: 15px;
  }

  .t-features li > div > span {
    font-size: 12px;
  }

  /* よる：夜空を 広げすぎない（下は 公園と ねむる 3びきの ぶん） */
  .t-night {
    min-height: 0;
    padding-bottom: 300px;
  }

  .t-moon {
    right: 6%;
    top: 4%;
    width: 54px;
  }
}

/* 動きを減らす設定：はじまりの演出なし・止まった形 */
@media (prefers-reduced-motion: reduce) {
  .t-intro {
    display: none;
  }

  .t-pet {
    transition: none;
  }
}
