html { scrollbar-gutter: stable; }
.locale-flags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; max-width: 160px; min-height: 21px; }
.locale-flag { display: block; flex: none; width: 28px; height: 21px; aspect-ratio: 4/3; object-fit: cover; border: 1px solid #65766c; border-radius: 2px; }
.flag-fallback { object-fit: contain; border: 0; filter: invert(85%); opacity: .75; }
.build-row .file-size { max-width: 160px; white-space: normal; line-height: 1.6; }
.picker-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.picker-header h2 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.picker-header p { margin: 6px 0 0; font: 12px/1.5 ui-monospace, Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
.picker-header form { margin: 0; }
.icon-button { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--text); cursor: pointer; }
.icon-button:hover { background: #26372e; }
#locale-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #4b6053; border-radius: 6px; background: var(--bg); color: var(--text); box-shadow: 0 18px 70px #0008; overflow: auto; }
#locale-dialog::backdrop { background: #000a; }
body:has(#locale-dialog:modal) { overflow: hidden; }
#locale-dialog .picker-header { position: sticky; top: 0; z-index: 1; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
#locale-dialog .locale-options { padding: 4px 22px 12px; }
.locale-option { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.locale-option:last-child { border-bottom: 0; }
.locale-choice { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 68px; padding: 10px 4px; }
.locale-choice:hover { background: #1b2d23; }
.locale-choice-name { min-width: 0; }
.locale-choice-name strong { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.locale-choice-name small { display: block; margin-top: 2px; color: var(--muted); font: 11px/1.4 ui-monospace, Consolas, monospace; }
.locale-choice-size { white-space: nowrap; color: #b7c9bc; font: 12px/1.5 ui-monospace, Consolas, monospace; }
.locale-option > .checksum { width: 34px; height: 34px; padding: 0; }
.locale-option > .checksum .icon { width: 18px; height: 18px; }
.locale-fallback { padding: 16px 0; margin-bottom: 24px; border-block: 1px solid var(--line); }
.locale-fallback .picker-header { margin-bottom: 10px; }
.selection-error { color: #edc58b; font-size: 12px; }
@media (max-width: 760px) {
  .build-row .locale-flags { justify-content: flex-end; margin-left: auto; }
  .build-row .actions { justify-content: flex-end; }
  .build-row .file-size { max-width: none; }
}
@media (max-width: 480px) {
  #locale-dialog .picker-header { padding: 18px 16px 14px; }
  #locale-dialog .locale-options { padding: 2px 16px 8px; }
  .locale-choice { grid-template-columns: 28px minmax(0, 1fr) 18px; column-gap: 10px; row-gap: 2px; min-height: 76px; }
  .locale-choice > .locale-flag { grid-column: 1; grid-row: 1/3; }
  .locale-choice-name { grid-column: 2; grid-row: 1; }
  .locale-choice-size { grid-column: 2; grid-row: 2; }
  .locale-choice > .icon { grid-column: 3; grid-row: 1/3; }
}
