*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  padding-bottom: 50px; /* ✅ powered by 배너 안 가리게 여유 공간 */
}

/* 헤더 */
.app-header {
  padding: 16px 20px;
  background: #020617;
  border-bottom: 1px solid #1f2937;
}

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

.app-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* 언어 토글 버튼 */
.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-btn {
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}

.lang-btn.active {
  border-color: #22c55e;
}

/* 메인 영역 */
.content {
  padding: 12px 12px 64px;
  max-width: 480px;
  margin: 0 auto;
}

/* 카드 공통 */
.card {
  background: #020617;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #1f2937;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

/* 코스 카드 */
.course-card {
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #020617;
  border: 1px solid #111827;
}

.course-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.run-score {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: #111827;
  color: #e5e7eb;
  font-weight: 700;
}

.run-index-row {
  display: none; /* 본문 '러닝 지수 xx/100' 숨김 */
}

.course-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* 배지 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid #4b5563;
}

.badge-good {
  border-color: #22c55e;
  color: #bbf7d0;
}

.badge-wet {
  border-color: #38bdf8;
  color: #bae6fd;
}

.badge-bad {
  border-color: #f97373;
  color: #fecaca;
}

.advice-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #0b1224;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  line-height: 1.4;
}

.advice-short {
  font-weight: 600;
  margin-bottom: 4px;
}

.advice-detail {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.score-rows {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
  display: grid;
  gap: 2px;
  display: none; /* 바람/공기질 점수는 숨김 */
}

.score-row {
  display: flex;
  justify-content: space-between;
}

.score-label {
  color: #9ca3af;
}

.location-row {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.location-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.location-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

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

.course-actions {
  display: none; /* GPX 링크 숨김 */
}

/* 풋터 */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 0.7rem;
  text-align: center;
  padding: 6px 8px;
  background: #020617ee;
  color: #6b7280;
}

.course-list-updated {
  margin-top: 4px;
  margin-bottom: 16px;  /* ✅ 카드와의 간격 */
  font-size: 0.85rem;
  color: #9ca3af;
}

.src-logo {
  position: fixed;       /* 화면 오른쪽 위에 고정 */
  top: 12px;
  right: 16px;
  z-index: 50;
}

.src-logo img {
  height: 50px;          /* 로고 크기 조정 */
  width: auto;
  display: block;
}
