.stores-page {
  min-width: 320px;
  background: #fffdf8;
}

.stores-main {
  width: min(1160px, calc(100% - 56px));
  margin: 0 auto;
  padding: 166px 0 116px;
}

.stores-hero {
  text-align: center;
}

.stores-eyebrow {
  margin: 0 0 14px;
  color: #d7a400;
  font-size: .79rem;
  font-weight: 900;
  letter-spacing: .2em;
}

.stores-hero h1 {
  margin: 0;
  color: #17233d;
  font-family: var(--display);
  font-size: clamp(3rem, 5vw, 5.15rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.06em;
}

.stores-lead {
  margin: 20px 0 0;
  color: #6f737d;
  font-size: 1.03rem;
}

.stores-map-section {
  margin-top: 60px;
}

.stores-map-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(310px, .72fr) minmax(500px, 1.28fr);
  grid-template-areas: "detail national";
  align-items: center;
  gap: 44px;
  padding: 40px 58px;
  background: #fff6d5;
  border: 1px solid rgba(33, 24, 21, .06);
  border-radius: 34px;
}

.national-panel {
  grid-area: national;
  min-width: 0;
}

.detail-map {
  grid-area: detail;
  align-self: center;
  padding: 28px 26px 24px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(33, 24, 21, .1);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(67, 54, 15, .08);
}

.detail-map-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-map-heading > span {
  width: 7px;
  height: 22px;
  background: var(--yellow);
  border-radius: 99px;
}

.detail-map h2 {
  margin: 0;
  color: #17233d;
  font-size: 1.32rem;
  letter-spacing: -.04em;
}

.detail-map > p {
  margin: 7px 0 18px;
  color: #777267;
  font-size: .75rem;
  line-height: 1.55;
}

.map-stage {
  position: relative;
  width: 100%;
}

.national-map {
  width: min(100%, 560px);
  margin: 0 auto;
  aspect-ratio: 560 / 650;
}

.local-map {
  aspect-ratio: 440 / 265;
}

.boundary-map,
.marker-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#koreaBoundary path {
  fill: #ffe491;
  stroke: #d9b53d;
  stroke-width: 1.45;
  vector-effect: non-scaling-stroke;
}

.local-map rect {
  fill: #fffaf0;
  stroke: rgba(33, 24, 21, .12);
  stroke-width: 1.5;
}

.local-river {
  fill: none;
  stroke: #d9e5e6;
  stroke-width: 8;
  stroke-linecap: round;
}

.map-leaders line {
  stroke: #27334d;
  stroke-width: 1.25;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

.map-leaders circle {
  fill: var(--yellow);
  stroke: #17233d;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.marker-layer {
  pointer-events: none;
}

.map-marker-link {
  position: absolute;
  z-index: 2;
  min-width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  color: #17233d;
  pointer-events: auto;
  text-align: center;
}

.map-marker-number {
  min-width: 39px;
  height: 39px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #17233d;
  border: 3px solid #fff6d5;
  border-radius: 999px;
  box-shadow: 0 5px 13px rgba(23, 35, 61, .22);
  font-size: .8rem;
  font-weight: 900;
  line-height: 1;
  transition: transform .18s ease, background .18s ease;
}

.detail-map .map-marker-number {
  border-color: #fffaf0;
}

.map-marker-link small {
  max-width: 96px;
  margin-top: 4px;
  padding: 2px 5px;
  color: #17233d;
  background: rgba(255, 255, 255, .9);
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.map-marker-link:hover .map-marker-number,
.map-marker-link:focus-visible .map-marker-number,
.map-marker-link.is-selected .map-marker-number {
  color: #17233d;
  background: var(--yellow);
  transform: translateY(-3px);
}

.map-marker-link:focus-visible {
  outline: 3px solid #0b6b4d;
  outline-offset: 5px;
  border-radius: 8px;
}

.map-cluster-link .map-marker-number {
  min-width: 88px;
  font-size: .72rem;
}

.map-status {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: min(90%, 390px);
  margin: 0;
  transform: translateX(-50%);
  color: #746b56;
  text-align: center;
  font-size: .7rem;
  line-height: 1.45;
}

.map-source {
  margin: 12px 7px 0;
  color: #858077;
  text-align: right;
  font-size: .68rem;
}

.map-source a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stores-list-section {
  margin-top: 86px;
}

.stores-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #17233d;
}

.stores-list-heading h2 {
  margin: 0;
  color: #17233d;
  font-family: var(--display);
  font-size: clamp(2.35rem, 4vw, 3.65rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.055em;
}

.stores-list-heading p {
  margin: 0;
  color: #70737b;
  font-size: .92rem;
}

.stores-list-heading strong {
  color: #d7a400;
  font-size: 1.15rem;
}

.stores-data-note {
  max-width: 830px;
  margin: 14px 0 0;
  color: #70737b;
  font-size: .76rem;
  line-height: 1.7;
}

.store-card-grid {
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
}

.store-card {
  position: relative;
  min-width: 0;
  min-height: 285px;
  padding: 26px 25px 23px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(23, 35, 61, .12);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(24, 31, 48, .045);
  scroll-margin-top: 112px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.store-card.is-selected {
  border-color: #d6a900;
  box-shadow: 0 0 0 3px rgba(255, 212, 92, .48), 0 16px 34px rgba(24, 31, 48, .1);
  transform: translateY(-3px);
}

.store-card.is-selected::before {
  content: "선택된 지점";
  position: absolute;
  top: -12px;
  right: 17px;
  padding: 3px 9px;
  color: #17233d;
  background: var(--yellow);
  border: 1px solid #d6a900;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 850;
}

.store-card-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.store-card-head > span {
  flex: 0 0 auto;
  min-width: 34px;
  padding-top: 4px;
  color: #d6a400;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.store-card h3 {
  min-width: 0;
  margin: 0;
  color: #17233d;
  font-size: 1.18rem;
  line-height: 1.45;
  letter-spacing: -.04em;
}

.store-card h3:focus {
  outline: 3px solid #0b6b4d;
  outline-offset: 4px;
  border-radius: 4px;
}

.store-card dl {
  margin: 22px 0 24px;
}

.store-card dl > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
}

.store-card dl > div + div {
  margin-top: 10px;
}

.store-card dt {
  color: #8a867d;
  font-size: .74rem;
  font-weight: 700;
}

.store-card dd {
  min-width: 0;
  margin: 0;
  color: #4d515c;
  font-size: .82rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.store-card dd a {
  color: #17233d;
  font-weight: 750;
}

.store-features {
  margin: -8px 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-features span {
  padding: 4px 8px;
  color: #536157;
  background: #f4f6f1;
  border: 1px solid #dde3da;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.35;
}

.store-card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.store-card-actions a {
  min-height: 44px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 800;
}

.store-card-actions span {
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

.store-map-link {
  color: #17233d;
  background: #fff;
  border: 1px solid rgba(23, 35, 61, .3);
}

.store-call-link {
  color: #17233d;
  background: var(--yellow);
  border: 1px solid var(--yellow);
}

.store-card-actions a:hover {
  color: #fff;
  background: #17233d;
  border-color: #17233d;
}

@media (max-width: 1080px) {
  .stores-map-layout {
    grid-template-columns: minmax(280px, .8fr) minmax(430px, 1.2fr);
    gap: 26px;
    padding: 34px;
  }

  .store-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stores-data-note { font-size: .7rem; }
}

@media (max-width: 780px) {
  .stores-main {
    width: min(100% - 36px, 660px);
    padding: 122px 0 96px;
  }

  .stores-eyebrow {
    margin-bottom: 10px;
    font-size: .71rem;
  }

  .stores-hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.65rem);
    line-height: 1.16;
  }

  .stores-lead {
    margin-top: 14px;
    font-size: .93rem;
  }

  .stores-map-section {
    margin-top: 38px;
  }

  .stores-map-layout {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas: "national" "detail";
    gap: 22px;
    padding: 24px 12px 16px;
    border-radius: 22px;
  }

  .national-map {
    width: min(100%, 470px);
  }

  .detail-map {
    padding: 22px 14px 16px;
    border-radius: 18px;
  }

  .detail-map h2 {
    font-size: 1.16rem;
  }

  .detail-map > p {
    margin-bottom: 14px;
    font-size: .7rem;
  }

  .map-marker-number {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-width: 2px;
    font-size: .71rem;
  }

  .map-marker-link small {
    max-width: 86px;
    font-size: .62rem;
  }

  .map-cluster-link .map-marker-number {
    min-width: 77px;
    font-size: .63rem;
  }

  .map-source {
    margin-top: 9px;
    text-align: left;
    font-size: .62rem;
  }

  .stores-list-section {
    margin-top: 66px;
  }

  .stores-list-heading {
    padding-bottom: 15px;
  }

  .stores-list-heading h2 {
    font-size: 2.5rem;
  }

  .stores-list-heading p {
    font-size: .8rem;
  }

  .stores-list-heading strong {
    font-size: 1rem;
  }

  .store-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .store-card {
    min-height: 0;
    padding: 22px 19px 19px;
    border-radius: 14px;
    scroll-margin-top: 90px;
  }

  .store-card h3 {
    font-size: 1.12rem;
  }

  .store-card dl {
    margin: 17px 0 19px;
  }

  .store-features { margin-bottom: 17px; }

  .store-card dd {
    font-size: .8rem;
  }

  .store-card-actions a {
    min-height: 46px;
  }

  .stores-page footer {
    padding-bottom: 104px;
  }
}

@media (max-width: 370px) {
  .stores-main {
    width: calc(100% - 28px);
  }

  .stores-map-layout {
    margin-inline: -2px;
    padding-inline: 8px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .store-card,
  .map-marker-number {
    transition: none;
  }
}
