/* Random nearby ZIP + Repost after a while (3.16.74): Settings card, the
 * "x1 reposted" inventory badge and its history dialog. Tokens only; the badge
 * is a real <button> so it is reachable and operable from the keyboard. */
#personalRepostSettings [hidden] { display: none !important; }
.pr-card { padding: 12px 14px; margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); font-size: 13px; line-height: 1.5; }
.pr-card[data-tone="warning"] { border-color: var(--warning); }
.pr-card[data-tone="danger"] { border-color: var(--danger); color: var(--danger); }
.pr-check { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 6px; font-size: 13px; font-weight: 600; line-height: 1.45; cursor: pointer; }
.pr-check input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--brand-500); }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 10px 0; }
.pr-field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.pr-field input, .pr-field select { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface-0); color: var(--text); font: inherit; font-weight: 400; }
.pr-field small, #personalRepostSettings .pr-hint, #pickupLocationSettings .pr-hint { font-weight: 400; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
#personalRepostSettings :is(input, select, button):focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
#prStatus { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#prStatus[data-tone="error"] { color: var(--danger); }
#prStatus[data-tone="ok"] { color: var(--success); }

/* Inventory badge */
.repost-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; min-height: 22px; border-radius: var(--r-xs); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; cursor: pointer; }
.repost-badge:hover { background: var(--surface-3); }
.repost-badge:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
@media (pointer: coarse) { .repost-badge { min-height: 32px; padding: 6px 10px; } }

/* History dialog */
#repostHistoryModal[hidden] { display: none !important; }
#repostHistoryModal .modal-content { max-width: 620px; }
#repostHistoryModal :is(button, a):focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; }
.rh-summary { margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
.rh-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.rh-run { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-0); font-size: 13px; line-height: 1.5; }
.rh-run strong { display: block; font-size: 13px; }
.rh-run dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; }
.rh-run dt { color: var(--text-muted); }
.rh-run dd { margin: 0; overflow-wrap: anywhere; }
.rh-zips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.rh-zips li { border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12px; background: var(--surface-0); }
.rh-note { font-size: 12px; line-height: 1.5; color: var(--text-muted); margin: 0; }
#repostHistoryModal h3 { font-size: 13px; margin: 14px 0 8px; }
@media (max-width: 560px) { #repostHistoryModal { padding: 10px; } .rh-run dl { grid-template-columns: 1fr; } .rh-run dt { margin-top: 4px; } }

/* Nearby ZIPs: list + self-drawn SVG map. Tokens only, so light, dark and the refined theme all follow. */
.pr-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.pr-zips-area { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.pr-zips-area h3 { font-size: 14px; margin: 0 0 6px; }
.pr-zip-summary { margin: 0 0 8px; font-size: 13px; line-height: 1.5; }
.pr-zip-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.pr-zip-add { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.pr-zip-add input { width: 7.5em; min-width: 0; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 6px 8px; background: var(--surface-0); color: var(--text); font: inherit; font-size: 13px; }
.pr-zip-msg { min-height: 1.4em; margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.pr-zip-msg[data-tone="error"] { color: var(--danger); }
.pr-zip-msg[data-tone="ok"] { color: var(--success); }
.pr-zip-msg[data-tone="warning"] { color: var(--warning); }
.pr-zip-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (min-width: 760px) { .pr-zip-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pr-zip-map { width: 100%; height: auto; max-width: 460px; justify-self: center; display: block; }
.pr-map-bg { fill: var(--surface-2); stroke: var(--border); stroke-width: 1; }
.pr-map-ring { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.pr-map-ring-half { stroke-dasharray: 4 5; stroke-width: 1; }
.pr-map-axis { stroke: var(--border); stroke-width: 1; }
.pr-map-label { fill: var(--text-muted); font-size: 12px; font-family: inherit; paint-order: stroke; stroke: var(--surface-2); stroke-width: 3px; stroke-linejoin: round; }
.pr-mk { cursor: pointer; }
.pr-mk-hit { fill: transparent; }
.pr-mk-dot { fill: var(--brand-500); stroke: var(--surface-0); stroke-width: 1.5; }
.pr-mk-center path { fill: var(--text); stroke: var(--surface-0); stroke-width: 1.5; }
.pr-mk.is-selected .pr-mk-dot { fill: var(--warning); stroke: var(--text); stroke-width: 2.5; r: 8; }
.pr-mk-center.is-selected path { fill: var(--warning); stroke: var(--text); stroke-width: 2.5; }
.pr-mk-label { fill: var(--text); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--surface-2); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.pr-zip-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); }
.pr-zip-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); }
.pr-zip-row:last-child { border-bottom: 0; }
.pr-zip-row.is-selected { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--brand-500); }
.pr-zip-pick { flex: 1; min-width: 0; display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; text-align: left; padding: 8px 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pr-zip-city { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-zip-dist { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.pr-zip-x { flex: none; width: 40px; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.pr-zip-x:hover:not(:disabled) { color: var(--danger); background: var(--surface-2); }
.pr-zip-x:disabled { opacity: .4; cursor: not-allowed; }
#personalRepostSettings :is(.pr-zip-pick, .pr-zip-x):focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; }
@media (pointer: coarse) { .pr-zip-pick { padding: 12px 10px; } .pr-zip-x { width: 48px; } }
@media (max-width: 560px) { .pr-zip-add { margin-left: 0; width: 100%; } .pr-zip-add input { flex: 1; } }
/* OpenStreetMap (Leaflet) version of the ZIP map. The SVG above is the fallback when tiles or Leaflet cannot load. */
.pr-map-wrap { min-width: 0; width: 100%; max-width: 460px; justify-self: center; }
.pr-tile-map { position: relative; isolation: isolate; z-index: 0; width: 100%; height: 340px; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--surface-2); font-family: inherit; }
.pr-tile-map[hidden] { display: none; }
.pr-tile-map .leaflet-control-attribution { font-size: 11px; }
.pr-tile-map .leaflet-control-attribution a { color: #0b5f75; }
.pr-tile-map .leaflet-tooltip { font-size: 12px; font-weight: 600; }
.pr-map-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
@media (max-width: 560px) { .pr-tile-map { height: 280px; } }
#prSyncWarn .pr-sync-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* "Where should new listings go?" (3.16.84): one choice, four cards, the chosen one opens. */
.lm-modes { border: 0; margin: 4px 0 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.lm-modes legend { font-size: 14px; font-weight: 700; margin: 0 0 8px; padding: 0; }
.lm-mode { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); }
.lm-mode.is-chosen { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500); }
.lm-pick { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; cursor: pointer; }
.lm-pick input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--brand-500); }
.lm-pick input:disabled + .lm-text { opacity: .55; }
.lm-text { display: grid; gap: 2px; min-width: 0; }
.lm-text strong { font-size: 13.5px; }
.lm-text small { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.lm-panel { padding: 0 14px 14px 42px; display: grid; gap: 8px; min-width: 0; }
.lm-panel > .queue-location-field { margin: 0; }
.lm-panel label { font-size: 13px; font-weight: 600; }
.lm-soft { font-weight: 400; color: var(--text-muted); }
#lmOneLocation, #lmListZips, #queueSavedLocations { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface-0); color: var(--text); font: inherit; font-weight: 400; }
#lmOneLocation { max-width: 22em; }
#lmListZips, #queueSavedLocations { resize: vertical; }
.lm-more summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--brand-600, var(--brand-500)); margin: 2px 0 6px; }
.lm-more[open] summary { margin-bottom: 8px; }
.lm-list-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; max-height: 260px; overflow: auto; }
.lm-list-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.lm-list-row:last-child { border-bottom: 0; }
.lm-list-row .pr-zip-dist { margin-left: auto; }
.lm-repost { margin: 16px 0 4px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.lm-repost h3 { font-size: 14px; margin: 0; }
.lm-repost-field { max-width: 26em; }
.lm-repost-field select:disabled { opacity: .6; }
.lm-fallback { margin: 12px 0 0; }
@media (max-width: 560px) { .lm-panel { padding-left: 14px; } #lmOneLocation { max-width: none; } }
@media (pointer: coarse) { .lm-pick { padding: 14px; } }
