:root {
  /* 라이트(기본) 테마 – 가독성 향상을 위해 텍스트 색상을 더 진하게 조정 */
  --bg-gradient: radial-gradient(circle at top, #fdf8f3 0, #f5eadc 40%, #ebdcc9 100%);
  --card: rgba(255, 251, 247, 0.96);
  --card-elevated: #ffffff;
  --accent: #a66539; /* 조금 더 진한 브라운 */
  --accent-soft: rgba(166, 101, 57, 0.1);
  --text-main: #1a1512; /* 훨씬 더 진한 검은색에 가까운 브라운 */
  --text-sub: #4a4036;  /* 보조 텍스트도 충분히 진하게 */
  --border-soft: rgba(120, 100, 80, 0.3); /* 테두리도 약간 더 선명하게 */
  --chip-bg: #e6d8c9;
  --map-overlay-top: rgba(80, 60, 45, 0.85);
  --map-overlay-bottom: rgba(80, 60, 45, 0.7);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.1);
  --radius-lg: 20px;
  --radius-md: 14px;
}

body[data-theme="dark"] {
  /* 다크 테마 – 차분한 딥 브라운 */
  --bg-gradient: radial-gradient(circle at top, #2d1b12 0, #1f120b 45%, #120905 100%);
  --card: rgba(40, 26, 18, 0.95);
  --card-elevated: #352319;
  --accent: #e6a77d;
  --accent-soft: rgba(230, 167, 125, 0.15);
  --text-main: #f2e9e1;
  --text-sub: #b8a695;
  --border-soft: rgba(230, 200, 180, 0.2);
  --chip-bg: #402c1f;
  --map-overlay-top: rgba(30, 20, 15, 0.92);
  --map-overlay-bottom: rgba(30, 20, 15, 0.8);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* 부드러운 폰트 스택 (중국 시스템 폰트 포함, 구글 폰트 미사용) */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* 부드러운 애니메이션을 위한 클래스 */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.title-main {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.title-sub {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 400;
}

.section {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 탭 스타일 개선 */
.nav-pages {
  display: flex;
  background: var(--chip-bg);
  padding: 4px;
  border-radius: 999px;
  margin-top: 8px;
}

.nav-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab.active {
  background: var(--card-elevated);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 지도 영역 부드럽게 */
.map-wrapper {
  background: var(--card-elevated);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-soft);
  margin-bottom: 16px;
}

.leaflet-map {
  width: 100%;
  height: 350px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

/* 일정 요약 그리드 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.summary-item {
  background: var(--card-elevated);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-item.full-width {
  grid-column: span 2;
}

.summary-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-content strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.summary-content p {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

/* 일정 에디터 그룹 */
.plan-editor-group {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.plan-info-row {
  margin-top: 10px;
}

/* 게시판 입력 그룹 */
.board-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.board-title-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--card-elevated);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.board-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--card-elevated);
  color: var(--text-main);
  font-size: 14px;
  resize: vertical;
}

/* 게시글 카드 */
.board-posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-post-card {
  background: var(--card-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.board-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.board-post-title {
  font-weight: 700;
  font-size: 15px;
}

.board-post-date {
  font-size: 11px;
  color: var(--text-sub);
}

.board-post-content {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-main);
}

.board-post-delete {
  margin-top: 10px;
  font-size: 11px;
  color: #ef4444;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* 개인 메모 카드 스타일 (재사용) */
#personalMemosContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.extra-card {
  background: var(--card-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 14px;
}

.place-pill {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--card-elevated);
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.place-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.place-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* 버튼 스타일 개선 */
.btn {
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-main {
  background: var(--accent);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(196, 131, 86, 0.3);
}

.btn-main:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* 카드 및 텍스트 상세 */
.place-detail {
  padding: 16px;
  border-radius: var(--radius-md);
  line-height: 1.7;
}

.place-korean {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.place-chinese-row {
  font-size: 13px;
  margin-bottom: 2px;
}

/* 텍스트 영역 */
.plan-textarea, .extra-text {
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: inherit;
  line-height: 1.6;
}

