/* ---------- token ---------- */
:root {
  --bg: #f6f0e6; --surface: #fffcf7; --surface-2: #f1e9dc; --line: #e6dccb;
  --ink: #2b1f18; --ink-2: #5d4f43; --muted: #8a7b6d;
  --accent: #b8612f; --accent-ink: #fff; --accent-soft: #f6e3d4;
  --open: #3f7a3a; --open-soft: #e2efdc; --closed: #a5463a; --closed-soft: #f6e1dc;
  --shadow: 0 1px 2px #3a271a14, 0 6px 20px #3a271a12;
  --shadow-lg: 0 10px 40px #2b1f1826;
  --r: 18px; --r-sm: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16110e; --surface: #201915; --surface-2: #2a211c; --line: #3a2f28;
    --ink: #f4ebe1; --ink-2: #cdbfb2; --muted: #9c8d80;
    --accent: #e08a52; --accent-ink: #1b120c; --accent-soft: #3b271b;
    --open: #8fcf83; --open-soft: #22331f; --closed: #f09a8b; --closed-soft: #3a211d;
    --shadow: 0 1px 2px #0006, 0 6px 20px #0005; --shadow-lg: 0 10px 40px #0008;
    color-scheme: dark;
  }
  .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); }
}

/* ---------- dasar ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px;
  display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 16px;
  cursor: pointer; white-space: nowrap; font-weight: 600; transition: background .15s, border-color .15s, transform .1s;
  text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.lg { padding: 13px 22px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 14px; padding: 12px 22px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: relative; z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font: 700 21px var(--serif); letter-spacing: -.5px; }
.brand-name span { color: var(--accent); }
.search {
  display: flex; align-items: center; flex: 0 1 460px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow); transition: border-color .15s;
}
.search:focus-within { border-color: var(--accent); }
.search-ico { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 10px; outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search-btn { border: 0; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; }

/* ---------- layout ---------- */
.layout { flex: 1; display: grid; grid-template-columns: minmax(360px, 440px) 1fr; min-height: 0; position: relative; }
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-right: 1px solid var(--line); position: relative; }
.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--surface-2); }

/* ---------- halaman awal ---------- */
.welcome { padding: 44px 32px; overflow-y: auto; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 2px; font-size: 11px; text-transform: uppercase; margin: 0 0 14px; }
.welcome h1 { font: 500 clamp(36px, 4.2vw, 48px)/1.05 var(--serif); letter-spacing: -1.5px; margin: 0 0 14px; }
.welcome h1 em { color: var(--accent); }
.lede { color: var(--ink-2); line-height: 1.65; margin: 0 0 26px; max-width: 36ch; }
.quick-label { margin: 34px 0 10px; font-size: 13px; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px;
}
.quick button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- toolbar & filter ---------- */
.results { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.seg span svg { width: 16px; height: 16px; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.select select { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px 10px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500; transition: .15s;
}
.pill svg { width: 15px; height: 15px; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--open); }
.pill input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); }
.status { margin: 0; padding: 4px 20px 8px; font-size: 13px; color: var(--muted); }
.status b { color: var(--ink); }
.status.err { color: var(--closed); }
.status .btn { padding: 4px 12px; font-size: 13px; margin-left: 6px; }

/* ---------- kartu ---------- */
.list { list-style: none; margin: 0; padding: 4px 14px 24px; overflow-y: auto; flex: 1; display: grid; gap: 12px; align-content: start; }
.card {
  display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 10px; background: var(--surface);
  border-radius: var(--r); box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid transparent;
  transition: border-color .15s, transform .15s; position: relative;
}
.card:hover { transform: translateY(-1px); border-color: var(--line); }
.card.active { border-color: var(--accent); }
.card .cover { height: 112px; border-radius: var(--r-sm); }
.card-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 2px 4px 2px 0; }
.card h3 { margin: 0; font: 600 17px/1.25 var(--serif); padding-right: 28px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.sub svg { width: 15px; height: 15px; color: var(--muted); }
.sub .sep { color: var(--line); }
.summary { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.status-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-tag.open { color: var(--open); }
.status-tag.closed { color: var(--closed); }
.icons { display: flex; gap: 4px; margin-top: auto; }
.icons span { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.icons svg { width: 15px; height: 15px; }
.fav-btn {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.fav-btn:hover { background: var(--surface-2); }
.fav-btn.on { color: var(--accent); }
.fav-btn.on svg { fill: currentColor; }

/* skeleton */
.skeleton .cover, .skeleton .bar { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton .bar { height: 12px; border-radius: 6px; }
.skeleton .bar.w60 { width: 60%; height: 16px; } .skeleton .bar.w40 { width: 40%; } .skeleton .bar.w80 { width: 80%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- sampul (foto atau ilustrasi) ---------- */
.cover { position: relative; overflow: hidden; display: grid; place-items: center; color: #fff9; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover > svg { width: 42%; height: 42%; stroke-width: 1.3; position: relative; }
.cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 15%, #ffffff26 0 18%, transparent 19%), radial-gradient(circle at 85% 90%, #00000022 0 22%, transparent 23%); }
.cover.has-photo::after { display: none; }
.c0 { background: linear-gradient(140deg, #c98b5e, #7a4a2e); }
.c1 { background: linear-gradient(140deg, #9aa57f, #56603f); }
.c2 { background: linear-gradient(140deg, #d6a77a, #9b5a36); }
.c3 { background: linear-gradient(140deg, #8c6a58, #3e2c23); }
.c4 { background: linear-gradient(140deg, #c8a07a, #6f5a3f); }
.c5 { background: linear-gradient(140deg, #b56f55, #6a3527); }
.c6 { background: linear-gradient(140deg, #a8b3a0, #5e6b5a); }
.c7 { background: linear-gradient(140deg, #d9b98f, #8a6440); }

/* ---------- detail ---------- */
.detail { position: absolute; inset: 0; background: var(--bg); overflow-y: auto; z-index: 5; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(-12px); opacity: 0; } }
.detail .hero { height: 220px; border-radius: 0; }
.detail .hero > svg { width: 22%; height: 40%; }
.detail-bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 2; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.round.on { color: var(--accent); } .round.on svg { fill: currentColor; }
.detail-body { padding: 20px 22px 28px; display: grid; gap: 18px; }
.detail h2 { font: 600 28px/1.15 var(--serif); letter-spacing: -.5px; margin: 0; }
.detail .sub { font-size: 14px; }
.detail .summary { -webkit-line-clamp: unset; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn { padding: 11px; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.facilities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.facilities div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: var(--r-sm); font-size: 14px; }
.facilities svg { color: var(--accent); }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: var(--r-sm); overflow: hidden; }
.hours td { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.hours tr:last-child td { border-bottom: 0; }
.hours td:last-child { text-align: right; color: var(--ink-2); }
.hours tr.today td { font-weight: 700; color: var(--ink); }
.raw-hours { font-size: 14px; background: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); margin: 0; color: var(--ink-2); }
.info-list { display: grid; gap: 2px; background: var(--surface); border-radius: var(--r-sm); overflow: hidden; }
.info-list a, .info-list div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; font-size: 14px; word-break: break-word; }
.info-list a:hover { background: var(--surface-2); }
.info-list svg { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- peta ---------- */
.pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center;
  background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 3px 10px #0004; transition: transform .15s;
}
.pin svg { transform: rotate(45deg); color: #fff; width: 17px; height: 17px; stroke-width: 2; }
.pin.makan { background: #6f7d5c; }
.pin.closed { filter: saturate(.35) brightness(.95); }
.pin.sel { transform: rotate(-45deg) scale(1.25); background: var(--ink); z-index: 1000; }
.pin.sel svg { color: var(--bg); }
.me { width: 18px; height: 18px; border-radius: 50%; background: #2f6fd6; border: 3px solid #fff; box-shadow: 0 0 0 8px #2f6fd633; }
.leaflet-popup-content-wrapper { border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 12px 14px; font: 14px var(--sans); }
.leaflet-popup-content b { font-family: var(--serif); font-size: 15px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* ---------- lain-lain ---------- */
.view-toggle {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 900; display: none;
  align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; background: var(--ink); color: var(--bg);
  font-weight: 600; box-shadow: var(--shadow-lg); cursor: pointer;
}
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 999px; font-size: 14px; transition: transform .25s, opacity .25s; z-index: 2000;
  pointer-events: none; opacity: 0;
}
.toast:empty { display: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--ink-2); }

/* ---------- HP ---------- */
@media (max-width: 820px) {
  .top { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .brand { margin-right: auto; }
  .search { order: 3; flex: 1 0 100%; }
  #locate span { display: none; }
  #locate { padding: 9px 12px; }
  .layout { grid-template-columns: 1fr; }
  .panel { border-right: 0; }
  .map-wrap { position: absolute; inset: 0; z-index: 1; visibility: hidden; }
  .layout[data-view="map"] .map-wrap { visibility: visible; z-index: 3; }
  .view-toggle { display: inline-flex; }
  .welcome { padding: 30px 20px; }
  .card { grid-template-columns: 96px 1fr; }
  .card .cover { height: 96px; }
  .foot { display: none; }
}

/* ---------- halaman teks (privasi) ---------- */
.prose { max-width: 680px; margin: 0 auto; padding: 48px 22px 64px; line-height: 1.7; }
.prose h1 { font: 500 42px/1.1 var(--serif); letter-spacing: -1px; margin: 6px 0 12px; }
.prose h2 { font: 600 20px var(--serif); margin: 32px 0 8px; }
.prose ul { padding-left: 20px; } .prose li { margin: 6px 0; color: var(--ink-2); }
.prose .eyebrow a { color: inherit; text-decoration: none; }
.privacy-note { font-size: 12px; color: var(--muted); margin: 14px 0 0; max-width: 40ch; }
.privacy-note a { color: var(--ink-2); }

/* ---------- aksesibilitas ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 3000; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
/* ---------- atribusi foto ---------- */
.credit {
  position: absolute; left: 6px; bottom: 6px; z-index: 2; font-size: 10px; line-height: 1; padding: 4px 6px;
  border-radius: 6px; background: #000a; color: #fff; text-decoration: none; max-width: calc(100% - 12px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .credit { font-size: 0; padding: 3px; } /* di kartu kecil: cukup ikon titik */
.card .credit::before { content: '© Mapillary'; font-size: 9px; }
.hero .credit { font-size: 11px; left: 12px; bottom: 12px; }