/* ぽんぽこリズム（おなかを太鼓のようにたたく音ゲー） */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* .btn などの display より「隠す」を優先 */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #FFF4E0;
  color: #5A3A1E;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;   /* 字体は本編と同じ */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#pon {
  position: relative;
  height: 100vh;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 70%, #FFE3B8 0%, #FFF4E0 70%);
}

/* ---- 上のバー ---- */
.bar {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 64px;
  padding: max(8px, env(safe-area-inset-top)) 104px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}
.back {
  /* 「3段階のルール」の ③ 道具：白く半分すけた丸・ふちなし・濃いこげ茶の字（本編・ふれあいと同じ。2026-11-05） */
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #4A2E16;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.score {
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.score small { font-size: 12px; margin-left: 2px; }
.combo {
  font-size: 14px;
  font-weight: bold;
  color: #C8641E;
  min-width: 4em;
}
.combo.bump { animation: bump .18s; }
@keyframes bump { 50% { transform: scale(1.25); } }

/* ---- 右上のワイプ（タヌくんの顔） ---- */
.wipe {
  position: absolute;
  right: 12px;
  top: max(8px, env(safe-area-inset-top));
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 3px 10px rgba(90, 58, 30, .25);
  background: #FFE9C7;
  overflow: hidden;
  z-index: 6;
}
#wipe-face {
  position: absolute;
  inset: 0;
}
/* 720×900 の絵の顔（中心 300, 120 あたり）を丸の中に。絵の幅 = ワイプの 3.3 倍 */
#wipe-face img {
  position: absolute;
  width: 330%;
  max-width: none;
  left: -87.4%;
  top: -6.25%;
  visibility: hidden;
  pointer-events: none;
}
#wipe-face img.on { visibility: visible; }
.wipe.bump { animation: wipePop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes wipePop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }

/* ---- ◉ が流れる道 ---- */
.lane {
  position: absolute;
  left: 0; right: 0;
  top: calc(max(8px, env(safe-area-inset-top)) + 100px);
  height: 64px;
  background: rgba(255, 255, 255, .7);
  border-top: 2px solid #F0C98E;
  border-bottom: 2px solid #F0C98E;
  z-index: 4;
  touch-action: none;   /* ステージ1：道（わく）もたたける所（2026-11-11）。指が少し動いてもスクロール扱いにしない */
}
.target {
  position: absolute;
  left: 48px; top: 50%;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  border: 4px solid #F08A3C;
  background: rgba(255, 210, 160, .5);
}
.target.hit { animation: hit .15s; }
@keyframes hit { 50% { transform: scale(1.18); background: rgba(255, 170, 90, .8); } }
#notes { position: absolute; inset: 0; overflow: hidden; }
.note {
  position: absolute;
  left: 0; top: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: radial-gradient(circle, #7A4A22 0 30%, #fff 31% 45%, #C77A3A 46%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
  will-change: transform;
}
/* ぽこ（2拍目・4拍目）は少し小さく、明るい色 */
.note.poko {
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  background: radial-gradient(circle, #B5602A 0 30%, #fff 31% 45%, #F0A050 46%);
}
/* ぷるん（指ですべらせる）は、ピンクの「〜」 */
.note.purun {
  width: 58px; height: 38px;
  margin: -19px 0 0 -29px;
  border-radius: 19px;
  background: #FF8FB1;
  border: 3px solid #fff;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  line-height: 30px;
  text-align: center;
}
.note.purun::after { content: "〜"; }
.note.done { opacity: 0; transition: opacity .12s; }
.judge {
  position: absolute;
  left: 48px; top: -28px;
  transform: translateX(-50%);
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.judge.show { animation: judge .5s ease-out; }
@keyframes judge {
  0% { opacity: 1; transform: translate(-50%, 6px) scale(1.2); }
  70% { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}
.judge.perfect { color: #C8641E; }
.judge.good { color: #3A9A4A; }
.judge.ok { color: #5A7AB0; }
.judge.miss { color: #999; }

.bpm {
  position: absolute;
  left: 0; right: 0;
  top: calc(max(8px, env(safe-area-inset-top)) + 172px);
  text-align: center;
  font-weight: 900;
  font-size: 20px;
  color: #C8641E;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
}
.bpm.show { animation: banner 1.6s ease-out; }
@keyframes banner {
  0% { opacity: 0; transform: scale(.7); }
  15%, 75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}

/* ---- おなかのアップ ---- */
#stage {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: calc(max(8px, env(safe-area-inset-top)) + 170px);
  overflow: hidden;
  touch-action: none;   /* 指が少し動いてもスクロール扱いにしない */
}
#body {
  position: absolute;
  transform-origin: 0 0;
}
#body.bounce { animation: bounce .18s; }   /* 揺れの仕組みが使えないとき（file://）の代わり */
@keyframes bounce { 40% { transform: scale(1.015, .985); } }
#tanu-img, #belly-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#belly-canvas { visibility: hidden; }
#pops { position: absolute; inset: 0; pointer-events: none; }
.pop {
  position: absolute;
  font-weight: 900;
  font-size: 26px;
  color: #fff;
  -webkit-text-stroke: 5px #8A4A1A;
  paint-order: stroke;
  transform: translate(-50%, -50%);
  animation: popUp .55s ease-out forwards;
}
.pop.purun { font-size: 30px; -webkit-text-stroke-color: #D9487A; }
.pop.poko { font-size: 22px; -webkit-text-stroke-color: #C0602A; }
@keyframes popUp {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.7); }
  30% { transform: translate(-50%, -80%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1); }
}

/* ---- はじめる前・結果 ---- */
.sheet {
  position: absolute;
  left: 16px; right: 16px;
  top: 50%;
  transform: translateY(-40%);
  padding: 22px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 6px 24px rgba(90, 58, 30, .25);
  text-align: center;
  z-index: 10;
}
.sheet[hidden] { display: none; }
.sheet h1, .sheet h2 { margin: 0 0 12px; font-size: 24px; }
.sheet p { margin: 8px 0; line-height: 1.6; }
.sheet .small { font-size: 13px; color: #8A6A4A; }
/* 言語の切りかえ（はじめる前の画面の右上。ぽよんラリーと同じく、押すと次の言語へ） */
.lang-btn {
  position: absolute;
  right: 10px; top: 10px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);   /* ③ 道具 */
  color: #4A2E16;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.lang-btn[hidden] { display: none; }
.btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: #F08A3C;
  box-shadow: 0 4px 0 #C8641E;   /* 本編の「遊ぶ」と同じ、オレンジ1色＋こい影 */
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #C8641E; }
.btn-sub { background: #F3DDBF; color: #5A3A1E; box-shadow: 0 3px 0 rgba(74, 46, 22, .12); }
.btn-sub:active { box-shadow: 0 1px 0 rgba(74, 46, 22, .12); }
.r-score { font-size: 18px; }
.r-score b { font-size: 44px; color: #C8641E; }
.r-list {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  font-size: 14px;
  text-align: left;
}
.r-list b { float: right; }
.r-line { font-weight: bold; }

/* ---- おなかモード：◉ がおなかの上に出てくる ---- */
#pon.mode-belly .lane { display: none; }
#pon.mode-belly #stage { top: calc(max(8px, env(safe-area-inset-top)) + 96px); }
#pon.mode-belly .bpm { top: calc(max(8px, env(safe-area-inset-top)) + 100px); }
#moles { position: absolute; inset: 0; pointer-events: none; }
.mole {
  position: absolute;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: radial-gradient(circle, #fff 0 18%, rgba(224, 103, 31, .62) 19%);
  box-shadow: 0 2px 8px rgba(90, 40, 10, .3);
  opacity: 0;
}
.mole .ring {
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 4px solid #F08A3C;
}
.mole.poko {
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  background: radial-gradient(circle, #fff 0 18%, rgba(240, 160, 80, .7) 19%);
}
.mole.poko .ring { border-color: #F0A050; }
.mole.purun {
  width: 80px; height: 50px;
  margin: -25px 0 0 -40px;
  border-radius: 25px;
  background: rgba(255, 143, 177, .8);
  color: #fff;
  font-weight: 900;
  font-size: 26px;
  line-height: 42px;
  text-align: center;
}
.mole.purun::before { content: "〜"; }
.mole.purun .ring { border-color: #FF5E93; }
.mole.hit { animation: moleHit .25s ease-out forwards; }
.mole.done { animation: moleOut .2s forwards; }
@keyframes moleHit { to { opacity: 0; transform: scale(1.5); } }
@keyframes moleOut { to { opacity: 0; } }
.pop.jd { font-size: 18px; -webkit-text-stroke-width: 4px; }
.pop.jd.perfect { -webkit-text-stroke-color: #F08A3C; }
.pop.jd.good { -webkit-text-stroke-color: #3A9A4A; }
.pop.jd.ok { -webkit-text-stroke-color: #5A7AB0; }
.pop.jd.miss { -webkit-text-stroke-color: #999; }
@media (prefers-reduced-motion: reduce) {
  .pop, .mole.hit { animation-duration: .01s; }
}

/* ---- ステージを選ぶボタン ---- */
.btn-stage { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.btn-stage small { font-size: 12px; font-weight: bold; opacity: .85; }
/* たたくたびに、ワイプの顔が「ぴくっ」 */
#wipe-face.tick { animation: tick .14s; }
@keyframes tick { 50% { transform: scale(1.06, .94) translateY(2px); } }

/* ---- 中断ボタン ---- */
.pause {
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);   /* ③ 道具 */
  color: #4A2E16;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  flex: none;
}
.count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 96px;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 8px #F08A3C;
  paint-order: stroke;
  z-index: 11;
  pointer-events: none;
}
.count.show { animation: countPop .6s ease-out; }
@keyframes countPop { 0% { transform: scale(1.6); opacity: 0; } 30% { transform: scale(1); opacity: 1; } }

/* ---- クリアまでのバー ---- */
.progress {
  position: absolute;
  left: 12px; right: 112px;
  top: calc(max(8px, env(safe-area-inset-top)) + 66px);
  height: 10px;
  border-radius: 5px;
  background: rgba(138, 90, 43, .15);
  z-index: 5;
}
#progress-fill {
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, #F0A050, #F08A3C);
}
.progress span {
  position: absolute;
  right: -6px; top: 50%;
  transform: translate(50%, -50%);
  font-size: 18px;
}

/* ---- きせかえ ---- */
#parts-layer { position: absolute; inset: 0; pointer-events: none; }
#parts-layer img { position: absolute; transform: translate(-50%, -50%); }
#parts-layer img.full { left: 0; top: 0; width: 100%; height: 100%; transform: none; }

/* ---- 結果：上にランク別イラスト、下に点数とボタン ---- */
.result {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: #FFF4E0;
}
.r-art {
  position: relative;
  height: 52%;
  min-height: 300px;
  overflow: hidden;
}
.r-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;   /* 顔とおなかが入るように */
  display: block;
  animation: rIn .5s ease-out;
}
@keyframes rIn { from { transform: scale(1.08); opacity: 0; } }
.r-art h2 {
  position: absolute;
  left: 0; right: 0; bottom: 28px;
  margin: 0;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 7px #F08A3C;
  paint-order: stroke;
  text-shadow: 0 3px 8px rgba(90, 40, 10, .35);
  animation: rTitle .6s .2s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes rTitle { from { transform: scale(.4); opacity: 0; } }
.r-card {
  position: relative;
  margin-top: -18px;
  padding: 18px 16px max(20px, env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(90, 58, 30, .15);
  text-align: center;
}
.r-card .r-score { margin-top: 0; }

/* 映す範囲の上（タヌくんの口もと）を、背景の色でふんわり隠す。顔は右上のワイプで見せる（ART.fade） */
#pon.art-fade #stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 16%;
  background: linear-gradient(#FFF4E0 25%, rgba(255, 244, 224, 0));
  pointer-events: none;
}

/* ---- ステージ3 まんぷく ---- */
.mole.food {
  width: 62px; height: 62px;
  margin: -31px 0 0 -31px;
  background: rgba(255, 255, 255, .85);
  display: grid;
  place-items: center;
}
.mole.food span { font-size: 36px; line-height: 1; }
.mole.food .ring { border-color: #F08A3C; }
.want {
  position: absolute;
  right: 8px;
  top: calc(max(8px, env(safe-area-inset-top)) + 100px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px 4px 8px;
  border-radius: 18px;
  background: #fff;
  border: 3px solid #F08A3C;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(90, 58, 30, .2);
  z-index: 6;
}
.want::before {   /* ワイプのほうを指す、吹き出しのしっぽ */
  content: "";
  position: absolute;
  right: 34px; top: -12px;
  border: 8px solid transparent;
  border-bottom: 10px solid #F08A3C;
  border-top: 0;
}
.want.show { animation: wantPop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes wantPop { from { transform: scale(.5); opacity: 0; } }
.full {
  position: absolute;
  left: 12px;
  top: calc(max(8px, env(safe-area-inset-top)) + 82px);
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: bold;
  z-index: 5;
}
#pon.mode-food .full { display: flex; }
.full i {
  display: block;
  width: 120px; height: 10px;
  border-radius: 5px;
  background: rgba(138, 90, 43, .15);
  overflow: hidden;
}
.full b {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #FFC37A, #FF8A3D);
  transition: width .3s;
}
#pon.mode-food .bpm { top: calc(max(8px, env(safe-area-inset-top)) + 150px); }
.pop.wrong { font-size: 18px; -webkit-text-stroke-color: #777; }
#wipe-face img.face-only { width: 100%; left: 0; top: 0; }
.want-food { font-size: 44px; line-height: 1.1; }   /* 吹き出しの食べものは大きく */
.want[hidden] { display: none; }

/* ---- 遊び方の説明（ステージが始まってから、最初の ◉ が出るまで） ---- */
.howto {
  position: absolute;
  left: 24px; right: 24px;
  top: 46%;
  transform: translateY(-50%);
  padding: 16px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 16px rgba(90, 58, 30, .2);
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  z-index: 7;
  pointer-events: none;
  animation: howIn .35s ease-out;
}
.howto p { margin: 6px 0; }
.howto b { color: #C8641E; }
.howto .howto-sub { font-size: 13px; color: #8A6A4A; }
.howto.out { opacity: 0; transition: opacity .3s; }
@keyframes howIn { from { opacity: 0; transform: translateY(-40%); } }
.ic-note, .ic-purun { display: inline-block; vertical-align: middle; font-style: normal; }
.ic-note {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #7A4A22 0 30%, #fff 31% 45%, #C77A3A 46%);
}
.ic-purun {
  padding: 0 10px;
  border-radius: 999px;
  background: #FF8FB1;
  color: #fff;
  line-height: 28px;
}
.pop.big {   /* おなかがふくらんだ「ぽよ〜ん！」 */
  font-size: 40px;
  -webkit-text-stroke: 7px #FF8A3D;
  animation-duration: 1.1s;
}
.howto .feast { font-size: 30px; font-weight: 900; color: #C8641E; }
.howto.top { top: calc(max(8px, env(safe-area-inset-top)) + 150px); padding: 10px 12px; }   /* ごちそうさまタイム：おなかが見えるように上へ */

/* ---- 速さが変わる前のカットイン ---- */
.cutin {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}
.cutin-band {
  position: absolute;
  left: -12%; right: -12%;
  top: 30%;
  height: 128px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: calc(15% + 26px);
  transform: skewY(-7deg);
  /* 集中線のような斜めのすじ＋オレンジの帯 */
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, .18) 0 3px, transparent 3px 26px),
    linear-gradient(90deg, var(--c1, #FF8A3D), var(--c2, #F08A3C));   /* 色は回ごとに変わる（CUTIN.levels） */
  border-top: 4px solid #fff;
  border-bottom: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(90, 40, 10, .35);
}
.cutin-band img {
  width: 112px; height: 112px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  transform: skewY(7deg);   /* 顔はまっすぐに */
  flex: none;
}
.cutin-text { transform: skewY(7deg); color: #fff; line-height: 1.1; }
.cutin-text b {
  display: block;
  font-size: clamp(20px, 6.6vw, 30px);   /* 長い文字（まだまだ いける！）も画面に収まるように */
  font-weight: 900;
  -webkit-text-stroke: 6px #8A3A10;
  paint-order: stroke;
  white-space: nowrap;
}
.cutin-text span { font-size: 18px; font-weight: 900; -webkit-text-stroke: 4px #8A3A10; paint-order: stroke; }
/* 右から「シュッ」と入って、少し止まって、左へ「シュッ」と抜ける */
.cutin.go .cutin-band { animation: cutin 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cutin {
  0%   { transform: skewY(-7deg) translateX(110%); }
  18%  { transform: skewY(-7deg) translateX(0); }
  78%  { transform: skewY(-7deg) translateX(-4%); }
  100% { transform: skewY(-7deg) translateX(-120%); }
}
@media (prefers-reduced-motion: reduce) {
  .cutin.go .cutin-band { animation: none; }
}

/* ---- 本編とのつながり ---- */
.start-home { display: block; margin-top: 12px; font-size: 14px; font-weight: bold; color: #C8641E; }
.r-bonus { margin: 4px 0 8px; font-size: 13px; font-weight: bold; color: #E0457C; }

/* ---- X アプリの中で開いたとき（下 約4分の1 に X の投稿パネルがかぶさる） ---- */
body.in-x .sheet { top: 38%; }
body.in-x .r-card { padding-bottom: calc(25vh + 20px); }
body.in-x #stage { bottom: 22vh; }

/* ---- 画面を切りかえるときの幕（本編のトップ画面と同じ、落ち着いたクリーム色）----
   ページを開くと、幕がかかった所から、ふわっと明ける。タヌくんのところへ戻るときは、幕がかかってから戻る（body.leaving） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: #3A2210;   /* こげ茶（iris.js と同じ色。本編のカードから丸く閉じて来たので、同じ色で待つ） */
  /* 準備ができるまで（JS が body に ready を付けるまで）幕をかけたまま。万一 ready が付かなくても、3秒たったら明ける */
  animation: tanu-veil-arrive .7s cubic-bezier(.5, 0, .75, .45) 3s both;
}
@keyframes tanu-veil-arrive { 0%, 10% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
body.ready::after { animation: tanu-veil-ready .6s cubic-bezier(.5, 0, .75, .45) both; }
body.ready.iris::after { animation: none; opacity: 0; visibility: hidden; }   /* iris.js が引きついだので、すぐ消す */
/* もどるときは iris.js が丸く閉じる（leaving の幕は使わない） */
body.leaving.iris::after { animation: none; opacity: 0; }
@keyframes tanu-veil-ready { 0% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
body.leaving::after { animation: tanu-veil-leave .42s cubic-bezier(.45, 0, .7, .6) both; }
@keyframes tanu-veil-leave { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body::after, body.leaving::after { animation-duration: .01s; } }

/* 中国語のとき：中国語の字体を優先（本編の style.css と同じ） */
html[lang="zh"] body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }

/* ---- 下に続きがあるときの目印（2026-11-02。JS の scrollHint）----
   スクロールできる枠の下のはしを、背景の色へ うすくぼかして、小さな ︾ をゆっくり上下に。いちばん下まで見たら消える。
   目立たないように、︾ はうすい茶色（--chev）。枠の背景の色は --fade で合わせる */
.scroll-more::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  flex-shrink: 0;
  height: 46px;
  margin-top: -46px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M4 3l8 5 8-5M4 9l8 5 8-5' fill='none' stroke='%238A5A2B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' opacity='.38'/%3E%3C/svg%3E") 50% calc(100% - 6px) / 22px 15px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0), var(--fade, #FFF4E0) 78%);
}
.scroll-more.more::after { opacity: 1; animation: scroll-chev 1.8s ease-in-out infinite; }
@keyframes scroll-chev { 50% { background-position: 50% calc(100% - 2px), 0 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-more.more::after { animation: none; } }
.result.scroll-more { --fade: #fff; }   /* 下のカード（.r-card）が白いので、白へぼかす */
/* X アプリの中：画面の下 約4分の1 は X の投稿パネルに隠れるので、︾ とぼかしを、その上（下から 25vh）に出す（2026-11-03）。
   結果のカードの下には 25vh の余白があるので、いちばん下までスクロールすると、カードの最後がちょうどパネルの上に来て ︾ が消える */
body.in-x .result.scroll-more::after { bottom: 25vh; }

/* ---- ステージ4 おまつり（第2章の太鼓の絵。2026-11-06）---- */
.t-img, .t-canvas, .t-hit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.t-canvas { visibility: hidden; }
#pon.mode-taiko #tanu-img, #pon.mode-taiko #belly-canvas, #pon.mode-taiko #parts-layer { display: none; }
#pon.mode-taiko .t-img, #pon.mode-taiko .t-canvas { display: block; }
#pon.mode-taiko .t-hit { display: block; opacity: 0; transition: opacity .35s ease-out; }   /* 太鼓を押している間だけ。離したら、ふわっと戻る */
#pon.mode-taiko .t-hit.on { opacity: 1; transition-duration: .15s; }
/* 太鼓の面に広がる、やわらかい波紋 */
.drum-ripple { position: absolute; transform: translate(-50%, -50%) scale(.45); border-radius: 50%; border: 3px solid rgba(255, 236, 190, .85);
  box-shadow: 0 0 10px rgba(255, 220, 150, .5); opacity: .9; pointer-events: none; animation: drumRipple .5s ease-out forwards; }
@keyframes drumRipple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .drum-ripple { animation-duration: .3s; border-width: 2px; } #pon.mode-taiko .t-hit { display: none; } }
#pon.mode-taiko #stage { background: #3A2350; }
.btn-taiko.locked { background: #fff; color: #B08A66; box-shadow: 0 3px 0 #E2C7A6; }   /* まだ遊べない：白（主役のオレンジにしない） */
.btn-taiko .lock { font-size: 14px; margin-left: 2px; }
.taiko-note { margin: 2px 0 0; font-size: 13px; font-weight: bold; color: #8A4A1A; text-align: center; }
.taiko-note.show { animation: banner 2.4s ease-out forwards; }
/* おまつりの「ドンッ」（太鼓をタップ）：赤い ◉ と輪。ポン（おなか）はいつものオレンジ */
.mole.don {
  width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  background: radial-gradient(circle, #fff 0 18%, rgba(200, 40, 46, .7) 19%);
}
.mole.don .ring { border-color: #E0383E; }
.pop.don { font-size: 30px; -webkit-text-stroke-color: #A8222A; }
.ic-note.ic-don { background: radial-gradient(circle, #7A1A1A 0 30%, #fff 31% 45%, #E0383E 46%); }

/* ドーン（長押し）：赤い ◉ の下に「ながおし」、押している間は輪が一周する（--hold 秒） */
.mole .hold-label { position: absolute; left: 50%; top: 100%; margin-top: 6px; transform: translateX(-50%); white-space: nowrap;
  font-size: 13px; font-weight: 900; color: #fff; background: #C8282E; border-radius: 999px; padding: 1px 8px; }
.mole.holding { opacity: 1 !important; }
.mole.holding .ring { display: none; }
.hold-gauge { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); pointer-events: none; }
.hold-gauge circle { fill: none; stroke: #FFD040; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289;
  animation: holdFill var(--hold, 1s) linear forwards; }
@keyframes holdFill { to { stroke-dashoffset: 0; } }

/* おまつりの始まりのひとこと：ほかのステージと同じ、画面のまんなか（2026-11-06 ユーザー）。◉ の印だけ少し小さく */
.howto.tk .ic-note { width: 22px; height: 22px; }

/* 結果の画面（画面全体をおおう）でも、左上の「‹ もどる」だけは前に出す（2026-11-10。下の「タヌくんのところへ もどる」はやめた）。
   上のバーのほかの物（点数など）は、結果に同じものが出ているので隠す */
body.res-on .bar { z-index: 12; }
body.res-on .bar > :not(.tanu-back) { visibility: hidden; }

/* ---- ステージを 選ぶ ダイヤル（2026-11-14）：「ステージ」の 右に 数字の 窓。数字は 上下に 回る（なぞる・▲▼・キー） ---- */
.dial { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 2px; }
.dial-label { font-size: 22px; font-weight: 900; color: #4A2E16; }
.dial-box { display: flex; flex-direction: column; align-items: center; }
.dial-arrow { border: 0; background: none; padding: 2px 22px; font-size: 13px; line-height: 1; color: #C77A3A; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dial-arrow[disabled] { opacity: .25; }
.dial-win { position: relative; width: 84px; height: 104px; overflow: hidden; border-radius: 16px; background: #FFF1DA; box-shadow: inset 0 2px 6px rgba(90, 58, 30, .22);
  touch-action: none; cursor: ns-resize; outline: none;
  -webkit-mask-image: linear-gradient(transparent 0, rgba(0,0,0,.55) 24%, #000 30%, #000 70%, rgba(0,0,0,.55) 76%, transparent 100%); mask-image: linear-gradient(transparent 0, rgba(0,0,0,.55) 24%, #000 30%, #000 70%, rgba(0,0,0,.55) 76%, transparent 100%); }
.dial-win:focus-visible { box-shadow: inset 0 2px 6px rgba(90, 58, 30, .22), 0 0 0 3px #F08A3C; }
.dial-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.dial-strip.snap { transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); }
.dial-strip b { display: block; height: 48px; line-height: 48px; font-size: 44px; font-weight: 900; color: #E0671F; text-align: center; font-variant-numeric: tabular-nums; }
.dial-strip b.off { color: #C9A77F; font-size: 26px; }
.dial-desc { min-height: 1.6em; margin: 2px 0 8px !important; font-size: 13px; font-weight: bold; color: #8A6A4A; }
.btn-stage.locked { background: #fff; color: #B08A66; box-shadow: 0 3px 0 #E2C7A6; }
.btn-stage .lock { font-size: 14px; margin-left: 2px; }
@media (prefers-reduced-motion: reduce) { .dial-strip.snap { transition: none; } }
