/* ==========================================================
   오늘해봄 — home.css
   위치 바 · 오늘의 요약 · 생활날씨 카드 4개 · 시간대별 · 이번 주
   ========================================================== */

/* ---------- 상단 히어로 (밝은 하늘빛 배경) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(760px 380px at 82% -8%, #FFE7D2 0%, rgba(255, 231, 210, 0) 62%),
    radial-gradient(620px 340px at 8% 4%, #E4F0FF 0%, rgba(228, 240, 255, 0) 60%),
    linear-gradient(176deg, #FFFAF4 0%, #F5F9FF 68%, #FFFFFF 100%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line);
  opacity: .55;
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-sun {
  position: absolute; top: -62px; right: -40px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FFDDB2 0%, #FFBE80 44%, #FFA05C 100%);
  opacity: .32; animation: bob 7s ease-in-out infinite;
}
/* 본체 + ::before/::after 로 구름 실루엣을 만든다 (이미지 없이) */
.hero-cloud {
  position: absolute; border-radius: 999px; background: #fff; opacity: .66;
}
.hero-cloud::before, .hero-cloud::after {
  content: ""; position: absolute; background: inherit; border-radius: 50%;
}
.hero-cloud.c1 {
  top: 74px; right: 84px; width: 108px; height: 25px;
  animation: drift 13s ease-in-out infinite;
}
.hero-cloud.c1::before { width: 46px; height: 46px; left: 16px; top: -25px; }
.hero-cloud.c1::after  { width: 32px; height: 32px; left: 58px; top: -17px; }
.hero-cloud.c2 {
  top: 132px; right: 20px; width: 74px; height: 19px; opacity: .5;
  animation: drift 17s ease-in-out infinite reverse;
}
.hero-cloud.c2::before { width: 32px; height: 32px; left: 11px; top: -18px; }
.hero-cloud.c2::after  { width: 23px; height: 23px; left: 40px; top: -12px; }
@media (max-width: 640px) { .hero-cloud.c1, .hero-cloud.c2 { display: none; } }
/* .wrap 과 같은 요소에 붙으므로 padding 단축 속성을 쓰면 좌우 여백이 사라진다 */
.hero-inner { position: relative; padding-top: 18px; padding-bottom: 26px; }
@media (min-width: 768px) {
  .hero-sun { width: 250px; height: 250px; top: -66px; right: 2%; }
  .hero-inner { padding-top: 24px; padding-bottom: 34px; }
}

/* ---------- 위치 바 ----------
   광고를 이 영역 주변에 두지 않는다. (기획서 6.5) */
.place {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  padding: 14px 16px; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px -18px rgba(29, 36, 51, .3);
}
.place-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.place-pin {
  width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--sun-soft); color: var(--sun-deep);
}
.place-pin .ico { width: 20px; height: 20px; }
.place-text { min-width: 0; }
.place-name {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 17px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3;
}
.place-acc {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-3);
}
.place-acc.is-ip { background: var(--g-caution-soft); color: var(--g-caution-deep); }
.place-acc.is-browser { background: var(--g-good-soft); color: var(--g-good-deep); }
.place-acc.is-manual { background: var(--sky-soft); color: var(--g-ok-deep); }
.place-hint { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.place-btns { display: flex; gap: 8px; flex: none; }
.place-btns .btn { height: 42px; }
@media (max-width: 520px) {
  .place-btns { width: 100%; }
  .place-btns .btn { flex: 1; padding: 0 12px; font-size: 14px; }
}

/* 위치 확인 중 */
.place.is-busy .place-pin { animation: pulse 1.6s infinite; }
.spin { animation: spin 1s linear infinite; }

/* ---------- 오늘의 요약 한 문장 ---------- */
.today { margin-top: 20px; }
.today-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; color: var(--sun-deep);
}
.today-eyebrow .ico { width: 16px; height: 16px; }
.today-line {
  margin-top: 8px; font-size: 22px; font-weight: 800; line-height: 1.42; letter-spacing: -.04em;
  color: var(--ink);
}
.today-line em { font-style: normal; color: var(--sun-deep); }
.today-summary-tail { display: inline; }
@media (min-width: 768px) {
  .today-line { font-size: 30px; max-width: 28em; }
  .today-summary-tail { display: block; margin-top: 2px; }
}

/* 보조 수치 (숫자는 결론 뒤에 온다) */
.today-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px;
}
.metric {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .82); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.metric .ico { width: 16px; height: 16px; color: var(--ink-4); }
.metric b { color: var(--ink); font-weight: 800; }
.today-updated {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.today-updated .ico { width: 14px; height: 14px; }
.today-updated button { font-size: 12.5px; font-weight: 700; color: var(--sky); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 생활날씨 카드 4개 ---------- */
.acts { display: grid; gap: 14px; }
@media (min-width: 720px) { .acts { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

.act {
  display: flex; flex-direction: column; padding: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); transition: transform .18s, box-shadow .2s;
}
.act.is-enter { animation: card-enter .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--enter-delay, 0ms); }
.act.is-enter .score { animation: score-pop .38s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--enter-delay, 0ms) + 110ms); }
.act.is-enter .act-tile { animation: tile-pop .34s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--enter-delay, 0ms) + 70ms); }
@media (min-width: 768px) { .act { padding: 22px; } }
.act-head { display: flex; align-items: center; gap: 10px; }
.act-name { font-size: 16.5px; font-weight: 800; letter-spacing: -.035em; }
.act-head .grade { margin-left: auto; }

.act-body { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.act-head-line { min-width: 0; flex: 1; }
.act-line { font-size: 15.5px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.act-sub { margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* 이유 — 최대 2개 (기획서 6.3) */
.act-why { display: grid; gap: 6px; margin-top: 14px; }
.act-why li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}
.act-why li::before {
  content: ""; width: 5px; height: 5px; margin-top: 8px; flex: none;
  border-radius: 50%; background: var(--ink-4);
}

/* 추천 시간 / 다음 추천 날짜 */
.act-best {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px;
  padding: 11px 13px; border-radius: var(--r-md); background: var(--surface-2);
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
}
.act-best .ico { width: 17px; height: 17px; color: var(--ink-4); }
.act-best b { color: var(--ink); font-weight: 800; }
.act-best.is-good { background: var(--g-good-soft); color: var(--g-good-deep); }
.act-best.is-good .ico { color: var(--g-good); }
.act-best.is-good b { color: var(--g-good-deep); }

.act-foot { margin-top: 14px; }
.act-foot .btn { width: 100%; }

/* 판단 보류 카드 */
.act.is-none { background: var(--surface-2); box-shadow: none; }
.act.is-none .act-line { color: var(--ink-2); font-weight: 700; }

/* 스켈레톤 카드 — 로딩 중에도 높이가 흔들리지 않게 실제 카드와 같은 골격 */
.act.is-sk { box-shadow: var(--shadow-1); }
.act.is-sk .sk-tile { width: 40px; height: 40px; border-radius: 13px; }
.act.is-sk .sk-ring { width: 72px; height: 72px; }

@keyframes card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes score-pop {
  from { opacity: 0; transform: scale(.88); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes tile-pop {
  from { opacity: 0; transform: scale(.78) rotate(-5deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- 시간대별 ---------- */
.picker { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
/* min-width:0 이 없으면 flex 아이템이 칩 전체 너비만큼 벌어져 페이지가 가로로 넘친다 */
.picker .chips { flex: 1; min-width: 0; }

.hours { position: relative; }
.hours-scroll {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 4px 2px 2px; margin: 0 -2px;
}
.hours-scroll::-webkit-scrollbar { display: none; }
.hour {
  flex: none; width: 46px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 6px 0 8px; border-radius: 14px; transition: background .15s;
}
.hour.is-now { background: var(--sun-soft); }
.hour-score { font-size: 12px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hour-track {
  position: relative; width: 22px; height: 104px; border-radius: 999px;
  background: var(--line-2); overflow: hidden;
}
.hour-fill {
  position: absolute; left: 0; right: 0; bottom: 0; border-radius: 999px;
  background: var(--bc); transition: height .7s cubic-bezier(.2, .8, .2, 1);
}
.hour-track.is-good { --bc: var(--g-good); }
.hour-track.is-ok { --bc: var(--g-ok); }
.hour-track.is-caution { --bc: var(--g-caution); }
.hour-track.is-bad { --bc: var(--g-bad); }
.hour-track.is-none { --bc: var(--g-none-line); }
.hour-time { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hour.is-now .hour-time { color: var(--sun-deep); font-weight: 800; }
.hour-ico { width: 16px; height: 16px; }
.hour-ico.is-sun { color: #F59E0B; filter: drop-shadow(0 1px 1px rgba(245, 158, 11, .18)); }
.hour-ico.is-cloud { color: #78A5D8; }
.hour-ico.is-rain { color: #4F8DF7; }
.hour-ico.is-snow { color: #8B9BE8; }

/* 오전/낮/저녁/밤 요약 */
/* 좁은 화면에서는 2×2. 상태 배지가 줄어들지 않는 글자라 4열로는 가로가 넘친다. */
.parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
@media (min-width: 480px) { .parts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.part {
  padding: 12px 10px; border-radius: var(--r-md); background: var(--surface-2); text-align: center;
}
.part-name { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.part-grade { margin-top: 7px; display: flex; justify-content: center; }
.part-score { margin-top: 6px; font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .parts { gap: 12px; } .part { padding: 14px; } }

.hours-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 16px;
  font-size: 12px; font-weight: 600; color: var(--ink-3);
}
.hours-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hours-legend i { width: 9px; height: 9px; border-radius: 3px; display: block; }

/* ---------- 이번 주 ---------- */
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 7px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 13px 4px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1.5px solid transparent; transition: all .15s; text-align: center;
}
.day:hover { border-color: var(--line); background: #fff; }
.day.is-best { background: var(--g-good-soft); border-color: var(--g-good-line); }
.day.is-today { border-color: var(--sun-line); background: var(--sun-soft); }
.day-dow { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.day.is-today .day-dow { color: var(--sun-deep); }
.day-date { font-size: 11px; font-weight: 600; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.day-dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
}
.day-dot.is-good { background: var(--g-good); }
.day-dot.is-ok { background: var(--g-ok); }
.day-dot.is-caution { background: var(--g-caution); }
.day-dot.is-bad { background: var(--g-bad); }
.day-dot.is-none { background: var(--g-none-line); color: var(--ink-3); font-size: 11px; }
.day-temp { font-size: 11.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.day-temp b { color: var(--g-bad-deep); font-weight: 700; }

/* ---------- 가이드 미리보기 ---------- */
.guide-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.guide-card {
  display: flex; flex-direction: column; gap: 9px; padding: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.guide-card > .tag { align-self: flex-start; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: transparent; }
.guide-card h3 { font-size: 15.5px; font-weight: 800; line-height: 1.45; letter-spacing: -.03em; }
.guide-card p { font-size: 13.5px; line-height: 1.6; color: var(--ink-3); }
.guide-card .link { margin-top: auto; padding-top: 4px; }

/* ---------- 판단 기준 배너 ---------- */
.method-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 22px; border-radius: var(--r-lg);
  background: linear-gradient(140deg, #FFF6EE 0%, #F3F8FF 100%);
  border: 1px solid var(--line);
}
.method-banner .t { flex: 1 1 260px; min-width: 0; }
.method-banner h2 { font-size: 18px; font-weight: 800; letter-spacing: -.035em; }
.method-banner p { margin-top: 7px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
@media (min-width: 768px) { .method-banner { padding: 28px 30px; } .method-banner h2 { font-size: 21px; } }

/* ---------- 생활날씨 주제 탭 ---------- */
.topic-tabs { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.topic-tablist {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 7px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.topic-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 42px;
  padding: 8px 6px; border-radius: 11px; color: var(--ink-3); font-size: 13px; font-weight: 800;
  transition: background .16s, color .16s, box-shadow .16s;
}
.topic-tab .ico { width: 16px; height: 16px; flex: 0 0 auto; }
.topic-tab:hover { color: var(--ink); }
.topic-tab.is-active { background: #fff; color: var(--sun-deep); box-shadow: var(--shadow-1); }
.topic-tab:focus-visible { outline: 3px solid var(--sun-line); outline-offset: 2px; }
.topic-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; }
.topic-panel[hidden] { display: none; }
.topic-copy { min-width: 0; flex: 1 1 420px; }
.topic-copy > .tag { display: inline-flex; margin-bottom: 10px; }
.topic-copy h3 { font-size: 19px; font-weight: 800; line-height: 1.35; letter-spacing: -.04em; }
.topic-copy p { margin-top: 8px; max-width: 650px; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.topic-links { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.topic-links .btn { white-space: nowrap; }
.text-link { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-3); font-size: 13px; font-weight: 750; white-space: nowrap; }
.text-link:hover { color: var(--sun-deep); }
.text-link .ico { width: 15px; height: 15px; }
@media (max-width: 639px) {
  .topic-tablist { display: flex; overflow-x: auto; padding: 7px; scrollbar-width: none; }
  .topic-tablist::-webkit-scrollbar { display: none; }
  .topic-tab { flex: 0 0 auto; padding-inline: 12px; }
  .topic-panel { align-items: flex-start; padding: 20px 18px; }
  .topic-copy h3 { font-size: 18px; }
  .topic-links { width: 100%; align-items: flex-start; flex-direction: column; gap: 12px; }
  .topic-links .btn { width: 100%; justify-content: center; }
}

/* ---------- 전체 실패 상태 ---------- */
.fail {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 44px 20px; text-align: center;
  background: var(--surface-2); border-radius: var(--r-lg);
}
.fail-ico {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--g-bad); box-shadow: var(--shadow-1);
}
.fail-ico .ico { width: 28px; height: 28px; }
.fail h2 { font-size: 18px; font-weight: 800; letter-spacing: -.035em; }
.fail p { max-width: 30em; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

/* ---------- 지역 선택 모달 내용 ---------- */
.search {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1.5px solid transparent; transition: border-color .15s, background .15s;
}
.search:focus-within { background: #fff; border-color: var(--sun-line); }
.search .ico { color: var(--ink-4); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; font-weight: 600; }
.search input::placeholder { color: var(--ink-4); font-weight: 500; }

.region-group { margin-top: 18px; }
.region-group h3 { font-size: 12.5px; font-weight: 800; color: var(--ink-4); margin-bottom: 9px; }
.region-group h3 span { margin-left: 4px; font-weight: 600; color: var(--ink-4); }
.region-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.region-field { display: grid; gap: 6px; min-width: 0; }
.region-select-label { display: block; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.region-select {
  width: 100%; height: 44px; padding: 0 38px 0 13px; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); background: #fff; font: inherit; font-size: 14px;
}
.region-select:focus { outline: 3px solid rgba(255, 122, 26, .16); border-color: var(--sun); }
.region-select:disabled { color: var(--ink-4); background: var(--surface-2); cursor: not-allowed; }
.region-apply { margin-top: 12px; }
.region-picker-hint { padding: 18px 4px 2px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
@media (max-width: 520px) { .region-picker-grid { grid-template-columns: 1fr; } }
.location-precision-note {
  margin: 0 0 10px; text-align: center; font-size: 12.5px; line-height: 1.55; color: var(--ink-3);
}
.location-precision-note b { color: var(--ink-2); font-weight: 800; }
.region-list { display: flex; flex-wrap: wrap; gap: 7px; }
.region-list button {
  height: 40px; padding: 0 14px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .15s;
}
.region-list button:hover { box-shadow: inset 0 0 0 1.5px var(--sun-line); background: var(--sun-soft); color: var(--sun-deep); }
.region-list button[aria-pressed="true"] { background: var(--sun-soft); color: var(--sun-deep); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--sun-line); }
.region-empty { padding: 26px 0; text-align: center; font-size: 14px; color: var(--ink-3); }
