/* Our Places: a full-screen map with a floating header and a bottom sheet. */

html, body { height: 100%; overflow: hidden; }

#map { position: fixed; inset: 0; z-index: 0; background: #f3ece6; }
/* Warm the plain OSM tiles to match the paper look. */
.leaflet-tile-pane { filter: sepia(0.28) saturate(0.85) hue-rotate(-12deg) brightness(1.04); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255, 247, 242, 0.7) !important; }

.overlay-top {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.overlay-top > * { pointer-events: auto; }
.brand {
  background: rgba(255, 253, 251, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 6px 16px 8px;
  box-shadow: var(--shadow);
}
.brand h1 { font-size: 34px; }
.count { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.list-button { background: rgba(255, 253, 251, 0.92); backdrop-filter: blur(8px); }

.banner-slot {
  position: fixed;
  top: calc(86px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 500;
  max-width: 520px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.banner-slot .banner { margin: 0; background: rgba(255, 253, 251, 0.95); }
.banner-slot:empty { display: none; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 500;
  font-size: 17px;
  padding: 14px 22px;
}
.adding .fab { display: none; }

/* ---------- Pins ---------- */

.pin { background: none; border: 0; }
.pin svg { width: 40px; height: 52px; filter: drop-shadow(0 4px 6px rgba(120, 30, 60, 0.35)); transition: transform 0.2s; transform-origin: bottom center; }
.pin.active svg { transform: scale(1.3); }
.pin.active svg path:first-child { fill: var(--rose); }
.pin.active svg path:last-child { fill: #fff; }

/* ---------- Sheet ---------- */

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  max-width: 560px;
  margin: 0 auto;
  max-height: 72dvh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  padding: 8px 18px calc(20px + var(--safe-bottom));
  box-shadow: 0 -10px 40px -12px rgba(120, 30, 60, 0.35);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.hidden { transform: translateY(110%); }
.grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet h2 { color: var(--rose-deep); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet .photo { width: 100%; max-height: 30dvh; object-fit: cover; border-radius: 18px; margin: 12px 0 4px; }
.sheet .meta { color: var(--ink-soft); font-weight: 800; font-size: 13px; margin: 8px 0; }
.sheet .note { font-family: var(--hand); font-size: 26px; line-height: 1.15; margin: 6px 0 12px; white-space: pre-wrap; }
.row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.row.left { justify-content: flex-start; margin-top: 4px; }
.small-hint { margin: 2px 0 0; font-size: 13px; }

.search { margin: 10px 0 0; }
.file { display: none; }
.preview img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; }
.place-form input[type='date'] { appearance: none; min-height: 48px; }

.list { display: grid; gap: 8px; margin-top: 10px; }
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  border-radius: 16px;
  padding: 8px;
  text-align: left;
  justify-content: flex-start;
  font-weight: 600;
}
.list-item img, .list-item .thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; flex: none; }
.list-item .thumb { display: grid; place-items: center; background: var(--rose-soft); font-size: 24px; }
.list-item b { display: block; font-size: 16px; }
.list-item small { color: var(--ink-soft); font-weight: 700; }
