:root {
  color-scheme: light;
  --night: #11182a;
  --night-soft: #202942;
  --moon: #f4f7ff;
  --mist: #dde4f3;
  --violet: #8f7cff;
  --pink: #ff5c8a;
  --aqua: #69e0d1;
  --ink: #20263d;
  --muted: #6d7690;
  --panel-width: 420px;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--night); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

.shell { display: grid; grid-template-columns: var(--panel-width) 1fr; height: 100dvh; }
.panel { position: relative; z-index: 500; display: flex; min-width: 0; flex-direction: column; background: var(--moon); box-shadow: 18px 0 60px rgb(17 24 42 / 18%); }
.close-panel { display: none; }
.masthead { display: flex; gap: 17px; align-items: center; padding: 26px 26px 14px; }
.orbit-mark { position: relative; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid rgb(143 124 255 / 40%); border-radius: 50%; transform: rotate(-18deg); }
.orbit-mark::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: linear-gradient(145deg, #fff 15%, #ced7eb); box-shadow: inset -7px -5px 13px rgb(93 105 145 / 18%), 0 0 24px rgb(143 124 255 / 30%); }
.orbit-mark::after { content: ""; position: absolute; top: 21px; left: -7px; width: 60px; height: 8px; border-top: 2px solid var(--pink); border-radius: 50%; }
.orbit-mark span { position: absolute; z-index: 2; right: -6px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); }
.eyebrow { margin: 0 0 5px; color: var(--violet); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: 25px; line-height: 1.05; letter-spacing: -.04em; }
h1 span { font-size: 17px; letter-spacing: -.02em; }
.lead { margin: 0; padding: 0 26px 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.lead span { color: var(--ink); font-weight: 800; }

.controls { padding: 0 20px 16px; }
.search-box { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid #cfd7e8; border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgb(32 38 61 / 7%); }
.search-box svg, .locate-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-box svg { color: var(--violet); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #939bb0; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.filter-row select, .locate-button { width: 100%; min-height: 43px; border: 1px solid #cfd7e8; border-radius: 13px; background: #fff; color: var(--ink); }
.filter-row select { padding: 0 33px 0 13px; }
.locate-button { display: flex; gap: 7px; align-items: center; justify-content: center; cursor: pointer; }
.locate-button:hover { border-color: var(--violet); }

.result-meta { display: flex; align-items: baseline; justify-content: space-between; padding: 0 24px 12px; border-bottom: 1px solid var(--mist); }
.result-meta p { display: flex; gap: 5px; align-items: baseline; margin: 0; }
.result-meta strong { font-size: 22px; letter-spacing: -.04em; }
.result-meta span { color: var(--muted); font-size: 11px; }
.result-meta button { border: 0; background: transparent; color: var(--violet); cursor: pointer; font-size: 11px; }

.store-list { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 6px 12px 24px; }
.store-card { display: grid; grid-template-columns: 9px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--mist); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.store-card:hover { border-radius: 12px; background: #fff; }
.store-card .signal { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px rgb(255 92 138 / 12%); }
.store-card h2 { margin: 0 0 4px; font-size: 14px; }
.store-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.store-card .arrow { color: var(--violet); font-size: 18px; }
.empty { padding: 48px 22px; color: var(--muted); text-align: center; line-height: 1.8; }
.panel-footer { padding: 13px 24px 18px; border-top: 1px solid var(--mist); font-size: 10px; line-height: 1.55; }
.panel-footer p { margin: 0 0 6px; color: var(--muted); }
.panel-footer a { color: var(--violet); font-weight: 700; text-decoration: none; }

.map-stage { position: relative; min-width: 0; background: var(--night-soft); }
#map { width: 100%; height: 100%; }
.map-badge { position: absolute; z-index: 400; top: 18px; right: 18px; padding: 9px 12px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 99px; background: rgb(17 24 42 / 84%); backdrop-filter: blur(10px); color: #fff; font-size: 10px; letter-spacing: .08em; }
.map-badge span { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.open-panel { display: none; }

.maplibregl-ctrl-group { overflow: hidden; border-radius: 12px; box-shadow: 0 8px 22px rgb(17 24 42 / 18%); }
.maplibregl-ctrl-attrib { font-size: 9px; }
.maplibregl-popup-content { padding: 10px 13px; border-radius: 10px; color: var(--ink); font: 700 12px/1.4 "Avenir Next", "Hiragino Sans", sans-serif; }

.detail-dialog { width: min(420px, calc(100vw - 32px)); padding: 28px; border: 0; border-radius: 24px; box-shadow: 0 25px 80px rgb(17 24 42 / 35%); }
.detail-dialog::backdrop { background: rgb(17 24 42 / 44%); backdrop-filter: blur(3px); }
.close-detail { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--mist); cursor: pointer; font-size: 22px; }
.detail-prefecture { margin: 0 0 7px; color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.detail-dialog h2 { margin: 0 32px 12px 0; font-size: 23px; letter-spacing: -.03em; }
.detail-address { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.detail-actions a, .detail-actions button { display: grid; min-height: 43px; place-items: center; border: 1px solid var(--mist); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; font-size: 11px; text-decoration: none; }
.detail-actions a { border-color: var(--violet); background: var(--violet); color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  :root { --panel-width: min(92vw, 390px); }
  .shell { display: block; }
  .panel { position: absolute; inset: 0 auto 0 0; width: var(--panel-width); transform: translateX(-105%); transition: transform .25s ease; }
  .panel.is-open { transform: translateX(0); }
  .close-panel { display: grid; position: absolute; z-index: 3; top: 12px; right: 12px; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: rgb(221 228 243 / 88%); color: var(--ink); cursor: pointer; font-size: 22px; }
  .map-stage { width: 100%; height: 100%; }
  .open-panel { display: block; position: absolute; z-index: 400; left: 14px; bottom: 28px; padding: 12px 18px; border: 0; border-radius: 99px; background: var(--night); box-shadow: 0 12px 30px rgb(17 24 42 / 30%); color: #fff; cursor: pointer; }
  .map-badge { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
