/* =========================================================
   기본 설정
========================================================= */

* {
  margin: 0;
  padding: 0;
}
@media (min-width: 1101px) {
  body.weather-body::before {
    opacity: 0.12 !important;
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
      112deg,
      transparent 0 12px,
      rgba(220, 245, 255, 0.08) 13px,
      transparent 14px 28px
    );
    mix-blend-mode: screen;
  }
  body.index-body {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    grid-template-rows: 100dvh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.weather-body .hourly-section .section-title h2::before {
    font-size: 23px;
  }
  body.weather-body .weather-panel-list button small {
    opacity: 0.7;
  }
  body.weather-body .weather-detail {
    flex-direction: column !important;
    justify-content: center !important;
  }
  body.weather-body .weather-detail span {
    opacity: 0.82 !important;
  }
}
@media (min-width: 901px) {
  body.history-body .history-page {
    position: relative !important;
  }
  body.history-body .history-header .back-button {
    display: none !important;
  }

  body.history-body .history-intro {
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 18px !important;
    background: var(--sky-tone-1) !important;
  }

  body.weather-body .weather-card {
    flex-direction: column;
    grid-row: 2 !important;
  }
  body.weather-body .weather-main {
    flex: 1;
  }
  body.weather-body .hour-item {
    min-height: 112px;
  }
  body.index-body .stadium-marker {
    gap: 5px !important;
  }
  body.index-body .marker-incheon {
    top: 24% !important;
    left: 42% !important;
  }
  body.index-body .marker-jamsil {
    top: 29% !important;
    left: 50% !important;
  }
  body.index-body .marker-suwon {
    top: 35% !important;
    left: 45% !important;
  }
  body.index-body .marker-daejeon {
    top: 47% !important;
    left: 50% !important;
  }
  body.index-body .marker-daegu {
    top: 59% !important;
    left: 60% !important;
  }
  body.index-body .marker-gwangju {
    top: 69% !important;
    left: 42% !important;
  }
  body.index-body .marker-changwon {
    top: 68% !important;
    left: 56% !important;
  }
  body.index-body .marker-busan {
    top: 70% !important;
    left: 66% !important;
  }

  body.index-body .main-page {
    max-width: none !important;
  }

  body.index-body .map-section,
  body.index-body .index-weather-panel {
    min-width: 0 !important;
  }

  body.index-body .korea-map {
    transform-origin: initial !important;
  }
  body.weather-body .temperature .hero-location {
    font-size: 25px !important;
  }
  body.weather-body .temperature #temperature {
    font-size: 72px !important;
  }
  body.weather-body .hourly-section {
    grid-row: 3 !important;
  }
}
@media (min-width: 701px) {
  body.history-body .app-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.history-body .history-page {
    grid-row: 1 !important;
    max-width: none !important;
  }
  body.history-body .history-header {
    gap: 14px !important;
  }
  body.history-body .back-button {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }
  body.history-body .history-intro {
    margin-bottom: 20px !important;
  }

  body.index-body .map-section {
    border-radius: 0 !important;
    visibility: visible !important;
  }

  /* Fill the laptop viewport on weather.html without changing mobile sizing. */
  body.weather-body .weather-card,
  body.weather-body .hourly-section {
    max-width: none !important;
  }
  body.index-body .app-sidebar,
  body.weather-body .app-sidebar,
  body.history-body .app-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    height: 100dvh !important;
  }
}
@media (min-width: 1101px) {
  body.index-body .main-page {
    position: relative !important;
  }
  body.index-body .map-section {
    z-index: 5 !important;
    left: 22px !important;
    right: 462px !important;
    bottom: 22px !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--sky-tone-2) 25%, transparent) !important;
    justify-content: flex-start !important;
  }
  body.index-body .map-section::before {
    position: absolute;
    z-index: 3;
    top: 14px;
    left: 20px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
  }

  body.weather-body .app-sidebar {
    inset: auto !important;
  }

  body.weather-body .weather-card {
    justify-content: center;
    grid-row: 1 !important;
  }

  body.weather-body .hero-location {
    overflow-wrap: anywhere;
    text-align: left !important;
  }

  body.weather-body .weather-stadium-panel {
    inset: auto !important;
    z-index: 20 !important;
  }
}

body.index-body .stadium-marker-info {
  min-width: 0 !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  line-height: 1.1 !important;
}

/* Match the nationwide weather panel used on weather.html. */
body.index-body .index-weather-panel.weather-stadium-panel {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 12px 0 0 !important;
  padding: 8px 14px 16px !important;
  border: 1px solid rgba(224, 240, 251, 0.2) !important;
  border-radius: 16px !important;
  background: var(--sky-panel) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  font-size: 17px !important;
  backdrop-filter: blur(18px) !important;
  overflow: hidden !important;
}

body.index-body .weather-panel-search {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 8px 12px !important;
  gap: 9px !important;
  border: 1px solid rgba(228, 243, 253, 0.24) !important;
  border-radius: 14px !important;
  background: var(--sky-tone-4) !important;
  color: #f2f8fc !important;
}

body.index-body .weather-panel-search > svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(226, 241, 250, 0.82);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.index-body .weather-panel-search input {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f2f8fc;
  font: inherit;
  font-size: 12px;
}

body.index-body .weather-panel-search input::placeholder {
  color: rgba(226, 241, 250, 0.62);
}

body.index-body .weather-panel-current-city {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding-left: 8px;
  border-left: 1px solid rgba(228, 243, 253, 0.18);
  font-size: 12px;
}

body.index-body .weather-panel-current-city svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.index-body .weather-panel-current-city strong {
  font-size: 12px;
  font-weight: 600;
}

body.index-body .index-weather-panel h2 {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 14px 8px 10px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid rgba(228, 243, 253, 0.18) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

body.index-body .weather-panel-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: 60px !important;
  align-content: start !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 1px 2px !important;
  gap: 4px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

body.index-body .weather-panel-list button {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) auto 16px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 60px !important;
  height: 60px !important;
  padding: 7px 10px !important;
  gap: 8px !important;
  border: 1px solid rgba(227, 242, 252, 0.24) !important;
  border-radius: 16px !important;
  background: var(--sky-tone-5) !important;
  color: #f2f8fc !important;
  text-align: left !important;
  overflow: hidden !important;
  transition:
    background-color 140ms ease,
    border-color 140ms ease !important;
  font-family: inherit !important;
}

body.index-body .weather-panel-list button:hover,
body.index-body .weather-panel-list button:focus-visible {
  border-color: rgba(235, 247, 255, 0.48) !important;
  background: var(--sky-tone-6) !important;
}

body.index-body .weather-panel-list button span {
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

body.index-body .weather-panel-list button .stadium-weather-icon {
  display: grid;
  place-items: center;
  width: 32px;
  font-size: 26px !important;
}

body.index-body .weather-panel-list button .stadium-weather-name {
  display: block;
}

body.index-body .weather-panel-list button small {
  display: block !important;
}

body.index-body .weather-panel-list button b {
  font-size: 21px !important;
  font-weight: 400 !important;
}

body.index-body .weather-panel-list button i {
  font-size: 18px !important;
  font-style: normal !important;
  align-self: auto !important;
  opacity: 0.9 !important;
}

body.index-body
  .index-weather-panel.weather-stadium-panel
  .weather-panel-list
  button
  span,
body.index-body
  .index-weather-panel.weather-stadium-panel
  .weather-panel-list
  button
  b {
  align-self: auto !important;
}

body.index-body
  .index-weather-panel.weather-stadium-panel
  .weather-panel-list
  button
  small {
  margin-top: 3px !important;
}

body.index-body .weather-panel-list button[hidden] {
  display: none !important;
}

body.index-body .weather-panel-empty {
  margin: 12px 6px;
  color: rgba(230, 241, 248, 0.72);
  font-size: 12px;
  text-align: center;
}

html {
  width: 100%;
  min-height: 100%;
  overscroll-behavior-y: none;
  background: var(--sky-tone-7) !important;
}

body {
  width: 100%;
  font-size: 15px;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

/* ---------- 지도 영역 ---------- */

.map-section {
  justify-content: center;
  align-items: center;
}

.korea-map {
  position: relative;
}

.korea-svg-img {
  position: absolute;
  top: 0;
  z-index: 1;
}

.stadium-marker {
  position: absolute;
  z-index: 2;

  transition: 0.15s ease;
  border: 1px solid var(--sky-tone-8) !important;
}

.back-button {
  flex-shrink: 0;

  font-size: 22px;
  border-radius: 4px !important;
}

/* 날씨 요약 */

.weather-main {
  align-items: center;

  gap: 20px;
}

.weather-icon {
  line-height: 1;
}

.temperature strong {
  margin-bottom: 5px;
}

.weather-detail span {
  display: block;

  margin-bottom: 7px;
}

.section-title {
  justify-content: space-between;

  align-items: center;
}

.hour-item {
  text-align: center;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.hour-item .time {
  display: block;
}

.hour-item .icon {
  display: block;
}

.hour-item .rain {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7) !important;
}

.history-page .section-title {
  display: block;
}

/* ---------- 과거 날씨 ---------- */

/* =========================================================
   모바일 - 700px 이하
========================================================= */

@media (max-width: 700px) {
  .korea-map {
    aspect-ratio: 524 / 631;
  }

  .weather-main {
    gap: 12px;
  }

  .main-page .map-section {
    align-items: flex-start;
  }

  body.index-body .weather-panel-list button {
    font-size: 13.3333px !important;
  }

  body.index-body .weather-panel-list button b {
    line-height: normal !important;
    min-width: 30px !important;
  }
}
body.history-body .history-header,
body.history-body .history-intro {
  width: 100% !important;
}

@media (min-width: 901px) {
  /* Stable three-column weather shell.
   Keep the sidebar and stadium list independent from the center dashboard. */
  @media (min-width: 1101px) {
    body.weather-body .weather-panel-list button b {
      flex: 0 0 auto;
    }
    body.weather-body .weather-panel-list button i {
      flex: 0 0 auto;
    }
  }

  /* Index: fill the viewport with only the map and weather panel. */
  @media (min-width: 1101px) {
    body.index-body .index-weather-panel.weather-stadium-panel {
      font-family:
        "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif !important;
    }

    body.index-body
      .index-weather-panel.weather-stadium-panel
      .weather-panel-list
      button
      small {
      margin-top: 4px !important;
    }
  }

  /* Nationwide stadium weather panel on the weather page. */
  .weather-stadium-panel {
    top: 24px;
    right: 22px;
    bottom: 24px;
    z-index: 12;
    color: #fff;
  }
  .weather-panel-list button small {
    opacity: 0.9;
  }

  body.weather-body .weather-page {
    max-height: 100dvh !important;
  }

  body.weather-body .hero-location {
    margin-bottom: 0 !important;
  }

  body.weather-body .weather-stadium-panel {
    top: 8px !important;
    bottom: 8px !important;
  }
}

/* =========================================================
   공통 컬러 시스템
========================================================= */

:root {
  --brick-red: #d84315;
  --light-gray: #f5f5f5;
  --sky-blue: #e0f7fa;
  --ink: var(--sky-tone-9);
  --muted: #6d7a7d;
  --line: #e1e7e8;
  --field-green: #2e7d32;
  --brick-orange: #d84315;
  --rule: #e0e4e0;
}

.history-header {
  gap: 12px;
}

/* History dashboard matching the weather page */
body.history-body,
body.history-body button {
  letter-spacing: 0 !important;
}
body.history-body .history-header {
  display: flex;
  align-items: center;
  max-width: none !important;
  margin-bottom: 30px !important;
  border: 0 !important;
}
body.history-body .history-intro {
  border: 0;
  max-width: none !important;
  border-color: rgba(255, 255, 255, 0.42) !important;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.3) !important;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.24));
}

@media (max-width: 400px) {
  .stadium-marker {
    max-width: 122px;
  }

  .stadium-marker-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 92px;
  }
}
.stadium-marker:hover,
.stadium-marker:focus-visible {
  outline-offset: 2px;
  outline: 2px solid rgba(216, 67, 21, 0.18) !important;
}
html,
body {
  color: #202820 !important;
  max-width: 100%;
  overflow-x: hidden !important;
}
.weather-card,
.hourly-section {
  color: #fff;
}
.temperature {
  text-align: center;
}
.weather-details {
  border-top-color: rgba(255, 255, 255, 0.22) !important;
}
.section-title h2,
.section-title span {
  color: #fff !important;
}
.hourly-weather {
  border: 0 !important;
}
@media (max-width: 640px) {
  .hourly-weather {
    justify-content: flex-start;
  }
}

/* 프로젝트 전체 공통 글꼴 */
body,
button,
input,
h2,
h3,
p,
span,
strong,
b,
small,
a {
  font-family:
    "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif !important;
}

body button,
body button span,
body button b,
body button small,
body button i {
  font-family:
    "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif !important;
  font-weight: 300 !important;
}

body .app-sidebar .brand,
body .app-sidebar .brand span,
body .app-sidebar nav a,
body .app-sidebar nav a span,
body .app-sidebar .sidebar-note {
  font-weight: 300 !important;
}
body.weather-body .temperature strong {
  color: #fff !important;
}
body.weather-body .temperature span,
body.weather-body .weather-detail span,
body.weather-body .weather-detail strong {
  color: #fff !important;
}
body.weather-body .hourly-weather {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

/* Index page: blue weather-app visual language */
body.index-body {
  color: #fff !important;
  overscroll-behavior-y: none;
  background:
    radial-gradient(
      circle at 18% 9%,
      rgba(255, 250, 232, 0.9) 0%,
      rgba(255, 250, 232, 0.28) 12%,
      transparent 31%
    ),
    linear-gradient(145deg, var(--sky-tone-10) 0%, var(--sky-tone-11) 38%, var(--sky-tone-12) 72%, var(--sky-tone-13) 100%) !important;
}
body.index-body .main-page {
  background: transparent !important;
  gap: 18px;
  align-items: start;
  grid-template-rows: auto;
}
body.index-body .korea-map {
  border-radius: 18px !important;
  box-shadow: 0 12px 28px var(--sky-tone-14) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  background:
    radial-gradient(
      circle at 26% 18%,
      rgba(255, 255, 255, 0.06),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--sky-tone-15) 25%, transparent),
      color-mix(in srgb, var(--sky-tone-16) 25%, transparent)
    ) !important;
}
/* SVG 안에서 본토가 왼쪽 위로 치우쳐 있어(오른쪽은 울릉도 여백, 아래는 빈 공간)
   본토 중심이 박스 정가운데에 오도록 이미지 크기 기준으로 옮깁니다. 지역 버튼 위치는 그대로입니다. */
body.index-body .korea-map .korea-svg-img {
  transform: translate(5%, 8.22%) !important;
}
body.index-body .korea-svg-img {
  opacity: 0.34 !important;
  filter: grayscale(1) brightness(1.45) contrast(0.85) !important;
  object-fit: fill !important;
}
body.index-body .stadium-marker {
  /* 밝은 지도 위에서도 글씨가 보이도록 날씨 톤을 짙게 섞은 배경 */
  background: color-mix(in srgb, var(--sky-tone-17) 45%, rgba(12, 22, 36, 0.86)) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px var(--sky-tone-18) !important;
  border-radius: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: visible !important;
  white-space: nowrap !important;
  transform: translate(-50%, -50%) !important;
  font-size: 16px !important;
  width: 142px !important;
  min-width: 142px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding: 10px 13px !important;
}

body.history-body .section-title h3,
body.history-body .section-title span {
  color: #fff !important;
}

.app-sidebar {
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.app-sidebar .brand {
  white-space: nowrap;
  letter-spacing: -0.04em;
}
.app-sidebar nav a:hover,
.app-sidebar nav a:focus-visible {
  outline: 0;
}
.app-sidebar .sidebar-note {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.7;
}

body.history-body .app-sidebar nav a:hover,
body.history-body .app-sidebar nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}
.app-sidebar .brand:first-letter {
  font-size: 16px;
}
.brand-mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  position: relative;
}
.brand-mark:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}
.nav-icon {
  height: 18px;
  position: relative;
  flex: 0 0 18px;
  opacity: 0.9;
}
.stadium-icon {
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.stadium-icon:after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  left: 4px;
  top: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.weather-icon-small:before {
  content: "";
  position: absolute;
  width: 13px;
  height: 8px;
  left: 2px;
  top: 7px;
  border: 1.5px solid currentColor;
  border-radius: 8px;
}
.weather-icon-small:after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  left: 5px;
  top: 3px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
}
.history-icon {
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.history-icon:after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 5px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 4px currentColor;
}
@media (max-width: 700px) {
  .nav-icon {
    height: 15px;
  }
  .stadium-icon:after {
    left: 3px;
    top: 3px;
  }

}
body.index-body .stadium-name {
  display: block !important;
  line-height: 1.1 !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 6px rgba(0, 0, 0, 0.35) !important;
}
body.index-body .stadium-marker-info small {
  line-height: 1 !important;
}
body.index-body .stadium-marker .marker {
  display: block !important;
  flex: 0 0 14px !important;
  border: 3px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: 50% !important;
  background: var(--sky-tone-19) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25) !important;
  width: 18px !important;
  height: 18px !important;
  flex-basis: 18px !important;
}
body.index-body .quick-weather span {
  flex: 1;
}
@media (max-width: 900px) {
  body.index-body .map-section,
  body.index-body .index-weather-panel {
    grid-column: 1;
    grid-row: auto;
  }

  /* Separate desktop and mobile map controls */
  body.index-body .korea-map {
    border-radius: 14px !important;
    transform-origin: initial !important;
  }
  body.index-body .stadium-marker {
    gap: 5px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    width: 126px !important;
    min-width: 126px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 8px 10px !important;
  }
  body.index-body .stadium-marker .marker {
    border-width: 2px !important;
  }
  body.index-body .marker-incheon {
    top: 25% !important;
    left: 40% !important;
  }
  body.index-body .marker-jamsil {
    top: 30% !important;
    left: 52% !important;
  }
  body.index-body .marker-suwon {
    top: 37% !important;
    left: 45% !important;
  }
  body.index-body .marker-daejeon {
    top: 49% !important;
    left: 51% !important;
  }
  body.index-body .marker-daegu {
    top: 60% !important;
    left: 61% !important;
  }
  body.index-body .marker-gwangju {
    top: 70% !important;
    left: 41% !important;
  }
  body.index-body .marker-changwon {
    top: 70% !important;
    left: 56% !important;
  }
  body.index-body .marker-busan {
    top: 70% !important;
    left: 67% !important;
  }
  body.weather-body,
  body.history-body {
    font-size: 17px !important;
  }
  body.weather-body .temperature strong {
    font-size: 58px !important;
  }
}
body.index-body .quick-weather {
  position: relative;
  box-shadow: 0 4px 10px var(--sky-tone-20) !important;
  font-size: 19px !important;
}
body.index-body .quick-weather b {
  line-height: 1 !important;
}
body.index-body .quick-weather i {
  color: #d8dced !important;
}
body.index-body .quick-weather:hover {
  transform: translateY(-1px);
}

.app-sidebar .nav-history span {
  letter-spacing: -0.04em;
}
body.weather-body .temperature strong:not(.hero-location) {
  display: block;
}
body.weather-body .temperature span {
  display: block;
  margin-top: 10px;
  font-size: 21px !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
}
body.weather-body .hour-item strong {
  color: #fff;
}

/* Weather dashboard layout */
body.weather-body .weather-page {
  color: #fff;
}
body.weather-body .weather-card {
  max-width: 1040px;
}
body.weather-body .weather-main {
  justify-content: center;
  border: 0;
  display: block !important;
}
body.weather-body .hourly-section {
  max-width: 1040px;
}
body.weather-body .hour-item {
  border: 0;
  border-radius: 0;
  color: #fff;
}
body.weather-body .hour-item .time {
  color: #fff;
  margin-bottom: 8px;
  white-space: nowrap;
}
body.weather-body .hour-item .rain {
  display: none;
}

/* Place Changwon beside Busan without letting the labels overlap. */
body.index-body .marker-changwon {
  transform: translate(-8px, -50%) !important;
}
body.index-body .marker-changwon:hover,
body.index-body .marker-changwon:focus-visible {
  transform: translate(-8px, -55%) !important;
}
body.index-body .marker-gwangju .stadium-marker-info small {
  font-size: 9px !important;
}
body.index-body .marker-incheon {
  flex-direction: row !important;
  transform: translate(-8px, -50%) !important;
}
body.index-body .marker-incheon:hover,
body.index-body .marker-incheon:focus-visible {
  transform: translate(-8px, -55%) !important;
}
body.weather-body,
body.weather-body button,
body.weather-body input {
  letter-spacing: 0 !important;
}
body.weather-body .hero-location {
  margin-bottom: 8px;
  line-height: 1 !important;
}

/* Clean iPhone Weather-style history UI. */
body.history-body {
  color: #fff !important;
  background: linear-gradient(180deg, var(--sky-tone-21) 0%, var(--sky-tone-22) 100%) !important;
}
body.history-body .history-page {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif !important;
  background: transparent !important;
}
body.history-body .history-header p {
  margin-top: 2px;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}
body.history-body .back-button {
  width: 38px;
  height: 38px;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  box-shadow: none !important;
}
body.history-body .history-intro p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 12px !important;
}

@media (min-width: 701px) {
  body.history-body .history-header,
  body.history-body .history-intro {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body.history-body .history-page {
    font-size: 16px !important;
  }
  body.history-body .history-header p {
    font-size: 26px !important;
  }
  body.history-body .history-intro p {
    font-size: 13px !important;
  }

  /* Improve desktop readability. */
  body.index-body,
  body.weather-body,
  body.history-body {
    font-size: 17px;
  }

  .app-sidebar .sidebar-note {
    font-size: 14px !important;
  }

  body.history-body .history-intro p {
    font-size: 16px !important;
  }

  body.index-body .map-section {
    display: block !important;
    position: static !important;
    grid-column: 1 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    grid-row: 1 !important;
  }
  body.index-body .map-section::before {
    content: none !important;
  }
  body.index-body .korea-map {
    inset: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    transform: none !important;
  }
  body.index-body .korea-svg-img {
    width: 78% !important;
    height: 100% !important;
    left: 11% !important;
  }
  body.index-body .index-weather-panel {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

.app-sidebar .sidebar-note,
body.history-body .history-intro p {
  display: none !important;
}
@media (max-width: 1200px) {
  body.index-body .map-section,
  body.index-body .korea-map,
  body.index-body .index-weather-panel {
    max-width: none !important;
  }
}

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

@media (max-width: 900px) {
  body.index-body .main-page {
    max-width: 100% !important;
  }

  body.index-body .korea-map,
  body.index-body .index-weather-panel {
    max-width: 100% !important;
  }

  body.index-body .korea-svg-img {
    transform-origin: center top !important;
    transform: none !important;
  }

  /* Mobile readability and natural page scrolling. */

  body.index-body .quick-weather,
  body.index-body .quick-weather span,
  body.index-body .quick-weather b,
  body.index-body .stadium-marker,
  body.index-body .stadium-marker-info small {
    color: #fff !important;
    text-shadow: 0 1px 2px var(--sky-tone-24);
  }

  html,
  body,
  body.index-body,
  body.index-body .main-page,
  body.index-body .index-weather-panel {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    touch-action: pan-y !important;
    overscroll-behavior: auto !important;
  }

  body.index-body {
    position: static !important;
  }

  body.index-body .korea-map {
    max-height: none !important;
  }
}

body.index-body .stadium-marker-info small {
  display: block !important;
  margin-top: 4px !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 6px rgba(0, 0, 0, 0.35) !important;
}

@media (max-width: 900px) {
  body.index-body .stadium-name {
    font-size: 13px !important;
  }
  body.index-body .stadium-marker-info small {
    font-size: 9px !important;
  }
  body.index-body .index-weather-panel.weather-stadium-panel {
    margin: 0 !important;
    overflow: visible !important;
  }

  body.index-body .weather-panel-list {
    overflow: visible !important;
  }
}

.app-sidebar nav a .nav-icon {
  transform-origin: center;
}

@media (min-width: 701px) and (max-width: 1100px) {
  body.weather-body {
    align-items: start;
  }

  body.weather-body .weather-stadium-panel {
    max-width: none !important;
  }
  body.index-body .weather-panel-list button {
    font-size: 13.3333px !important;
  }

  body.index-body .weather-panel-list button b {
    line-height: normal !important;
    min-width: 30px !important;
  }

  body.index-body .index-weather-panel.weather-stadium-panel {
    height: auto !important;
    max-height: calc(100dvh - 24px) !important;
  }

  body.index-body .weather-panel-list {
    max-height: min(440px, calc(100dvh - 210px)) !important;
  }
}

@media (min-width: 1101px) {
  body.index-body .app-sidebar {
    position: relative !important;
    inset: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.index-body .main-page {
    align-items: stretch;
    min-width: 0 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    width: auto !important;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 22px !important;
    overflow: hidden !important;
  }

  body.index-body .korea-map {
    max-height: none !important;
    overflow: hidden !important;
    justify-self: start;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.index-body .korea-svg-img {
    transform: none !important;
  }
  body.weather-body .weather-page,
  body.weather-body .weather-main,
  body.weather-body .weather-card,
  body.weather-body .hourly-section,
  body.weather-body .weather-details {
    inset: auto !important;
    transform: none !important;
    max-width: none !important;
  }
  body.weather-body .temperature {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }
  body.weather-body .weather-page {
    position: relative !important;
  }
  body.weather-body .weather-main {
    grid-row: 1 !important;
    align-self: center !important;
    overflow: visible !important;
  }
  body.weather-body .weather-details {
    position: static !important;
    grid-row: 3 !important;
    height: auto !important;
    z-index: auto !important;
  }
  body.weather-body .hourly-section {
    grid-row: 2 !important;
  }
  body.weather-body .weather-page > * {
    max-width: 100% !important;
  }
}

@media (max-width: 700px) {
  body.index-body,
  body.weather-body,
  body.history-body {
    display: block !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.index-body .main-page,
  body.weather-body .weather-page,
  body.history-body .history-page {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 20px 14px 28px !important;
    overflow: visible !important;
  }

  body.index-body .main-page {
    grid-template-columns: minmax(0, 1fr) !important;
    display: block !important;
    padding-top: 14px !important;
    padding-bottom: 0 !important;
  }

  body.index-body .korea-map {
    width: 100% !important;
    height: clamp(320px, 105vw, 560px) !important;
    min-height: 0 !important;
    transform: none !important;
    overflow: hidden !important;
  }

  body.index-body .korea-svg-img {
    width: 78% !important;
    height: 100% !important;
    left: 11% !important;
  }

  body.index-body .index-weather-panel,
  body.weather-body .weather-stadium-panel {
    max-width: none !important;
  }
}
@media (min-width: 701px) {
  body.index-body .main-page {
    grid-template-rows: minmax(0, 1fr) !important;
  }
}

body.index-body .index-weather-panel {
  max-width: 100% !important;
}

body.index-body .quick-weather > span {
  font-weight: 600 !important;
}

body.index-body .quick-weather > span small {
  color: rgba(230, 241, 248, 0.72) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
}

@media (min-width: 701px) and (max-width: 1100px) {
  body.index-body {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    align-items: start;
    min-height: 100vh !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.index-body .app-sidebar {
    position: sticky !important;
    inset: auto !important;
    top: 0 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.index-body .main-page {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    grid-auto-rows: auto;
    align-content: start;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 24px !important;
    overflow: visible !important;
  }

  body.index-body .map-section {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.index-body .korea-map {
    width: 100% !important;
    height: clamp(420px, 70vh, 680px) !important;
    min-height: 420px !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body.index-body .index-weather-panel {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

@media (min-width: 1101px) {
  body.index-body .main-page {
    grid-template-columns: minmax(0, 1fr) 390px !important;
    padding-right: 12px !important;
  }

  body.index-body .index-weather-panel.weather-stadium-panel {
    height: calc(100dvh - 112px) !important;
    max-height: calc(100dvh - 48px) !important;
    margin: 0 !important;
  }

  body.index-body .weather-panel-search {
    min-height: 56px !important;
  }

  body.index-body .weather-panel-search input,
  body.index-body .weather-panel-current-city,
  body.index-body .weather-panel-current-city strong {
    font-size: 14px !important;
  }

  body.index-body .weather-panel-list {
    grid-auto-rows: 82px !important;
    max-height: none !important;
  }

  body.index-body .weather-panel-list button {
    height: 82px !important;
    min-height: 82px !important;
    padding: 10px 12px !important;
  }

  body.index-body .weather-panel-list button span {
    font-size: 14px !important;
  }

  body.index-body .weather-panel-list button small {
    font-size: 12px !important;
  }

  body.index-body .weather-panel-list button b {
    font-size: 25px !important;
  }

  body.index-body .weather-panel-list button .stadium-weather-icon {
    font-size: 30px !important;
  }
}

body.index-body > .app-sidebar,
body.weather-body > .app-sidebar,
body.history-body > .app-sidebar {
  width: 240px !important;
  min-width: 240px !important;
  padding: 28px 16px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  /* 날씨 배경이 살짝 비치는 반투명 유리 느낌 (회색을 섞어 채도를 낮춤) */
  background: color-mix(
    in srgb,
    color-mix(in srgb, var(--sky-tone-25) 60%, rgb(108, 114, 122)) 50%,
    transparent
  ) !important;
  -webkit-backdrop-filter: blur(18px) saturate(0.7);
  backdrop-filter: blur(18px) saturate(0.7);
  color: #fff !important;
  font-family:
    "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif !important;
}

body.index-body > .app-sidebar .brand,
body.weather-body > .app-sidebar .brand,
body.history-body > .app-sidebar .brand {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  height: 32px !important;
  min-width: 0 !important;
  margin: 0 10px 30px !important;
  gap: 8px !important;
  color: #fff !important;
  font-size: 20px !important;
  text-align: left !important;
}

body.index-body > .app-sidebar .brand span,
body.weather-body > .app-sidebar .brand span,
body.history-body > .app-sidebar .brand span {
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: 20px !important;
  letter-spacing: normal !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.index-body > .app-sidebar nav,
body.weather-body > .app-sidebar nav,
body.history-body > .app-sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 8px !important;
}

body.index-body > .app-sidebar nav a,
body.weather-body > .app-sidebar nav a,
body.history-body > .app-sidebar nav a {
  display: grid !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 50px !important;
  padding: 10px 12px !important;
  gap: 12px !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 21px !important;
  text-align: left !important;
}

body.index-body > .app-sidebar nav a.nav-home,
body.weather-body > .app-sidebar nav a.nav-weather,
body.history-body > .app-sidebar nav a.nav-history {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

body.index-body > .app-sidebar nav a .nav-icon,
body.weather-body > .app-sidebar nav a .nav-icon,
body.history-body > .app-sidebar nav a .nav-icon {
  justify-self: center !important;
  width: 24px !important;
  min-width: 24px !important;
  transform: none !important;
}

body.index-body > .app-sidebar nav a span,
body.weather-body > .app-sidebar nav a span,
body.history-body > .app-sidebar nav a span {
  min-width: 0 !important;
  font-size: inherit !important;
  text-overflow: ellipsis !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) and (min-width: 701px) {
  body.index-body > .app-sidebar nav a,
  body.weather-body > .app-sidebar nav a,
  body.history-body > .app-sidebar nav a {
    font-size: 19px !important;
  }
}

@media (max-width: 700px) {
  body.index-body > .app-sidebar,
  body.weather-body > .app-sidebar,
  body.history-body > .app-sidebar {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 10px 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  }

  body.index-body > .app-sidebar .brand,
  body.weather-body > .app-sidebar .brand,
  body.history-body > .app-sidebar .brand,
  body.index-body > .app-sidebar .sidebar-note,
  body.weather-body > .app-sidebar .sidebar-note,
  body.history-body > .app-sidebar .sidebar-note {
    display: none !important;
  }

  body.index-body > .app-sidebar nav,
  body.weather-body > .app-sidebar nav,
  body.history-body > .app-sidebar nav {
    flex-direction: row !important;
    gap: 6px !important;
  }

  body.index-body > .app-sidebar nav a,
  body.weather-body > .app-sidebar nav a,
  body.history-body > .app-sidebar nav a {
    display: flex !important;
    flex: 1 1 0 !important;
    justify-content: center !important;
    width: auto !important;
    min-height: 44px !important;
    padding: 8px 6px !important;
    gap: 6px !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  body.index-body > .app-sidebar nav a .nav-icon,
  body.weather-body > .app-sidebar nav a .nav-icon,
  body.history-body > .app-sidebar nav a .nav-icon {
    flex: 0 0 20px !important;
    width: 20px !important;
    min-width: 20px !important;
  }

  body.index-body > .app-sidebar nav a span,
  body.weather-body > .app-sidebar nav a span,
  body.history-body > .app-sidebar nav a span {
    font-size: 13px !important;
  }

  body.index-body .map-section {
    display: block !important;
    width: 100% !important;
  }

  body.index-body .index-weather-panel.weather-stadium-panel {
    height: 420px !important;
    max-height: min(420px, calc(100dvh - 24px)) !important;
    margin-top: 18px !important;
    overflow: hidden !important;
  }

  body.index-body .weather-panel-list {
    flex: 1 1 auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

/* 왼쪽 사이드바 아이콘 제거 */
.app-sidebar .brand-mark,
.app-sidebar .nav-icon {
  display: none !important;
}

body.index-body > .app-sidebar nav a,
body.weather-body > .app-sidebar nav a,
body.history-body > .app-sidebar nav a {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Keep page and weather-rail scrolling available without visible scrollbars. */
body.index-body .main-page,
body.weather-body .weather-page,
body.history-body .history-page,
body.index-body .index-weather-panel,
body.weather-body .weather-stadium-panel,
body.index-body .weather-panel-list,
body.weather-body .weather-panel-list {
  scrollbar-width: none;
}

body.index-body .main-page::-webkit-scrollbar,
body.weather-body .weather-page::-webkit-scrollbar,
body.history-body .history-page::-webkit-scrollbar,
body.index-body .index-weather-panel::-webkit-scrollbar,
body.weather-body .weather-stadium-panel::-webkit-scrollbar,
body.index-body .weather-panel-list::-webkit-scrollbar,
body.weather-body .weather-panel-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}
