/* ミニゲーム「ルンルン連打！おかしのメガタワー」（js/tower.js） */
.tw { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 10px; background: rgba(40, 24, 8, .55); backdrop-filter: blur(3px); font-family: "M PLUS Rounded 1c", sans-serif; touch-action: manipulation; }
.tw-box { position: relative; width: min(94vw, 92vh, 820px); aspect-ratio: 1; animation: tw-in .45s cubic-bezier(.3, 1.5, .5, 1); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@keyframes tw-in { from { transform: scale(.8) translateY(20px); opacity: 0; } }
.tw-cv { position: absolute; left: 3%; top: 3%; width: 94%; height: 94%; border-radius: 18px; }
.tw-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); }
.tw-timer { position: absolute; left: 14.3%; top: 14.3%; width: 14%; aspect-ratio: 1; margin: 0; transform: translate(-50%, -50%); display: grid; place-items: center; pointer-events: none; }
.tw-timer b { font-size: clamp(34px, 8vmin, 70px); font-weight: 900; line-height: 1; color: #ffe27a; -webkit-text-stroke: 3px #7a3408; paint-order: stroke fill; text-shadow: 0 4px 0 #7a3408; }
.tw-timer.is-hurry b { color: #ff5a3c; animation: tw-beat .5s ease-in-out infinite; }
@keyframes tw-beat { 50% { transform: scale(1.18); } }
.tw-count { position: absolute; left: 75.4%; top: 7%; width: 21.9%; height: 14.6%; margin: 0; display: flex; align-items: center; justify-content: center; gap: 4px; pointer-events: none; }
.tw-count b { font-size: clamp(30px, 7vmin, 60px); font-weight: 900; line-height: 1; color: #ffe27a; -webkit-text-stroke: 3px #5a2e0a; paint-order: stroke fill; text-shadow: 0 3px 0 #5a2e0a; }
.tw-count i { font-style: normal; font-size: clamp(14px, 3vmin, 24px); font-weight: 900; color: #ffe9b8; }
.tw-count.is-bump b { animation: tw-bump .3s cubic-bezier(.3, 1.8, .5, 1); }
.tw-count.is-clear b { color: #7dff9e; }
@keyframes tw-bump { 40% { transform: scale(1.4) rotate(-5deg); } }
.tw-btn { position: absolute; left: 34.7%; top: 76.2%; width: 30.8%; height: 22.5%; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tw-btn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.tw-btn.is-hit img { animation: tw-hit .12s ease-out; }
@keyframes tw-hit { 40% { transform: scale(.9) translateY(4px); filter: brightness(1.15); } }
.tw-cheer { position: absolute; left: 22%; top: 50%; margin: 0; padding: 6px 14px; border-radius: 16px; background: #fff; color: #e06a00; font-weight: 900; font-size: clamp(14px, 3vmin, 22px); box-shadow: 0 4px 10px rgba(0, 0, 0, .25); opacity: 0; transform: scale(.4); transition: .25s cubic-bezier(.3, 1.8, .5, 1); pointer-events: none; }
.tw-cheer::after { content: ""; position: absolute; left: 30%; top: 100%; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.tw-cheer.is-on { opacity: 1; transform: none; animation: tw-beat .4s ease-in-out infinite; }
.tw-x { position: absolute; right: -10px; top: -10px; z-index: 5; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fffaf0; color: #6b3a14; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: inset 0 0 0 3px #8a5222, 0 4px 8px rgba(0, 0, 0, .3); }
.tw-ov { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.tw-ov[hidden] { display: none; }
.tw-ov > * { pointer-events: auto; }
.tw-card { width: min(78%, 520px); padding: 22px 22px 18px; border-radius: 24px; text-align: center; color: #3b2a14; background: linear-gradient(180deg, #fffaf0, #fbefd6); box-shadow: inset 0 0 0 4px #e9c98f, 0 16px 40px rgba(0, 0, 0, .35); animation: tw-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.tw-card h2 { margin: 0 0 10px; font-size: clamp(22px, 4.6vmin, 38px); font-weight: 900; line-height: 1.25; color: #e06a00; -webkit-text-stroke: 1px #7a3408; }
.tw-card p { margin: 0 0 10px; font-weight: 800; font-size: clamp(14px, 2.6vmin, 19px); line-height: 1.6; }
.tw-card p b { color: #e06a00; }
.tw-big { font-size: 1.8em; }
.tw-prize { padding: 8px 12px; border-radius: 14px; background: #fff3d6; }
.tw-prize.is-demo { background: #eaf4ff; color: #1b4f8a; font-size: 14px !important; }
.tw-go, .tw-sub { display: block; width: 100%; min-height: 60px; margin-top: 8px; border: 0; border-radius: 16px; cursor: pointer; font: inherit; font-weight: 900; font-size: clamp(18px, 3.4vmin, 24px); }
.tw-go { color: #fff; background: linear-gradient(180deg, #ffa14a, #ff8a1f 55%, #f07400); box-shadow: 0 6px 0 #c45f00, 0 10px 18px rgba(255, 138, 31, .35); }
.tw-go:active { transform: translateY(5px); box-shadow: 0 1px 0 #c45f00; }
.tw-sub { min-height: 46px; font-size: 16px; color: #6b3a14; background: #fff; box-shadow: inset 0 0 0 2px #ecd6ad; }
.tw-cd { margin: 0; font-size: clamp(90px, 26vmin, 220px); font-weight: 900; color: #fff; -webkit-text-stroke: 8px #e06a00; paint-order: stroke fill; text-shadow: 0 10px 0 #7a3408; animation: tw-cd .6s cubic-bezier(.3, 1.8, .5, 1); }
.tw-cd.is-go { font-size: clamp(50px, 12vmin, 110px); color: #ffe27a; }
@keyframes tw-cd { from { transform: scale(2.4); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } }
.tw-yatta { font-size: clamp(36px, 8vmin, 60px) !important; color: #ffc21a !important; -webkit-text-stroke: 2px #7a3408 !important; text-shadow: 0 5px 0 #7a3408; animation: tw-cd .7s cubic-bezier(.3, 1.8, .5, 1); }
.tw-badge { display: inline-flex !important; align-items: center; gap: 8px; padding: 8px 22px !important; border-radius: 20px; color: #fff; font-size: clamp(28px, 6vmin, 44px) !important; font-weight: 900; background: linear-gradient(180deg, #ffd23d, #f5a90e); text-shadow: 0 3px 0 rgba(150, 70, 0, .5); box-shadow: 0 6px 0 #9a5a06, 0 0 24px rgba(255, 210, 60, .8); animation: tw-cd .8s .2s cubic-bezier(.3, 1.8, .5, 1) both; }
.tw-badge img { width: 1.2em; height: auto; } .tw-badge small { font-size: .5em; }
.tw-confetti { position: fixed; inset: 0; z-index: 96; width: 100vw; height: 100vh; pointer-events: none; }
.tw-open-btn { background: linear-gradient(135deg, #7fd0ff, #3d8bff 60%, #2a66e0) !important; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 5px 0 #1f4fb0, 0 10px 18px rgba(40, 100, 230, .35) !important; }
.dash-tw { position: absolute; z-index: 6; right: 14px; bottom: 380px; width: clamp(74px, 6vw, 96px); aspect-ratio: 1; padding: 6px; border: 0; border-radius: 22px; cursor: pointer; background: linear-gradient(135deg, #9fdcff, #3d8bff); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5), 0 5px 0 #1f4fb0, 0 10px 18px rgba(0, 0, 0, .3); }
.dash-tw img { width: 100%; height: 100%; object-fit: contain; }
.dash-tw b { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; background: #fff; color: #2a66e0; font-size: 11px; white-space: nowrap; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
@media (min-width: 1081px) { .app--dash .dash-tw { position: fixed; right: calc(var(--right-w) + 30px); bottom: 410px; } }
@media (max-width: 720px) { .dash-tw { width: 56px !important; right: 8px; bottom: auto; top: 318px; border-radius: 16px; padding: 4px; } .dash-tw b { font-size: 9px; bottom: -9px; padding: 1px 6px; } }
