/* 춘천 가이트 공통 스타일.
   "춘천의 더 좋은 공간을 가이드하고, 더 좋은 메이트를 만난다."

   모바일 퍼스트로 짜고 3단계 중단점(모바일 / 태블릿 600px / PC 1024px)을 쓴다.
   이미지 자원과 외부 웹폰트를 쓰지 않고 색·CSS 도형·이모지로만 꾸민다. */

:root {
  /* 색 — 춘천의 산과 호수에서 가져왔다.
     진한 청록은 산, 연한 하늘빛은 호수. 벚꽃 분홍은 벚꽃 명소 표시에만 쓴다. */
  --c-bg: #f4f6f5;             /* 아주 연한 안개빛 */
  --c-bg-soft: #eaefee;
  --c-surface: #ffffff;
  --c-surface-2: #f8faf9;
  --c-text: #17211f;
  --c-text-dim: #5c6b67;
  --c-border: #dde4e2;
  --c-border-soft: #eaefee;

  --c-primary: #1f5e50;        /* 산 (진한 청록) */
  --c-primary-hover: #17493e;
  --c-primary-mid: #2f7d6b;
  --c-primary-soft: #e3efec;
  --c-primary-ink: #11433a;

  --c-lake: #4e9bb5;           /* 호수 */
  --c-lake-soft: #e4f1f5;

  --c-cherry: #c4517a;         /* 벚꽃 명소 표시에만 */
  --c-cherry-soft: #fceef3;

  --c-danger: #b3261e;
  --c-danger-soft: #fdecea;
  --c-warn: #8a5a00;
  --c-warn-soft: #fff6e0;

  --tap-min: 44px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --gap: 12px;
  --page-max: 920px;
  --topbar-h: 58px;
  --tabbar-h: 62px;

  /* 그림자를 두 단계로 둔다. 평소에는 얇게, 띄울 때만 조금 더. */
  --shadow: 0 1px 2px rgba(23, 33, 31, .05), 0 2px 8px rgba(23, 33, 31, .04);
  --shadow-lift: 0 2px 4px rgba(23, 33, 31, .07), 0 8px 20px rgba(23, 33, 31, .08);
  --ring: 0 0 0 3px rgba(31, 94, 80, .18);

  --ease: cubic-bezier(.2, .8, .3, 1);
}

/* 기기가 어두운 화면을 쓰면 색을 바꾼다. */
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #111715;
    --c-bg-soft: #161e1c;
    --c-surface: #1a2321;
    --c-surface-2: #1f2a27;
    --c-text: #e8eeec;
    --c-text-dim: #9aa8a4;
    --c-border: #2e3b38;
    --c-border-soft: #253030;

    --c-primary: #6cc6ac;
    --c-primary-hover: #8ad8c1;
    --c-primary-mid: #4fae95;
    --c-primary-soft: #1a302a;
    --c-primary-ink: #a8e4d2;

    --c-lake: #7cc0d6;
    --c-lake-soft: #16292f;

    --c-cherry: #f093b4;
    --c-cherry-soft: #30222a;

    --c-danger: #ff8a80;
    --c-danger-soft: #35211f;
    --c-warn: #ffce7a;
    --c-warn-soft: #302819;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .35);
    --ring: 0 0 0 3px rgba(108, 198, 172, .25);
  }
}

* { box-sizing: border-box; }

/* hidden 속성이 항상 이기게 한다.
   브라우저 기본 스타일의 [hidden] { display: none }은 우선순위가 가장 낮아서,
   .modal { display: flex } 처럼 클래스에 display를 주면 그쪽이 이겨 버린다.
   그러면 자바스크립트로 el.hidden = true 를 해도 요소가 계속 보인다.
   (실제로 신고 창이 대화방에 들어가자마자 화면을 덮는 문제가 있었다) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  /* 위쪽을 살짝 밝게 해서 평평한 느낌을 줄인다 */
  background-image: linear-gradient(180deg, var(--c-bg-soft) 0, var(--c-bg) 340px);
  background-repeat: no-repeat;
  color: var(--c-text);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic",
               "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 긴 한글 단어가 좁은 화면을 밀어내지 않게 한다. */
  overflow-wrap: break-word;
  /* 한국어는 글자 단위로 끊지 않고 단어(어절) 단위로 줄을 바꾼다.
     이걸 넣지 않으면 "가이드합니 / 다" 처럼 어색하게 잘린다. */
  word-break: keep-all;
}

a { color: var(--c-primary); }

/* --- 머리말 --------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 0 14px;
  background: rgba(255, 255, 255, .88);
  /* 아래 내용이 스크롤되며 살짝 비쳐 보이게 한다 */
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--c-border-soft);
}

@media (prefers-color-scheme: dark) {
  .topbar { background: rgba(26, 35, 33, .88); }
}

/* --- 브랜드 로고 (산과 호수) ---------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--c-text);
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  padding: 4px 6px 4px 2px;
  transition: background .15s var(--ease);
}
.brand:hover { background: var(--c-bg-soft); }
.brand:focus-visible { outline: none; box-shadow: var(--ring); }

.brand__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  overflow: visible;
}
.brand__sun { fill: #f0c184; }
.brand__hill { fill: var(--c-primary-mid); opacity: .55; }
.brand__mid { fill: var(--c-primary-mid); }
.brand__peak { fill: var(--c-primary); }
.brand__snow { fill: #eaf4f0; }
.brand__wave1,
.brand__wave2 {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}
.brand__wave1 { stroke: var(--c-lake); }
.brand__wave2 { stroke: var(--c-lake); opacity: .5; }

@media (prefers-color-scheme: dark) {
  .brand__snow { fill: #d6ece4; }
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.3px; }
.brand__sub {
  font-size: .64rem;
  color: var(--c-text-dim);
  font-weight: 600;
  letter-spacing: .2px;
}

/* 상단 내비: PC에서만 보인다 (기본은 숨김) */
.topnav {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.topnav__item {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  color: var(--c-text-dim);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.topnav__item:hover { background: var(--c-bg-soft); color: var(--c-text); }
.topnav__item.is-active { background: var(--c-primary-soft); color: var(--c-primary-ink); }
.topnav__item:focus-visible { outline: none; box-shadow: var(--ring); }

.topbar__right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip--primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.chip--primary:hover { background: var(--c-primary-hover); color: #fff; }
.chip--admin {
  background: var(--c-primary-soft);
  border-color: transparent;
  color: var(--c-primary-ink);
}

/* --- 본문 ----------------------------------------------------------------- */

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  /* 하단 내비게이션에 가리지 않도록 아래 여백을 준다. */
  padding: 16px 14px calc(var(--tabbar-h) + 28px);
}

.hero {
  margin: 4px 0 16px;
  padding: 2px 0;
}
.hero__title {
  margin: 0 0 7px;
  font-size: 1.38rem;
  line-height: 1.35;
  letter-spacing: -.5px;
  font-weight: 800;
  word-break: keep-all;
  /* 줄바꿈 위치를 균형 있게 잡아 준다 (지원하는 브라우저에서만) */
  text-wrap: balance;
}
/* 설명 문장이 없는 머리글은 아래 여백을 줄여 지도가 더 잘 보이게 한다 */
.hero__title:last-child { margin-bottom: 0; }
.hero__sub { margin: 0; color: var(--c-text-dim); font-size: .92rem; line-height: 1.65; }

/* --- 카드 ----------------------------------------------------------------- */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card--center { text-align: center; }
.card__title { margin: 0 0 6px; font-size: 1.22rem; letter-spacing: -.3px;
               word-break: keep-all; }
.card__sub { margin: 0 0 16px; color: var(--c-text-dim); font-size: .92rem; }
.card__foot { margin: 14px 0 0; font-size: .9rem; text-align: center; color: var(--c-text-dim); }
.card__actions { display: flex; gap: var(--gap); justify-content: center; flex-wrap: wrap; }

.error-emoji { font-size: 2.6rem; margin: 6px 0; }

/* --- 버튼 ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  /* 누를 때 살짝 들어가는 느낌을 준다 */
  transition: background .15s var(--ease), border-color .15s var(--ease),
              transform .08s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover:not(:disabled) {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-surface-2);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn--primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(23, 33, 31, .12);
}
.btn--primary:hover:not(:disabled) {
  background: var(--c-primary-hover);
  border-color: var(--c-primary-hover);
  color: #fff;
}

.btn--danger {
  background: var(--c-danger-soft);
  border-color: transparent;
  color: var(--c-danger);
}
.btn--danger:hover:not(:disabled) {
  border-color: var(--c-danger);
  color: var(--c-danger);
  background: var(--c-danger-soft);
}

.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 13px; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* --- 안내문 --------------------------------------------------------------- */

.notice {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-soft);
  background: var(--c-surface-2);
  font-size: .9rem;
  line-height: 1.65;
}
.notice--warn { background: var(--c-warn-soft); border-color: transparent; color: var(--c-warn); }
.notice--info { background: var(--c-primary-soft); border-color: transparent; color: var(--c-primary-ink); }
.notice--cherry { background: var(--c-cherry-soft); border-color: transparent; color: var(--c-cherry); }

/* --- 바닥글 --------------------------------------------------------------- */

.sitefoot {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px 14px calc(var(--tabbar-h) + 24px);
  text-align: center;
  color: var(--c-text-dim);
  border-top: 1px solid var(--c-border-soft);
}
.sitefoot__slogan {
  margin: 0 0 5px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: -.2px;
}
.sitefoot__note { margin: 0; font-size: .74rem; line-height: 1.6; }

.empty {
  margin: 18px 0;
  padding: 26px 16px;
  text-align: center;
  color: var(--c-text-dim);
  font-size: .92rem;
  line-height: 1.7;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface-2);
}

/* --- 토스트 알림 ---------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px);
  transform: translate(-50%, 16px);
  z-index: 900;
  max-width: min(92vw, 420px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #16211f;
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--c-danger); }

/* --- 하단 내비게이션 ------------------------------------------------------ */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-top: 1px solid var(--c-border-soft);
  /* 아이폰 홈 바 영역을 피한다. */
  padding-bottom: env(safe-area-inset-bottom);
}

@media (prefers-color-scheme: dark) {
  .tabbar { background: rgba(26, 35, 33, .94); }
}

.tabbar__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--tap-min);
  color: var(--c-text-dim);
  text-decoration: none;
  font-size: .7rem;
  font-weight: 700;
  transition: color .15s var(--ease);
}
.tabbar__item.is-active { color: var(--c-primary); }
.tabbar__item:focus-visible { outline: none; box-shadow: inset var(--ring); }

/* 직접 그린 아이콘. 면은 채우고, is-stroke가 붙은 선만 선으로 그린다. */
.tabbar__icon {
  width: 23px;
  height: 23px;
  fill: currentColor;
  transition: transform .18s var(--ease);
}
.tabbar__icon .is-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.tabbar__item.is-active .tabbar__icon { transform: translateY(-1px) scale(1.06); }

/* 지금 보는 화면 위에 작은 표시를 둔다 (색만으로 알려 주지 않기 위해) */
.tabbar__item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--c-primary);
}

.badge {
  position: absolute;
  top: 7px;
  right: 50%;
  margin-right: -21px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--c-danger);
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--c-surface);
}

/* --- 별점 ----------------------------------------------------------------- */

.stars { color: #d79a2b; letter-spacing: .5px; }
.rating-value { font-weight: 700; }
.rating-none { color: var(--c-text-dim); font-size: .88rem; }

/* 화면 낭독기에만 읽히고 눈에는 보이지 않는 설명.
   (평가자에게 보내는 숨긴 지시문이 아니라, 접근성을 위한 표준 기법이다) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- 넓은 화면 ------------------------------------------------------------ */

/* 태블릿 600~1023px */
@media (min-width: 600px) {
  .page { padding: 20px 20px calc(var(--tabbar-h) + 28px); }
  .hero__title { font-size: 1.55rem; }
  .card { padding: 24px 22px; }
}

/* PC 1024px~ : 상단 내비를 쓰고 하단 탭바를 숨긴다 */
@media (min-width: 1024px) {
  :root { --page-max: 1240px; }

  .topnav { display: flex; }
  .tabbar { display: none; }

  /* 하단 탭바가 없으니 아래 여백을 줄인다 */
  .page { padding: 24px 24px 32px; }
  .toast { bottom: 24px; }

  .hero__title { font-size: 1.75rem; }
  .hero__sub { font-size: 0.98rem; }

  .sitefoot { padding-bottom: 24px; }
}

/* 아주 좁은 화면 (320px 대응) */
@media (max-width: 359px) {
  :root { --gap: 10px; }
  .page { padding-left: 10px; padding-right: 10px; }
  .topbar { padding: 0 10px; }
  .topbar__name { font-size: 0.95rem; }
  .chip { padding: 0 8px; font-size: 0.8rem; }
}


/* 계정 전환 버튼 (시연용) */
.chip--switch {
  padding: 0 9px;
  font-size: 0.95rem;
  line-height: 1;
}
