/* s21-30 r45（2026-11-12）：クリスマス版のスタート画面（Tap to Start）。title-art-autumn.css の後に読み、絵と押せる範囲だけを上書きする。
   app.mjs（画面の流れ・ボタン・音）は変えない。r45〜r69 の絵は B（941×1672、title-xmas-b-v1.jpg、ファイルは残してある）。 */
/* s21-30 r70（2026-11-15 ユーザー指示）：新しい絵 C（受け取った 314.webp をそのまま、852×1846＝6:13＝iPhone 15 の画面と同じ縦横比）。
   「Wan-Coco Garden」のボタンも絵に描いてあるので、今までの看板ボタン（.wcg-sign）は絵を隠して、押せる範囲だけを絵のボタンに重ねる（押した時の動きは同じ）。 */
:root { --wc-xmas-title: url('theme/xmas/title-xmas-c-v1.webp?v=1'); }
.halloween-title > img { content: var(--wc-xmas-title); aspect-ratio: 852 / 1846; }
/* 押せる範囲＝絵の「Tap to Start」の札（画素で測った外形：横 180〜672／852・縦 1318〜1478／1846） */
.halloween-start { left: 21.1%; top: 71.4%; width: 57.7%; height: 8.7%; }

/* r70：画面いっぱいに表示する（クリスマス版だけ。角丸の枠・後ろのぼかし・余白をなくす）。
   絵の幅 --xt-w＝画面を覆う大きさ（cover）。ただし大事な所（ロゴ・3匹・2つのボタン）が切れないよう、切ってよい量に上限を付ける：
     上 14%（ロゴのサンタ帽は 15.7% から）・下 11%（Garden ボタンの下の端は 87.9%）・左右 各 2.5%（左の帽子のぽんぽん 3.3%、右のソリの先 97.4%）。
   上限に当たる画面（PC など横に広い画面）だけ、すき間を同じ絵をぼかしたもので埋める。iPhone 15 は縦横比が同じなので、すき間もぼかしも出ない */
:root[data-block-theme="christmas"] { --xt-vh: 100vh; }
@supports (height: 100dvh) { :root[data-block-theme="christmas"] { --xt-vh: 100dvh; } }
:root[data-block-theme="christmas"] #modal:has(#titleStart) {
  --xt-w: min(max(100vw, calc(var(--xt-vh) * 852 / 1846)), calc(var(--xt-vh) * 852 / 1846 / 0.75), calc(100vw / 0.95));
  --xt-h: calc(var(--xt-w) * 1846 / 852);
  position: fixed; inset: 0; width: 100vw; height: var(--xt-vh); max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: #1c2452;
}
:root[data-block-theme="christmas"] #modal:has(#titleStart)::before {
  content: ''; position: absolute; inset: -40px; pointer-events: none;
  background: var(--wc-xmas-title) center / cover no-repeat; filter: blur(16px) brightness(.85);
}
:root[data-block-theme="christmas"] #modal:has(#titleStart)::backdrop { background: #1c2452; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* 上下を切る量は 上:下＝14:11（0.56）の割合。すき間ができる画面でも同じ割合で置く */
:root[data-block-theme="christmas"] #modal:has(#titleStart) #modalBody {
  position: absolute; margin: 0; padding: 0; width: var(--xt-w);
  left: calc((100vw - var(--xt-w)) / 2); top: calc((var(--xt-vh) - var(--xt-h)) * 0.56);
}
:root[data-block-theme="christmas"] #modal:has(#titleStart) .halloween-title { border-radius: 0; }
/* Garden ボタン：絵の緑のボタン（横 178〜672／852・縦 1515〜1623／1846）に押せる範囲を重ねる。今までの看板の絵は出さない */
:root[data-block-theme="christmas"] #modal:has(#titleStart) .wcg-sign {
  left: 20.9%; top: 82.1%; width: 58%; height: 5.8%; transform: none; border-radius: 22px / 50%;
}
:root[data-block-theme="christmas"] #modal:has(#titleStart) .wcg-sign > img { display: none; }
:root[data-block-theme="christmas"] #modal:has(#titleStart) .wcg-sign:active { transform: scale(.97); background: #ffffff26; }
/* Garden の説明の時の「ふわっと光る」（今までは看板の絵が光った）→ 絵のボタンのまわりを光らせる */
:root[data-block-theme="christmas"] #modal:has(#titleStart) .wcg-sign.gtut-blink::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: xt-sign-glow 1.8s ease-in-out 1s infinite;
}
@keyframes xt-sign-glow { 0%, 100% { box-shadow: 0 0 0 0 #fff6c000; } 50% { box-shadow: 0 0 16px 6px #fff6c0d0; } }
@media (prefers-reduced-motion: reduce) { :root[data-block-theme="christmas"] #modal:has(#titleStart) .wcg-sign.gtut-blink::after { animation: none; } }
