/* CJK layout: natural line breaks and scrollable content at phone landscape sizes. */
html:lang(ja) body{font-family:"Yu Gothic UI","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif}
html:lang(zh) body{font-family:"Microsoft JhengHei","PingFang TC","Noto Sans TC",sans-serif}
html:is(:lang(ja),:lang(zh)) :is(button,input,select,textarea,.release-panel,.account-entry-card070,.family352){font-family:inherit}
html:is(:lang(ja),:lang(zh)) .settings-group045 small{font-size:12px;line-height:1.5}
html:is(:lang(ja),:lang(zh)) :is(.release-content,.account-entry-card070,.family352,.nickname-entry195,.billing-confirm560){word-break:normal;line-break:strict;overflow-wrap:anywhere}
html:is(:lang(ja),:lang(zh)) :is(.release-content,.release-panel-head,.account-entry-card070,.family352) :is(h1,h2,h3,p,small,strong,label,a,button){min-width:0;max-width:100%;box-sizing:border-box}
html:is(:lang(ja),:lang(zh)) .release-panel-head h2{line-height:1.35;overflow-wrap:anywhere}
html:is(:lang(ja),:lang(zh)) :is(.signup-links,.account-actions070){gap:8px;flex-wrap:wrap}
html:is(:lang(ja),:lang(zh)) .signup-links a{white-space:normal;line-height:1.4}
html:is(:lang(ja),:lang(zh)) :is(.release-notice,.toast){max-width:calc(100vw - 24px);white-space:normal;overflow-wrap:anywhere;text-align:center;box-sizing:border-box}
html:is(:lang(ja),:lang(zh)) .billing-confirm560{overflow-y:auto}
html:is(:lang(ja),:lang(zh)) .billing-confirm560 label{align-items:flex-start!important}
html:is(:lang(ja),:lang(zh)) .billing-confirm560 input[type=checkbox]{flex:0 0 18px;min-width:18px}
.language-asia4{grid-column:1/-1;min-width:0;border-top:1px solid #708b8e;padding-top:10px}
.language-asia4 label{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-width:0}
.language-asia4 select{font:inherit;min-height:44px;max-width:100%;min-width:180px;color:#fff2d1;background:#142f3b;border:1px solid #708b8e;padding:6px 10px}
.language-asia4 option{color:#fff2d1;background:#142f3b}
.language-status-asia4{font-size:12px;line-height:1.5;margin:6px 0 0;overflow-wrap:anywhere}
.language-status-asia4:empty{display:none}
html:lang(ja) #releasePanel button.story-map-node185[data-state=locked]::after{content:"未解放";font-size:10px}
html:lang(zh) #releasePanel button.story-map-node185[data-state=locked]::after{content:"未解鎖";font-size:10px}
html:is(:lang(ja),:lang(zh)) #boot074 .boot-status448{top:calc(50% + 34px);bottom:auto;margin:0;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
html:is(:lang(ja),:lang(zh)) #boot074.boot-error448 .boot-brand074{transform:translateY(-48px)}
html:is(:lang(ja),:lang(zh)) #boot074.boot-error448 .boot-status448{top:calc(50% - 12px)}
/* Older square-card rules positioned portraits over the translated name. */
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-grid076{align-items:stretch!important}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-grid076 .work-card076{display:flex!important;flex-direction:column;align-items:stretch!important;justify-content:flex-start!important;gap:4px!important;aspect-ratio:auto!important;height:auto!important;min-height:0!important}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-card076>.work-portrait089{position:static!important;inset:auto!important;transform:none!important;display:block;order:0;flex:0 0 auto!important;width:100%!important;height:104px!important;object-fit:contain}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-card076>.work-name089{position:static!important;inset:auto!important;transform:none!important;order:1;display:flex;align-items:center;justify-content:center;width:auto!important;height:auto!important;min-height:2.6em!important;max-height:none!important;margin:0!important;padding:0 2px!important;box-sizing:border-box;font-size:12px!important;line-height:1.3;white-space:normal!important;overflow:visible;text-align:center;background:none!important}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-card076>.work-level089{position:static!important;inset:auto!important;order:2;flex:0 0 auto;line-height:1.3}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-card076>.work-material089{position:static!important;inset:auto!important;transform:none!important;order:3;display:flex;flex-direction:column;align-items:stretch;gap:2px;width:100%!important;height:auto!important;min-height:22px!important;max-height:none!important;margin:0!important;margin-top:auto!important;box-sizing:border-box}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-material089 :is(progress,small){position:static!important;inset:auto!important;transform:none!important;width:100%;margin:0}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-material089 progress{height:6px!important;flex:0 0 6px;border:0!important}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-material089 small{height:auto;line-height:1.3!important;text-align:center;text-shadow:none!important}
html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-card076>.upgrade-ready076{position:static!important;inset:auto!important;order:4}
@media(max-height:500px){html:is(:lang(ja),:lang(zh)) #releasePanel .work044 .work-card076>.work-portrait089{height:54px!important}}
@media(max-height:400px){html:is(:lang(ja),:lang(zh)) .account-entry-card070{margin-block:0}.language-asia4{padding-top:6px}.language-asia4 select{min-height:44px}}

/* New residence control: minimum touch target and wrapping for all UI languages. */
.account-legal070[data-signup-step=residence] select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:8px 10px;font:inherit;color:inherit;background:#142f3b;border:1px solid #708b8e;border-radius:5px}
.account-legal070[data-signup-step=residence] .signup-consent-row{display:flex;align-items:flex-start;gap:8px;line-height:1.5;overflow-wrap:anywhere}
.account-legal070[data-signup-step=residence] input[type=checkbox]{flex:0 0 18px;width:18px;min-width:18px;margin-top:3px}

/* Mobile workshop portrait size: reserve full art height and let card rows scroll. */
@media (max-height:599px), (max-width:767px) {
 html:is(:lang(ja),:lang(zh)) #releasePanel .work044.work089 .work-grid076{grid-auto-rows:max-content!important;align-items:stretch!important;overflow-y:auto}
 html:is(:lang(ja),:lang(zh)) #releasePanel .work044.work089 .work-grid076 .work-card076{min-height:200px!important;height:auto!important}
 html:is(:lang(ja),:lang(zh)) #releasePanel .work044.work089 .work-card076>.work-portrait089{height:112px!important;flex:0 0 112px!important;object-fit:contain}
}
