/* ─── CSS Variables ─── */
:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #334155;
  --surface: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.1);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #14b8a6;
  --accent2: #f59e0b;
  --accent3: #8b5cf6;
  --danger: #ef4444;
  --nav-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --r: 1.25rem;
  --r2: 2rem;
}
[data-theme="light"] {
  --bg: #f1f5f9;
  --bg2: #e2e8f0;
  --bg3: #cbd5e1;
  --surface: rgba(0,0,0,.04);
  --border: rgba(0,0,0,.08);
  --text: #0f172a;
  --muted: #64748b;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
img { display: block; max-width: 100% }
button { cursor: pointer; font-family: inherit; border: none; background: none }
a { color: inherit; text-decoration: none }
input, textarea { font-family: inherit }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; height: 4px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 99px }

/* ─── Layout ─── */
#app { min-height: 100dvh }
.page { display: none; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 1rem) }
.page.active { display: block; animation: fadeUp .35s ease }
@media (min-width: 1024px) {
  .page { padding-bottom: 2rem; padding-left: 280px }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px) }
  to   { opacity: 1; transform: translateY(0) }
}

/* ─── Glass ─── */
.glass {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ─── Bottom Nav (mobile) ─── */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  z-index: 100;
  padding-bottom: var(--safe-bottom);
  display: flex; align-items: center;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(15,23,42,.55);
  border-top: 1px solid rgba(255,255,255,.08);
}
[data-theme="light"] #bottom-nav {
  background: rgba(255,255,255,.65);
  border-top: 1px solid rgba(0,0,0,.08);
}
#bottom-nav nav { display: flex; width: 100%; justify-content: space-around; align-items: center }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 16px; border-radius: 16px;
  transition: all .2s; color: var(--muted); font-size: .65rem; font-weight: 600;
  position: relative;
}
.nav-item.active { color: var(--accent) }
.nav-item .icon { font-size: 1.4rem; transition: transform .2s }
.nav-item.active .icon { transform: scale(1.15) }
.nav-item .badge {
  position: absolute; top: 4px; right: 8px;
  background: var(--danger); color: #fff;
  font-size: .5rem; font-weight: 700; padding: 1px 4px; border-radius: 99px;
}
@media (min-width: 1024px) { #bottom-nav { display: none } }

/* ─── Sidebar Nav (desktop) ─── */
#sidebar {
  display: none; position: fixed; left: 0; top: 0; bottom: 0;
  width: 280px; z-index: 100; padding: 2rem 1.5rem;
  flex-direction: column; gap: 0.5rem;
  background: rgba(15,23,42,.95);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
@media (min-width: 1024px) { #sidebar { display: flex } }
.sidebar-logo { display: flex; align-items: center; gap: .75rem; font-size: 1.25rem; font-weight: 800; margin-bottom: 2rem }
.sidebar-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-radius: var(--r); font-weight: 600;
  color: var(--muted); transition: all .2s; cursor: pointer; font-size: .9rem;
}
.sidebar-item:hover { background: var(--surface); color: var(--text) }
.sidebar-item.active { background: rgba(20,184,166,.15); color: var(--accent) }
.sidebar-icon { font-size: 1.2rem; width: 1.5rem; text-align: center }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: .5rem }

/* ─── Header ─── */
.page-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(15,23,42,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
[data-theme="light"] .page-header {
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* ─── Category Page Grid ─── */
.cat-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  padding: .75rem 1.25rem 6rem;
}
@media (min-width: 480px) { .cat-page-grid { grid-template-columns: repeat(3,1fr) } }
@media (min-width: 720px) { .cat-page-grid { grid-template-columns: repeat(4,1fr) } }
@media (min-width: 1024px) { .cat-page-grid { grid-template-columns: repeat(5,1fr) } }
.cat-grid-card {
  border-radius: 18px; overflow: hidden; cursor: pointer;
  aspect-ratio: 3/4; position: relative;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.cat-grid-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.3) }
.cat-grid-img {
  width:100%; height:100%; object-fit:cover; display:block;
  background: var(--bg2);
}
.cat-grid-img-emoji {
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:3.5rem
}
.cat-grid-overlay {
  position:absolute;inset:0;
  background: linear-gradient(to top,rgba(0,0,0,.75) 0%,transparent 60%);
}
.cat-grid-info { position:absolute;bottom:0;left:0;right:0;padding:.75rem .9rem }
.cat-grid-name { font-size:.85rem;font-weight:700;color:#fff;line-height:1.25;margin-bottom:.25rem }
.cat-grid-meta { display:flex;align-items:center;gap:.4rem;font-size:.72rem;color:rgba(255,255,255,.75) }
.cat-grid-fav {
  position:absolute;top:.6rem;right:.6rem;
  background:rgba(0,0,0,.45);backdrop-filter:blur(8px);
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-size:1rem;
  transition: transform .2s;
}
.cat-grid-fav:hover { transform:scale(1.2) }

/* ─── Category Table View ─── */
.cat-table { width:100%;border-collapse:collapse;font-size:.85rem }
.cat-table th { font-size:.7rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;padding:.6rem .9rem;text-align:left;border-bottom:1px solid var(--border) }
.cat-table td { padding:.75rem .9rem;border-bottom:1px solid var(--border);vertical-align:middle }
.cat-table tr { cursor:pointer;transition:background .15s }
.cat-table tr:hover td { background:var(--surface) }
.cat-table-name { font-weight:600;display:flex;align-items:center;gap:.5rem }
.cat-table-stars { color:#f59e0b;font-size:.8rem }
.view-toggle-btn {
  width:34px;height:34px;border-radius:10px;border:1px solid var(--border);
  background:var(--surface);display:flex;align-items:center;justify-content:center;
  font-size:1rem;cursor:pointer;transition:all .2s;
}
.view-toggle-btn.active { background:var(--accent);border-color:var(--accent);color:#fff }
.cat-page-controls {
  display:flex;gap:.6rem;align-items:center;padding:.75rem 1.25rem;
  position:sticky;top:57px;z-index:40;
  background:var(--bg);border-bottom:1px solid var(--border);
}
.cat-search-input {
  flex:1;padding:.55rem .9rem;border-radius:12px;background:var(--surface);
  border:1px solid var(--border);color:var(--text);font-size:.88rem;outline:none;
}
.cat-search-input:focus { border-color:var(--accent) }
.header-inner { max-width: 1000px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between }
.header-title { font-size: 1.1rem; font-weight: 700 }
.header-actions { display: flex; align-items: center; gap: .75rem }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 1.1rem; transition: all .2s;
}
.icon-btn:hover { background: var(--bg3) }

/* ─── Hero ─── */
#hero-section {
  min-height: 100dvh; position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(to bottom, rgba(15,23,42,.3) 0%, rgba(15,23,42,.1) 30%, rgba(15,23,42,.8) 70%, rgba(15,23,42,1) 100%),
    url('toboali_city.jpg') center/cover no-repeat;
}
.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none }
.particle {
  position: absolute; border-radius: 50%;
  animation: float linear infinite;
  opacity: .4;
}
@keyframes float {
  0% { transform: translateY(100vh) scale(0); opacity: 0 }
  10% { opacity: .4 }
  90% { opacity: .4 }
  100% { transform: translateY(-20vh) scale(1); opacity: 0 }
}
.hero-content { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem 3rem; width: 100% }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(20,184,166,.2); border: 1px solid rgba(20,184,166,.4);
  padding: .4rem .9rem; border-radius: 99px; font-size: .8rem; font-weight: 600;
  color: #5eead4; margin-bottom: 1.5rem;
}
.hero-title { font-size: clamp(2.2rem, 8vw, 5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em }
.hero-title span { color: var(--accent) }
.hero-sub { margin-top: 1rem; color: #cbd5e1; font-size: clamp(.95rem, 2.5vw, 1.2rem); max-width: 520px; line-height: 1.7 }
.hero-ctas { display: flex; gap: .75rem; margin-top: 2rem; flex-wrap: wrap }
.btn-primary {
  background: var(--accent); color: #fff; font-weight: 700;
  padding: .85rem 1.75rem; border-radius: 99px; font-size: .95rem;
  display: flex; align-items: center; gap: .5rem;
  transition: all .2s; box-shadow: 0 0 30px rgba(20,184,166,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(20,184,166,.5) }
.btn-ghost {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; padding: .85rem 1.75rem; border-radius: 99px;
  font-size: .95rem; display: flex; align-items: center; gap: .5rem;
  backdrop-filter: blur(8px); transition: all .2s;
}
.btn-ghost:hover { background: var(--bg3) }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap }
.hero-stat { }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--accent2) }
.stat-lbl { font-size: .75rem; color: var(--muted); font-weight: 500 }

/* ─── Weather Widget ─── */
.weather-float {
  position: absolute; top: 100px; right: 1.5rem; z-index: 3;
  display: none;
}
@media (min-width: 640px) { .weather-float { display: block } }
.weather-card {
  background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px); border-radius: 20px; padding: 1rem 1.25rem;
  text-align: center; min-width: 140px;
}
.weather-temp { font-size: 2.5rem; font-weight: 800 }
.weather-loc { font-size: .7rem; color: var(--muted); font-weight: 600 }

/* ─── Stories Bar ─── */
.stories-bar { padding: 1.25rem 0 0; overflow: hidden }
.stories-scroll { display: flex; gap: 1rem; padding: 0 1.25rem; overflow-x: auto; scrollbar-width: none }
.stories-scroll::-webkit-scrollbar { display: none }
.story-item { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: .5rem; cursor: pointer }
.story-ring {
  width: 64px; height: 64px; border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  position: relative;
}
.story-ring.seen { background: var(--bg3) }
.story-avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg);
  background: var(--bg2); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; overflow: hidden;
}
.story-name { font-size: .65rem; font-weight: 600; color: var(--muted); text-align: center; max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }

/* ─── Section Headers ─── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem }
.section-title { font-size: 1.1rem; font-weight: 700 }
.see-all { font-size: .8rem; color: var(--accent); font-weight: 600 }
.section-wrap { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1.25rem 0 }

/* ─── Destination Cards ─── */
.dest-scroll { display: flex; gap: 1rem; overflow-x: auto; padding: 0 1.25rem 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch }
.dest-scroll::-webkit-scrollbar { display: none }
.dest-card {
  flex-shrink: 0; width: 200px; border-radius: var(--r2); overflow: hidden;
  position: relative; cursor: pointer; transition: transform .25s;
}
.dest-card:hover { transform: scale(1.02) }
.dest-card img, .dest-card .dest-img { width: 200px; height: 260px; object-fit: cover; display: block }
.dest-img { background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 3rem }
.dest-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 55%);
}
.dest-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem }
.dest-name { font-weight: 700; font-size: .95rem }
.dest-meta { display: flex; align-items: center; gap: .5rem; margin-top: .25rem }
.tag { background: rgba(255,255,255,.15); backdrop-filter: blur(8px); font-size: .65rem; font-weight: 600; padding: .2rem .5rem; border-radius: 99px }
.dest-rating { font-size: .75rem; font-weight: 600 }
.dest-fav {
  position: absolute; top: .75rem; right: .75rem; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.4); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; transition: all .2s;
}
.dest-fav:hover { transform: scale(1.2) }
.dest-fav.active { color: var(--danger) }

/* ─── Category Pills ─── */
.cat-scroll { display: flex; gap: .6rem; padding: 0 1.25rem; overflow-x: auto; scrollbar-width: none }
.cat-scroll::-webkit-scrollbar { display: none }
.cat-pill {
  flex-shrink: 0; padding: .5rem 1rem; border-radius: 99px; font-size: .8rem;
  font-weight: 600; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.cat-pill.active, .cat-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff }

/* ─── Grid Cards ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(3,1fr) }
  .grid-3 { grid-template-columns: repeat(4,1fr) }
}
@media (min-width: 1024px) {
  .grid-2 { grid-template-columns: repeat(4,1fr) }
  .grid-3 { grid-template-columns: repeat(5,1fr) }
}

/* ─── Kuliner Card ─── */
.food-card {
  border-radius: var(--r); overflow: hidden;
  background: var(--bg2); cursor: pointer; transition: transform .2s;
}
.food-card:hover { transform: translateY(-4px) }
.food-img { height: 120px; object-fit: cover; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 2rem }
.food-img img { width: 100%; height: 100%; object-fit: cover }
.food-info { padding: .65rem }
.food-name { font-size: .85rem; font-weight: 700 }
.food-price { font-size: .75rem; color: var(--accent); font-weight: 600 }
.food-rating { font-size: .7rem; color: var(--muted) }

/* ─── Event Cards ─── */
.event-card {
  display: flex; gap: 1rem; align-items: center;
  padding: 1rem; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; transition: all .2s;
}
.event-card:hover { background: var(--bg2) }
.event-date {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  background: rgba(20,184,166,.15); display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.event-day { font-size: 1.2rem; font-weight: 800; color: var(--accent); line-height: 1 }
.event-month { font-size: .6rem; font-weight: 700; color: var(--accent); text-transform: uppercase }
.event-name { font-size: .9rem; font-weight: 700 }
.event-loc { font-size: .75rem; color: var(--muted); margin-top: .15rem }

/* ─── Map Page ─── */
#map-container {
  height: calc(100dvh - var(--nav-h) - var(--safe-bottom));
  position: relative;
}
@media (min-width: 1024px) { #map-container { padding-left: 0 } }
#leaflet-map { width: 100%; height: 100% }
.map-search {
  position: absolute; top: 1rem; left: 1rem; right: 1rem; z-index: 500;
  display: flex; gap: .5rem;
}
.map-search input {
  flex: 1; padding: .75rem 1rem; border-radius: 14px;
  background: rgba(15,23,42,.9); backdrop-filter: blur(16px);
  border: 1px solid var(--border); color: var(--text); font-size: .9rem;
}
.map-filters {
  position: absolute; top: 4.5rem; left: 1rem; right: 1rem; z-index: 500;
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none;
}
.map-filters::-webkit-scrollbar { display: none }
.map-filter-pill {
  flex-shrink: 0; padding: .4rem .85rem; border-radius: 99px; font-size: .75rem;
  font-weight: 600; cursor: pointer; transition: all .2s;
  background: rgba(15,23,42,.9); backdrop-filter: blur(16px);
  border: 1px solid var(--border); color: var(--text);
}
.map-filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff }
.map-legend {
  position: absolute; bottom: calc(1rem + var(--safe-bottom)); right: 1rem; z-index: 500;
  display: flex; flex-direction: column; gap: .5rem;
}
.map-legend-btn {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(15,23,42,.9); backdrop-filter: blur(16px);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; cursor: pointer;
}

/* ─── AI Chat ─── */
#ai-page { display: flex; flex-direction: column; height: 100dvh; padding-bottom: 0 }
.chat-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  background: rgba(15,23,42,.9); backdrop-filter: blur(20px);
}
.ai-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent3)); display: flex; align-items: center; justify-content: center; font-size: 1.2rem }
.ai-name { font-weight: 700 }
.ai-status { font-size: .75rem; color: var(--accent); display: flex; align-items: center; gap: .35rem }
.ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

.chat-body { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .85rem }
.chat-msg { display: flex; gap: .75rem; max-width: 85%; animation: slideIn .25s ease }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse }
.chat-bubble {
  padding: .75rem 1rem; border-radius: 18px; font-size: .9rem; line-height: 1.55;
  max-width: 100%;
}
.chat-msg.bot .chat-bubble { background: var(--bg2); border: 1px solid var(--border); border-bottom-left-radius: 4px }
.chat-msg.user .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px }
.chat-time { font-size: .65rem; color: var(--muted); margin-top: .35rem; text-align: right }
.chat-avatar-sm { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg,var(--accent),var(--accent3)); display: flex; align-items: center; justify-content: center; font-size: .9rem }

.chat-typing { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; background: var(--bg2); border-radius: 18px; border-bottom-left-radius: 4px; width: fit-content }
.typing-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: typingBounce .8s infinite }
.typing-dot:nth-child(2) { animation-delay: .15s }
.typing-dot:nth-child(3) { animation-delay: .3s }
@keyframes typingBounce { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }

.chat-suggestions { display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 1.25rem; scrollbar-width: none }
.chat-suggestions::-webkit-scrollbar { display: none }
.suggest-chip {
  flex-shrink: 0; padding: .5rem 1rem; border-radius: 99px; font-size: .8rem;
  font-weight: 600; background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.suggest-chip:hover { background: rgba(20,184,166,.15); border-color: var(--accent); color: var(--accent) }

.chat-input-bar {
  padding: .75rem 1rem calc(.75rem + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: rgba(15,23,42,.95); backdrop-filter: blur(20px);
  display: flex; gap: .75rem; align-items: flex-end;
}
@media (min-width: 1024px) { .chat-input-bar { padding-bottom: .75rem } }
.chat-textarea {
  flex: 1; padding: .75rem 1rem; border-radius: 16px; resize: none;
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  font-size: .9rem; max-height: 120px; overflow-y: auto; line-height: 1.5;
}
.chat-send {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  transition: all .2s; flex-shrink: 0;
}
.chat-send:hover { transform: scale(1.08); box-shadow: 0 0 20px rgba(20,184,166,.4) }
.chat-send:disabled { opacity: .5 }

/* ─── Explore Page ─── */
.explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem }
@media (min-width: 640px) { .explore-grid { grid-template-columns: repeat(3,1fr) } }
@media (min-width: 1024px) { .explore-grid { grid-template-columns: repeat(4,1fr) } }
.explore-card {
  border-radius: var(--r2); overflow: hidden; cursor: pointer;
  position: relative; aspect-ratio: 3/4; transition: transform .25s;
}
.explore-card:hover { transform: scale(1.02) }
.explore-card:nth-child(3n+1) { aspect-ratio: 3/5 }
.explore-card-bg { width: 100%; height: 100%; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 3rem; position:relative }
.explore-card-bg img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover }
.explore-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 50%);
}
.explore-card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: .85rem }
.explore-card-name { font-weight: 700; font-size: .9rem; line-height: 1.3 }
.explore-card-loc { font-size: .7rem; color: #94a3b8; margin-top: .2rem }

/* ─── Profile Page ─── */
.profile-header { padding: 3rem 1.25rem 1.5rem; text-align: center; background: linear-gradient(to bottom, rgba(20,184,166,.1), transparent) }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  border: 3px solid var(--accent);
}
.profile-name { font-size: 1.25rem; font-weight: 800 }
.profile-sub { color: var(--muted); font-size: .85rem; margin-top: .25rem }
.profile-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem }
.profile-stat { text-align: center }
.profile-stat-n { font-size: 1.3rem; font-weight: 800 }
.profile-stat-l { font-size: .7rem; color: var(--muted) }

.menu-group { margin: .75rem 1.25rem 0 }
.menu-label { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 0 .5rem; margin-bottom: .5rem }
.menu-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem .75rem; border-radius: var(--r); cursor: pointer; transition: all .2s;
}
.menu-item:hover { background: var(--surface) }
.menu-item-icon { font-size: 1.2rem; width: 36px; height: 36px; border-radius: 10px; background: var(--bg2); display: flex; align-items: center; justify-content: center }
.menu-item-text { flex: 1 }
.menu-item-title { font-size: .9rem; font-weight: 600 }
.menu-item-sub { font-size: .75rem; color: var(--muted) }
.menu-item-arrow { color: var(--muted); font-size: .9rem }
.menu-item-badge { background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px }

/* ─── Toggle Switch ─── */
.toggle { position: relative; width: 44px; height: 24px; cursor: pointer }
.toggle input { opacity: 0; width: 0; height: 0 }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg3); border-radius: 99px; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px; transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent) }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px) }

/* ─── Toast ─── */
#toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 1rem); left: 50%;
  transform: translateX(-50%) translateY(20px); z-index: 999;
  background: var(--bg2); border: 1px solid var(--border);
  padding: .75rem 1.25rem; border-radius: 99px; font-size: .85rem; font-weight: 600;
  opacity: 0; transition: all .3s; white-space: nowrap;
  backdrop-filter: blur(16px); pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0) }
@media (min-width: 1024px) {
  #toast { bottom: 1.5rem }
}

/* ─── Modal / Bottom Sheet ─── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); display: none; align-items: flex-end;
  justify-content: center;
}
.sheet-overlay.open { display: flex; animation: fadeIn .2s ease }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  width: 100%; max-width: 600px; max-height: 90dvh; border-radius: 24px 24px 0 0;
  background: var(--bg2); border-top: 1px solid var(--border); overflow: hidden;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
.sheet-handle { width: 40px; height: 4px; background: var(--bg3); border-radius: 99px; margin: .75rem auto }
.sheet-content { padding: 0 1.25rem 1.5rem; overflow-y: auto; max-height: calc(90dvh - 50px) }

/* ─── Skeleton ─── */
.skeleton { background: var(--bg2); border-radius: var(--r); animation: shimmer 1.5s infinite linear; background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%); background-size: 200% 100% }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* ─── Back Btn ─── */
.back-btn { display: flex; align-items: center; gap: .4rem; color: var(--accent); font-weight: 600; font-size: .85rem; cursor: pointer; padding: .5rem 0 }

/* ─── Swiper ─── */
.swiper-custom { padding-bottom: 2rem !important }
.swiper-pagination-bullet-active { background: var(--accent) !important }

/* ─── Leaflet custom ─── */
.leaflet-container { background: #0c1526 !important }
.leaflet-popup-content-wrapper { background: var(--bg2); border: 1px solid var(--border); color: var(--text); border-radius: var(--r); box-shadow: 0 8px 32px rgba(0,0,0,.3) }
.leaflet-popup-tip { background: var(--bg2) }
.custom-marker { background: var(--accent); border: 2px solid #fff; border-radius: 50%; width: 14px; height: 14px }

/* ─── Animations ─── */
.fade-in { opacity: 0; transform: translateY(20px); transition: all .5s ease }
.fade-in.visible { opacity: 1; transform: translateY(0) }

/* ─── Scroll snap destination detail ─── */
.detail-hero { height: 50vh; position: relative; overflow: hidden }
.detail-hero-img { width: 100%; height: 100%; object-fit: cover; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 5rem }
/* Mobile: galeri geser (slide) satu per layar */
.detail-gallery { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth; scrollbar-width:none; height:260px }
.detail-gallery::-webkit-scrollbar { display:none }
.gallery-slide { flex:none; width:100%; height:100%; scroll-snap-align:start; position:relative; background:var(--bg3) }
.gallery-slide img { width:100%; height:100%; object-fit:cover; display:block; cursor:zoom-in }
.gallery-dots { display:flex; justify-content:center; gap:.4rem; padding:.5rem 0; background:var(--surface) }
.gdot { width:7px; height:7px; border-radius:50%; background:var(--border); cursor:pointer; transition:.2s }
.gdot.active { background:var(--accent); width:18px; border-radius:4px }

/* Desktop: galeri grid menampilkan beberapa foto sekaligus */
@media (min-width: 768px) {
  .detail-gallery.multi { display:grid; grid-template-columns:repeat(3,1fr); grid-auto-rows:160px; gap:6px; height:auto; max-height:340px; overflow:hidden; padding:6px; background:var(--surface) }
  .detail-gallery.multi .gallery-slide { width:auto; height:100%; border-radius:10px; overflow:hidden }
  /* foto pertama lebih besar (2x2) */
  .detail-gallery.multi .gallery-slide:first-child { grid-column:span 2; grid-row:span 2 }
  .detail-gallery.multi + .gallery-dots { display:none }
}

/* Lightbox foto penuh */
#lightbox { position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.92); display:none; align-items:center; justify-content:center; padding:1rem; cursor:zoom-out }
#lightbox.open { display:flex }
#lightbox img { max-width:100%; max-height:90vh; border-radius:12px; object-fit:contain }
#lightbox .lb-close { position:absolute; top:1rem; right:1rem; background:rgba(255,255,255,.15); color:#fff; border:none; width:42px; height:42px; border-radius:50%; font-size:1.2rem; cursor:pointer }
.detail-body { padding: 1.5rem 1.25rem }
.detail-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 }
.tag-v2 { background: rgba(20,184,166,.15); color: var(--accent); border: 1px solid rgba(20,184,166,.3); font-size: .75rem; font-weight: 600; padding: .3rem .7rem; border-radius: 99px }
/* ─── Review list items ─── */
.review-item {
  display: flex; gap: .85rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp .3s ease;
}
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg,var(--accent),var(--accent3));
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.review-name { font-size: .88rem; font-weight: 700 }
.review-text { font-size: .82rem; color: var(--muted); margin-top: .3rem; line-height: 1.6 }
.stars { color: var(--accent2); font-size: .8rem }
.rv-stars { color: var(--accent2); letter-spacing: .05em; font-size: .88rem; margin: .2rem 0 }
.rv-date  { font-size: .65rem; color: var(--muted); background: var(--surface); padding: .15rem .45rem; border-radius: 99px }

/* ─── Review FORM card ─── */
.review-form-card {
  margin-top: 1.75rem; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(20,184,166,.25);
  background: linear-gradient(135deg,rgba(20,184,166,.06),rgba(139,92,246,.06));
}
.review-form-head {
  padding: 1rem 1.25rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: .65rem;
}
.review-form-head-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg,var(--accent),var(--accent3));
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.review-form-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .85rem }
.rv-input {
  width: 100%; padding: .75rem 1rem; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text); font-size: .9rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.rv-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,.15) }
.rv-input::placeholder { color: var(--muted) }
.rv-textarea { resize: vertical; min-height: 84px; max-height: 160px; line-height: 1.55 }
.rv-submit {
  width: 100%; padding: .85rem; border-radius: 12px;
  background: linear-gradient(135deg,var(--accent),var(--accent3));
  color: #fff; font-weight: 700; font-size: .9rem; font-family: inherit;
  cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: opacity .2s, transform .2s; position: relative; overflow: hidden;
}
.rv-submit:hover { opacity: .88; transform: translateY(-1px) }
.rv-submit:active { transform: translateY(0) }
.rv-submit.success { background: linear-gradient(135deg,#22c55e,#16a34a) }
/* star rating */
.star-input-wrap { display: flex; flex-direction: column; gap: .3rem }
.star-input-lbl { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em }

/* ─── Mobile topbar (shows logo on non-home pages) ─── */
#mobile-topbar {
  position: sticky; top: 0; z-index: 50; display: none;
  background: rgba(15,23,42,.55); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: .65rem 1.1rem;
  align-items: center; justify-content: space-between; gap: .75rem;
}
[data-theme="light"] #mobile-topbar {
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
@media (max-width: 1023px) { #mobile-topbar { display: flex } }
.mobile-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1rem }
.mobile-brand img { width: 30px; height: 30px; border-radius: 9px }

/* ─── Star rating input ─── */
.star-input { display: flex; gap: .1rem; flex-direction: row-reverse; justify-content: flex-end; padding: .25rem 0 }
.star-input input { display: none }
.star-input label { font-size: 2rem; cursor: pointer; color: var(--bg3); transition: color .12s, transform .12s; line-height: 1 }
.star-input label:hover { transform: scale(1.2) }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--accent2) }

/* ─── Spin ─── */
.spin { display:inline-block;width:16px;height:16px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:_spin .7s linear infinite }
@keyframes _spin { to { transform:rotate(360deg) } }

/* ─── Progress bar (scroll) ─── */
#scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 999; background: linear-gradient(to right, var(--accent), var(--accent3)); transform-origin: left; transform: scaleX(0); transition: transform .1s }

/* ─── Install prompt ─── */
#install-bar {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + .5rem);
  left: 1rem; right: 1rem; z-index: 150;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 18px; padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  backdrop-filter: blur(16px); box-shadow: 0 8px 32px rgba(0,0,0,.3);
  transform: translateY(200%); transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
#install-bar.show { transform: translateY(0) }
@media (min-width: 1024px) { #install-bar { bottom: 1.5rem; max-width: 400px; left: auto; right: 1.5rem } }
.install-text { flex: 1 }
.install-title { font-size: .9rem; font-weight: 700 }
.install-sub { font-size: .75rem; color: var(--muted) }
.install-btn { background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; padding: .5rem 1rem; border-radius: 99px; flex-shrink: 0 }
.install-close { font-size: 1.2rem; color: var(--muted) }

/* ─── User Auth Modal ─── */
.user-modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.user-modal-overlay.open { display: flex }
.user-modal {
  width: 100%; max-width: 380px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 24px; padding: 1.75rem;
}
.user-modal-tabs { display: flex; gap: .4rem; margin-bottom: 1.25rem }
.umt { flex:1; padding: .5rem; border-radius: 10px; text-align: center; font-size: .82rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer }
.umt.active { background: var(--accent); border-color: var(--accent); color: #fff }
.u-input {
  width: 100%; padding: .65rem .9rem; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: .88rem; font-family: inherit;
  outline: none; margin-bottom: .6rem;
}
.u-input:focus { border-color: var(--accent) }
.u-label { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: .25rem }
.u-btn { width: 100%; padding: .75rem; border-radius: 12px; font-weight: 700; font-size: .9rem; font-family: inherit; cursor: pointer; border: none; display: flex; align-items: center; justify-content: center; gap: .4rem }
.u-btn-primary { background: linear-gradient(135deg,var(--accent),var(--accent3)); color: #fff }
.user-badge { display: flex; align-items: center; gap: .5rem; background: rgba(20,184,166,.1); border: 1px solid rgba(20,184,166,.2); border-radius: 10px; padding: .4rem .75rem; font-size: .8rem; font-weight: 600; color: var(--accent); cursor: pointer }