/* ゲーム6「ぐるぐる時計」の絵。すべて .scene-clock の下に閉じる */
.scene-clock .clock-stage { position: relative; width: 100%; height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2vh; padding: 96px 16px 12px; box-sizing: border-box; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 50% 45%, #fff3dc 0 40%, #ffe2b3 41% 100%); }
/* 時計盤（円）。中の部品はすべて盤いっぱいの箱を回転させて置く */
.scene-clock .clock-face { position: relative; width: min(82%, 46vh, 380px); aspect-ratio: 1; flex: none; border-radius: 50%;
  background: #fff; border: 8px solid #1b1340; box-shadow: 0 8px 0 #1b1340, inset 0 0 0 10px #ffe8c2; box-sizing: border-box; }
.scene-clock .clock-face.clock-bump { animation: clock-bump .25s ease-out; }
@keyframes clock-bump { 40% { scale: 1.035; } }
.scene-clock .clock-tick, .scene-clock .clock-dot, .scene-clock .clock-hand, .scene-clock .clock-burst { position: absolute; inset: 0; display: block; }
.scene-clock .clock-tick::before { content: ''; position: absolute; left: 50%; top: 4%; width: 8px; height: 9%; margin-left: -4px; border-radius: 4px; background: #1b1340; }
.scene-clock .clock-tick.s::before { width: 5px; height: 5%; margin-left: -2.5px; background: #c4b5a0; }
/* 丸：針が通る円周上の目印（中心は半径 33% の位置＝針の通り道） */
.scene-clock .clock-dot > i { position: absolute; left: 50%; top: 17%; width: 7.5%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; box-sizing: border-box;
  background: #ff9f1c; border: 3px solid #1e1b4b; box-shadow: inset 0 -2px 0 rgba(30,27,75,.18); }
.scene-clock .clock-dot > i::after { content: ''; position: absolute; left: 20%; top: 16%; width: 32%; height: 26%; border-radius: 50%; background: rgba(255,255,255,.85); }
/* お手本：針が通ると丸が光る */
.scene-clock .clock-dot.lit > i { animation: clock-lit .35s ease-out; }
@keyframes clock-lit { 0% { scale: 1.5; background: #fde047; box-shadow: 0 0 0 6px rgba(56,189,248,.55); } 100% { scale: 1; } }
.scene-clock .clock-dot.grow > i { animation: clock-grow .25s cubic-bezier(.3,1.6,.5,1); }
@keyframes clock-grow { 0% { scale: .3; } 100% { scale: 1; } }
/* 当たり：ポンとふくらんで消える */
.scene-clock .clock-dot.pop > i { animation: clock-pop .3s ease-out forwards; }
@keyframes clock-pop { 0% { scale: 1; opacity: 1; } 100% { scale: 1.9; opacity: 0; } }
/* ミス：灰色がかった赤＋×（次の小節まで残る） */
.scene-clock .clock-dot.miss > i { background: #c98a8a; border-color: #6b3a3a; animation: clock-red .6s steps(2, jump-none) 1; }
.scene-clock .clock-dot.miss > i::after { display: none; }
.scene-clock .clock-dot.miss > i::before { content: '×'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 900 clamp(12px, 2.6vh, 20px)/1 system-ui, sans-serif; color: #7f1d1d; }
@keyframes clock-red { 0%, 50% { background: #b91c1c; } 25%, 75% { background: #fca5a5; } }
/* 針（transform は JS が毎フレーム書く。transition なし） */
.scene-clock .clock-hand { will-change: transform; }
.scene-clock .clock-hand > i { position: absolute; left: 50%; bottom: 50%; width: 12px; height: 44%; margin-left: -6px; border-radius: 6px 6px 3px 3px;
  background: var(--clock-hand, #ff9f1c); box-shadow: 0 0 0 4px #1b1340; }
.scene-clock .clock-hand.clock-hand-tick > i { animation: clock-hand-tick .2s ease-out; }
@keyframes clock-hand-tick { 0% { filter: brightness(1.5); } }
.scene-clock .clock-hub { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #1b1340; border: 5px solid var(--clock-hand, #ff9f1c); box-sizing: border-box; }
/* 周の色：お手本＝青、あなた＝オレンジ */
.scene-clock .clock-stage.demo { --clock-hand: #3b82f6; }
.scene-clock .clock-stage.you { --clock-hand: #ff9f1c; }
/* 盤の中のラベル（お手本／あなた！）。下半分に置いて丸と重ならないように */
.scene-clock .clock-label { position: absolute; left: 50%; top: 66%; translate: -50% -50%; padding: .2em .7em; border-radius: 999px; white-space: nowrap;
  font: 900 clamp(14px, 3vh, 24px)/1.2 system-ui, sans-serif; color: #fff; background: var(--clock-hand, #ff9f1c); border: 3px solid #1b1340; }
.scene-clock .clock-label:empty { display: none; }
.scene-clock .clock-label.clock-label-in { animation: clock-label-in .3s cubic-bezier(.3,1.6,.5,1); }
@keyframes clock-label-in { 0% { scale: .5; } 100% { scale: 1; } }
/* ポン：丸のところで小さく破裂 */
.scene-clock .clock-burst > i { position: absolute; left: 50%; top: 15%; width: 6px; height: 14px; margin-left: -3px; border-radius: 3px; background: #facc15;
  animation: clock-burst .4s ease-out forwards; }
.scene-clock .clock-burst > i:nth-child(1) { --r: -60deg; } .scene-clock .clock-burst > i:nth-child(2) { --r: -30deg; }
.scene-clock .clock-burst > i:nth-child(3) { --r: 0deg; background: #ff9f1c; } .scene-clock .clock-burst > i:nth-child(4) { --r: 30deg; }
.scene-clock .clock-burst > i:nth-child(5) { --r: 60deg; }
@keyframes clock-burst { 0% { transform: rotate(var(--r)) translateY(0) scale(1.2); opacity: 1; } 100% { transform: rotate(var(--r)) translateY(-34px) scale(.5); opacity: 0; } }
/* しぐれちゃん（時計の下） */
.scene-clock .clock-sigure { height: min(20vh, 150px); width: auto; flex: none; object-fit: contain; transform-origin: 50% 100%; }
.scene-clock .clock-sigure.clock-hop { animation: clock-hop .25s ease-out; }
.scene-clock .clock-sigure.clock-wobble { animation: clock-wobble .25s ease-out; }
@keyframes clock-hop { 50% { translate: 0 -14px; } }
@keyframes clock-wobble { 25% { rotate: -5deg; } 75% { rotate: 5deg; } }
/* 当たり＝縦の色フラッシュ、ミス＝横ゆれ */
.scene-clock .clock-stage.clock-flash::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,159,28,.3), rgba(255,159,28,0)); animation: clock-fade .25s ease-out forwards; }
@keyframes clock-fade { to { opacity: 0; } }
.scene-clock .clock-stage.clock-shake { animation: clock-shake .3s; }
@keyframes clock-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
