/* ==========================================================================
   멍자국 — 공통 컴포넌트 스타일
   모든 색상은 tokens.css 의 var(--color-*) 를 참조합니다.
   ========================================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ---------- 공통 헤더: 왼쪽 메뉴 + 중앙 로고 + 오른쪽 사용자 ---------- */

.app-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 22px 24px 0;
}

/* 로고: 왼쪽 고리 + 초록 알약(흰 점, 글자, 주황 발자국) */
.logo {
  position: relative;
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* 고리는 로고 폭에서 빼서(absolute) 초록 알약이 정확히 가운데 오도록, 알약 왼쪽 끝에 9px 걸침 */
.logo-ring {
  position: absolute;
  right: calc(100% - 9px);
  top: 50%;
  z-index: 1;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border: 3px solid var(--color-text-muted);
  border-radius: 50%;
  opacity: 0.55;
}

.logo-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 14px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-on-primary);
}

.logo-paw {
  width: 16px;
  height: 18px;
  fill: var(--color-accent);
}

/* 왼쪽 메뉴 */
.app-nav {
  grid-column: 1;
  justify-self: start;
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-nav a {
  font-size: 14px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.app-nav a.active {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.app-nav a:hover {
  color: var(--color-primary-dark);
}

/* 오른쪽: 아바타 + 닉네임 + 로그아웃 / 로그인 */
.app-user {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 뒤쪽 .avatar / .avatar-sm 규칙보다 우선하도록 두 클래스로 지정 */
.avatar.nav-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
  background: var(--color-accent);
  color: var(--color-on-accent-white);
  font-weight: 800;
}

.nav-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* 알림: 종 아이콘 + 안 읽은 수 배지 + 아래로 열리는 알림 창 (담당: 박용제) */
/* 알림 창은 종이 아니라 오른쪽 영역(.app-user) 끝에 맞춰서, 좁은 화면에서도 밖으로 안 나가게 */
.app-user {
  position: relative;
}

.nav-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}

.nav-bell:hover,
.nav-bell[aria-expanded="true"] {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.nav-bell:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
}

/* 새 알림: 종 오른쪽 위 작은 빨간 점 (테두리는 배경색이라 종과 살짝 떨어져 보임) */
.nav-bell-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-notify);
  box-shadow: 0 0 0 2px var(--color-bg);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.notification-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 700;
}

.notification-empty {
  margin: 0;
  padding: 24px 16px;
  font-size: 13px;
  text-align: center;
  color: var(--color-text-muted);
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
}

.notification-list li + li {
  border-top: 1px solid var(--color-border);
}

.notification-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
}

a.notification-item:hover {
  background: var(--color-surface-muted);
}

/* 이번에 처음 보는(안 읽은) 알림은 연한 초록 배경 + 왼쪽 초록 점 */
.notification-item.is-unread {
  background: var(--color-primary-soft);
}

.notification-item strong {
  font-size: 13.5px;
  font-weight: 700;
}

.notification-item.is-unread strong::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 6px 2px 0;
  border-radius: 50%;
  background: var(--color-primary);
  vertical-align: middle;
}

.notification-message {
  font-size: 13px;
  color: var(--color-text-muted);
}

.notification-time {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.nav-logout-form {
  margin: 0;
}

.nav-logout,
.nav-login {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-logout:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* 로그인 버튼: 모든 페이지에서 같은 초록 테두리 버튼 */
.nav-login {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  font-weight: 700;
}

.nav-login:hover {
  background: var(--color-primary-soft);
}

/* 아래: 점선 + 가운데 발자국 두 개 */
.header-trail {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.header-trail::before,
.header-trail::after {
  content: "";
  flex: 1;
  border-top: 3px dotted var(--color-secondary);
}

.header-trail svg {
  width: 40px;
  height: 24px;
  fill: var(--color-primary);
}

/* ---------- 타이틀 영역 ---------- */
.page-title {
  font-size: 21px;
  font-weight: 700;
  margin: 4px 0 4px;
}

.page-sub {
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin: 0 0 20px;
}

.walk-recommend-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}
.walk-recommend-header .page-title {
  margin: 0;
}
.walk-recommend-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}
.walk-recommend-refresh svg {
  width: 18px;
  height: 18px;
}
.walk-recommend-refresh:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
}
.walk-recommend-refresh:active:not(:disabled) {
  transform: translateY(1px);
}
.walk-recommend-refresh:disabled {
  cursor: default;
  opacity: 0.65;
}
.walk-recommend-refresh:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- 메인 홈 배너 (담당: 박용제) ---------- */

.main-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 56px 56px;
  margin: 20px 0 40px;
  border-radius: 24px;
  background: #DDEBCB;
}

.banner-text,
.banner-stat {
  position: relative;
  z-index: 2;
}

.banner-text {
  max-width: 480px;
}

.banner-text h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.28;
  margin: 0 0 14px;
  color: #22361A;
}

.banner-text p {
  font-size: 15px;
  color: #4A6238;
  margin: 0 0 26px;
}

/* 발자국 트레일 (장식용) */
/* 오른쪽 카드(폭 340px + 배너 여백 56px) 바로 왼쪽에 붙여서 카드와 겹치지 않게 */
.banner-trail {
  position: absolute;
  right: calc(56px + 340px + 12px);
  top: 50%;
  width: 220px;
  height: 196px;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

/* 배너가 좁아지면 인사말·카드 사이 공간이 부족해서 트레일 숨김 */
@media (max-width: 960px) {
  .banner-trail {
    display: none;
  }
}

.trail-line {
  fill: none;
  stroke: #C9DEB0;
  stroke-width: 3;
  stroke-dasharray: 4 8;
  stroke-linecap: round;
}

.trail-paws {
  fill: #F4A36B;
}

.trail-pin {
  fill: #5B8C3E;
}

/* 헤더 로고도 .paw 클래스를 쓰므로 배너 안으로 범위 한정 */
.banner-trail .paw {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: paw-step 5s infinite;
}

@keyframes paw-step {
  0% { opacity: 0; transform: scale(.6); }
  6% { opacity: 1; transform: scale(1); }
  75% { opacity: 1; }
  90%, 100% { opacity: 0; }
}

/* 모션 줄이기 설정한 사용자는 애니메이션 없이 표시 */
@media (prefers-reduced-motion: reduce) {
  .banner-trail .paw {
    animation: none;
    opacity: 1;
  }
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.hero-actions .btn {
  width: auto;
  padding: 14px 22px;
}

/* 배너 오른쪽: 이번 주 나의 산책 (담당: 박용제) */
.hero-weekly {
  flex: none;
  width: 340px;
}

.hero-weekly-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.hero-weekly-stats {
  display: flex;
  justify-content: space-around;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
}

.hero-weekly-stats b {
  font-size: 22px;
  font-weight: 800;
  margin-right: 2px;
}

.hero-weekly-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* 모바일: 세로 배치, 트레일 숨김 */
@media (max-width: 768px) {
  .main-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
  }

  .banner-trail {
    display: none;
  }

  .banner-stat {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .banner-text h1 {
    font-size: 26px;
  }

  .hero-actions {
    flex-direction: column;
  }
}

.block-label {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

.block-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.block-label-row .block-label {
  margin: 0;
}

.section-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

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

   규칙:

   - 메인(Primary, 초록): 화면당 핵심 액션 1개 — 산책 시작, 저장하기 등

   - 포인트(Accent, 오렌지): 시선을 끄는 하이라이트 액션 — 동행 신청, 같이 걷기 모집 등

   - 아웃라인: 보조/차선 액션 — 공유하기, 자세히 보기 등

------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease,
    transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

button.btn {
  font-family: inherit;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-highlight {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-highlight:hover {
  background: var(--color-accent-hover);
}

/* 주황 버튼이지만 글자는 검정 대신 진한 갈색으로 부드럽게 (산책 취소) */
.btn-highlight.btn-soft-text {
  color: var(--color-on-accent-soft);
}

.btn-highlight.is-done {
  background: var(--color-secondary-soft);
  color: var(--color-primary-dark);
}

.btn-outline {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

#course-share:disabled {
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
  transition: none;
}
#course-share:disabled:hover,
#course-share:disabled:active {
  border-color: var(--color-border);
  color: var(--color-text);
  transform: none;
}

.btn-outline-primary {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary);
}

.btn-outline-primary:hover {
  background: var(--color-primary-soft);
}

.btn-kakao {
  background: var(--color-kakao);
  color: var(--color-on-kakao);
}

.btn-naver {
  background: var(--color-naver);
  color: var(--color-on-naver);
}

.btn-google {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* 소셜 로그인 버튼 hover: 세 버튼 모두 살짝 떠오르며 그림자 + 배경 조금 진하게 */
.btn-kakao,
.btn-naver,
.btn-google {
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.btn-kakao:hover,
.btn-naver:hover,
.btn-google:hover {
  filter: brightness(0.96);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn-kakao:hover,
  .btn-naver:hover,
  .btn-google:hover {
    transform: none;
  }
}

.oauth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--color-surface);
  color: var(--color-naver);
}

/* 소셜 로그인 버튼 안의 로고 이미지 (카카오톡) */
.oauth-img {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 4px;
}

.oauth-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn {
  width: auto;
  flex: 1;
}

/* ---------- 배지 / 태그 ----------

   규칙: 시선을 끄는 강조(추천/신규/기록중 등)는 포인트 컬러(accent-soft + text).

   생동감 있는 보조 강조(활력 있는 코스 등)는 서브 컬러(secondary-soft + text).

   중립 상태(참여 인원 등)는 surface + border.

------------------------------------ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-accent-soft);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.tag-secondary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-secondary-soft);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.tag-neutral {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.tag-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
}

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

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 24px;
}

/* 산책로 카드 (리스트 아이템형) */

.route-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
}

.route-item:hover {
  border-color: var(--color-primary);
}

.route-item.static {
  cursor: default;
}

.route-item.static:hover {
  border-color: var(--color-border);
}

.route-thumb {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.route-thumb.route-distance {
  width: 72px;
  height: 72px;
  min-width: 72px;
  flex-shrink: 0;
  flex-direction: column;
  gap: 5px;
  color: var(--color-primary);
}

.route-distance-value {
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.route-distance-unit {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
}

.walk-recommend-loading-card {
  pointer-events: none;
}
.walk-recommend-loading-distance,
.walk-recommend-loading-line {
  background: linear-gradient(100deg, var(--color-surface-muted) 35%, var(--color-primary-soft) 50%, var(--color-surface-muted) 65%);
  background-size: 200% 100%;
  animation: walk-recommend-shimmer 1.6s ease-in-out infinite;
}
.walk-recommend-loading-distance {
  border-radius: var(--radius-sm);
}
.walk-recommend-loading-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px 0;
}
.walk-recommend-loading-line {
  display: block;
  max-width: 100%;
  height: 11px;
  border-radius: 6px;
}
.walk-recommend-loading-line:first-child {
  height: 16px;
}
.walk-recommend-more-status {
  margin: 20px 0;
  text-align: center;
}
#walk-recommend-sentinel {
  height: 1px;
}
@keyframes walk-recommend-shimmer {
  to { background-position-x: -200%; }
}
@media (prefers-reduced-motion: reduce) {
  .walk-recommend-loading-distance,
  .walk-recommend-loading-line { animation: none; }
}

.route-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-item p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.route-item .meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ---------- 지도 미리보기 ---------- */

.map-preview {
  position: relative;
  background: var(--color-map);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.map-chip.floating {
  top: auto;
  left: 16px;
  bottom: 16px;
  transform: none;
}

.map-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--color-surface);
  color: var(--color-primary-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

/* ---------- 폼 ---------- */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--color-text);
  font-family: inherit;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
}

.field-row {
  display: flex;
  gap: 14px;
}

.field-row .field {
  flex: 1;
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
}

.pill.selected {
  background: var(--color-secondary-soft);
  border-color: var(--color-secondary);
  color: var(--color-text);
}

.photo-upload {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-align: center;
  flex: none;
}

.pet-photo-upload {
  position: relative;
  width: 112px;
  height: 112px;
  border: 2px dashed var(--color-primary);
  border-radius: 16px;
  color: var(--color-primary);
  cursor: pointer;
  font-family: inherit;
}

.pet-photo-prompt:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pet-photo-prompt>span {
  font-size: 11px;
  color: var(--color-text-muted);
}

.pet-photo-upload:hover {
  border-style: solid;
}

.pet-photo-upload:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.pet-photo-upload:disabled {
  cursor: wait;
  opacity: 0.6;
}

.pet-photo-change {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 5px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 700;
}

/* ---------- 아바타 ---------- */

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.avatar-muted {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

/* ---------- 탭 ---------- */

.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--color-border);
  margin: 20px 0 20px;
}

.tab {
  padding: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
}

.tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

/* ---------- 포커스 화면 (로그인, 반려견 프로필 등 단일 카드 중심 화면) ----------

   무채색 회색 배경 위에 넓은 흰 카드를 그림자로 띄워 시선이 카드 하나에 집중되도록 합니다.

   이 화면의 버튼/선택 상태 등 강조 요소는 서브 컬러(#A7C957, 활력)를 사용합니다.

------------------------------------ */

.focus-page {
  position: relative;
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-backdrop);
  padding: 40px 24px;
}

.focus-card {
  position: relative;
  z-index: 1;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: none;
}

.focus-card.card-pad {
  padding: 36px 30px;
}

.focus-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-on-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 18px;
  box-shadow: var(--shadow-md);
}

/* ---------- 로그인 화면: 왼쪽 소개 + 오른쪽 소셜 로그인 (담당: 박용제) ---------- */

.login-page {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 776px;
  min-height: 380px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

/* 왼쪽: 메인 배너와 같은 연두 배경·글자색 */
.login-intro {
  position: relative;
  padding: 36px 30px;
  background: #DDEBCB;
}

.login-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5B8C3E;
}

.login-intro h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  color: #22361A;
}

.login-trail {
  position: absolute;
  left: 60px;
  bottom: 20px;
  width: 200px;
  height: 180px;
  pointer-events: none;
}

/* 오른쪽: 소셜 로그인 */
.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 32px;
}

.login-form h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}

.login-sub {
  margin: 0 0 24px;
}

.login-note {
  margin: 18px 0 0;
  text-align: center;
}

/* 좁은 화면: 위아래로 쌓고 트레일은 숨김 */
@media (max-width: 640px) {
  .login-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-trail {
    display: none;
  }

  .login-intro,
  .login-form {
    padding: 28px 22px;
  }
}

/* 포커스 화면 전용 버튼 — 서브 컬러(#A7C957) */

.btn-focus {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
}

.btn-focus:hover {
  background: var(--color-secondary-hover);
}

/* ---------- 2단 레이아웃 (메인 홈: 추천 리스트 + 자유 진입) ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 640px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------- 그리드 ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pet-card {
  min-height: 116px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.pet-card .photo {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--color-surface-muted);
}

.pet-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-card .pet-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pet-card .pet-info strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.pet-card .pet-info span {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.pet-card:not(.add) {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pet-card:not(.add):hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.pet-card.add {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-style: dashed;
  color: var(--color-primary-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- 같이 걷기 모집 중 (메인 홈) ---------- */
.meet-section {
  margin-top: 32px;
}

.meet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .meet-grid {
    grid-template-columns: 1fr;
  }
}

.meet-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  text-decoration: none;
  color: inherit;
}

.meet-card:hover {
  border-color: var(--color-primary);
}

.meet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meet-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-secondary-soft);
  color: var(--color-primary-dark);
}

.meet-status.closed {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.meet-date {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.meet-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.meet-card .meet-cond {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-muted);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar i {
  display: block;
  height: 100%;
  background: var(--color-accent);
}

.progress-bar.is-full i {
  background: var(--color-border);
}

.meet-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.meet-count b {
  color: var(--color-text);
}

/* ---------- 푸터 ---------- */

.site-footer {
  max-width: 980px;
  margin: 56px auto 0;
  padding: 24px 24px 40px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 12.5px;
}

/* ---------- 게시판 카드 ---------- */

.board-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.board-card .map-preview {
  height: 130px;
  border-radius: 0;
}

.board-card .board-body {
  padding: 14px 16px 16px;
}

.board-card h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
}

.board-card .meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

/* ---------- 동행 신청 관리 (마이페이지) ---------- */

.request-count {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.request-list-toggle {
  margin: 6px auto 0;
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.past-request-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--color-border);
}

.past-request-group summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.past-request-group summary span {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
}

.past-request-group[open] summary {
  margin-bottom: 12px;
}

.request-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
}

.request-status.pending {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
}

.request-status.accepted {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.request-status.rejected {
  background: var(--color-status-reject-soft);
  color: var(--color-status-reject);
}

.request-status.closed {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.request-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

.companion-request-section + .companion-request-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.my-request-item {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.my-request-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.request-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  margin-bottom: 10px;
}

.request-item .who {
  flex: 1;
}

.request-item .who .name {
  font-size: 13.5px;
  font-weight: 700;
}

.request-item .who .route {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.request-actions {
  display: flex;
  gap: 6px;
}

.request-actions button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-accept {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn-accept:hover {
  background: var(--color-primary-hover);
}

.btn-reject {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border) !important;
}

.btn-reject:hover {
  border-color: var(--color-text-muted) !important;
}

.mypage-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.mypage-message {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.mypage-message.success {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.mypage-message.reject {
  background: var(--color-status-reject-soft);
  color: var(--color-status-reject);
}

.mypage-message.error {
  background: var(--color-status-reject-soft);
  color: var(--color-status-reject);
  border-left: 4px solid var(--color-status-reject);
  font-weight: 600;
}

.btn-danger-outline {
  background: var(--color-surface);
  color: var(--color-status-reject);
  border: 1px solid var(--color-status-reject);
}

.btn-danger-outline:hover {
  background: var(--color-status-reject-soft);
}

/* ---------- 활동 상세 ---------- */

.activity-pet-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.activity-filter-chip {
  padding: 7px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.activity-filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.activity-filter-chip.active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.activity-pet-names {
  display: block;
  margin: 5px 0 2px;
  color: var(--color-primary-dark) !important;
  font-size: 12.5px;
  font-weight: 700;
}

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

.activity-detail-actions form {
  display: flex;
}

.activity-detail-actions .btn {
  width: 100%;
}

@media (max-width: 420px) {
  .activity-detail-actions {
    grid-template-columns: 1fr;
  }
}

/* ---------- 댓글 ---------- */

.comment-input {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.comment-input input {
  flex: 1;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
}

.comment-input input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.comment-input button {
  border: none;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.comment-input button:hover {
  background: var(--color-primary-hover);
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.comment .name {
  font-size: 13px;
  font-weight: 700;
}

.comment .time {
  font-size: 11.5px;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.comment p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--color-text);
}

/* ---------- 통계 카드 (산책 기록) ---------- */
.stat-row {
  display: flex;
  gap: 14px;
  margin: 16px 0;
}

.stat-card {
  flex: 1;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.stat-card .label {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 20px;
  font-weight: 800;
}

/* ---------- 유틸 ---------- */

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-0 {
  margin-bottom: 0;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-link {
  color: var(--color-primary-dark);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.small {
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

/* ---------- 반응형 ---------- */

@media (max-width: 760px) {
  /* 좁은 화면: 1행 로고, 2행 왼쪽 메뉴 + 오른쪽 사용자 */
  .app-header {
    grid-template-columns: 1fr auto;
    row-gap: 14px;
  }

  .logo {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .app-nav {
    grid-column: 1;
    grid-row: 2;
    gap: 16px;
  }

  .app-user {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 520px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .app-header {
    padding: 18px 16px 0;
  }

  .app-nav {
    gap: 12px;
  }

  .app-nav a,
  .nav-logout,
  .nav-login {
    font-size: 12.5px;
  }

  /* 공간이 부족하면 닉네임은 숨기고 아바타만 */
  .nav-user {
    display: none;
  }
}

/* ---------- 모바일 세부 반응형 ---------- */

@media (max-width: 420px) {
  .tabs {
    gap: 14px;
  }

  .tab {
    font-size: 13px;
  }

  .request-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .request-item .who {
    min-width: 0;
  }

  .request-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }
}

/* 배너 오른쪽: 산책 중 "지금 산책" 카드 (담당: 박용제) */
.hero-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hero-live-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

.hero-live-stats {
  display: flex;
  align-items: flex-end;
}

.hero-live-stat {
  flex: 1;
  min-width: 0;
}

.hero-live-divider {
  flex: none;
  width: 1px;
  height: 44px;
  margin: 0 16px;
  background: var(--color-border);
}

.hero-live-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.hero-live-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-live-value .unit {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.hero-live-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
}

/* ---------- 메인 홈: 추천 산책로 / 바로 산책하기 높이 맞춤 (담당: 박용제) ---------- */

.home-cols {
  align-items: stretch;
}

.home-walk {
  display: flex;
  flex-direction: column;
}

.home-walk>.card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-walk .map-preview {
  flex: 1;
  min-height: 300px;
}

@media (max-width: 640px) {
  .home-walk .map-preview {
    flex: none;
    height: 260px;
  }
}

/* ---------- 산책 반려견 선택 모달 (담당: 최주영) ---------- */

.walk-pet-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}

.walk-pet-modal {
  width: min(440px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.walk-pet-modal h2 {
  margin: 0;
  font-size: 20px;
}

.walk-pet-modal-description {
  margin: 8px 0 18px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.walk-pet-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.walk-pet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.walk-pet-option:hover {
  border-color: var(--color-primary);
}

.walk-pet-option input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--color-primary);
}

.walk-pet-option-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.walk-pet-option-info strong {
  font-size: 14px;
}

.walk-pet-option-info span {
  color: var(--color-text-muted);
  font-size: 12px;
}

.walk-pet-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 420px) {
  .walk-pet-modal {
    padding: 20px;
  }
}

.walk-pet-option-photo {
  width: 46px;
  height: 46px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--color-primary-soft);
  font-size: 20px;
}

.walk-pet-option-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 동행 모집 글: 함께 산책할 반려견 선택 (담당: 최주영) ---------- */

.board-pet-description {
  margin: 0 0 10px;
}

.board-pet-select-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* .field label보다 우선하도록 범위 지정 */
.field .board-pet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.field .board-pet-option:hover {
  border-color: var(--color-primary);
}

.field .board-pet-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.field .board-pet-option input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
  accent-color: var(--color-primary);
}

.board-pet-required {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--color-text) !important;
  cursor: pointer;
}

.board-pet-required input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-primary);
}

@media (max-width: 520px) {
  .board-pet-select-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 동행 모집 상세: 모임 정보 (담당: 최주영) ---------- */

.meeting-detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meeting-detail-title {
  margin: 12px 0 18px;
  font-size: 22px;
}

.meeting-info-card {
  margin-top: 0;
}

.meeting-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.meeting-info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px dashed var(--color-border);
}

.meeting-info-item:nth-child(odd) {
  border-right: 1px dashed var(--color-border);
}

.meeting-info-item:nth-last-child(-n + 2) {
  border-bottom: none;
}

.meeting-info-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.meeting-info-item strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
}

.meeting-description {
  margin: 0;
  white-space: pre-wrap;
}

.meeting-info-item strong {
  color: var(--color-text);
}

.meeting-pet-required {
  color: var(--color-accent-hover) !important;
}

@media (max-width: 520px) {
  .meeting-info-grid {
    grid-template-columns: 1fr;
  }

  .meeting-info-item:nth-child(odd) {
    border-right: none;
  }

  .meeting-info-item:nth-last-child(-n + 2) {
    border-bottom: 1px dashed var(--color-border);
  }

  .meeting-info-item:last-child {
    border-bottom: none;
  }
}

/* 모집 상세: 모집자 및 참여 현황 (담당: 최주영) */

.meeting-host-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meeting-host-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}

.meeting-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--color-border);
}

.meeting-participant-avatars {
  display: flex;
  margin-top: 6px;
}

.meeting-participant-count {
  flex: none;
  font-size: 13px;
  color: var(--color-primary-dark);
}

@media (max-width: 420px) {
  .meeting-participant-row {
    align-items: flex-start;
  }

  .meeting-participant-count {
    font-size: 12.5px;
  }
}

/* ---------- 메인 홈 : 산책 시작 시 산책중인 반려견 표시 (담당: 최주영) ---------- */

.walk-pet-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
}

.walk-pet-summary-label {
  color: var(--color-text-muted);
}

.walk-pet-summary strong {
  color: var(--color-text);
}

/* ---------- 산책 기록 상세페이지: 반려견 프로필 카드 (담당: 최주영) ---------- */

.walk-current-pets {
  margin-top: 20px;
}

.walk-current-pet-photo {
  width: 52px;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--color-primary-soft);
  font-size: 22px;
}

.walk-current-pet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.walk-current-pet-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.walk-current-pet-info strong {
  font-size: 14px;
}

.walk-current-pet-info span {
  color: var(--color-text-muted);
  font-size: 12px;
}

.walk-current-pet-activity {
  color: var(--color-primary-dark) !important;
  font-weight: 700;
}

/* ---------- 상세페이지 공통: 함께하는 반려견 프로필 그룹 카드 (담당: 최주영) ---------- */

.walk-pet-group-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.walk-pet-group-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 16px;
}

/* PC: 좌우 항목 사이 짧은 점선 */
.walk-pet-group-item:nth-child(odd):not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 0;
  bottom: 14px;
  border-right: 1px dashed var(--color-border);
}

/* 두 번째 줄부터 위쪽에 여백 있는 점선 */
.walk-pet-group-item:nth-child(n+3)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  border-top: 1px dashed var(--color-border);
}

/* 홀수 마지막 항목은 전체 폭 */
.walk-pet-group-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .walk-pet-group-card {
    grid-template-columns: 1fr;
  }

  .walk-pet-group-item:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .walk-pet-group-item:nth-child(odd):not(:last-child)::after {
    display: none;
  }

  .walk-pet-group-item + .walk-pet-group-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    border-top: 1px dashed var(--color-border);
  }
}

/* ---------- 메인 홈: 산책 날씨 / 나가기 전 체크 (담당: 박용제) ---------- */

.home-extras {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 640px) {
  .home-extras {
    grid-template-columns: 1fr;
  }
}

.weather-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-icon {
  font-size: 36px;
  line-height: 1;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.weather-main b {
  font-size: 26px;
  font-weight: 800;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.check-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

/* ---------- 산책 지도 (카카오맵) - 담당: 박용제 ---------- */

.walk-map {
  position: absolute;
  inset: 0;
}

.walk-route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.walk-route-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.walk-route-swatch {
  display: inline-block;
  width: 22px;
  border-top: 4px solid;
  border-radius: 2px;
}
.walk-route-swatch.planned {
  border-color: var(--color-primary);
}
.walk-route-swatch.actual {
  border-color: var(--color-accent-hover);
}

.map-preview .map-chip {
  z-index: 2;
}

.map-preview.has-map>svg {
  display: none;
}

.map-preview.has-map .map-chip {
  top: auto;
  left: 16px;
  bottom: 16px;
  transform: none;
}

.walk-map-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

/* ---------- 오류 페이지 ---------- */

.error-card {
  max-width: 560px;
  margin: 80px auto;
  text-align: center;
}

.error-code {
  margin-bottom: 8px;
  font-size: 48px;
  font-weight: 700;
  color: var(--color-primary);
}

.error-card h1 {
  margin-bottom: 12px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.error-actions .btn {
  width: auto;
}

/* ---------- 맨 위로 버튼 (모든 페이지 공통) - 담당: 박용제 ---------- */

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000; /* 카카오맵보다 위 */
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.scroll-top:hover {
  background: var(--color-primary-hover);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

