/* Halaman peta pemburu. Peta memenuhi layar di bawah navigasi; panel di kiri (desktop)
   atau lembar bawah (HP). Tinggi pakai dvh supaya tidak bergeser oleh bilah alamat HP. */

.map-page { overflow: hidden; height: 100dvh; }
.map-page .nav { background: rgba(7, 7, 7, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
#map { position: fixed; inset: var(--nav-h) 0 0 0; background: #070707; }
.maplibregl-ctrl-attrib { background: rgba(7, 7, 7, 0.7) !important; color: var(--ink-4) !important; font-size: 10.5px; }
.maplibregl-ctrl-attrib a { color: var(--ink-3) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

.map-ctrl { position: fixed; z-index: 20; right: 16px; top: calc(var(--nav-h) + 16px); display: grid; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: rgba(13, 13, 12, 0.88); backdrop-filter: blur(10px); }
.map-ctrl button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-2); font-size: 18px; cursor: pointer; }
.map-ctrl button + button { border-top: 1px solid var(--line); }
.map-ctrl button:hover { color: var(--ink); background: rgba(237, 234, 227, 0.05); }

/* ---------------- panel ---------------- */
.hunt {
  position: fixed; z-index: 30; left: 16px; top: calc(var(--nav-h) + 16px); bottom: 16px; width: 384px;
  display: flex; flex-direction: column;
  border: 1px solid var(--line-2); border-radius: 18px; background: rgba(10, 10, 9, 0.9); backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.hunt-handle { display: none; }
.hunt-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; overscroll-behavior: contain; }
.hunt-head { display: grid; gap: 10px; margin-bottom: 16px; }
.hunt-head .h3 { font-size: 24px; letter-spacing: -0.02em; }

.loc-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.loc-row b { display: block; font-weight: 500; font-size: 15px; }
.loc-row .small { display: block; margin-top: 3px; font-size: 12.5px; }
.loc-card.is-on b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.trail { margin-top: 12px; display: grid; gap: 6px; }
.trail .bar { height: 3px; }

.filter { margin: 16px 0 10px; display: grid; gap: 10px; }
.filter input { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; }
.filter input:focus { outline: none; border-color: rgba(237, 234, 227, 0.36); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.chip img { width: 20px; height: 20px; border-radius: 6px; }
.chip.all { padding-left: 11px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #0a0a0a; border-color: var(--ink); }

.bag-list { list-style: none; margin: 0; padding: 0; }
.bag-item { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.bag-item:hover { background: rgba(237, 234, 227, 0.03); }
.bag-item img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: var(--bg-3); }
.bag-item b { display: block; font-weight: 500; font-size: 14.5px; }
.bag-item .where { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bag-item .right { text-align: right; }
.bag-item .right b { font-family: var(--mono); font-size: 13px; }
.bag-item .right span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.bag-item.near .right b { color: var(--accent); }
.list-note { padding: 14px 4px; font-size: 13px; color: var(--ink-3); }

/* ---------------- detail ---------------- */
.back { margin-bottom: 14px; font-size: 14px; }
.bag-detail { display: grid; gap: 18px; }
.bd-top { display: flex; align-items: center; gap: 14px; }
.bd-top img { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; background: var(--bg-3); }
.bd-top b { display: block; font-weight: 500; font-size: 19px; letter-spacing: -0.01em; }
.bd-top span { font-size: 13px; color: var(--ink-3); }
.bd-amount { font-size: 34px; letter-spacing: -0.03em; line-height: 1.05; }
.bd-amount small { font-size: 15px; color: var(--ink-3); letter-spacing: 0; }
.bd-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.bd-facts > div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bd-facts dt { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.bd-facts dd { margin: 7px 0 0; font-size: 15px; }
.bd-where { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.claim-box { display: grid; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); }
.claim-box .btn { width: 100%; }
.claim-box p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.claim-box.ok { border-color: rgba(200, 227, 154, 0.4); }
.claim-box.err { border-color: rgba(255, 107, 91, 0.4); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.steps li i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-4); flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done i { border: 0; background: var(--accent); box-shadow: inset 0 0 0 4px var(--accent); }
.steps li.now { color: var(--ink); }
.steps li.now i { border-color: var(--accent); border-top-color: transparent; animation: putar 0.9s linear infinite; }
@keyframes putar { to { transform: rotate(360deg); } }
.fine { font-size: 12.5px; color: var(--ink-4); }

/* ---------------- penanda pengguna ---------------- */
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #edeae3; border: 3px solid #070707; box-shadow: 0 0 0 1px rgba(237, 234, 227, 0.5), 0 0 0 10px rgba(237, 234, 227, 0.08); }

/* ---------------- HP: lembar bawah ---------------- */
@media (max-width: 760px) {
  .map-ctrl { top: calc(var(--nav-h) + 12px); right: 12px; }
  .hunt { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 46dvh; border-radius: 18px 18px 0 0; border-bottom: 0; transition: height 0.35s cubic-bezier(0.16, 0.84, 0.28, 1); }
  .hunt.is-peek { height: 168px; }
  .hunt.is-full { height: calc(100dvh - var(--nav-h) - 24px); }
  .hunt-handle { display: block; width: 100%; height: 22px; border: 0; background: transparent; cursor: grab; flex: none; }
  .hunt-handle span { display: block; width: 40px; height: 4px; margin: 9px auto 0; border-radius: 4px; background: var(--ink-4); }
  .hunt-body { padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); }
  .hunt-head .h3 { font-size: 20px; }
}
