/* Twelve-language geometry. Locale changes never alter navigation or card boxes. */
.language-picker{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0;width:100%;font:500 15px/1.4 var(--font-ui)}
.language-picker>span{min-width:0;overflow-wrap:anywhere}
.language-select{box-sizing:border-box;min-width:160px;max-width:100%;min-height:42px;padding:8px 34px 8px 12px;border:1px solid #8a9aaa80;border-radius:4px;background:#122334;color:#f0e5ce;color-scheme:dark;font:500 15px/1.35 var(--font-ui)}
.language-select option{background:#122334;color:#f0e5ce}
#profile #language-setting-row{display:flex;align-items:center;min-height:66px}
#profile #language-setting-row .language-picker{flex:1}
.wallet-top .language-picker,#tutintro .welcome-topline .language-picker{width:auto;flex:0 1 auto;gap:12px;padding:3px 3px 3px 12px;text-transform:none;letter-spacing:0}
.wallet-top>span,#tutintro .welcome-edition{min-width:0;overflow-wrap:anywhere}
body.pc{--shell-nav-width:clamp(144px,8.55vw,164px);--shell-avatar-size:108px}
body.pc .phone{grid-template-columns:var(--shell-nav-width) minmax(0,1fr);grid-template-rows:140px minmax(0,1fr)}
body.pc .top .center.hud-unified{height:var(--shell-avatar-size)}
body.pc .hud-unified .shell-avatar{width:var(--shell-avatar-size);height:var(--shell-avatar-size);justify-self:center}
body.pc .shell-sidebar .nav{width:100%;padding:7px;box-sizing:border-box}
body.pc .shell-sidebar .nav button{width:100%;padding:8px 7px;box-sizing:border-box;gap:5px}
body.pc .shell-sidebar .nav button::after{display:flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:100%;min-width:0;min-height:38px;padding:0 3px;white-space:normal;overflow-wrap:normal;hyphens:auto;text-align:center;font-size:16px;line-height:19px;letter-spacing:0}
body.pc .shell-sidebar :is(#helpbtn,#settingsbtn){padding:6px 10px;gap:7px;font-size:16px;letter-spacing:0;line-height:19px;white-space:normal}
body.pc .shell-sidebar :is(#helpbtn,#settingsbtn) span{min-width:0;overflow-wrap:anywhere}
body.pc .shell-sidebar :is(#helpbtn,#settingsbtn)::before{flex:none;width:22px;height:24px}

/* The title always reserves two lines; the art flexes inside the same 5:7 frame. */
body.pc .ucard:not(.bempty) .shell-name{--card-name-size:clamp(12px,calc(var(--card-width,322px)*.065),22px);display:flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;height:calc(var(--card-name-size)*2.3 + 8px);min-height:0;padding:3px 4px;font-size:var(--card-name-size);line-height:1.15;white-space:normal;overflow-wrap:anywhere;hyphens:auto;text-overflow:clip}
body.pc #deck .strip .ucard .shell-name{display:none}
body.pc #battle .battle-name{--battle-name-size:clamp(12px,calc(var(--card-width,256px)*.0547),17px);height:calc(var(--battle-name-size)*2.3 + 6px);padding:2px 3px;font-size:var(--battle-name-size);line-height:1.15;overflow-wrap:anywhere;hyphens:auto;white-space:normal;text-overflow:clip}
body.pc #battle .bstats :is(.lvchip,.ab){bottom:calc(clamp(12px,var(--card-width,256px)*.0547,17px)*2.3 + 6px + clamp(24px,var(--card-width,256px)*.1094,34px) + 6px + var(--card-width,256px)*.043)}
body #deck #shardrows .sname{box-sizing:border-box;min-height:2.5em;height:2.5em;margin-bottom:5px;white-space:normal;overflow-wrap:anywhere;hyphens:auto;text-overflow:clip}
#profile .collection-card-info strong{hyphens:auto}
body #cardview :is(.cv-name,.cv-nm){white-space:normal;overflow-wrap:anywhere;hyphens:auto}

/* Fixed grids retain their placement while translated captions wrap inside. */
body.pc #deck .mode{min-width:0;padding-inline:10px;gap:6px}
body.pc #deck .mode::after{min-width:0;max-width:calc(100% - 40px);line-height:1.2;white-space:normal;text-align:center;overflow-wrap:anywhere;hyphens:auto}
body.pc #deck .mode .mimg{flex:none}
body.pc #deck .shell-reserve{min-height:28px}
body.pc #deck .shell-reserve small{max-width:65%;line-height:1.35;white-space:normal}
body #deck :is(.burn-gain-title,.fusion-preview-title,.fusion-rank,.wk-action-label){white-space:normal;overflow-wrap:anywhere;hyphens:auto}
body #deck :is(.burn-gain-row,.fusion-preview-row){gap:5px}
body #deck :is(.burn-gain-row,.fusion-preview-row)>span{min-width:0;line-height:1.15;overflow-wrap:anywhere;hyphens:auto}
body #deck :is(.burn-gain-row,.fusion-preview-row) b{flex:none;white-space:nowrap}
body #deck :is(.burn-empty,.fusion-empty,.shard-empty) :is(strong,span){overflow-wrap:anywhere;hyphens:auto}
body #deck .wk-summary-copy{overflow-wrap:anywhere;hyphens:auto}
body #deck .workshop-cost{white-space:normal;line-height:1.2}
#profile .ptabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
#profile .ptab{min-width:0;padding-inline:10px;white-space:normal;line-height:1.25;text-align:center;overflow-wrap:anywhere}
#profile .ptab img{flex:none}
#profile .profile-panel-heading{gap:12px}
#profile :is(.settings-action,.nameedit,.resetbtn,.profile-filter-reset){white-space:normal;overflow-wrap:anywhere;line-height:1.3}
#profile :is(.profile-milestones small,.profile-stat>span,.collection-filters label>span){overflow-wrap:anywhere;hyphens:auto}
#profile .collection-filters{flex-wrap:wrap}
#profile .collection-filters label{min-width:140px}
#profile .profile-filter-reset{max-width:100%}
body #battle .bctrl .bbtn{white-space:normal;line-height:1.15}
body.pc #battle>.combat-side.player{grid-template-columns:minmax(150px,240px) minmax(120px,1fr) clamp(180px,14vw,242px)}
body #campaign :is(.campaign-action,.campaign-heading,.campaign-copy),body #home :is(.home-tournament-title,.tour-primary,.tour-secondary){overflow-wrap:anywhere;hyphens:auto}

@media(min-width:1000px) and (max-height:900px){
 body.pc{--shell-avatar-size:88px}
 body.pc .phone{grid-template-rows:112px minmax(0,1fr)}
 body.pc .shell-sidebar .nav{padding:5px}
 body.pc .shell-sidebar .nav button{height:clamp(86px,12.9vh,110px);padding:5px 6px;gap:3px}
 body.pc .shell-sidebar .nav button::after{font-size:15px;line-height:18px;min-height:36px;letter-spacing:0}
 body.pc .shell-sidebar .nav button[data-go] img.ng{width:48px;height:48px;flex:none}
 body.pc .shell-sidebar :is(#helpbtn,#settingsbtn){height:44px;font-size:15px}
 body.pc #deck .topzone .ucard:not(.bempty) .shell-name{font-size:var(--card-name-size)}
}
@media(min-width:1000px) and (max-height:700px){
 body.pc{--shell-avatar-size:76px}
 body.pc .phone{grid-template-rows:96px minmax(0,1fr)}
 body.pc .shell-sidebar .nav{max-height:calc(100% - 54px)}
 body.pc .shell-sidebar .nav button{height:92px;max-height:92px}
 body.pc .shell-sidebar .nav button[data-go] img.ng{width:42px;height:42px}
 body.pc .shell-sidebar :is(#helpbtn,#settingsbtn){height:44px;flex-direction:row;gap:7px}
}
@media(max-width:999px){
 .language-picker{gap:10px;flex-wrap:wrap}
 .language-select{flex:1;min-width:160px}
 body:not(.pc) .shell-sidebar .nav button::after{font-family:var(--font-ui);font-size:15px;line-height:17px;letter-spacing:0;min-height:34px;display:flex;align-items:center;justify-content:center;white-space:normal;hyphens:auto;overflow-wrap:anywhere}
 body:not(.pc) .shell-sidebar .nav button{height:auto;min-height:64px;padding-inline:2px;gap:2px}
 #profile .ptab{gap:5px;font-size:13px;padding-inline:5px}
 #profile .ptab img{width:22px;height:22px}
 #profile .collection-filters label{min-width:110px}
 #profile .profile-filter-reset{width:100%}
 body #deck #shardrows .sname{font-size:15px;line-height:1.25}
}
@media(max-width:599px){
 .wallet-top,#tutintro .welcome-topline{flex-wrap:wrap;row-gap:12px}
 .wallet-top .language-picker,#tutintro .welcome-topline .language-picker{width:100%;flex-wrap:nowrap;justify-content:space-between;box-sizing:border-box}
 .wallet-top>span{max-width:none}
 .wallet-top .language-select,#tutintro .welcome-topline .language-select{flex:0 1 180px}
}
