/* Atlas Map — главная панель второй волны: погода в шапке, Дом/Работа, подборки, лента «Рядом», блоки карточки
   «Из Википедии» и «Парковки рядом». Переменные темы — из style.css. */

/* ---------- погода ---------- */
.home-head.with-weather { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title weather" "hint hint"; align-items: center; column-gap: 10px; }
.home-head.with-weather h2 { grid-area: title; }
.home-head.with-weather p { grid-area: hint; }
.weather-chip { grid-area: weather; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 6px; border-radius: 17px; background: var(--input-bg); color: var(--text); font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .15s; }
.weather-chip:hover { background: var(--hover); }
.weather-chip.loading .weather-temp { color: var(--muted); font-weight: 500; }
.weather-ico { display: inline-flex; width: 24px; height: 24px; color: var(--muted); }
.weather-ico svg { width: 100%; height: 100%; }
.weather-chip[data-icon="sun"] .weather-ico, .weather-row[data-icon="sun"] .weather-ico, .weather-chip[data-icon="partly"] .weather-ico, .weather-row[data-icon="partly"] .weather-ico { color: #D97706; }
.weather-chip[data-icon="rain"] .weather-ico, .weather-row[data-icon="rain"] .weather-ico, .weather-chip[data-icon="storm"] .weather-ico, .weather-row[data-icon="storm"] .weather-ico { color: var(--blue); }
.weather-chip[data-icon="snow"] .weather-ico, .weather-row[data-icon="snow"] .weather-ico { color: #0EA5E9; }
.wx-sun { fill: currentColor; fill-opacity: .18; }
.wx-bolt { stroke: #F59E0B; }
.wx-drop { stroke: var(--blue); }
.weather-row .weather-ico { width: 22px; height: 22px; margin-top: 1px; }

/* ---------- Дом / Работа ---------- */
.hw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 10px; }
.hw-btn { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 10px 8px 10px; border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text); cursor: pointer; transition: background .15s; outline: none; }
.hw-btn:hover, .hw-btn:focus-visible { background: var(--hover); }
.hw-btn:focus-visible { box-shadow: 0 0 0 2px var(--blue) inset; }
.hw-btn.set { background: rgba(45, 108, 223, .08); }
html[data-theme="dark"] .hw-btn.set { background: rgba(45, 108, 223, .18); }
.hw-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--panel); color: var(--blue); flex: none; box-shadow: var(--shadow-sm); }
.hw-ico svg { width: 20px; height: 20px; }
.hw-body { flex: 1; min-width: 0; }
.hw-title { font-weight: 700; font-size: 14px; line-height: 1.2; }
.hw-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.hw-eta { font-size: 12px; color: var(--blue); font-weight: 600; margin-top: 2px; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-eta:empty { display: none; }
.hw-eta.muted { color: var(--muted); font-weight: 500; }
.hw-edit { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 8px; opacity: .7; }
.hw-edit .ico { width: 16px; height: 16px; }
.hw-btn:hover .hw-edit { opacity: 1; }
.hw-plus { display: inline-flex; width: 18px; height: 18px; color: var(--muted); flex: none; }
.hw-plus svg { width: 100%; height: 100%; }
.hw-form .input { margin-bottom: 4px; }
.hw-suggest .suggest-list { padding: 0; max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin: 4px 0; }
.hw-suggest .suggest-list:empty { display: none; }
.hw-suggest .suggest-item { padding: 8px 10px; min-height: 42px; }
.hw-form .row { margin-top: 6px; }

/* ---------- подборки ---------- */
.home-section-block.collections { padding-bottom: 4px; }
.coll-strip { display: flex; gap: 10px; padding: 6px 16px 10px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.coll-strip::-webkit-scrollbar { display: none; }
.coll-card { position: relative; flex: none; width: 168px; height: 104px; border-radius: 14px; overflow: hidden; color: #fff; text-align: left; scroll-snap-align: start; background: linear-gradient(135deg, #2D6CDF, #1B4FB3); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.coll-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.coll-card[data-tone="1"] { background: linear-gradient(135deg, #F97316, #C2410C); }
.coll-card[data-tone="2"] { background: linear-gradient(135deg, #16A34A, #166534); }
.coll-card[data-tone="3"] { background: linear-gradient(135deg, #7C3AED, #4C1D95); }
.coll-card[data-tone="4"] { background: linear-gradient(135deg, #0EA5E9, #0C4A6E); }
.coll-card.sk { background: linear-gradient(90deg, var(--input-bg) 25%, var(--hover) 50%, var(--input-bg) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; box-shadow: none; }
.coll-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coll-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .62) 100%); }
.coll-text { position: absolute; left: 10px; right: 10px; bottom: 8px; }
.coll-title { font-weight: 800; font-size: 13.5px; line-height: 1.2; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coll-count { font-size: 11.5px; opacity: .9; }
.coll-hero { position: relative; height: 150px; margin: 4px 16px 10px; border-radius: 14px; overflow: hidden; color: #fff; background: linear-gradient(135deg, #2D6CDF, #1B4FB3); }
.coll-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coll-hero-text { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.coll-hero-text .card-title { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.desc.pad { padding: 0 16px 8px; }
.nb-card .num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; font-size: 12px; flex: none; }

/* ---------- лента «Рядом» ---------- */
.nearby { padding-bottom: 8px; }
.nearby-head { gap: 8px; }
.nearby-head h3 { display: inline-flex; align-items: center; gap: 6px; }
.nearby-head h3 .ico { width: 16px; height: 16px; color: var(--blue); }
.nearby-where { flex: 1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearby-head .iconbtn.small { width: 32px; height: 32px; }
.nearby-head .iconbtn.small .ico { width: 18px; height: 18px; }
.nearby-tabs { display: flex; gap: 6px; padding: 4px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.nearby-tabs::-webkit-scrollbar { display: none; }
.nearby-tabs .chip.small { height: 30px; border: 1px solid transparent; }
.nearby-tabs .chip.small.active { background: var(--blue); color: #fff; }
.nearby-filters { display: flex; gap: 6px; padding: 0 16px 6px; flex-wrap: wrap; }
.filter-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.filter-chip .ico { width: 14px; height: 14px; }
.filter-chip:hover { background: var(--hover); }
.filter-chip.active { background: var(--badge-open-bg); color: var(--green); border-color: transparent; }
.filter-chip[data-filter="rating"].active { background: #FEF3C7; color: #B45309; }
html[data-theme="dark"] .filter-chip[data-filter="rating"].active { background: rgba(245, 158, 11, .22); color: #FCD34D; }
.nearby-list .list-item { padding: 9px 16px; }
.nb-thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--input-bg); flex: none; display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.nb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nb-thumb.ico.es { background: color-mix(in srgb, var(--c, var(--blue)) 16%, var(--panel)); }
.nb-thumb.ico svg { width: 22px; height: 22px; }
.badge.osm { background: var(--input-bg); color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.nearby-osm-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 4px; }
.nb-card .result-route { width: 34px; height: 34px; }

/* ---------- карточка места: Википедия и парковки ---------- */
.card-section.wiki h3 { display: flex; align-items: center; gap: 6px; }
.wiki-ico { width: 18px; height: 18px; color: var(--muted); }
.wiki-skeleton .sk-line { margin-bottom: 8px; }
.wiki-body { display: flex; flex-direction: column; gap: 10px; }
.wiki-thumb { width: 100%; max-height: 190px; object-fit: cover; border-radius: 12px; background: var(--input-bg); }
.wiki-text { font-size: 14px; line-height: 1.5; }
.wiki-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.wiki-foot .btn.link .ico { width: 14px; height: 14px; }
.card-section.parking h3 { display: flex; align-items: center; gap: 6px; }
.park-ico { width: 18px; height: 18px; color: var(--blue); }
.parking-list .list-item { padding: 8px 0; min-height: 48px; }
.list-ico.park { background: rgba(45, 108, 223, .12); color: var(--blue); }
.parking-item .chev { width: 18px; height: 18px; color: var(--blue); }
.parking-body .btn.small { margin-top: 6px; }

@media (max-width: 899px) {
  .coll-card { width: 150px; height: 96px; }
  .hw-btn { min-height: 60px; }
  .sheet[data-state="collapsed"] .weather-chip { height: 30px; }
}
@media (max-width: 420px) {
  .hw-row { gap: 6px; padding: 0 12px 8px; }
  .hw-btn { padding: 8px 8px; gap: 8px; }
  .hw-ico { width: 32px; height: 32px; }
  .nearby-where { display: none; }
}
