[data-location-open]{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-items:center;border:0;background:transparent;text-align:left;color:var(--ink);padding:7px 4px;min-height:44px;min-width:0;max-width:215px;cursor:pointer}
[data-location-open]>svg{width:21px;height:21px;grid-column:1;grid-row:1/3;flex-shrink:0}
[data-location-label]{grid-column:2;display:block;font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
[data-location-hint]{grid-column:2;display:block;font-size:9px;line-height:1.6;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#location-dialog{width:min(650px,calc(100% - 28px));max-height:90vh;background:#fff;overflow-y:auto}
#location-dialog h2{font-size:24px;line-height:1.4;margin:0}
.location-scope{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0 10px;border:0;padding:0;min-width:0}
.location-scope legend{font-size:12px;font-weight:700;margin-bottom:8px}
.location-scope label{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;font-size:13px;min-height:44px;cursor:pointer}
.location-scope input{width:17px;height:17px;flex:none;accent-color:var(--accent-ink);margin:0}
.location-scope label:has(input:checked){background:var(--soft-light);border-color:var(--accent-ink)}
.location-scope label:has(input:focus-visible){outline:2px solid var(--accent-ink);outline-offset:2px}
.location-remote-note{font-size:12px;line-height:1.55;color:var(--muted);margin:12px 0 0}
.location-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.location-fields:has(#location-city-field[hidden]){grid-template-columns:minmax(0,1fr)}
.location-fields .field{min-width:0;margin:8px 0}
.location-fields .field[hidden]{display:none}
.location-fields input{min-width:0}
.location-help{font-size:11px;line-height:1.8;color:var(--muted);margin:10px 0 14px}
.location-detect{min-height:44px}
.location-status{font-size:12px;line-height:1.8;color:var(--ink);background:var(--soft-light);border-radius:10px;padding:12px 14px;margin:16px 0 0}
.location-status:empty{display:none}
.location-status.location-warning{border-left:3px solid var(--accent-ink)}
.location-form-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px}
.location-form-actions .button{min-height:44px}
.location-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.geo-source-page{max-width:850px;margin:auto;padding:30px 22px;line-height:1.9}
.geo-source-page h1{font-size:30px;line-height:1.3;letter-spacing:-.8px}
.geo-source-page a{color:var(--accent-ink);text-decoration:underline;text-underline-offset:3px}
.geo-source-page code{overflow-wrap:anywhere}
@media(max-width:900px){[data-location-open]{max-width:190px}}
@media(max-width:680px){
  [data-location-open]{max-width:145px;column-gap:5px;padding:6px 1px}
  [data-location-label]{font-size:11px}[data-location-hint]{font-size:8px}
  [data-location-open]>svg{width:18px;height:18px}
  .location-fields{grid-template-columns:1fr;gap:2px}
  .location-fields input{font-size:16px}
  #location-dialog h2{font-size:22px}
  .location-form-actions .button{flex:1;padding:12px 10px;font-size:11px}
  .location-scope{grid-template-columns:repeat(2,minmax(0,1fr))}
  .location-scope label:last-child{grid-column:1/-1}
  .location-scope label{font-size:12px}
}
.location-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.location-presets .button {
  padding: 9px 12px;
  min-height: 44px;
}

.catalog-layout #location-dialog {
  --ink: #30243f;
  --muted: #625a70;
  --line: var(--catalog-border);
  --accent-ink: var(--catalog-accent);
  --focus: var(--catalog-accent);
  --soft-light: var(--catalog-tint);
}

.catalog-layout #location-dialog .button.primary {
  background: var(--catalog-gradient);
  color: #fff;
}

.catalog-layout #location-dialog :is(.button.secondary, .icon-button) {
  background: var(--soft-light);
  color: var(--accent-ink);
}

.catalog-layout #location-dialog :is(.button.secondary, .icon-button):hover {
  background: color-mix(in srgb, var(--soft-light), var(--accent-ink) 8%);
}

@media (max-width: 680px) {
  .catalog-layout .location-form-actions {
    position: sticky;
    bottom: -1px;
    z-index: 1;
    padding-block: 8px;
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .catalog-layout .location-form-actions .button {
    font-size: 12px;
  }
}

#location-title:focus {
  outline: none;
}
