/* 秋バージョン r31（2026-10-15）：Stage10 クリア後の終了画面（finale-autumn.mjs が開く <dialog class="finale">）。
   finale-halloween.css を写して、画像（1024×1536）と、絵の中のボタンに合わせた押せる範囲だけを替えたもの。
   画像は縦横比を保ったまま画面に収め（切らない）、余った所は同じ画像をぼかして敷く。
   押せる範囲（画像に対する割合。画素で測った絵のボタンの外形）
     「Wan-Coco Garden」 横 165〜852・縦 1212〜1350
     「また遊びにきてね！」 横 332〜692・縦 1368〜1430（指で押しやすいよう、上下に少しだけ広げた） */
dialog.finale {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden;
  background: #6a3a1c; color: inherit;
}
dialog.finale::backdrop { background: transparent; }
dialog.finale::before {
  content: ''; position: absolute; inset: -40px;
  background: url('theme/autumn/thank-you-autumn-v2.jpg?v=1') center / cover no-repeat;
  filter: blur(18px) brightness(.75);
}
dialog.finale[open] { display: grid; place-items: center; animation: finale-in .45s ease-out both; }
@keyframes finale-in { from { opacity: 0; } to { opacity: 1; } }
.finale-art {
  position: relative;
  width: min(100vw, calc(100vh * 941 / 1672));
  width: min(100vw, calc(100dvh * 941 / 1672));
  aspect-ratio: 941 / 1672; max-width: 100%;
}
.finale-art img { display: block; width: 100%; height: 100%; }
.finale-art button {
  position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent; border-radius: 999px;
}
.finale-art button:focus-visible { outline: 3px solid #fff8ee; outline-offset: 2px; }
.finale-garden { left: 13.60%; top: 75.96%; width: 72.69%; height: 8.85%; } /* r24：新しい絵（941×1672）の緑のボタン 横 128〜812・縦 1270〜1418 */
.finale-close { left: 29.97%; top: 85.41%; width: 40.17%; height: 4.55%; } /* r24：「また遊びにきてね！」横 282〜660・縦 1428〜1504 */
/* 「Wan-Coco Garden」：押したくなるように、ときどき光がすっと横切る（絵のボタンの形に合わせた丸い枠の中だけ） */
.finale-garden { overflow: hidden; }
.finale-garden::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -30%; width: 22%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 240, .55), rgba(255, 255, 255, 0));
  transform: skewX(-18deg); animation: finale-shine 3.2s ease-in-out 1.2s infinite;
}
@keyframes finale-shine { 0% { left: -30%; } 45%, 100% { left: 115%; } }
.finale-garden:active { background: rgba(255, 255, 255, .12); }
@media (prefers-reduced-motion: reduce) { dialog.finale[open], .finale-garden::after { animation: none; } .finale-garden::after { display: none; } }
