.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-container {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.leaflet-control-attribution {
  display: none !important;
}

.menu-search {
  margin: 0 0 12px;
}

.menu-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.menu-search-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #d7dde5;
  border-radius: 7px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.menu-search-input:focus {
  border-color: #178f8b;
  box-shadow: 0 0 0 3px rgba(23, 143, 139, 0.14);
}

.menu-search-clear {
  min-width: 58px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  background: #f7f7f7;
  color: #222;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.menu-search-clear:disabled {
  opacity: 0.45;
  cursor: default;
}

.menu-close-button {
  width: 100%;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #cfd7de;
  border-radius: 7px;
  background: #fff;
  color: #18222c;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.menu-close-button:hover {
  border-color: #17202a;
  background: #f5f7f8;
}

.user-location {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue-dark, #2563eb);
  border: 3px solid #fff;
  box-shadow: 0 0 0 7px rgba(37,99,235,0.22), 0 2px 10px rgba(0,0,0,0.25);
}

.glow-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.95);
  cursor: pointer;
  position: relative;
  animation: pulse 1.8s infinite;
}

.store-marker-with-label {
  width: 118px;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
}

.store-marker-label {
  max-width: 112px;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  color: #111827;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.glow-marker::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.78);
}

.glow-red {
  background: var(--red, #ef4444);
  box-shadow: 0 0 0 8px rgba(239,68,68,0.22), 0 0 22px rgba(239,68,68,0.85), 0 2px 10px rgba(0,0,0,0.22);
}

.glow-yellow {
  background: var(--yellow, #facc15);
  box-shadow: 0 0 0 8px rgba(250,204,21,0.24), 0 0 22px rgba(250,204,21,0.85), 0 2px 10px rgba(0,0,0,0.22);
}

.glow-green {
  background: var(--green, #22c55e);
  box-shadow: 0 0 0 8px rgba(34,197,94,0.22), 0 0 22px rgba(34,197,94,0.8), 0 2px 10px rgba(0,0,0,0.22);
}

.glow-blue {
  background: var(--blue, #38bdf8);
  box-shadow: 0 0 0 8px rgba(56,189,248,0.24), 0 0 22px rgba(56,189,248,0.8), 0 2px 10px rgba(0,0,0,0.22);
}

.glow-closed {
  background: #151515;
  box-shadow: 0 0 0 8px rgba(0,0,0,0.18), 0 0 22px rgba(0,0,0,0.72), 0 2px 10px rgba(0,0,0,0.28);
}

.status-cluster {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,0.95);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.32);
}

.status-cluster-red {
  background: var(--red, #ef4444);
  box-shadow: 0 0 0 8px rgba(239,68,68,0.22), 0 0 22px rgba(239,68,68,0.82), 0 2px 10px rgba(0,0,0,0.22);
}

.status-cluster-yellow {
  background: var(--yellow, #facc15);
  color: #3b2f05;
  text-shadow: none;
  box-shadow: 0 0 0 8px rgba(250,204,21,0.24), 0 0 22px rgba(250,204,21,0.8), 0 2px 10px rgba(0,0,0,0.22);
}

.status-cluster-green {
  background: var(--green, #22c55e);
  box-shadow: 0 0 0 8px rgba(34,197,94,0.22), 0 0 22px rgba(34,197,94,0.78), 0 2px 10px rgba(0,0,0,0.22);
}

.status-cluster-blue {
  background: var(--blue, #38bdf8);
  box-shadow: 0 0 0 8px rgba(56,189,248,0.24), 0 0 22px rgba(56,189,248,0.78), 0 2px 10px rgba(0,0,0,0.22);
}

.status-cluster-closed {
  background: #151515;
  box-shadow: 0 0 0 8px rgba(0,0,0,0.18), 0 0 22px rgba(0,0,0,0.72), 0 2px 10px rgba(0,0,0,0.28);
}

.status-cluster-mixed {
  background: #666;
  box-shadow: 0 0 0 8px rgba(102,102,102,0.18), 0 0 20px rgba(80,80,80,0.55), 0 2px 10px rgba(0,0,0,0.24);
}

.building-group-marker {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  grid-template-rows: 1fr 13px;
  align-items: center;
  justify-items: center;
  border: 3px solid rgba(255,255,255,0.96);
  color: #fff;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,0.34);
  box-shadow: 0 0 0 9px rgba(102,102,102,0.18), 0 0 22px rgba(60,60,60,0.58), 0 3px 12px rgba(0,0,0,0.26);
}

.building-group-red {
  background: var(--red, #ef4444);
  box-shadow: 0 0 0 9px rgba(239,68,68,0.22), 0 0 24px rgba(239,68,68,0.82), 0 3px 12px rgba(0,0,0,0.26);
}

.building-group-yellow {
  background: var(--yellow, #facc15);
  color: #3b2f05;
  text-shadow: none;
  box-shadow: 0 0 0 9px rgba(250,204,21,0.24), 0 0 24px rgba(250,204,21,0.82), 0 3px 12px rgba(0,0,0,0.24);
}

.building-group-green {
  background: var(--green, #22c55e);
  box-shadow: 0 0 0 9px rgba(34,197,94,0.22), 0 0 24px rgba(34,197,94,0.78), 0 3px 12px rgba(0,0,0,0.24);
}

.building-group-blue {
  background: var(--blue, #38bdf8);
  box-shadow: 0 0 0 9px rgba(56,189,248,0.24), 0 0 24px rgba(56,189,248,0.78), 0 3px 12px rgba(0,0,0,0.24);
}

.building-group-closed {
  background: #151515;
  box-shadow: 0 0 0 9px rgba(0,0,0,0.18), 0 0 24px rgba(0,0,0,0.72), 0 3px 12px rgba(0,0,0,0.28);
}

.building-group-mixed {
  background: #555;
}

.building-group-count {
  align-self: end;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.building-group-dots {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  min-height: 10px;
  padding-bottom: 4px;
}

.building-group-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.78);
}

.building-group-dot-red { background: var(--red, #ef4444); }
.building-group-dot-yellow { background: var(--yellow, #facc15); }
.building-group-dot-green { background: var(--green, #22c55e); }
.building-group-dot-blue { background: var(--blue, #38bdf8); }
.building-group-dot-closed { background: #111; }

.chip-closed {
  background: #e5e5e5;
  color: #171717;
}

.glow-unknown,
.status-cluster-unknown,
.building-group-unknown {
  background: #94a3b8;
  box-shadow: 0 0 0 7px rgba(148,163,184,0.18), 0 2px 10px rgba(0,0,0,0.18);
  animation: none;
}

.building-group-dot-unknown { background: #94a3b8; }
.chip-unknown { background: #e2e8f0; color: #334155; }
.forecast-chip-unknown { background: #e2e8f0; color: #334155; }

[data-status-filter="unknown"].is-active {
  border-color: #64748b;
  background: #f1f5f9;
  color: #334155;
}

#storeOverlay:has(.chip-unknown) .modal,
#storeDetailOverlay:has(.chip-unknown) .modal { border-top-color: #94a3b8; }

.chip-mixed {
  background: #f1f5f9;
  color: #1f2937;
}

#storeDetailOverlay {
  z-index: 3200;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.api-credit {
  position: absolute;
  right: 14px;
  bottom: 34px;
  z-index: 520;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  color: #555;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.api-credit a {
  color: #333;
  font-weight: 700;
  text-decoration: none;
}

.api-credit a:hover {
  text-decoration: underline;
}

.store-info > div:not(.forecast-block):not(.feedback-block):not(.store-group-list):not(.store-page-links) {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #e5e5e5;
}

.store-info strong {
  color: #222;
  white-space: nowrap;
}

.store-info span {
  text-align: right;
}

.forecast-block {
  padding-top: 10px;
}

.forecast-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.forecast-reasons span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #333;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.forecast-note {
  margin: 10px 0 0;
  color: #666;
  font-size: 12px;
  line-height: 1.65;
}

.store-group-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.store-group-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.store-group-item:hover {
  background: #f9fafb;
}

.store-group-glow {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.95);
  position: relative;
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

.store-group-glow::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.78);
}

.store-group-glow-red {
  background: var(--red, #ef4444);
  box-shadow: 0 0 0 5px rgba(239,68,68,0.16), 0 0 14px rgba(239,68,68,0.7);
}

.store-group-glow-yellow {
  background: var(--yellow, #facc15);
  box-shadow: 0 0 0 5px rgba(250,204,21,0.18), 0 0 14px rgba(250,204,21,0.7);
}

.store-group-glow-green {
  background: var(--green, #22c55e);
  box-shadow: 0 0 0 5px rgba(34,197,94,0.16), 0 0 14px rgba(34,197,94,0.65);
}

.store-group-glow-blue {
  background: var(--blue, #38bdf8);
  box-shadow: 0 0 0 5px rgba(56,189,248,0.18), 0 0 14px rgba(56,189,248,0.65);
}

.store-group-glow-closed {
  background: #151515;
  box-shadow: 0 0 0 5px rgba(0,0,0,0.14), 0 0 14px rgba(0,0,0,0.58);
}

.store-group-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.store-group-main span {
  text-align: left;
}

.store-group-name {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-group-meta {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-group-chip {
  justify-self: end;
  white-space: nowrap;
  font-size: 11px;
  padding: 5px 7px;
}

#storeOverlay.store-group-mode .store-top-actions {
  grid-template-columns: 1fr;
}

#storeOverlay.store-group-mode #topCloseStoreButton {
  grid-column: 1;
}

.feedback-block {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ededed;
}

.feedback-block > strong {
  display: block;
  margin-bottom: 8px;
  color: #222;
}

.feedback-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feedback-actions button {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  text-align: center;
  cursor: pointer;
}

.feedback-actions button + button {
  margin-top: 0;
}

.feedback-actions button:hover {
  background: #f7f7f7;
}

.feedback-actions button:disabled {
  cursor: default;
  opacity: 0.58;
}

.feedback-summary,
.feedback-message {
  margin-top: 8px;
  color: #666;
  font-size: 12px;
  line-height: 1.55;
}

.feedback-message {
  min-height: 18px;
  font-weight: 800;
  color: #166534;
}

.feedback-message.feedback-error {
  color: #991b1b;
}

.store-page-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ededed;
}

.store-page-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border: 1px solid #d8dde1;
  border-radius: 7px;
  background: #fff;
  color: #1d2933;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.store-page-link:hover,
.store-page-link:focus-visible {
  border-color: #0f766e;
  background: #f1f8f7;
}

.store-page-link-primary {
  border-color: #172027;
  background: #172027;
  color: #fff;
}

.store-page-link-primary:hover,
.store-page-link-primary:focus-visible {
  border-color: #000;
  background: #000;
}

.two-finger-map {
  touch-action: pan-y;
}

.map-touch-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 900;
  transform: translate(-50%, -50%);
  max-width: min(280px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.map-touch-hint.is-visible {
  opacity: 1;
}

.debug-page-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8e8e8;
}

.debug-page-note {
  margin: -2px 0 10px;
  color: #687078;
  font-size: 11px;
  line-height: 1.5;
}

.debug-page-group + .debug-page-group {
  margin-top: 12px;
}

.debug-page-group-title {
  margin: 0 0 6px;
  color: #333;
  font-size: 12px;
  font-weight: 900;
}

.debug-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.debug-page-link {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #dfe3e7;
  border-radius: 6px;
  background: #f7f8f9;
  color: #222;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.debug-page-link:hover,
.debug-page-link:focus-visible {
  border-color: #bfc8d0;
  background: #edf1f4;
}

@media (max-width: 640px) {
  .api-credit {
    display: none;
  }

  .api-credit span:nth-child(2) {
    margin: 0 !important;
  }

  .feedback-actions {
    grid-template-columns: 1fr;
  }

  .store-page-links {
    grid-template-columns: 1fr;
  }

  .store-group-item {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
  }

  .store-group-chip {
    grid-column: 2;
    justify-self: start;
  }
}

/* 2026-08-29: shared map shell and store-detail presentation */
body.imahaireru-map-page {
  --ui-ink: #17202a;
  --ui-muted: #667085;
  --ui-line: #d9e1e6;
  --ui-line-soft: #edf1f3;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f6f8f9;
  --ui-accent: #0f766e;
  --ui-accent-dark: #0b5f59;
  --ui-accent-soft: #e8f5f2;
  color: var(--ui-ink);
}

body.imahaireru-map-page header {
  height: 60px;
  padding: 7px 152px 7px 14px;
  border-color: var(--ui-line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
  backdrop-filter: blur(10px);
}

body.imahaireru-map-page header h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ui-ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

body.imahaireru-map-page header h1::before {
  content: "";
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: var(--ui-accent);
}

body.imahaireru-map-page header .subtitle {
  margin: 2px 0 0 13px;
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 600;
}

body.imahaireru-map-page .app {
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
}

body.imahaireru-map-page .map-menu {
  top: 9px;
  right: 12px;
}

body.imahaireru-map-page .menu-toggle {
  width: 126px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #18222c;
  border-radius: 7px;
  background: #18222c;
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 42, 0.16);
  font-size: 13px;
  font-weight: 900;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body.imahaireru-map-page .menu-toggle:hover {
  background: #2b3741;
  box-shadow: 0 8px 20px rgba(23, 32, 42, 0.2);
  transform: translateY(-1px);
}

body.imahaireru-map-page .menu-toggle:focus-visible,
body.imahaireru-map-page .legend-item:focus-visible,
body.imahaireru-map-page #locationButton:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

body.imahaireru-map-page .menu-toggle-icon {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

body.imahaireru-map-page .map-menu-panel {
  top: 48px;
  width: min(352px, calc(100vw - 24px));
  max-height: calc(100vh - 82px);
  max-height: calc(100dvh - 82px);
  padding: 14px;
  border-color: var(--ui-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 42px rgba(23, 32, 42, 0.2);
}

body.imahaireru-map-page .menu-close-button {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 42px;
  margin-bottom: 14px;
  border-color: #cfd8de;
  background: #f7f9fa;
  color: #26323c;
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.96);
}

body.imahaireru-map-page .menu-heading {
  margin-bottom: 9px;
  color: var(--ui-accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

body.imahaireru-map-page .menu-heading-spaced {
  margin-top: 16px;
  padding-top: 14px;
  border-color: var(--ui-line-soft);
}

body.imahaireru-map-page .menu-search-input,
body.imahaireru-map-page .menu-search-clear,
body.imahaireru-map-page .menu-small-button,
body.imahaireru-map-page .menu-back-button {
  border-color: #d3dce2;
  border-radius: 6px;
}

body.imahaireru-map-page .menu-small-button,
body.imahaireru-map-page .menu-back-button {
  background: var(--ui-surface-soft);
}

body.imahaireru-map-page .menu-small-button:hover,
body.imahaireru-map-page .menu-back-button:hover {
  border-color: #96a4ae;
  background: #fff;
}

body.imahaireru-map-page .menu-option {
  min-height: 36px;
  color: #344054;
  font-size: 13px;
}

body.imahaireru-map-page .genre-option {
  min-height: 32px;
  font-size: 12px;
}

body.imahaireru-map-page .menu-option input {
  accent-color: var(--ui-accent);
}

body.imahaireru-map-page .menu-credit {
  color: #7b8790;
  border-color: var(--ui-line-soft);
  font-size: 10px;
}

body.imahaireru-map-page .top-panel {
  top: 14px;
  left: 14px;
  right: auto;
  width: min(338px, calc(100vw - 28px));
  padding: 15px 16px 16px;
  border: 1px solid var(--ui-line);
  border-left: 4px solid var(--ui-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.16);
  backdrop-filter: blur(10px);
}

body.imahaireru-map-page .panel-title {
  margin-bottom: 4px;
  color: var(--ui-ink);
  font-size: 15px;
  font-weight: 900;
}

body.imahaireru-map-page .panel-text {
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.55;
}

body.imahaireru-map-page #locationButton {
  min-height: 42px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid var(--ui-accent-dark);
  border-radius: 7px;
  background: var(--ui-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

body.imahaireru-map-page #locationButton:hover {
  background: var(--ui-accent-dark);
  transform: translateY(-1px);
}

body.imahaireru-map-page .legend {
  left: 14px;
  right: auto;
  bottom: 14px;
  width: min(704px, calc(100vw - 82px));
  padding: 6px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.16);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

body.imahaireru-map-page .legend-item {
  min-height: 38px;
  padding: 7px 6px;
  border-color: #dce3e7;
  border-radius: 6px;
  background: #fff;
  color: #4b5862;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body.imahaireru-map-page .legend-item:hover {
  border-color: #aab6bf;
  background: #f8fafb;
}

body.imahaireru-map-page .legend-item.is-active {
  border-color: #34414b;
  background: #f1f4f5;
  color: #202a32;
  box-shadow: inset 0 0 0 1px #34414b;
}

body.imahaireru-map-page .legend-item[data-status-filter="red"].is-active {
  border-color: #c53b3b;
  background: #fff0f0;
  color: #8f2424;
  box-shadow: inset 0 0 0 1px #c53b3b;
}

body.imahaireru-map-page .legend-item[data-status-filter="yellow"].is-active {
  border-color: #b38a00;
  background: #fff8df;
  color: #705600;
  box-shadow: inset 0 0 0 1px #b38a00;
}

body.imahaireru-map-page .legend-item[data-status-filter="green"].is-active {
  border-color: #238245;
  background: #edf8f0;
  color: #176333;
  box-shadow: inset 0 0 0 1px #238245;
}

body.imahaireru-map-page .legend-item[data-status-filter="blue"].is-active {
  border-color: #177ea7;
  background: #eaf7fc;
  color: #0d6386;
  box-shadow: inset 0 0 0 1px #177ea7;
}

body.imahaireru-map-page .legend-item[data-status-filter="closed"].is-active {
  border-color: #30373d;
  background: #eff1f2;
  color: #252b30;
  box-shadow: inset 0 0 0 1px #30373d;
}

#storeOverlay,
#storeDetailOverlay {
  padding: 16px;
  background: rgba(18, 27, 34, 0.5);
  backdrop-filter: blur(3px);
}

#storeOverlay .modal,
#storeDetailOverlay .modal {
  position: relative;
  width: min(100%, 570px);
  max-width: 570px;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  padding: 0 0 18px;
  border: 1px solid #d7dfe4;
  border-top: 4px solid #68757f;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(18, 27, 34, 0.3);
}

#storeOverlay:has(.chip-red) .modal,
#storeDetailOverlay:has(.chip-red) .modal { border-top-color: #d94a4a; }
#storeOverlay:has(.chip-yellow) .modal,
#storeDetailOverlay:has(.chip-yellow) .modal { border-top-color: #c09608; }
#storeOverlay:has(.chip-green) .modal,
#storeDetailOverlay:has(.chip-green) .modal { border-top-color: #238245; }
#storeOverlay:has(.chip-blue) .modal,
#storeDetailOverlay:has(.chip-blue) .modal { border-top-color: #177ea7; }
#storeOverlay:has(.chip-closed) .modal,
#storeDetailOverlay:has(.chip-closed) .modal { border-top-color: #30373d; }

#storeChip,
#detailStoreChip {
  margin: 20px 24px 8px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
}

#storeName,
#detailStoreName {
  margin: 0 24px 5px;
  color: #17202a;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0;
}

#storeSummary,
#detailStoreSummary {
  margin: 0 24px 16px;
  color: #586671;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

#storeOverlay .store-top-actions,
#storeDetailOverlay .store-top-actions {
  margin: 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid #e4e9ec;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

#storeOverlay .store-top-actions button,
#storeDetailOverlay .store-top-actions button,
#routeButton,
#detailRouteButton {
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #18222c;
  border-radius: 7px;
  background: #18222c;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

#storeOverlay .store-top-actions button:hover,
#storeDetailOverlay .store-top-actions button:hover,
#routeButton:hover,
#detailRouteButton:hover {
  background: #2b3741;
}

#storeOverlay .store-top-actions .store-close-button,
#storeDetailOverlay .store-top-actions .store-close-button {
  border-color: #d4dce1;
  background: #f6f8f9;
  color: #26323c;
}

#storeOverlay .store-top-actions .store-close-button:hover,
#storeDetailOverlay .store-top-actions .store-close-button:hover {
  border-color: #9ba8b1;
  background: #fff;
}

#storeInfo,
#detailStoreInfo {
  margin: 0;
  padding: 5px 24px 18px;
  border-top: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
}

#storeOverlay .store-info > div:not(.forecast-block):not(.feedback-block):not(.store-group-list):not(.store-page-links),
#storeDetailOverlay .store-info > div:not(.forecast-block):not(.feedback-block):not(.store-group-list):not(.store-page-links) {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f3;
}

#storeOverlay .store-info strong,
#storeDetailOverlay .store-info strong {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#storeOverlay .store-info span,
#storeDetailOverlay .store-info span {
  color: #27333d;
  text-align: left;
  overflow-wrap: anywhere;
}

#storeOverlay .forecast-block,
#storeDetailOverlay .forecast-block {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  background: #f5faf8;
}

#storeOverlay .forecast-block > strong,
#storeDetailOverlay .forecast-block > strong,
#storeOverlay .feedback-block > strong,
#storeDetailOverlay .feedback-block > strong {
  display: block;
  margin-bottom: 9px;
  color: #26323c;
  font-size: 13px;
  font-weight: 900;
}

#storeOverlay .forecast-reasons,
#storeDetailOverlay .forecast-reasons {
  gap: 5px;
  margin-top: 0;
}

#storeOverlay .forecast-reasons span,
#storeDetailOverlay .forecast-reasons span {
  padding: 5px 7px;
  border: 1px solid #d9e5e2;
  border-radius: 5px;
  background: #fff;
  color: #31534e;
  font-size: 11px;
  font-weight: 800;
}

#storeOverlay .feedback-block,
#storeDetailOverlay .feedback-block {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e0e6ea;
  border-radius: 8px;
  background: #fafbfc;
}

#storeOverlay .feedback-actions button,
#storeDetailOverlay .feedback-actions button {
  min-height: 40px;
  border-color: #d5dde2;
  border-radius: 6px;
  background: #fff;
  color: #26323c;
  font-size: 12px;
}

#storeOverlay .feedback-actions button:hover,
#storeDetailOverlay .feedback-actions button:hover {
  border-color: #92a0aa;
  background: #f5f7f8;
}

#storeOverlay .store-page-links,
#storeDetailOverlay .store-page-links {
  margin-top: 14px;
  padding-top: 14px;
  border-color: #e3e8eb;
}

#storeOverlay .store-page-link,
#storeDetailOverlay .store-page-link {
  border-radius: 6px;
}

#storeOverlay .forecast-note,
#storeDetailOverlay .forecast-note {
  color: #75818a;
  font-size: 11px;
  line-height: 1.65;
}

#storeOverlay .store-group-list,
#storeDetailOverlay .store-group-list {
  gap: 7px;
  margin-top: 10px;
}

#storeOverlay .store-group-item,
#storeDetailOverlay .store-group-item {
  border-color: #dce3e7;
  border-radius: 7px;
  background: #fff;
}

#storeOverlay .store-group-item:hover,
#storeDetailOverlay .store-group-item:hover {
  border-color: #99a7b0;
  background: #f8fafb;
}

#storeOverlay #routeButton,
#storeDetailOverlay #detailRouteButton {
  width: calc(100% - 48px);
  margin: 0 24px;
}

#closeStoreButton,
#detailCloseStoreButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 48px);
  min-height: 42px;
  margin: 8px 24px 0;
  padding: 9px 12px;
  border: 1px solid #d6dde2;
  border-radius: 7px;
  background: #fff;
  color: #4b5862;
  font-size: 13px;
  font-weight: 900;
}

#closeStoreButton:hover,
#detailCloseStoreButton:hover {
  border-color: #9ba8b1;
  background: #f7f9fa;
}

#storeOverlay button:focus-visible,
#storeDetailOverlay button:focus-visible,
#storeOverlay a:focus-visible,
#storeDetailOverlay a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

body.imahaireru-map-page #introOverlay .intro-modal {
  max-width: 470px;
  padding: 24px;
  border: 1px solid #d7dfe4;
  border-radius: 9px;
  box-shadow: 0 24px 64px rgba(18, 27, 34, 0.3);
}

body.imahaireru-map-page #introOverlay .modal-title {
  color: var(--ui-ink);
  font-size: 22px;
  letter-spacing: 0;
}

body.imahaireru-map-page #introOverlay .privacy-note {
  border: 1px solid #e0e6ea;
  border-radius: 7px;
  background: var(--ui-surface-soft);
}

body.imahaireru-map-page #allowLocationButton {
  min-height: 44px;
  border-radius: 7px;
  background: var(--ui-accent);
}

body.imahaireru-map-page #closeIntroButton {
  min-height: 42px;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid #d6dde2;
  border-radius: 7px;
  background: #fff;
  color: #4b5862;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 639px) {
  body.imahaireru-map-page header {
    height: 56px;
    padding: 6px 132px 6px 10px;
  }

  body.imahaireru-map-page header h1 {
    gap: 7px;
    font-size: 20px;
  }

  body.imahaireru-map-page header h1::before {
    width: 3px;
    height: 21px;
  }

  body.imahaireru-map-page header .subtitle {
    margin-left: 10px;
    font-size: 9px;
  }

  body.imahaireru-map-page .app {
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
  }

  body.imahaireru-map-page .map-menu {
    top: 7px;
    right: 8px;
  }

  body.imahaireru-map-page .menu-toggle {
    width: 118px;
    height: 40px;
    padding: 0 11px;
    font-size: 12px;
  }

  body.imahaireru-map-page .map-menu-panel {
    top: 45px;
    right: 0;
    width: min(340px, calc(100vw - 16px));
    max-height: calc(100dvh - 66px);
  }

  body.imahaireru-map-page .top-panel {
    top: 8px;
    left: 8px;
    width: calc(100vw - 16px);
    padding: 11px 12px 12px;
    border-left-width: 3px;
    box-shadow: 0 8px 22px rgba(23, 32, 42, 0.15);
  }

  body.imahaireru-map-page .panel-title {
    font-size: 14px;
  }

  body.imahaireru-map-page .panel-text {
    font-size: 11px;
    line-height: 1.45;
  }

  body.imahaireru-map-page #locationButton {
    min-height: 40px;
    margin-top: 8px;
  }

  body.imahaireru-map-page .legend {
    left: 6px;
    bottom: 6px;
    width: 282px;
    padding: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  body.imahaireru-map-page .legend-item {
    min-height: 29px;
    padding: 4px 3px;
    font-size: 9px;
  }

  #storeOverlay,
  #storeDetailOverlay {
    align-items: flex-start;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  #storeOverlay .modal,
  #storeDetailOverlay .modal {
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 8px;
  }

  #storeChip,
  #detailStoreChip {
    margin: 15px 16px 7px;
  }

  #storeName,
  #detailStoreName {
    margin-right: 16px;
    margin-left: 16px;
    font-size: 21px;
  }

  #storeSummary,
  #detailStoreSummary {
    margin: 0 16px 13px;
    font-size: 12px;
  }

  #storeOverlay .store-top-actions,
  #storeDetailOverlay .store-top-actions {
    margin: 0 16px;
    padding-bottom: 14px;
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 6px;
  }

  #storeInfo,
  #detailStoreInfo {
    padding: 4px 16px 14px;
  }

  #storeOverlay .store-info > div:not(.forecast-block):not(.feedback-block):not(.store-group-list):not(.store-page-links),
  #storeDetailOverlay .store-info > div:not(.forecast-block):not(.feedback-block):not(.store-group-list):not(.store-page-links) {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
  }

  #storeOverlay .forecast-block,
  #storeDetailOverlay .forecast-block,
  #storeOverlay .feedback-block,
  #storeDetailOverlay .feedback-block {
    padding: 12px;
  }

  #storeOverlay #routeButton,
  #storeDetailOverlay #detailRouteButton,
  #closeStoreButton,
  #detailCloseStoreButton {
    width: calc(100% - 32px);
    margin-right: 16px;
    margin-left: 16px;
  }

  #storeOverlay .store-page-links,
  #storeDetailOverlay .store-page-links {
    grid-template-columns: 1fr;
  }

  body.imahaireru-map-page #introOverlay {
    align-items: center;
    padding: 12px;
  }

  body.imahaireru-map-page #introOverlay .intro-modal {
    padding: 20px;
    border-radius: 8px;
  }
}
