/* Keep language controls available within each active dialog. */
.locale-toggle,#overlay .locale-toggle { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; min-width:66px; min-height:44px; padding:0 3px; color:var(--dim,#a3afb9); border:0; border-radius:6px; background:transparent; font:500 11px/1.15 system-ui,sans-serif; letter-spacing:.01em; cursor:pointer; white-space:nowrap; }
.locale-toggle-face { display:inline-flex; align-items:center; justify-content:center; gap:6px; box-sizing:border-box; min-width:60px; height:28px; padding:0 8px; border:1px solid #a3afb920; border-radius:5px; background:#a3afb904; }
.locale-toggle svg { width:10px; height:10px; flex:none; opacity:.7; }
.locale-toggle:hover,#overlay .locale-toggle:hover { color:var(--ink,#e5e1d7); background:transparent; }
.locale-toggle:hover .locale-toggle-face,.locale-toggle[aria-expanded="true"] .locale-toggle-face { border-color:#a3afb94d; background:#a3afb90a; }
.locale-toggle:focus-visible,#overlay .locale-toggle:focus-visible,.locale-settings-row select:focus-visible { outline:2px solid var(--gold,#c8aa71); outline-offset:1px; }
html[data-locale-input="pointer"] .locale-toggle:focus,html[data-locale-input="pointer"] #overlay .locale-toggle:focus,html[data-locale-input="pointer"] #enemySkillDialog .locale-toggle:focus { outline:none; }
.locale-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
/* Match the visible face-to-icon gap to the gaps between the header icons. */
.header-tools .locale-toggle { margin-right:9px; }
.locale-dialog-toggle { margin-left:auto; margin-right:5px; }
.ux-dialog-head>div:first-child { min-width:0; }
.locale-result-toggle { position:absolute; right:14px; top:max(14px,env(safe-area-inset-top)); z-index:1; }
.locale-menu { position:fixed; z-index:5000; box-sizing:border-box; width:162px; margin:0; padding:5px; overflow:auto; overscroll-behavior:contain; border:1px solid #46535f; border-radius:8px; background:#15212b; color:#e5e1d7; box-shadow:0 8px 24px #0006; font:13px/1.4 system-ui,sans-serif; letter-spacing:0; }
.locale-menu>button,#overlay .locale-menu>button { display:flex; align-items:center; justify-content:space-between; gap:15px; box-sizing:border-box; width:100%; min-height:44px; margin:0; padding:9px 11px; border:0; border-radius:4px; background:transparent; color:#c5cdd2; font:inherit; letter-spacing:0; text-align:left; cursor:pointer; }
.locale-menu>button:hover,.locale-menu>button:focus-visible,#overlay .locale-menu>button:hover,#overlay .locale-menu>button:focus-visible { background:#ffffff09; color:#f1ede3; outline:1px solid #a3afb955; outline-offset:-1px; }
.locale-menu>button[aria-checked="true"],#overlay .locale-menu>button[aria-checked="true"] { color:var(--gold,#c8aa71); }
.locale-option-check { width:14px; flex:none; font-size:12px; }
.locale-settings-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px 16px; padding:0 0 18px; margin:0 0 8px; border-bottom:1px solid var(--line,#3c4955); }
.locale-settings-row label { font:500 14px/1.5 var(--sans,system-ui,sans-serif); color:var(--ink,#e5e1d7); }
.locale-settings-row select { width:128px; max-width:100%; min-height:44px; padding:9px 12px; border-radius:7px; border:1px solid #586773; background:#15222d; color:#e5e1d7; font:14px system-ui,sans-serif; }
.locale-setting-hint { grid-column:1/-1; margin:0; color:var(--dim,#a3afb9); font:12px/1.6 var(--sans,system-ui,sans-serif); }
html[lang="en"] { --sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --display:Georgia,"Times New Roman",serif; }
html[lang="en"] body { font-family:var(--sans); }
html[lang="en"] .brand-type b { letter-spacing:.025em; white-space:nowrap; }
html[lang="en"] .panel-title,html[lang="en"] #ovTitle { letter-spacing:.02em; }
html[lang="en"] .status-card-title,html[lang="en"] .talent-stage-copy,html[lang="en"] .talent-group-heading-copy { min-width:0; }
html[lang="en"] .status-card-title h3,html[lang="en"] .talent-stage-name,html[lang="en"] .sname { overflow-wrap:break-word; word-break:normal; }
html[lang="en"] .enemy-skill-chip b { white-space:normal; line-height:1.2; }
html[lang="en"] .enemy-skill-chip small { font-size:10px; }
html[lang="en"] .command-heading .panel-title { font-size:clamp(19px,5.5vw,27px); }
html[lang="en"] .rarity-tag,html[lang="en"] .skill-type,html[lang="en"] .instant-tag { letter-spacing:0; }
@media(max-width:767px) {
  .header-tools .locale-toggle { margin-right:9.5px; }
}
@media(max-width:420px) {
  #appHeader { padding-left:10px; padding-right:10px; gap:6px; }
  #appHeader .brand { gap:5px; min-width:0; }
  #appHeader .brand-type b { font-size:12px; letter-spacing:.04em; }
  #appHeader .brand-type small { font-size:6px; letter-spacing:.08em; }
  #appHeader .brand-mark { width:21px; }
  #appHeader .header-tools .tool-btn,#appHeader .header-tools #muteBtn { width:35px; min-width:35px; padding:7px; }
  #appHeader .header-tools { gap:0; flex-shrink:0; }
  .header-tools .locale-toggle { min-width:62px; padding:0 2px; margin-right:6px; font-size:10px; }
  .header-tools .locale-toggle-face { min-width:58px; padding:0 6px; }
  html[lang="en"] #appHeader .brand-type b { font-size:11px; letter-spacing:0; }
  .locale-dialog-toggle { min-width:62px; margin-right:3px; }
}
html[lang="en"] .brand-type small { display:none; }
html[lang="en"] #appHeader .brand-type b { font-size:13px; }
html[lang="en"] .ux-combo-demo span b { letter-spacing:0; }
@media(max-width:350px) {
  html[lang="en"] .command-bar-title { white-space:normal; text-overflow:clip; line-height:1.05; }
}

/* Stack language settings on narrow screens. */
@media(max-width:350px) {
  .locale-settings-row { grid-template-columns:minmax(0,1fr); }
  .locale-settings-row select { width:100%; }
}

/* All-resource skills state their real cost while preserving a narrow cost column. */
.skill .cost .c-min { display:block; margin-top:2px; color:var(--dim,#a3afb9); font:9px/1.3 var(--sans,system-ui,sans-serif); white-space:nowrap; }
.skill .cost .c-sp-all { display:flex; align-items:center; justify-content:flex-end; gap:3px; }
