/* Times Bomb Lv2: independent keypad and a ten-second burning fuse. */
#timesLv2{--lv2-mint:#9cebd1;--lv2-gold:#f5d599;--lv2-muted:#a4b7c8;align-items:stretch;text-align:left;color:#f8f1df;overflow:auto;overscroll-behavior:contain;border:1px solid #314656;border-radius:24px;background:radial-gradient(ellipse at 80% 15%,#23404b90,transparent 50%),linear-gradient(150deg,#172c3b,#0d1a2b 70%);scrollbar-width:thin;isolation:isolate}

.lv2-page{width:100%;min-height:100%;padding:0 20px 22px;background-image:radial-gradient(#7c9ca212 .8px,transparent .8px);background-size:16px 16px}

#timesLv2 button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-appearance:none}

#timesLv2 button:disabled{cursor:default;opacity:.55}
#timesLv2 button:focus-visible,#timesLv2 summary:focus-visible{outline:3px solid #ffe4a9;outline-offset:4px}
#timesLv2 h1:focus,#timesLv2 h2:focus{outline:none}

.lv2-nav{display:flex;align-items:center;justify-content:space-between;gap:6px;border-bottom:1px solid #79949b30;padding:9px 0;margin-bottom:24px}
.lv2-nav>span{font:700 9px/1.4 sans-serif;letter-spacing:1.7px;color:#acc1cb}
.lv2-back{background:none;color:#d1e0e4;border:0;min-height:44px;padding:0 8px 0 0;font-size:12px!important}
.lv2-nav i{width:6px;height:6px;border-radius:50%;background:var(--lv2-mint);box-shadow:0 0 10px #9cebd155}

.lv2-eyebrow{font:700 10px/1.5 sans-serif;letter-spacing:2px;color:var(--lv2-mint)}
.lv2-title{font-size:38px;line-height:1.35;letter-spacing:2px;margin:9px 0 4px;font-weight:900}
.lv2-title em{font-style:normal;color:var(--lv2-gold)}
.lv2-intro{font-size:12px;color:var(--lv2-muted);line-height:1.9;margin:6px 0}

.lv2-hero{position:relative;margin:0 -13px -4px}
.lv2-bomb-art{display:block;width:100%;max-height:246px}
.lv2-hero-label{position:absolute;left:9px;bottom:17px;font:700 9px sans-serif;letter-spacing:1.4px;color:#aec0c9}
.lv2-hero-label:before{content:'';display:inline-block;width:14px;height:1px;background:var(--lv2-mint);vertical-align:middle;margin-right:8px}
.lv2-hero-label small{display:block;margin:6px 0 0 22px;color:#8198aa;font-size:8px;letter-spacing:1px}

.lv2-bomb-float{animation:lv2-float 4s ease-in-out infinite;transform-origin:180px 150px}
.lv2-spark{animation:lv2-spark 1.4s ease-in-out infinite;transform-origin:211px 23px}
.lv2-orbit{animation:lv2-float 6s ease-in-out infinite}

.lv2-mission{border:1px solid #50616d;border-radius:17px;overflow:hidden;margin:5px 0 18px;background:#ffffff04}
.lv2-mission-head{display:flex;justify-content:space-between;background:#8aafae0d;padding:11px 14px;font-size:10px;letter-spacing:1px;color:#cfdbdc;border-bottom:1px solid #50616d}
.lv2-mission-head b{color:var(--lv2-gold);font-weight:700}
.lv2-specs{display:grid;grid-template-columns:repeat(3,1fr);padding:16px 5px}
.lv2-specs>div{text-align:center;border-right:1px solid #50616d}
.lv2-specs>div:last-child{border:0}
.lv2-specs b{font:600 27px/1.2 Fredoka,sans-serif;display:block;color:#f7ebd2}
.lv2-specs span{font-size:10px;display:block;color:#b5c5cf;margin-top:6px}

.lv2-main,.lv2-secondary{width:100%;min-height:53px;border-radius:13px;padding:14px 10px;font-size:14px!important;font-weight:900!important;letter-spacing:1px}
.lv2-main{background:linear-gradient(135deg,#baf4d9,#81d8bd);color:#173f39;border:1px solid #d0ffe7;box-shadow:0 4px 0 #416e65,0 9px 25px #08111b55;margin:4px 0 12px}
.lv2-main:active{transform:translateY(2px);box-shadow:0 2px 0 #416e65}
.lv2-main:after{content:' →';margin-left:10px}
.lv2-secondary{background:#233b4d;color:#d9e7e8;border:1px solid #5a7687;margin-top:10px}
.lv2-fine{font-size:10px;line-height:1.9;color:var(--lv2-muted);text-align:center;margin:12px 0}
.lv2-fine strong{color:var(--lv2-gold)}
.lv2-history{border-top:1px solid #6c939538;margin-top:20px;padding-top:16px;font-size:12px;color:#b6cbd4}
.lv2-history summary{cursor:pointer;min-height:35px}
.lv2-history>div{display:flex;justify-content:space-between;border-top:1px dashed #405363;padding:10px 0;font-size:11px}
.lv2-notice{border:1px solid #b79960;border-radius:12px;padding:14px;font-size:12px;line-height:1.8;color:#f2dba9;background:#5b4a211f}

.lv2-status{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#abc1cc}
.lv2-status b{font:600 24px Fredoka,sans-serif;color:#f5e8cf}
.lv2-status b small{font-size:13px;color:#91a9b8}
.lv2-path{display:grid;grid-template-columns:repeat(10,1fr);gap:5px;margin:13px 0 22px;padding:0;list-style:none}
.lv2-path li{height:5px;border-radius:5px;background:#314556}
.lv2-path .current{background:#f5d599;box-shadow:0 0 8px #f5d533}
.lv2-path .right{background:var(--lv2-mint)}
.lv2-path .wrong{background:#d5a887}

.lv2-equation{text-align:center;font:600 clamp(37px,10vw,49px)/1.3 Fredoka,sans-serif;letter-spacing:1px;margin:10px -8px 6px;color:#fff1d6;white-space:nowrap}
.lv2-equation .lv2-op{color:var(--lv2-mint)}
.lv2-equation .lv2-q{color:#b6c8d1}
.lv2-type{text-align:center;font-size:10px;letter-spacing:2px;color:#adc6c8;margin:8px 0 23px}
.lv2-answers{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.lv2-choice{position:relative;min-height:78px;border:1px solid #69818e;border-bottom:4px solid #304757;border-radius:15px;background:linear-gradient(150deg,#344f60,#213649);color:#f9f2df;font:600 32px Fredoka,sans-serif!important;box-shadow:0 5px 14px #060f1f30}
.lv2-choice small{position:absolute;top:9px;left:12px;font:700 9px sans-serif;color:#9ebbc3}
.lv2-choice:active{transform:translateY(2px);border-bottom-width:2px}
.lv2-choice:hover{background:#395b69;border-color:#92becc}

.lv2-fuse{height:39px;display:flex;gap:10px;align-items:center;justify-content:center;margin-top:13px;color:#c9b385;font-size:10px;letter-spacing:.8px}
.lv2-fuse span{width:48px;border-top:2px dashed #bd9c62}
.lv2-feedback-badge{display:grid;place-items:center;width:72px;height:72px;margin:9px auto 16px;border:1px solid #82d5b8;border-radius:50%;font:40px Fredoka,sans-serif;color:var(--lv2-mint);background:#8bdfbd14;box-shadow:0 0 0 8px #8bdfbd08;animation:lv2-arrive .5s ease}
.lv2-feedback-badge.learn{color:var(--lv2-gold);border-color:#c1a775;background:#c1a77510}
.lv2-feedback-title{text-align:center;font-size:23px;line-height:1.5;margin:15px 0 10px}
.lv2-result-eq{border-bottom:1px solid #658b8d40;padding-bottom:20px;margin-bottom:20px}
.lv2-note{padding:17px 16px;background:#cfe6d309;border:1px solid #68897e70;border-radius:14px;margin:18px 0}
.lv2-note>span{font-size:10px;color:var(--lv2-mint);letter-spacing:1px}
.lv2-note h3{font-size:14px;color:#e7eacb;margin:8px 0 12px}
.lv2-step{display:flex;align-items:center;gap:9px;font-size:12px;line-height:1.7;margin:9px 0;color:#e0e9dc}
.lv2-step i{font:600 12px Fredoka,sans-serif;flex-shrink:0;border:1px solid #6d9488;width:23px;height:23px;display:grid;place-items:center;border-radius:50%;color:var(--lv2-mint)}
.lv2-note p{font-size:11px;line-height:1.85;color:#adbec5;margin:10px 0}

.lv2-final{font:600 77px/1.2 Fredoka,sans-serif;color:#fae5b7;text-align:center;margin:12px 0}
.lv2-final small{font-size:25px;color:#93aebb}
.lv2-award{display:flex;flex-direction:column;gap:8px;align-items:center;padding:20px;margin:22px 0;border:1px solid #8f815c;border-radius:15px;background:#bb994c0c}
.lv2-award strong{font-size:26px;color:var(--lv2-gold)}
.lv2-award span{font-size:11px;color:#c5cec9}
.lv2-round-review{margin:17px 0;font-size:12px;color:#b2c9ce}
.lv2-round-review summary{padding:13px 0;cursor:pointer}
.lv2-round-review>div{padding:12px;border-top:1px solid #51687150;font-size:11px;line-height:1.9}
.lv2-round-review b{color:#eee7ce}

@keyframes lv2-float{50%{transform:translateY(-5px) rotate(2deg)}
}
@keyframes lv2-spark{50%{opacity:.5;transform:scale(.85)}
}
@keyframes lv2-arrive{from{opacity:0;transform:translateY(8px) scale(.9)}
to{opacity:1;transform:none}
}

@media(max-width:350px){.lv2-page{padding:0 15px 18px}
.lv2-title{font-size:33px}
.lv2-nav>span{font-size:8px;letter-spacing:1px}
.lv2-dial{width:120px;height:120px;margin-bottom:12px}
.lv2-nav{margin-bottom:18px}
.lv2-path{margin-bottom:16px}
.lv2-choice{min-height:68px}
.lv2-type{margin-bottom:17px}
.lv2-bomb-art{max-height:200px}
.lv2-hero-label{font-size:8px}
.lv2-specs b{font-size:25px}
}

@media(prefers-reduced-motion:reduce){#timesLv2 *,#timesLv2{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}


/* A real burning rope: JS trims the curve and moves its ember from the same clock. */
.lv2-bomb-countdown{height:162px;margin:-6px -10px 4px}
.lv2-live-bomb{display:block;width:100%;height:100%;overflow:visible}
.lv2-live-bomb #lv2Seconds{font:600 42px Fredoka,sans-serif;font-variant-numeric:tabular-nums}
.lv2-fuse-caption{font:900 15px 'Noto Sans TC',sans-serif;letter-spacing:1px}
.lv2-fuse-sub{font:700 11px 'Noto Sans TC',sans-serif}
.lv2-live-body{transform-origin:67px 108px}
.lv2-ember-flare{animation:lv2-burn .32s ease-in-out infinite alternate;transform-origin:0 0}
.lv2-ember-dust{animation:lv2-cinders .7s ease-out infinite}
.lv2-burning-tip{filter:drop-shadow(0 0 4px #ff9e35)}
.lv2-bomb-countdown.urgent .lv2-live-body{animation:lv2-bomb-rattle .2s ease-in-out infinite alternate}
.lv2-bomb-countdown.urgent #lv2Seconds{fill:#ffad76}
.lv2-bomb-countdown.urgent .lv2-fuse-caption{fill:#ff996c}
.lv2-bomb-countdown.urgent .lv2-live-rope{stroke:#ff9c55}
.lv2-bomb-countdown.urgent .lv2-burning-tip{filter:drop-shadow(0 0 8px #ff7935)}

.lv2-outcome{text-align:center;padding:4px 0 15px}
.lv2-outcome-kicker{color:#ffb279;font:800 10px sans-serif;letter-spacing:3px}
.lv2-outcome h2{font-size:23px;line-height:1.6;margin:0 0 10px;color:#ffe4c1}
.lv2-outcome p{font-size:12px;line-height:1.9;color:#cfbfb5;margin:0 0 20px}
.lv2-blast-art{width:calc(100% + 32px);margin:10px -16px 0;display:block;overflow:visible}
.lv2-boom-word{font:700 76px Fredoka,sans-serif;letter-spacing:-2px}
.lv2-explosion-core{transform-origin:180px 155px;animation:lv2-boom .5s cubic-bezier(.16,.8,.3,1.1) both}
.lv2-shockwave{transform-origin:180px 155px;animation:lv2-shockwave .85s ease-out both}
.lv2-blast-smoke{transform-origin:180px 155px;animation:lv2-smoke 1.7s ease-out both}
.lv2-blast-debris{transform-origin:180px 155px;animation:lv2-debris .9s ease-out both}
#timesLv2[data-lv2-page="exploded"]{background:radial-gradient(ellipse at 50% 45%,#613b34,#211d30 65%,#0e1829)}
#timesLv2[data-lv2-page="exploded"] .lv2-page{animation:lv2-impact-shake .48s ease-out}
#timesLv2[data-lv2-page="exploded"] .lv2-secondary{color:#ffe6c8;border-color:#bf7758;background:#57333a}
.lv2-defused-art{position:relative;margin:8px 0 0}
.lv2-defused-art .lv2-bomb-art{max-height:245px}
.lv2-defused-art .lv2-spark{display:none}
.lv2-defused-art .lv2-bomb-float{animation:none}
.lv2-defused-art>span{position:absolute;right:11%;top:20%;width:68px;height:68px;display:grid;place-items:center;border-radius:50%;background:#9cebd1;color:#173f39;font:45px Fredoka,sans-serif;box-shadow:0 0 0 7px #9cebd128;animation:lv2-arrive .35s ease-out}
.defused .lv2-outcome-kicker{color:var(--lv2-mint)}

@keyframes lv2-burn{to{transform:rotate(24deg) scale(.75)}
}
@keyframes lv2-cinders{from{transform:translateY(4px);opacity:.9}
to{transform:translate(5px,-14px);opacity:0}
}
@keyframes lv2-bomb-rattle{from{transform:translateX(-1px) rotate(-2deg)}
to{transform:translateX(1px) rotate(2deg)}
}
@keyframes lv2-boom{0%{transform:scale(.12) rotate(-12deg);opacity:0}
60%{transform:scale(1.08) rotate(2deg);opacity:1}
100%{transform:scale(1);opacity:1}
}
@keyframes lv2-shockwave{from{transform:scale(.1);opacity:1}
to{transform:scale(1.4);opacity:0}
}
@keyframes lv2-smoke{from{transform:scale(.6);opacity:0}
35%{opacity:.9}
to{transform:scale(1.14) translateY(-4px);opacity:.6}
}
@keyframes lv2-debris{from{transform:scale(.3);opacity:0}
40%{opacity:1}
to{transform:scale(1.1);opacity:.8}
}
@keyframes lv2-impact-shake{0%,100%{transform:translate(0)}
15%{transform:translate(-7px,3px)}
30%{transform:translate(6px,-3px)}
45%{transform:translate(-4px,2px)}
60%{transform:translate(3px,-1px)}
80%{transform:translate(-1px)}
}

@media(max-height:680px){#timesLv2[data-lv2-page="question"] .lv2-nav{margin-bottom:10px;padding:3px 0}
#timesLv2[data-lv2-page="question"] .lv2-path{margin:8px 0 12px}
#timesLv2[data-lv2-page="question"] .lv2-bomb-countdown{height:104px;margin:0 -7px 2px}
#timesLv2[data-lv2-page="question"] .lv2-equation{font-size:36px;margin:6px -8px}
#timesLv2[data-lv2-page="question"] .lv2-type{margin:6px 0 12px}
#timesLv2[data-lv2-page="question"] .lv2-answers{gap:8px}
#timesLv2[data-lv2-page="question"] .lv2-choice{min-height:60px;font-size:28px!important}
#timesLv2[data-lv2-page="question"] .lv2-fuse{margin-top:6px;height:25px;font-size:8px;letter-spacing:0}
.lv2-blast-art{max-height:230px}
.lv2-outcome h2{font-size:20px}
.lv2-outcome p{margin-bottom:8px}
.lv2-defused-art .lv2-bomb-art{max-height:200px}
.lv2-defused-art>span{width:50px;height:50px;font-size:32px}
}

@media(prefers-reduced-motion:reduce){#timesLv2 .lv2-shockwave{opacity:.35}
#timesLv2 .lv2-ember-dust{display:none}
}


/* Timed keypad: all digits and Submit stay visible at 320×568. */
#openTimesLv2{border-color:#dc9e65;background:linear-gradient(125deg,#442638,#1b2f48)}

#openTimesLv2 .icon{background:linear-gradient(150deg,#ffc579,#dc603c);color:#291826}

#openTimesLv2 .who small{font-size:10px;color:#f0c9a0}

#openTimesLv2Scores{min-height:48px;width:100%;background:#442b38;color:#ffe2ba;border:1px solid #bd825c;border-radius:12px;padding:12px;font:inherit;font-size:14px;margin:8px 0}

#timesLv2 .lv2-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}

#timesLv2 .lv2-keypad button{min-height:56px;margin:0;padding:6px;border:1px solid #718aab;border-bottom:3px solid #30475e;border-radius:12px;background:linear-gradient(150deg,#334962,#20344d);color:#fff4df;font:600 28px Fredoka,sans-serif!important;box-shadow:0 3px 8px #0003}

#timesLv2 .lv2-keypad button:active{transform:translateY(1px);border-color:#ffbf78;background:#46536d}

#timesLv2 .lv2-keypad .lv2-edit{font-size:17px!important;color:#f6c796;background:#382d3f;border-color:#937766}

#lv2Form{display:grid;gap:9px}

#lv2Form label{margin:0;font-size:13px}

#lv2Answer{box-sizing:border-box;width:100%;height:62px;border:2px solid #f4ba75;border-radius:14px;background:#090f23;color:#fff4dd;font:600 40px Fredoka,sans-serif;text-align:center;caret-color:transparent;box-shadow:inset 0 3px 12px #0006}

#timesLv2[data-lv2-page="question"] .lv2-main{min-height:56px;margin:0;background:linear-gradient(135deg,#ffdf9a,#ffae68);border-color:#ffe6b9;color:#372133;box-shadow:0 4px 0 #975338}

#timesLv2[data-lv2-page="question"] .lv2-nav{margin-bottom:8px;padding:0}

#timesLv2[data-lv2-page="question"] .lv2-status{margin-bottom:0}

#timesLv2[data-lv2-page="question"] .lv2-path{margin:6px 0}

#timesLv2[data-lv2-page="question"] .lv2-bomb-countdown{height:132px;margin:0 auto;width:100%}

#timesLv2[data-lv2-page="question"] .lv2-equation{font-size:48px;margin:4px 0}

#timesLv2 .lv2-page{padding-top:8px}

@media(max-height:680px){
 #timesLv2[data-lv2-page="question"] .lv2-page{padding:0 12px 10px}

 #timesLv2[data-lv2-page="question"] .lv2-nav{margin:0}

 #timesLv2[data-lv2-page="question"] .lv2-back{min-height:40px}

 #timesLv2[data-lv2-page="question"] .lv2-status{font-size:10px}

 #timesLv2[data-lv2-page="question"] .lv2-status b{font-size:20px}

 #timesLv2[data-lv2-page="question"] .lv2-path{margin:4px 0}

 #timesLv2[data-lv2-page="question"] .lv2-bomb-countdown{height:88px;margin:0}

 #timesLv2[data-lv2-page="question"] .lv2-equation{font-size:36px;margin:3px 0}

 #lv2Form{gap:6px}

 #lv2Form label{font-size:11px;line-height:1.3}

 #lv2Answer{height:46px;font-size:32px}

 #timesLv2 .lv2-keypad{gap:6px}

 #timesLv2 .lv2-keypad button{min-height:46px;font-size:25px!important;padding:4px}

 #timesLv2[data-lv2-page="question"] .lv2-main{min-height:48px;padding:9px}

}


@media(max-height:620px){
 #timesLv2[data-lv2-page="question"] .lv2-bomb-countdown{height:70px}
 #timesLv2[data-lv2-page="question"] .lv2-equation{font-size:32px;margin:2px 0}
 #timesLv2[data-lv2-page="question"] .lv2-page{padding-bottom:4px}
 #lv2Form{gap:4px}
 #lv2Form label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #timesLv2 .lv2-keypad{gap:5px}
}
