/* Variant A: full-screen map + bottom sheet (mobile) / side panel (desktop). */
body.full { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.mapview { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; }
.overlay-top { position: absolute; z-index: 10; top: 12px; left: 12px; right: 12px; display: grid; gap: 8px; pointer-events: none; max-width: 560px; }
.overlay-top > * { pointer-events: auto; }
.overlay-top .chip { box-shadow: var(--shadow); }
.fabs { position: absolute; z-index: 10; right: 12px; bottom: calc(var(--peek, 150px) + 16px); display: grid; gap: 10px; transition: bottom .25s; }
.fab { width: 50px; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.fab svg { width: 22px; height: 22px; }
.fab-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.fab[aria-busy="true"] svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.placing { position: absolute; z-index: 20; left: 50%; top: 14px; transform: translateX(-50%); background: var(--surface); border-radius: 14px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; width: max-content; max-width: calc(100% - 24px); font-weight: 600; font-size: 14px; }
.sheet {
  position: absolute; z-index: 15; left: 0; right: 0; bottom: 0; height: 92%; background: var(--surface);
  border-radius: 20px 20px 0 0; box-shadow: 0 -4px 30px rgb(0 0 0 / .18); display: flex; flex-direction: column;
  transform: translateY(calc(100% - var(--peek, 150px))); transition: transform .28s cubic-bezier(.2, .8, .2, 1); touch-action: none;
}
.sheet.dragging { transition: none; }
.sheet-handle { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; }
.sheet-handle i { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); overscroll-behavior: contain; touch-action: pan-y; }
.sheet-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-summary h2 { margin: 0; font-size: 19px; }
.progress-mini { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.progress-mini b { color: var(--visited); }
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.row-btn { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 2px; background: none; border: none; text-align: left; cursor: pointer; color: inherit; }
.row-btn:hover { background: var(--surface-2); }
.thumb { flex: none; width: 54px; height: 54px; border-radius: 11px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .kdot { width: 14px; height: 14px; border-radius: 50%; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-sub { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 4px 0 10px; }
.empty { text-align: center; padding: 26px 10px; color: var(--ink-2); }
@media (min-width: 900px) {
  .sheet { top: 12px; left: 12px; bottom: 12px; right: auto; width: 400px; height: auto; border-radius: 18px; transform: none !important; }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 16px; }
  .overlay-top { left: 424px; }
  .fabs { bottom: 24px; }
}
@media (max-width: 899px) { body.sheet-full .fabs, body.sheet-full .overlay-top { opacity: 0; pointer-events: none; } }
.fabs, .overlay-top { transition: opacity .2s, bottom .25s; }
