.band {
  padding-block: clamp(26px, 4vw, 48px) 8px
}

.top {
  position: relative
}

.spark {
  width: 52px;
  height: 40px;
  margin-left: 2px;
  vertical-align: top;
  pointer-events: none
}

.top .in {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: max(4vw, 16px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between
}

h1 {
  font-size: clamp(36px, 5vw, 52px);
  color: var(--pink-600);
  text-shadow: 3px 3px 0 var(--pink-200)
}

.top p {
  margin: 8px 0 0;
  color: var(--body);
  font-size: 17px
}

/* 폰에선 소개 문구를 숨겨 달력이 한 줄이라도 더 위로 */
@media(max-width:600px) {
  .top p {
    display: none
  }
}

.acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px max(4vw, 16px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 32px;
  align-items: start
}

.side {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 18px
}

.fbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px max(4vw, 16px) 0;
  display: grid;
  gap: 10px
}

/* 검색창 + 자세히 검색을 한 칸으로: 바깥 테두리는 .srow 하나, 오른쪽 끝에 구분선 + 필터 버튼 */
.srow {
  display: flex;
  align-items: stretch;
  border: 1px solid #f0dbe7;
  border-radius: 14px;
  background: #fff
}

.srow:has(#q:focus-visible) {
  outline: 3px solid var(--sky-600);
  outline-offset: 2px
}

.srow input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none
}

.srow input:focus-visible {
  outline: none
}

#fMore {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid #f0dbe7;
  border-radius: 0 14px 14px 0;
  background: none;
  color: var(--body);
  font-size: 15px
}

#fMore:hover,
#fMore.on {
  color: var(--pink-600)
}

#fMore svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round
}

/* 폰에선 필터 아이콘 + 배지만(글자는 aria-label로) */
@media(max-width:600px) {
  #fMore .lbl {
    display: none
  }
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pink-600);
  color: #fff;
  font-size: 12px
}

/* 보기 탭·지역: 박스 없이 글자만. 고른 칸은 핑크 글자 + 밑줄 */
.vrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 16px
}

.tabs {
  display: flex;
  gap: 4px
}

.tabs .chip,
.tabs .chip[aria-pressed=true] {
  position: relative;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--body)
}

.tabs .chip[aria-pressed=true] {
  color: var(--pink-600)
}

.tabs .chip[aria-pressed=true]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: var(--pink-600)
}

.tabs .chip:hover {
  color: var(--pink-600)
}

/* 작은 드롭다운 메뉴(언어·그 외 지역): 위치는 main.js가 버튼 아래로 잡음 */
.menu {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 150px;
  max-height: 60vh;
  overflow: auto;
  padding: 6px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgb(117 10 73 / .14)
}

.menu:popover-open {
  display: grid
}

.mi {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: 15px var(--f-body);
  text-align: left;
  cursor: pointer
}

.mi:hover {
  background: var(--pink-50)
}

.mi[aria-pressed=true] {
  color: var(--pink-600)
}

/* 찜 목록 공유 메뉴의 닉네임 칸(저장 안 함, 매번 입력) */
.menu input {
  width: 200px; /* 고정: 늘어나는 기본 폭이면 위치 잡을 때 잰 너비와 달라져 화면 끝에 붙음 */
  min-height: 40px;
  margin-bottom: 4px
}

.menu input:focus-visible {
  outline-offset: -3px /* 메뉴가 overflow:auto라 바깥 테두리가 잘림 */
}

.mi small {
  color: var(--mute);
  font-size: 12px
}

/* 드롭다운을 여는 글자 버튼(언어·지역): 박스 없이, 고른 게 있으면 핑크 */
.drop {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--body);
  font-size: 14px;
  white-space: nowrap
}

.drop:hover,
.drop.on {
  color: var(--pink-600)
}

/* 언어: 가는 선 지구본 + KO. 외국인도 찾을 수 있게 다른 글자 버튼보다 한 단계 진하게 */
/* 언어(지구본)·지역(위치 핀) 버튼: 아이콘 + 잉크색 15px로 다른 글자 버튼보다 한 단계 진하게 */
.drop.lang,
.drop.ico {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 15px
}

.drop.ico.on {
  color: var(--pink-600)
}

.drop.ico svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round
}

.drop.ico .chev {
  width: 14px;
  height: 14px;
  stroke-width: 2.6
}

/* 폰: 보기 탭과 지역 버튼이 한 줄에 들어가게('지역: ' 글자 숨김, 탭·버튼 여백 조금 줄임. 일본어 탭이 길어서) */
@media(max-width:600px) {
  .drop.ico .pre {
    display: none
  }

  .vrow {
    column-gap: 8px
  }

  .vrow .drop.ico {
    padding: 0 4px
  }

  #vMode .chip {
    padding: 0 7px;
    font-size: 14px
  }

  #vMode .chip[aria-pressed=true]::after {
    left: 7px;
    right: 7px
  }
}

.drop.lang:hover {
  color: var(--pink-600)
}

.drop.lang svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5
}

.menu hr {
  margin: 4px 8px;
  border: 0;
  border-top: 1px solid #f3e4ee
}

.top .acts {
  align-items: center;
  margin-left: auto /* 로고 옆에 안 들어가 줄이 바뀌어도 오른쪽 끝(검색·지역과 같은 선)에 붙게 */
}

.listhead {
  scroll-margin-top: 16px; /* 폰 한 줄 안내·공유 확인창에서 목록으로 내려올 때 화면 맨 위에 붙지 않게 */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px
}

.listhead h2 {
  font-size: 28px;
  color: var(--ink)
}

/* 개수는 오른쪽으로, 그 옆에 '찜 목록 공유'(늘 보이는 조용한 글자 버튼) */
.listhead #count {
  margin-left: auto
}

#shareFav {
  min-height: 36px;
  align-self: center;
  padding: 0 2px 0 6px;
  font-size: 14px
}

/* 폰: 제목 줄이 넘치지 않게 공유 아이콘만(글자는 aria-label로) */
@media(max-width:600px) {
  #shareFav span {
    display: none
  }

  #shareFav svg {
    width: 20px;
    height: 20px
  }
}

/* 목록 제목이 곧 드롭다운(진행 중·예정 ▾). 제목 글자 그대로, 고른 게 기본이 아니면 핑크 */
.drop.ttl {
  min-height: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit
}

.drop.ttl.on {
  color: var(--pink-600)
}

/* 누를 수 있는 게 보이게: 연핑크 동그라미 안에 굵은 꺾쇠(작은 ▾ 글자는 안 보여서 바꿈) */
.drop.ttl .caret {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--pink-50);
  color: var(--pink-600);
  vertical-align: middle
}

.drop.ttl .caret svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round
}

.drop.ttl:hover .caret {
  background: var(--pink-200)
}

/* 하이라이트(놓치지 마세요 등)가 목록 제목 위에 있을 때 사이 간격 */
#spots:not(:empty)+.listhead {
  margin-top: 26px
}

/* 맨 위로: 아래로 내리면 오른쪽 아래에 나타남 */
.foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px max(4vw, 16px) 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  color: var(--body);
  border-top: 1px solid #f0dbe7;
  padding-top: 20px
}

.foot p {
  margin: 0;
  max-width: 640px
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px
}

.foot a {
  color: var(--body);
  text-decoration: none
}

.foot a:hover {
  color: var(--pink-600);
  text-decoration: underline
}

/* 맨 아래 저작권 줄 = 만든이 표시. '만들었어요'처럼 앞에 나서지 않고, 다른 푸터 글자보다 살짝 크고 진하게 */
.foot .credit {
  flex-basis: 100%;
  font-size: 14.5px;
  color: var(--ink)
}

.foot .credit a {
  color: var(--ink);
  font-weight: 700
}

/* 화면 양쪽 빈 여백에 리본 스티커 4개(장식 구역). 내용 옆에 여백이 충분한 넓은 화면에서만, 스크롤해도 제자리 */
.side-deco {
  display: none
}

@media(min-width:1360px) {
  .side-deco {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    --m: calc((100vw - 1240px) / 2 + 4vw) /* 화면 끝에서 내용까지 폭 */
  }

  /* 자리·크기·기울기는 index.html의 style 변수(--y·--w·--r·--dx)로. 여백 가운데에 오게 */
  .side-deco img {
    position: absolute;
    top: var(--y);
    width: var(--w);
    filter: var(--sticker);
    transform: rotate(var(--r));
    opacity: .92
  }

  .side-deco .l {
    left: calc(var(--m) / 2 - var(--w) / 2 + var(--dx, 0px))
  }

  .side-deco .r {
    right: calc(var(--m) / 2 - var(--w) / 2 - var(--dx, 0px))
  }
}

.totop {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 8;
  width: 48px;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1.5px solid var(--pink-200);
  color: var(--pink-600);
  box-shadow: 0 2px 8px rgb(117 10 73 / .12);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s
}

.totop.on {
  opacity: 1;
  visibility: visible
}

.totop svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round
}

@keyframes tw {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .35
  }
}

.top svg path {
  animation: tw 2.6s ease-in-out infinite
}

.top svg path:nth-child(3n) {
  animation-delay: .9s
}

.top svg path:nth-child(3n+1) {
  animation-delay: 1.7s
}

@media(prefers-reduced-motion:reduce) {
  .top svg path {
    animation: none
  }
}


@media(max-width:860px) {
  main {
    grid-template-columns: minmax(0, 1fr)
  }

  .side {
    position: static
  }

  body:not([data-view=list]) .side {
    display: none
  }

  .only-d {
    display: none
  }
}

@media(min-width:861px) {
  .only-m {
    display: none
  }
}
