/* 비공개 레퍼런스·유지보수 페이지. 지도 화면과 한 얼굴: 어두운 청록 #192527, 테두리 #465553, 금색 #efc86b, 글자 #f5f2e8.
   머리글과 설정 창은 지도의 규칙(atlas-header.css, projects.css의 #atlas-settings 줄)을 같은 모양으로 옮겼다. 폰(360~430px) 우선. */
:root {
    color-scheme: dark;
    --bg: #192527; --surface: #203033; --surface-2: #273a3d; --line: #465553; --soft-line: #2d3b3d;
    --gold: #efc86b; --gold-fill: #f1c95f; --gold-ink: #252b29;
    --ink: #f5f2e8; --muted: #c5cfc7; --dim: #9eaaa3;
    --done: #62d2c2; --todo: #ff8f73; --long: #9db4d4; --applied: #79d98c;
    --pill-line: rgba(229, 235, 217, .31); --pill-bg: #172124bd;
    --ui-font: "Apple SD Gothic Neo", "Apple SD Gothic", "Noto Sans KR", "Malgun Gothic", "맑은 고딕", sans-serif;
    --info-h: 170px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--ui-font); letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid #ffd67b; outline-offset: 2px; }
.dim { color: var(--dim) !important; }
.gold { color: var(--gold); }

/* ---- 단추·알약 ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 1px solid var(--pill-line); border-radius: 22px; background: var(--pill-bg); color: var(--ink); font: 650 14px/1.2 var(--ui-font); text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: #263436; }
.btn.primary { border-color: var(--gold-fill); background: var(--gold-fill); color: var(--gold-ink); }
.btn.primary:hover:not(:disabled) { background: #f6d37a; }
.btn.danger { border-color: var(--todo); color: var(--todo); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: transparent; color: var(--ink); }
.icon-btn:hover:not(:disabled) { background: #263436; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.chip { display: inline-flex; flex: none; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 600 11.5px/1 var(--ui-font); white-space: nowrap; }
.chip.solid { border-color: #efc86b73; color: var(--gold); }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; vertical-align: -4px; }
@media (prefers-reduced-motion: no-preference) { .spin { animation: spin .8s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.basket-btn { display: inline-flex; flex: none; align-items: center; gap: 5px; min-height: 44px; padding: 0 14px; border: 1px solid #9da7998c; border-radius: 22px; background: transparent; color: var(--ink); font: 650 13px/1 var(--ui-font); }
.basket-btn[aria-pressed=true] { border-color: var(--gold-fill); background: var(--gold-fill); color: var(--gold-ink); }
.basket-btn.big { justify-content: center; width: 100%; min-height: 48px; margin-top: 14px; font-size: 15px; }
input[role=switch] { appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border: 1px solid #a0aca7; border-radius: 99px; background: #263337; cursor: pointer; }
input[role=switch]::before { display: block; content: ""; width: 16px; height: 16px; margin: 3px; border-radius: 50%; background: #e2e6dd; }
input[role=switch]:checked { border-color: var(--gold-fill); background: var(--gold-fill); }
input[role=switch]:checked::before { transform: translateX(16px); background: var(--gold-ink); }
@media (forced-colors: active) { input[role=switch] { appearance: auto; } input[role=switch]::before { display: none; } }

/* ---- 로그인 ---- */
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { display: grid; gap: 12px; width: min(380px, 100%); padding: 28px 22px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 15px 48px #06101266; text-align: center; }
.login-mark { width: 84px; height: 37px; margin: 0 auto 4px; }
.login-card h1 { font: 760 21px/1.35 var(--ui-font); letter-spacing: -.04em; }
.login-sub { color: var(--muted); font-size: 14px; }
.login-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #111c1e; }
.login-field input { flex: 1; min-width: 0; height: 48px; padding: 0 4px 0 14px; border: 0; background: transparent; font-size: 16px; outline: 0; }
.login-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px #efc86b40; }
.login-msg { min-height: 21px; color: var(--todo); font-size: 13px; }

/* ---- 머리글(지도와 같은 모양) ---- */
.ref-top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--soft-line); }
@media (prefers-reduced-motion: no-preference) { .ref-top { transition: transform .26s ease; } }
.ref-top.hide { transform: translateY(-100%); }
.ref-masthead { position: relative; height: calc(var(--masthead-height) * var(--ui-scale, 1)); }
/* 로고·글자: 지도 머리글(projects.css)은 .atlas-nav를 가운데 맞춤 가로 상자로 두고 클릭은 안 막는다. 레퍼런스에도 같은 규칙을 줘 높이·자리를 맞춘다(2026-11-29). */
body:has(#domestic-panel) .atlas-nav { display: flex; align-items: center; justify-content: flex-start; pointer-events: none; }
body:has(#domestic-panel) .atlas-nav > * { pointer-events: auto; }
/* 지도 화면은 스크롤바 폭만큼 단추 줄을 안으로 밀어(atlas-header.css, --sbw) 이 화면과 맞춘다. 여기서는 스크롤바 안쪽에서 시작하니 더하지 않는다. */
#atlas-map-tools { position: absolute; z-index: 6; right: max(var(--masthead-side), env(safe-area-inset-right)); }
#ref-filter-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 7px; box-sizing: border-box; width: auto; height: 44px; padding: 0 14px; border: 1px solid var(--pill-line); border-radius: 22px; background: var(--pill-bg); color: #ccd2ca; font: 600 13px/1.45 var(--ui-font); }
#ref-filter-btn:hover { background: #263436; }
.tool-badge { position: absolute; top: -5px; right: -3px; z-index: 2; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--gold-fill); color: var(--gold-ink); font: 700 11px/19px var(--ui-font); text-align: center; pointer-events: none; }
/* 세부 필터 + 설정: 같이 걸리는 필터라 한 알약으로 묶는다. 지도 머리글의 [내 위치][설정] 두 단추와 같은 너비(단추 44px + 간격 + 단추 44px)라
   [검색] 단추가 지도와 같은 자리에 선다(2026-11-29 사용자). 가운데 가는 선이 둘을 나누고, 바깥 테두리는 안쪽 그림자라 단추 크기가 그대로다. */
#ref-filter-btn { width: var(--tool); height: var(--tool); padding: 0; }
#ref-filter-btn span { display: none; }
.tool-pair { display: inline-flex; flex: none; gap: var(--masthead-gap); border-radius: 22px; background: linear-gradient(var(--pill-line), var(--pill-line)) center / 1px 22px no-repeat, var(--pill-bg); box-shadow: inset 0 0 0 1px var(--pill-line); }
.tool-pair #ref-filter-btn { border: 0; background: transparent; border-radius: 22px; }
.tool-pair #atlas-settings-toggle { position: relative; border: 0; background: transparent; border-radius: 22px; }
.tool-pair #ref-filter-btn:hover, .tool-pair #atlas-settings-toggle:hover { background: #263436; }
.tool-pair #ref-filter-btn[aria-expanded=true], #atlas-settings-menu[open] > #atlas-settings-toggle { color: var(--gold); }
#atlas-map-tools :is(#ref-filter-btn):focus-visible { outline: 3px solid #ffd67b; outline-offset: 2px; }
.atlas-tool-menu > summary { list-style: none; cursor: pointer; }
.atlas-tool-menu > summary::-webkit-details-marker { display: none; }

/* 설정 창: projects.css #atlas-settings 줄과 같은 모양(어두운 판) */
.atlas-popover { position: absolute; top: calc(100% + 6px); right: 0; z-index: 6; width: min(340px, calc(100vw - 24px)); max-height: calc(100dvh - 72px); overflow: auto; overscroll-behavior: contain; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: 0 15px 48px #06101266; }
.atlas-pane-heading { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #e5ebd94f; }
.atlas-pane-heading h2 { font: 730 18px/1.35 var(--ui-font); letter-spacing: -.03em; }
.atlas-match-count { display: inline-flex; align-items: baseline; gap: 2px; margin: 0; padding: 3px 10px 4px; border: 1px solid #f1c95f3d; border-radius: 99px; background: #f1c95f12; color: #b9c3bb; font: 600 11.5px/1.2 var(--ui-font); white-space: nowrap; transition: border-color .5s ease, background-color .5s ease; }
.atlas-match-count b { color: #f2d697; font: 700 15px/1.1 var(--ui-font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.atlas-match-count.is-changed { border-color: #f1c95fa6; background: #f1c95f26; transition: none; }
.atlas-match-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.atlas-map-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.atlas-map-quick .atlas-period-row + .atlas-period-row { border-top: 1px solid #c4cdb42d; }
.atlas-period-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; font: 650 14px/1.4 var(--ui-font); }
.atlas-pair { gap: 10px; align-items: stretch; }
.atlas-pair-cell { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atlas-pair .atlas-pair-cell + .atlas-pair-cell { padding-left: 10px; border-left: 1px solid #c4cdb42d; }
.atlas-pair:not(.atlas-switches) .atlas-pair-cell { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 6px; }
.atlas-pair:not(.atlas-switches) .atlas-pair-cell > span { font-size: 12.5px; color: var(--muted); }
.atlas-switches .atlas-pair-cell { font-size: 13px; white-space: nowrap; }
.atlas-area-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.atlas-area-head > span:first-child { font-size: 12.5px; color: var(--muted); }
.atlas-area-dir { display: flex; flex: none; border: 1px solid #9da7998c; border-radius: 99px; overflow: hidden; }
.atlas-area-dir button { position: relative; min-height: 24px; margin: 0; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font: 600 11px/1 var(--ui-font); }
.atlas-area-dir button::before { content: ""; position: absolute; inset: -10px 0; }
.atlas-area-dir button + button { border-left: 1px solid #9da7998c; }
.atlas-area-dir button[aria-pressed=true] { background: var(--gold-fill); color: var(--gold-ink); }
.atlas-area-dir button:focus-visible { outline: 2px solid #ffd67b; outline-offset: -2px; }
.atlas-wheel-frame { --wheel-height: 82px; --wheel-row: 30px; position: relative; width: auto; flex: none; }
.atlas-wheel-frame::before { content: ""; position: absolute; inset: 50% 0 auto; height: var(--wheel-row); transform: translateY(-50%); border-block: 1px solid #d3bc7f48; background: linear-gradient(90deg, transparent, #d9be7410 30%, #d9be7410 70%, transparent); pointer-events: none; }
.atlas-wheel { height: var(--wheel-height); overflow: hidden auto; overscroll-behavior-y: contain; scroll-snap-type: y mandatory; touch-action: pan-y; scrollbar-width: none; user-select: none; -webkit-user-select: none; mask-image: linear-gradient(transparent, #000 27%, #000 73%, transparent); }
.atlas-wheel::-webkit-scrollbar { display: none; }
.atlas-wheel::before, .atlas-wheel::after { content: ""; display: block; height: calc((var(--wheel-height) - var(--wheel-row)) / 2); }
.atlas-wheel[data-dragging] { scroll-snap-type: none; cursor: grabbing; }
.atlas-wheel [role=option] { display: grid; place-items: center; height: var(--wheel-row); scroll-snap-align: center; cursor: pointer; color: #b0b9ac; font-size: 12px; font-variant-numeric: tabular-nums; }
.atlas-wheel [aria-selected=true] { color: #f2d89c; font-size: 15px; font-weight: 700; }
.atlas-wheel-frame:has(:focus-visible) { border-radius: 7px; outline: 2px solid #ffd67b; outline-offset: 0; }
.atlas-wheel:focus { outline: none; }
@media (max-height: 450px) and (orientation: landscape) { .atlas-wheel-frame { --wheel-height: 66px; } }
@media (forced-colors: active) { .atlas-wheel [aria-selected=true] { color: HighlightText; background: Highlight; } }
.atlas-use-row { flex-wrap: wrap; gap: 4px; padding: 4px 0 6px; }
#atlas-use-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.atlas-use-chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.atlas-use-chips button { position: relative; min-height: 32px; padding: 0 11px; border: 1px solid #9da7998c; border-radius: 99px; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--ui-font); }
.atlas-use-chips button::before { content: ""; position: absolute; inset: -4px 0; }
.atlas-use-chips button[aria-pressed=true] { border-color: var(--gold-fill); background: var(--gold-fill); color: var(--gold-ink); }
.atlas-use-chips button:focus-visible { outline: 2px solid #ffd67b; outline-offset: 1px; }
@media (forced-colors: active) { .atlas-use-chips button[aria-pressed=true] { background: Highlight; color: HighlightText; } }
.atlas-settings-footer { display: grid; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e5ebd94f; }
.atlas-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.atlas-signature { display: flex; align-items: center; gap: 7px; color: var(--dim); font: 10px/1.2 var(--ui-font); }
.atlas-signature svg { width: 22px; height: 10px; opacity: .88; }

/* 검색 창: map-search.css .atlas-search와 같은 모양 */
.atlas-search { position: absolute; z-index: 6; top: calc(max(var(--masthead-tools-top), env(safe-area-inset-top)) + 52px); right: max(var(--masthead-side), env(safe-area-inset-right)); width: min(420px, calc(100% - 2 * var(--masthead-side))); display: flex; flex-direction: column; border: 1px solid var(--pill-line); border-radius: 16px; background: #162023f2; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); overflow: hidden; }
.atlas-search-form { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; }
.atlas-search-form svg { flex: none; width: 18px; height: 18px; color: #aab3ab; }
.atlas-search-form input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font: 500 16px/1.4 var(--ui-font); }
.atlas-search-form input::placeholder { color: #8d978f; }
.atlas-search-form input::-webkit-search-cancel-button { display: none; }
.atlas-search-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; color: #ccd2ca; font: 400 22px/1 system-ui; }
.atlas-search-close:hover { background: #263436; }
.atlas-search-state { padding: 0 14px; color: #aab3ab; font-size: 12px; line-height: 1.5; }
.atlas-search-state:not(:empty) { padding: 0 14px 10px; }

/* ---- 도구 줄(2026-11-29 사용자: 버튼 칸이 화면을 너무 먹는다 → 두 줄·낮은 알약, 담기는 위쪽 단추 줄로) ----
   첫 줄 [레퍼런스|유지보수][사진|로드뷰|위성], 둘째 줄 [보기 크기] 개수 … [정렬]. 알약 높이 34px. 오른쪽 끝은 위 단추 열과 같은 선에 맞춘다. */
.ref-tools { --side: max(calc(var(--masthead-side) * var(--ui-scale, 1)), env(safe-area-inset-right)); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a basket" "b b"; align-items: center; gap: 6px; padding: 0 var(--side) 8px max(calc(var(--masthead-side) * var(--ui-scale, 1)), env(safe-area-inset-left)); }
.rt-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rt-a { grid-area: a; }
.rt-b { grid-area: b; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--pill-line); border-radius: 18px; background: var(--pill-bg); overflow: hidden; }
.seg.equal { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }      /* 칸 너비를 가장 긴 글에 맞춰 같게 */
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; height: 32px; min-width: 36px; padding: 0 9px; color: #ccd2ca; font: 600 12.5px/1 var(--ui-font); white-space: nowrap; }
.seg input:checked + span { background: var(--gold-fill); color: var(--gold-ink); }
.seg input:focus-visible + span { outline: 3px solid #ffd67b; outline-offset: -3px; }
.seg.size span { min-width: 33px; padding: 0; }
.seg.is-disabled { opacity: .4; }
.seg.is-disabled input { cursor: default; }
/* 담은 건물: 보기 줄 오른쪽 끝(위 단추 열의 '지도' 단추 오른쪽 끝과 같은 선). 알약과 같은 34px */
#basket-btn { grid-area: basket; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 11px; border: 1px solid var(--pill-line); border-radius: 18px; background: var(--pill-bg); color: #ccd2ca; font: 600 12.5px/1 var(--ui-font); white-space: nowrap; }
#basket-btn:hover { background: #263436; }
@media (max-width: 380px) { #basket-btn span { display: none; } #basket-btn { padding: 0 6px 0 10px; gap: 5px; } .lh-sort select { max-width: 94px; font-size: 12px; } .seg.size span { min-width: 30px; } .rt-b { gap: 6px; } }
#basket-btn b { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--gold-fill); color: var(--gold-ink); font: 700 12px/21px var(--ui-font); text-align: center; }
#basket-btn[data-empty="1"] b { background: transparent; box-shadow: inset 0 0 0 1px var(--pill-line); color: var(--dim); }
body[data-mode=maint] .ref-top { box-shadow: inset 0 -3px 0 var(--gold); }
@media (min-width: 761px) {       /* 넓은 화면: 두 줄을 한 줄로 — [모드·보기 선택] [보기 크기·개수 … 정렬] [담은] */
    .ref-tools { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "a b basket"; gap: 12px; }
}

/* ---- 목록 머리: 칩 줄(개수·정렬은 도구 줄로 올렸다) ---- */
.list-head { padding: 0 12px 4px; }
.lh-count { flex: 1; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-count b { color: #f2d697; font: 750 16px/1.2 var(--ui-font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lh-count span { margin-left: 1px; color: var(--muted); font: 600 12px/1.2 var(--ui-font); }
.lh-count small { margin-left: 2px; color: var(--dim); font: 600 12px/1.2 var(--ui-font); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .lh-sort > span { display: none; } .lh-sort select { max-width: 108px; } }
.lh-sort { display: flex; align-items: center; flex: none; gap: 8px; margin-left: auto; color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.lh-sort select { max-width: 150px; height: 34px; padding: 0 6px 0 10px; border: 1px solid var(--pill-line); border-radius: 18px; background: var(--pill-bg); font: 600 12.5px var(--ui-font); }
.lh-sort option { background: #192527; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips-label { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 6px 0 0; border: 0; background: none; color: var(--gold); font: 700 12.5px/1 var(--ui-font); }
.chips-label.plain { color: var(--muted); cursor: default; }
.chips-none { color: var(--dim); font-size: 12.5px; }
.chip-x { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px 0 13px; border: 1px solid var(--pill-line); border-radius: 99px; background: var(--pill-bg); color: #dfe4dc; font: 600 12.5px/1 var(--ui-font); }
.chip-x::before { content: ""; position: absolute; inset: -4px 0; }
.chip-x.setting { border-color: #efc86b8c; color: #f2d697; }
.chip-x:hover { background: #263436; }
.chip-clear { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--dim); font: 600 12px var(--ui-font); text-decoration: underline; text-underline-offset: 3px; }

/* ---- 카드 격자(가상 스크롤). 층위는 #grid[data-level] — row 가로 카드(1열), full 자세히, compact 줄임, mini 이름·연도·용도만 ---- */
.grid { position: relative; }
.card { position: absolute; left: 0; top: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; contain: layout style; }
.grid:not([data-level=row]) .card { display: flex; flex-direction: column; }
.grid[data-level=row] .card { display: grid; grid-template-columns: var(--photo-w) minmax(0, 1fr); grid-template-rows: var(--top-h) auto; }
.card[data-mark=saved] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.card[data-mark=applied] { border-color: var(--applied); box-shadow: 0 0 0 1px var(--applied); }
.card-top { position: relative; flex: none; height: var(--top-h); background: #122022; }
.card-media { position: absolute; inset: 0; overflow: hidden; }
.card-open { position: absolute; inset: 0; z-index: 1; }
.card-mark { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: #172124e6; font: 700 11.5px/1 var(--ui-font); pointer-events: none; }
.card-mark:empty { display: none; }
.card-mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.card[data-mark=saved] .card-mark { color: var(--gold); }
.card[data-mark=applied] .card-mark { color: var(--applied); }
.card-small { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 0 9px; border-radius: 11px; background: #172124e6; color: var(--dim); font: 600 11px/22px var(--ui-font); pointer-events: none; }
.card-body { display: flex; flex: none; flex-direction: column; min-width: 0; height: var(--info-h); padding: 10px 12px; }
.card-name { max-height: 40px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font: 650 16px/20px var(--ui-font); word-break: keep-all; overflow-wrap: anywhere; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-arch, .card-meta, .card-award { height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; }
.card-arch { margin-top: 2px; color: var(--muted); }
.card-meta { color: var(--dim); }
.card-award { color: var(--gold); font-weight: 600; }
.card-award:not(:empty)::before { content: "★ "; }
.card-foot { display: flex; align-items: center; gap: 8px; height: 44px; margin-top: auto; }
.card-chips { display: flex; flex: 1; min-width: 0; gap: 6px; overflow: hidden; }
.card-maint { display: grid; gap: 8px; padding: 0 12px 12px; }
.card-maint:empty { display: none; }
/* 담기: 자세히(full)는 아래쪽 알약, 그 밖에는 사진 구석의 작은 동그라미(눌리는 자리는 44px까지 넓힘) */
.basket-btn.corner { display: none; position: absolute; top: 5px; right: 5px; z-index: 3; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; border: 1px solid #e5ebd966; border-radius: 50%; background: #172124e6; }
.basket-btn.corner::before { content: ""; position: absolute; inset: -5px; }
.basket-btn.corner[aria-pressed=true] { border-color: var(--gold-fill); background: var(--gold-fill); }
.grid:not([data-level=full]) .basket-btn.corner { display: grid; }
.grid:not([data-level=full]) .card-foot .basket-btn { display: none; }
/* 가로 카드(1열, 크게 보기): 사진 왼쪽, 글 오른쪽. 글 칸은 좁게(사진을 키우려고), 글자는 작게(2026-11-29 사용자) */
.grid[data-level=row] .card-body { grid-column: 2; padding: 8px 8px; }
.grid[data-level=row] .card-name { max-height: 34px; font-size: 13px; line-height: 17px; }
.grid[data-level=row] .card-arch, .grid[data-level=row] .card-meta, .grid[data-level=row] .card-award { height: 15px; font-size: 11.5px; line-height: 15px; }
.grid[data-level=row] .card-foot { height: 24px; }
.grid[data-level=row] .card-maint { grid-column: 1 / -1; padding: 0 10px 10px; }
/* 줄임(2열): 이름·설계자·용도·면적·연도, 칩은 둘까지 */
.grid[data-level=compact] .card-body { padding: 7px 8px; }
.grid[data-level=compact] .card-name { max-height: 32px; font-size: 13px; line-height: 16px; }
.grid[data-level=compact] .card-arch, .grid[data-level=compact] .card-meta { height: 15px; font-size: 11.5px; line-height: 15px; }
.grid[data-level=compact] .card-meta { font-size: 11px; }
.grid[data-level=compact] .card-award { display: none; }
.grid[data-level=compact] .card-foot { height: 24px; }
.grid[data-level=compact] .chip:nth-child(n+3) { display: none; }
.grid[data-level=row] .chip, .grid[data-level=compact] .chip { height: 22px; padding: 0 8px; font-size: 11px; }
.grid[data-level=compact] .card-small, .grid[data-level=mini] .card-small { display: none; }
/* 작게(3열): 이름 한두 줄 + 연도·용도 한 줄 */
.grid[data-level=mini] .card-body { padding: 6px 7px; }
.grid[data-level=mini] .card-name { max-height: 30px; font-size: 12px; line-height: 15px; }
.grid[data-level=mini] .card-arch, .grid[data-level=mini] .card-award, .grid[data-level=mini] .card-foot { display: none; }
.grid[data-level=mini] .card-meta { height: 13px; margin-top: 2px; font-size: 10.5px; line-height: 13px; }
.grid[data-level=compact] .card-mark, .grid[data-level=mini] .card-mark { top: 6px; left: 6px; justify-content: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; font-size: 0; }
.grid[data-level=mini] .card-maint { padding: 0 6px 6px; }
.grid[data-level=mini] .rv-chips { gap: 4px; }
.grid[data-level=mini] .rv-chip { padding: 0; font-size: 11.5px; }
.grid[data-level=compact] .rv-chip { font-size: 12px; }
.rv-chips { display: flex; gap: 6px; }
.rv-chip { --c: var(--long); flex: 1; min-width: 0; min-height: 44px; padding: 0 2px; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 12px; background: transparent; color: var(--muted); font: 650 13px/1.2 var(--ui-font); }
.rv-chip[data-r=done] { --c: var(--done); }
.rv-chip[data-r=todo] { --c: var(--todo); }
.rv-chip[data-r=long] { --c: var(--long); }
.rv-chip[aria-pressed=true] { border-color: var(--c); background: var(--c); color: #10211f; }
.memo { display: grid; gap: 4px; }
.memo-input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #111c1e; font: 400 16px/1.5 var(--ui-font); resize: vertical; }
.memo-input:focus { border-color: var(--gold); outline: 0; box-shadow: 0 0 0 2px #efc86b40; }
.memo-state { color: var(--dim); font-size: 12px; text-align: right; }

/* ---- 사진·지도 칸 ---- */
.media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.media-img.is-soft { filter: blur(1.5px); }
@media (prefers-reduced-motion: no-preference) { .media-img { animation: fade-in .25s ease-out; } }
@keyframes fade-in { from { opacity: 0; } }
.media-none { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(135deg, #142123 0 12px, #172729 12px 24px); color: #8a9792; font: 650 14px/1 var(--ui-font); }
.map-box { position: absolute; inset: 0; }
.card-media:not(.armed) .map-box { pointer-events: none; }
.media-note { position: absolute; inset: 0; z-index: 2; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; align-items: center; gap: 10px; padding: 16px; background: #122022e6; color: var(--muted); font: 600 13px/1.5 var(--ui-font); text-align: center; }
.media-note > span:first-child:not(.spin) { flex-basis: 100%; }
/* 겹치지 않는 자리(상세): 위 오른쪽 = 수정 저장·교체, 아래 오른쪽 = 확대·축소 알약, 그 왼쪽 = 로드뷰 위치 옮기기. 아래 36px은 카카오 로고·저작권 줄이라 비워 둔다.
   목록 카드의 로드뷰·위성은 보기만 한다(누르면 상세). */
.media-act { position: absolute; top: 8px; right: 8px; z-index: 3; min-height: 44px; padding: 0 16px; border: 1px solid #e5ebd966; border-radius: 22px; background: #172124eb; color: var(--ink); font: 650 13px/1 var(--ui-font); }
.media-act.primary { border-color: var(--gold-fill); background: var(--gold-fill); color: var(--gold-ink); }
.media-act:disabled { border-color: #e5ebd933; background: #172124eb; color: var(--dim); cursor: default; }
.grid:not([data-level=full]) .media-act { top: auto; right: 6px; bottom: 6px; min-height: 30px; padding: 0 10px; font-size: 11.5px; }
/* 확대·축소: 지도 화면 #atlas-map-zoom 알약(88x44, 안쪽 30px 알약)과 같은 모양 */
.map-zoom { position: absolute; right: 8px; bottom: 36px; z-index: 4; display: flex; width: 88px; height: 44px; }
.map-zoom::before { content: ""; position: absolute; inset: auto 2px 3px; height: 30px; border: 1px solid var(--pill-line); border-radius: 16px; background: #172326e8; pointer-events: none; }
.map-zoom button { position: relative; width: 44px; height: 44px; padding: 8px 0 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 500 16px/1 system-ui; }
.map-zoom button:disabled { color: #9aa79f; cursor: default; }
.map-zoom button:enabled:active { color: var(--gold); }
/* 수정 모드 위성의 '고친 위치' 십자 */
body[data-mode=maint] [data-view=sky] .map-box::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 10; width: 28px; height: 28px; margin: -14px; border: 2px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 1px #0b1518, inset 0 0 0 1px #0b1518; background: radial-gradient(circle, var(--gold) 0 2px, transparent 3px); pointer-events: none; }

/* ---- 상세 ---- */
.detail { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { .detail:not([hidden]) { animation: detail-in .24s ease-out; } }
@keyframes detail-in { from { transform: translateY(18px); opacity: 0; } }
.d-bar { display: flex; flex: none; align-items: center; gap: 2px; padding: max(6px, env(safe-area-inset-top)) 8px 6px; border-bottom: 1px solid var(--soft-line); }
.d-bar-text { display: grid; flex: 1; min-width: 0; padding: 0 6px; line-height: 1.3; }
.d-bar-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px/1.3 var(--ui-font); }
.d-bar-text small { color: var(--dim); font-size: 12px; }
.d-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; outline: 0; }
.d-layout { max-width: 1560px; margin: 0 auto; }
.d-stage { position: relative; height: clamp(260px, 84vw, 62dvh); background: #0f1b1d; overflow: hidden; touch-action: pan-y; }
.d-stage .media-img { object-fit: cover; }      /* 맨 위 칸은 로드뷰·위성과 같은 틀에 잘라 넣고, 자르지 않은 사진은 아래 '사진' 칸에(2026-11-30 사용자) */
.d-gallery-wrap { container-type: inline-size; }
.d-gallery { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.d-gallery figure { margin: 0; border-radius: 8px; overflow: hidden; background: #0f1b1d; }
.d-gallery img { display: block; width: 100%; height: auto; }
@container (min-width: 640px) {       /* 칸이 넓으면 높이를 맞춰 한 줄(각 사진 너비 = 가로세로비에 비례) */
    .d-gallery { flex-direction: row; align-items: flex-start; }
    .d-gallery figure { flex: var(--r) 1 0; min-width: 0; }
}
@media (prefers-reduced-motion: no-preference) {
    .d-stage.from-right { animation: from-right .22s ease-out; }
    .d-stage.from-left { animation: from-left .22s ease-out; }
}
@keyframes from-right { from { transform: translateX(28px); opacity: .25; } }
@keyframes from-left { from { transform: translateX(-28px); opacity: .25; } }
.seg.d-views { display: grid; margin: 10px 12px 0; }
.d-info { padding: 4px 14px 48px; }
.d-head h1 { margin: 12px 0 4px; font: 760 24px/1.3 var(--ui-font); letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
.d-arch { color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
.d-aka { margin: 0 0 4px; color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.d-head .d-dl { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.d-head .d-dl > div { display: block; padding: 0; border: 0; }
.d-head .d-dl dt { font-size: 11.5px; }
.d-head .d-dl dd { color: #f2d697; font: 700 16px/1.3 var(--ui-font); font-variant-numeric: tabular-nums; }
.d-block { margin-top: 24px; }
.d-block > h2 { margin-bottom: 4px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--gold); font: 730 14.5px/1.4 var(--ui-font); letter-spacing: -.02em; }
.d-dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--soft-line); }
.d-dl dt { color: var(--dim); font-size: 13px; }
.d-dl dd { font-size: 14.5px; word-break: keep-all; overflow-wrap: anywhere; }
.d-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--soft-line); font-size: 14.5px; overflow-wrap: anywhere; }
.d-list a, .d-dl a { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; color: #f2d697; text-underline-offset: 3px; }
.d-list li svg { color: var(--gold); flex: none; }
.d-more { margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.d-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--dim); }
.d-raw pre { max-height: 360px; overflow: auto; padding: 12px; border-radius: 10px; background: #111c1e; color: var(--muted); font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.d-wait { margin-top: 24px; color: var(--dim); font-size: 14px; }
.d-maint { padding: 12px 14px 14px; border: 1px solid #efc86b59; border-radius: 14px; background: #efc86b0d; }
.d-maint > h2 { border-color: #efc86b40; }
.d-maint .rv-chips { margin: 12px 0 10px; }
.d-edit { margin-top: 8px; color: var(--dim); font-size: 12.5px; }
.d-edit[data-mark=saved] { color: var(--gold); }
.d-edit[data-mark=applied] { color: var(--applied); }
@media (min-width: 980px) {
    .d-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(380px, 1fr); align-items: start; }
    .d-media-col { position: sticky; top: 0; display: flex; flex-direction: column; height: calc(100dvh - 60px); padding: 14px 0 14px 14px; }
    .d-stage { flex: 1; height: auto; min-height: 0; border-radius: 14px; }
    .seg.d-views { margin: 12px 0 0; }
    .d-info { padding: 8px 28px 64px; }
}

/* ---- 시트와 창 ---- */
dialog.sheet { width: 100%; max-width: none; height: 100%; max-height: none; padding: 0; border: 0; background: transparent; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(6, 14, 16, .62); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: min(92dvh, 780px); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--bg); box-shadow: 0 -10px 40px #0a14168c; }
@media (prefers-reduced-motion: no-preference) { dialog.sheet[open] .sheet-panel { animation: sheet-up .24s ease-out; } }
@keyframes sheet-up { from { transform: translateY(28px); opacity: 0; } }
@media (min-width: 700px) {
    .sheet-panel { left: 50%; right: auto; top: 50%; bottom: auto; width: min(560px, 92vw); border-bottom: 1px solid var(--line); border-radius: 18px; transform: translate(-50%, -50%); }
    @media (prefers-reduced-motion: no-preference) { dialog.sheet[open] .sheet-panel { animation: sheet-pop .2s ease-out; } }
}
@keyframes sheet-pop { from { transform: translate(-50%, calc(-50% + 14px)); opacity: 0; } }
.sheet-head { display: flex; flex: none; align-items: center; gap: 10px; padding: 8px 8px 6px 18px; border-bottom: 1px solid #e5ebd94f; }
.sheet-head h2 { font: 730 18px/1.35 var(--ui-font); letter-spacing: -.03em; }
.sheet-head .icon-btn { margin-left: auto; color: var(--gold); }
.sheet-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 6px 18px 14px; }
.sheet-foot { display: flex; flex: none; gap: 8px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--soft-line); }
.sheet-foot .btn { flex: 1; }
.sheet-foot:empty { display: none; }
.sheet-hint { margin: 8px 0 12px; color: var(--muted); font-size: 13.5px; }
dialog.ask .sheet-panel { padding-top: 6px; }
dialog.ask .sheet-body { padding-top: 14px; }
dialog.ask h2 { margin-bottom: 6px; font: 730 17px/1.4 var(--ui-font); }
dialog.ask p { color: var(--muted); font-size: 14.5px; }

/* 세부 필터 창 */
.fgroup { border-top: 1px solid var(--soft-line); }
.fgroup:first-child { border-top: 0; }
.fg-title { margin: 12px 0 8px; color: var(--muted); font: 700 12.5px/1.4 var(--ui-font); }
.fgroup.inline { padding-bottom: 10px; }
.fgroup > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; list-style: none; cursor: pointer; font: 650 14px/1.3 var(--ui-font); }
.fgroup > summary::-webkit-details-marker { display: none; }
.fg-sum { margin-left: auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-weight: 500; font-size: 12.5px; }
.fgroup > summary svg { flex: none; color: var(--dim); transition: transform .2s; }
.fgroup[open] > summary svg { transform: rotate(90deg); }
.fg-body { padding: 2px 0 14px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.opt-chip, .opt-more { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid #9da7998c; border-radius: 99px; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--ui-font); }
.opt-chip::before, .opt-more::before { content: ""; position: absolute; inset: -4px 0; }
.opt-chip small { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.opt-chip[aria-pressed=true] { border-color: var(--gold-fill); background: var(--gold-fill); color: var(--gold-ink); }
.opt-chip[aria-pressed=true] small { color: #524616; }
.opt-more { border-style: dashed; color: var(--gold); }
.opt-none { color: var(--dim); font-size: 13px; }
.opt-search, .bk-block input, .bk-block textarea { width: 100%; min-height: 44px; margin-bottom: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 22px; background: #111c1e; font: 400 16px/1.4 var(--ui-font); }
.bk-block textarea { border-radius: 14px; resize: vertical; }
.opt-search:focus, .bk-block input:focus, .bk-block textarea:focus { border-color: var(--gold); outline: 0; box-shadow: 0 0 0 2px #efc86b40; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font: 650 14px/1.3 var(--ui-font); cursor: pointer; }
.range-row { display: flex; gap: 10px; }
.range-row label { display: grid; flex: 1; gap: 4px; color: var(--dim); font-size: 12px; }
.range-row input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #111c1e; font-size: 16px; }

/* 담은 건물 창 */
.bk-list li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--soft-line); }
.bk-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; min-height: 64px; padding: 6px 0; border: 0; background: none; text-align: left; }
.bk-open img, .bk-noimg { flex: none; width: 68px; height: 51px; border-radius: 8px; object-fit: cover; background: #122022; }
.bk-noimg { display: grid; place-items: center; color: #8a9792; font: 650 12px var(--ui-font); }
.bk-text { display: grid; min-width: 0; line-height: 1.4; }
.bk-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 14.5px/1.4 var(--ui-font); }
.bk-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12.5px; }
.bk-empty, .bk-more { padding: 18px 0; color: var(--dim); font-size: 13.5px; text-align: center; }
.bk-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.bk-block { margin-top: 20px; }
.bk-block h3 { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--gold); font: 730 14px/1.4 var(--ui-font); }
.bk-count { display: block; margin: -4px 4px 8px; color: var(--dim); font-size: 12px; text-align: right; }
.bk-saved li { padding: 10px 0; border-bottom: 1px solid var(--soft-line); }
.bk-saved-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bk-saved p { margin-top: 2px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.bk-saved small, .bk-note { color: var(--dim); font-size: 12.5px; }
.bk-note { margin-top: 6px; }
.bk-note a { color: #f2d697; text-underline-offset: 3px; }

/* 사진 교체 창 */
.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; margin-bottom: 14px; }
.cand { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 12px; background: #122022; overflow: hidden; }
.cand img { width: 100%; height: 100%; object-fit: cover; }
.cand small { position: absolute; inset: auto 0 0; padding: 14px 6px 4px; background: linear-gradient(transparent, #0b1518e6); font-size: 11px; text-align: left; }
.cand[aria-pressed=true], .cand.uploaded { border-color: var(--gold); }
.upload-btn { cursor: pointer; }

/* ---- 알림·빈 화면 ---- */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 200; display: flex; align-items: center; gap: 12px; max-width: min(440px, calc(100% - 24px)); padding: 11px 16px; border: 1px solid var(--pill-line); border-radius: 14px; background: #162023f7; box-shadow: 0 10px 30px #00000059; font-size: 13.5px; line-height: 1.5; transform: translateX(-50%); }
.toast-action { min-height: 44px; margin: -8px -8px -8px 0; padding: 0 10px; border: 0; background: none; color: var(--gold); font-weight: 700; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 64px 24px 96px; text-align: center; }
.empty h2 { font: 730 18px/1.4 var(--ui-font); }
.empty p { max-width: 34em; color: var(--muted); font-size: 14px; word-break: keep-all; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); }

/* ---- 원문 PDF 발췌 보기(ref-pdf.js) ---- */
.pdf-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border: 1px solid var(--gold-fill); border-radius: 18px; background: transparent; color: var(--gold); font: 650 13px/1 var(--ui-font); }
.pdf-btn:hover { background: #efc86b24; }
dialog.pdf-view .sheet-panel { left: 0; right: 0; top: 0; bottom: 0; width: 100%; max-height: none; height: 100dvh; border: 0; border-radius: 0; transform: none; animation: none; }
dialog.pdf-view .sheet-head { padding-left: 14px; }
dialog.pdf-view .sheet-head h2 { flex: 1; min-width: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
dialog.pdf-view .sheet-head .icon-btn { margin-left: 0; }
/* 사진 크게 보기(사용자 2026-11-30): 상세 사진을 누르면 화면 가득 원래 비율로, 아무 데나 누르면 닫힘 */
.media-img.can-full { cursor: zoom-in; }
dialog.photo-full { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #070d0ef5; cursor: zoom-out; }
dialog.photo-full[open] { display: grid; place-items: center; }
dialog.photo-full::backdrop { background: transparent; }
dialog.photo-full img { display: block; max-width: 100vw; max-height: 100dvh; width: auto; height: auto; object-fit: contain; }
dialog.photo-full .icon-btn { position: absolute; top: max(8px, env(safe-area-inset-top)); right: 8px; color: var(--gold); background: #0f1719b3; }
dialog.pdf-view .sheet-body { padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); background: #0f1719; }
.pdf-zoom { display: inline-flex; flex: none; align-items: center; gap: 2px; }
.pdf-zoom .icon-btn:disabled { opacity: .35; }
.pdf-zoom-label { min-width: 34px; color: var(--muted); font: 650 13px/1 var(--ui-font); text-align: center; }
.pdf-label { margin: 2px 4px 10px; color: var(--dim); font-size: 12.5px; overflow-wrap: anywhere; }
.pdf-pages { --pdf-zoom: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pdf-page { flex: none; width: calc(var(--pdf-zoom) * 100%); margin: 0; }
.pdf-page img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: 0 2px 14px #00000066; }
.pdf-page figcaption { margin-top: 4px; color: var(--dim); font-size: 12px; text-align: center; }
.pdf-fail { padding: 28px 0; color: var(--dim); text-align: center; }
@media (min-width: 900px) { .pdf-pages { align-items: center; } .pdf-page { width: calc(var(--pdf-zoom) * min(100%, 980px)); } }


/* ---- 2026-11-30 메뉴 손질(사용자) ---- */
/* 설정·세부 필터 한 알약: 누르거나 올렸을 때 단추 하나가 원으로 덮이지 않게, 바깥쪽만 둥글고 안쪽은 곧게(알약 반쪽 모양으로 덮임) */
.tool-pair #ref-filter-btn { border-radius: 22px 0 0 22px; -webkit-tap-highlight-color: transparent; }
.tool-pair #atlas-settings-toggle { border-radius: 0 22px 22px 0; -webkit-tap-highlight-color: transparent; }
.tool-pair #ref-filter-btn:active, .tool-pair #atlas-settings-toggle:active { background: #2d4144; }
/* 설정 창 닫기(X) — 세부 필터 시트의 닫기와 같은 모양 */
.atlas-pane-heading .pop-close { margin-left: auto; width: 36px; height: 36px; margin-right: -8px; color: var(--gold); }
/* 정렬: 폭 고정, 고른 뒤 노란 테두리가 남지 않게 */
.lh-sort select { width: 108px; max-width: none; text-overflow: ellipsis; }
.lh-sort select:focus, .lh-sort select:focus-visible { outline: none; border-color: var(--pill-line); }
@media (max-width: 600px) { .lh-sort select { max-width: none; } }
@media (max-width: 380px) { .lh-sort select { max-width: none; width: 100px; } }
/* 담은: 아이콘 + 숫자(세 자리가 들어갈 폭으로 고정) */
#basket-btn { width: 70px; justify-content: center; gap: 5px; padding: 0 8px 0 10px; }
#basket-btn b { min-width: 30px; padding: 0; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 380px) { #basket-btn { width: 64px; padding: 0 6px 0 8px; } #basket-btn b { min-width: 28px; } }
/* 수정 켜는 단추: 아이콘만, 켜면 금색 */
.edit-toggle { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--pill-line); border-radius: 17px; background: var(--pill-bg); color: #ccd2ca; -webkit-tap-highlight-color: transparent; }
.edit-toggle:hover { background: #263436; }
.edit-toggle[aria-pressed=true] { border-color: var(--gold-fill); background: var(--gold-fill); color: var(--gold-ink); }
/* 필터 줄: 작은 글자 칩 */
.chips { gap: 4px 6px; }
.chips-label { min-height: 28px; font: 650 12px/1 var(--ui-font); }
.chips-none { font-size: 12px; }
.chip-x { min-height: 26px; padding: 0 7px 0 9px; gap: 4px; border: 1px solid #ffffff26; border-radius: 13px; background: transparent; color: #dfe4dc; font: 600 12px/1 var(--ui-font); }
.chip-x::before { inset: -9px -2px; }
.chip-x.setting { border-color: #efc86b66; color: #f2d697; }
.chip-x svg { opacity: .7; }
.chip-clear { min-height: 28px; padding: 0 4px; }
/* 카드 사진 모서리의 담기(+): 보이는 크기는 작게, 눌리는 자리는 그대로 */
.basket-btn.corner { top: 6px; right: 6px; width: 26px; height: 26px; border-color: #e5ebd94d; }
.basket-btn.corner::before { inset: -9px; }
.basket-btn.corner svg { width: 14px; height: 14px; }

/* ---- 2026-11-30 둘째 손질(사용자) ---- */
/* 설정·추가 설정 한 알약의 올림·누름·열림: 단추 바탕이 불투명하면 알약 테두리를 가려 먹먹해 보였다. 바탕은 비치게 두어 바깥 테두리를 살리고,
   열린 쪽은 지도의 열린 설정 단추(atlas-header.css)처럼 금색 가는 테두리 + 옅은 금빛. 그 테두리는 가운데 나눔선까지 이어 반쪽 알약 하나로 닫히게 한다. */
.tool-pair #ref-filter-btn:hover, .tool-pair #atlas-settings-toggle:hover { background: #e5ebd90f; }
.tool-pair #ref-filter-btn:active, .tool-pair #atlas-settings-toggle:active { background: #e5ebd91a; }
.tool-pair #ref-filter-btn::after, .tool-pair #atlas-settings-toggle::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; border-radius: inherit; pointer-events: none; }
.tool-pair #ref-filter-btn::after { right: calc(var(--masthead-gap) / -2); }
.tool-pair #atlas-settings-toggle::after { left: calc(var(--masthead-gap) / -2); }
.tool-pair #ref-filter-btn[aria-expanded=true], #atlas-settings-menu[open] > #atlas-settings-toggle { color: var(--gold); background: #efc86b14; }
.tool-pair #ref-filter-btn[aria-expanded=true]::after, #atlas-settings-menu[open] > #atlas-settings-toggle::after { border-color: #efc86b95; }
.tool-pair:has(#ref-filter-btn[aria-expanded=true], #atlas-settings-menu[open]) { background: var(--pill-bg); }      /* 열린 동안 가운데 회색 나눔선은 숨긴다(금색 테두리가 대신 나눈다) */

/* 추가 설정 창: 설정 창(.atlas-popover)과 같은 판·폭·머리. 줄 높이와 칩 크기도 설정 창(.atlas-period-row 44px, 용도 칩 32px)에 맞춘다. */
.ref-filter-pop .atlas-pane-heading { margin-bottom: 2px; }
.ref-filter-groups .fgroup { border-top: 1px solid #c4cdb42d; }
.ref-filter-groups .fgroup:first-child { border-top: 0; }
.ref-filter-groups .fg-title { margin: 8px 0 6px; color: var(--muted); font: 600 12.5px/1.4 var(--ui-font); }
.ref-filter-groups .fgroup.inline { padding-bottom: 8px; }
.ref-filter-groups .fgroup > summary { min-height: 44px; font: 650 14px/1.4 var(--ui-font); }
.ref-filter-groups .fg-sum { font-size: 12px; }
.ref-filter-groups .fg-body { padding: 0 0 10px; }
.ref-filter-groups .opt-chips { gap: 6px; }
.ref-filter-groups .opt-chip, .ref-filter-groups .opt-more { min-height: 32px; padding: 0 11px; font: 600 12.5px/1 var(--ui-font); }
.ref-filter-groups .opt-chip small { font-size: 10.5px; }
.ref-filter-groups .opt-search { min-height: 38px; margin-bottom: 8px; padding: 6px 12px; border-radius: 19px; }
.ref-filter-groups .switch-row { min-height: 44px; font: 650 13px/1.4 var(--ui-font); }
.ref-filter-groups .range-row input { min-height: 38px; }
/* 창 맨 아래 작은 글 단추(모두 풀기, 지도에 싣는 기준): 지도 설정의 '지도에 싣는 기준'과 같은 모양. 눌리는 자리는 위아래로 넓힌다. */
.pop-link { margin: -9px 0; padding: 9px 0 9px 12px; border: 0; background: transparent; color: var(--dim); font: 10px/1.2 var(--ui-font); text-decoration: underline; text-decoration-color: #9eaaa38c; text-underline-offset: 2px; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.pop-link:disabled { opacity: .45; cursor: default; text-decoration: none; }
.pop-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 설정 창 아래: 지도 설정 창과 같게 방문 통계 한 줄 · 의견·제보 · 서명과 '지도에 싣는 기준'(projects.css #atlas-settings 줄을 옮김) */
#atlas-settings .atlas-settings-footer { gap: 5px; }
#atlas-settings #atlas-visit-counts { margin: 0; padding: 0; border: 0; font-size: 10.5px; line-height: 1.3; }
#atlas-settings #atlas-visit-counts dl { display: flex; flex-wrap: wrap; gap: 2px 12px; }
#atlas-settings #atlas-visit-counts dl > div { display: flex; align-items: baseline; gap: 4px; padding: 0; border: 0; }
#atlas-settings #atlas-visit-counts dt { color: #9eaaa3; font-size: 10.5px; }
#atlas-settings #atlas-visit-counts dd { padding: 0; color: #c5cfc7; font-size: 11px; letter-spacing: 0; }
#atlas-settings #atlas-visit-counts dd small { font-size: 10px; }
#atlas-settings #atlas-visit-counts p { margin: 3px 0 0; font-size: 10px; }
.atlas-contact { margin: 0; color: #9eaaa3; font: 11px/1.5 var(--ui-font); word-break: keep-all; overflow-wrap: break-word; }
.atlas-contact .nb { white-space: nowrap; }
.atlas-contact a { color: inherit; text-decoration: underline; text-decoration-color: #9eaaa38c; text-underline-offset: 2px; }
/* 지도에 싣는 기준 창(projects.css .atlas-criteria-sheet와 같은 모양, 화면 아래 가운데에 뜬다) */
.atlas-criteria-sheet { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 60; width: min(420px, calc(100% - 16px)); max-height: min(84dvh, 600px); padding: 14px 16px 16px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: 0 15px 48px #06101266; transform: translateX(-50%); }
@media (prefers-reduced-motion: no-preference) { .atlas-criteria-sheet:not([hidden]) { animation: criteria-up .24s ease-out; } }
@keyframes criteria-up { from { transform: translate(-50%, 24px); opacity: 0; } }
.atlas-criteria-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #e5ebd94f; }
.atlas-criteria-head h2 { font: 730 15px/1.4 var(--ui-font); letter-spacing: -.03em; }
.atlas-criteria-head button { min-width: 44px; min-height: 44px; margin: -6px -12px -6px 0; border: 0; background: transparent; color: var(--gold); font: 400 26px/1 var(--ui-font); }
.atlas-criteria-sheet ul { margin: 0; padding: 0 0 0 16px; list-style: disc; color: #c5cfc7; font: 13px/1.75 var(--ui-font); word-break: keep-all; }
.atlas-criteria-sheet ul ul { margin: 2px 0 0; padding-left: 14px; color: #9eaaa3; font-size: 11.5px; line-height: 1.45; }
.atlas-criteria-sheet ul ul .atlas-criteria-group { list-style: none; margin: 5px 0 1px -14px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.atlas-criteria-sheet ul ul .atlas-criteria-group:first-child { margin-top: 2px; }

/* 위성의 핀: 지도 화면 핀(projects.css .atlas-project-pin)과 같은 그림·별·색 */
.ref-pin { position: relative; width: 32px; height: 40px; background: url("../map-project-pins.svg?v=5e078488cf") no-repeat 0 0 / 288px 40px; filter: drop-shadow(0 1px 2px #06101299); pointer-events: none; }
.ref-pin.is-award::after { content: ""; position: absolute; left: 18px; top: 11px; width: 13px; height: 13px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 .7l1.55 3.13 3.45.5-2.5 2.44.59 3.44L6 8.59 2.91 10.21l.59-3.44L1 4.33l3.45-.5z' fill='%23fff7da' stroke='%231d231c' stroke-width='1.05' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; filter: drop-shadow(0 1px 1.5px #091511a0); }
.ref-pin.kind-place { filter: hue-rotate(125deg) saturate(.95) drop-shadow(0 1px 2px #06101299); }
.ref-pin.kind-interior { filter: hue-rotate(205deg) saturate(.9) drop-shadow(0 1px 2px #06101299); }
/* 위성의 로드뷰 촬영 위치(building-view.css .building-camera-spot과 같음): 노란 점 = 촬영 지점, 부채꼴 = 건물 쪽. 옮기기를 켜면 점선 고리가 돌고 끌 수 있다. */
.ref-camera-spot { width: 44px; height: 44px; }
.ref-camera-spot svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 3px #061012b3); }
.ref-camera-spot path { fill: #ffd13a59; stroke: #ffd13acc; stroke-width: 1; }
.ref-camera-spot circle { fill: #ffd13a; stroke: #1a2829; stroke-width: 2; }
.ref-camera-spot .ring { display: none; fill: none; stroke: #fffdf4; stroke-width: 1.6; stroke-dasharray: 3 3; }
.ref-camera-spot.is-movable { cursor: grab; touch-action: none; }
.ref-camera-spot.is-movable:active { cursor: grabbing; }
.ref-camera-spot.is-checking svg { opacity: .6; }
.ref-camera-spot.is-movable .ring { display: block; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .ref-camera-spot.is-movable .ring { animation: spin 4s linear infinite; } }
/* 로드뷰 위치 옮기기 단추: 지도 화면 카드의 화살표 단추(card-fields.css .orbit-camera-zoom)와 같은 둥근 30px, 켜면 금색. 확대·축소 알약 왼쪽. */
.map-move { position: absolute; right: 98px; bottom: 36px; z-index: 4; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.map-move::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--pill-line); border-radius: 50%; background: #172326e8; }
.map-move svg { position: relative; }
.map-move[aria-pressed=true] { color: var(--gold-ink); }
.map-move[aria-pressed=true]::before { border-color: var(--gold-fill); background: var(--gold-fill); }
/* 옮긴 뒤 '옮긴 곳 로드뷰'(위성) · '처음 위치'(로드뷰): 왼쪽 위 */
.media-act.go { right: auto; left: 8px; }

/* 사진 왼쪽 위 지도 표시(2026-11-30 사용자): 지도 핀 모양. 지도에 있으면 불 켠 금색(은은한 빛), 국내인데 지도에 없으면(철거 포함) 불 끈 회색.
   해외는 붙이지 않는다. 누르는 단추가 아니라 표시라서 원·테두리 없이 핀만 그림자로 띄운다(사용자: 단추처럼 보이지 않게).
   자리는 오른쪽 위 담기(+)와 같은 높이. */
/* 왼쪽 위 표시 줄: 지도 핀 · 수상 별 · (수정 모드) 저장됨. 오른쪽 위 담기(+)와 같은 높이(26px). 로드뷰·위성 보기에서도 같은 자리(그 보기의 '상세'·'움직이기'는 뗐다). */
.card-badges { position: absolute; top: 6px; left: 6px; z-index: 2; display: flex; align-items: center; gap: 0; height: 26px; pointer-events: none; }
.card-badges .card-mark { position: static; margin-left: 4px; }
.card-pin { display: grid; place-items: center; width: 26px; height: 26px; }
/* 수상 별: 핀과 같은 꼴 — 바탕 없이 그림자, 금색에 짙은 테. 핀 바로 옆(해외 수상작은 핀 없이 별만). */
.card-star { display: grid; place-items: center; width: 20px; height: 26px; }
.card-pin[hidden] + .card-star { width: 26px; }
/* 마커 옆 별: 마커 머리 높이에 맞춰 조금 올리고 마커 쪽으로 붙인다(사용자 2026-11-30 "살짝 아래·거리 애매") */
.card-pin:not([hidden]) + .card-star { margin-left: -5px; }
.card-pin:not([hidden]) + .card-star svg { transform: translateY(-1.5px); }
.card-star svg { display: block; filter: drop-shadow(0 1px 1.5px #061012cc); }
.card-star path { fill: var(--gold); stroke: #252b24; stroke-width: 1.6; stroke-linejoin: round; }
@media (min-width: 761px) { .card-star { width: 24px; } .card-star svg { width: 17px; height: 17px; } }
.card-pin svg { display: block; filter: drop-shadow(0 1px 1.5px #061012cc); }
.card-pin path { fill: #8f9a95; stroke: #1b2527; stroke-width: 2.2; stroke-linejoin: round; }
.card-pin circle { fill: #1b2527; }
.card-pin[data-on="1"] path { fill: var(--gold); stroke: #252b24; }
.card-pin[data-on="1"] svg { filter: drop-shadow(0 1px 1.5px #061012cc) drop-shadow(0 0 3px #efc86b99); }
@media (min-width: 761px) { .card-pin svg { width: 15px; height: 18px; } }      /* 넓은 화면에서는 조금 크게(사용자 2026-11-30) */
