/* style.css - weather.nlink.kr 초경량 플랫 & 감성 날씨 애니메이션 디자인 시스템 */
:root {
  --bg-canvas: #0b0f19;
  --bg-card: rgba(17, 24, 39, 0.72);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-temp: #38bdf8;
  --accent-rain: #60a5fa;
  --accent-warn: #f87171;
  --graph-line: #38bdf8;
  --graph-fill: rgba(56, 189, 248, 0.15);
  --badge-pill: rgba(255, 255, 255, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Segoe UI", Roboto, sans-serif;
  --app-max-width: 480px;
  --radius-card: 22px;
  --radius-pill: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. 네이티브 터치 검색 방지 및 기본 리셋 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

input, textarea, [contenteditable="true"], .selectable, .selectable-text {
  -webkit-user-select: text;
  user-select: text;
}

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 2. 메인 컨테이너 (갤럭시 S24 및 모바일 360px~480px 최적화) */
.app-container {
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  padding: 12px 14px 80px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* 3. 상단 헤더 바 (깨짐 방지: 360px 모바일 완벽 방어) */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 2px 0;
  gap: 8px;
  width: 100%;
}

.location-picker-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 110px); /* 새로고침 버튼 제거로 지역명 공간 대폭 확장! */
}

/* 🔄 당겨서 새로고침 (Pull to Refresh) 네이티브 인디케이터 */
.p2r-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: height 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, transform 0.2s ease;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-temp);
  margin-top: -6px;
}

.p2r-box.pulling {
  transition: none; /* 드래그 중에는 즉시 추적 */
}

.p2r-box.refreshing {
  height: 38px;
  opacity: 1;
  transform: translateY(0);
}

.p2r-icon {
  font-size: 14px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.p2r-box.ready .p2r-icon {
  transform: rotate(180deg);
}

.p2r-box.refreshing .p2r-icon {
  animation: p2r-spin 0.8s linear infinite;
}

@keyframes p2r-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.location-picker-btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.location-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.location-chevron {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.icon-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 15px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:active {
  transform: scale(0.92);
}

.pwa-pill-btn {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--badge-pill);
  border: 1px solid var(--border-card);
  color: var(--accent-temp);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.pwa-pill-btn:active {
  transform: scale(0.95);
}

/* 4. 즐겨찾기 지역 알약 탭 바 (좌우 페이드아웃 마스크) */
.favorites-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px 6px 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 20px), transparent 100%);
}

.favorites-bar::-webkit-scrollbar {
  display: none;
}

.fav-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--badge-pill);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.fav-pill.active {
  background: var(--text-primary);
  color: var(--bg-canvas);
  border-color: var(--text-primary);
}

/* 5. 메인 히어로 날씨 카드 */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 20px 16px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

.hero-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  width: 100%;
}

.weather-badge {
  background: var(--badge-pill);
  border: 1px solid var(--border-card);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.weather-badge.apparent {
  color: var(--accent-temp);
  border-color: var(--accent-temp);
  background: var(--graph-fill);
}

/* 날씨 애니메이션 그래픽 박스 (날씨날씨 스타일) */
.hero-temp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 6px 0;
}

.weather-anim-box {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

/* ☀️ 맑음 애니메이션: 중심 펄스 + 햇살 광선 회전 */
.anim-sun-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anim-sun-rays {
  position: absolute;
  width: 80px;
  height: 80px;
  animation: sun-spin 20s linear infinite;
  transform-origin: center center;
}

.anim-sun-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fde047 0%, #f59e0b 60%, #d97706 100%);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.55), 0 0 8px rgba(253, 224, 71, 0.8);
  animation: sun-pulse 3.5s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes sun-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sun-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 16px rgba(245, 158, 11, 0.4); }
  100% { transform: scale(1.06); box-shadow: 0 0 32px rgba(245, 158, 11, 0.7); }
}

/* ⛅ 구름 애니메이션: 부드러운 패럴랙스 부유 */
.anim-cloud-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anim-cloud-back {
  position: absolute;
  top: 10px;
  left: 6px;
  opacity: 0.8;
  animation: cloud-float-back 4s ease-in-out infinite alternate;
}

.anim-cloud-front {
  position: absolute;
  bottom: 10px;
  right: 6px;
  z-index: 2;
  animation: cloud-float-front 3.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

@keyframes cloud-float-front {
  0% { transform: translateX(-4px) translateY(0); }
  100% { transform: translateX(5px) translateY(-3px); }
}

@keyframes cloud-float-back {
  0% { transform: translateX(3px) translateY(-2px); }
  100% { transform: translateX(-4px) translateY(2px); }
}

/* 🌧️ 비 애니메이션: 사선 빗방울 */
.anim-rain-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rain-drop {
  position: absolute;
  width: 2.5px;
  height: 14px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1), #38bdf8);
  border-radius: 2px;
  transform: rotate(-15deg);
  animation: rain-fall 0.75s linear infinite;
}

.rain-drop.d1 { left: 24px; top: 44px; animation-delay: 0s; }
.rain-drop.d2 { left: 42px; top: 40px; animation-delay: 0.25s; height: 16px; }
.rain-drop.d3 { left: 60px; top: 46px; animation-delay: 0.5s; }

@keyframes rain-fall {
  0% { transform: translateY(-8px) rotate(-15deg); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(22px) rotate(-15deg); opacity: 0; }
}

/* ❄️ 눈 애니메이션: 살랑살랑 하강 */
.anim-snow-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snowflake {
  position: absolute;
  color: #ffffff;
  font-size: 13px;
  animation: snow-drift 2.8s ease-in-out infinite;
  opacity: 0.9;
}

.snowflake.s1 { left: 22px; top: 38px; animation-delay: 0s; }
.snowflake.s2 { left: 44px; top: 42px; animation-delay: 0.9s; font-size: 10px; }
.snowflake.s3 { left: 62px; top: 36px; animation-delay: 1.8s; font-size: 12px; }

@keyframes snow-drift {
  0% { transform: translateY(-6px) translateX(0); opacity: 0; }
  30% { opacity: 1; }
  50% { transform: translateY(12px) translateX(4px); }
  100% { transform: translateY(26px) translateX(-3px); opacity: 0; }
}

.main-temp {
  font-size: 66px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text-primary);
}

.main-desc {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.temp-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.briefing-summary {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--badge-pill);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  width: 100%;
}

/* 메인 히어로 카드 내장 6구 세부 지표 패널 */
.hero-stats-grid {
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-card);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 6px;
  box-sizing: border-box;
}

.hero-stat-cell {
  background: var(--badge-pill);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 9px 4px 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.hero-stat-cell .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}

.hero-stat-cell .stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 3px;
  line-height: 1.25;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.hero-stat-cell .stat-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-stat-cell .stat-sub[data-grade="좋음"] { color: #38bdf8; }
.hero-stat-cell .stat-sub[data-grade="보통"] { color: #22c55e; }
.hero-stat-cell .stat-sub[data-grade="나쁨"] { color: #f59e0b; }
.hero-stat-cell .stat-sub[data-grade="매우나쁨"] { color: #ef4444; }

[data-theme="paper"] .hero-stat-cell {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(68, 64, 60, 0.12);
}

[data-theme="paper"] .hero-stat-cell .stat-val {
  color: #1c1917;
}

[data-theme="paper"] .hero-stat-cell .stat-sub {
  color: #57534e;
}

[data-theme="paper"] .hero-stat-cell .stat-sub[data-grade="좋음"] { color: #0369a1; }
[data-theme="paper"] .hero-stat-cell .stat-sub[data-grade="보통"] { color: #15803d; }
[data-theme="paper"] .hero-stat-cell .stat-sub[data-grade="나쁨"] { color: #b45309; }
[data-theme="paper"] .hero-stat-cell .stat-sub[data-grade="매우나쁨"] { color: #b91c1c; }

/* 6. 스마트 광고 슬롯 (자연스러운 인피드 & CLS 방지) */
.ad-slot-card {
  width: 100%;
  min-height: 84px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ad-slot-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.ad-slot-placeholder {
  font-size: 12px;
  color: var(--text-muted);
}

/* 7. 향후 24시간 시간별 예보 카드 & 곡선 그래프 */
.hourly-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
}

.section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hourly-scroll-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.hourly-scroll-container::-webkit-scrollbar {
  display: none;
}

.hourly-curve-svg {
  position: absolute;
  top: 60px;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.hourly-scroll {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 2;
  min-width: max-content;
}

.hour-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 50px;
  text-align: center;
}

.hour-time {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.hour-icon {
  font-size: 22px;
  line-height: 1;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hour-temp {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.hour-precip-bar {
  width: 6px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin-top: 4px;
}

.hour-precip-fill {
  width: 100%;
  background: var(--accent-rain);
  border-radius: 3px;
  transition: height var(--transition-fast);
}

.hour-pop {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-rain);
  min-height: 13px;
}

/* 8. 주간 7일 예보 카드 */
.daily-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-row {
  display: grid;
  grid-template-columns: 50px 32px 1fr 60px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-card);
}

.daily-row:last-child {
  border-bottom: none;
}

.daily-day {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.daily-icon {
  font-size: 19px;
  line-height: 1;
}

.daily-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.daily-temp-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  position: relative;
}

.daily-temp-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-temp), #f59e0b);
  border-radius: 2px;
}

.daily-temps {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

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

.daily-temps .max {
  color: var(--text-primary);
  margin-left: 4px;
}

/* 7. 푸터 */
.app-footer {
  text-align: center;
  padding: 16px 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-btn {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
}

/* 11. 모달 및 바텀시트 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: var(--app-max-width);
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: 24px 24px 0 0;
  padding: 18px 18px 20px 18px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overscroll-behavior: contain;
}

/* 📍 지역 검색 모달: 키보드 입력 시 위아래 덜컹거림 원천 차단 (높이 고정) */
#modal-location .modal-sheet {
  height: 80vh;
  max-height: 80vh;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden; /* 시트 전체는 스크롤되지 않고 결과 리스트만 스크롤 */
}

#modal-location .search-results-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  background: var(--border-card);
  border-radius: 2px;
  margin: 0 auto -6px auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--badge-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
}

/* 검색창 */
.search-input-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 12px 14px 12px 38px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-temp);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-item:active {
  background: var(--border-card);
}

/* 테마 선택 그리드 */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.theme-card-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-card-option.active {
  border-color: var(--accent-temp);
  background: var(--graph-fill);
}

.theme-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.theme-preview-dots {
  display: flex;
  gap: 4px;
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 2-in-1 인앱 약관 탭 */
.tab-pills-row {
  display: flex;
  background: var(--badge-pill);
  border-radius: 12px;
  padding: 3px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legal-content-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
}

.legal-content-body h4 {
  color: var(--text-primary);
  margin: 14px 0 6px 0;
  font-size: 14px;
}

.primary-modal-btn {
  width: 100%;
  padding: 13px;
  background: var(--text-primary);
  color: var(--bg-canvas);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: opacity var(--transition-fast);
}

.primary-modal-btn:active {
  opacity: 0.85;
}

/* ==========================================================================
   날씨날씨(WeatherWeather) 스타일 아코디언 & 알약 캡슐 & 모드 전환 탭 시스템
   ========================================================================== */

/* 1. 타임라인 모드 전환 탭 바 */
.timeline-mode-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-pill);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
}

.timeline-mode-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.timeline-mode-btn.active {
  background: var(--text-primary);
  color: var(--bg-canvas);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 2. 주간 일별 예보 아코디언 카드 (날씨날씨 100% 규격) */
.daily-accordion-item {
  border-bottom: 1px solid var(--border-card);
  transition: background-color var(--transition-fast);
  border-radius: 12px;
}

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

.daily-accordion-header {
  display: grid;
  grid-template-columns: 46px 40px 28px 1fr 28px 16px;
  align-items: center;
  gap: 8px;
  padding: 11px 4px;
  cursor: pointer;
  border-radius: 12px;
  transition: background var(--transition-fast);
}

.daily-accordion-header:active {
  background: var(--badge-pill);
}

.daily-day-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.daily-day-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.daily-date-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.daily-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.daily-rain-badge {
  position: absolute;
  top: -8px;
  left: 18px;
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: -0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.daily-temp-min {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
}

.daily-temp-max {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: left;
}

.daily-bar-container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
}

.daily-bar-progress {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #22c55e 50%, #f59e0b 100%);
  border-radius: 3px;
}

.daily-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.daily-accordion-item.open .daily-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

/* 3. 아코디언 펼침 상세 내용 (2시간 간격 알약 캡슐 리스트) */
.daily-accordion-body {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px 10px;
  background: var(--badge-pill);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  margin: 0 0 8px 0;
}

.daily-accordion-item.open .daily-accordion-body {
  display: flex;
}

.hourly-sub-row {
  display: grid;
  grid-template-columns: 56px 28px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 3px 4px;
}

.hourly-sub-time {
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 700;
}

.hourly-sub-icon {
  font-size: 17px;
  line-height: 1;
}

.hourly-sub-line {
  height: 1px;
  background: var(--border-card);
  width: 100%;
}

.hourly-temp-capsule {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.3px;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.hourly-temp-capsule.cool {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.hourly-temp-capsule.warm {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

/* 📜 페이퍼 & 잉크 테마 전용 100% 선명한 딥 잉크(Deep Ink) 고대비 스타일 (가독성 종결) */
[data-theme="paper"] .daily-accordion-body {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(68, 64, 60, 0.14);
}

[data-theme="paper"] .hourly-sub-time {
  color: #292524;
  font-weight: 800;
}

[data-theme="paper"] .hourly-temp-capsule {
  background: #dcfce7;
  color: #15803d; /* 짙은 숲속 에메랄드 잉크 (명도 대비 7:1) */
  border: 1px solid rgba(21, 128, 61, 0.35);
}

[data-theme="paper"] .hourly-temp-capsule.cool {
  background: #e0f2fe;
  color: #0369a1; /* 짙은 딥 네이비 잉크 (명도 대비 7.5:1) */
  border: 1px solid rgba(3, 105, 161, 0.35);
}

[data-theme="paper"] .hourly-temp-capsule.warm {
  background: #fef3c7;
  color: #b45309; /* 짙은 앤틱 앰버 브라운 잉크 (명도 대비 6.5:1) */
  border: 1px solid rgba(180, 83, 9, 0.35);
}

[data-theme="paper"] .daily-date-sub {
  color: #78716c;
  font-weight: 600;
}

[data-theme="paper"] .daily-chevron {
  color: #57534e;
}
