:root {
  --bg-pure: #0A0A0C;
  --bg-card: #16181D;
  --bg-surface: #1F222A;
  --bg-surface-hover: #292D38;
  --bg-glass: rgba(16, 18, 24, 0.84);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #F8FAFC;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --accent: #38BDF8;
  --accent-strong: #0EA5E9;
  --accent-deep: #0284C7;
  --accent-glow: rgba(56, 189, 248, 0.35);

  --status-playing: #22D3EE;
  --status-buffering: #F59E0B;
  --status-error: #FB7185;
  --status-idle: #94A3B8;

  --gap: clamp(10px, 1.1vw, 16px);
  --pad-card: clamp(12px, 1.3vw, 20px);
  --radius-card: 22px;
  --radius-inner: 14px;
  --radius-btn: 14px;
}

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

html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-pure);
  color: var(--text-primary);
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   3분할 메인 레이아웃 (좌측 70% 지도 + 우측 30% 상하 50:50)
   ========================================================================== */
.dashboard {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: var(--gap);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: var(--gap);
  background-color: var(--bg-pure);
  overflow: hidden;
}

.side-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
}

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

/* 공통 버튼 */
.btn {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  transition: transform 0.12s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible,
.map-ctrl-btn:focus-visible,
.city-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 상태 도트 */
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--status-idle);
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.78); }
}

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

/* ==========================================================================
   좌측 70%: 실시간 GPS 지도 (Leaflet.js + CartoDB Dark Matter)
   ========================================================================== */
.map-panel {
  padding: 0;
  background-color: #0D0F14;
}

.gps-map {
  width: 100%;
  height: 100%;
  background-color: #0D0F14;
  z-index: 1;
}

/* Leaflet 하단 출처 표기를 다크모드 톤으로 정돈 */
.leaflet-container {
  background-color: #0D0F14;
  font-family: inherit;
}

/* OpenStreetMap 상세 지도 다크모드 변환 필터 (타일 레이어에만 적용) */
.osm-dark-layer {
  filter: invert(100%) hue-rotate(180deg) brightness(90%) contrast(94%) saturate(75%);
}

.leaflet-control-attribution {
  background: rgba(10, 10, 12, 0.65) !important;
  color: rgba(156, 163, 175, 0.72) !important;
  font-size: 10px !important;
  padding: 2px 8px !important;
  border-top-right-radius: 8px;
}

.leaflet-control-attribution a {
  color: rgba(186, 230, 253, 0.75) !important;
}

/* 커스텀 발광 차량 마커 */
.vehicle-marker-icon {
  background: transparent;
  border: none;
}

.vehicle-beacon {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-pulse {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.28);
  animation: radarPulse 2.1s ease-out infinite;
}

.vehicle-core {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #38BDF8;
  border: 3px solid #F8FAFC;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.95), 0 0 6px rgba(255, 255, 255, 0.65);
}

.vehicle-arrow-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s linear;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.95));
}

.vehicle-arrow-wrap svg {
  width: 32px;
  height: 32px;
}

.vehicle-beacon[data-mode="arrow"] .vehicle-core {
  display: none;
}

.vehicle-beacon[data-mode="dot"] .vehicle-arrow-wrap {
  display: none;
}

@keyframes radarPulse {
  0%   { transform: scale(0.45); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* 지도 좌측 상단 오버레이 (GPS 상태 + 속도계) */
.map-overlay-top-left {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 450;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}

.map-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  border-radius: 16px;
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.gps-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gps-status-text {
  font-size: clamp(0.88rem, 1.05vw, 1rem);
  font-weight: 800;
  line-height: 1.15;
}

.gps-status-sub {
  font-size: clamp(0.72rem, 0.85vw, 0.82rem);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.15;
}

.gps-active .status-dot {
  background-color: var(--status-playing);
  box-shadow: 0 0 10px var(--status-playing);
}

.gps-active .gps-status-text {
  color: #E0F2FE;
}

.gps-searching .status-dot {
  background-color: var(--status-buffering);
  animation: pulseDot 1s ease-in-out infinite;
}

.gps-searching .gps-status-text {
  color: #FDE68A;
}

.gps-error .status-dot {
  background-color: var(--status-error);
  box-shadow: 0 0 10px var(--status-error);
}

.gps-error .gps-status-text {
  color: #FECDD3;
}

/* 디지털 GPS 속도계 HUD */
.speed-hud {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 16px;
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
}

.speed-value {
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
}

.speed-unit {
  font-size: clamp(0.82rem, 0.95vw, 0.95rem);
  font-weight: 700;
  color: var(--accent);
}

/* 지도 우측 하단 오버레이 (내 위치 고정 + 줌 +/-) */
.map-overlay-bottom-right {
  position: absolute;
  right: 16px;
  bottom: 18px;
  z-index: 450;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-zoom-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-ctrl-btn {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.map-ctrl-btn svg {
  width: 26px;
  height: 26px;
}

.map-ctrl-btn:hover {
  background-color: rgba(31, 34, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.28);
}

.map-ctrl-btn:active {
  transform: scale(0.95);
}

.map-follow-btn.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(2, 132, 199, 0.34));
  border-color: var(--accent);
  color: #E0F2FE;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 8px 24px rgba(14, 165, 233, 0.35);
}

.map-style-btn {
  flex-direction: column;
  gap: 2px;
}

.map-style-btn svg {
  width: 22px;
  height: 22px;
}

.map-ctrl-label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

/* ==========================================================================
   우측 상단 50%: 시계 & 실시간 날씨 (컴팩트 레이아웃)
   ========================================================================== */
.weather-panel {
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(6px, 1vh, 12px);
}

.clock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: clamp(6px, 0.9vh, 10px);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.clock-time {
  font-size: clamp(1.95rem, 3.1vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  flex-shrink: 0;
}

.clock-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 0;
  text-align: right;
}

.clock-date {
  font-size: clamp(0.84rem, 1.05vw, 1.04rem);
  font-weight: 700;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.weather-updated {
  font-size: clamp(0.7rem, 0.82vw, 0.8rem);
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* GPS 위치 배지 / 폴백 도시 드롭다운 + 새로고침 */
.weather-location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.weather-gps-badge {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #BAE6FD;
  font-size: clamp(0.84rem, 1vw, 0.96rem);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent);
}

.city-select-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.city-select {
  width: 100%;
  min-height: 44px;
  padding: 0 34px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: clamp(0.86rem, 1vw, 0.98rem);
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.city-select option {
  background-color: #16181D;
  color: #F8FAFC;
}

.icon-btn {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
  flex-shrink: 0;
}

.weather-refresh-btn svg {
  width: 19px;
  height: 19px;
}

.weather-refresh-btn.is-spinning .refresh-icon,
.reconnect-btn.is-spinning .reconnect-icon {
  animation: spin 0.9s linear infinite;
}

/* 날씨 메인 기온 + 아이콘 + 상태 */
.weather-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 1.3vw, 18px);
}

.weather-icon {
  width: clamp(50px, 6.8vh, 76px);
  height: clamp(50px, 6.8vh, 76px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.22));
}

.weather-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-temp {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.weather-desc {
  font-size: clamp(0.9rem, 1.15vw, 1.15rem);
  font-weight: 700;
  color: #CBD5E1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 체감 온도 / 습도 2분할 박스 */
.weather-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
}

.stat-box {
  background-color: rgba(10, 10, 12, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: clamp(7px, 1vh, 12px) 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.stat-label {
  font-size: clamp(0.75rem, 0.88vw, 0.88rem);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.stat-value {
  font-size: clamp(0.95rem, 1.2vw, 1.18rem);
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==========================================================================
   우측 하단 50%: SBS 라디오 플레이어 (컴팩트 레이아웃)
   ========================================================================== */
.radio-panel {
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(8px, 1.2vh, 14px);
}

/* 상단: 채널 전환 토글 + 상태 배지 */
.radio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.channel-toggle {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background-color: rgba(10, 10, 12, 0.5);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.channel-btn {
  min-height: clamp(44px, 6.2vh, 54px);
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background-color: transparent;
  color: var(--text-secondary);
  font-size: clamp(0.86rem, 1.05vw, 1.02rem);
  font-weight: 800;
  white-space: nowrap;
}

.channel-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.channel-btn.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.26), rgba(14, 165, 233, 0.16));
  border-color: var(--accent);
  color: #E0F2FE;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.22);
}

/* 상태 배지 */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: clamp(0.75rem, 0.88vw, 0.86rem);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-playing {
  color: var(--status-playing);
  border-color: rgba(34, 211, 238, 0.35);
  background-color: rgba(34, 211, 238, 0.12);
}

.status-playing .status-dot {
  background-color: var(--status-playing);
  box-shadow: 0 0 10px var(--status-playing);
}

.status-buffering {
  color: var(--status-buffering);
  border-color: rgba(245, 158, 11, 0.35);
  background-color: rgba(245, 158, 11, 0.12);
}

.status-buffering .status-dot {
  background-color: var(--status-buffering);
  animation: pulseDot 1s ease-in-out infinite;
}

.status-error {
  color: var(--status-error);
  border-color: rgba(251, 113, 133, 0.38);
  background-color: rgba(251, 113, 133, 0.12);
}

.status-error .status-dot {
  background-color: var(--status-error);
}

/* 중앙: 대형 재생 / 일시정지 버튼 */
.radio-center {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
}

.play-btn {
  width: 100%;
  height: 100%;
  min-height: clamp(60px, 10.5vh, 88px);
  max-height: 112px;
  border-radius: 18px;
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
  border-color: rgba(125, 211, 252, 0.55);
  color: #04121D;
  font-size: clamp(1.2rem, 1.65vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.3);
}

.play-btn:hover {
  background: linear-gradient(135deg, #7DD3FC 0%, #0EA5E9 100%);
}

.play-btn.is-playing {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 8px 22px rgba(56, 189, 248, 0.18);
}

.play-btn.is-playing:hover {
  background: linear-gradient(135deg, #273549 0%, #162033 100%);
}

.play-icon {
  width: clamp(24px, 2.2vw, 30px);
  height: clamp(24px, 2.2vw, 30px);
  flex-shrink: 0;
}

/* 하단: 재연결 버튼 + 컴팩트 비주얼라이저 & 오디오 상태 */
.radio-bottom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.reconnect-btn {
  min-height: clamp(48px, 6.8vh, 58px);
  padding: 0 14px;
  font-size: clamp(0.84rem, 1vw, 0.96rem);
  white-space: nowrap;
  flex-shrink: 0;
}

.reconnect-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.audio-info-box {
  flex: 1;
  min-width: 0;
  min-height: clamp(48px, 6.8vh, 58px);
  padding: 6px 12px;
  border-radius: 14px;
  background-color: rgba(10, 10, 12, 0.45);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.visualizer {
  width: 44px;
  height: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  flex-shrink: 0;
}

.viz-bar {
  flex: 1;
  height: 20%;
  min-height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7DD3FC 0%, #38BDF8 55%, #0284C7 100%);
  opacity: 0.32;
  transition: height 0.2s ease, opacity 0.2s ease;
}

.visualizer[data-state="playing"] .viz-bar {
  opacity: 0.95;
  animation: vizDance 0.95s ease-in-out infinite alternate;
}

.visualizer[data-state="buffering"] .viz-bar {
  opacity: 0.6;
  background: var(--status-buffering);
  animation: vizBuffering 1.1s ease-in-out infinite;
}

.visualizer[data-state="error"] .viz-bar {
  opacity: 0.4;
  background: var(--status-error);
  height: 16%;
}

.viz-bar:nth-child(1) { animation-delay: 0.05s; --viz-max: 65%; }
.viz-bar:nth-child(2) { animation-delay: 0.22s; --viz-max: 95%; }
.viz-bar:nth-child(3) { animation-delay: 0.38s; --viz-max: 72%; }
.viz-bar:nth-child(4) { animation-delay: 0.14s; --viz-max: 100%; }
.viz-bar:nth-child(5) { animation-delay: 0.46s; --viz-max: 80%; }
.viz-bar:nth-child(6) { animation-delay: 0.28s; --viz-max: 92%; }
.viz-bar:nth-child(7) { animation-delay: 0.10s; --viz-max: 68%; }
.viz-bar:nth-child(8) { animation-delay: 0.34s; --viz-max: 55%; }

@keyframes vizDance {
  0%   { height: 20%; }
  50%  { height: var(--viz-max, 85%); }
  100% { height: 35%; }
}

@keyframes vizBuffering {
  0%, 100% { height: 20%; opacity: 0.35; }
  50%      { height: 55%; opacity: 0.85; }
}

.audio-meta-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.station-title {
  font-size: clamp(0.8rem, 0.95vw, 0.92rem);
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-sub {
  font-size: clamp(0.7rem, 0.82vw, 0.8rem);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   와이드 저높이 차량 화면(예: 1280x600, 1920x720) 미세 최적화
   ========================================================================== */
@media (max-height: 660px) and (min-width: 901px) {
  :root {
    --gap: 10px;
    --pad-card: 11px;
  }

  .clock-time {
    font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  }

  .weather-gps-badge,
  .city-select,
  .icon-btn {
    min-height: 38px;
  }

  .icon-btn {
    width: 38px;
  }

  .weather-icon {
    width: 44px;
    height: 44px;
  }

  .weather-temp {
    font-size: clamp(1.7rem, 2.7vw, 2.3rem);
  }

  .channel-btn {
    min-height: 40px;
  }

  .play-btn {
    min-height: 56px;
  }

  .reconnect-btn,
  .audio-info-box {
    min-height: 44px;
  }
}

/* ==========================================================================
   태블릿 세로 / 모바일 / 좁은 브라우저 반응형 폴백
   ========================================================================== */
@media (max-width: 900px) {
  html,
  body {
    overflow-y: auto;
  }

  .dashboard {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .map-panel {
    min-height: 52vh;
  }

  .side-column {
    grid-template-rows: auto auto;
  }

  .weather-panel,
  .radio-panel {
    min-height: 260px;
  }
}
