:root {
  --bg-color: #F2F2F7;
  --card-bg: #FFFFFF;
  --text-main: #1C1C1E;
  --text-sub: #8E8E93;
  --accent: #007AFF;
  --grade-excellent: #34C759;
  --grade-good: #007AFF;
  --grade-fair: #FF9500;
  --grade-poor: #FF3B30;
  --grade-danger: url(#dangerGrad); /* SVG internally handled, CSS fallback uses solid */
  --grade-danger-solid: #FF2D55;
}

/* Base resets & iOS styling */
* {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, "SF Pro Display", Pretendard, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* 삼성을 위한 강제 폰트 설정 및 다크모드 차단은 meta 태그로 완료됨 */

.hide { display: none !important; }

/* Loading View */
#loading-view {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  z-index: 9999;
  color: var(--text-sub);
}
#loading-view i.spin {
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
  stroke: var(--text-sub);
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Fade in animation */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 20px;
}
.time-ref {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 4px;
}
.location h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
}

/* Weather Icon */
.weather-icon-wrapper i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  color: var(--text-main);
  margin-bottom: 16px;
}

/* Gauge */
.gauge-container {
  display: block;
  margin: 0 auto 20px auto;
  width: 160px;
  height: 160px;
  position: relative;
}
.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 250px;
}
.circle-bg {
  fill: none;
  stroke: #E5E5EA; /* iOS Light Gray */
  stroke-width: 2.5;
}
.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out, stroke 0.3s ease;
}
.score-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.score-value {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.score-value .small {
  font-size: 18px;
  font-weight: 600;
  margin-left: 2px;
}
.score-grade {
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
}

/* Messages */
.messages {
  margin-bottom: 24px;
}
.msg-line1 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.msg-line2 {
  font-size: 14px;
  color: var(--text-sub);
}
.msg-night {
  font-size: 13px;
  color: var(--grade-fair);
  margin-top: 4px;
  font-weight: 500;
}

/* Outfit Rec */
.outfit-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-color);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.outfit-rec i {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Grid */
.indicators-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.indicator-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease;
}
.indicator-card:active {
  transform: scale(0.96);
}
.indicator-card i {
  width: 20px;
  height: 20px;
  stroke: var(--text-sub);
  margin-bottom: 12px;
}
.ind-label {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 4px;
}
.ind-val {
  font-size: 20px;
  font-weight: 700;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--text-sub);
  font-size: 12px;
  padding-bottom: 20px;
}
.footer .copyright {
  margin-top: 4px;
}
