/* ぽよんラリー（ボールを投げて、タヌくんがおなかで返す） */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #BFE6FF;
  color: #4A2E16;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#rally {
  /* ビーチボールの絵（横から見た形。赤・黄・青の葉っぱ形の面と、上のキャップ） */
  --ball-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='11' fill='%23fff'/><path d='M12 1Q-10 12 12 23Q-1 12 12 1Z' fill='%23FF5E5E'/><path d='M12 1Q7 12 12 23Q17 12 12 1Z' fill='%23FFD23F'/><path d='M12 1Q25 12 12 23Q34 12 12 1Z' fill='%233FA9F5'/><ellipse cx='12' cy='2.6' rx='2.6' ry='1.3' fill='%23fff' stroke='%23ddd' stroke-width='.4'/></svg>");
  position: relative;
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  touch-action: none;   /* 指をすべらせても、画面をスクロールさせない */
  /* 背景はビーチの絵（rally.js で入れる）。絵がないときは空と砂浜の色 */
  background: linear-gradient(#BFE6FF 0%, #E8F6FF 45%, #F6E7C6 62%, #EBD3A4 100%);
  background-size: cover;
  background-position: center bottom;
}

/* ---- 上のバー ---- */
.bar {
  position: absolute;
  left: 0; right: 0; top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 14px 0;
}
.back {
  /* 「3段階のルール」の ③ 道具：白く半分すけた丸・ふちなし・濃いこげ茶の字（本編・ふれあいと同じ。2026-11-05） */
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #4A2E16;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.count { margin-left: auto; font-weight: 900; }
/* のこりのボール（小さなビーチボール。落としたら灰色） */
.lives { display: flex; gap: 3px; }
.lives i {
  width: 20px; height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .8) 0 10%, rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, .14) 100%),
    var(--ball-svg) center / 100% 100%;
  box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0, 0, 0, .25);
}
.lives i.lost { filter: grayscale(1) opacity(.35); }
.count b { font-size: 30px; color: #C8641E; -webkit-text-stroke: 4px #fff; paint-order: stroke fill; }
.count small { margin-left: 3px; font-size: 13px; }
.best {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 700;
}
.count.bump b { display: inline-block; animation: bump .25s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---- ひっさつのゲージ（⚡ が5つ。ナイスでたまる）と、満タンで出るボタン ---- */
.gauge {
  position: absolute;
  left: 50%;
  top: calc(max(10px, env(safe-area-inset-top)) + 46px);
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 2px 8px rgba(74, 46, 22, .15);
  font-size: 13px;
  font-weight: 900;
  color: #C8641E;
  white-space: nowrap;
}
.gauge i { display: flex; gap: 4px; }
/* ⚡ 1つ分。--f（0〜1）の分だけ、下から黄色くなる */
.gauge i b {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: #E9DCCB;
  overflow: hidden;
}
.gauge i b::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--f, 0) * 100%);
  background: linear-gradient(#FFD23F, #FF8A3D);
  transition: height .3s;
}
.gauge i b::after { content: "⚡"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; }
/* 満タン：ゲージも ⚡ もレインボーに光る */
.gauge.full {
  background: linear-gradient(90deg, #FF6B6B, #FFB13B, #FFE45C, #6BD96B, #4FB3FF, #A66BFF, #FF6B6B) 0 0 / 200% 100%;
  color: #fff;
  -webkit-text-stroke: 3px #8A3A10;
  paint-order: stroke fill;
  box-shadow: 0 0 12px 3px rgba(255, 255, 255, .9), 0 0 22px 6px rgba(166, 107, 255, .55);
  animation: gpulse 1s ease-in-out infinite, rainbow 1.6s linear infinite;
}
.gauge.full i b::before { background: linear-gradient(135deg, #FF6B6B, #FFE45C, #6BD96B, #4FB3FF, #A66BFF); }
@keyframes rainbow { to { background-position: -200% 0; } }
@keyframes gpulse { 50% { transform: translateX(-50%) scale(1.08); } }
.pop.gauge-up { font-size: 18px; -webkit-text-stroke-color: #FF8A3D; }
.special-btn {
  position: absolute;
  right: 14px;
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 10px);
  z-index: 6;
  padding: 12px 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF8A3D, #FF4F8B);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(224, 69, 124, .45);
  cursor: pointer;
  animation: pulse 1s ease-in-out infinite;
}
.special-btn:not(.armed) {
  background: linear-gradient(90deg, #FF6B6B, #FFB13B, #FFE45C, #6BD96B, #4FB3FF, #A66BFF, #FF6B6B) 0 0 / 200% 100%;
  -webkit-text-stroke: 3px #8A3A10;
  paint-order: stroke fill;
  box-shadow: 0 0 14px 4px rgba(255, 255, 255, .9), 0 0 26px 8px rgba(166, 107, 255, .55);
  animation: pulse 1s ease-in-out infinite, rainbow 1.6s linear infinite;
}
.special-btn.armed { background: linear-gradient(135deg, #FF4F2B, #FFB13B); animation-duration: .4s; }
@keyframes pulse { 50% { transform: scale(1.08); } }
body.in-x .special-btn { bottom: calc(25vh + 10px); }

/* ---- タヌくん ---- */
#body { position: absolute; z-index: 1; transform-origin: 50% 96%; }
/* タヌくんが1歩近づく（もどる）ときは、なめらかに */
.moving #body, .moving .ground { transition: left .6s ease-in-out, top .6s ease-in-out, width .6s ease-in-out, height .6s ease-in-out; }
/* フェイント「せーの…」：ぷるぷる、ためる */
#body.feint { animation: feint .18s ease-in-out infinite alternate; }
@keyframes feint { from { transform: scale(1.02, .98) translateX(-1%); } to { transform: scale(.99, 1.01) translateX(1%); } }
#body.poyon { animation: poyon .45s ease-out; }
@keyframes poyon { 20% { transform: scale(1.07, .93); } 45% { transform: scale(.96, 1.05); } 70% { transform: scale(1.02, .98); } }
#tanu-img, #belly-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#belly-canvas { visibility: hidden; }
#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; }
.say {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -100%);
  max-width: 82%;
  padding: 8px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(74, 46, 22, .18);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  animation: sayIn .2s ease-out;
}
@keyframes sayIn { from { opacity: 0; transform: translate(-50%, -90%) scale(.9); } }
/* ふきだしのしっぽ：右下（.tail-r）か左下（.tail-l）に、くるっと曲がった小さなしっぽ。タヌくんの口がある側に付ける（rally.js の say）
   位置は --tail（ふきだしの左はしから。しっぽの付け根）。.up なら上向き */
.say::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  left: var(--tail, 50%);
  width: 14px; height: 11px;   /* しっぽは短く */
  margin-left: -4px;
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M0 0H16C15 9 18 15 26 21C15 20 6 13 0 0Z' fill='%23fff'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
  filter: drop-shadow(0 3px 2px rgba(74, 46, 22, .1));
}
.say.tail-l::after { margin-left: -10px; transform: scaleX(-1); }


/* ---- ボール（ビーチボール。大きさと位置は rally.js が入れる） ---- */
.ball {
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  border-radius: 50%;
  will-change: transform;
  pointer-events: none;
}
.ball i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .85) 0 9%, rgba(255, 255, 255, 0) 30%),
    var(--ball-svg) center / 100% 100%;
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .18), 0 2px 4px rgba(0, 0, 0, .15);
}
.ball.ready i { animation: ready 1.2s ease-in-out infinite; }
@keyframes ready { 50% { transform: translateY(-6%); } }
.shadow {
  position: absolute;
  left: 0; top: 0;
  z-index: 2;
  border-radius: 50%;
  background: rgba(74, 46, 22, .22);
  will-change: transform;
  pointer-events: none;
}

/* ---- タヌくんの足もとの影（本編の .ground と同じ） ---- */
.ground {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: rgba(74, 46, 22, .2);
  pointer-events: none;
}

/* ---- もどってくるボールのまわりの輪（位置と大きさは rally.js。ボールと一緒に動く）----
   縮んでボールに重なったらナイス。打てる間（.now）は光って、上に「いまだ！」 */
.target {
  position: absolute;
  z-index: 4;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 2px rgba(224, 103, 31, .5), inset 0 0 0 2px rgba(224, 103, 31, .35);
  pointer-events: none;
  --c: #FFB13B;
}
.target span {
  position: absolute;
  left: 50%; bottom: 100%;
  transform: translate(-50%, -4px);
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 5px #F08A3C;
  paint-order: stroke fill;
  white-space: nowrap;
  opacity: 0;
}
.target.now { border-color: var(--c); box-shadow: 0 0 12px 4px rgba(255, 177, 59, .85); }
.target.now span { opacity: 1; }
.ball.now i { filter: brightness(1.12); box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .18), 0 0 12px 4px rgba(255, 230, 120, .9); }
.guiding .target span { display: none; }   /* ガイドの説明・指と重ならないように */
/* 返ってくる球の種類の予告（輪の色）：⚡ はやい（赤）／🎈 ふんわり（水色）／🌀 カーブ（むらさき） */
.target.t-fast { border-color: #FF5E5E; --c: #FF5E5E; }
.target.t-lob { border-color: #3FA9F5; --c: #3FA9F5; }
.target.t-curve { border-color: #9B59E6; border-style: dashed; --c: #9B59E6; }
.pop.kind-fast { -webkit-text-stroke-color: #E03A3A; font-size: 20px; }
.pop.kind-lob { -webkit-text-stroke-color: #2A8AD6; font-size: 20px; }
.pop.kind-curve { -webkit-text-stroke-color: #8247C9; font-size: 20px; }

/* ---- 必殺の球（燃えている）と、タヌくんのレシーブの構え（ぐっと低く、おなかを前に） ---- */
.ball.charged i { box-shadow: 0 0 10px 4px rgba(255, 230, 90, .95), 0 0 24px 10px rgba(255, 210, 60, .55); animation: glow .35s ease-in-out infinite alternate; }
@keyframes glow { to { filter: brightness(1.25); box-shadow: 0 0 16px 7px rgba(255, 240, 120, 1), 0 0 34px 16px rgba(255, 210, 60, .7); } }
.ball.special i { box-shadow: 0 0 18px 8px rgba(255, 120, 40, .95), 0 0 40px 18px rgba(255, 200, 60, .75), 0 0 70px 30px rgba(255, 240, 160, .45); animation: fire .12s linear infinite alternate; }
@keyframes fire { to { filter: brightness(1.3) saturate(1.4); } }
#body.receive { animation: receive .5s ease-in-out infinite alternate; }
@keyframes receive { from { transform: none; } to { transform: translateY(1.2%) scale(1.01, .985); } }   /* 構えたまま、小さく上下 */

/* ---- 風：横に流れるすじ ---- */
.gust {
  position: absolute;
  left: 0;
  z-index: 5;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.pop.wind { -webkit-text-stroke-color: #3FA9F5; font-size: 22px; }

/* ---- おまた：腰みのの葉っぱが舞う ---- */
.leaf { position: absolute; font-size: 22px; pointer-events: none; }

/* ---- カモメ（ボールの前を横切る、じゃま） ---- */
.gull { position: absolute; left: 0; font-size: 44px; z-index: 5; pointer-events: none; }

/* ---- 指のガイド：👆 が上へすべる見本（はじめての人だけ）。位置は rally.js ---- */
.guide { position: absolute; z-index: 6; width: 0; height: 0; pointer-events: none; filter: drop-shadow(0 0 2px rgba(74, 46, 22, .45)); }
.guide i {
  position: absolute;
  left: -22px; top: 10px;
  font-size: 44px;
  font-style: normal;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
  animation: guide 1.3s ease-in-out infinite;
}
.guide b {   /* すべる道すじ（太い矢印）。下から上へ、色が濃くなっていく（::before） */
  position: absolute;
  left: -24px; top: -150px;
  width: 48px; height: 150px;
  background: rgba(255, 255, 255, .6);
  clip-path: polygon(50% 0, 100% 30%, 70% 30%, 70% 100%, 30% 100%, 30% 30%, 0 30%);
}
.guide b::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, #FFC94D, #FF7A2B 60%, #E0451F);
  animation: fill 1.3s ease-in-out infinite;
}
@keyframes fill {
  0% { height: 0; opacity: 1; }
  70% { height: 100%; opacity: 1; }
  100% { height: 100%; opacity: .2; }
}
.guide span {
  position: absolute;
  left: 50%; top: 70px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(74, 46, 22, .2);
}
/* X の中：文は 矢印の 上に（下 25% は X の パネルに かくれて 読めない。2026-11-13）*/
body.in-x .guide span { top: -196px; }
@keyframes guide {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  70% { transform: translateY(-120px); opacity: 1; }
  100% { transform: translateY(-140px); opacity: 0; }
}

/* ---- 「ぽよん！」などの文字 ---- */
#pops { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 6px #F08A3C;
  paint-order: stroke fill;
  white-space: nowrap;
  animation: popUp .7s ease-out forwards;
}
.pop.nice { -webkit-text-stroke-color: #FF4F8B; font-size: 24px; }
/* おなかで「ぽよん！」：大きく、びよんと弾む文字 */
.pop.boing { font-size: 36px; -webkit-text-stroke: 7px #FF4F8B; animation: boing .8s ease-out forwards; }
@keyframes boing {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.3, .3); }
  18% { opacity: 1; transform: translate(-50%, -80%) scale(1.35, .8); }
  32% { transform: translate(-50%, -95%) scale(.85, 1.2); }
  46% { transform: translate(-50%, -100%) scale(1.1, .92); }
  60% { opacity: 1; transform: translate(-50%, -105%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -170%) scale(1); }
}
/* おなかに当たった所から広がる、波の輪 */
.ripple {
  position: absolute;
  border: 4px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 120, 170, .8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ripple .5s ease-out forwards;
}
@keyframes ripple { from { width: 10px; height: 7px; opacity: 1; } to { width: 180px; height: 120px; opacity: 0; } }

/* ---- ひっさつのカットイン：タヌくんの顔と、ひとこと（右から入って、左へ抜ける） ---- */
.cutin { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.cutin-band {
  position: absolute;
  left: -12%; right: -12%;
  top: 34%;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;   /* 顔と文字を、画面のまんなかに */
  gap: 10px;
  transform: skewY(-7deg);
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, .22) 0 3px, transparent 3px 26px),
    linear-gradient(90deg, #FF6B6B, #FFB13B, #FFE45C, #6BD96B, #4FB3FF, #A66BFF);
  border-top: 4px solid #fff;
  border-bottom: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(90, 40, 10, .35);
}
.cutin-band img {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  transform: skewY(7deg);   /* 顔はまっすぐに */
  flex: none;
}
.cutin-text { color: #fff; line-height: 1.15; }   /* 文字は帯と同じに斜め */
.cutin-text span { display: block; font-size: 16px; font-weight: 900; -webkit-text-stroke: 4px #8A3A10; paint-order: stroke; }
.cutin-text b {
  display: block;
  font-size: clamp(18px, 6vw, 28px);   /* 画面のはしで切れないように */
  font-weight: 900;
  -webkit-text-stroke: 6px #8A3A10;
  paint-order: stroke;
  white-space: nowrap;
}
.cutin.go .cutin-band { animation: cutin 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cutin {
  0%   { transform: skewY(-7deg) translateX(110%); }
  18%  { transform: skewY(-7deg) translateX(0); }
  80%  { transform: skewY(-7deg) translateX(-4%); }
  100% { transform: skewY(-7deg) translateX(-120%); }
}
.pop.safe { -webkit-text-stroke-color: #3A9A4A; font-size: 20px; }
.pop.miss { -webkit-text-stroke-color: #999; }
@keyframes popUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); }
  25% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1); }
}
.hint {
  position: absolute;
  left: 0; right: 0;
  z-index: 4;
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  -webkit-text-stroke: 4px rgba(74, 46, 22, .55);
  paint-order: stroke fill;
  pointer-events: none;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .45; } }

/* ---- はじめる前・結果 ---- */
.sheet {
  position: absolute;
  left: 16px; right: 16px;
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  padding: 22px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 6px 24px rgba(74, 46, 22, .25);
  text-align: center;
}
.sheet h1, .sheet h2 { margin: 0 0 10px; font-size: 24px; }
/* 言語の切りかえ（はじめる前の画面の右上。本編と同じく、押すともう一方の言語へ） */
.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;
}
.sheet p { margin: 8px 0; line-height: 1.6; }
.sheet b { color: #C8641E; }
.sheet .small { font-size: 13px; color: #8A6A4A; }
.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: 700;
  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-count { font-size: 18px; font-weight: 700; }
.r-count b { font-size: 44px; }
.r-longest { font-size: 14px; font-weight: 700; margin-top: -4px; }
.r-best { font-size: 14px; font-weight: 700; color: #FF4F8B; }
.r-line { font-weight: 700; }
.r-next { font-size: 13px; font-weight: 700; color: #3A7FC4; }
.r-bonus { margin: 4px 0 8px; font-size: 13px; font-weight: 700; color: #E0457C; }

/* ---- 結果：上にランク別イラスト、下に回数とボタン（ぽんぽこリズムと同じ形） ---- */
.result {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: #FFF4E0;
}
.r-art {
  position: relative;
  height: 50%;
  min-height: 280px;
  overflow: hidden;
}
.r-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;   /* 顔とおなかが入るように */
  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: 26px;
  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: 16px 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 p { margin: 6px 0; line-height: 1.5; }
.r-card b { color: #C8641E; }
.r-card .r-count { margin-top: 0; }
body.in-x .r-card { padding-bottom: calc(25vh + 20px); }

/* X アプリの中で開いたとき：画面の下に X の投稿パネルがかぶさるので、全体を上に寄せる（rally.js） */
body.in-x .sheet { top: 40%; }

@media (prefers-reduced-motion: reduce) {
  .ball.ready i, .hint, .cutin.go .cutin-band { animation: none; }
  .guide b::before { animation: none; height: 100%; }
}

/* ---- 画面を切りかえるときの幕（本編のトップ画面と同じ、落ち着いたクリーム色）----
   ページを開くと、幕がかかった所から、ふわっと明ける。タヌくんのところへ戻るときは、幕がかかってから戻る（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; }

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