/* Scoped read recovery keeps the existing cards, pins and floating close control. */
.map-page :is(.map-load-notice, .map-list-load-notice) {
  grid-template-columns: 32px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #e4e2ec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(36 34 54 / 8%);
  color: #272338;
}
.map-page .map-load-notice {
  position: absolute;
  z-index: 750;
  top: var(--map-load-top, var(--saved-mode-bottom, calc(var(--topbar-height) + 18px)));
  left: var(--map-load-left, 16px);
  transform: none;
  display: grid;
  width: min(440px, calc(100% - 32px));
  max-width: var(--map-load-max-width, calc(100% - 32px));
}
.map-page .map-load-notice[hidden],
.map-page .detail-load-notice[hidden] { display: none; }
.map-page :is(.map-load-notice, .map-list-load-notice) .map-load-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0efff;
  color: #6151d6;
}
.map-page :is(.map-load-notice, .map-list-load-notice) .map-load-symbol svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-page :is(.map-load-notice, .map-list-load-notice) .map-load-copy { min-width: 0; overflow-wrap: anywhere; }
.map-page :is(.map-load-notice, .map-list-load-notice) .map-load-copy strong { display: block; font-size: 14px; font-weight: 650; line-height: 1.4; }
.map-page :is(.map-load-notice, .map-list-load-notice) .map-load-copy p { margin: 4px 0 0; color: #6c687d; font-size: 13px; line-height: 1.55; }
.map-page .map-list-load-notice { display: none; }
.map-page .map-load-notice[data-state="loading"]:not([hidden]) {
  display: flex;
  width: max-content;
  gap: 8px;
  padding: 7px 11px;
  border-color: #e6e5ec;
  border-radius: 999px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 2px 8px rgb(36 34 54 / 5%);
  color: #6c687d;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: none;
}
.map-page .map-load-notice[data-state="loading"] .map-load-copy { flex: 1 1 auto; }
.map-page :is(.map-load-notice, .map-list-load-notice)[data-state="loading"] .map-load-copy strong {
  overflow: hidden;
  font: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.map-page :is(.map-load-notice, .map-list-load-notice)[data-state="loading"] p { display: none; }
.map-page :is(.map-load-notice, .map-list-load-notice)[data-state="loading"]::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 2px solid #dedde7;
  border-top-color: #79738e;
  border-radius: 50%;
  animation: map-load-spin 850ms linear infinite;
}
@keyframes map-load-spin { to { transform: rotate(360deg); } }
.map-page :is(#mapLoadRetry, #mapListLoadRetry, #detailLoadRetry) {
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #b8c0ed;
  border-radius: 9px;
  background: #fff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.map-page :is(#mapLoadRetry, #mapListLoadRetry, #detailLoadRetry):hover { background: #e8ebff; border-color: #939de2; }
.map-page :is(#mapLoadRetry, #mapListLoadRetry, #detailLoadRetry):focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
.map-page :is(#mapLoadRetry, #mapListLoadRetry, #detailLoadRetry):active { background: #dde2ff; }
.map-page :is(#mapLoadRetry, #mapListLoadRetry) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 8px 10px;
  border-color: #dedbea;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 600;
  line-height: 1.3;
}
.map-page :is(#mapLoadRetry, #mapListLoadRetry) svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-page :is(#mapLoadRetry, #mapListLoadRetry):hover { background: #f6f5ff; border-color: #c9c5e8; }
.map-page :is(#mapLoadRetry, #mapListLoadRetry):active { background: #eeecff; }
.map-page :is(#mapLoadRetry, #mapListLoadRetry)[hidden],
.map-page :is(.map-load-notice, .map-list-load-notice)[data-state="loading"] :is(.map-load-symbol, #mapLoadRetry, #mapListLoadRetry) { display: none; }
.map-page #detailPanel:is([data-load-state="loading"], [data-load-state="error"]) > :is(.detail-badges-header, .detail-cover, .detail-content),
.map-page #detailPanel:is([data-load-state="loading"], [data-load-state="error"]) .detail-identifier-meta { display: none; }
.map-page #detailPanel:is([data-load-state="loading"], [data-load-state="error"]) { min-height: 270px; }
.map-page #detailPanel > .detail-load-notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  padding: 72px 25px 30px;
  color: #273253;
}
.map-page #detailPanel[data-load-state="refresh-error"] > .detail-load-notice { padding: 20px; }
.detail-load-symbol { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #e6e9fd; color: #6151d6; }
.detail-load-symbol svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.detail-load-notice h2 { margin: 0; color: #172345; font-size: 20px; line-height: 1.3; }
.detail-load-notice p { margin: 0; color: #566382; font-size: 14px; line-height: 1.6; }
@media (max-width: 1120px) {
  .map-page :is(.map-load-notice, .map-list-load-notice) { grid-template-columns: 32px minmax(0, 1fr); }
  .map-page .map-load-notice { top: var(--map-load-top, var(--saved-mode-bottom, calc(var(--topbar-height) + 12px))); }
  .map-page :is(#mapLoadRetry, #mapListLoadRetry) { grid-column: 1 / -1; width: 100%; }
  .map-page :is(#mapLoadRetry, #mapListLoadRetry, #detailLoadRetry) { min-height: 44px; }
  .map-page .map-layout:has(.filter-panel.sheet-expanded) .map-load-notice { display: none; }
  .map-page .filter-panel.sheet-expanded .map-list-load-notice:not([hidden]) { display: grid; width: 100%; }
  .map-page .filter-panel.sheet-expanded .map-list-load-notice[data-state="loading"]:not([hidden]) { display: flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: #6c687d; font-size: 12px; font-weight: 500; line-height: 1.4; pointer-events: none; }
  .map-page .filter-panel.sheet-expanded .map-list-load-notice[data-state="loading"] { box-shadow: none; }
  .map-page .filter-panel.sheet-expanded .map-list-load-notice[data-state="loading"] .map-load-copy { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .map-page :is(.map-load-notice, .map-list-load-notice)[data-state="loading"]::before { animation: none; }
}
@media (max-width: 420px) {
  .map-page #detailPanel > .detail-load-notice { padding: 66px 20px 26px; }
}
