:root{--ui-font:Pixel,monospace}
:root:lang(zh-CN){--ui-font:"DfCJK-sc",sans-serif}:root:lang(ja){--ui-font:"DfCJK-jp",sans-serif}:root:lang(ko){--ui-font:"DfCJK-kr",sans-serif}
html body,html body button,html body input,html body select,html body textarea,html body h1,html body h2,html body h3,html body p,html body span,html body small,html body b,html body strong,html body label,html body div,html body a,html body footer,html body dt,html body dd{font-family:var(--ui-font)}
html body .hero h1,html body .load-wrap h1,html body .studio-credit,html body .studio-name{font-family:Pixel,monospace}
html:not(:lang(en)) body{font-variant-ligatures:none}
:is(html:lang(zh-CN),html:lang(ja),html:lang(ko)) body *{letter-spacing:normal!important;text-transform:none;word-break:normal;line-break:strict}
#menu header{display:flex;align-items:center;gap:14px;flex-wrap:wrap}#menu .edition{margin-left:auto}
#language-open{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 14px;font-size:18px;line-height:1.25;background:#233d4d;border:2px solid #88b1c1;color:#f9f1d8;white-space:nowrap}
#language-open b{font-size:19px}.lang-flag{width:30px;height:20px;flex:none;box-shadow:0 0 0 1px #ffffff60}
#language-dialog{position:fixed;inset:0;z-index:2500;background:#07121edb;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));touch-action:pan-y}
#language-dialog[hidden]{display:none}.lang-panel{width:min(620px,100%);max-height:100%;overflow:auto;background:#233a49;border:2px solid #8aafbe;border-top:5px solid #ffc68b;box-shadow:10px 10px 0 #06111a80;padding:24px}
.lang-panel header{display:flex;align-items:center;justify-content:space-between;gap:16px}.lang-panel h2{font-size:30px;line-height:1.2;margin:0}.lang-panel p{font-size:17px;line-height:1.5;margin:14px 0;color:#d1e1e6}.lang-panel header button{width:48px;min-height:48px;font-size:28px;flex:none}
.lang-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lang-list button{display:flex;align-items:center;gap:14px;padding:14px;min-height:58px;background:#304e5e;border:2px solid #7698a6;color:#fff3d8;font-size:19px;text-align:left;line-height:1.3}.lang-list button b{margin-left:auto;opacity:0}.lang-list button.selected{border-color:#ffce8c;background:#3c5d6c}.lang-list button.selected b{opacity:1;color:#ffce8c}.lang-list button:hover{background:#456677}.lang-list button:focus-visible,#language-open:focus-visible{outline:3px solid #ffce8c;outline-offset:3px}
.lang-list [lang="zh-CN"],.lang-list [lang="ja"],.lang-list [lang="ko"],#language-open [lang="zh-CN"],#language-open [lang="ja"],#language-open [lang="ko"]{font-family:"DfLanguageNames",sans-serif;font-size:18px}
#language-status{min-height:1.5em;margin-bottom:0}.lang-panel[aria-busy="true"]{cursor:progress}
html[data-locale-pending] #menu{visibility:hidden}
/* Text grows into space or scrolls; translations never shrink to fit. */
.panel{max-height:calc(100dvh - 32px);overflow-y:auto}.panel p,.help-panel p,.setting-note{font-size:16px;line-height:1.5}.panel button,.panel select{font-size:17px;line-height:1.3;min-height:48px;height:auto;white-space:normal}.panel h2{line-height:1.15;overflow-wrap:anywhere}.setting{gap:14px;flex-wrap:wrap}.setting>span{flex:1;min-width:140px}
.hero .primary,.hero .secondary,.hero .quiet{height:auto;min-height:54px;white-space:normal;line-height:1.25}.hero .tagline{line-height:1.5}.hero .race-info{flex-wrap:wrap;row-gap:12px}.hero .race-info span{min-width:0}.wordmark>span{line-height:1.3}
.cine-caption,#hq-dialogue,#mc-dialogue{height:auto;min-height:0;max-height:44dvh;overflow-y:auto}.cine-caption p,#hq-line,#mc-dialogue-text{font-size:clamp(19px,2.2vw,28px)!important;line-height:1.5!important;overflow-wrap:break-word;white-space:normal}.cine-speaker,#mc-dialogue header{flex-wrap:wrap;gap:8px}.cine-speaker small,#hq-tag,#mc-comms-type{font-size:14px;line-height:1.4}
#boss-name,#ar-intro-name{font-size:clamp(28px,4.2vw,64px);line-height:1.15;overflow-wrap:break-word;max-width:100%}#boss-subtitle,#ar-intro-note{font-size:clamp(17px,1.8vw,24px);line-height:1.4;white-space:normal}.boss-copy{max-width:88vw}.boss-footer{gap:16px;flex-wrap:wrap;font-size:14px}.boss-topline{font-size:15px}
#ar-head>div:first-child{min-width:0}#ar-heading{font-size:20px;line-height:1.3}#ar-head small,#ar-status,#ar-wallet{font-size:14px;line-height:1.4}#ar-head button{font-size:16px;white-space:normal;min-height:48px}#ar-class-copy p{font-size:17px;line-height:1.5}#ar-class-copy small{font-size:14px;line-height:1.4}#ar-class-copy h3{font-size:20px;line-height:1.3}#ar-wheel-core p{font-size:16px;line-height:1.3}
#ar-classes button{overflow:visible}#ar-classes button strong{font-size:15px;line-height:1.3;overflow-wrap:anywhere}#ar-classes button span{font-size:13px;line-height:1.35;overflow-wrap:anywhere}#ar-wheel-nav span{font-size:13px;line-height:1.4}
#ar-sheet button,#ar-sheet select,#ar-stations button{font-size:16px;line-height:1.35;white-space:normal;height:auto;min-height:48px}#ar-sheet p,#ar-sheet label,#ar-sheet dl{font-size:17px;line-height:1.5}#ar-sheet h2,#ar-sheet h3{line-height:1.25;overflow-wrap:anywhere}#ar-sheet small,#ar-sheet .ar-note{font-size:14px;line-height:1.5}#ar-sheet .ar-skill{min-height:96px;height:auto}#ar-sheet .ar-skill strong{font-size:17px;line-height:1.35;overflow-wrap:anywhere}#ar-sheet .ar-skill small{font-size:13px}#ar-sheet .ar-detail{min-width:0}#ar-panel-body{min-height:0}.ar-gear-list button strong{font-size:17px;line-height:1.35}.ar-gear-list button small{font-size:13px;line-height:1.4}
.up-node strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere}.up-node small{font-size:13px;line-height:1.3}.up-node{overflow:visible}.up-detail p{font-size:17px;line-height:1.5}.up-detail small,.up-hint{font-size:14px;line-height:1.4}.up-tabs button,.up-footer button,#up-toggle{font-size:16px;line-height:1.3;white-space:normal;min-height:48px}.up-head h2{line-height:1.2}.up-head p,.up-footer p{font-size:16px;line-height:1.45}
#mc-subtitle,#toast,#route-status,#portal-note{white-space:normal;line-height:1.4;overflow-wrap:break-word}#portal-title{line-height:1.2;overflow-wrap:break-word}.vc-skip{white-space:normal;font-size:15px;line-height:1.3;min-height:46px;gap:10px}#mc-ending-title{font-size:clamp(28px,5vw,72px);line-height:1.2;white-space:normal}
@media(max-width:700px){#menu header{gap:10px}#menu .edition{display:none}#language-open{margin-left:auto;max-width:54%;font-size:16px}.lang-panel{padding:18px}.lang-list button{padding:12px;gap:10px;font-size:17px}.lang-panel h2{font-size:25px}.panel{max-height:calc(100dvh - 20px)}#ar-head{flex-wrap:wrap}#ar-wallet{font-size:13px}.cine-caption p,#hq-line,#mc-dialogue-text{font-size:19px!important}.up-head h2{font-size:24px}.up-detail{overflow:auto}}
@media(max-width:420px){.lang-list{grid-template-columns:1fr}.lang-list button{min-height:52px}#menu .wordmark>span{display:none}#ar-stations{flex-wrap:wrap}#ar-stations button{flex:1 1 40%}.panel h2{font-size:28px}.race-info{font-size:13px!important}}
@media(max-height:500px) and (min-width:601px){.lang-panel{width:min(760px,100%);padding:16px}.lang-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.lang-list button{min-height:48px;padding:10px;font-size:17px}.lang-panel p{margin:8px 0}.lang-panel h2{font-size:24px}.lang-panel header button{min-height:40px;height:40px}.cine-caption,#hq-dialogue,#mc-dialogue{max-height:43dvh}.cine-caption p,#hq-line,#mc-dialogue-text{font-size:18px!important}#language-open{min-height:44px;padding:7px 12px;font-size:16px}.hero .primary,.hero .secondary,.hero .quiet{min-height:48px;font-size:16px}.hero .menu-tools{gap:6px}#ar-stations button{font-size:14px;padding:10px 8px}}
html body .hero h1 *,html body .load-wrap h1 *{font-family:Pixel,monospace}
.panel .setting-note,.panel>small,.panel .instruction p{font-size:17px;line-height:1.5}.panel .instruction h3{font-size:19px;line-height:1.4}.setting{font-size:18px}.setting select{min-width:125px;max-width:100%}.panel h2{font-size:clamp(28px,4vw,44px)}
#ar-select{display:flex;flex-direction:column;overflow:hidden}#ar-select-body{flex:1;min-height:0;overflow:auto;padding-bottom:14px;scrollbar-width:thin}#ar-enter{flex:none;position:static!important;font-size:18px!important;margin-top:12px!important;min-height:50px!important;line-height:1.3}#ar-wheel{min-width:320px}#ar-wheel-core{width:37%}#ar-wheel-core small{font-size:12px;line-height:1.3;letter-spacing:0}#ar-select #ar-class-name{font-family:Pixel,monospace;font-size:21px;line-height:1.3;white-space:nowrap}#ar-select #ar-class-role{font-size:14px;line-height:1.4;letter-spacing:0;overflow-wrap:anywhere}#ar-class-count{font-size:14px}
#ar-classes button{clip-path:none;gap:5px;padding:8px 4px!important;box-sizing:border-box}#ar-classes button strong{font-family:Pixel,monospace;white-space:nowrap;font-size:16px;line-height:1.25;letter-spacing:0}#ar-classes button span{font-size:14px;line-height:1.2;overflow-wrap:anywhere;max-width:100%}#ar-classes button i{font-size:16px}#ar-wheel-nav{position:static;justify-content:center;gap:12px;margin:8px 0 12px}#ar-wheel-nav span{display:block;font-size:14px;letter-spacing:0}#ar-wheel-nav button{min-height:44px;width:44px}#ar-select .ar-class-stats>span{font-size:14px}#ar-select #ar-class-copy>p{font-size:17px}#ar-ui .ar-trait small{font-size:14px}#ar-head{height:auto;min-height:58px}#ar-head small{letter-spacing:0}#ar-sheet .ar-tabs button{font-size:16px!important;min-height:48px;line-height:1.3;padding:8px!important}#ar-sheet .ar-skill small{font-size:13px!important;line-height:1.3}#ar-sheet .ar-detail>small,#ar-panel-tag{font-size:14px!important;line-height:1.4}#ar-sheet .ar-detail p{font-size:17px;line-height:1.5}#ar-sheet .ar-note{font-size:15px}.ar-skill strong{hyphens:auto}
@media(max-height:540px) and (min-width:651px){#ar-select{width:46%;top:84px;bottom:8px}#ar-head>div:first-child{max-width:44%}#ar-overlay{padding:8px}#ar-sheet{padding:12px}#ar-sheet>header{padding-bottom:8px}#ar-sheet h2{font-size:24px;margin:4px 0}#ar-panel-body{padding-top:10px}.ar-build{height:auto;min-height:230px}.ar-skill-map{max-height:45dvh;min-height:230px}.ar-detail{max-height:45dvh;min-height:230px}#ar-sheet .ar-armory{height:auto;min-height:260px}.ar-armory .ar-detail,.ar-gear-list{max-height:58dvh;min-height:240px}#ar-sheet .ar-gear-stage{min-height:240px}.ar-gear-preview{max-height:230px}}
@media(max-width:650px){#ar-select{top:36%;left:8px;right:8px;padding:10px}#ar-wheel{min-width:300px}#ar-head{gap:5px;flex-wrap:nowrap}#ar-head>div:first-child{padding:8px;flex:1}#ar-heading{font-size:16px}#ar-head small,#ar-status{font-size:12px}#ar-head button{font-size:14px;min-height:44px;padding:8px}#ar-home{max-width:110px}#ar-sheet .ar-detail{overflow:visible;max-height:none}#ar-sheet .ar-skill-map{grid-template-columns:repeat(2,minmax(0,1fr));max-height:40dvh;min-height:240px}#ar-sheet .ar-skill{min-height:100px}#ar-sheet .ar-tabs{flex-wrap:wrap}#ar-sheet .ar-tabs button{flex:1 1 40%}#ar-sheet .ar-armory{height:auto}}
@media(max-height:500px) and (min-width:601px){
 #menu{grid-template-columns:minmax(0,1fr) minmax(140px,25%);grid-template-rows:auto 1fr auto;overflow-y:auto;padding:10px 4%;gap:12px}#menu .edition{display:none}#language-open{margin-left:auto}.hero{display:grid;grid-template-columns:minmax(150px,1fr) minmax(170px,1fr);grid-template-rows:auto auto auto;gap:8px 16px;align-items:start}.hero .eyebrow{grid-column:1/-1;grid-row:1;margin:0;font-size:14px;line-height:1.3}.hero h1{grid-column:1;grid-row:1/4;font-size:64px;margin:0}.hero .tagline{display:none}.hero .race-info{grid-column:1;grid-row:4;margin:0;gap:10px;font-size:13px!important;flex-wrap:nowrap;align-self:start}.hero .race-info b{font-size:24px}.hero #start{grid-column:2;grid-row:1;margin:0;min-height:48px;padding:10px;font-size:18px}.hero #arena-start{grid-column:2;grid-row:2;min-height:48px;font-size:18px}.hero .menu-tools{grid-column:2;grid-row:3;display:flex;flex-direction:row;gap:6px;margin:0;align-self:start}.hero .menu-tools button{flex:1;padding:7px;font-size:17px}.car-picker{width:100%;padding:10px;align-self:center;margin:0}.car-picker>.eyebrow{font-size:14px;line-height:1.4}.car-picker .swatches{gap:8px;justify-items:center;margin:10px 0}.car-picker #paint-name{font-size:14px;white-space:normal}#menu footer{padding-top:8px;font-size:14px;align-items:start;gap:10px}#record{font-size:14px;max-width:55%;line-height:1.4}#menu footer small{display:none}
}

@media(max-height:540px) and (min-width:651px){#ar-select{top:104px}#ar-head small{font-size:13px}}

#menu footer #record{margin-left:auto;text-align:right}
