@font-face{font-family:Anuphan;src:url('/regular.woff') format('woff');font-display:swap}@font-face{font-family:Anuphan;src:url('/bold.woff') format('woff');font-weight:700;font-display:swap}
:root{color-scheme:light;--ink:#633326;--coral:#b43f34;--gold:#d69447;--white:#fffaf3;--cream:#fff0dd;--line:#cf8f6a}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-height:100dvh;display:grid;align-items:start;justify-items:center;padding:clamp(8px,3vw,30px) 7px max(15px,env(safe-area-inset-bottom));font:1rem/1.42 Anuphan,sans-serif;color:var(--ink);background:radial-gradient(circle at 15% 15%,#fffaf3,transparent 37%),linear-gradient(135deg,#fbe4cd,#f8baa5);overscroll-behavior-y:none}.case{width:min(830px,100%);background:var(--white);border:2px solid #bb724f;box-shadow:3px 3px #bd7153,inset 2px 2px #fff;border-radius:2px;overflow:hidden}.chrome{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;color:#fff;background:linear-gradient(180deg,#dd7453,#af3d32);border-bottom:2px solid #a75d3b;font:700 .82rem ui-monospace,monospace;letter-spacing:.045em}.chrome a{margin-left:auto;color:#fffaf3;font:700 .77rem Anuphan,sans-serif;text-decoration:none;white-space:nowrap}.view{padding:clamp(.5rem,2.5vw,1.1rem)}.intro{text-align:center}.intro img{width:min(245px,62%);height:61px;object-fit:contain;display:block;margin:0 auto .35rem}.kicker{font:700 .73rem ui-monospace,monospace;letter-spacing:.075em;color:#8a482f}.intro p,h1,h2,p{margin:0}h1{font-size:clamp(1.65rem,6vw,2.65rem);line-height:1.12;margin:.28rem 0}h2{font-size:1.28rem}.intro p:last-child{font-size:.91rem;margin:.3rem 0 .7rem}
button{font:700 .93rem Anuphan,sans-serif;color:var(--ink);border:1px solid #a76c52;border-radius:2px;background:#fff0de;box-shadow:inset 1px 1px #fff,2px 2px #c18a6b;padding:.43rem .62rem;min-height:44px;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}button:hover{background:#fff8eb}button:active,button.on{transform:translate(1px,1px);box-shadow:inset 2px 2px #d18b64}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #7e3f24;outline-offset:2px}button:disabled{opacity:.58;cursor:default}button.primary{background:#b84235;color:#fff;box-shadow:inset 1px 1px #ec987f,2px 2px #994838}.actions,.minor{display:flex;gap:.45rem;align-items:center;justify-content:center;flex-wrap:wrap}.actions{margin:.65rem 0}.roster{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:.8rem 0}.roster button{display:grid;gap:.2rem;justify-items:center;padding:4px 3px 6px;min-width:0;overflow:hidden;font-size:clamp(.61rem,2.65vw,.93rem);border:2px solid #deb899;background:#fff4e8;box-shadow:2px 2px #d7a889}.roster button[aria-pressed=true]{border-color:#a34f46;background:#ffe1d4;box-shadow:2px 2px #ad6b58}.roster img{display:block;width:100%;aspect-ratio:1;object-fit:cover;clip-path:polygon(0 0,88% 0,100% 12%,100% 100%,12% 100%,0 88%)}
.modePick{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;border:0;margin:.45rem 0;padding:0}.modePick legend{font-weight:700}.modePick button[aria-pressed=true]{background:#ffe1bd;border-color:#984e33}.modePick small{display:block;font-weight:400;font-size:.74rem}.profile{display:grid;grid-template-columns:1.45fr 1fr;gap:.55rem;background:#fff2e2;border:2px solid #d19770;padding:.44rem;box-shadow:2px 2px #d0a080}.pick-art{min-width:0;min-height:155px;position:relative;overflow:hidden;background:#b66d53}.pick-art img:first-child,.map{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.pick-art img+img{position:absolute;inset:8% 15%;width:70%;height:84%;object-fit:contain;filter:drop-shadow(0 5px 2px #33232386)}.pick-info{padding:2px 3px}.pick-info img{display:block;width:min(100%,135px);height:auto;border:1px solid #cf9b74;margin:.25rem 0}.pick-info p{font-size:.8rem}details{font-size:.86rem;margin:.55rem 0 .3rem}details p{padding:.2rem 0}summary{cursor:pointer;font-weight:700}
.playbar{display:flex;align-items:center;justify-content:space-between;gap:.3rem}.playbar small{display:block}.minor button{font-size:.76rem;padding:.3rem .4rem}.hud{display:grid;grid-template-columns:1fr auto 1fr;gap:.6rem;margin:.48rem 0}.hud-side{border:1px solid #d9a17b;background:#fff0dd;padding:.25rem .4rem;min-width:0;box-shadow:1px 1px #c78e68}.hud-side>div{display:grid;grid-template-columns:1.7em 1fr;align-items:center;gap:3px;font-size:.73rem}.hud-side progress{width:100%;height:.69rem;accent-color:#dc7293}.hud #heroMp{accent-color:#6f9bde}.enemy progress{accent-color:#de775f}.vs{align-self:center;font:800 1rem ui-monospace,monospace;color:#b05238}.trackName{font-size:.76rem;margin:.28rem 0;color:#784331}.screen{position:relative;isolation:isolate;overflow:hidden;background:#452b3d;border:2px solid #a65d48;box-shadow:2px 2px #aa694d;aspect-ratio:1.85/1;min-height:170px;max-height:412px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.map{object-position:center 65%;filter:saturate(.93)}.screen:after{content:"";position:absolute;z-index:0;inset:0;pointer-events:none;background:linear-gradient(0deg,#1e14396c,transparent 53%,#251b3626)}.fighter{--x:22%;--y:0%;--flip:1;--lunge:0px;--tilt:0deg;--squash:1;position:absolute;z-index:2;left:var(--x);bottom:calc(10% + var(--y));height:68%;width:30%;transform:translateX(-50%);display:grid;grid-template-rows:1fr auto;justify-items:center}.fighter::before{content:"";position:absolute;bottom:.4rem;width:52%;height:6%;border-radius:50%;background:#30234788;z-index:-1}.fighter img{width:100%;height:100%;min-height:0;object-fit:contain;object-position:bottom center;transform-origin:50% 90%;transform:translateX(var(--lunge)) scaleX(var(--flip)) rotate(var(--tilt)) scaleY(var(--squash));filter:drop-shadow(0 4px 4px #342531a6)}.fighter.flash img{filter:brightness(1.8) drop-shadow(0 0 6px #fff5bb)}.fighter.guard img{filter:drop-shadow(0 0 6px #cafdff)}.fighter.attack img{animation:strike .27s ease-out both}@keyframes strike{0%{opacity:.85}45%{filter:brightness(1.19) drop-shadow(0 0 5px #ffeba2)}100%{opacity:1}}
#wave.special{height:36%;bottom:25%}#danger{position:absolute;z-index:4;top:6%;right:10%;background:#9c2f26;color:white;padding:.23rem .42rem;font-size:.75rem;font-weight:700;border:1px solid #ffbd65}#skill{display:flex;position:absolute;z-index:5;top:4%;left:50%;transform:translateX(-50%);align-items:center;gap:.35rem;background:#6f3b33ee;border:1px solid #ffd6a2;color:#fff6df;padding:.18rem .42rem;white-space:nowrap;font-size:clamp(.66rem,2.5vw,1rem);font-weight:700;pointer-events:none}#skill img{width:44px;height:27px;object-fit:cover}.overlay{position:absolute;z-index:9;inset:0;display:grid;place-items:center;padding:.4rem;background:#26152c57}.dialog{width:min(100%,420px);background:#fff5e5;border:2px solid #c36447;box-shadow:3px 3px #6e3d42;padding:.52rem .65rem;text-align:center}.dialog b{color:#973a2b;font-size:1.36rem}.dialog p{margin:.2rem 0 .5rem}
#status{min-height:1.4rem;font-size:.84rem;margin:.42rem 0}.touch{display:flex;justify-content:space-between;gap:.45rem;user-select:none;touch-action:none}.touch>div{display:flex;gap:.3rem}.touch button{padding:.35rem .38rem;min-width:44px;min-height:49px;touch-action:none;white-space:nowrap}.touch svg{width:20px;height:20px;stroke:currentColor;stroke-width:2.5;fill:none;vertical-align:middle}.touch .special,.rhythm-acts button:last-child{background:#ffd994}.hint{margin:.55rem 0 0;text-align:center;font-size:.76rem;color:#795345}.rhythmBox{margin:.42rem 0;padding:.4rem;border:1px solid #d19a78;background:#fff1de}.sequence{display:flex;justify-content:center;gap:6px}.sequence b{display:grid;place-items:center;font:700 1.18rem system-ui;background:#fff9ea;border:1px solid #a87657;width:33px;height:34px}.sequence .entered{background:#f3bb8f}.beatLane{position:relative;height:12px;background:#d6ba9e;border:1px solid #aa7859;margin:.38rem 0}.beatLane:after{content:"";position:absolute;left:86%;height:100%;width:7%;background:#ffedaa}.beatLane i{position:absolute;left:var(--beat,0%);height:100%;width:7px;background:#b44135;z-index:1}.rhythm-acts,.arrow-keys{display:grid;gap:.3rem}.arrow-keys{grid-template-columns:repeat(5,1fr)}.rhythm-acts{grid-template-columns:repeat(3,1fr);margin-top:.3rem}.rhythm-acts button,.arrow-keys button{touch-action:manipulation;padding:.25rem .18rem;font-size:.85rem}.finish{text-align:center}.finish img{display:block;margin:.5rem auto;width:min(250px,75%);height:auto;border:2px solid #cf9b73}.finish #shareStatus{font-size:.84rem}.audio-controls{display:flex;justify-content:flex-end;margin-top:.35rem}
@media(max-width:420px){.view{padding:.47rem}.touch{gap:3px}.touch>div{gap:3px}.touch button{font-size:.72rem;padding-inline:3px}.minor button{min-height:38px}.chrome{font-size:.70rem}.profile{grid-template-columns:1.1fr 1fr}.pick-art{min-height:152px}}@media(prefers-reduced-motion:reduce){.fighter.attack img{animation:none}}

.audio-controls{gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}.audio-controls label{font-size:.78rem;display:flex;align-items:center;gap:.4rem;max-width:100%}.audio-controls input{width:min(116px,30vw);accent-color:#b84235}.battle,.battle img,.battle *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.battle img{-webkit-user-drag:none}
.guardLane{background:#eab299}.guardLane i{background:#8e3228}.guardLane:after{background:#ffd293}

@font-face{font-family:"Duel SC";src:url("/star-duel/duel-cjk-sc.woff?v=duel-natural-57") format("woff");font-weight:100 900;font-display:swap}
@font-face{font-family:"Duel JP";src:url("/star-duel/duel-cjk-jp.woff?v=duel-natural-57") format("woff");font-weight:100 900;font-display:swap}
@font-face{font-family:"Duel KR";src:url("/star-duel/duel-cjk-kr.woff?v=duel-natural-57") format("woff");font-weight:100 900;font-display:swap}
:root:lang(zh-Hans),.languagePicker :lang(zh-Hans){font-family:"Duel SC",sans-serif}
:root:lang(ja),.languagePicker :lang(ja){font-family:"Duel JP",sans-serif}
:root:lang(ko),.languagePicker :lang(ko){font-family:"Duel KR",sans-serif}
#choose details p{white-space:pre-line}
.languagePicker{position:relative;z-index:5}
.languagePicker button{display:inline-flex;align-items:center;gap:.36rem;white-space:nowrap;min-height:38px;padding:.3rem .52rem;font-size:.82rem}
.languagePicker img{flex:none;border-radius:3px;object-fit:cover}
#languageMenu:not([hidden]){position:absolute;right:0;top:calc(100% + 4px);display:grid;min-width:9.5rem;gap:2px;padding:5px;border:1px solid #ead0b9;border-radius:12px;background:#fffaf2;box-shadow:0 7px 22px #3a1d2340}
#languageMenu button{justify-content:flex-start;width:100%;background:#fff9ed;color:#5a3730}
#languageMenu button[aria-checked=true]{background:#ffdfd4}
@media(max-width:560px){.chrome{flex-wrap:wrap}}

/* Match the shipped Stardust to Stage chrome. */
body{background:radial-gradient(ellipse at 43% 7%,#fff6e8 0,transparent 54%),linear-gradient(145deg,#ffe3d5,#f4b7a4)}
.case{border:1px solid #e6c4ad;border-radius:17px;box-shadow:0 18px 47px #6a372724;color:#362b29;background:#fffaf6}
.chrome{background:linear-gradient(100deg,#f7c3ac,#eda188);border-bottom:1px solid #dca67f;color:#553127;padding:.68rem clamp(.55rem,2.5vw,1.35rem);letter-spacing:.12em}
.chrome strong{font:800 clamp(.69rem,2.65vw,.9rem)/1.2 ui-monospace,monospace}
.chrome>button,.chrome .languagePicker>button{min-height:36px;background:#fff7ef;color:#75352b;border-color:#f3c7b1;box-shadow:none;border-radius:6px;padding:.32rem .58rem;font-size:.81rem;margin-left:0}
.intro{padding:clamp(.8rem,2.5vw,1.6rem) .68rem .8rem;border:1px solid #e9d7cf;border-radius:12px;background:radial-gradient(ellipse at 50% 4%,#ffe8da,#fffdfb 75%);position:relative;overflow:hidden}
.intro::before,.intro::after{position:absolute;top:23%;color:#c77860;font-size:clamp(.95rem,2vw,1.65rem);content:"✦";pointer-events:none}.intro::before{left:9%}.intro::after{right:9%}
.intro img{height:auto;width:min(245px,66%);margin:.14rem auto .38rem}.intro p:not(.kicker){color:#6d5853;margin:.46rem 0 .1rem}
.roster{gap:clamp(.45rem,1vw,.8rem);margin-top:1rem}.roster button{border:1px solid #e9d9d2;border-bottom:3px solid var(--member,#e6c4ad);background:#fff9f6;border-radius:9px;color:#362b29;box-shadow:none;gap:.25rem;padding:4px 4px .46rem}
.roster img{clip-path:none;border-radius:5px}.roster small{font-size:.79em;line-height:1.15;color:#6d5853}.roster button[aria-pressed=true]{border-color:var(--member);background:white;box-shadow:0 0 0 1px var(--member)}
.modePick button,.minor button,.actions button{background:#fffaf5;box-shadow:0 2px 0 #e4cec3;border:1px solid #e1c5b5;border-radius:7px}.modePick button[aria-pressed=true]{border-color:#c28474;background:#fff0e7}.actions button.primary{background:#ad4839;color:#fffdf9;border-color:#ad4839}.profile,.pick-art{border-radius:9px}
.duelFoot{border-top:1px solid #e7d5ce;background:#faf6f4;padding:.85rem .4rem;text-align:center;font:700 .65rem ui-monospace,monospace;letter-spacing:.08em;color:#6a5962}.duelFoot a{color:#6a5962;margin-left:.8rem;text-underline-offset:3px}
.fighter img,.pick-art img+img{image-rendering:pixelated}.screen{border-color:#d8ac83;border-radius:8px;box-shadow:0 4px 13px #6e433124}
@media(max-width:600px){.roster{grid-template-columns:repeat(6,minmax(0,1fr));gap:.4rem}.roster button{grid-column:span 2}.roster button:nth-child(4){grid-column:2/span 2}.roster button:nth-child(5){grid-column:4/span 2}.intro img{width:min(205px,62%)}.chrome{padding:.45rem .55rem}}

/* Match the runner's touch controller, with one extra action for Guard. */
#controls{align-items:center;gap:.4rem;margin-top:.58rem}
#controls>div{gap:.28rem}
#controls button,#rhythmBox button{min-height:46px;border:1px solid #d9d4d6;background:#fff;color:#192737;border-radius:7px;box-shadow:0 2px 0 #ddd6d7;line-height:1.1;-webkit-tap-highlight-color:transparent}
#controls button{padding:.5rem .42rem}
#controls .directions button{display:grid;place-items:center;min-width:45px}
#controls .directions svg{display:block;width:25px;height:25px;pointer-events:none;stroke-width:3.2}
#controls .skill,#rhythmBox [data-rhythm="power"],#rhythmBox #beatConfirm{border-color:#d9a36a;background:#ffedcb}
@media(hover:hover){#controls button:hover,#rhythmBox button:hover{background:#fff1e9}}
#controls button:active,#controls button.on,#rhythmBox button:active{transform:translateY(2px);box-shadow:none;background:#f3dfd9;color:#192737}
#controls .skill:active{background:#ffdba6}
#controls .combat button{white-space:normal;overflow-wrap:anywhere;min-width:42px}
#controls+.audio-controls,.battle .hint{margin-top:1rem}
@media(max-width:520px){#controls,#controls>div{gap:.2rem}#controls .combat button{min-width:42px;padding:.35rem .25rem;font-size:clamp(.65rem,2.4vw,.86rem)}}
@media(max-width:360px){#controls .combat{display:grid;grid-template-columns:repeat(2,minmax(50px,1fr));gap:.3rem}#controls .directions button{min-width:44px}}
/* One 224px sprite canvas and a fixed ground anchor, independent of name length and frame bounds. */
.screen .fighter{display:block;bottom:calc(12% + var(--y))}
.screen .fighter img{display:block;height:100%;object-position:center bottom;transform-origin:50% 96.4%;transform:translateX(var(--lunge)) scaleX(var(--flip))}
.screen .fighter::before{left:24%;bottom:2.3%}

.pickStats{display:grid;gap:.18rem;margin:.4rem 0 .5rem;font-size:.73rem}
.pickStats>div{display:grid;grid-template-columns:minmax(3.5em,auto) minmax(24px,1fr) auto;gap:.3rem;align-items:center}
.pickStats meter{width:100%;height:.7rem;appearance:none;-webkit-appearance:none}
.pickStats meter::-webkit-meter-bar{border:0;border-radius:4px;background:#f3dbd5;box-shadow:none}
.pickStats meter::-webkit-meter-optimum-value{border-radius:4px;background:var(--member)}
.pickStats meter::-moz-meter-bar{border-radius:4px;background:var(--member)}
.pickStats b{font-variant-numeric:tabular-nums}

/* The same alignment, profile proportions and segmented gauges as Stardust to Stage. */
.view{padding:clamp(.5rem,3vw,1.35rem)}
.chrome{flex-wrap:nowrap;gap:.6rem}
.chromeTools{display:flex;align-items:center;gap:.38rem;justify-content:flex-end;margin-inline-start:auto;flex:none}
.chromeTools #sound{margin:0;min-height:36px;padding:.32rem .58rem;border:1px solid #f3c7b1;border-radius:6px;background:#fff7ef;color:#75352b;box-shadow:none;font-size:.81rem;white-space:nowrap}
.chromeTools .languagePicker span{margin:0;color:inherit}
.modePick{min-inline-size:0;grid-template-columns:repeat(2,minmax(0,1fr));inline-size:100%}
.modePick button{min-width:0;overflow-wrap:anywhere}
.actions.duelStart{display:block;margin-block:.6rem .8rem}
.duelStart #start{width:100%;min-height:48px;font-size:1rem}
.profile{--member:#edacc4;display:grid;grid-template-columns:minmax(94px,.85fr) minmax(0,1.4fr);gap:.62rem;align-items:stretch;padding:0;border:0;background:none;box-shadow:none}
.profile .pick-art{display:grid;grid-template-rows:minmax(0,1fr) auto;place-items:center;overflow:hidden;margin:0;min-height:134px;border:1px solid #ddd8d8;background:radial-gradient(ellipse at 50% 64%,color-mix(in srgb,var(--member),white 79%),#fff 75%);padding:.25rem .16rem}
.profile .pick-art #pickSprite{position:static;width:auto;max-width:100%;height:clamp(102px,27vw,188px);object-fit:contain;image-rendering:pixelated}
.pick-art figcaption{font:700 clamp(.65rem,2.7vw,1rem) ui-monospace,monospace;text-align:center;padding:.28rem;max-width:100%;overflow-wrap:anywhere}
.profile .pick-info{min-width:0;border:1px solid #ddd8d8;border-left:4px solid var(--member);border-radius:9px;background:#faf7f4;padding:.6rem .75rem}
.pick-info h2{font-size:1rem;margin:.08rem 0}
.pick-info p{margin:.13rem 0;font-size:.93rem}
.pickStats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.49rem .7rem;margin:.45rem 0 .25rem}
.pickStats>div,.hud-side>.duelMetric{display:grid;grid-template-columns:minmax(0,1fr);gap:.24rem;min-width:0}
.duelStatLabel{display:flex;align-items:baseline;justify-content:space-between;gap:.23rem;color:#563830;font-size:clamp(.72rem,2.5vw,.84rem);font-weight:700;line-height:1.22;overflow-wrap:anywhere}
.duelStatLabel>span{font:700 .76rem/1 ui-monospace,monospace;white-space:nowrap;color:#633d34}
.pick-info .pickAverage{font-size:.76rem;text-align:right;color:#775548;margin:.15rem 0 .25rem}
.duelBar{--meter-color:var(--member,#d66b83);position:relative;display:block;min-width:0;height:9px;border:1px solid #c9a897;border-radius:3px;overflow:hidden;background:#efddd3}
.duelBar::after{position:absolute;content:"";inset:0;pointer-events:none;background:repeating-linear-gradient(to right,transparent 0 calc(20% - 1px),#fffbf7 calc(20% - 1px) 20%)}
.duelBar progress,.hud-side .duelBar progress{display:block;width:100%;height:100%;appearance:none;-webkit-appearance:none;border:0;border-radius:0;background:transparent;accent-color:var(--meter-color)}
.duelBar progress::-webkit-progress-bar{background:transparent}
.duelBar progress::-webkit-progress-value{background:var(--meter-color)}
.duelBar progress::-moz-progress-bar{background:var(--meter-color)}
.hud-side{display:grid;align-content:start;gap:.24rem;border:1px solid #ead4c5;border-left:3px solid #d66b83;background:#fff8f2;border-radius:7px;padding:.34rem .5rem .37rem;box-shadow:none}
.hud-side.enemy{border-left-color:#c8876f}
.hud-side .hp .duelBar{--meter-color:#dc7293}
.duelFoot{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.33rem .85rem;padding:.4rem .55rem}
.duelFoot .duelHome{display:inline-flex;align-items:center;min-height:44px;padding:0 .3rem;margin:0;white-space:nowrap}
.roster img,.pick-art img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;pointer-events:none}
@media(max-width:600px){.case{border-radius:11px}.view{padding:.55rem}.chrome{padding:.5rem .56rem}.roster{gap:.42rem}.intro img{width:min(205px,65%)}.profile{gap:.35rem;grid-template-columns:minmax(77px,.7fr) minmax(0,1.4fr)}}
@media(max-width:470px){.chrome{gap:.38rem}.chrome strong{max-width:38%;overflow-wrap:normal}.chromeTools{gap:.28rem}.chromeTools #sound,.chromeTools .languagePicker>button{padding-inline:.36rem;font-size:.72rem}.profile .pick-info{padding:.42rem .47rem}.hud-side{padding-inline:.34rem}}
@media(max-width:380px){.pickStats{grid-template-columns:1fr;gap:.36rem}}
.storyChoices{margin:.65rem auto .85rem}
.storyChoices button[aria-pressed=true]{border-color:#c28474;background:#fff0e7;color:#75352b}
/* Subdue distant artwork without blurring either the fighters or the near stage floor. */
.screen #map{filter:blur(1.45px) saturate(.74) contrast(.82) brightness(.92)}
.screen .mapFloor{filter:saturate(.79) contrast(.91) brightness(.95);mask-image:linear-gradient(to bottom,transparent 0%,transparent 62%,#000 79%);pointer-events:none}
@media(min-width:620px){.screen #map{filter:blur(2.2px) saturate(.72) contrast(.82) brightness(.92)}}
.screen{aspect-ratio:8/5;min-height:0;max-height:none}

/* Runner's four-point marker, and star-themed rhythm controls. */
#rhythmBox{border:1px solid #e9cabb;border-radius:12px;background:#fff7f0;padding:.58rem}
#rhythmBox .sequence{gap:.42rem;margin:0 0 .53rem}
.sequence b{width:40px;height:40px;border:1px solid #edc4af;border-radius:9px;background:#fffdf9;color:#813e53;box-shadow:0 2px 0 #ebcfc1}
.sequence b.entered{background:#ffe4e7;border-color:#da94a7;color:#753044}
.beatArrow{display:block;width:22px;height:22px;stroke:currentColor;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;fill:none;pointer-events:none}
:where([data-arrow=left],[data-dir=left]) .beatArrow{transform:rotate(180deg)}
:where([data-arrow=up],[data-dir=up]) .beatArrow{transform:rotate(-90deg)}
:where([data-arrow=down],[data-dir=down]) .beatArrow{transform:rotate(90deg)}
#rhythmBox [data-arrow]{display:grid;place-items:center;background:linear-gradient(#fffdfa,#ffedf0);color:#813e53;border-color:#efc7cc;box-shadow:0 2px 0 #eecdd1}
#rhythmBox [data-arrow]:active{background:#fbd6e0;box-shadow:none}
#rhythmBox #beatConfirm{background:linear-gradient(#fff9df,#ffe9bc);color:#694127;font-weight:800}
#rhythmBox .arrow-keys{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(55px,1.25fr)}
#rhythmBox .beatLane{position:relative;height:11px;border:1px solid #d9b7a6;background:#f1dfd4;border-radius:6px;margin:.68rem .53rem .9rem;isolation:isolate}
#rhythmBox .beatLane:after{background:#ffe39d;border-radius:5px;left:86%;width:8%}
#rhythmBox .beatLane i{display:grid;place-items:center;top:50%;left:var(--beat,0%);transform:translate(-50%,-50%);width:25px;height:25px;background:none;color:#f7aa50;filter:drop-shadow(0 0 3px #fff5df);pointer-events:none}
#rhythmBox .beatLane i svg{display:block;fill:#ffcf78;stroke:#99522e;stroke-width:1.2;width:100%;height:100%}
#rhythmBox .guardLane{margin-top:-.44rem;background:#f6e0e3}
#rhythmBox .guardLane i{width:20px;height:20px}
#rhythmBox .guardLane i svg{fill:#f8b5c8;stroke:#994354}
.duelHotkeys{color:#704c45;text-align:center;font-size:.78rem;margin:1rem 0 0;line-height:1.48}
@media(pointer:coarse){.duelHotkeys{display:none}}
/* One beat lane; the guard key lights up when its response window opens. */
#rhythmBox button.guardReady{color:#673144;background:#ffe4ed;border-color:#d786a1;box-shadow:0 2px 0 #e7a8b9,0 0 0 2px #ffe2eb}
#rhythmJudgement{--j-ink:#754c25;--j-edge:#dcad5d;--j-hi:#fff4cb;--j-low:#ffd485;position:absolute;z-index:7;top:10%;left:24%;transform:translateX(-50%);display:flex;align-items:center;gap:.28em;padding:.27em .63em;border:2px solid var(--j-edge);border-radius:999px;background:linear-gradient(var(--j-hi),var(--j-low));box-shadow:inset 0 0 0 1px #fff9e8,0 3px 0 #56322962,0 0 12px var(--j-edge);color:var(--j-ink);font:900 clamp(.64rem,2.45vw,1.35rem)/1.1 ui-monospace,monospace;letter-spacing:.05em;text-shadow:0 1px #fff7e4;white-space:nowrap;pointer-events:none;animation:roseJudgement .94s ease-out both}
#rhythmJudgement span{font-size:.75em}
#rhythmJudgement[data-grade=great]{--j-ink:#84294b;--j-edge:#db91ae;--j-hi:#fff2f6;--j-low:#f5b6cd}
#rhythmJudgement[data-grade=cool]{--j-ink:#255e60;--j-edge:#75b8bf;--j-hi:#effffd;--j-low:#ade7e7}
#rhythmJudgement[data-grade=bad]{--j-ink:#903b30;--j-edge:#e0957a;--j-hi:#fff3ea;--j-low:#f9b29a}
#rhythmJudgement[data-grade=miss]{--j-ink:#4a5160;--j-edge:#a1a9bb;--j-hi:#f9fafc;--j-low:#cbd2df}
@keyframes roseJudgement{0%{opacity:0;transform:translate(-50%,5px) scale(.86)}18%,70%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-8px)}}
@media(prefers-reduced-motion:reduce){#rhythmJudgement{animation:none}}
.starLoading{display:grid;place-items:center;min-height:min(72dvh,680px);text-align:center;background:radial-gradient(ellipse at 50% 35%,#ffe8dd,#faf5f4 70%)}
.loaderTicket{width:min(100%,350px);padding:1.35rem .8rem;border:1px solid #ead4cc;background:#fffaf7;box-shadow:0 12px 32px #35293817;border-radius:18px;color:var(--ink)}
.loaderTicket img{width:min(160px,52%);height:auto}
.loaderTicket h1{font-size:1.24rem;margin:.24rem 0}
.loaderTicket p{margin:.35rem 0}
#duelLoadCount{display:block;font-size:2.75rem;line-height:1.05;color:#a64358;font-variant-numeric:tabular-nums}
#duelLoadNote{min-height:1.5em;font-size:.85rem}
.loaderTicket progress{width:80%;height:.62rem;accent-color:#bf656e}
.loaderStar{margin:.6rem auto .25rem;display:grid;place-items:center;width:45px;height:45px;border:1px solid #ead3c8;border-radius:50%;color:#ae463d;background:#fff1eb;font-size:1.37rem;animation:duelLoaderBob 1s ease-in-out infinite alternate}
@keyframes duelLoaderBob{to{transform:translateY(-5px)}}
@media(prefers-reduced-motion:reduce){.loaderStar{animation:none}}
/* Weight shifts pivot at the feet; rhythm sway follows the track's beat clock. */
.screen .fighter.idle img{animation:duelBreathing 2.15s ease-in-out infinite}
.screen #b.idle img{animation-delay:-.7s}
@keyframes duelBreathing{
 0%,100%{transform:translateX(var(--lunge)) scaleX(var(--flip)) scaleY(1)}
 50%{transform:translateX(var(--lunge)) scaleX(var(--flip)) scaleY(.986)}
}
.screen .fighter.dance img{transform:translateX(var(--lunge)) rotate(var(--dance-tilt,0deg)) scaleX(var(--flip)) scaleY(var(--dance-bend,1))}
@media(prefers-reduced-motion:reduce){
 .screen .fighter.idle img{animation:none}
 .screen .fighter.dance img{transform:translateX(var(--lunge)) scaleX(var(--flip))}
}

/* Header controls anchor to the right edge at every width. */
.chrome{display:grid;grid-template-columns:auto minmax(0,1fr) auto}
.chrome strong{max-width:none;min-width:0;overflow-wrap:anywhere}
.chromeTools{justify-self:end;margin:0}
.songField{display:grid;gap:.25rem;margin:.65rem 0 .45rem;color:#69463b;font-size:.86rem}
.songField select{height:44px;min-width:0;max-width:100%;border:1px solid #dec2b7;border-radius:8px;background:#fffaf5;padding:.35rem .65rem;font:inherit;color:var(--ink)}
.songField small{color:#76554b}
#rhythmBox{border:0;background:transparent;padding:.18rem 0 0}
#rhythmBox [data-arrow],#rhythmBox .sequence b{border-color:#d9d4d6;background:#fff;color:#362b29;box-shadow:0 2px 0 #ddd6d7}
#rhythmBox .sequence b.entered{border-color:#e3aa9d;background:#ffeae2;color:#7c392d}
#rhythmBox [data-arrow]:active{background:#f3dfd9;box-shadow:none}
.beatArrow{width:25px;height:25px;stroke-width:3.2}
#rhythmBox #beatConfirm{background:#ffedcb;color:#362b29}
#rhythmBox .beatLane{height:7px;background:#f5d9cd;border-color:#e2b8a6}
#rhythmBox .beatLane i svg{fill:#eb835d;stroke:#fff6de}
body:has(#battle:not([hidden])){padding-block:clamp(4px,1.4dvh,14px)}
#battle{padding-block:clamp(.35rem,1.4dvh,.9rem)}
#battle #screen{max-height:clamp(124px,calc(100dvh - 250px),510px)}
#battle[data-mode=rhythm] #screen{max-height:clamp(108px,calc(100dvh - 352px),510px)}
#battle #status{margin:.3rem 0;min-height:1.2em}
#battle .duelHotkeys{margin:.64rem 0 0}
#battle .hint{margin:.52rem 0 .05rem}
#battle .dialog{border:1px solid #e4b8a2;border-radius:13px;box-shadow:0 5px 23px #683a3b35;padding:clamp(.35rem,1.7vh,.8rem);max-width:calc(100% - .65rem)}
#battle .dialog p{margin:.25rem 0;font-size:clamp(.68rem,2.1vw,.92rem)}
@media (max-height:480px) and (orientation:landscape) and (min-width:570px){
 #battle[data-mode=rhythm]:not([hidden]){display:grid;grid-template-columns:minmax(0,1.55fr) minmax(188px,1fr);column-gap:.55rem;align-items:start}
 #battle[data-mode=rhythm] :is(.playbar,.trackName,.hud){grid-column:1 / -1}
 #battle[data-mode=rhythm] #screen{grid-column:1;grid-row:4 / span 3;max-height:clamp(105px,calc(100dvh - 147px),290px)}
 #battle[data-mode=rhythm] #status{grid-column:2;grid-row:4}
 #battle[data-mode=rhythm] #rhythmBox{grid-column:2;grid-row:5}
 #battle[data-mode=rhythm] :is(.duelHotkeys,.hint){grid-column:2}
 #rhythmBox button{min-height:36px}
 #rhythmBox .sequence b{width:30px;height:30px}
}
/* The runner's per-member release renders on a transparent layer, not as a generic hit beam. */
#ultimateFX{position:absolute;inset:0;z-index:4;width:100%;height:100%;pointer-events:none}
.screen .fighter.ultimate-pose img{animation:none;transform:translate(var(--power-x,0),var(--power-y,0)) rotate(var(--power-angle,0deg)) scale(var(--power-sx,1),var(--power-sy,1))}
#skill{z-index:6;top:6%;left:clamp(76px,var(--skill-x,50%),calc(100% - 76px));max-width:calc(100% - 12px);padding:.18rem .53rem .18rem .21rem;border-radius:999px;border-color:var(--skill-color,#ffd6a2);background:#392833ed;box-shadow:0 0 13px color-mix(in srgb,var(--skill-color),transparent 34%);font-size:clamp(.65rem,1.7vw,.89rem)}
#skill img{width:clamp(25px,5.4vw,43px);height:clamp(25px,5.4vw,43px);border-radius:50%;object-fit:cover;background:#6e464a}
#skillName{white-space:normal;line-height:1.3}
#controls button.skill,#rhythmBox [data-rhythm=power]{display:grid;gap:.12rem;place-content:center;line-height:1.1;padding-inline:.39rem;white-space:nowrap}
[data-mp-cost]{font:700 .62rem/1 ui-monospace,monospace;color:#704729;letter-spacing:.035em}
#controls [data-ready=true],#rhythmBox [data-ready=true]{background:#ffe39b;border-color:#b87835;box-shadow:0 2px 0 #cb8d48,0 0 11px #ffbd4f80}
[data-ready=true] [data-mp-cost]::before{content:"✦ ";color:#a04c19}
.hud .mp .duelBar{background:#fff6ed;isolation:isolate;overflow:visible}
.hud .mp .duelBar::after{display:none}
#mpMarker{position:absolute;z-index:2;width:5px;height:9px;top:50%;left:var(--mp-mark,60%);transform:translate(-50%,-50%);border-radius:2px;background:#926951;border:1px solid #fffafa;pointer-events:none}
.duelBar[data-ready=true] #mpMarker{background:#ed8b23}
#rhythmBox .beatLane{background:#fcf5ed;border-color:#e6cabb}
#rhythmBox .beatLane:after{background:#ffe49e}
#rhythmBox .beatLane i svg{fill:var(--beat-color,#b54a45);stroke:#603c3b}
#beatLane.beat-tap{animation:duelTap .27s ease-out}
#beatLane.beat-hit,.duelBar.beat-hit{animation:duelPulse .44s ease-out}
@keyframes duelTap{0%{box-shadow:0 0 0 3px #a675674d}100%{box-shadow:none}}
@keyframes duelPulse{0%{box-shadow:0 0 1px 4px color-mix(in srgb,var(--beat-color,var(--meter-color,#e88794)),transparent 45%)}100%{box-shadow:0 0 18px 8px transparent}}
@media(prefers-reduced-motion:reduce){#beatLane.beat-tap,#beatLane.beat-hit,.duelBar.beat-hit{animation:none;outline:1px solid #ba856e}}
#nextTicket{position:relative;display:grid;place-items:center;overflow:hidden;border-radius:9px;margin:0 0 .42rem;background:#684758;min-height:45px}
#nextTicket img{position:absolute;inset:0;object-fit:cover;object-position:center 47%;width:100%;height:100%;filter:brightness(.68) saturate(.82)}
#nextStageName{position:relative;padding:.23rem .58rem;color:#fff7e6;font-size:clamp(.7rem,2vw,.96rem);font-weight:800;text-shadow:0 2px 4px #321f2b}
#restartPrompt{width:min(92%,410px);border:1px solid #dfb49f;border-radius:15px;padding:1.1rem;background:#fff9f3;color:var(--ink);box-shadow:0 10px 44px #54344759;text-align:center}
#restartPrompt::backdrop{background:#33233382}
#restartPrompt h2{margin:0;font-size:1.2rem}

/* Same visible sprite-to-field width ratio as the runner. Translation stays on the compositor. */
.screen .fighter{left:0;bottom:calc(12% - var(--fighter-foot-adjust,0px));width:var(--fighter-size,21.66%);height:var(--fighter-size,38%);transform:translate3d(calc(var(--fighter-x,0px) - 50%),var(--fighter-y,0px),0);will-change:transform}
.screen .fighter img{filter:drop-shadow(0 2px 2px #34253170)}
.screen .fighter.flash img{filter:brightness(1.55) drop-shadow(0 0 4px #fff5bb)}
.screen .fighter.guard img{filter:drop-shadow(0 0 4px #cafdff)}

#rhythmBox button{touch-action:manipulation}
@media(pointer:coarse),(max-width:560px){
 #rhythmBox button{touch-action:none;min-height:50px}
 #rhythmBox .arrow-keys{gap:.34rem;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(62px,1.25fr)}
 #rhythmBox .rhythm-acts{gap:.34rem}
 #rhythmBox .beatLane{height:10px;margin-block:.82rem .97rem}
 #rhythmBox .beatLane i{width:28px;height:28px}
 #battle[data-mode=rhythm] #screen{max-height:clamp(108px,calc(100dvh - 367px),510px)}
}
/* Keep a dead space between the touch deck and supporting copy. */
#battle .duelHotkeys,#battle .hint{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#battle .duelHotkeys{margin-top:1.25rem}
@media(pointer:coarse),(max-width:560px){
 #battle .duelHotkeys{display:none}
 #battle .hint{margin-top:24px}
 #battle[data-mode=rhythm] #screen{max-height:clamp(108px,calc(100dvh - 380px),510px)}
}

/* Dim the middle of stage art only. Keep both ends clear for the arena preview. */
#nextTicket{min-height:clamp(45px,10dvh,62px);isolation:isolate}
#nextTicket::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,#24192b2b 0%,#281827cf 25%,#281827e5 50%,#281827cf 75%,#24192b2b 100%)}
#nextStageName{z-index:2;color:#fffaf0;max-width:100%;padding:.42rem .55rem;text-align:center;line-height:1.25;text-shadow:0 1px 3px #170f1a}

#viewRhythmResult{margin:.36rem 0 0 .34rem;min-height:43px;border:1px solid #dec1b6;border-radius:7px;box-shadow:none;background:#fffdfa}
#gradeResults{width:min(100%,31rem);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(3px,1.3vw,9px);margin:.65rem auto 1rem}
#gradeResults>div{display:grid;grid-template-rows:auto auto;justify-items:center;gap:.1rem;padding:.46rem .08rem .37rem;border-radius:9px;background:#ffedb4;color:#543d29}
#gradeResults dt{grid-row:2;font:800 clamp(.52rem,2.05vw,.72rem)/1.13 ui-monospace,monospace}
#gradeResults dd{margin:0;font-size:1.2rem;font-weight:800;font-variant-numeric:tabular-nums}
#gradeResults [data-grade=great]{background:#f9d3e3;color:#6e2949}
#gradeResults [data-grade=cool]{background:#caeee9;color:#1b5651}
#gradeResults [data-grade=bad]{background:#ffdcd1;color:#73382d}
#gradeResults [data-grade=miss]{background:#e3e6ef;color:#414a60}

#rhythmBox #beatConfirm.beat-ready{background:#ffe29a;color:#503226;border-color:#bd8847;box-shadow:0 2px 0 #d49d56,0 0 5px #edc36988}
@media(pointer:coarse),(max-width:560px){
 #rhythmBox .arrow-keys{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(70px,1.55fr)}
 #rhythmBox .arrow-keys button{min-height:54px}
}
#battle[data-mode=rhythm] #danger{padding:.28rem .65rem;border:1px solid #f8d08e;border-radius:999px;background:#67363be8;color:#fff6dc;text-align:center;white-space:nowrap}
#rhythmBox [data-rhythm=guard].guardReady{background:#ffdce7;color:#5f2940;border-color:#b7597b;box-shadow:0 0 0 2px #f2a8c281;font-weight:800}

/* UI copy needs the same locale-specific fallback as the share card. */
:root:lang(zh-Hans){--duel-local-font:"Duel SC",sans-serif}
:root:lang(ja){--duel-local-font:"Duel JP",sans-serif}
:root:lang(ko){--duel-local-font:"Duel KR",sans-serif}
:is(:root:lang(zh-Hans),:root:lang(ja),:root:lang(ko)) :is(body,button,select,.kicker,.duelFoot,.duelHome){font-family:var(--duel-local-font)}
.duel-manual{margin-top:15px;display:grid;gap:8px}
.duel-manual-panel{margin:0;border:1px solid #edd0c0;border-radius:12px;background:#fff9f4;padding:0 12px}
.duel-manual-panel summary{cursor:pointer;min-height:42px;padding:10px 0;font-weight:750}
.duel-manual-panel>div{padding-bottom:10px}.duel-manual-panel p{margin:0;font-size:.92rem;line-height:1.6;overflow-wrap:anywhere}.duel-manual-panel p+p{margin-top:.45rem}
#rhythmBox .rhythm-auto-tip{margin:.35rem 0 .05rem;text-align:center;font-size:.82rem;color:#684236;font-weight:700}
#overlay[data-panel=pause]{align-items:end;background:#30202b40;padding:clamp(.4rem,2vw,1rem)}
#overlay[data-panel=pause] .dialog{width:min(100%,560px);text-align:left;margin:0 auto;background:#fffcf5f7;color:#342c2b;border:1px solid #f1c5a4;border-left:4px solid #ce8161;border-radius:7px;box-shadow:0 5px 11px #331b2260}
#overlay[data-panel=pause] .primary{background:#ad4839;border-color:#ad4839;color:#fffdf9}
/* One drum pad; process the first contact without scroll or double-tap gestures. */
#rhythmBox .tap-lane{height:22px;margin:14px 10px 16px;border-radius:999px}
#rhythmBox .tap-lane:after{left:89%;width:2%;height:calc(100% + 6px);top:-3px;background:#c78f42;box-shadow:0 0 0 4px #ffdeb477}
#rhythmBox .tap-lane i{width:26px;height:26px;z-index:2}
#rhythmBox .tap-lane i svg{stroke:#603c3b;stroke-width:1.2}
#rhythmBox .tap-lane[data-note="idle"] i{visibility:hidden}
.tap-pad-wrap{display:grid;justify-items:center;padding:1px 6px 2px}
#rhythmBox .tap-pad{width:min(100%,430px);min-height:62px;touch-action:none;display:inline-flex;align-items:center;justify-content:center;gap:.57rem;border-radius:18px;color:#5b302d;background:linear-gradient(145deg,#fff3d5,#ffdfac);border:1px solid #d3a56f;box-shadow:0 3px 0 #ce9e68;font-size:1.22rem;user-select:none;-webkit-user-select:none}
#rhythmBox .tap-pad span{font-size:1.58rem;line-height:1}
#rhythmBox .tap-pad:active{box-shadow:0 1px 0 #ce9e68}
@media(pointer:coarse){#rhythmBox .tap-pad{min-height:70px}}

/* Keep the rhythm clock on the existing song row, clear of the arena and tap zone. */
.trackName{display:flex;align-items:center;justify-content:space-between;gap:.4rem .65rem;min-width:0}
#trackNameText{min-width:0;overflow-wrap:anywhere}
.rhythm-timer{display:inline-flex;align-items:center;gap:.32rem;flex:none;border:1px solid #e5bdac;border-radius:999px;background:#fff8f1;color:#67372b;padding:.12rem .5rem;white-space:nowrap}
.rhythm-timer[hidden]{display:none}
.rhythm-timer time{font-weight:850;letter-spacing:.035em;font-variant-numeric:tabular-nums}
.rhythm-timer[data-final]{color:#a2223e;border-color:#d7657c;background:#ffe6ea}

/* Two recognizable mode icons without taking space from mobile text. */
.modePick button{display:flex;align-items:center;justify-content:center;gap:clamp(.34rem,1.2vw,.64rem);padding-inline:.45rem;text-align:left}
.modePick .modeCopy{min-width:0;line-height:1.22}
.modePick .modeCopy small{margin-top:.13rem}
.modePick .modeIcon{display:grid;place-items:center;border-radius:10px;inline-size:clamp(25px,6.5vw,34px);block-size:clamp(25px,6.5vw,34px);flex:none;background:#ffeadc;color:#96502e;border:1px solid #ecd0b5}
.modePick #rhythmMode .modeIcon{background:#fce8f2;color:#a04476;border-color:#efc7db}
.modePick .modeIcon svg{inline-size:73%;block-size:73%}
.modePick button[aria-pressed=true] .modeIcon{box-shadow:0 0 0 1px #ffffffad inset}

.roster small[hidden]{display:none}

/* Three large mobile-friendly difficulty controls, common to both modes. */
.duelDifficulty{min-width:0;margin:.75rem 0 .62rem;padding:0;border:0;color:#69463b}
.duelDifficulty legend{padding:0;margin:0 0 .38rem;color:#69463b;font-size:.86rem;font-weight:700}
.difficultyChoices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(5px,1.45vw,11px)}
.duelDifficulty button{--level-tint:#eef5e6;--level-ink:#436543;display:grid;align-content:center;justify-items:center;gap:.2rem;min-width:0;min-height:64px;padding:.42rem .12rem;background:var(--level-tint);color:var(--level-ink);border:1px solid color-mix(in srgb,var(--level-ink) 36%,white);border-radius:12px;text-align:center;touch-action:manipulation;font-size:clamp(.73rem,2.8vw,.91rem);line-height:1.12}
.duelDifficulty .difficultyNormal{--level-tint:#fff3e2;--level-ink:#7d4929}
.duelDifficulty .difficultyHard{--level-tint:#fce9e9;--level-ink:#963d4a}
.duelDifficulty button[aria-pressed=true]{border-color:var(--level-ink);box-shadow:inset 0 0 0 1px var(--level-ink);background:color-mix(in srgb,var(--level-tint) 79%,var(--level-ink))}
.duelDifficulty button:focus-visible{outline:2px solid var(--level-ink);outline-offset:2px}
.duelDifficulty .difficultyMark{font-size:.79rem;line-height:1;letter-spacing:.13em}
.duelDifficulty .difficultyNote{margin:.4rem 0 0;color:#76554b;font-size:.79rem;line-height:1.38}
@media(hover:hover){.duelDifficulty button:hover{border-color:var(--level-ink)}}

[data-game-surface]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
[data-game-surface] :is(input,textarea,[contenteditable]:not([contenteditable="false"])){
 -webkit-user-select:text;user-select:text;-webkit-touch-callout:default
}
[data-game-surface] :is(img,canvas){-webkit-user-drag:none}
#finishText{max-width:100%;padding-inline:clamp(7px,2vw,14px);overflow-wrap:anywhere;line-height:1.55}
.duelDifficulty button{padding-inline:clamp(4px,1vw,9px)}

/* Rhythm is a points match, not a knockout. Keep both participants in the
   same compact HUD row on phone and desktop, with MP below the player. */
.duel-points:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 .3rem;padding:.18rem 0 .25rem;border-bottom:1px solid #eed6c9;font-size:.75rem;color:#694338}
.duel-points strong{font-size:clamp(1.2rem,3vw,1.6rem);line-height:1.1;font-variant-numeric:tabular-nums;color:#823d38}
.duel-points small{grid-column:1/-1;font-size:.68rem;color:#744e40;line-height:1.35}
#finishDuelScore:not([hidden]){margin:.25rem auto .8rem;color:#7b3c36;font-weight:700}

#controls button[data-action="attack"][data-in-reach="true"]{background:#ffe5c7;border-color:#a45d42;color:#552b25}
#battle[data-mode=arcade] #danger{max-width:88%;overflow-wrap:anywhere;text-align:center;background:#773428;color:#fff7e6;border-radius:999px}


#battle[data-mode=rhythm] #skill{top:40%;transform:translate(-50%,-100%);width:max-content;max-width:43%;left:clamp(24%,var(--skill-x,24%),76%);padding:.22rem .48rem;border:2px solid var(--skill-color,#edacc4);border-radius:.15rem;background:#fffaf0;color:#443032;box-shadow:0 0 0 2px #7c45336d;box-sizing:border-box;gap:.3em;text-align:center;font-size:clamp(.63rem,1.8vw,1rem);line-height:1.3;pointer-events:none}
#battle[data-mode=rhythm] #skill::before{content:"✦";color:var(--skill-color,#edacc4);flex:none;font-size:.78em}
#battle[data-mode=rhythm] #skillName{font-weight:800}
#battle[data-mode=rhythm] #skill img{display:none}
#battle[data-mode=rhythm] #skillName{overflow-wrap:anywhere}
#battle[data-mode=rhythm] #status[data-skill]{color:transparent}

/* Same cream star plaque as Runner, positioned over the caster in both modes. */
#battle[data-mode] #skill{top:var(--skill-top,40%);transform:translate(-50%,-100%);width:max-content;max-width:43%;left:clamp(24%,var(--skill-x,24%),76%);padding:.22rem .48rem;border:2px solid var(--skill-color,#edacc4);border-radius:.15rem;background:#fffaf0;color:#443032;box-shadow:0 0 0 2px #7c45336d;box-sizing:border-box;gap:.3em;text-align:center;font-size:clamp(.63rem,1.8vw,1rem);line-height:1.3;pointer-events:none}
#battle[data-mode] #skill img{display:none}
#battle[data-mode] #skill::before{content:"✦";color:var(--skill-color,#edacc4);flex:none;font-size:.78em}
#battle[data-mode] #skillName{font-weight:800;overflow-wrap:anywhere}