/* ================================================================
   theme.css — Light / Dark mode theming for GoPlaces.ai
   Dark  = html.dark  (default, applied immediately by inline script)
   Light = html without .dark class
   ================================================================ */

/* ── Smooth transitions when switching ───────────────────────── */
html { transition: background-color 0.25s ease, color 0.25s ease; }

/* ----------------------------------------------------------------
   GLOBAL / BODY
   ---------------------------------------------------------------- */
html:not(.dark) body {
    background: #faf9f7;
    color: #111827;
}

/* ----------------------------------------------------------------
   DESKTOP SIDEBAR
   ---------------------------------------------------------------- */
/* Home page: frosted-glass sidebar so the hero background shows through */
html:not(.dark) body.page-home #sidebar {
    background: rgba(255,255,255,0.45) !important;
    border-right: 1px solid rgba(0,0,0,0.06) !important;
    backdrop-filter: blur(24px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
    box-shadow: 4px 0 20px rgba(0,0,0,0.05) !important;
}

/* All other pages: opaque enough to be readable against content */
html:not(.dark) body:not(.page-home) #sidebar {
    background: rgba(255,255,255,0.96) !important;
    border-right: 1px solid rgba(0,0,0,0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.07) !important;
}

/* Nav items — inactive */
html:not(.dark) #sidebar .sidebar-nav-item {
    color: rgba(0,0,0,0.55) !important;
}
html:not(.dark) #sidebar .sidebar-nav-item:hover {
    color: #111827 !important;
    background: rgba(0,0,0,0.05) !important;
}

/* Nav items — active (gradient kept, text becomes dark) */
html:not(.dark) #sidebar [class*="bg-gradient"] {
    color: #1a2535 !important;
    opacity: 0.9;
}

/* Sidebar badge */
html:not(.dark) #sidebarSavedBadge { border: 1px solid rgba(255,255,255,0.6); }

/* Trips count badge — readable in both modes */
html:not(.dark) #sidebarTripsBadge {
    background: rgba(126, 34, 206, 0.18) !important;   /* purple-700/18 */
    color: #6b21a8 !important;                          /* purple-800 */
    border: 1px solid rgba(126, 34, 206, 0.25);
}


/* Sidebar user footer */
html:not(.dark) #sidebarUserFooter #sidebarUserName { color: #111827; }
html:not(.dark) #sidebarUserMenu { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) #sidebarUserMenu:hover { color: #111827 !important; }
html:not(.dark) #sidebarUserDropdown {
    background: rgba(255,255,255,0.97) !important;
    border-color: rgba(0,0,0,0.08) !important;
}
html:not(.dark) .user-dropdown-floating {
    background: rgba(255,255,255,0.98) !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18) !important;
}
html:not(.dark) #sidebarUserDropdown a,
html:not(.dark) #sidebarUserDropdown button { color: rgba(0,0,0,0.65); }
html:not(.dark) #sidebarUserDropdown a:hover,
html:not(.dark) #sidebarUserDropdown button:hover { color: #111827; background: rgba(0,0,0,0.05); }

/* Sidebar footer links */
html:not(.dark) #sidebar .border-white\/10 { border-color: rgba(0,0,0,0.08) !important; }
html:not(.dark) #sidebar a.text-white\/25 { color: rgba(0,0,0,0.3) !important; }
html:not(.dark) #sidebar a.text-white\/25:hover { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) #sidebar p.text-white\/25 { color: rgba(0,0,0,0.3) !important; }
html:not(.dark) #sidebar p.text-white\/20 { color: rgba(0,0,0,0.25) !important; }

/* Footer Popover Light Mode */
html:not(.dark) .footer-popover-floating {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
}
html:not(.dark) .footer-popover-floating a {
    color: rgba(0, 0, 0, 0.6) !important;
}
html:not(.dark) .footer-popover-floating a:hover {
    color: #111827 !important;
}
html:not(.dark) .footer-popover-floating span {
    color: rgba(0, 0, 0, 0.2) !important;
}
html:not(.dark) .footer-popover-floating p {
    color: rgba(0, 0, 0, 0.35) !important;
}

/* Sidebar Info Button Light Mode */
html:not(.dark) #sidebarInfoBtn {
    color: rgba(0, 0, 0, 0.3) !important;
}
html:not(.dark) #sidebarInfoBtn:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Footer link hover (Company/Contact/Help/Terms/Privacy) — Tailwind's
   hover:text-white/50 turns the text white-on-white in light mode.
   Override to a readable dark hover instead. */
html:not(.dark) #sidebar p.text-white\/25 a:hover,
html:not(.dark) #sidebar a.hover\:text-white\/50:hover {
    color: #111827 !important;
}

/* Guest login link in sidebar */
html:not(.dark) #sidebarGuestFooter a { color: rgba(0,0,0,0.5) !important; }
html:not(.dark) #sidebarGuestFooter a:hover { color: #111827 !important; }
html:not(.dark) #sidebarGuestFooter svg { color: rgba(0,0,0,0.4) !important; }

/* ── New Chat buttons ── */
html:not(.dark) .new-chat-expanded,
html:not(.dark) .new-chat-collapsed { /* keeps orange — accent works on both modes */ }

/* ── Chat accordion in sidebar ── */
html:not(.dark) .nav-chat-expanded { border-color: rgba(0,0,0,0.05); }
html:not(.dark) .nav-session-row:hover { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .nav-session-row.active { background: rgba(224,90,43,0.08) !important; }
html:not(.dark) .nav-session-title { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) .nav-session-row.active .nav-session-title { color: #111827 !important; }
html:not(.dark) .nav-session-date { color: rgba(0,0,0,0.3) !important; }
html:not(.dark) .nav-session-del { color: rgba(0,0,0,0.25) !important; }
html:not(.dark) .nav-sessions-empty { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .nav-session-new { color: #E05A2B !important; }
html:not(.dark) .nav-session-new:hover { background: rgba(224,90,43,0.08) !important; }

/* ── Sidebar floating toggle ── */
html:not(.dark) #sidebarToggleBtn {
    background: rgba(0,0,0,0.06) !important;
    border-color: rgba(0,0,0,0.12) !important;
    color: #111827 !important;
}

/* ── Tooltip ── */
html:not(.dark) #gpSidebarTooltip {
    background: rgba(30,30,30,0.9);
    color: #fff;
}

/* ----------------------------------------------------------------
   MOBILE HEADER + BOTTOM NAV
   ---------------------------------------------------------------- */
html:not(.dark) #mobileHeader { background: rgba(248,250,252,0.95); }

html:not(.dark) #mobileNav {
    background: rgba(248,250,252,0.97) !important;
    border-top: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(20px);
}

html:not(.dark) #mobileNav a,
html:not(.dark) #mobileNav button { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) #mobileNav a:hover,
html:not(.dark) #mobileNav button:hover { color: rgba(0,0,0,0.7) !important; }
html:not(.dark) #mobileNav .text-\[\#E05A2B\] { color: #E05A2B !important; }
html:not(.dark) #mobileChatBtn.text-\[\#E05A2B\] { color: #E05A2B !important; }

/* Mobile chat sheet — panel itself */
html:not(.dark) #mobileChatSheet > div:not(#mobileChatSheetBg) {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.1) !important;
}
/* Header title, dividers, close button */
html:not(.dark) #mobileChatSheet .font-semibold { color: #111827 !important; }
html:not(.dark) #mobileChatSheet .text-white    { color: #111827 !important; }
html:not(.dark) #mobileChatSheet .border-white\/8,
html:not(.dark) #mobileChatSheet .border-white\/10 { border-color: rgba(0,0,0,0.07) !important; }
html:not(.dark) #mobileChatSheetClose { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) #mobileChatSheetClose:hover { color: rgba(0,0,0,0.65) !important; }
/* Loading / empty placeholder */
html:not(.dark) #mobileChatList .text-white\/30 { color: rgba(0,0,0,0.4) !important; }
/* "+ New Chat" link in sheet header */
html:not(.dark) #mobileChatSheet a.text-\[\#E05A2B\] { color: #c44d22 !important; }

/* Mobile chat session rows — override hardcoded text-white/* Tailwind classes set by JS */
html:not(.dark) .mobile-session-row { color: #111827 !important; }
html:not(.dark) .mobile-session-row a { color: #111827 !important; }
html:not(.dark) .mobile-session-row .text-white\/70,
html:not(.dark) .mobile-session-row .text-white\/90 { color: #1a2535 !important; }
html:not(.dark) .mobile-session-row .text-white\/30 { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .mobile-session-row .text-white\/25 { color: rgba(0,0,0,0.3) !important; }
html:not(.dark) .mobile-session-row .bg-blue-500\/15 { background: rgba(59,130,246,0.1) !important; }
html:not(.dark) .mobile-session-row .border-blue-500\/25 { border-color: rgba(59,130,246,0.2) !important; }
html:not(.dark) .mobile-session-row svg { color: rgba(59,130,246,0.7) !important; }
html:not(.dark) .mobile-session-row:hover { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .mobile-session-row .nav-session-del { color: rgba(0,0,0,0.25) !important; }

/* Mobile user sheet */
html:not(.dark) #mobileUserSheet > div:last-child {
    background: rgba(248,250,252,0.99) !important;
    border-color: rgba(0,0,0,0.08) !important;
}
html:not(.dark) #mobileUserSheet .border-white\/8 { border-color: rgba(0,0,0,0.07) !important; }
html:not(.dark) #mobileSheetName { color: #111827 !important; }
html:not(.dark) #mobileSheetEmail { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) #mobileUserSheet a,
html:not(.dark) #mobileUserSheet button { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) #mobileUserSheet a:hover,
html:not(.dark) #mobileUserSheet button:hover { color: #111827 !important; }
html:not(.dark) #mobileSheetClose { color: rgba(0,0,0,0.35) !important; }

/* Footer marketing/legal links + copyright row inside the sheet —
   Tailwind text-white/25 + text-white/20 on the surrounding <p>s
   would render invisible on a white sheet, so override here. */
html:not(.dark) #mobileUserSheet .border-white\/8 { border-color: rgba(0,0,0,0.07) !important; }
html:not(.dark) #mobileUserSheet p.text-white\/25 { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) #mobileUserSheet p.text-white\/20 { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) #mobileUserSheet p.text-white\/25 .opacity-40,
html:not(.dark) #mobileUserSheet p.text-white\/20 .opacity-40 { opacity: 1 !important; }


/* ----------------------------------------------------------------
   MOBILE HEADER  (user/guest in top-right)
   ---------------------------------------------------------------- */
html:not(.dark) #mobileHeaderGuest a { color: rgba(0,0,0,0.5) !important; }
html:not(.dark) #mobileHeaderGuest a:hover { color: #111827 !important; }
html:not(.dark) #mobileHeaderGuest svg { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) #mobileHeaderUser { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) #mobileHeaderUser:hover { color: #111827 !important; }

/* ----------------------------------------------------------------
   MOBILE "MORE" POPOVER
   ---------------------------------------------------------------- */
html:not(.dark) .mobile-more-popover {
    background: rgba(255,255,255,0.97) !important;
    border-color: rgba(0,0,0,0.10) !important;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04) !important;
}
html:not(.dark) .mobile-more-arrow {
    background: rgba(255,255,255,0.97) !important;
    border-right-color: rgba(0,0,0,0.10) !important;
    border-bottom-color: rgba(0,0,0,0.10) !important;
}
html:not(.dark) .mobile-more-popover a { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) .mobile-more-popover a:hover { color: #111827 !important; background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .mobile-more-popover .border-white\/10 { border-color: rgba(0,0,0,0.08) !important; }
/* Create button keeps orange accent in both modes */
html:not(.dark) .mobile-more-popover .text-\[\#E05A2B\] { color: #E05A2B !important; }

/* ----------------------------------------------------------------
   GDPR BANNER
   ---------------------------------------------------------------- */
html:not(.dark) #gdprModal {
    background: rgba(248,250,252,0.97) !important;
    border-top-color: rgba(0,0,0,0.08) !important;
}
html:not(.dark) #gdprModal p { color: rgba(0,0,0,0.65) !important; }
html:not(.dark) #gdprRejectNonEssential,
html:not(.dark) #gdprManage {
    color: rgba(0,0,0,0.6) !important;
    border-color: rgba(0,0,0,0.15) !important;
}
html:not(.dark) #gdprRejectNonEssential:hover,
html:not(.dark) #gdprManage:hover {
    color: #111827 !important;
    border-color: rgba(0,0,0,0.3) !important;
    background: rgba(0,0,0,0.04) !important;
}
html:not(.dark) #gdprDnsRow label,
html:not(.dark) #gdprPreferences label {
    color: rgba(0,0,0,0.65) !important;
}
html:not(.dark) #gdprPreferences .text-white\/50 {
    color: rgba(0,0,0,0.45) !important;
}

/* ----------------------------------------------------------------
   SAVE MODAL  (save-system.css)
   ---------------------------------------------------------------- */
html:not(.dark) #saveModalOverlay { background: rgba(0,0,0,0.4) !important; }
html:not(.dark) #saveModalSheet {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.12) !important;
}
html:not(.dark) .save-modal-handle { background: rgba(0,0,0,0.15) !important; }
html:not(.dark) .save-modal-header { border-bottom-color: rgba(0,0,0,0.07) !important; }
html:not(.dark) .save-modal-title  { color: #111827 !important; }
html:not(.dark) .save-modal-title span { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) .save-modal-close  { background: rgba(0,0,0,0.05) !important; color: rgba(0,0,0,0.5) !important; }
html:not(.dark) .save-modal-close:hover { background: rgba(0,0,0,0.09) !important; color: #111827 !important; }
html:not(.dark) .save-modal-filter {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .save-modal-filter::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .save-col-item:hover { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .save-col-thumb     { background: rgba(0,0,0,0.06) !important; }
html:not(.dark) .save-col-name      { color: #111827 !important; }
html:not(.dark) .save-col-count     { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) .save-modal-empty   { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .spinner-ring       { border-color: rgba(0,0,0,0.1) !important; border-top-color: #E05A2B !important; }
html:not(.dark) .save-new-col-emoji-btn {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .save-new-col-input {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .save-new-col-input::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .save-modal-footer  { border-top-color: rgba(0,0,0,0.07) !important; }
html:not(.dark) .save-new-col-toggle { color: rgba(0,0,0,0.5) !important; }
html:not(.dark) .save-new-col-toggle:hover { color: #111827 !important; background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .save-modal-cancel-btn { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .save-modal-cancel-btn:hover { color: rgba(0,0,0,0.7) !important; }
html:not(.dark) .gp-toast {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12) !important;
}
html:not(.dark) .gp-toast--error { background: #fff5f5 !important; border-color: rgba(220,50,50,0.2) !important; }
html:not(.dark) .gp-toast-close  { background: rgba(0,0,0,0.06) !important; color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .gp-toast-close:hover { background: rgba(0,0,0,0.1) !important; color: #111827 !important; }

/* ----------------------------------------------------------------
   CHAT PAGE  (chat.css)
   ---------------------------------------------------------------- */
html:not(.dark) .chat-page { background: #faf9f7 !important; }

html:not(.dark) .chat-panel {
    background: #ffffff !important;
    border-right-color: rgba(0,0,0,0.08) !important;
}

html:not(.dark) .chat-header {
    background: rgba(255,255,255,0.97) !important;
    border-bottom-color: rgba(0,0,0,0.07) !important;
}
html:not(.dark) .chat-header-title { color: #1a2535 !important; }

html:not(.dark) .chat-sidebar-toggle {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.55) !important;
}
html:not(.dark) .chat-sidebar-toggle:hover {
    background: rgba(0,0,0,0.08) !important;
    color: #111827 !important;
}

html:not(.dark) .sessions-new-btn {
    background: rgba(224,90,43,0.08) !important;
    border-color: rgba(224,90,43,0.2) !important;
}

html:not(.dark) .chat-messages { background: #f8fafc; }

/* User bubble */
html:not(.dark) .chat-msg.user .chat-msg-avatar {
    background: rgba(224,90,43,0.15) !important;
    border-color: rgba(224,90,43,0.3) !important;
}
/* Assistant bubble */
html:not(.dark) .chat-msg.assistant .chat-msg-avatar {
    background: rgba(99,102,241,0.12) !important;
    border-color: rgba(99,102,241,0.2) !important;
}
html:not(.dark) .chat-msg.assistant .chat-msg-bubble {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: #1a2535 !important;
}
html:not(.dark) .chat-msg-bubble p { color: rgba(0,0,0,0.78) !important; }
html:not(.dark) .chat-msg-bubble h2,
html:not(.dark) .chat-msg-bubble h3 { color: #111827 !important; }
html:not(.dark) .chat-msg-bubble strong { color: #111827 !important; }
html:not(.dark) .chat-msg-bubble li { color: rgba(0,0,0,0.72) !important; }
html:not(.dark) .chat-msg-bubble hr { border-top-color: rgba(0,0,0,0.1) !important; }

/* Typing indicator */
html:not(.dark) .chat-typing-dots {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.07) !important;
}
html:not(.dark) .chat-typing-text { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) .chat-typing-ellipses span { background: rgba(0,0,0,0.3) !important; }

/* Empty state */
html:not(.dark) .chat-empty-state h3 { color: #111827 !important; }
html:not(.dark) .chat-empty-state p { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) .chat-chip {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.65) !important;
}
html:not(.dark) .chat-chip:hover {
    background: rgba(224,90,43,0.1) !important;
    border-color: rgba(224,90,43,0.3) !important;
    color: #111827 !important;
}

/* Input area */
html:not(.dark) .chat-input-area {
    background: rgba(255,255,255,0.98) !important;
    border-top-color: rgba(0,0,0,0.07) !important;
}
html:not(.dark) .chat-input-wrap {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
}
html:not(.dark) .chat-input-wrap:focus-within {
    border-color: rgba(224,90,43,0.4) !important;
    background: rgba(0,0,0,0.03) !important;
}
html:not(.dark) .chat-input { color: #111827 !important; }
html:not(.dark) .chat-input::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .chat-voice-btn { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .chat-voice-btn:hover { color: rgba(0,0,0,0.7) !important; }

/* Summarise CTA */
html:not(.dark) .chat-summarise-btn {
    background: rgba(99,102,241,0.08) !important;
    border-color: rgba(99,102,241,0.2) !important;
    color: #6366f1 !important;
}

/* Context banner */
html:not(.dark) .chat-context-banner {
    background: rgba(224,90,43,0.07) !important;
    border-bottom-color: rgba(224,90,43,0.15) !important;
    color: rgba(0,0,0,0.65) !important;
}

/* Place cards in chat */
html:not(.dark) .chat-place-card {
    background: rgba(255,255,255,0.85) !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important;
}
html:not(.dark) .chat-place-card:hover {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.18) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1) !important;
}
html:not(.dark) .chat-place-card.map-highlighted {
    border-color: #E05A2B !important;
    box-shadow: 0 0 0 2px rgba(224,90,43,0.3) !important;
}
html:not(.dark) .chat-place-card-title { color: #1a2535 !important; }
html:not(.dark) .chat-place-card-meta { color: rgba(0,0,0,0.55) !important; }
html:not(.dark) .chat-place-card-address { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .chat-place-card-img { background: #e2e8f0 !important; }

/* Map panel */
html:not(.dark) .map-panel { background: #e4ecf5 !important; }
html:not(.dark) .map-panel-placeholder { color: rgba(0,0,0,0.3) !important; }
html:not(.dark) .map-panel-placeholder svg { opacity: 0.2 !important; }

/* Map toggle (mobile) */
html:not(.dark) .map-toggle-btn {
    background: #1B3A5C !important;
}

/* ----------------------------------------------------------------
   EXPLORE PAGE  (explore.css)
   ---------------------------------------------------------------- */

/* Layout panels */
html:not(.dark) .explore-layout { background: #faf9f7 !important; }
html:not(.dark) .explore-left   { background: #faf9f7 !important; }
html:not(.dark) .explore-map    { background: #e4ecf5 !important; }

/* City picker */
html:not(.dark) .city-name    { color: #111827 !important; }
html:not(.dark) .chevron-icon { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .city-picker-dropdown {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}
html:not(.dark) .city-picker-search {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .city-picker-search::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .location-option { color: rgba(0,0,0,0.75) !important; }
html:not(.dark) .location-option:hover { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .recent-label  { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .recent-city   { color: #111827 !important; }
html:not(.dark) .recent-region { color: rgba(0,0,0,0.45) !important; }

/* Search bar */
html:not(.dark) .search-input-wrap {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
}
html:not(.dark) .explore-search-input { color: #111827 !important; }
html:not(.dark) .explore-search-input::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .search-icon      { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .search-clear-btn { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .filters-btn      { color: rgba(0,0,0,0.55) !important; border-color: rgba(0,0,0,0.12) !important; }
html:not(.dark) .search-dropdown {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}
html:not(.dark) .search-result-name { color: #111827 !important; }
html:not(.dark) .search-result-sub  { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) .search-result-dist { color: rgba(0,0,0,0.35) !important; }

/* Filter chips */
html:not(.dark) .filter-label { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .f-chip {
    color: rgba(0,0,0,0.6) !important;
    border-color: rgba(0,0,0,0.12) !important;
}
html:not(.dark) .f-chip:hover { background: rgba(0,0,0,0.05) !important; }
html:not(.dark) .f-chip.active { background: #E05A2B !important; color: #fff !important; border-color: #E05A2B !important; }
html:not(.dark) .cat-chip {
    color: rgba(0,0,0,0.6) !important;
    border-color: rgba(0,0,0,0.12) !important;
}
html:not(.dark) .cat-chip:hover { background: rgba(0,0,0,0.05) !important; }
html:not(.dark) .cat-chip.active {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: rgba(0,0,0,0.7) !important;
}

/* Section titles */
html:not(.dark) .section-title { color: #111827 !important; }
html:not(.dark) .see-more-btn  { color: rgba(0,0,0,0.5) !important; border-color: rgba(0,0,0,0.12) !important; }

/* Place cards */
html:not(.dark) .place-card {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}
html:not(.dark) .place-card:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
    border-color: rgba(0,0,0,0.15) !important;
}
html:not(.dark) .card-img-wrap  { background: #e2e8f0 !important; }
html:not(.dark) .card-name      { color: #1a2535 !important; }
html:not(.dark) .card-rating    { color: rgba(0,0,0,0.6) !important; }
html:not(.dark) .card-meta      { color: rgba(0,0,0,0.5) !important; }
html:not(.dark) .card-location  { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .card-distance  { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .skeleton-img   { background: rgba(0,0,0,0.07) !important; }
html:not(.dark) .skeleton-line  { background: rgba(0,0,0,0.05) !important; }
html:not(.dark) .destination-card-skeleton { background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.07) 50%, rgba(0,0,0,0.04) 75%) !important; }

/* Destination cards */
html:not(.dark) .destination-card {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}
html:not(.dark) .destination-card:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
    border-color: rgba(0,0,0,0.15) !important;
}
html:not(.dark) .dest-img { background-color: #e2e8f0; }
html:not(.dark) .dest-name { color: #1a2535 !important; }
html:not(.dark) .dest-country { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) .dest-tag { color: rgba(0,0,0,0.5) !important; background: rgba(0,0,0,0.07) !important; }
html:not(.dark) .dest-trending-badge { background: rgba(255,255,255,0.9) !important; color: #111827 !important; border: 1px solid rgba(0,0,0,0.1); }

/* Expanded section */
html:not(.dark) .expanded-section-header {
    background: #faf9f7 !important;
    border-color: rgba(0,0,0,0.07) !important;
}
html:not(.dark) .expanded-back-btn    { color: rgba(0,0,0,0.5) !important; }
html:not(.dark) .expanded-section-title { color: #111827 !important; }
html:not(.dark) .expanded-loading     { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .expanded-end-msg     { color: rgba(0,0,0,0.3) !important; }

/* Persona banner */
html:not(.dark) .persona-banner      { background: rgba(224,90,43,0.06) !important; border-color: rgba(224,90,43,0.2) !important; }
html:not(.dark) .persona-banner--muted { background: rgba(0,0,0,0.03) !important; border-color: rgba(0,0,0,0.08) !important; }
html:not(.dark) .persona-banner-text { color: rgba(0,0,0,0.6) !important; }

/* Map controls */
html:not(.dark) .explore-this-area-btn {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: rgba(0,0,0,0.12) !important;
}
html:not(.dark) .map-collapse-btn { background: #fff !important; color: #333 !important; }

/* ----------------------------------------------------------------
   SAVED PAGE  (saved.css)
   ---------------------------------------------------------------- */

/* List view */
html:not(.dark) .saved-title    { color: #111827 !important; }
html:not(.dark) .saved-subtitle { color: rgba(0,0,0,0.5) !important; }
html:not(.dark) .saved-new-btn  { background: rgba(224,90,43,0.08) !important; }

/* Empty / no results states */
html:not(.dark) .saved-state-title { color: rgba(0,0,0,0.7) !important; }
html:not(.dark) .saved-state-desc  { color: rgba(0,0,0,0.45) !important; }

/* Collection cards */
html:not(.dark) .saved-col-card {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}
html:not(.dark) .saved-col-card:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}
html:not(.dark) .saved-col-mosaic          { background: rgba(0,0,0,0.06) !important; }
html:not(.dark) .saved-col-badge           { background: rgba(255,255,255,0.85) !important; color: #333 !important; }
html:not(.dark) .saved-col-card-name       { color: #1a2535 !important; }
html:not(.dark) .saved-col-menu-btn        { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .saved-col-context-menu {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
html:not(.dark) .saved-ctx-item       { color: rgba(0,0,0,0.7) !important; }
html:not(.dark) .saved-ctx-item:hover { background: rgba(0,0,0,0.04) !important; }

/* Place cards in saved detail */
html:not(.dark) .saved-place-card {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(0,0,0,0.07) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}
html:not(.dark) .saved-place-card:hover { background: #ffffff !important; }
html:not(.dark) .saved-card-img-wrap     { background: #e2e8f0 !important; }
html:not(.dark) .saved-card-remove-btn  { background: rgba(255,255,255,0.9) !important; color: #333 !important; border-color: rgba(0,0,0,0.12) !important; }
html:not(.dark) .saved-card-name        { color: rgba(0,0,0,0.85) !important; }
html:not(.dark) .saved-card-meta        { color: rgba(0,0,0,0.45) !important; }
html:not(.dark) .saved-card-rating      { color: rgba(0,0,0,0.5) !important; }

/* New collection form */
html:not(.dark) .saved-new-col-inner {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}
html:not(.dark) .saved-new-emoji-btn {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .saved-new-name-input {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .saved-new-name-input::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .saved-new-cancel-btn {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.55) !important;
}

/* Detail view */
html:not(.dark) #savedDetailView { background: #faf9f7 !important; }
html:not(.dark) .saved-detail-left {
    background: #ffffff !important;
    border-right-color: rgba(0,0,0,0.08) !important;
}
html:not(.dark) .saved-detail-topbar {
    background: rgba(255,255,255,0.97) !important;
    border-bottom-color: rgba(0,0,0,0.07) !important;
}
html:not(.dark) .saved-back-btn {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.55) !important;
}
html:not(.dark) .saved-detail-search-input {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #111827 !important;
}
html:not(.dark) .saved-detail-search-input::placeholder { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .saved-search-icon  { color: rgba(0,0,0,0.35) !important; }
html:not(.dark) .saved-search-clear {
    background: rgba(0,0,0,0.07) !important;
    color: rgba(0,0,0,0.5) !important;
}
html:not(.dark) .saved-cat-chip {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.6) !important;
}
html:not(.dark) .saved-cat-chip.active {
    background: rgba(224,90,43,0.1) !important;
    border-color: rgba(224,90,43,0.4) !important;
    color: #c44d22 !important;
}
html:not(.dark) .saved-section-title   { color: rgba(0,0,0,0.8) !important; }
html:not(.dark) .saved-see-more-btn    { color: #c44d22 !important; }
html:not(.dark) .saved-expanded-back-btn {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.6) !important;
}
html:not(.dark) .saved-expanded-title  { color: rgba(0,0,0,0.85) !important; }
html:not(.dark) .saved-map-toggle-btn {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.15) !important;
    color: #111827 !important;
}

/* ----------------------------------------------------------------
   QUIZ PAGE  (quiz.css)
   ---------------------------------------------------------------- */
html:not(.dark) .quiz-shell { background: #faf9f7 !important; }

/* Top bar */
html:not(.dark) .quiz-topbar {
    background: linear-gradient(to bottom, #faf9f7 80%, transparent) !important;
}
html:not(.dark) .quiz-progress-track { background: rgba(0,0,0,0.1) !important; }
html:not(.dark) .quiz-progress-label { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .quiz-skip           { color: rgba(0,0,0,0.4) !important; }

/* Question prompt */
html:not(.dark) .quiz-prompt { color: #111827 !important; }

/* Image-choice cards */
html:not(.dark) .quiz-card {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}
html:not(.dark) .quiz-card:hover { border-color: rgba(224,90,43,0.4) !important; }
html:not(.dark) .quiz-card.selected {
    background: rgba(224,90,43,0.08) !important;
    border-color: #E05A2B !important;
}
html:not(.dark) .quiz-card-label { color: rgba(0,0,0,0.7) !important; }

/* Multi-select chips */
html:not(.dark) .quiz-chip {
    color: rgba(0,0,0,0.65) !important;
    border-color: rgba(0,0,0,0.12) !important;
}
html:not(.dark) .quiz-chip:hover { background: rgba(0,0,0,0.05) !important; }
html:not(.dark) .quiz-chip.selected { background: #E05A2B !important; color: #fff !important; border-color: #E05A2B !important; }
html:not(.dark) .quiz-chip-hint { color: rgba(0,0,0,0.35) !important; }

/* Slider / budget */
html:not(.dark) .quiz-range-input { background: rgba(0,0,0,0.1) !important; }
html:not(.dark) .bucket-label     { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .bucket-label.active { color: #E05A2B !important; }

/* Rank order */
html:not(.dark) .rank-item {
    background: rgba(255,255,255,0.9) !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
html:not(.dark) .rank-item.drag-over { background: rgba(224,90,43,0.06) !important; border-color: #E05A2B !important; }
html:not(.dark) .rank-badge { background: rgba(0,0,0,0.08) !important; color: rgba(0,0,0,0.5) !important; }
html:not(.dark) .rank-item:nth-child(1) .rank-badge { background: #E05A2B !important; color: #fff !important; }
html:not(.dark) .rank-item:nth-child(2) .rank-badge { background: rgba(224,90,43,0.5) !important; color: #fff !important; }
html:not(.dark) .rank-item:nth-child(3) .rank-badge { background: rgba(224,90,43,0.28) !important; color: rgba(0,0,0,0.7) !important; }
html:not(.dark) .rank-item-label { color: rgba(0,0,0,0.75) !important; }

/* Loading */
html:not(.dark) .quiz-loading { color: rgba(0,0,0,0.4) !important; }

/* Persona reveal card */
html:not(.dark) .reveal-front {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
}
html:not(.dark) .reveal-front-text { color: rgba(0,0,0,0.4) !important; }
html:not(.dark) .reveal-back {
    background: linear-gradient(145deg, #1d3a5f 0%, #1a2535 100%) !important;
}
html:not(.dark) .reveal-you-are { color: rgba(255,255,255,0.55) !important; }
html:not(.dark) .reveal-name    { color: #ffffff !important; }
html:not(.dark) .reveal-desc    { color: rgba(255,255,255,0.75) !important; }
html:not(.dark) .reveal-hybrid  { color: rgba(255,255,255,0.7) !important; }
html:not(.dark) .reveal-section-label { color: rgba(255,255,255,0.4) !important; }
html:not(.dark) .dest-chip { background: rgba(255,255,255,0.12) !important; color: rgba(255,255,255,0.75) !important; border-color: rgba(255,255,255,0.15) !important; }
html:not(.dark) .reveal-tag { background: rgba(255,255,255,0.08) !important; color: rgba(255,255,255,0.55) !important; border-color: rgba(255,255,255,0.1) !important; }
html:not(.dark) .reveal-retake { color: rgba(255,255,255,0.35) !important; }

/* ----------------------------------------------------------------
   CONFIRM DIALOG
   ---------------------------------------------------------------- */
html:not(.dark) .gp-confirm-dialog {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18) !important;
}
html:not(.dark) .gp-confirm-title { color: #111827 !important; }
html:not(.dark) .gp-confirm-msg   { color: rgba(0,0,0,0.55) !important; }
html:not(.dark) .gp-confirm-cancel {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: rgba(0,0,0,0.6) !important;
}
html:not(.dark) .gp-confirm-cancel:hover { background: rgba(0,0,0,0.09) !important; color: #111827 !important; }

/* ----------------------------------------------------------------
   THEME TOGGLE BUTTON (sidebar + mobile)
   ---------------------------------------------------------------- */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
}

/* Dark mode appearance */
html.dark .theme-toggle-btn {
    color: rgba(255,255,255,0.55);
}
html.dark .theme-toggle-btn:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
}

/* Light mode appearance */
html:not(.dark) .theme-toggle-btn {
    color: rgba(0,0,0,0.55);
}
html:not(.dark) .theme-toggle-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #111827;
}

.theme-toggle-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
}

/* ----------------------------------------------------------------
   LOGO — light mode (white text becomes dark via invert+hue-rotate).
   Only the wordmark version has white text; the icon-only version is
   pure orange and must NOT be inverted.
   ---------------------------------------------------------------- */
html:not(.dark) #sidebar .sidebar-logo-full,
html:not(.dark) #mobileHeader img[alt="GoPlaces.ai"] {
    filter: invert(1) hue-rotate(180deg);
}

/* ----------------------------------------------------------------
   HOME PAGE — light mode
   Show the hero image with a LIGHT glass overlay (instead of the dark
   gradient that ships on the markup). Sidebar + header stay readable
   as light frosted glass over the imagery.
   ---------------------------------------------------------------- */
html:not(.dark) body.page-home {
    background: #faf9f7 !important;
    color: #ffffff;
}

/* Sidebar uses light frosted glass on home (already in earlier rule,
   re-stated here to override the dark mirror that was here before) */
html:not(.dark) body.page-home #sidebar {
    background: rgba(255, 255, 255, 0.45) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(24px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05) !important;
}

