/* weather.css — "지금 우리 동네" 탭.
   비 오는 지역은 화면이 젖은 느낌이 나야 한다. 캔버스 빗줄기 + 카드 글로우로 만든다. */

/* 좌우 여백 — 맛집·여행 탭과 같은 14px. 빠져 있어서 카드·「지도」 버튼이 화면 끝에 붙어 잘렸다(26.9.18 QA) */
.tab-panel[data-panel="weather"] { position: relative; overflow: hidden; padding: 0 14px 28px; }

/* 하늘 — 패널 전체를 덮되 클릭은 통과시킨다 */
#wx-sky {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .85;
}
.tab-panel[data-panel="weather"] > *:not(#wx-sky) { position: relative; z-index: 1; }

.wx-head { padding: 14px 2px 6px; position: relative; }
.wx-title { font-size: 20px; font-weight: 900; letter-spacing: -.02em; color: #eaf2ff; }
.wx-sub { margin: 4px 0 0; font-size: 13px; color: #8d97ab; }
.wx-sub b { color: #5fd8ff; }

/* 전국 요약 */
.wx-hero {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 10px 0 14px; padding: 16px;
  border-radius: 18px; border: 1px solid rgba(95,216,255,.18);
  background: linear-gradient(150deg, rgba(95,216,255,.12), rgba(95,216,255,.02)), #0d1017;
}
.wx-hero-big { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 14px rgba(95,216,255,.35)); }
.wx-hero-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wx-hero-tx b { font-size: 16px; font-weight: 900; color: #eaf2ff; }
.wx-hero-tx span { font-size: 12.5px; color: #94a0b6; }

/* 기상청과 사람들 말이 엇갈리는 순간 — 이 기능의 하이라이트 */
.wx-clash {
  flex: 1 0 100%; margin-top: 4px; padding: 10px 12px; border-radius: 12px;
  font-size: 12.5px; font-weight: 700; color: #ffd9a0;
  background: rgba(255,168,60,.12); border: 1px solid rgba(255,168,60,.3);
  animation: wxPulse 2.2s ease-in-out infinite;
}
.wx-clash b { color: #ffbf6b; }
@keyframes wxPulse { 0%,100% { opacity: .82 } 50% { opacity: 1 } }

/* 지역 카드 */
.wx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.wx-empty { grid-column: 1/-1; padding: 28px 0; text-align: center; color: #7d879b; font-size: 13px; }

.wx-card {
  --wc: 140, 155, 180;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 12px 12px 10px; border-radius: 16px; cursor: pointer; text-align: left;
  background: linear-gradient(160deg, rgba(var(--wc), .14), rgba(var(--wc), .03)), #0c0f15;
  border: 1px solid rgba(var(--wc), .22);
  transition: transform .14s, border-color .14s, box-shadow .18s;
}
.wx-card:hover { border-color: rgba(var(--wc), .5); box-shadow: 0 6px 20px rgba(var(--wc), .16); }
.wx-card:active { transform: scale(.97); }
.wx-card.clear   { --wc: 255, 200, 80; }
.wx-card.cloud   { --wc: 150, 165, 190; }
.wx-card.fog     { --wc: 170, 175, 185; }
.wx-card.drizzle { --wc: 110, 180, 255; }
.wx-card.rain    { --wc: 80, 160, 255; }
.wx-card.snow    { --wc: 190, 225, 255; }
.wx-card.storm   { --wc: 170, 130, 255; }
/* 젖은 지역은 은은하게 숨쉰다 */
.wx-card.wet { animation: wxWet 3.4s ease-in-out infinite; }
@keyframes wxWet {
  0%,100% { box-shadow: 0 0 0 rgba(var(--wc), 0) }
  50%     { box-shadow: 0 0 18px rgba(var(--wc), .22) }
}

.wx-c-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 6px; }
.wx-c-name { font-size: 13px; font-weight: 800; color: #e6edf9; }
.wx-c-emo { font-size: 17px; line-height: 1; }
.wx-c-temp { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wx-c-desc { font-size: 11.5px; color: #93a0b8; }

/* 사람들이 '온다'고 한 비율 */
.wx-c-bar { width: 100%; height: 4px; margin-top: 5px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; }
.wx-c-bar i { display: block; height: 100%; border-radius: 999px; background: rgb(var(--wc)); transition: width .4s ease; }
.wx-c-rep { font-size: 11px; color: #9aa6bd; font-variant-numeric: tabular-nums; }
.wx-c-rep b { color: rgb(var(--wc)); font-weight: 900; }
.wx-c-rep.none { color: #6e788c; }

.wx-foot { margin: 14px 2px 4px; font-size: 11.5px; color: #6e788c; text-align: center; }

/* 제보 시트 */
.wx-sheet {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s;
}
.wx-sheet.on { opacity: 1; }
.wx-sheet-in {
  width: 100%; max-width: 520px; padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0; background: #12151c; border-top: 1px solid rgba(255,255,255,.08);
  transform: translateY(18px); transition: transform .22s cubic-bezier(.2,.9,.3,1);
}
.wx-sheet.on .wx-sheet-in { transform: translateY(0); }
.wx-sheet-t { font-size: 17px; font-weight: 900; color: #eaf2ff; text-align: center; margin-bottom: 14px; }
.wx-sheet-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wx-sheet-btns button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: 16px; cursor: pointer; font-size: 24px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #fff;
  transition: transform .12s, background .12s;
}
.wx-sheet-btns button span { font-size: 12.5px; font-weight: 800; color: #cfd8ea; }
.wx-sheet-btns button:hover { background: rgba(95,216,255,.12); }
.wx-sheet-btns button:active { transform: scale(.95); }
.wx-sheet-btns button:disabled { opacity: .5; }
.wx-sheet-x {
  width: 100%; margin-top: 12px; padding: 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: #8d97ab; font-size: 13.5px; font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .wx-card.wet, .wx-clash { animation: none; }
  #wx-sky { display: none; }
}

/* ── 동네 검색 ── */
.wx-search {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 8px;
  padding: 10px 12px; border-radius: 14px;
  background: #0f1219; border: 1px solid rgba(255,255,255,.09);
}
.wx-search svg { width: 17px; height: 17px; color: #7d879b; flex: none; }
.wx-search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: #e8eefb; font-size: 15px; /* 16px 미만이면 iOS가 확대한다 → 15는 위험, 아래에서 16 강제 */
}
.wx-search input { font-size: 16px; }
.wx-search input::placeholder { color: #6e788c; }
.wx-search button { background: none; border: 0; color: #8d97ab; font-size: 15px; cursor: pointer; padding: 2px 4px; }

.wx-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wx-hit {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
  border-radius: 12px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
}
.wx-hit:hover { background: rgba(95,216,255,.1); border-color: rgba(95,216,255,.28); }
.wx-hit span { font-size: 17px; }
.wx-hit b { font-size: 14.5px; font-weight: 800; color: #e8eefb; }
.wx-hit i { font-style: normal; font-size: 12px; color: #7d879b; }
.wx-hit u { margin-left: auto; text-decoration: none; font-size: 14px; font-weight: 800; color: #cfd8ea; font-variant-numeric: tabular-nums; }

.wx-sec { margin-top: 16px; }
.wx-sec-t { font-size: 13px; font-weight: 800; color: #9aa6bd; margin: 0 2px 8px; }
.wx-c-sido { font-size: 10.5px; color: #7d879b; margin-top: -2px; }
.wx-c-say { font-size: 11px; color: #5fd8ff; font-weight: 700; margin-top: 2px; }

/* ── 동네 방(댓글) ── */
.wx-room {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.55); opacity: 0; transition: opacity .2s;
}
.wx-room.on { opacity: 1; }
.wx-room-in {
  width: 100%; max-width: 560px; max-height: 86vh; display: flex; flex-direction: column;
  border-radius: 22px 22px 0 0; background: #10131a; border-top: 1px solid rgba(255,255,255,.08);
  transform: translateY(20px); transition: transform .22s cubic-bezier(.2,.9,.3,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wx-room.on .wx-room-in { transform: translateY(0); }

.wx-room-hd { display: flex; align-items: flex-start; gap: 10px; padding: 18px 16px 12px; }
.wx-room-nm { font-size: 19px; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.wx-room-nm span { font-size: 12px; font-weight: 700; color: #7d879b; margin-left: 6px; }
.wx-room-wx { font-size: 13px; color: #9aa6bd; margin-top: 3px; }
.wx-fav { margin-left: auto; background: none; border: 0; font-size: 22px; color: #4a5464; cursor: pointer; line-height: 1; }
.wx-fav.on { color: #ffcf3f; text-shadow: 0 0 12px rgba(255,207,63,.5); }
.wx-room-x { background: none; border: 0; color: #7d879b; font-size: 17px; cursor: pointer; line-height: 1; padding: 2px; }

.wx-room-rep { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 0 16px 12px; }
.wx-room-rep button {
  padding: 11px 6px; border-radius: 13px; cursor: pointer; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #dbe4f2;
}
.wx-room-rep button b { color: #5fd8ff; margin-left: 2px; }
.wx-room-rep button:active { transform: scale(.96); }

.wx-says { flex: 1; overflow-y: auto; padding: 4px 16px 8px; display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.wx-says-empty { padding: 26px 0; text-align: center; color: #6e788c; font-size: 13px; }
.wx-say-row { display: flex; flex-direction: column; gap: 3px; }
.wx-say-nick { font-size: 11.5px; font-weight: 800; color: #8fa0bd; }
.wx-say-nick span { font-weight: 500; color: #626c80; margin-left: 6px; }
.wx-say-body { font-size: 14.5px; color: #e8eefb; line-height: 1.45; word-break: break-word; }

.wx-say-form { display: flex; gap: 8px; padding: 10px 16px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.wx-say-form input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 999px; font-size: 16px;
  background: #171b24; border: 1px solid rgba(255,255,255,.1); color: #e8eefb; outline: none;
}
.wx-say-form input:focus { border-color: rgba(95,216,255,.45); }
.wx-say-form button {
  padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: #5fd8ff; color: #06202b; font-weight: 900; font-size: 14px;
}
.wx-say-form button:active { transform: scale(.96); }

/* 🔒 비로그인 안내 — 제보·즐겨찾기·한마디는 로그인해야 된다(2026-09-12). 누르면 공용 로그인 모달 */
.wx-guest {
  margin: 0 16px 10px; padding: 9px 10px 9px 12px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(111,134,255,.10); border: 1px solid rgba(111,134,255,.28);
  color: #c9d2ff; font-size: 12.5px; line-height: 1.4;
}
.wx-guest button {
  flex: 0 0 auto; height: 30px; padding: 0 14px; border: 0; border-radius: 15px;
  background: #5a78ff; color: #fff; font-weight: 800; font-size: 12.5px; cursor: pointer;
}


/* ═══ 🗺 전국 날씨 지도(26.9.18) — 네이버 지도 위에 시도/시군구 실황 알약 ═══
   앱은 네이티브 네이버 지도(웹뷰 뒤) — 투명 처리는 food.css 의 body.fd-native-map 규칙을 같이 쓴다. */
.wx-mapbtn {
  position: absolute; right: 2px; top: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px;
  border: 0; background: var(--accent-grad, #4361ff); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 14px rgba(67,97,255,.35);
}
.wx-mapbtn svg { width: 15px; height: 15px; }
.wx-map { position: fixed; left: 0; top: 0; width: 100vw; height: 100dvh; z-index: 10000; display: none; background: #0b0c10; }
.wx-map.open { display: block; }
body.fd-native-map .wx-map { background: transparent; }
/* ⚠️ 네이버 SDK 가 컨테이너에 인라인 position:relative 를 박아 inset:0 이 무효 → 높이 0(실측). 크기를 직접 준다 */
.wx-map-c { position: absolute; inset: 0; width: 100%; height: 100%; }
.wx-map-c.native { background: transparent; }
.wx-map-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 500; pointer-events: none;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 12px;
  background: linear-gradient(#000 10%, rgba(0,0,0,.66) 60%, transparent);
}
.wx-map-top > * { pointer-events: auto; }
.wx-map-row { display: flex; align-items: center; gap: 8px; }
/* 닫기 — 맛집·여행 지도와 같은 자리·모양 */
.wx-map-x {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; cursor: pointer;
  background: var(--surface-3, #23252d); border: 1px solid var(--line-2, #2c2f38); color: var(--text-hi, #fff);
  font-size: 17px; line-height: 1; display: grid; place-items: center; padding: 0;
}
.wx-map-t { color: #fff; font-size: 16px; font-weight: 800; }
.wx-map-t span { margin-left: 6px; color: #9aa1b2; font-size: 12px; font-weight: 600; }
.wx-map-sum { margin-top: 8px; color: #cfd5e3; font-size: 12.5px; font-weight: 600; }
.wx-map-legend {
  /* ⚠️ 좌하단 NAVER 로고·출처 표기를 가리면 안 된다(약관) — 그 위로 띄운다 */
  position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 44px); z-index: 500;
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px;
  background: rgba(10,11,15,.82); backdrop-filter: blur(8px); color: #cfd5e3; font-size: 11px; font-weight: 700;
  pointer-events: none;
}
.wx-map-legend i { flex: 1; height: 8px; border-radius: 8px;
  background: linear-gradient(90deg,#3b5bdb,#3fa2e8,#2fb8c4,#35b779,#8cc63f,#e0a020,#f07c2a,#e0413a); }
/* 웹(네이버 JS) 마커 — 네이티브 renderWx 와 같은 모양 */
.wxm { display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); cursor: pointer; white-space: nowrap; }
.wxm b { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px; border-radius: 12px;
  border: 1.5px solid #fff; color: #fff; font: 900 13px/1 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  box-shadow: 0 1.5px 4px rgba(0,0,0,.45); }
.wxm i { margin-top: 1px; font-style: normal; color: #fff; font: 800 10.5px/1.2 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 2px #000; }

/* 😷 미세먼지(26.9.18) — 카드·방·지도 */
.wx-c-air { margin-top: 4px; display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
  color: var(--ag); background: color-mix(in srgb, var(--ag) 16%, transparent); }
.wx-room-air { margin-top: 4px; font-size: 12.5px; color: #c9cfdb; font-weight: 600; }
.wx-room-air b { margin-left: 3px; font-weight: 800; }
.wx-room-air i { font-style: normal; color: #7d8494; font-size: 11px; }
.wx-hit em { font-style: normal; margin-left: 4px; }
.wx-map-seg { display: inline-flex; gap: 4px; margin-top: 8px; padding: 3px; border-radius: 999px; background: rgba(20,22,28,.85); }
.wx-map-seg button { border: 0; background: transparent; color: #aab0bf; font-size: 12.5px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.wx-map-seg button.on { background: #fff; color: #111; }
.wx-map-legend.air { justify-content: space-between; }
.wx-map-legend.air span { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; background: var(--ag); color: #fff; }
.wx-map-legend.air em { font-style: normal; color: #7d8494; font-size: 10px; }
