:root {
  --ink: #0f172a;
  --muted: #5b6474;
  --bg: #ffffff;
  --panel: #f3f5f9;
  --line: #e4e7ee;
  --red: #cd2e3a;
  --blue: #0047a0;
  --navy: #0b1730;
  --sky: #eef4ff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .16);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--blue); }

/* ---------- header ---------- */
.top { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: var(--navy); color: #fff; position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.brand b { color: #ff8a4c; }
.brand-ic { width: 28px; height: 28px; display: block; }
.top-right { display: flex; align-items: center; gap: 8px; }
/* 지금 서울: 시각 · 날씨 (app.js renderSeoulNow) */
.seoul-now { flex: 1; min-width: 0; margin: 0 12px; text-align: center; color: #d6deec; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seoul-now .sn-flag { display: none; }
.chip-btn { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.chip-btn.on { background: #fff; color: var(--navy); }
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; font-size: 14px; white-space: nowrap; cursor: pointer; }
.lang-pick:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.lang-pick .globe { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; border: 0; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
.brand { white-space: nowrap; flex: none; }
/* 좁은 화면: 언어·위치 버튼은 아이콘만 */
@media (max-width: 640px) {
  .top { padding: 0 12px; }
  .brand { font-size: 18px; }
  .brand-ic { width: 26px; height: 26px; }
  .top-right { gap: 6px; }
  .seoul-now { margin: 0 6px; font-size: 12px; line-height: 1.3; white-space: normal; }
  .seoul-now .sn-city, .seoul-now .sn-dot { display: none; }
  .seoul-now .sn-flag { display: inline; }
  .seoul-now .sn-wx { display: block; white-space: nowrap; }
  .lang-pick { width: 34px; padding: 0; justify-content: center; }
  .lang-pick span, .lb-text { display: none; }
  #locBtn { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; font-size: 15px; }
}
.round-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; font-weight: 700; }

/* ---------- layout ---------- */
.layout { height: calc(100vh - 56px); height: calc(100dvh - 56px); }
.feed-col { height: 100%; overflow-y: auto; background: var(--bg); }
.detail { position: relative; }
.map-box { position: absolute; inset: 0; background: var(--navy); }   /* 지구본 둘레 = 밤하늘 */
#map { position: absolute; inset: 0; }

/* ---------- feed header ---------- */
/* 한 줄: 주제 탭(그림 위·글자 아래, 고른 것에 밑줄) · 정렬 단추. 지역은 「지역 ▾」 탭을 누르면 아래로 펼친다 */
.feed-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 6px 14px 0; }
.chips { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; flex-direction: column; align-items: center; border: 0; border-bottom: 2px solid transparent; background: none; padding: 2px 10px 6px; font-size: 12px; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.chip .ic { font-size: 20px; line-height: 1.3; filter: grayscale(.4); opacity: .8; transition: filter .15s, opacity .15s; }
.chip .caret { font-size: 9px; margin-left: 3px; vertical-align: 1px; }
.chip:hover { color: var(--ink); }
.chip:hover .ic, .chip.on .ic { filter: none; opacity: 1; }
.chip.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.sort-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.sort-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.area-pop { position: absolute; left: 0; right: 0; top: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(15,23,42,.08); }
.area-opt { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 14px; }
.area-opt:hover { border-color: var(--ink); }
.area-opt.on { background: var(--navy); border-color: var(--navy); color: #fff; }
/* 휴대폰: 정렬은 ↕ 아이콘만 (가까운 순이면 남색으로 채움) */
@media (max-width: 899px) {
  .sort-btn { width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 15px; }
  .sort-btn .sb-text { display: none; }
}
/* 검색(11-21): 🔍 단추 → 탭 줄(chips-wrap) 자리에 같은 높이로 칸이 나온다. 머리 줄 높이가 그대로라 사진·제목 한 화면 기준이 안 깨진다 */
.search-btn { width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 15px; }
.search-btn[hidden], .search-box[hidden], .chips-wrap[hidden] { display: none; }
.search-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 40px; margin: 3px 0 10px; padding: 0 6px 0 12px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; }
.search-box .sx-ic { font-size: 15px; opacity: .7; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }   /* 16px: 아이폰이 확대하지 않게 */
.search-box input::-webkit-search-cancel-button { display: none; }
.sx-close { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef1f6; color: var(--ink); font-size: 13px; cursor: pointer; }
.sx-close:hover { background: #dfe4ec; }
.search-head { margin: 12px 16px 6px; font-size: 13px; color: var(--muted); }
/* 칩이 넘칠 때 끝에 화살표: 더 있다는 표시 + 마우스로 넘기기 */
.chips-wrap { position: relative; flex: 1; min-width: 0; }
.chips-arrow { position: absolute; top: 0; bottom: 0; z-index: 1; width: 52px; border: 0; padding: 0; display: flex; align-items: center; cursor: pointer; }
.chips-arrow[hidden] { display: none; }
.chips-arrow span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.15); font-size: 20px; line-height: 1; color: var(--ink); padding-bottom: 2px; }
.chips-arrow.prev { left: 0; justify-content: flex-start; background: linear-gradient(to right, #fff 50%, rgba(255,255,255,0)); }
.chips-arrow.next { right: 0; justify-content: flex-end; background: linear-gradient(to left, #fff 50%, rgba(255,255,255,0)); }
.chips-arrow:hover span { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- feed posts ---------- */
.feed { max-width: 540px; margin: 0 auto; padding: 0 0 48px; }
.day-head { margin: 18px 14px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
/* 맨 위 줄: ● 오늘 새 사진 n장 · 다음 사진까지 hh:mm:ss (오늘 사진이 맨 위면 '오늘' 머리말 대신) */
.day-head.live { display: flex; align-items: center; gap: 8px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.day-head.live i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(205,46,58,.18); }
.day-head.live b { color: var(--ink); font-variant-numeric: tabular-nums; }
.day-head.live .new { color: var(--red); }
.post { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 6px; transition: background .2s; scroll-margin-top: 66px; }
.post.active { background: #fff6f7; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.ava { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; }
.ava img { width: 100%; height: 100%; display: block; }
.post-head b { display: block; font-size: 14px; line-height: 1.2; }
.post-head small { color: var(--muted); font-size: 12px; }
.new-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.post-photo { display: block; position: relative; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: #d9dee7; overflow: hidden; }
.post-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.post-photo { cursor: pointer; }
/* 사진 여러 장: 옆으로 넘기는 띠 (app.js photoHtml). 점은 오른쪽 아래(왼쪽 아래 '어디일까?' 표시와 안 겹치게), ‹ ›는 마우스가 있는 화면에서만 */
.post-photo .slides { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.post-photo .slides::-webkit-scrollbar { display: none; }
.post-photo .slides img { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.post-photo .dots { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 5px; padding: 5px 7px; border-radius: 999px; background: rgba(0,0,0,.28); pointer-events: none; }
.post-photo .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.post-photo .dots i.on { background: #fff; }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); font-size: 24px; line-height: 1; padding: 0 0 3px; box-shadow: 0 2px 6px rgba(0,0,0,.25); display: none; cursor: pointer; }
.slide-btn.prev { left: 10px; }
.slide-btn.next { right: 10px; }
@media (hover: hover) { .post-photo:hover .slide-btn:not([hidden]) { display: grid; place-items: center; } }
/* 이 동네에서 먹을 것 */
.kv.food p { margin: 3px 0 0; }
.kv.food .fk { font-weight: 700; }
.kv.food i { color: var(--muted); }
.kv.food .price { color: var(--muted); font-size: 13px; white-space: nowrap; }
/* 하루 코스 (app.js courseHtml) */
.course-hint { color: var(--muted); font-size: 14px; margin: 14px 14px 2px; }
.course { border: 1px solid var(--line); border-radius: 16px; margin: 12px 14px; overflow: hidden; background: #fff; }
.course.active { border-color: #f2b8bd; box-shadow: 0 0 0 3px #fde3e6; }
.c-photos { display: flex; height: 128px; gap: 2px; background: #d9dee7; }
.c-photos span { position: relative; flex: 1; min-width: 0; }
.c-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-photos b, .c-list b { width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; display: grid; place-items: center; flex: none; }
.c-photos b { position: absolute; left: 8px; top: 8px; border: 2px solid #fff; }
.c-body { padding: 12px 14px 14px; }
.c-meta { margin: 0; color: var(--muted); font-size: 13px; }
.course h3 { margin: 2px 0 6px; font-size: 18px; }
.c-blurb { margin: 0 0 8px; font-size: 15px; }
.c-stops { margin: 0 0 12px; padding-left: 20px; font-size: 14px; }
.c-stops li { margin: 3px 0; }
.c-stops .link, .c-list .link { border: 0; background: none; padding: 0; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.stop-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; border: 3px solid #fff; font-weight: 800; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; padding: 0; }
.c-list { list-style: none; margin: 10px 0 0; padding: 0; }
.c-list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--panel); border: 0; border-radius: 12px; padding: 8px; margin-bottom: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.c-list img { width: 60px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.c-list span { display: flex; flex-direction: column; font-weight: 650; font-size: 15px; line-height: 1.3; }
.c-list small { color: var(--muted); font-weight: 400; font-size: 12px; }
.screen-tag { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255,255,255,.92); color: var(--navy); font-size: 13px; font-weight: 650; padding: 5px 11px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.kv .scene { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
/* 한국어 한 마디 */
.kv.word { background: #fff; border: 1px solid #f3c4ca; }
.kv.word .kw { font-size: 19px; font-weight: 700; margin-right: 4px; }
.kv.word .rr { font-style: italic; color: var(--muted); }
.kv.word .say { margin-left: 8px; border: 0; background: #fff; border-radius: 999px; width: 32px; height: 32px; font-size: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; vertical-align: middle; }
.kv.word .say:active { transform: scale(.94); }
.reveal-tag { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(11,23,48,.82); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; }
.post-actions { display: flex; align-items: center; gap: 2px; padding: 6px 8px 0; }
.icon-btn { width: 42px; height: 42px; border: 0; background: none; border-radius: 50%; font-size: 24px; line-height: 1; display: grid; place-items: center; }
.icon-btn:hover { background: var(--panel); }
.icon-btn.on { color: var(--red); }
.dist { margin-left: auto; padding-right: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dist b { color: var(--blue); }
.post-body { padding: 2px 14px 0; }
.hook { margin: 0; font-size: 15px; }
.hook b { margin-right: 4px; }
.where { margin: 4px 0 0; color: var(--blue); font-size: 14px; font-weight: 650; }
.post-detail { display: none; padding-top: 4px; }   /* 휴대폰은 아래 시트에 설명이 나와서 숨김 */
.post-detail .alt { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.post-detail .why { font-size: 15px; }
.post-detail .actions { margin: 12px 0 4px; }
.see-btn { border: 0; background: none; color: var(--red); font-weight: 700; padding: 6px 0 0; font-size: 14px; }
.empty { color: var(--muted); padding: 30px 16px; text-align: center; }

/* ---------- info card ---------- */
.info { background: #fff; padding: 18px; }
.area-chip { display: inline-block; background: var(--panel); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.info h2 { font-size: 22px; line-height: 1.25; margin: 8px 0 0; letter-spacing: -.01em; }
.info .ko { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.distance-box { display: flex; align-items: center; gap: 10px; background: var(--sky); border-radius: 12px; padding: 10px 12px; margin: 12px 0 14px; font-size: 14px; }
.distance-box b { font-size: 20px; color: var(--blue); white-space: nowrap; }
.distance-box .link { margin-left: auto; border: 0; background: none; color: var(--blue); font-weight: 650; font-size: 13px; padding: 0; text-decoration: underline; }
.why { margin: 0 0 14px; }
.kv { background: var(--panel); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 15px; }
.kv b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; padding: 10px 14px; font-weight: 650; font-size: 15px; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--red); color: #fff; }
.btn.naver { background: #03c75a; color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost.on { color: var(--red); border-color: #f2b8bd; background: #fff5f6; }
.btn.block { width: 100%; }
.credit { color: var(--muted); font-size: 12px; margin: 6px 0 14px; }
.intro h2 { margin-top: 0; }
.intro p { color: var(--muted); }
.close-x { display: none; }

/* ---------- map markers ---------- */
.pin { width: 28px; height: 34px; }
.pin i { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--red); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.base-mark { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.base-mark .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(0,71,160,.18), 0 2px 6px rgba(0,0,0,.3); }
.base-mark.city .dot { background: var(--navy); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.base-mark span { margin-top: 4px; background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
/* 열어 본 곳: 주황 핀 (11-20). 위치는 MapLibre가 바깥 transform으로 잡으므로 움직임은 안쪽 .sz(크기)·.sv(튀어나옴)에만 */
.seen-mark { z-index: 1; padding: 8px 8px 0; margin: 0; border: 0; background: none; line-height: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.seen-mark:hover, .seen-mark:focus-visible { z-index: 4; }
.seen-mark .sz { display: block; transform-origin: 50% 100%; transition: transform .2s; }
.seen-mark .sv { display: block; transform-origin: 50% 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)); animation: seen-pop .5s cubic-bezier(.34,1.56,.64,1) backwards; transition: transform .18s; }
.seen-mark:hover .sv, .seen-mark:focus-visible .sv { transform: translateY(-3px) scale(1.18); }
.seen-mark .heart, .seen-mark.wish .dot { display: none; }
.seen-mark.wish .heart { display: inline; }
.z-far .seen-mark .sz { transform: scale(.82); }
.z-globe .seen-mark { visibility: hidden; }
@keyframes seen-pop { from { transform: scale(0); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .seen-mark .sv { animation: none; } }
.base-mark { z-index: 2; }
.pin { z-index: 3; }
.maplibregl-popup-content { border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.map-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); background: #e8eef5; }

/* ---------- dialog & toast ---------- */
dialog { border: 0; border-radius: 20px; padding: 22px; max-width: 440px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(11,23,48,.55); }
dialog h2 { margin: 0 0 8px; }
dialog ol { padding-left: 20px; margin: 0 0 10px; }
dialog li { margin-bottom: 4px; }
dialog .note { background: #effaf3; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
dialog .fine { color: var(--muted); font-size: 12px; }
dialog .btn { width: 100%; margin-top: 6px; padding: 12px; }
/* 홈 화면에 추가 띠 (app.js renderInstall) — 휴대폰 피드 맨 위, 피드와 같이 스크롤 */
.install-bar { display: flex; align-items: center; gap: 10px; max-width: 540px; margin: 10px auto 2px; padding: 10px 8px 10px 12px; border: 1px solid #f3d6c4; border-radius: 14px; background: linear-gradient(135deg, #fff6ef, #eefaf7); }
.install-bar[hidden] { display: none; }
.install-bar img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.ib-text { flex: 1; min-width: 0; line-height: 1.3; }
.ib-text b { display: block; font-size: 14px; }
.ib-text small { color: var(--muted); font-size: 12.5px; }
.ib-add { flex: none; padding: 8px 14px; font-size: 14px; }
.ib-add[hidden] { display: none; }
.ib-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 15px; width: 30px; height: 30px; border-radius: 50%; }
@media (max-width: 560px) { .install-bar { margin: 10px 12px 2px; } }
.help-install { margin: 12px 0 14px; }
.help-install small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.help-install small:empty { display: none; }
.toast {position: fixed; z-index: 3000; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }

/* ---------- wide screens: feed with captions left, map right ---------- */
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: minmax(420px, 52%) 1fr; grid-template-rows: minmax(0, 1fr); }
  .feed-col { border-right: 1px solid var(--line); }
  /* 사진 + 버튼 줄 + 제목 줄까지 한 화면에 들어오게: 사진 높이 = 화면 높이 - 282px(머리글·필터·글쓴이·버튼·제목 줄), 폭은 그 3:2 */
  .feed { max-width: min(1000px, calc((100vh - 282px) * 1.5)); max-width: min(1000px, calc((100dvh - 282px) * 1.5)); }
  .post-photo { aspect-ratio: 3 / 2; }
  .day-head { margin: 10px 14px 6px; }
  .feed-head { gap: 12px; }
  .post-head { padding: 6px 14px; }
  .post { scroll-margin-top: 62px; }
  .info { display: none; }          /* 설명은 사진 아래(.post-detail)에 나온다 */
  .post-detail { display: block; }
}

/* ---------- phones: feed full screen, details slide up ---------- */
@media (max-width: 899px) {
  .detail { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; top: 7vh; display: flex; flex-direction: column; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(15,23,42,.25); overflow: hidden; transform: translateY(105%); transition: transform .3s ease; }
  .detail.open { transform: none; }
  .map-box { position: relative; inset: auto; flex: none; height: 36vh; }
  .info { flex: 1; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .close-x { display: grid; place-items: center; position: absolute; z-index: 5; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(11,23,48,.8); color: #fff; font-size: 18px; }
}
