
:root{--stage:#030c29;--stage2:#071b48;--panel:#0a2355;--line:#244c85;--muted:#a6bedb;--sky:#43dfff;--silver:linear-gradient(160deg,#f9fcff 0%,#aebed4 14%,#fff 26%,#71869f 48%,#edf6ff 65%,#a4b7cc 83%,#fff 100%);--f-disp:"Noto Sans JP","Yu Gothic",sans-serif}
.app{background:radial-gradient(ellipse at 50% 0,#10346b,transparent 65%),#030c29}
.bar{padding:14px 22px;gap:9px;background:linear-gradient(180deg,#0b2455,#06132f);border-bottom:1px solid #56c7ff;box-shadow:0 3px 20px #008cff30;z-index:2}
.logo{font-weight:900;color:#f4f9ff;background:none;font-size:22px;letter-spacing:.02em;text-shadow:0 0 18px #269bff80}
.btn{background:linear-gradient(180deg,#133564,#0a2043);border:1px solid #365e8c;border-radius:7px;transition:background .15s,border-color .15s,box-shadow .15s}
.btn:hover:not(:disabled){border-color:#67daff;box-shadow:0 0 12px #1aabff25}
.btn.primary{background:linear-gradient(180deg,#fff0a0,#f3c951);border-color:#ffeeb3;color:#17223b;box-shadow:0 3px 12px #e8ba2420}
.btn.primary:hover{background:linear-gradient(180deg,#fff7cb,#ffdb70)}
.studio{grid-template-columns:260px minmax(0,1fr) 270px;gap:16px;padding:20px 18px;box-sizing:border-box}
.st-list,.st-side{border:1px solid #89b0d2;border-radius:12px;background:linear-gradient(150deg,#0c2856ee,#030d28f5);box-shadow:inset 0 0 0 3px #102a4b,inset 0 4px 0 #d3e9fa40,0 0 18px #1197fa20;padding:15px 12px}
.st-lhead{flex-direction:column;align-items:flex-start;gap:5px;padding:4px 3px 14px;border-bottom:1px solid #28547e;margin-bottom:3px}
.st-lhead b{font-size:17px}
.st-lhead small{letter-spacing:.04em}
.st-item{position:relative;min-height:66px;border:1px solid #2a64a1;border-radius:8px;background:linear-gradient(135deg,#0e326c,#071b43);padding:9px 7px;gap:8px}
.st-item:hover{border-color:#7ddfff;background:linear-gradient(135deg,#164486,#092554)}
.st-item.on{border-color:#ffe39a;box-shadow:inset 0 0 0 1px #f8d36c,0 0 12px #ffd75940;background:linear-gradient(135deg,#164383,#0a2350)}
.st-grip{color:#698bad;letter-spacing:-4px;font-size:12px;padding:0}
.st-th,.st-th.txt{width:46px;height:52px;aspect-ratio:auto;padding:0;display:block;overflow:hidden;border:1px solid #ffe49b;border-radius:7px;background:linear-gradient(145deg,#fff2b5,#e7b843);box-shadow:inset 0 1px 0 #fff8d7}
.st-th i{display:none}
.st-th .st-n,.st-th.txt .st-n{inset:0;min-width:0;height:auto;padding:0;background:none;box-shadow:none;color:#101e36;font-size:30px;font-weight:700}
.st-th .st-pr{z-index:1;font-size:8px;line-height:12px;top:auto;bottom:1px;left:2px;right:2px;text-align:center;background:#172d50;color:#fff}
.st-th.empty::after{content:none}
.st-tx b{font-size:13px;line-height:1.5}
.st-tx small{font-size:10px;color:#96b5d8}
.st-add .btn{font-size:12px;padding:10px}
.st-main{padding:0 0 28px;gap:12px}
.st-mhead h2{font-size:18px}
.st-saved{font-size:11px}
.seg2{border:1px solid #345b89;border-radius:7px}
.seg2 button{font-size:11px;padding:7px 10px}
.seg2 button.on{background:#1b5598;color:#fff}
.st-screen{border:1px solid #91caff;border-radius:10px;background:#041432 url(neon-stage.svg) center/cover no-repeat;box-shadow:0 0 0 3px #142c4e,0 0 24px #139eff28}
.pv{padding:64px 94px 76px;gap:30px}
.pv-meta{height:72px;border:2px solid #3b84d5;border-radius:12px;background:linear-gradient(180deg,#123b7c,#061637);box-shadow:0 0 14px #00aaff40}
.pv-no{padding:0 38px;font-family:var(--f-quiz);font-size:44px;font-weight:900;color:#ffe475;background:linear-gradient(180deg,#163e83,#071c4c)}
.pv-tot,.pv-g{font-size:27px}
.pv-list{width:86%;gap:20px}
.pv-bar{border:4px solid #c1d5e9;border-radius:14px;padding:0 30px;font-size:68px;box-shadow:inset 0 2px 0 #fff,0 5px 12px #00112b80;background:linear-gradient(180deg,#fff,#f5f8ff)}
.pv-n{width:76px;height:76px;font-size:49px;border:3px solid #fff;box-shadow:0 2px 5px #0002}
.pv-bar.ok{border-color:#52e6b0;box-shadow:0 0 0 3px #d4ffee,0 0 24px #00d99660}
.pv-flag{background:#00ad69;border-radius:8px;font-size:28px;padding:6px 17px}
.st-side h3{font-size:16px;padding:4px 0 10px;border-bottom:1px solid #28547e}
.phone{width:190px;border:6px solid #c1d0df;box-shadow:0 0 0 2px #55728e,0 8px 20px #0007;border-radius:25px}
.ph-top{background:#0a2c5e}
.ph-top b{color:#e7f3ff}
.ph-k{border:1px solid #cedceb}
.st-side .monhow{background:#061733;border:1px solid #244b7c}
.st-side .st-demo{border-top:1px solid #28547e;padding-top:14px}
.st-demo .btn{font-size:11px;padding:8px}
.st-cap{font-size:11px;color:#a9bfd9}
.st-form{background:#07182f;border:1px solid #244265;border-radius:10px;padding:20px;box-sizing:border-box;margin-top:4px}
.sf-row{grid-template-columns:76px minmax(0,1fr)}
.st-form input:not([type=file]),.st-form select,.st-form textarea{background:#030f24;border:1px solid #335578}
.sf-type{width:110px;border-width:1px;background:#102a49;border-radius:8px}
.sf-type.on{border-color:#63d7ff;box-shadow:0 0 0 1px #63d7ff40}
.chip{border-width:1px;background:#102a49;font-size:12px}
.chip.on{background:#175592;border-color:#78caff;color:#fff}
.sf-ok{border-width:1px;background:#102a49}
.sf-ok.on{background:#07573c;border-color:#53ce9a}
.ed .sheet{background:#071830;border-color:#74ceff}
.evset{background:#0d284b;border:1px solid #345f87}
.ed input,.ed select,.ed textarea{border-width:1px;background:#030e22}
.monitor .app:not(.bg-on),.preview .app:not(.bg-on){background:#041432 url(neon-stage.svg) center/cover no-repeat}
.monitor .stage,.preview .stage{padding-block:clamp(28px,5vh,58px);padding-inline:clamp(28px,5vw,96px)}
.pgrid.list .cell{background:var(--silver);padding:4px;border-radius:13px;box-shadow:0 3px 10px #0005}
.pgrid.list .ph{border-radius:9px}
.p4.revealed .pgrid.list .cell.correct{background:linear-gradient(180deg,#a5ffe0,#00b77b);box-shadow:0 0 0 2px #d6ffee,0 0 28px #00d99670}
.pv-chk,.chk{background:linear-gradient(180deg,#c2ffe5,#00b779);color:#002b20;box-shadow:none}
.splash,.lobby{background:#041432 url(neon-stage.svg) center/cover no-repeat}
.splash h1,.lb-title{font-weight:900;background:linear-gradient(180deg,#fff,#d2e9ff 45%,#6ab6ff);background-clip:text;-webkit-background-clip:text;filter:drop-shadow(0 4px 0 #133e76) drop-shadow(0 0 25px #269bff80)}
.lb-rings i{border-color:#36c9ff30}
.rank{background:linear-gradient(145deg,#0e3570,#030e28)}
@media(min-width:1800px){
.studio{grid-template-columns:300px minmax(0,1fr) 300px}
.st-tx b{font-size:15px}
.phone{width:220px}}
@media(max-width:1180px){
.studio{grid-template-columns:220px minmax(0,1fr);gap:12px;padding:14px}
.st-side{display:none}
.bar{padding:10px 14px}
.logo{font-size:19px}
.bar .btn{font-size:12px}
.st-form{padding:14px}
.st-mhead{gap:8px}}
@media(max-width:760px){
.studio{grid-template-columns:1fr;padding:10px;gap:12px}
.st-list{max-height:230px}
.st-lhead{flex-direction:row}
.st-item{min-height:50px}
.st-th,.st-th.txt{height:42px;width:38px}
.st-tx b{-webkit-line-clamp:1}
.st-form{padding:14px}
.sf-row{grid-template-columns:1fr}
.bar .logo{width:100%}
.bar .sp{display:none}
.st-mhead h2{font-size:16px}
.seg2{margin-left:0}
.sf-types{gap:6px}
.sf-type{width:94px}
.meta{max-width:100%;padding-right:10px}
.genre{font-size:12px}
.qno{font-size:22px}
.qno small{font-size:12px}
.stage{padding:14px 10px}
.pgrid.list .ph.tx .t{font-size:clamp(22px,5vw,34px);padding-left:60px;padding-right:60px}
.pgrid.list .num{width:36px;top:50%;transform:translateY(-50%)}
.monitor .stage,.preview .stage{padding:16px 12px}}
@media(prefers-reduced-motion:reduce){
*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.splash{background:#031039 url(stage-cinematic.png) center/cover no-repeat;padding:clamp(18px,3vh,36px) 20px;box-sizing:border-box}
.splash>div{width:min(1100px,82vw);display:flex;flex-direction:column;align-items:center;gap:0;isolation:isolate}
.splash>div::before{top:0;left:50%;width:96%;height:calc(clamp(64px,20vh,220px) * 2.25);transform:translateX(-50%);background:linear-gradient(125deg,#fff 0%,#71859e 13%,#e8f5ff 22%,#516984 30%,#eaf6ff 42%,#7a95b3 64%,#fff 78%,#5f7d9d 88%,#e6f4ff 100%);clip-path:polygon(18% 0,82% 0,100% 100%,0 100%);filter:drop-shadow(0 0 10px #64ddff);-webkit-mask:none}
.splash>div::after{top:8px;left:50%;width:calc(96% - 22px);height:calc(clamp(64px,20vh,220px) * 2.25 - 18px);transform:translateX(-50%);background:radial-gradient(ellipse at 50% 20%,#194cbdc9,#02174bdd 65%);clip-path:polygon(18% 0,82% 0,100% 100%,0 100%);box-shadow:inset 0 0 40px #001337}
.splash h1{position:relative;margin:0;padding:0 .08em .08em;font-size:clamp(64px,20vh,220px);font-family:"Noto Sans JP","Yu Gothic",sans-serif;font-weight:900;line-height:1.08;letter-spacing:-.035em;background:linear-gradient(180deg,#fffbd7 0%,#fffaa5 22%,#ffe56b 44%,#ffce00 66%,#e6a500 76%,#fff284 89%,#fffbd5 100%);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-stroke:1px #fff0a0;filter:drop-shadow(0 3px 0 #9d6800) drop-shadow(0 7px 0 #a96b00) drop-shadow(3px 9px 0 #352000) drop-shadow(0 13px 0 #011144) drop-shadow(0 0 4px #287dff) drop-shadow(0 0 14px #008dff);z-index:1;text-wrap:balance}
.splash h1::after{content:"";position:absolute;right:7%;top:22%;width:clamp(18px,4vh,42px);height:clamp(18px,4vh,42px);background:linear-gradient(90deg,transparent 43%,#fff9dd 49%,#fff 50%,#fff9dd 51%,transparent 57%),linear-gradient(0deg,transparent 43%,#fff9dd 49%,#fff 50%,#fff9dd 51%,transparent 57%);filter:drop-shadow(0 0 7px #ffdd66);pointer-events:none}
#tSub{box-sizing:border-box;width:88%;font-size:clamp(13px,3.1vh,33px);font-family:var(--f-quiz);margin:clamp(12px,2.1vh,24px) 0 0;padding:.48em 1.7em;background:linear-gradient(165deg,#fff 0%,#8da8c7 23%,#fff 38%,#738ca7 53%,#f4faff 80%,#9fb5d0);filter:drop-shadow(0 0 10px #00c3ff);font-weight:900;letter-spacing:.025em}
#tSub::before{inset:5px 9px;background:linear-gradient(180deg,#173f99,#03103b 70%,#0a2c7a);box-shadow:inset 0 0 10px #339aff}
.splash #titleStats:empty,.splash .row:empty{display:none}
.splash .joinbox{width:88%;max-width:none;margin:clamp(14px,2.6vh,28px) 0 0;padding:clamp(15px,2.2vh,25px);gap:clamp(18px,2.5vw,40px);box-sizing:border-box;background:linear-gradient(155deg,#fff 0%,#809bb9 18%,#f0faff 34%,#61768f 52%,#d9edff 72%,#fff 86%,#91aaca);clip-path:polygon(22px 0,calc(100% - 22px) 0,100% 22px,100% calc(100% - 22px),calc(100% - 22px) 100%,22px 100%,0 calc(100% - 22px),0 22px);filter:drop-shadow(0 0 10px #30caff)}
.splash .joinbox::before{inset:7px;background:linear-gradient(160deg,#08276b,#010a2e 65%,#062568);box-shadow:inset 0 0 24px #1b74ea80}
.splash .joinbox .qr{flex:none;width:clamp(96px,21vh,230px);height:clamp(96px,21vh,230px);padding:10px;box-sizing:border-box;background:#fff;border-radius:12px;box-shadow:0 0 12px #90cbff50;display:grid;place-items:center}
.splash .joinbox .qr img,.splash .joinbox .qr canvas{width:100%!important;height:100%!important;object-fit:contain}
.splash .joinbox .qr canvas{display:block!important}
.splash .joinbox .qr canvas+img{display:none!important}
.splash .joinbox .qr>div{width:100%!important;height:100%!important;box-sizing:border-box;display:grid;place-items:center;border:3px dashed #b7ceeb;color:#b7cce9;border-radius:5px;font-size:clamp(30px,6vh,60px);font-family:var(--f-num)}
.splash .joinbox .jtext{flex:1;min-width:0;gap:clamp(8px,1.3vh,14px);font-family:var(--f-quiz);font-size:clamp(12px,2.2vh,24px);line-height:1.5;text-align:left;color:#f5f9ff}
.splash .joinbox .jtext b{color:#ffe02c;font-size:clamp(19px,3.5vh,38px);font-weight:900;text-shadow:0 2px 0 #765600}
.splash .joinbox .jurl{font-size:.65em;overflow-wrap:anywhere}
.splash .stats{font-size:18px}
.preview .pvbar{font-size:11px;opacity:.2}
.preview .pvbar:hover,.preview .pvbar:focus-within{opacity:1}
@media(max-width:760px){
.splash>div{width:96vw}
.splash h1{font-size:clamp(48px,13vw,100px);-webkit-text-stroke:.5px #fff0a0}
.splash>div::before{height:calc(clamp(48px,13vw,100px) * 2.3)}
.splash>div::after{height:calc(clamp(48px,13vw,100px) * 2.3 - 18px)}
#tSub{width:95%;font-size:clamp(11px,2.9vw,18px)}
.splash .joinbox{width:95%;gap:15px;padding:18px}
.splash .joinbox .qr{width:90px;height:90px;padding:7px}
.splash .joinbox .jtext{font-size:11px;gap:5px}
.splash .joinbox .jtext b{font-size:17px}
.splash{padding:25px 8px}}
@media(max-height:580px) and (min-width:761px){
.splash h1{font-size:18vh}
.splash>div::before{height:40vh}
.splash>div::after{height:calc(40vh - 18px)}
.splash .joinbox .qr{width:19vh;height:19vh}
.splash .joinbox{margin-top:12px}
.splash .joinbox .jtext{font-size:2.3vh}
.splash .joinbox .jtext b{font-size:3.4vh}}

/* Restore the original question banner without overriding its original rules. */
:root{--silver:linear-gradient(180deg,#ffffff 0%,#f4f7ff 10%,#c3cde0 24%,#ffffff 38%,#eef2fa 44%,#7d8aa4 54%,#aab6cc 62%,#ffffff 78%,#dfe6f3 88%,#9aa7bf 100%)}

/* Text answer reveal: same dimming and golden outline as photo questions. */
.p4.revealed .pgrid.list .cell:not(.correct){opacity:.35;filter:saturate(.25)}
.p4.revealed .pgrid.list .cell:not(.correct) .num{filter:none}
.p4.revealed .pgrid.list .cell.correct{opacity:1;filter:none;background:linear-gradient(180deg,#fff6bf,var(--gold));box-shadow:0 0 0 4px rgba(255,225,77,.4),0 0 50px rgba(255,225,77,.6);transform:scale(1.015);z-index:3}
.pv-list:has(.pv-bar.ok) .pv-bar:not(.ok){opacity:.35;filter:saturate(.25)}
.pv-list .pv-bar.ok{opacity:1;filter:none;border-color:var(--gold);box-shadow:0 0 0 4px rgba(255,225,77,.4),0 0 50px rgba(255,225,77,.6);transform:scale(1.015);z-index:3}
.pv-list .pv-bar{transition:opacity .4s,filter .4s,transform .35s,box-shadow .35s}

/* Photo choices share the text choices' silver frame; preserve reveal styling. */
.pgrid:not(.list) .cell{background:var(--silver);padding:4px;border-radius:13px;box-shadow:0 3px 10px #0005}
.pgrid:not(.list) .ph{border-radius:9px}
.p4.revealed .pgrid:not(.list) .cell.correct{background:linear-gradient(180deg,#fff6bf,var(--gold));box-shadow:0 0 0 4px rgba(255,225,77,.4),0 0 50px rgba(255,225,77,.6)}
.pv-grid .pv-cell{background:var(--silver);padding:6px;border-radius:14px;box-shadow:0 3px 10px #0005}
.pv-grid .pv-cell.ok{background:linear-gradient(180deg,#fff6bf,var(--gold));box-shadow:0 0 0 6px rgba(255,225,77,.45)}

/* Center the visible Japanese lettering within the question-number tab. */
.qno b{align-items:center;line-height:1;padding-top:.2em;padding-bottom:.4em}
.pv-no{align-items:center;line-height:1;padding-top:0;padding-bottom:.2em;box-sizing:border-box}

/* Extend only the white question board horizontally behind the timer. */
.qbar .qv{clip-path:none;background:transparent;isolation:isolate}
.qbar .qv::before{content:"";position:absolute;inset:0 calc(-1 * (clamp(64px,13vh,140px) + 36px + clamp(10px,1vw,18px))) 0 0;z-index:-1;background:#fff;border-radius:0 14px 14px 0;clip-path:polygon(clamp(8px,.8vw,14px) 0,100% 0,100% 100%,0 100%);pointer-events:none}
.pv-qbar .pv-qt{clip-path:none;background:transparent;position:relative;isolation:isolate;z-index:1}
.pv-qbar .pv-qt::before{content:"";position:absolute;inset:0 -194px 0 0;z-index:-1;background:#fff;border-radius:0 16px 16px 0;clip-path:polygon(14px 0,100% 0,100% 100%,0 100%);pointer-events:none}
.qbar .qv,.pv-qbar .pv-qt{overflow:visible}

/* End the white extension at the frame's inner right edge. */
.qbar .qv::before{right:calc(-1 * (clamp(64px,13vh,140px) + 18px + clamp(10px,1vw,18px)))}
.pv-qbar .pv-qt::before{right:-178px}

/* MC console: silver hardware, navy panels and cyan status lights. */
.mcp-pvh b{color:#bdeaff;letter-spacing:.04em}
.mcp-pvh small{color:#9cb5ce}
.mcp-phone{border:8px solid #a4b8d0;background:#04122a;border-radius:30px;box-shadow:0 0 0 2px #eff8ff,0 0 0 5px #314d6e,0 0 24px #21b8ff30,0 16px 30px #0006}
.mcp-screen,.mcv{color:#edf6ff;background:radial-gradient(ellipse at 50% 0,#12396955,transparent 60%),#06152c}
.mc-head{background:linear-gradient(180deg,#0c2b55,#06162f);border-bottom:2px solid #50ceff;box-shadow:0 3px 15px #00aaff20}
.mc-brand b{color:#f1f8ff;font-weight:900;text-shadow:0 0 12px #3bbcff50}
.mc-brand small{color:#94c1e2}
.mc-ppl{background:linear-gradient(180deg,#184b7b,#0b2c51);border:1px solid #3e86b3;border-radius:8px;box-shadow:inset 0 1px 0 #b0e4ff30}
.mc-ppl b{color:#e7faff}.mc-ppl i,.mc-ppl small{color:#a8d2ed}
.mc-status{background:#081d39;border-bottom:1px solid #2b577c}
.mc-status b{color:#e5f5ff}.mc-status small{color:#9ec3df}
.mc-time{background:radial-gradient(circle at 30% 20%,#ff7c8b,#de1837 65%);border:2px solid #d9e8f5;box-shadow:0 0 0 1px #6e8eaf}
.mc-body{scrollbar-width:thin;scrollbar-color:#3d749b #06152c}
.mc-card{background:linear-gradient(145deg,#0d2b50,#081c37);border:1px solid #6b93b4;border-radius:10px;box-shadow:inset 0 2px 0 #d3eaff20,0 0 0 2px #112b47,0 4px 14px #0003}
.mc-tag{color:#79e6ff}.mc-tip{color:#98b6d0}.mc-line{color:#f1f7ff}.mc-dir{color:#ffe180}
.mc-help,.mc-q,.mc-rank{background:linear-gradient(145deg,#0a2648,#071a33);border:1px solid #365e84;border-radius:10px}
.mc-help summary,.mc-q h3,.mc-rank h3{color:#b8d6ee}.mc-help summary::after{color:#71ceef}.mc-help p{color:#eff6ff}
.mc-q li,.mc-rank li{background:#102e50;border-radius:7px}.mc-q li.ok{background:#0b4536;box-shadow:inset 0 0 0 1px #47d3a3}
.mc-chk small,.mc-chk li{color:#aac9e2}.mc-chk li::marker{color:#5bc8f4}
.mc-foot{background:linear-gradient(180deg,#0b2444,#05152b);border-top:1px solid #5c9dbd;box-shadow:0 -4px 16px #0003}
.mc-cue{color:#b7d9ee}.mc-go{color:#17243b;background:linear-gradient(180deg,#fff4b6,#ffdc69 55%,#efbc34);border:1px solid #fff0ae;border-radius:9px;box-shadow:0 3px 0 #846215,0 0 16px #ffd55720}
.mc-go:active:not(:disabled){box-shadow:0 1px 0 #846215}.mc-sub{border-width:1px;border-radius:9px;background:#321c35}
.mc-back{border-color:#427394;color:#c1e6fc}.mc-ansrow{border-color:#2b577c}.mc-ansrow>small,.mc-ansrow b small{color:#a6cce5}.mc-bar{background:#173b5b}
.mcs-pv{background:#05162c;border:1px solid #294c70}.mcs-pv .mc-card{color:#edf6ff}

/* Balance the script editor and preview at the same top edge. */
.ed .sheet.mcp-sheet{width:min(1360px,100%);padding:20px 24px;gap:12px}
.mcp-grid{grid-template-columns:minmax(0,1fr) minmax(290px,360px);align-items:start;gap:28px;flex-shrink:0}
.mcp-edit{min-width:0}
.mcp-pv{position:sticky;top:0;align-self:start;gap:12px;padding:0 6px 8px;box-sizing:border-box}
.mcp-pvh{padding:0 2px;gap:4px;line-height:1.5}
.mcp-phone{width:100%;box-sizing:border-box;height:clamp(380px,calc(100dvh - 190px),740px);flex-shrink:0}
#mcsText{min-height:190px}
@media(max-width:1000px) and (min-width:761px){.ed .sheet.mcp-sheet{padding:16px}.mcp-grid{grid-template-columns:minmax(0,1fr) 310px;gap:18px}.mcp-pv{position:sticky;top:0}}
@media(max-width:760px){.ed .sheet.mcp-sheet{padding:16px 12px}.mcp-grid{grid-template-columns:1fr;gap:24px}.mcp-pv{position:static;width:min(380px,100%);justify-self:center}.mcp-phone{height:620px;max-height:80dvh}}

/* Fix the MC workspace rows; only the editing and phone content scroll. */
#mcPanel .mcp-sheet{display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden;align-content:start}
#mcPanel .mcp-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,360px);min-height:0;height:100%;align-items:start;overflow:hidden}
#mcPanel .mcp-edit{height:100%;min-height:0;overflow-y:auto;padding-right:8px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#3d749b #06152c}
#mcPanel .mcp-pv{position:static;align-self:start;min-height:0;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);align-content:start;gap:10px;padding:0 6px 6px;margin:0}
#mcPanel .mcp-phone{height:100%;min-height:0;max-height:740px;width:100%;margin:0}
@media(max-width:1000px) and (min-width:761px){#mcPanel .mcp-grid{grid-template-columns:minmax(0,1fr) 310px}}
@media(max-width:760px){#mcPanel .mcp-sheet{display:flex;overflow-y:auto}#mcPanel .mcp-grid{grid-template-columns:1fr;height:auto;overflow:visible}#mcPanel .mcp-edit{height:auto;overflow:visible;padding-right:0}#mcPanel .mcp-pv{height:650px;width:min(380px,100%);justify-self:center}}

/* Prevent the capped phone height from being vertically centered in its grid row. */
#mcPanel .mcp-pv{align-items:start;justify-items:center}
#mcPanel .mcp-pvh{align-self:start;justify-self:stretch;margin:0}
#mcPanel .mcp-phone{align-self:start;justify-self:center}

/* Align the phone frame itself with the script panel, with its caption above. */
@media(min-width:761px){
#mcPanel .mcp-pv{position:relative;display:block;height:min(100%,var(--mc-editor-height,700px));padding:0 6px;overflow:visible}
#mcPanel .mcp-pvh{position:absolute;bottom:calc(100% + 10px);left:6px;right:6px;line-height:1.4;gap:3px}
#mcPanel .mcp-phone{height:100%;max-height:none;align-self:start}
}

/* Question-list format thumbnails, with a small corner number. */
.st-th,.st-th.txt{position:relative;flex:none;width:76px;height:auto;aspect-ratio:16/10;border:0;border-radius:6px;background-color:#060920;box-shadow:none;overflow:hidden;box-sizing:border-box;display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:3px}
.st-th.txt{grid-template-columns:1fr;grid-template-rows:repeat(4,1fr);gap:3px;padding:5px 6px;background:#060920}
.st-th i{display:block;border-radius:2px;opacity:.9}
.st-th.txt i{position:relative;background:#fff;opacity:1;border-radius:3px}
.st-th .st-n,.st-th.txt .st-n{position:absolute;inset:auto;left:3px;bottom:3px;min-width:18px;height:18px;padding:0 3px;background:#0b1030;color:#fff;font-family:var(--f-num);font-size:12px;font-weight:700;border-radius:5px;display:grid;place-items:center;box-shadow:0 0 0 2px #060920;box-sizing:border-box}
.st-th.txt .st-n{left:auto;right:3px}
.st-th .st-pr{position:absolute;top:3px;bottom:auto;left:3px;right:auto;font-size:10px;line-height:16px;padding:0 5px;background:var(--gold);color:#2a1600;border-radius:5px}
.st-th.empty::after{content:"写真";position:absolute;inset:0;display:grid;place-items:center;font-size:11px;color:var(--muted)}
@media(max-width:760px){.st-th,.st-th.txt{width:76px;height:auto;aspect-ratio:16/10}}

/* Consistent corner numbers and solid question-list frames. */
.st-th .st-n{left:auto;right:3px;bottom:3px}
.st-item.ex{border-style:solid}

/* Participation instructions after the opening title. */
.lobby{background:linear-gradient(#03112d55,#03112d88),url(stage-cinematic.png) center/cover no-repeat;gap:clamp(16px,3vh,34px)}
.lb-kicker{color:#a5dfff;letter-spacing:.35em}
.lb-title{font-family:var(--f-quiz);font-weight:900;font-size:clamp(28px,6vh,76px)}
.lb-body{gap:clamp(28px,6vw,110px);width:min(1450px,92%);flex-wrap:nowrap}
.lb-qr{width:clamp(220px,57vh,620px);flex:none;border:3px solid #d8ebfa;box-shadow:0 0 0 5px #7da2c4,0 0 25px #00bbff55,0 12px 25px #0005}
.lb-info{flex:1;max-width:600px}
.lb-steps li{border-bottom:1px solid #69cfff55}
.lb-steps b{border-color:#ffe18a;color:#ffe18a;background:#092348;font-size:clamp(22px,3.4vh,40px)}
.lb-steps span{font-size:clamp(20px,4vh,46px)}
.lb-cl{color:#b3d9ee}.lb-cn small{color:#d9ecff}
@media(max-width:760px){.lb-body{flex-wrap:wrap;gap:20px}.lb-qr{width:min(42vh,75vw)}.lb-info{width:100%;flex:auto;max-width:420px}.lb-steps li{padding:10px 0}.lb-steps span{font-size:20px}.lb-cn b{font-size:64px}.lobby{overflow:auto;justify-content:flex-start}.lb-head{margin-top:10px}}

/* Angular animated circuitry replaces the lobby's concentric circles. */
.lobby .lb-rings{overflow:hidden;perspective:900px}
.lobby .lb-rings i{top:50%;left:50%;width:90%;height:78%;border:0;border-radius:0;background:linear-gradient(110deg,transparent 30%,#45dfff55 48%,#a9f6ffb3 50%,#45dfff55 52%,transparent 70%);background-size:240% 100%;clip-path:polygon(12% 0,88% 0,100% 24%,100% 76%,88% 100%,12% 100%,0 76%,0 24%,12% 0,12.2% .3%,.3% 24%,.3% 76%,12.2% 99.7%,87.8% 99.7%,99.7% 76%,99.7% 24%,87.8% .3%,12.2% .3%);transform:translate(-50%,-50%);animation:lobbyCircuitFlow 12s linear infinite;opacity:.7}
.lobby .lb-rings i:nth-child(2){width:76%;height:63%;animation-delay:-4s;animation-duration:16s;opacity:.45}
.lobby .lb-rings i:nth-child(3){width:110%;height:98%;animation-delay:-8s;animation-duration:20s;opacity:.55}
.lobby .lb-rings i:nth-child(4){width:65%;height:115%;transform:translate(-50%,-50%) rotate(90deg);animation-delay:-6s;opacity:.3}
.lobby::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent calc(50% - 1px),#56d9ff26 50%,transparent calc(50% + 1px)) 0 0/160px 100%,linear-gradient(0deg,transparent calc(50% - 1px),#56d9ff20 50%,transparent calc(50% + 1px)) 0 0/100% 160px;opacity:.45;mask-image:linear-gradient(90deg,#000,transparent 30%,transparent 70%,#000);animation:lobbyGridDrift 28s linear infinite}
.lobby::after{content:"";position:absolute;left:4%;right:4%;top:12%;height:2px;pointer-events:none;background:linear-gradient(90deg,transparent,#55dbff88,transparent);box-shadow:0 0 10px #24bfff55;animation:lobbyScan 14s ease-in-out infinite;opacity:.35}
@keyframes lobbyCircuitFlow{from{background-position:150% 0}to{background-position:-150% 0}}
@keyframes lobbyGridDrift{from{background-position:0 0,0 0}to{background-position:160px 0,0 160px}}
@keyframes lobbyScan{0%,100%{top:12%;opacity:0}15%,85%{opacity:.35}50%{top:88%;opacity:.2}}
@media(prefers-reduced-motion:reduce){.lobby .lb-rings i,.lobby::before,.lobby::after{animation:none!important}.lobby::after{display:none}}

/* Remove the vertically sweeping horizontal line. */
.lobby::after{content:none;display:none;animation:none}

/* Post-practice instructions before the first scored question. */
#cover.main-explanation{gap:14px}
.main-explanation>.lb-head{display:none}
.main-instructions{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,350px);align-items:center;gap:clamp(30px,6vw,100px);width:min(1400px,88%);min-height:0}
.instruction-copy h2{margin:0;font-family:var(--f-quiz);font-size:clamp(30px,6.6vh,78px);font-weight:900;color:#f3faff}
#mainQuestionCount{color:#b1d3ee;font-size:clamp(16px,2.5vh,30px);margin:10px 0 24px}
.instruction-copy ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:clamp(18px,3.3vh,36px)}
.instruction-copy li{display:flex;gap:22px;align-items:flex-start}
.instruction-copy li>b{flex:none;width:clamp(38px,5.7vh,64px);aspect-ratio:1;display:grid;place-items:center;border-radius:10px;border:1px solid #ffeaa0;background:linear-gradient(#ffec9a,#e5b840);color:#14213b;font-size:clamp(20px,3vh,34px);font-family:var(--f-num)}
.instruction-copy strong{font-size:clamp(20px,3.9vh,44px);line-height:1.3}
.instruction-copy li p{color:#b9d7ef;font-size:clamp(14px,2.4vh,27px);line-height:1.5;margin:8px 0 0}
.instruction-note{display:inline-block;margin:28px 0 0;border:1px solid #ffe080;border-radius:8px;padding:10px 16px;color:#ffe080;font-size:clamp(14px,2.5vh,28px);background:#061b3dd9}
.instruction-phone{height:clamp(340px,64vh,680px);border:7px solid #adc7df;border-radius:30px;background:linear-gradient(150deg,#102e58,#04132d);box-shadow:0 0 0 2px #edf8ff,0 0 22px #1ebdff50;padding:20px 14px;box-sizing:border-box;display:flex;flex-direction:column;gap:14px;text-align:center}
.instruction-phone>b{font-size:clamp(18px,2.7vh,30px)}
.instruction-keys{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.instruction-keys span{display:grid;place-items:center;border-radius:14px;font-family:var(--f-num);font-size:clamp(38px,7vh,80px);color:#fff;background:var(--c2)}
.instruction-keys .k1{background:var(--c1)}.instruction-keys .k2{background:var(--c3)}.instruction-keys .k3{background:var(--c4);color:#302200}.instruction-keys .selected{box-shadow:inset 0 0 0 4px #fff,0 0 16px #55ffc580}
.instruction-confirm{background:linear-gradient(#fff2a1,#ffd457);border-radius:8px;padding:13px 6px;color:#14213b;font-size:clamp(16px,2.4vh,26px);font-weight:900}
.instruction-phone small{color:#bbd5eb;font-size:12px;line-height:1.4}
.main-explanation #cvSub{font-size:clamp(14px,2vh,22px);margin:8px 0 0}
@media(max-width:760px){.main-instructions{width:96%;grid-template-columns:1fr;gap:24px}.instruction-phone{width:240px;height:380px;justify-self:center}.instruction-copy h2{font-size:32px}.instruction-copy strong{font-size:21px}.instruction-copy li p{font-size:14px}.instruction-copy ol{gap:18px}#cover.main-explanation{overflow:auto}}

/* Looping phone demonstration synchronized with the three instructions. */
.main-instructions li{opacity:.38;transition:opacity .4s}
.main-instructions[data-demo="1"] li:nth-child(1),.main-instructions[data-demo="2"] li:nth-child(2),.main-instructions[data-demo="3"] li:nth-child(3){opacity:1}
.instruction-phone{position:relative;overflow:hidden}
.instruction-phone .instruction-keys .selected{box-shadow:none}
.main-instructions[data-tap="true"] .instruction-keys .selected{box-shadow:inset 0 0 0 4px #fff,0 0 16px #55ffc580}
.instruction-tap{position:absolute;width:42px;height:42px;box-sizing:border-box;border:3px solid #fff;border-radius:50%;background:#ffffff65;pointer-events:none;opacity:0;z-index:3;left:25%;top:64%}
.main-instructions[data-demo="1"][data-tap="true"] .instruction-tap{opacity:1;animation:demoTap .8s ease-out infinite}
.instruction-selection,.instruction-result{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:14px;background:linear-gradient(#209d72,#096348);gap:16px}
.instruction-selection strong{font-family:var(--f-num);font-size:clamp(80px,18vh,180px)}
.instruction-result strong{font-size:clamp(65px,13vh,140px);line-height:1}.instruction-result b{font-size:30px}.instruction-result small{color:#e2fff0}
.main-instructions[data-demo="2"][data-tap="true"] .instruction-confirm{box-shadow:0 0 0 3px #fff,0 0 20px #ffe77b;transform:scale(.97)}
.main-instructions[data-demo="2"][data-tap="true"] .instruction-tap{left:calc(50% - 21px);top:auto;bottom:57px;opacity:1;animation:demoTap .8s ease-out infinite}
@keyframes demoTap{0%{transform:scale(.8)}70%{transform:scale(1.1)}100%{transform:scale(.8)}}
@media(prefers-reduced-motion:reduce){.main-instructions li{opacity:1}.instruction-tap{display:none}}

/* Readable instructions over the luminous stage; highlight without fading text. */
.instruction-copy{background:linear-gradient(145deg,rgba(4,19,45,.97),rgba(5,24,53,.95));border:1px solid #608bad;border-radius:16px;padding:clamp(20px,3vh,34px);box-shadow:0 8px 30px #0005;box-sizing:border-box}
.instruction-copy h2{font-size:clamp(28px,5.7vh,66px);text-shadow:0 2px 3px #0006}
#mainQuestionCount{color:#c5def1;margin-bottom:20px}
.main-instructions .instruction-copy li{opacity:1;border:1px solid transparent;border-radius:10px;padding:10px 12px;gap:18px;transition:background .35s,border-color .35s,box-shadow .35s}
.instruction-copy ol{gap:clamp(10px,1.8vh,20px)}
.instruction-copy strong{color:#f5f9ff;font-size:clamp(20px,3.5vh,39px)}
.instruction-copy li p{color:#c5daec;font-size:clamp(14px,2.25vh,25px)}
.main-instructions[data-demo="1"] li:nth-child(1),.main-instructions[data-demo="2"] li:nth-child(2),.main-instructions[data-demo="3"] li:nth-child(3){background:#123657;border-color:#70d9ff;box-shadow:inset 3px 0 0 #70d9ff,0 0 14px #28bfff15}
.instruction-note{margin-top:20px;font-size:clamp(14px,2.2vh,24px);background:#0b2341}
@media(max-width:760px){.instruction-copy{padding:16px}.main-instructions .instruction-copy li{padding:8px;gap:12px}.instruction-copy h2{font-size:28px}}

/* Question-number bumper before revealing each question. */
.question-intro{position:fixed;inset:0;z-index:9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:50px;background:radial-gradient(ellipse at center,#103b73dd,#030d26f5),url(stage-cinematic.png) center/cover no-repeat;color:#d8efff;animation:questionIntroIn .35s ease-out;pointer-events:none}
.intro-label{display:flex;align-items:baseline;justify-content:center;gap:clamp(20px,3vw,60px)}
.intro-label span{font-family:var(--f-quiz);font-weight:900;font-size:clamp(44px,12vh,150px)}
.intro-label strong{font-family:var(--f-num);font-weight:700;font-size:clamp(130px,36vh,400px);line-height:1;color:#fff5b2;text-shadow:0 6px 0 #725b22,0 0 35px #35baff60}
.intro-progress{display:flex;gap:12px}.intro-progress i{width:65px;height:9px;border-radius:3px;background:#265481;animation:introProgress 1.8s linear both}.intro-progress i:nth-child(2){animation-delay:.6s;animation-duration:1.2s}.intro-progress i:nth-child(3){animation-delay:1.2s;animation-duration:.6s}
.practice-intro .intro-label span{font-size:clamp(28px,6vh,70px)}
@keyframes introProgress{0%{background:#265481}1%,100%{background:#ffe075;box-shadow:0 0 12px #ffe07560}}
@keyframes questionIntroIn{from{opacity:0;transform:scale(1.025)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.question-intro,.intro-progress i{animation:none}.intro-progress i{background:#ffe075}}
.question-intro .intro-progress i{animation-duration:3s}
.question-intro .intro-progress i:nth-child(2){animation-delay:1s;animation-duration:2s}
.question-intro .intro-progress i:nth-child(3){animation-delay:2s;animation-duration:1s}

/* Moving heartbeat trace across the stage's horizontal neon lines. */
.app.playing{position:relative;isolation:isolate}
.monitor .app.playing::before,.preview .app.playing::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:url(neon-heartbeat.svg),url(neon-heartbeat.svg);background-repeat:no-repeat;background-size:100% 100px,100% 100px;background-position:center calc(7% - 50px),center calc(76.4% - 50px);opacity:.9}
@media(prefers-reduced-motion:reduce){.monitor .app.playing::before,.preview .app.playing::before{display:none}}

/* Upper neon rail: travelling luminous orb; lower rail keeps the heartbeat. */
.monitor .app.playing::before,.preview .app.playing::before{background-image:url(neon-orb.svg),url(neon-heartbeat.svg)}

/* Keep only the upper moving waveform; remove the lower ECG overlay. */
.monitor .app.playing::before,.preview .app.playing::before{background-image:url(neon-orb.svg);background-size:100% 100px;background-position:center calc(7% - 50px)}

/* Clear ranking heading with a quieter secondary time label. */
.rk-tag{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 28px;align-self:stretch;padding:12px 20px;border:1px solid #69bfe9;border-radius:10px;background:linear-gradient(145deg,#092954,#061938);color:#fff0a1;filter:none;text-shadow:0 2px 2px #0005;letter-spacing:.025em;line-height:1.25;font-size:clamp(26px,5.2vh,60px);box-sizing:border-box}
.rk-heading{font-weight:900}
.rk-detail{font-size:.55em;font-weight:700;letter-spacing:.03em;color:#edf7ff;text-shadow:none}
@media(max-width:760px){.rk-tag{padding:10px 12px;gap:6px 16px;font-size:26px}.rk-detail{font-size:16px}}

/* Gentle animated lighting behind the ranking board. */
.rankov{isolation:isolate;overflow:hidden}
.rankov::before{content:"";position:absolute;inset:-15%;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 20% 25%,#a4f3ff40,transparent 48%),radial-gradient(ellipse at 80% 75%,#546bff55,transparent 45%);animation:rankAmbientDrift 18s ease-in-out infinite alternate}
.rankov::after{content:"";position:absolute;inset:-8%;z-index:-1;pointer-events:none;background:radial-gradient(circle at 12% 23%,#e7fbff 0 1.5px,transparent 3px),radial-gradient(circle at 32% 68%,#b3edff 0 1px,transparent 3px),radial-gradient(circle at 68% 35%,#fff 0 1px,transparent 2.5px),radial-gradient(circle at 84% 72%,#d2f6ff 0 1.5px,transparent 3px),radial-gradient(circle at 58% 85%,#a6deff 0 1px,transparent 3px);animation:rankParticleDrift 22s ease-in-out infinite alternate;opacity:.65}
@keyframes rankAmbientDrift{from{transform:translate(-3%,-2%) scale(1);opacity:.5}to{transform:translate(5%,3%) scale(1.12);opacity:.9}}
@keyframes rankParticleDrift{from{transform:translateY(3%);opacity:.35}to{transform:translateY(-5%);opacity:.8}}
@media(prefers-reduced-motion:reduce){.rankov::before,.rankov::after{animation:none}}

/* Larger, faster floating particles on the results background. */
.rankov::after{background:radial-gradient(circle at 12% 23%,#e7fbff 0 3px,#b7f2ff70 4px,transparent 7px),radial-gradient(circle at 32% 68%,#b3edff 0 2.5px,#b3edff50 4px,transparent 6px),radial-gradient(circle at 68% 35%,#fff 0 2.5px,#d0f8ff60 4px,transparent 6px),radial-gradient(circle at 84% 72%,#d2f6ff 0 3px,#b7f2ff70 4px,transparent 7px),radial-gradient(circle at 58% 85%,#a6deff 0 2.5px,#a6deff50 4px,transparent 6px);animation-duration:12s}

/* Visible diagonal neon streaks replace the subtle floating particles. */
.rankov::after{inset:-50%;background:repeating-linear-gradient(135deg,transparent 0 180px,#86efff00 180px,#a9f4ff70 182px,#e1fcffb0 184px,#78dfff30 186px,transparent 190px,transparent 360px);background-size:510px 510px;opacity:.35;transform:none;animation:rankNeonStream 6s linear infinite;mask-image:linear-gradient(90deg,#000,rgba(0,0,0,.35) 35%,rgba(0,0,0,.35) 65%,#000)}
@keyframes rankNeonStream{from{background-position:0 0}to{background-position:510px 0}}
@media(prefers-reduced-motion:reduce){.rankov::after{animation:none;opacity:.2}}

/* Futuristic results console with rotating polygon circuits. */
.rankov{background:radial-gradient(ellipse at 50% 0,#123968 0%,#071d3d 50%,#020c23 100%)}
.rankov::before{inset:0;background:radial-gradient(ellipse at 50% 25%,#1c7fbd22,transparent 65%);animation:none;transform:none;opacity:1}
.rankov::after{inset:0;background:url(ranking-circuit.svg) center/cover no-repeat;animation:none;transform:none;mask-image:none;opacity:1}
.rk-tag{border-color:#83b5d3;box-shadow:inset 0 2px 0 #e4f4ff25,0 0 14px #19baff20;background:linear-gradient(150deg,#103459,#04132d)}
.rk-row{border:2px solid #a4bed6;border-radius:8px;background:linear-gradient(160deg,#123963,#081d3c);box-shadow:inset 0 1px 0 #f0faff30,0 0 0 1px #315c7e,0 3px 10px #0004;color:#f4faff}
.rk-n{background:linear-gradient(180deg,#225981,#0b2b4c);border-right:1px solid #6794b4;color:#d7f4ff;text-shadow:none}
.rk-name,.rk-t{text-shadow:none}.rk-t{color:#b5e9ff}
.rk-c{background:linear-gradient(180deg,#e9f8ff,#adcce2);color:#092844;box-shadow:inset 0 1px 0 #fff;border-radius:5px}
.rk-row.r1{background:linear-gradient(145deg,#254465,#102743);border-color:#ffe18a;color:#fff1bd;box-shadow:inset 0 1px 0 #fff3bd55,0 0 0 1px #8f7331,0 0 20px #ffd15830}
.rk-row.r1 .rk-n{background:linear-gradient(180deg,#fff0a2,#eac357);color:#13233b;border-right:1px solid #fff0a0}
.rk-row.r1 .rk-c{background:linear-gradient(180deg,#fff5c4,#edcf79);color:#253347}.rk-row.r1 .rk-t{color:#fff1bd}
.rk-side{border:2px solid #aec6dc;border-radius:10px;background:linear-gradient(145deg,#123963,#061831);box-shadow:inset 0 2px 0 #fff4,0 0 18px #00aaff20}
.rk-title{color:#e7f6ff;text-shadow:0 0 12px #55cfff30;letter-spacing:.05em}
.rk-empty{color:#d3e9fa;text-shadow:0 2px 3px #0005}
@media(prefers-reduced-motion:reduce){.rankov::after{background:none}}

/* Wait for an explicit start on the question-number screen. */
.question-intro{pointer-events:auto;cursor:pointer}
.intro-start-hint{font-size:clamp(16px,2.4vh,26px);color:#c1e5fa;margin:0}
.question-intro .intro-progress i{animation:none;background:#4591b7;box-shadow:none}
.monitor .intro-start-hint{display:none}.monitor .question-intro{cursor:none}
.question-intro.counting-intro #introPrefix,.question-intro.counting-intro #introSuffix,.question-intro.counting-intro .intro-start-hint{display:none}
.question-intro.counting-intro{cursor:default}

/* Three-second progress dots, while keeping the question number visible. */
.question-intro.counting-intro #introPrefix,.question-intro.counting-intro #introSuffix{display:block}
.question-intro.counting-intro .intro-progress i{animation:introProgress 3s linear both}
.question-intro.counting-intro .intro-progress i:nth-child(2){animation-delay:1s;animation-duration:2s}
.question-intro.counting-intro .intro-progress i:nth-child(3){animation-delay:2s;animation-duration:1s}
@media(prefers-reduced-motion:reduce){.question-intro.counting-intro .intro-progress i{animation:none;background:#ffe075}}

/* Preserve layout when the start hint is hidden during the countdown. */
.question-intro.counting-intro .intro-start-hint{display:block;visibility:hidden}
.monitor .question-intro.counting-intro .intro-start-hint{display:none}

/* A gold champion reveal reserved for the overall winner. */
.champion-revealed .rk-row.r1{position:relative;background:linear-gradient(110deg,#8d6217,#e0ad3d 24%,#fff0a7 50%,#d7a030 78%,#8d6217);border:2px solid #fff2bd;color:#18243a;box-shadow:0 0 0 2px #ac7f26,0 0 24px #ffd46b80,inset 0 2px 0 #fff9dc}
.champion-revealed .rk-row.r1 .rk-n{position:relative;background:linear-gradient(#fff6ca,#f4cb68);color:#493311;gap:.12em;border-right-color:#c29234}
.champion-revealed .rk-row.r1 .rk-n::before{content:"♛";font-size:.65em;color:#80601f}
.champion-revealed .rk-row.r1 .rk-name{color:#122139;text-shadow:0 1px 0 #fff7d5;font-weight:900}
.champion-revealed .rk-row.r1 .rk-c{background:#fff9df;color:#24324a;box-shadow:0 0 0 1px #c1973a}
.champion-revealed .rk-row.r1 .rk-t{color:#192943}
.champion-revealed .rk-tag{border-color:#ffe28a;box-shadow:0 0 22px #ffcf5440,inset 0 1px 0 #fff5b940}
.champion-revealed .rk-tag::after{content:"優勝";font-size:.45em;color:#19243b;background:linear-gradient(#fff3b3,#eac05a);border-radius:5px;padding:.35em .8em;letter-spacing:.15em}
.champion-confetti{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden}
.champion-confetti i{position:absolute;left:var(--x);top:-20px;width:7px;height:14px;background:#ffe192;box-shadow:0 0 4px #ffd35460;animation:championConfettiFall 4.6s var(--delay) ease-out both}
.champion-confetti i:nth-child(3n){background:#bfefff;width:5px;height:10px}.champion-confetti i:nth-child(4n){background:#fff8dc}
@keyframes championConfettiFall{0%{transform:translate(0,0) rotate(0);opacity:0}10%{opacity:.85}80%{opacity:.7}100%{transform:translate(var(--drift),110vh) rotate(var(--turn));opacity:0}}
@media(prefers-reduced-motion:reduce){.champion-confetti{display:none}}

/* Keep the winner's number centered; float the crown independently. */
.champion-revealed .rk-row.r1{overflow:visible;z-index:3}
.champion-revealed .rk-row.r1 .rk-n{justify-content:center;gap:0;border-radius:6px 0 0 6px}
.champion-revealed .rk-row.r1 .rk-n::before{position:absolute;left:-.12em;top:-.55em;font-size:1.35em;line-height:1;transform:rotate(-22deg);transform-origin:center;color:#ffdf78;text-shadow:1px 2px 0 #90621c,0 0 6px #ffe9a180;pointer-events:none;z-index:2}

/* Illustrated velvet-and-gold crown replaces the text symbol. */
.champion-revealed .rk-row.r1 .rk-n::before{content:"";width:1.8em;height:1.8em;left:-.32em;top:-.85em;font-size:1em;background:url(winner-crown-neon.png) center/contain no-repeat;transform:rotate(-20deg);text-shadow:none;filter:drop-shadow(0 2px 2px #5c3a2060)}

/* Keep the illustrated crown clear of the centered rank number. */
.champion-revealed .rk-row.r1 .rk-n::before{left:-.7em;top:-1.5em;width:1.5em;height:1.5em;transform:rotate(-20deg)}

/* Remove the winner badge beside the results heading. */
.champion-revealed .rk-tag::after{content:none;display:none}

/* Bring the crown closer to rank one while keeping the numeral clear. */
.champion-revealed .rk-row.r1 .rk-n::before{left:-.5em;top:-1.22em}

/* Move the crown down another 5 mm. */
.champion-revealed .rk-row.r1 .rk-n::before{top:calc(-1.22em + 5mm)}

/* Strengthen the winner's score and time on the gold background. */
.champion-revealed .rk-row.r1 .rk-c{font-size:1.12em;font-weight:700;line-height:1.15;color:#10213a}
.champion-revealed .rk-row.r1 .rk-t{font-size:1.08em;font-weight:700;line-height:1.15;color:#10213a}
.champion-revealed .rk-row.r1 .rk-c small,.champion-revealed .rk-row.r1 .rk-t small{font-size:.55em;font-weight:900}

/* Match score and time metrics exactly across all ranks. */
.champion-revealed .rk-row.r1 .rk-c{font-size:1.05em;font-weight:700;line-height:1.15;margin:0 .3em;padding:.02em .28em;align-self:center;align-items:baseline;justify-content:center;gap:.05em}
.champion-revealed .rk-row.r1 .rk-t{font-size:1em;font-weight:700;line-height:1.15;padding:0 .5em 0 .2em;align-self:center;align-items:baseline;justify-content:flex-end;gap:.04em}

/* One shared score/time layout for every rank, including the champion. */
.rk-row,.champion-revealed .rk-row.r1{grid-template-columns:3.4em minmax(0,1fr) 3.2em 6.6em}
.rk-row .rk-c,.champion-revealed .rk-row.r1 .rk-c{font-size:1.05em;font-weight:700;line-height:1.15;min-width:2.25em;box-sizing:border-box;justify-self:center;margin:0;padding:.02em .28em;gap:.05em}
.rk-row .rk-t,.champion-revealed .rk-row.r1 .rk-t{font-size:1.05em;font-weight:700;line-height:1.15;box-sizing:border-box;padding:0 .5em 0 .2em;gap:.04em}
.rk-row .rk-c small,.rk-row .rk-t small,.champion-revealed .rk-row.r1 .rk-c small,.champion-revealed .rk-row.r1 .rk-t small{font-size:.55em;font-weight:900}
@media(max-width:760px){.rk-row,.champion-revealed .rk-row.r1{grid-template-columns:2.6em minmax(0,1fr) 3.2em 5.4em}}

/* Same frame geometry for first place; retain the crown outside the row. */
.rk-row.r1,.champion-revealed .rk-row.r1{border-width:2px;border-radius:8px;box-shadow:inset 0 1px 0 #fff4,0 3px 10px #0004}
.champion-revealed .rk-row.r1 .rk-n{border-radius:6px 0 0 6px;background-clip:padding-box}

/* Fixed digit widths and identical alignment across every results row. */
.rk-row .rk-t,.champion-revealed .rk-row.r1 .rk-t{display:flex;font-size:1.05em;align-items:baseline;justify-content:flex-end;gap:.04em;font-family:var(--f-num);font-weight:700;letter-spacing:0}
.rk-time-digits{display:inline-flex;flex:none;font:inherit;line-height:inherit}
.rk-time-digits>span{display:inline-block;width:.55em;text-align:center;font:inherit;line-height:inherit}
.rk-row .rk-c,.champion-revealed .rk-row.r1 .rk-c{height:1.23em;align-items:center;padding:0 .28em;line-height:1;font-family:var(--f-num);font-weight:700}
.rk-row .rk-c small,.champion-revealed .rk-row.r1 .rk-c small{align-self:center;line-height:1;margin-top:.25em}

/* Optical size compensation for dark numerals on the gold winner row. */
.champion-revealed .rk-row.r1 .rk-c,.champion-revealed .rk-row.r1 .rk-t{font-size:1.11em}

/* Optical compensation for the champion's rank numeral and name. */
.champion-revealed .rk-row.r1 .rk-n{font-size:1.216em}
.champion-revealed .rk-row.r1 .rk-name{font-size:1.06em}
.champion-revealed .rk-row.r1 .rk-n::before{font-size:.946em}

/* Keep enlarged champion lettering inside the same alignment slots. */
.champion-revealed .rk-row.r1 .rk-name{padding-left:calc(.5em / 1.06);padding-right:calc(.5em / 1.06)}
.champion-revealed .rk-row.r1 .rk-c{width:calc(2.25em * 1.05 / 1.11);min-width:0;padding-left:calc(.28em * 1.05 / 1.11);padding-right:calc(.28em * 1.05 / 1.11);height:calc(1.23em * 1.05 / 1.11)}
.champion-revealed .rk-row.r1 .rk-t{padding-right:calc(.5em * 1.05 / 1.11);padding-left:calc(.2em * 1.05 / 1.11);gap:calc(.04em * 1.05 / 1.11)}
.champion-revealed .rk-row.r1 .rk-time-digits>span{width:calc(.55em * 1.05 / 1.11)}
.champion-revealed .rk-row.r1 .rk-t small{margin-left:calc(.06em * 1.05 / 1.11);margin-right:calc(.06em * 1.05 / 1.11)}
.rk-row .rk-c{width:2.5em}
.champion-revealed .rk-row.r1 .rk-c{width:calc(2.5em * 1.05 / 1.11)}

/* Match every character position in the winner's name to the other rows. */
.champion-revealed .rk-row.r1 .rk-name{font-size:1em;padding:0 .5em;letter-spacing:normal}

/* Align the score numeral and its unit along their lower text edge. */
.rk-row .rk-c,.champion-revealed .rk-row.r1 .rk-c{align-items:baseline;line-height:1;padding-top:.1em;padding-bottom:.1em;height:auto}
.rk-row .rk-c small,.champion-revealed .rk-row.r1 .rk-c small{align-self:auto;margin-top:0;line-height:1}

/* Compensate for the Japanese unit's lower font baseline. */
.rk-row .rk-c small,.champion-revealed .rk-row.r1 .rk-c small{position:relative;top:-.16em}

/* Opening title: layered gold lettering and an illuminated studio emblem. */
#title>div::before{top:-5%;width:118%;height:calc(clamp(64px,20vh,220px) * 2.55);background:url(title-emblem.svg) center/100% 100% no-repeat;clip-path:none;filter:drop-shadow(0 0 10px #38bfff80)}
#title>div::after{display:none}
#title h1{font-family:"Dela Gothic One","Noto Sans JP","Yu Gothic",sans-serif;font-weight:400;letter-spacing:-.055em;line-height:1.08;background:linear-gradient(180deg,#fffde0 0%,#fff7a1 18%,#ffe365 37%,#ffc900 55%,#e5a400 66%,#ffe45c 83%,#fff6b0 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-stroke:1.5px #fff4bc;filter:drop-shadow(0 3px 0 #c28c1c) drop-shadow(1px 5px 0 #a76b0d) drop-shadow(2px 8px 0 #573600) drop-shadow(0 6px 0 #061344) drop-shadow(3px 0 0 #09215d) drop-shadow(-3px 0 0 #09215d) drop-shadow(0 0 5px #38a9ff) drop-shadow(0 8px 12px #0009)}
#title #tSub{width:91%;margin-top:12px;font-size:clamp(14px,3.1vh,34px);padding:.5em 2em;filter:drop-shadow(0 0 5px #e4f8ff80) drop-shadow(0 0 12px #00baff)}
#title .joinbox{width:106%;margin-top:clamp(18px,3vh,32px);filter:drop-shadow(0 0 5px #ecf8ff60) drop-shadow(0 0 15px #22bdff80)}
#title .joinbox::before{background:linear-gradient(165deg,#0b2c86,#010a34 70%,#071d59);box-shadow:inset 0 0 26px #117be480}
@media(max-width:760px){#title>div::before{width:105%;height:calc(clamp(48px,13vw,100px) * 2.55)}#title h1{-webkit-text-stroke:.7px #fff4bc}#title .joinbox{width:95%}#title #tSub{width:95%}}
@media(max-height:580px) and (min-width:761px){#title>div::before{height:46vh}}

/* Refine the opening title's weight, gold faces, and centered proportions. */
#title>div{width:min(1080px,78vw)}
#title>div::before{width:108%;top:-3%;height:calc(clamp(64px,20vh,220px) * 2.48)}
#title h1{font-family:"Noto Sans JP","Yu Gothic",sans-serif;font-weight:900;letter-spacing:-.06em;line-height:1.02;padding-bottom:.14em;background:linear-gradient(180deg,#fffbd1 0%,#fff39b 18%,#ffe365 48%,#ffc800 75%,#fff19a 100%);background-size:100% 50%;background-repeat:repeat-y;background-clip:text;-webkit-background-clip:text;-webkit-text-stroke:1.5px #fff4b1;filter:drop-shadow(0 3px 0 #d59b22) drop-shadow(2px 5px 0 #9f690c) drop-shadow(0 7px 0 #03103a) drop-shadow(3px 0 0 #062568) drop-shadow(-3px 0 0 #062568) drop-shadow(0 0 8px #36baff80)}
#title #tSub{width:90%;margin-top:16px;padding:.42em 1.8em}
#title .joinbox{width:102%;gap:clamp(20px,2.5vw,40px);padding:clamp(18px,2.6vh,28px);margin-top:clamp(18px,2.8vh,30px)}
#title .joinbox .jtext{font-size:clamp(14px,2.4vh,25px);line-height:1.5;gap:12px}
#title .joinbox .jtext b{font-size:clamp(21px,3.7vh,38px)}
#title .joinbox .jtext .jurl{font-size:.85em;line-height:1.5}
#title .joinbox .qr{width:clamp(108px,22vh,230px);height:clamp(108px,22vh,230px)}
@media(max-width:760px){#title>div{width:96vw}#title>div::before{width:105%;height:calc(clamp(48px,13vw,100px) * 2.55)}#title .joinbox{width:95%;padding:18px;gap:15px}#title .joinbox .qr{width:90px;height:90px}#title .joinbox .jtext{font-size:11px;gap:5px}#title .joinbox .jtext b{font-size:17px}}
@media(max-height:580px) and (min-width:761px){#title>div::before{height:45vh}}

/* Selected neon arena backdrop for the opening title. */
#title.splash{background:#031039 url(title-stage-arena.png) center/cover no-repeat}

/* Show the title directly over the selected stage image. */
#title>div::before,#title>div::after{content:none;display:none}

/* Match the reference's centered title / subtitle / invitation proportions. */
#title.splash{display:flex;align-items:center;justify-content:flex-start;flex-direction:column;padding:15vh 20px 4vh;overflow:hidden}
#title>div{width:min(1000px,50vw);flex:none}
#title h1{font-size:min(18.5vh,12vw);line-height:1.06;letter-spacing:-.055em;padding:0 .03em .04em;margin:0;white-space:nowrap}
#title #tSub{width:86%;font-size:clamp(14px,3.2vh,34px);margin-top:2vh;padding:.45em 1.4em;letter-spacing:0;white-space:nowrap}
#title .joinbox{width:100%;margin-top:2.5vh;padding:clamp(16px,2.7vh,28px);gap:clamp(18px,2vw,35px);text-align:left}
#title .joinbox .qr{width:22vh;height:22vh;max-width:26%;max-height:none;aspect-ratio:1;padding:9px}
#title .joinbox .jtext{font-size:clamp(12px,2.15vh,23px);gap:9px;line-height:1.45}
#title .joinbox .jtext b{font-size:clamp(18px,3.3vh,36px)}
#title .joinbox .jtext .jurl{font-size:1em;line-height:1.45}
@media(max-width:760px){#title.splash{padding:12vh 8px 20px}#title>div{width:92vw}#title h1{font-size:clamp(45px,18vw,100px)}#title #tSub{width:95%;font-size:clamp(11px,2.8vw,18px);white-space:normal}#title .joinbox{width:100%;padding:16px;gap:14px}#title .joinbox .qr{width:90px;height:90px;max-width:none}#title .joinbox .jtext{font-size:11px;gap:6px}#title .joinbox .jtext b{font-size:17px}}

/* Latest user-selected opening backdrop. */
#title.splash{background:#031039 url(title-stage-neon-v2.png) center/cover no-repeat}

/* Lower the subtitle and invitation together, keeping the title in place. */
#title #tSub{margin-top:4vh}

/* Remove the cross-shaped sparkle beside the title. */
#title h1::after{content:none;display:none}

/* Match the title banners to the quiz board's polished silver frame. */
#title #tSub,#title .joinbox{background:linear-gradient(180deg,#ffffff 0%,#f4f7ff 10%,#c3cde0 24%,#ffffff 38%,#eef2fa 44%,#7d8aa4 54%,#aab6cc 62%,#ffffff 78%,#dfe6f3 88%,#9aa7bf 100%);filter:drop-shadow(0 0 2px #ffffffa0) drop-shadow(0 0 9px #78beff80) drop-shadow(0 4px 8px #00142b80)}
#title #tSub::before{inset:5px 8px;box-shadow:inset 0 2px 0 #98caff50,inset 0 -2px 0 #020b30}
#title .joinbox::before{inset:7px;box-shadow:inset 0 2px 0 #98caff50,inset 0 -2px 0 #020b30,inset 0 0 20px #117be450}

/* Polished gold faces with a deeper extruded edge on the opening title. */
#title h1{background:linear-gradient(180deg,#fffef0 0%,#fff9c8 10%,#ffe985 21%,#ffd33d 34%,#d49306 46%,#fff8c4 49%,#fff0a0 54%,#ffd540 66%,#df9e0c 81%,#ffea83 92%,#fffbd5 100%);background-size:100% 50%;background-repeat:repeat-y;background-clip:text;-webkit-background-clip:text;-webkit-text-stroke:1.2px #fff0b0;filter:drop-shadow(0 2px 0 #f0bb3b) drop-shadow(1px 3px 0 #bd8315) drop-shadow(1px 3px 0 #9b620c) drop-shadow(1px 3px 0 #744606) drop-shadow(1px 3px 0 #432900) drop-shadow(0 3px 0 #031333) drop-shadow(2px 0 0 #08245a) drop-shadow(-2px 0 0 #08245a) drop-shadow(0 0 7px #159bff60) drop-shadow(0 9px 8px #0006)}

/* Finish screen follows the polished opening-title design. */
#end.splash{background:#031039 url(title-stage-neon-v2.png) center/cover no-repeat;padding:30px 20px}
#end>div{width:min(1450px,88vw);gap:0}
#end>div::before,#end>div::after,#end h1::after{content:none;display:none}
#end h1{font-size:min(17vh,15vw);font-family:"Noto Sans JP","Yu Gothic",sans-serif;font-weight:900;letter-spacing:-.045em;line-height:1.15;padding:0 .05em .1em;white-space:nowrap;background:linear-gradient(180deg,#fffef0 0%,#fff9c8 10%,#ffe985 21%,#ffd33d 34%,#d49306 46%,#fff8c4 49%,#fff0a0 54%,#ffd540 66%,#df9e0c 81%,#ffea83 92%,#fffbd5 100%);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-stroke:1.2px #fff0b0;filter:drop-shadow(0 2px 0 #f0bb3b) drop-shadow(1px 3px 0 #bd8315) drop-shadow(1px 3px 0 #9b620c) drop-shadow(1px 3px 0 #744606) drop-shadow(1px 3px 0 #432900) drop-shadow(0 3px 0 #031333) drop-shadow(0 0 8px #159bff60)}
#end #endStats{color:#f4f9ff;font-family:var(--f-quiz);font-weight:900;font-size:clamp(20px,3.4vh,40px);line-height:1.5;margin:24px 0 0;padding:14px 32px;border:2px solid #bbd1e4;border-radius:10px;background:linear-gradient(145deg,#103265ef,#030f32f5);box-shadow:inset 0 2px 0 #ffffff40,0 0 18px #36baff45;text-shadow:0 2px 2px #0005}
#end .row{margin-top:30px}
@media(max-width:760px){#end h1{font-size:15vw}#end #endStats{font-size:18px;padding:12px 18px}}

/* Tighten the full-width exclamation mark's left side bearing. */
#end h1 .end-exclamation{display:inline;margin-left:-.24em}

/* Fit the opening content to the space remaining beneath the toolbar. */
#title.splash{min-height:0;container-type:size;padding:0 20px;justify-content:center;overflow:hidden}
#title h1{font-size:min(18cqh,12vw);line-height:1.04}
#title #tSub{margin-top:2.2cqh;font-size:clamp(13px,3cqh,32px);padding:.4em 1.4em}
#title .joinbox{margin-top:2.2cqh;padding:clamp(12px,2.2cqh,24px);gap:clamp(16px,2vw,32px)}
#title .joinbox .qr{width:19cqh;height:19cqh;max-width:26%}
#title .joinbox .jtext{font-size:clamp(12px,2.1cqh,22px);gap:7px;line-height:1.4}
#title .joinbox .jtext b{font-size:clamp(18px,3.1cqh,32px)}
#title>div>p.hint{align-self:center;margin:14px 0 0!important;padding:9px 16px;background:#03132eee;color:#e7f5ff;border:1px solid #6193b6;border-radius:7px;font-size:13px;line-height:1.6;text-shadow:none;box-shadow:0 2px 8px #0004}
#title>div>p.hint .kbd{background:#193a60;color:#fff;border-color:#7ab5d7}
@media(max-width:760px){#title.splash{overflow-y:auto;justify-content:flex-start;padding:24px 8px;container-type:normal}#title h1{font-size:clamp(40px,15vw,86px)}#title #tSub{font-size:12px;margin-top:16px}#title .joinbox{margin-top:16px}#title .joinbox .qr{width:84px;height:84px;max-width:none}#title .joinbox .jtext{font-size:11px}#title .joinbox .jtext b{font-size:17px}#title>div>p.hint{font-size:11px}}

/* Leave comfortable space below the presenter navigation controls. */
.lb-ctrl{bottom:24px;left:24px;right:24px;border-radius:10px;padding:12px 18px;background:#03132ee8;border:1px solid #315b7b;box-sizing:border-box}
@media(max-width:760px){.lb-ctrl{bottom:16px;left:10px;right:10px;gap:8px;flex-wrap:wrap}}

/* Lower the closing message group away from the backdrop's gold lights. */
#end>div{transform:translateY(5vh)}
@media(max-height:580px){#end>div{transform:translateY(3vh)}}

/* Give the closing title's thick lettering more breathing room. */
#end h1{letter-spacing:.025em;font-size:min(16vh,14vw)}
#end h1 .end-exclamation{margin-left:-.24em}

/* Tighten only the gap between 終 and 了 in the closing title. */
#end h1 .end-last-char{margin-left:-.05em}

/* Smartphone participant UI: matching navy, silver and cyan styling. */
html.player body{background:radial-gradient(ellipse at 50% 0,#15427b,#04112a 65%);color:#edf6ff}
.pl{padding-bottom:28px;gap:16px}
.pl-head{background:linear-gradient(#12345f,#07182f);border-bottom:1px solid #65cfff;box-shadow:0 3px 15px #00aaff20}
.pl-no{color:#e5f6ff;font-weight:900;font-size:19px}.pl-me{color:#bde5fa;font-size:13px}
.pl-join{margin-top:5vh;border:1px solid #a6bfd4;border-radius:16px;background:linear-gradient(145deg,#123355,#071a32);box-shadow:inset 0 2px 0 #ffffff30,0 0 22px #1eb9ff15;padding:26px 20px}
.pl-brand{color:#fff1a2;font-weight:900;font-size:26px;line-height:1.4}.pl-join label{color:#c7e1f4}
.pl-join input{background:#031126;color:#fff;border:1px solid #517b9d;border-radius:9px;font-size:18px}.pl-join input:focus{border-color:#73dcff;outline:2px solid #73dcff30}.pl-join input::placeholder{color:#7b9cb8}
.pl-note{color:#a9c8df;font-size:12px}
.pl-qcard{background:linear-gradient(#fff,#edf5fc);border:2px solid #aec5db;border-radius:12px;box-shadow:0 3px 12px #0004}
.pl-tag{background:linear-gradient(#2874bd,#124377);border:1px solid #81bcdf;border-radius:6px}.pl-sec{border:2px solid #d8e7f4;background:radial-gradient(circle at 30% 20%,#ff8193,#dd1535 65%)}
.pl-guide{color:#c8e4f7;font-size:14px}
.pkey{background:linear-gradient(145deg,#173c67,#09223f);border:1px solid #7299b9;border-radius:12px;color:#f5fbff;box-shadow:inset 0 1px 0 #ffffff30,0 4px 0 #021026;min-height:clamp(100px,16vh,145px)}
.pkey b{width:1.35em;height:1.35em;font-size:44px;border:2px solid #ffffffcc;box-shadow:0 3px 7px #0004}.pkey span{color:#dfedfa;font-weight:700}
.pkey.sel{border-color:#96edff;box-shadow:0 0 0 2px #6fe3ff,0 0 16px #18bdff40;background:linear-gradient(145deg,#205381,#0d3355)}
.pkey:disabled{opacity:.45}.pkey:active:not(:disabled){box-shadow:0 1px 0 #021026;transform:translateY(2px)}
.pl-pick{background:#0c2b49;color:#eff8ff;border:1px solid #7de1ff;border-radius:12px;padding:12px}.pl-picknum{font-size:48px}.pl-picktxt{font-size:16px}
.pl-ok{color:#17243b;background:linear-gradient(#fff1ab,#ffdc68 55%,#e6b62e);border:1px solid #ffefba;border-radius:10px;box-shadow:0 3px 0 #8a6718;font-size:18px;padding:15px;min-height:52px}
.pl-ok:active{box-shadow:0 1px 0 #8a6718}.pl-redo{background:#0a2543;border:1px solid #527a9a;color:#c6e1f3;border-radius:10px}
.pl-res{background:linear-gradient(#fff,#edf5fc);border:2px solid #adc7db;border-radius:12px}.pl-res .big.ok{color:#07976b}.pl-res .big.ng{color:#4b6077}
.pl-host{color:#92b4ce}

/* Anchor the gap between 問 and 終 to the exact horizontal screen center. */
#end h1{display:grid;grid-template-columns:1fr 1fr;width:100%;box-sizing:border-box;padding-left:0;padding-right:0;text-align:left;column-gap:0}
#end h1 .end-title-left{justify-self:end}
#end h1 .end-title-right{justify-self:start}

/* Optically center the gold title including its rightward extrusion. */
#title h1{transform:translateX(-.045em)}

/* Give the opening title's extruded letters consistent breathing room. */
#title h1{letter-spacing:-.015em}

/* Balanced editor columns with roomier side panels and consistent gutters. */
.studio{grid-template-columns:clamp(260px,18vw,350px) minmax(0,1fr) clamp(280px,18vw,350px);gap:24px;padding:22px 24px}
.st-list,.st-side{padding:20px 18px}
.st-list{gap:14px}.st-side{gap:18px}
.st-item{padding:11px 9px;gap:10px}
.st-main{padding:0 0 28px;gap:14px}
.st-main>*{max-width:none;width:100%;box-sizing:border-box}
.st-side .phone{width:min(220px,100%)}
.st-side .monhow,.st-side .joinbox{padding:16px}
@media(min-width:1800px){.studio{grid-template-columns:350px minmax(0,1fr) 340px;gap:28px;padding:24px 28px}}
@media(max-width:1400px) and (min-width:1181px){.studio{grid-template-columns:250px minmax(0,1fr) 260px;gap:18px;padding:18px}.st-list,.st-side{padding:16px 12px}.st-item{gap:8px;padding:9px 6px}}
@media(max-width:1180px) and (min-width:761px){.studio{grid-template-columns:260px minmax(0,1fr);gap:20px;padding:18px}.st-side{display:none}.st-list{padding:18px 14px}}
@media(max-width:760px){.studio{grid-template-columns:1fr;gap:16px;padding:12px}.st-list{padding:14px;max-height:260px}.st-item{padding:9px 7px}.st-side{display:none}}



/* Native scrollbars with clearance from the frames in all editor columns. */
.st-main,.st-list,.st-side{scrollbar-width:auto;scrollbar-color:auto;scrollbar-gutter:stable}
.st-main{padding-right:18px}
.st-list,.st-side{padding-right:24px}
@media(max-width:1400px){.st-list,.st-side{padding-right:18px}}
@media(max-width:760px){.st-main{padding-right:12px}.st-list{padding-right:18px}}
.st-list,.st-side{overflow:hidden;scrollbar-gutter:auto}
.st-panel-scroll{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:12px;scrollbar-gutter:stable;box-sizing:border-box}
.st-side .st-panel-scroll{gap:18px}

/* Side-panel frames stop before the native scrollbars, which sit outside. */
.st-list,.st-side{position:relative;isolation:isolate;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;scrollbar-gutter:auto}
.st-list::before,.st-side::before{content:"";position:absolute;inset:0 24px 0 0;z-index:-1;pointer-events:none;border:1px solid #89b0d2;border-radius:12px;background:linear-gradient(150deg,#0c2856ee,#030d28f5);box-shadow:inset 0 0 0 3px #102a4b,inset 0 4px 0 #d3e9fa40,0 0 18px #1197fa20}
.st-list>.st-panel-scroll,.st-side>.st-panel-scroll{padding:20px 38px 20px 18px;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;min-height:0;width:100%;box-sizing:border-box}
@media(max-width:1400px){.st-list>.st-panel-scroll,.st-side>.st-panel-scroll{padding:16px 34px 16px 12px}}
@media(max-width:760px){.st-list>.st-panel-scroll{padding:14px 34px 14px 14px}}

/* Same 24px outer clearance, accounting for the native scrollbar itself. */
.st-main{padding-right:max(0px,calc(24px - var(--native-scrollbar-width,17px)))}

/* Trick reveals keep wording readable; dim only wrong number/count markers. */
.p4.revealed .pgrid.list.trick-question .cell:not(.correct){opacity:1;filter:none}
.p4.revealed .pgrid.list.trick-question .cell:not(.correct) .num{filter:brightness(.4) saturate(.7)}
.p4.revealed .pgrid.list.trick-question .cell:not(.correct) .votes{filter:brightness(.45) saturate(.6)}
.pv-list.trick-question:has(.pv-bar.ok) .pv-bar:not(.ok){opacity:1;filter:none}
.pv-list.trick-question:has(.pv-bar.ok) .pv-bar:not(.ok) .pv-n{filter:brightness(.4) saturate(.7)}

/* Original asterisk emphasis, consistent in monitor and editor preview. */
.ph.tx .t em,.pv-t em{font-style:normal;color:#ff1f1f;text-shadow:0 0 0 #ffe600,2px 2px 0 #ffe600,-2px 2px 0 #ffe600,2px -2px 0 #ffe600,-2px -2px 0 #ffe600,0 0 10px rgba(255,230,0,.8)}

/* Never expose the next question beneath a fading number screen. */
.question-intro{animation:none!important;opacity:1}
.question-intro-active #play{visibility:hidden}

/* Rounded scrollbar ends while retaining the familiar gray appearance. */
.st-main,.st-panel-scroll{scrollbar-width:auto;scrollbar-color:auto}
.st-main::-webkit-scrollbar,.st-panel-scroll::-webkit-scrollbar{width:16px}
.st-main::-webkit-scrollbar-track,.st-panel-scroll::-webkit-scrollbar-track{background:#292929;border-radius:10px}
.st-main::-webkit-scrollbar-thumb,.st-panel-scroll::-webkit-scrollbar-thumb{background:#a6a6a6;border:4px solid #292929;border-radius:12px}
.st-main::-webkit-scrollbar-thumb:hover,.st-panel-scroll::-webkit-scrollbar-thumb:hover{background:#b8b8b8}
.st-main::-webkit-scrollbar-button,.st-panel-scroll::-webkit-scrollbar-button{display:block;height:16px;background-color:#292929;background-repeat:no-repeat;background-position:center;background-size:8px 6px}
.st-main::-webkit-scrollbar-corner,.st-panel-scroll::-webkit-scrollbar-corner{background:transparent}
.st-main::-webkit-scrollbar-button:vertical:decrement,.st-panel-scroll::-webkit-scrollbar-button:vertical:decrement{border-radius:9px 9px 0 0;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M4 0 8 6H0Z' fill='%23b8b8b8'/%3E%3C/svg%3E")}
.st-main::-webkit-scrollbar-button:vertical:increment,.st-panel-scroll::-webkit-scrollbar-button:vertical:increment{border-radius:0 0 9px 9px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M0 0h8L4 6Z' fill='%23b8b8b8'/%3E%3C/svg%3E")}
.st-main::-webkit-scrollbar-button:vertical:decrement:end,.st-main::-webkit-scrollbar-button:vertical:increment:start,.st-panel-scroll::-webkit-scrollbar-button:vertical:decrement:end,.st-panel-scroll::-webkit-scrollbar-button:vertical:increment:start{display:none}

/* Continuous scrollbar rail connecting to the arrow buttons. */
.st-main::-webkit-scrollbar,.st-panel-scroll::-webkit-scrollbar{background:#292929;border-radius:10px}
.st-main::-webkit-scrollbar-track,.st-panel-scroll::-webkit-scrollbar-track{border-radius:0;background:#292929}
.st-main::-webkit-scrollbar-button:vertical:decrement,.st-panel-scroll::-webkit-scrollbar-button:vertical:decrement{background-color:#292929;border-radius:10px 10px 0 0;margin:0;border:0}
.st-main::-webkit-scrollbar-button:vertical:increment,.st-panel-scroll::-webkit-scrollbar-button:vertical:increment{background-color:#292929;border-radius:0 0 10px 10px;margin:0;border:0}

/* Keep the quiz-list heading visible while its questions scroll. */
.st-list .st-lhead{position:sticky;top:-20px;z-index:4;flex-shrink:0;background:linear-gradient(150deg,#0c2856,#06142f);padding:20px 4px 14px;margin-top:-20px;box-shadow:0 8px 10px #06142f70}
@media(max-width:1400px){.st-list .st-lhead{top:-16px;padding-top:16px;margin-top:-16px}}
@media(max-width:760px){.st-list .st-lhead{top:-14px;padding-top:14px;margin-top:-14px}}

/* The separate header no longer covers the decorative panel border. */
.st-list{gap:0}
.st-list>.st-lhead{position:static;top:auto;z-index:auto;flex:none;align-self:stretch;margin:20px 44px 0 18px;padding:0 4px 14px;background:none;box-shadow:none;box-sizing:border-box}
.st-list>.st-panel-scroll{padding-top:12px}
@media(max-width:1400px){.st-list>.st-lhead{margin:16px 42px 0 12px;padding:0 4px 14px}}
@media(max-width:760px){.st-list>.st-lhead{margin:14px 42px 0 14px;padding:0 4px 12px}}

/* Single add action with an accessible format-selection dialog. */
.add-question-dialog{width:min(480px,calc(100vw - 40px));box-sizing:border-box;border:1px solid #9ac1dc;border-radius:14px;padding:24px;background:linear-gradient(145deg,#123456,#06162d);color:#f1f8ff;box-shadow:0 0 25px #28baff30,0 20px 60px #0008}
.add-question-dialog::backdrop{background:#010916b8}
.add-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.add-dialog-head h2{margin:0;font-size:20px;color:#dcf4ff}
.add-question-dialog>p{color:#abc9df;font-size:13px;margin:14px 0 20px}
.add-dialog-options{display:flex;flex-direction:column;gap:12px}.add-dialog-options .btn{text-align:left;padding:16px;display:flex;flex-direction:column;gap:6px}.add-dialog-options strong{font-size:16px}.add-dialog-options small{font-size:12px;color:#abc9df;font-weight:500}

/* Reuse editor format icons in the add-question chooser. */
.add-dialog-options .btn{flex-direction:row;align-items:center;gap:18px}
.add-dialog-options .ti{flex:none}
.add-format-copy{display:flex;flex-direction:column;gap:6px;min-width:0}

/* Fixed action footer within the quiz-list frame. */
.st-list>.st-add{flex:none;margin:0 44px 18px 18px;padding-top:12px;border-top:1px solid #28547e}
.st-list>.st-add .btn{width:100%}
@media(max-width:1400px){.st-list>.st-add{margin:0 42px 16px 12px}}
@media(max-width:760px){.st-list>.st-add{margin:0 42px 14px 14px}}

/* Equal inner margins measured against the quiz-list frame, not its scrollbar. */
.st-list{--list-inset:18px}
.st-list>.st-panel-scroll{padding-left:var(--list-inset);padding-right:calc(24px + var(--list-inset) - var(--list-scrollbar-width,16px))}
.st-list>.st-lhead{margin-left:var(--list-inset);margin-right:calc(24px + var(--list-inset));padding-left:0;padding-right:0}
.st-list>.st-add{margin-left:var(--list-inset);margin-right:calc(24px + var(--list-inset))}
@media(max-width:1400px){.st-list{--list-inset:16px}}
@media(max-width:760px){.st-list{--list-inset:14px}}

/* Equal inner margins for the participant-handset frame. */
.st-side{--side-inset:18px}
.st-side>.st-panel-scroll{padding-left:var(--side-inset);padding-right:calc(24px + var(--side-inset) - var(--side-scrollbar-width,16px))}
@media(max-width:1400px){.st-side{--side-inset:16px}}

/* Inset only the question-list scroll region inside its fixed frame. */
.st-list>.st-panel-scroll{width:calc(100% - 24px - var(--list-inset));margin-right:calc(24px + var(--list-inset));padding-left:var(--list-inset);padding-right:12px;align-self:flex-start}

/* Separate the question scrollbar from the fixed header/footer dividers. */
.st-list>.st-panel-scroll{margin-top:10px;margin-bottom:10px;padding-top:2px;padding-bottom:2px}

/* Center the participant count while reserving native number-stepper space. */
#players{text-align:center;padding-left:22px!important;padding-right:6px!important}

/* Narrow the central editing content while preserving the scrollbar position. */
.st-main>*{width:calc(100% - 64px);max-width:1040px;align-self:center;box-sizing:border-box}
@media(max-width:1400px){.st-main>*{width:calc(100% - 40px)}}
@media(max-width:760px){.st-main>*{width:calc(100% - 16px)}}

/* Center settings and MC-script panels like the add-question dialog. */
#setPanel,#mcPanel{align-items:center;justify-content:center;padding:28px;box-sizing:border-box;background:#010916b8}
#setPanel>.sheet,#mcPanel>.sheet{height:auto;max-height:calc(100dvh - 56px);border:1px solid #9ac1dc;border-radius:14px;background:linear-gradient(145deg,#123456,#06162d);box-shadow:0 0 25px #28baff30,0 20px 60px #0008;padding:24px;box-sizing:border-box}
#setPanel>.sheet{width:min(820px,100%);overflow-y:auto}
#mcPanel>.sheet.mcp-sheet{width:min(1280px,100%);height:min(900px,calc(100dvh - 56px))}
#setPanel>.sheet>div:first-child{flex-shrink:0}
@media(max-width:760px){#setPanel,#mcPanel{padding:12px}#setPanel>.sheet,#mcPanel>.sheet{padding:18px;max-height:calc(100dvh - 24px)}#mcPanel>.sheet.mcp-sheet{height:calc(100dvh - 24px)}}

/* Visible live attendance summary above the MC script. */
.mc-attendance{flex:none;padding:12px 16px;background:linear-gradient(120deg,#0e3153,#071a32);border-bottom:1px solid #376783}
.mc-attendance>span{display:block;font-size:12px;font-weight:700;color:#b8d9ed;margin-bottom:3px}
.mc-attendance>div{display:flex;align-items:baseline;gap:5px;line-height:1}
.mc-attendance b{font-family:var(--f-num);font-size:42px;color:#e9faff;font-variant-numeric:tabular-nums}
.mc-attendance small{font-size:16px;color:#b8d9ed}
.mcp-screen .mc-attendance{padding:10px 12px}.mcp-screen .mc-attendance b{font-size:36px}

/* Participant badge to the left of the live attendance summary. */
.mc-attendance{display:flex;align-items:center;gap:16px}
.mc-attendance>.mc-ppl{display:flex;align-items:baseline;gap:3px;flex:none;padding:8px 12px;line-height:1.2}
.mc-attendance>.mc-ppl b{font-size:26px}.mc-attendance>.mc-ppl small{font-size:11px}
.mc-attendance>.mc-attendance-copy{display:block;line-height:1.3}
.mc-attendance-copy>span{display:block;font-size:12px;font-weight:700;color:#b8d9ed;margin-bottom:3px}
.mc-attendance-copy>div{display:flex;align-items:baseline;gap:5px;line-height:1}

/* Place the live count to the right of its label. */
.mc-attendance>.mc-attendance-copy{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;min-width:0}
.mc-attendance-copy>span{margin-bottom:0;line-height:1.5;flex:1}
.mc-attendance-copy>div{flex:none}

/* Quick participant QR access from the MC phone header. */
.mc-show-qr{flex:none;margin-left:auto;border:1px solid #4b85a9;border-radius:8px;background:linear-gradient(#17486b,#0a2b47);color:#e6f7ff;padding:10px 11px;font-family:var(--f-quiz);font-weight:700;font-size:11px;cursor:pointer;white-space:nowrap;display:flex;align-items:center;gap:5px}
.mc-show-qr span{font-size:17px}.mc-show-qr:hover{border-color:#8de5ff}
.mc-join-dialog{width:min(430px,calc(100vw - 32px));box-sizing:border-box;border:1px solid #a4c5df;border-radius:14px;background:linear-gradient(145deg,#123456,#06162d);color:#eff8ff;padding:22px;box-shadow:0 15px 60px #0008}
.mc-join-dialog::backdrop{background:#010916c9}.mc-join-dialog h2{font-size:18px}
.mc-join-qr{width:274px;height:274px;max-width:100%;box-sizing:border-box;padding:12px;background:#fff;border-radius:10px;margin:24px auto;display:grid;place-items:center;color:#adc4dd;font-size:48px}
.mc-join-qr img,.mc-join-qr canvas{width:100%!important;height:auto!important}.mc-join-qr canvas+img{display:none!important}
.mc-join-dialog>p{font-size:13px;color:#c6dfef;line-height:1.7;margin-bottom:0}

/* Regular-weight script prose for comfortable reading and editing. */
.mc-line,.mc-help p{font-weight:400}
#mcsText,#mcsHelp,#mcsChk{font-weight:400}

/* Use a genuine regular face instead of the bold-only quiz display font. */
#mcPanel #mcsText,#mcPanel #mcsHelp,#mcPanel #mcsChk,.mcp-screen .mc-line,.mcv .mc-line,.mcp-screen .mc-help p,.mcv .mc-help p{font-family:"Yu Gothic UI","Meiryo",system-ui,sans-serif;font-weight:400;font-synthesis:none}

/* Clean regular Japanese sans-serif script, with relaxed reading rhythm. */
#mcPanel #mcsText,#mcPanel #mcsHelp,#mcPanel #mcsChk,.mcp-screen .mc-line,.mcv .mc-line,.mcp-screen .mc-help p,.mcv .mc-help p{font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;font-weight:400;letter-spacing:.015em;line-height:1.85;font-synthesis:none}
.mcp-screen .mc-dir,.mcv .mc-dir{font-family:"Noto Sans JP","Meiryo",sans-serif;font-weight:500;line-height:1.7}

/* Device-local text sizing on the MC phone. */
.mc-font-button{margin-left:auto;flex:none;min-width:42px;min-height:38px;border:1px solid #4a7696;border-radius:8px;background:#123857;color:#dbf4ff;font:700 15px system-ui;cursor:pointer}
.mc-font-dialog{width:min(390px,calc(100vw - 32px));box-sizing:border-box;background:linear-gradient(145deg,#123456,#06162d);color:#eff8ff;border:1px solid #94bdd8;border-radius:14px;padding:22px}
.mc-font-dialog::backdrop{background:#010916bf}.mc-font-dialog h2{font-size:18px}.mc-font-dialog p{color:#b8d2e6;font-size:13px;line-height:1.6}
.mc-font-options{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px}
.mc-font-options button{min-height:48px;border:1px solid #527c9c;border-radius:8px;background:#103451;color:#edf8ff;font:inherit;cursor:pointer}
.mc-font-options button[aria-pressed="true"]{background:#195981;border-color:#8be6ff;box-shadow:0 0 0 1px #8be6ff}
.mcp-screen .mc-line{font-size:var(--mcfs,19px)}

/* Match supplementary-script headings to the regular script font. */
.mcp-screen .mc-help summary,.mcv .mc-help summary{font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;font-weight:400;letter-spacing:.015em;font-synthesis:none}

/* Match pre-action checks to the regular MC script typography. */
.mcp-screen .mc-chk small,.mcp-screen .mc-chk li,.mcv .mc-chk small,.mcv .mc-chk li{font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;font-weight:400;letter-spacing:.015em;line-height:1.7;font-synthesis:none}

/* Keep the MC view focused on the script, without the question/answer card. */

.mc-answer-line{margin:8px 0 0;color:#9ce9ca;font-family:"Noto Sans JP","Meiryo",sans-serif;font-size:14px;font-weight:400;line-height:1.6}
