:root {
  --bg: #f3f1ed;
  --card: #ffffff;
  --navy: #101b2f;
  --navy-soft: #23344d;
  --muted: #687386;
  --line: #e4e7ec;
  --green: #18c38f;
  --green-soft: #dff8ee;
  --yellow: #fff1c7;
  --yellow-text: #8d650d;
  --blue-soft: #d9ecff;
  --purple-soft: #eadcff;
  --red-soft: #ffe1e1;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
}

body.app-map-mode {
  margin: 0;
  background: #ffffff;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

body.app-map-mode .app-shell {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  gap: 0;
}

body.app-map-mode .content-panel {
  display: none !important;
}

body.app-map-mode .map-panel {
  position: relative;
  top: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}

body.app-map-mode .map-header {
  display: none !important;
}

body.app-map-mode .map-wrap,
body.app-map-mode #map {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

body.app-map-mode .map-wrap {
  flex: none;
}

body.app-map-mode .gps-btn {
  left: 20px;
  bottom: 86px;
  width: 50px;
  height: 50px;
}

body.app-map-mode .gps-label {
  left: 14px;
  bottom: 32px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 11px;
}

body.app-map-mode .gps-btn-icon {
  font-size: 28px;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 28;
}

body.app-map-mode .map-post-label {
  max-width: calc(100vw - 96px);
  min-width: 0;
  gap: 5px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

body.app-map-mode .map-post-label-tag {
  max-width: 88px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

body.app-map-mode .map-post-label-date,
body.app-map-mode .map-post-label-time {
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  min-width: 0;
}

button,
input,
textarea {
  font: inherit;
}

a {
  text-decoration: none;
}

/* 전체 레이아웃 */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 48% 52%;
  gap: 14px;
  padding: 14px;
}

/* ================= 왼쪽 지도 패널 ================= */

.map-panel {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.map-eyebrow {
  margin: 0 0 12px;
  color: #5f6878;
  font-size: 14px;
  font-weight: 800;
}

.map-header h1 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.25;
  color: var(--navy);
}

.map-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}



/* 기존 설명 문구 아래에 붙는 앱 설치 유도 문구입니다. */
.map-app-desc {
  margin: 12px 0 0;
  color: #344054;
  line-height: 1.65;
  font-size: 15px;
  font-weight: 700;
}

.map-header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.small-gold-btn,
.small-dark-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.small-gold-btn {
  background: #fff0c2;
  color: #8a6413;
}

.small-dark-btn {
  background: var(--navy);
  color: white;
}

.map-wrap {
  position: relative;
  flex: 1;
}

#map {
  width: 100%;
  height: 100%;
}

.map-fallback-message {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  background: #f8fafc;
}

/* GPS 버튼 */
.gps-btn {
  position: absolute;
  left: 28px;
  bottom: 86px;
  z-index: 900;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #101b2f;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gps-btn:hover {
  transform: translateY(-2px);
}

.gps-btn-icon {
  font-family: "Material Symbols Outlined";
  font-size: 32px;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 32;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}

.gps-label {
  position: absolute;
  left: 22px;
  bottom: 34px;
  z-index: 900;
  background: white;
  color: var(--navy);
  border-radius: 12px;
  padding: 10px 13px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.map-post-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  padding: 8px 10px;
  background: white;
  border: 2px solid #dce7f4;
  border-radius: 999px;
  color: var(--navy);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
  transform: translate(28px, -50%);
}

.map-post-label::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white;
  border-left: 2px solid #dce7f4;
  border-bottom: 2px solid #dce7f4;
}

.map-post-label.selected {
  border-color: #3975ff;
  background: #f2f6ff;
}

.map-post-label.selected::before {
  border-left-color: #3975ff;
  border-bottom-color: #3975ff;
  background: #f2f6ff;
}

.map-post-label-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.map-post-label-date,
.map-post-label-time {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.map-post-attend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(57, 117, 255, 0.24);
  border-radius: 999px;
  background: #f2f6ff;
  color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(57, 117, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

/* 카테고리 색상 */
.category-walk {
  background: #fff1c7;
  color: #8d650d;
}

.category-hike {
  background: #dff8ee;
  color: #117a59;
}

.category-food {
  background: #d9ecff;
  color: #2269a8;
}

.category-cafe {
  background: #eadcff;
  color: #6f3cb8;
}

.category-movie {
  background: #ffe1e1;
  color: #a93737;
}

.category-golf {
  background: #e3f7d4;
  color: #407a1f;
}

.category-run {
  background: #e1efff;
  color: #1f5c9c;
}

.category-default {
  background: #eef2f7;
  color: #344054;
}

/* 현재 위치 마커 */
.current-location-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2e78ff;
  border: 4px solid white;
  box-shadow: 0 0 0 14px rgba(46, 120, 255, 0.22),
              0 0 0 32px rgba(46, 120, 255, 0.10);
}

/* ================= 오른쪽 콘텐츠 패널 ================= */

.content-panel {
  height: calc(100vh - 28px);
  overflow-y: auto;
  padding-right: 6px;
}

/* 스크롤바 */
.content-panel::-webkit-scrollbar {
  width: 8px;
}

.content-panel::-webkit-scrollbar-thumb {
  background: #a8afb9;
  border-radius: 99px;
}

.hero-card,
.notice-card,
.write-card,
.meeting-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

/* =========================
   상단 앱 소개 카드
========================= */
.hero-card {
  background: #ffffff;
  color: var(--navy);
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

/* 로고 + 버튼 윗줄 */
.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

/* 로고 이미지 크게 */
.hero-logo {
  width: min(100%, 520px);   /* 기존보다 크게 */
  max-height: 150px;         /* 기존보다 크게 */
  height: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 1;
}

/* 상단 버튼 묶음 */
.hero-actions-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
  flex-shrink: 0;
}

/* 소개 배지 */
.hero-badge {
  margin: 2px 0 10px;
  color: var(--navy);
  font-weight: 800;
  font-size: 18px;
}

/* 소개 카드 제목 */
.hero-card h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 34px;
  line-height: 1.32;
  font-weight: 900;
  letter-spacing: -0.4px;
}


/* 소개 카드 본문 */
.hero-card p {
  color: var(--navy-soft);
  line-height: 1.72;
  font-size: 15px;
}

/* 장점 카드 2개 */
.app-benefit-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;  /* 가로 배치 */
  gap: 12px;
}

.app-benefit-list li {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  min-height: 88px;
}

.app-benefit-list strong {
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
}


.app-benefit-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

/* 공통 버튼 */
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
  transition: 0.2s ease;
  box-sizing: border-box;
}

/* 메인 버튼 */
.primary-btn {
  background: #37c978;
  color: #ffffff;
}

/* 보조 버튼 */
.secondary-btn {
  background: #f4f6fa;
  color: var(--navy);
  border: 1px solid #e3e8ef;
}


.hero-card .secondary-btn {
  background: #f3f5f8;
  color: var(--navy);
}

/* 초기 안내 모달 */
.intro-notice-modal[hidden] {
  display: none;
}

.intro-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.intro-notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 27, 47, 0.42);
}

.intro-notice-dialog {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.intro-notice-dialog h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.35;
}

.intro-notice-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.intro-notice-dialog p + p {
  margin-top: 6px;
}

.intro-notice-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.intro-notice-btn:hover {
  filter: brightness(0.96);
}

/* 안내 */
.notice-card {
  padding: 24px 28px;
}

.notice-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* 글쓰기 카드 */
.write-card {
  padding: 24px;
}

.write-card h3 {
  margin: 0 0 18px;
  font-size: 24px;
}

.write-grid {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 28px;
}

.write-left,
.write-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fixed-field-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.field-row-top {
  align-items: flex-start;
}

.write-card label {
  font-weight: 900;
  color: var(--navy);
  padding-top: 2px;
}

.write-card input,
.write-card textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d7dce5;
  outline: none;
  background: white;
}

.write-card input {
  min-height: 48px;
  padding: 0 15px;
}

.write-card textarea {
  min-height: 136px;
  resize: vertical;
  padding: 15px;
  line-height: 1.6;
}

.write-card textarea:focus,
.write-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 195, 143, 0.12);
}

/* 장소 자동완성 */
.place-search-block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestions-panel {
  position: absolute;
  top: 82px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border: 1px solid #d7dce5;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.suggestion-item {
  width: 100%;
  border: none;
  background: white;
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #eef2f7;
}

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

.suggestion-item:hover {
  background: #f8fafc;
}

.suggestion-name {
  display: block;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 4px;
}

.suggestion-address {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

/* 태그 */
.tag-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 36px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 900;
}

.tag-remove-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  color: inherit;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.submit-btn {
  margin-top: auto;
  min-height: 54px;
  border: none;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

/* 모임 카드 */
.meeting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(270px, 1fr));
  gap: 14px;
}

.meeting-card {
  padding: 24px;
  border: 2px solid transparent;
  transition: 0.18s ease;
}

.meeting-card:hover {
  transform: translateY(-2px);
}

.meeting-card.selected {
  border-color: #3b7cff;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-top-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.card-chip,
.card-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 900;
}

 .card-chip {
   flex: 0 0 auto;
   white-space: nowrap;
   word-break: keep-all;
 }

.card-time {
  flex: 0 0 auto;
  background: var(--green-soft);
  color: #117a59;
  white-space: nowrap;
  word-break: keep-all;
}

.card-attend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 11px;
  background: #f2f6ff;
  color: #1d4ed8;
  border: 1px solid rgba(57, 117, 255, 0.22);
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
}

.meeting-card h4 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.32;
}

.card-desc {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.card-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--navy-soft);
}

.card-meta span {
  display: block;
}

.card-tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.card-attend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.card-attend strong {
  font-size: 16px;
}

.attend-btn {
  min-height: 48px;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--navy);
  color: white;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.attend-btn.done {
  background: #3975ff;
}

.comment-toggle-btn {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.comment-toggle-btn span {
  margin-left: 10px;
}

.comment-panel {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}

.comment-input {
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--navy);
}

.comment-submit-btn {
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  background: var(--navy);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.comment-submit-btn:disabled,
.comment-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.comment-list {
  max-height: 156px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.comment-item {
  padding: 9px 0;
  border-bottom: 1px solid #eef2f7;
}

.comment-author {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.comment-item p,
.comment-empty,
.comment-error {
  margin: 0;
  line-height: 1.5;
}

.comment-error {
  margin-bottom: 8px;
  color: #b42318;
  font-size: 14px;
  font-weight: 800;
}

/* 푸터 */
.footer {
  text-align: center;
  padding: 28px 0 38px;
  color: var(--muted);
}

/* 모바일 */
@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .map-panel {
    position: relative;
    top: 0;
    height: 640px;
  }

  .content-panel {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 8px;
  }

  .intro-notice-modal {
    padding: 18px;
  }

  .intro-notice-dialog {
    padding: 24px;
  }

  .intro-notice-dialog h2 {
    font-size: 20px;
  }

  .map-header {
    flex-direction: column;
  }

  .map-header h1 {
    font-size: 23px;
  }

  .hero-card h2 {
    font-size: 24px;
  }

  .write-grid {
    grid-template-columns: 1fr;
  }

  .fixed-field-row {
    grid-template-columns: 1fr;
  }

  .meeting-grid {
    grid-template-columns: 1fr;
  }

  .comment-submit-btn {
    min-height: 42px;
  }

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

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .gps-btn {
    width: 54px;
    height: 54px;
  }

  .gps-btn-icon {
    font-size: 30px;
  }

  .hero-top-row {
    flex-direction: column;
    gap: 16px;
  }

  .hero-logo {
    width: 100%;
    max-height: 130px;
  }


  .hero-actions-top {
    width: 100%;
  }

  .hero-actions-top .primary-btn,
  .hero-actions-top .secondary-btn {
    width: 100%;
  }
 
   .hero-card h2 {
    font-size: 26px;
  }

  .app-benefit-list {
    grid-template-columns: 1fr; /* 모바일에서는 세로 */
  }

}

@media (max-width: 340px),
       (min-width: 1050px) and (max-width: 1249px) {
  .card-attend {
    gap: 6px;
  }

  .comment-toggle-btn,
  .attend-btn {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 13px;
  }

  .comment-toggle-btn span {
    margin-left: 4px;
  }
}
