/* Sharp Black — 검정 + 1px 직각 + 포인트 1색 */
:root {
  --bg:#000; --card:#0D0D10; --line:#202026; --field:#16161B; --field-h:#202027; --btn:#303038;
  --text:#ECECF1; --muted:#80808C; --dim:#54545E; --accent:#3D8BFD;
  --ok:#34D399; --warn:#FBBF24; --bad:#F87171;
  --base:#E8C66A; --breed:#F472B6; --sky:#7DD3FC;
}
* { box-sizing:border-box; }
:root { color-scheme:dark; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--text); font:14px/1.5 "Malgun Gothic","맑은 고딕",system-ui,sans-serif; }
button, input, select { font:inherit; color:inherit; }
::-webkit-scrollbar { width:8px; height:8px; } ::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--btn); } ::-webkit-scrollbar-thumb:hover { background:var(--accent); }
.num { font-variant-numeric:tabular-nums; }

.top { height:52px; display:flex; align-items:center; gap:16px; padding:0 16px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:6px; } .brand b { font-size:17px; margin-right:8px; }
.bar { width:34px; height:3px; background:var(--accent); } .bar.dim { width:8px; background:var(--btn); }
.grow { flex:1; }
.badge { border:1px solid var(--warn); color:var(--warn); font-size:12px; padding:1px 8px; }

body { display:flex; flex-direction:column; } .top, .foot { flex:none; }
.layout { display:flex; flex:1; min-height:0; }
.foot { height:24px; display:flex; align-items:center; gap:12px; padding:0 16px; border-top:1px solid var(--line); color:var(--dim); font-size:11px; white-space:nowrap; overflow:hidden; } .foot .copy { color:var(--muted); } .foot .fan { overflow:hidden; text-overflow:ellipsis; }
@media (max-width:760px) { .foot { height:auto; flex-direction:column; align-items:flex-start; gap:1px; padding:4px 10px; white-space:normal; font-size:10px; line-height:1.4; } .foot .fan { overflow:visible; } }
#map { flex:1; background:#05070a; }
.side { width:360px; border-left:1px solid var(--line); display:flex; flex-direction:column; min-height:0; }
.tabs { display:flex; border-bottom:1px solid var(--line); }
.tabs button { flex:1; background:none; border:0; border-bottom:2px solid transparent; padding:10px 0; color:var(--muted); cursor:pointer; }
.tabs button.on { color:var(--text); border-bottom-color:var(--accent); }
.pane { flex:1; overflow:auto; padding:14px; }
.brand b, .seg button { white-space:nowrap; }
@media (max-width: 760px) { .brand .bar { display:none; } .brand b { font-size:15px; margin-right:0; } .top { gap:10px; padding:0 10px; } .seg button { padding:4px 8px; } }
@media (max-width: 760px) { .layout { flex-direction:column; } .side { width:auto; height:46%; border-left:0; border-top:1px solid var(--line); } }

/* 버튼: 왼쪽 위·오른쪽 아래 깎음 */
.btn { --c:var(--btn); position:relative; background:var(--field); border:1px solid var(--c); padding:5px 12px; cursor:pointer;
  clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px); }
.btn:hover { --c:var(--accent); background:var(--field-h); }
.btn.main { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.ok { --c:var(--ok); color:var(--ok); } .btn.bad { --c:var(--bad); color:var(--bad); }
.btn.ok.on { background:var(--ok); color:#000; } .btn.bad.on { background:var(--bad); color:#000; }
.btn.sm { padding:2px 9px; font-size:12.5px; }
.btn[disabled] { opacity:.4; cursor:default; }
.seg { display:flex; } .seg button { background:var(--field); border:1px solid var(--btn); margin-left:-1px; padding:4px 12px; cursor:pointer; color:var(--muted); }
.seg button.on { color:var(--text); border-color:var(--accent); position:relative; z-index:1; }

.card { position:relative; border:1px solid var(--line); background:var(--card); padding:12px; margin-bottom:12px; }
.card::before { content:""; position:absolute; left:-1px; top:-1px; width:3px; height:40px; background:var(--accent); }
.card h3 { margin:0 0 10px; font-size:12.5px; color:var(--muted); font-weight:700; display:flex; align-items:center; gap:7px; }
.card h3::before { content:""; width:6px; height:6px; background:var(--accent); }
.row { display:flex; align-items:center; gap:8px; margin:6px 0; flex-wrap:wrap; }
.lab { color:var(--muted); font-size:12.5px; min-width:70px; }
.note { color:var(--dim); font-size:12px; margin-top:6px; }
.toggle { display:inline-flex; border:1px solid var(--btn); cursor:pointer; user-select:none; font-size:12px; }
.toggle span { padding:1px 8px; color:var(--dim); } .toggle.on span.y, .toggle:not(.on) span.n { background:var(--field-h); color:var(--text); }
.toggle.on span.y { background:var(--accent); color:#fff; }
input[type=range] { accent-color:var(--accent); flex:1; }
input.text, select.text { background:var(--field); border:0; border-bottom:1px solid var(--btn); padding:4px 6px; width:100%; outline:0; }
select.text option { background:var(--card); color:var(--text); }
input.text:focus, select.text:focus { border-bottom:2px solid var(--accent); }

/* 범례 */
.legend { display:grid; grid-template-columns:auto 1fr auto; gap:6px 10px; align-items:center; }
.legend .cnt { color:var(--muted); font-size:12px; }

/* 마커 */
.egg-ico { background:none; border:0; }
.egg-ico svg { display:block; overflow:visible; filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.8)); }
/* 오늘 방문한 곳: 반투명 */
.egg-ico.dim svg { opacity:.35; }
/* 사진 없는 알 (로컬 편집) */
.egg-ico svg.noshot { position:absolute; left:50%; top:-5px; transform:translateX(-50%); filter:none; pointer-events:none; opacity:1; }
/* 먹은 뒤 지난 시간 */
.egg-ico .since { position:absolute; left:50%; bottom:100%; transform:translateX(-50%); margin-bottom:6px; padding:0 4px; background:rgba(0,0,0,.82); border:1px solid var(--ok); color:var(--ok); font:700 11px/15px "Malgun Gothic",sans-serif; font-variant-numeric:tabular-nums; white-space:nowrap; pointer-events:none; }
.egg-ico.dim .since { opacity:.75; }
.egg-ico.sel svg { filter:drop-shadow(0 0 4px var(--accent)); }
.me-ico { background:none; border:0; }
.leaflet-container { background:#05070a; font:inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background:var(--card); color:var(--text); border:1px solid var(--accent); border-radius:0; box-shadow:none; }
.leaflet-popup-content { margin:12px; min-width:220px; }
.leaflet-container a.leaflet-popup-close-button { color:var(--muted); }
.leaflet-bar a.game-scale { font-size:11px; font-weight:700; width:30px; }
.leaflet-bar a { background:var(--card); color:var(--text); border-color:var(--line); border-radius:0 !important; }

/* 핀 팝업 배치: 폭 300 고정, 이름칸 58px + 나머지, 줄바꿈 없음 */
.pin-pop .row { flex-wrap:nowrap; gap:6px; margin:7px 0; }
.pin-pop .row > .lab { flex:0 0 58px; min-width:0; white-space:nowrap; }
.pin-pop .row .note { white-space:nowrap; }
.pin-pop .btn, .pin-pop .seg button { font-size:12.5px; white-space:nowrap; padding:3px 9px; }
.pin-pop .seg { flex:1; } .pin-pop .seg button { flex:1; }
.pin-pop .row.half .btn { flex:1; }
.pin-pop .row.foot { margin-top:9px; } .pin-pop .row.foot .del { margin-left:auto; }
/* 핀 팝업: 메모 한 줄 + 스크린샷 */
.leaflet-popup-content .memo { color:var(--muted); font-size:12.5px; margin-top:3px; overflow-wrap:anywhere; }
.leaflet-popup-content .shot { display:block; width:100%; height:169px; object-fit:cover; background:var(--field); margin-top:8px; border:1px solid var(--line); cursor:zoom-in; }
.lightbox { position:fixed; inset:0; z-index:2000; background:rgba(0,0,0,.82); backdrop-filter:blur(3px); display:flex; align-items:center; justify-content:center; cursor:zoom-out; padding:24px; }
.lightbox img { max-width:100%; max-height:100%; border:1px solid var(--accent); }

/* 기록 */
.vlist { display:flex; flex-direction:column; }
.v { display:grid; grid-template-columns:44px 1fr auto; gap:8px; align-items:center; padding:6px 0; border-bottom:1px solid var(--line); }
.v .t { color:var(--muted); font-size:12px; }
.v .p { cursor:pointer; } .v .p:hover { color:var(--accent); }
.v .p small { color:var(--dim); margin-left:4px; }
.res { display:flex; gap:4px; }
.res button { background:var(--field); border:1px solid var(--btn); font-size:12px; padding:1px 7px; cursor:pointer; color:var(--muted); }
.res button.on.ate { border-color:var(--ok); color:var(--ok); } .res button.on.none { border-color:var(--bad); color:var(--bad); }
.day { color:var(--muted); font-size:12px; margin:12px 0 2px; font-weight:700; }
.dayh { display:flex; align-items:center; gap:8px; width:100%; margin-top:8px; padding:6px 8px; background:var(--field); border:1px solid transparent; color:var(--text); text-align:left; cursor:pointer; } .dayh:hover { background:var(--field-h); } .dayh.on { border-color:var(--btn); } .dayh i { font-style:normal; width:12px; color:var(--accent); font-weight:700; } .dayh b { font-size:13px; } .dayh span { margin-left:auto; color:var(--muted); font-size:12px; }
.ds { padding:8px 0; border-bottom:1px solid var(--line); } .ds-t { width:100%; border-collapse:collapse; margin-bottom:6px; font-size:13px; } .ds-t th, .ds-t td { padding:3px 4px; text-align:right; border-bottom:1px solid var(--line); font-weight:400; } .ds-t thead th { color:var(--muted); font-size:11.5px; } .ds-t th:first-child { text-align:left; color:var(--muted); } .ds-t td.ate { color:var(--ok); font-weight:700; } .ds-t td.none { color:var(--bad); } .ds-t .base th { color:#F5F5F5; } .ds-t .breed th { color:#F472B6; } .ds-t .sum td, .ds-t .sum th { border-bottom:0; color:var(--muted); font-weight:400; }
.ds-l { display:flex; gap:10px; font-size:12.5px; padding:2px 0; } .ds-l span:first-child { flex:0 0 62px; color:var(--muted); } .ds-l span + span { overflow-wrap:anywhere; }
.dbar { grid-column:1 / -1; display:flex; height:7px; background:var(--field); } .dbar i { display:block; height:100%; } .dline { grid-column:1 / -1; display:grid; grid-template-columns:30px 1fr 78px; gap:8px; align-items:center; } .dline small { color:var(--muted); font-size:12px; white-space:nowrap; } .dline small:last-child { text-align:right; } .dline .dbar { grid-column:auto; }
.dstat + .ds { padding-top:8px; }
.stat { display:grid; grid-template-columns:1fr auto; gap:2px 8px; padding:7px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.stat:hover b { color:var(--accent); }
.stat .sub { color:var(--muted); font-size:12px; }
.rate { height:3px; background:var(--line); grid-column:1 / -1; } .rate i { display:block; height:100%; background:var(--ok); }
.sq { display:inline-block; width:7px; height:7px; margin-right:5px; vertical-align:1px; }

/* 추적 */
.preview { position:relative; width:100%; background:#05070a; border:1px solid var(--line); }
.preview canvas { display:block; width:100%; }
.status { display:flex; align-items:center; gap:8px; font-size:13px; }

.crop { display:block; height:22px; margin:3px 0; }
/* 도착 알림 */
.arrive .arow + .arow { border-top:1px solid var(--line); margin-top:10px; padding-top:10px; }
.arrive { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); background:var(--card); border:1px solid var(--accent); padding:12px 14px; z-index:1200; min-width:320px; }
.arrive b { display:block; margin-bottom:8px; }
.arrive .row { justify-content:flex-end; }

/* 지도 오른쪽 클릭 메뉴 */
.ctx-menu { position:fixed; z-index:1500; min-width:190px; background:var(--card); border:1px solid var(--accent); padding:4px 0; box-shadow:0 6px 18px rgba(0,0,0,.6); }
.ctx-menu .ctx-head { color:var(--dim); font-size:11.5px; padding:3px 12px 5px; border-bottom:1px solid var(--line); margin-bottom:3px; }
.ctx-menu button { display:flex; justify-content:space-between; gap:10px; width:100%; background:none; border:0; text-align:left; padding:6px 12px; cursor:pointer; color:var(--text); }
.ctx-menu button:hover { background:var(--field-h); color:var(--accent); }

/* 알 도감 (지도 위를 덮는 화면: 위치 추적은 뒤에서 계속 돈다) */
.dexbtn { white-space:nowrap; } .dexbtn.on { --c:var(--accent); color:var(--accent); }
#dex { position:fixed; left:0; right:0; top:52px; bottom:0; z-index:1100; background:var(--bg); display:flex; }
#dex[hidden] { display:none; }
.dx-left { width:320px; border-right:1px solid var(--line); display:flex; flex-direction:column; min-height:0; flex:none; }
.dx-find { padding:14px; border-bottom:1px solid var(--line); }
.dx-kinds { display:flex; flex-wrap:wrap; gap:2px 12px; margin-top:8px; } .dx-kinds button { background:none; border:0; border-bottom:2px solid transparent; padding:2px 0; color:var(--muted); cursor:pointer; font-size:13px; }
.dx-kinds button.on { color:var(--text); border-bottom-color:var(--accent); }
.dx-list { overflow:auto; flex:1; padding-bottom:20px; }
.dx-k { color:var(--muted); font-size:12px; font-weight:700; padding:14px 14px 4px; } .dx-k small { color:var(--dim); margin-left:6px; font-weight:400; }
.dx-i { display:flex; align-items:center; gap:10px; width:100%; background:none; border:0; border-left:3px solid; padding:5px 12px; text-align:left; cursor:pointer; }
.dx-i + .dx-i { margin-top:1px; } .dx-i:hover { background:var(--field); } .dx-i.on { background:var(--field-h); }
.dx-i img, .dx-head img, .dx-shapes img { object-fit:contain; flex:none; }
.noegg { display:inline-flex; align-items:center; justify-content:center; background:var(--field); color:var(--dim); flex:none; }
.dx-detail { flex:1; overflow:auto; min-width:0; } .dx-in { max-width:820px; padding:24px 28px 60px; }
.dx-head { display:flex; gap:20px; align-items:center; } .dx-head h2 { margin:0 0 6px; font-size:24px; }
.tag { border:1px solid var(--btn); color:var(--muted); font-size:12px; padding:0 8px; } .tag.star { border-color:var(--sky); color:var(--sky); } .tag.pity { border-color:var(--warn); color:var(--warn); }
.dx-pity { font-size:13px; color:var(--warn); }
.dx-in h3 { font-size:15px; margin:28px 0 10px; padding-bottom:6px; border-bottom:1px solid var(--line); } .dx-in h3 small { color:var(--muted); font-weight:400; font-size:12px; margin-left:8px; }
.dx-drops .d { display:flex; align-items:center; gap:14px; padding:4px 0; } .dx-drops .n { width:210px; flex:none; } .dx-drops .n small { color:var(--warn); margin-left:7px; font-size:11.5px; } .dx-drops .n small.p { color:var(--accent); }
.dx-drops .b { flex:1; height:6px; background:var(--field); min-width:40px; } .dx-drops .b i { display:block; height:100%; background:var(--accent); }
.dx-drops .pv { width:74px; text-align:right; flex:none; } .dx-drops .hd { color:var(--dim); font-size:12px; } .dx-drops .hd span:nth-child(1) { width:210px; flex:none; } .dx-drops .hd span:nth-child(2) { flex:1; min-width:40px; }
.dx-sp .s { display:grid; grid-template-columns:minmax(110px,1.5fr) repeat(5,1fr); padding:3px 0; font-size:13px; } .dx-sp .s span:not(:first-child) { text-align:right; } .dx-sp .hd { color:var(--muted); font-size:12px; } .dx-sp .no { color:var(--dim); }
.dx-say { color:var(--sky); }
.dx-split { margin:0 0 16px; } .dx-split .t { font-size:13px; color:var(--muted); margin-bottom:5px; } .bar2 { display:flex; height:8px; gap:1px; background:var(--bg); } .bar2 i { display:block; min-width:2px; }
.leg { display:flex; flex-wrap:wrap; gap:3px 18px; margin-top:6px; font-size:13px; } .leg b { display:inline-block; width:8px; height:8px; margin-right:6px; } .leg em { font-style:normal; color:var(--muted); font-variant-numeric:tabular-nums; }
.dx-echo { display:flex; flex-wrap:wrap; gap:4px 22px; font-size:13px; } .dx-echo b { color:var(--muted); font-weight:400; }
.dx-edit { margin-top:16px; border:1px solid var(--line); padding:6px 12px; } .dx-shapes { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; max-height:260px; overflow:auto; }
.dx-shapes button { width:78px; background:var(--field); border:1px solid transparent; padding:6px 2px 4px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:12px; color:var(--muted); } .dx-shapes button:hover { background:var(--field-h); } .dx-shapes button.on { border-color:var(--accent); color:var(--text); }
.dx-shapes .noegg { width:48px; height:48px; } .dx-shapes img { width:66px; height:66px; margin:-9px; }
.dx-in a { color:var(--accent); }
@media (max-width:760px) { #dex { flex-direction:column; } .dx-left { width:auto; height:42%; border-right:0; border-bottom:1px solid var(--line); } .dx-in { padding:16px 14px 40px; } .dx-drops .n, .dx-drops .hd span:nth-child(1) { width:130px; } .dx-drops .pv { width:58px; } .dx-sp .s { font-size:11.5px; grid-template-columns:minmax(76px,1.3fr) repeat(5,1fr); } .dx-sp .hd { font-size:11px; } .dx-head img { width:99px !important; height:99px !important; margin:-13px !important; } .dx-head h2 { font-size:19px; } }

/* 도착 범위 안에서 차오르는 원 (위에서 시작해 시계 방향) */
.charge { overflow:visible; pointer-events:none; }
.charge circle:not(.glow) { fill:none; } .charge .glow { animation:cglow var(--dw) linear var(--gone) both; }
.charge .shade { stroke:rgba(0,0,0,.5); stroke-width:5; } .charge .track { stroke:rgba(255,255,255,.28); stroke-width:1; }
.charge .arc { stroke:#EAF2FF; stroke-width:2.5; stroke-dasharray:var(--len) var(--len); filter:drop-shadow(0 0 3px var(--accent)) drop-shadow(0 0 6px var(--accent)); animation:carc var(--dw) linear var(--gone) both; }
.charge .head { animation:chead var(--dw) linear var(--gone) both; } .charge .head path { fill:#fff; stroke:var(--accent); stroke-width:1.5; filter:drop-shadow(0 0 4px var(--accent)); }
.charge .wave { opacity:0; stroke:var(--accent); stroke-width:2; }
@keyframes carc { from { stroke-dashoffset:var(--len); } to { stroke-dashoffset:0; } }
@keyframes chead { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes cglow { from { opacity:.15; } to { opacity:1; } }
/* 다 차면 파랑으로 바뀌며 바깥으로 한 번 퍼진다 */
.charge.done .head, .charge.done .shade, .charge.done .track { display:none; }
.charge.done .arc { stroke:var(--accent); filter:drop-shadow(0 0 4px var(--accent)); stroke-dasharray:none; animation:cfade .9s ease-out both; }
.charge.done .glow { animation:cfade .6s ease-out both; } .charge.done .wave { animation:cwave .9s cubic-bezier(.1,.7,.3,1) both; }
@keyframes cfade { from { opacity:1; } to { opacity:0; } }
@keyframes cwave { from { opacity:.9; transform:scale(1); } to { opacity:0; transform:scale(1.35); } }

/* 가까운 알 미리보기 */
.leaflet-tooltip.near-tip { background:var(--card); border:1px solid var(--accent); border-radius:0; color:var(--text); padding:6px; white-space:normal; box-shadow:0 4px 14px rgba(0,0,0,.6); font:13px/1.45 "Malgun Gothic","맑은 고딕",system-ui,sans-serif; }
.near-tip.leaflet-tooltip-top::before { border-top-color:var(--accent); } .near-tip.leaflet-tooltip-bottom::before { border-bottom-color:var(--accent); }
.near-tip .memo { color:var(--muted); font-size:12.5px; overflow-wrap:anywhere; } .near-tip img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; background:var(--field); margin-top:5px; }

/* 텔레포트 핀 · 파밍 루트 */
.tp-ico { background:none; border:0; } .tp-ico svg { display:block; filter:drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.route-n { color:#fff; font:700 11px/14px "Malgun Gothic",sans-serif; text-align:center; } .route-n span { display:block; background:#000; border:1px solid var(--accent); } .route-n.next span { background:var(--accent); }
.route-hud { position:absolute; top:10px; right:10px; z-index:800; background:var(--card); border:1px solid var(--accent); padding:9px 12px; width:230px; font-size:13px; cursor:default; } .route-hud[hidden] { display:none; }
.route-hud .h { color:var(--muted); font-size:12px; } .route-hud .w, .rlist .tpgo { color:#FB923C; font-weight:700; } .route-hud .e { font-weight:700; cursor:pointer; } .route-hud .m { color:var(--muted); overflow-wrap:anywhere; } .route-hud .row { margin:6px 0 0; }
.rlist .tpgo { margin-top:10px; padding:3px 0; border-bottom:1px solid var(--line); font-size:13px; cursor:pointer; } .rlist .tpgo small { color:var(--muted); font-weight:400; margin-left:4px; }
.rlist .st { display:grid; grid-template-columns:28px 1fr auto; align-items:center; padding:4px 0 4px 6px; border-left:2px solid transparent; } .rlist .st.next { border-left-color:var(--accent); background:var(--field); } .rlist .i { color:var(--muted); }
.rlist .p { cursor:pointer; } .rlist .p:hover, .tprow:hover { color:var(--accent); } .rlist small { color:var(--dim); margin-left:6px; } .rlist .done { opacity:.4; }
.rlist button { background:none; border:1px solid var(--btn); color:var(--muted); font-size:12px; padding:0 7px; cursor:pointer; }
.tprow { padding:4px 0; border-top:1px solid var(--line); cursor:pointer; }

/* 내 위치에 핀 찍기 */
.here-bar { position:absolute; left:10px; bottom:10px; z-index:800; display:flex; align-items:center; flex-wrap:wrap; gap:6px; background:var(--card); border:1px solid var(--line); padding:6px 10px; font-size:12.5px; cursor:default; } .here-bar .l { color:var(--muted); } .here-bar .m { color:var(--warn); }

/* 지도 위에 떠 있는 것 모두 같은 틀: 검정 판 + 1px 선 + 바깥 어두운 테두리 */
#map .leaflet-bar, .here-bar, .route-hud { background:var(--card); border:1px solid var(--btn); border-radius:0; box-shadow:0 0 0 2px rgba(0,0,0,.45); background-clip:border-box; }
#map .leaflet-bar a { width:32px; height:32px; line-height:32px; background:var(--card); color:var(--text); border:0; border-bottom:1px solid var(--btn); font-family:"Malgun Gothic","맑은 고딕",system-ui,sans-serif; }
#map .leaflet-bar a:last-child { border-bottom:0; } #map .leaflet-bar a:hover { background:var(--field-h); color:var(--accent); } #map .leaflet-bar a.leaflet-disabled { color:var(--dim); }
#map .leaflet-bar a span { font-weight:400; } #map .leaflet-bar a.game-scale { width:32px; }
#map .leaflet-top .leaflet-control { margin-top:12px; } #map .leaflet-left .leaflet-control { margin-left:12px; }
.here-bar { left:12px; bottom:12px; } .route-hud { top:12px; right:12px; }
.leg-pop { position:absolute; top:12px; right:12px; z-index:800; width:230px; padding:9px 12px 11px; background:var(--card); border:1px solid var(--accent); box-shadow:0 0 0 2px rgba(0,0,0,.45); font-size:13px; cursor:default; } .leg-pop[hidden] { display:none; }
.leg-pop .lp-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; } .leg-pop .lp-top small { display:block; color:var(--muted); font-size:12px; } .leg-pop .x { background:none; border:0; color:var(--muted); font-size:18px; line-height:1; padding:2px 4px; cursor:pointer; } .leg-pop .x:hover { color:var(--text); }
.leg-pop .mini { height:150px; margin:7px 0 6px; background:#000; border:1px solid var(--line); cursor:default; } .leg-pop .foot { color:var(--muted); font-size:12.5px; margin-bottom:7px; }
.route-hud::before { content:""; position:absolute; left:-1px; top:-1px; width:3px; height:30px; background:var(--accent); }

/* 상단: 오늘 방문 수 */
.today { display:flex; gap:22px; white-space:nowrap; font-size:13px; } .today .rg { display:flex; align-items:center; gap:12px; opacity:.55; } .today .rg.on { opacity:1; }
.today .l { color:var(--muted); font-size:12.5px; } .today .rg.on .l { color:var(--text); }
.today .k { position:relative; color:var(--muted); line-height:18px; padding-bottom:4px; } .today .k b { color:var(--text); margin:0 4px 0 6px; }
.today .k::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background:var(--line); } .today .k i { position:absolute; z-index:1; left:0; bottom:0; height:2px; background:var(--accent); } .today .k.breed i { background:var(--breed); }
.today .k.full b { color:var(--accent); } .today .k.breed.full b { color:var(--breed); }
@media (max-width:1180px) { .today .rg:not(.on) { display:none; } } @media (max-width:1180px) { .today .l, .brand .bar { display:none; } } @media (max-width:760px) { .top { overflow-x:auto; } }

/* 상단 버튼: 지역 버튼과 같은 높이 */
.top .seg button, .top .btn { height:34px; padding-top:0; padding-bottom:0; font-size:14px; } .top .btn { padding-left:16px; padding-right:16px; white-space:nowrap; flex:none; }
.top .badge { white-space:nowrap; }

/* 알 도감: 지도 위 팝업 */
#dex { top:0; padding:40px; background:rgba(0,0,0,.72); backdrop-filter:blur(3px); align-items:center; justify-content:center; flex-direction:row; }
.dx-box { width:min(1180px,100%); height:100%; display:flex; flex-direction:column; min-height:0; background:var(--bg); border:1px solid var(--accent); box-shadow:0 12px 40px rgba(0,0,0,.7); animation:dxin .14s ease-out; }
@keyframes dxin { from { transform:translateY(8px); opacity:0; } }
.dx-top { display:flex; align-items:center; justify-content:space-between; flex:none; height:48px; padding-left:16px; border-bottom:1px solid var(--line); background:var(--card); } .dx-top b { font-size:16px; }
.dx-x { width:48px; height:47px; background:none; border:0; border-left:1px solid var(--line); color:var(--muted); font-size:24px; line-height:1; cursor:pointer; } .dx-x:hover { background:var(--field-h); color:var(--text); }
.dx-body { flex:1; display:flex; min-height:0; }
@media (max-width:760px) { #dex { padding:10px; } .dx-body { flex-direction:column; } }

/* 루트 중 텔레포트 이름 */
.tp-name { background:none; border:0; } .tp-name span { position:absolute; left:0; bottom:16px; transform:translateX(-50%); background:var(--card); border:1px solid #FB923C; color:#FB923C; padding:0 7px; font:700 12px/18px "Malgun Gothic","맑은 고딕",system-ui,sans-serif; white-space:nowrap; box-shadow:0 0 0 2px rgba(0,0,0,.45); }
.leg-ring { background:none; border:0; } .leg-ring i { position:absolute; left:-27px; top:-27px; width:54px; height:54px; box-sizing:border-box; border:3px solid; border-radius:50%; animation:legring 1.4s ease-out infinite; } @keyframes legring { from { transform:scale(.45); opacity:1; } to { transform:scale(1.25); opacity:0; } } @media (prefers-reduced-motion:reduce) { .leg-ring i { animation:none; } }
.tp-name.next span { background:#fff; color:#000; }

/* 변종 확인 지점 */
.wp-ico { background:var(--card); border:1px solid #B98CFF; color:#D9C2FF; font:700 11px/18px "Malgun Gothic",sans-serif; text-align:center; box-shadow:0 0 0 2px rgba(0,0,0,.45); }
.wp-ico.next { background:#B98CFF; color:#000; } .wp-ico.done { opacity:.35; }

.pin-pop .shapes { display:flex; flex-wrap:wrap; gap:4px; flex:1; } .pin-pop .shapes button { width:34px; height:34px; padding:2px; background:var(--field); border:1px solid transparent; cursor:pointer; } .pin-pop .shapes button:hover { background:var(--field-h); } .pin-pop .shapes button.on { border-color:var(--accent); } .pin-pop .shapes img { display:block; width:40px; height:40px; margin:-6px; object-fit:contain; }
.top .dexbtn { --c:var(--accent); }
.row.steps { gap:4px; } .row.steps .btn { flex:1; padding:2px 0; }
.route-arr { background:none; border:0; } .route-arr svg { display:block; }

/* 사용법 안내 창 */
.gd { position:fixed; inset:0; z-index:1600; background:rgba(0,0,0,.62); display:flex; align-items:center; justify-content:center; padding:16px; }
.gd-box { width:440px; max-width:100%; background:var(--card); border:1px solid var(--accent); padding:16px 18px 14px; }
.gd-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.gd-n { color:var(--accent); font-size:12px; font-weight:700; letter-spacing:.5px; }
.gd-x { background:none; border:0; color:var(--muted); font-size:20px; line-height:1; cursor:pointer; padding:0 2px; } .gd-x:hover { color:var(--text); }
.gd h2 { margin:0 0 10px; font-size:17px; }
.gd ul { margin:0; padding:0; list-style:none; }
.gd li { position:relative; padding-left:14px; margin-bottom:7px; color:#C9C9D2; line-height:1.55; }
.gd li::before { content:""; position:absolute; left:0; top:.62em; width:5px; height:5px; background:var(--accent); }
.gd-bars { display:flex; gap:4px; margin:14px 0 12px; } .gd-bars i { flex:1; height:3px; background:var(--btn); cursor:pointer; } .gd-bars i.done { background:#2a4f86; } .gd-bars i.on { background:var(--accent); }
.gd-foot { display:flex; align-items:center; gap:8px; }
