/* === JalanMate — Map-centric Indonesia Travel App === */
/* Brand palette: red (Indonesian flag) primary + emerald accent (tropical/Bali green) */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --t-primary: #E11D2E;
  --t-primary-dark: #B0121F;
  --t-primary-light: #F87171;
  --t-primary-bg: #FEF2F2;
  --t-accent: #F5B301;
  --t-accent-light: #FFF8E6;
  --t-navy: #1A3C8C;
  --t-navy-dark: #142E6B;
  --t-navy-bg: #EEF2FB;
  --t-white: #FFFFFF;
  --t-gray-50: #F8FAFC;
  --t-gray-100: #F3F4F6;
  --t-gray-200: #E5E7EB;
  --t-gray-300: #D1D5DB;
  --t-gray-600: #4B5563;
  --t-gray-700: #374151;
  --t-gray-800: #1F2937;
  --t-gray-900: #0F172A;
  --t-radius: 12px;
  --t-radius-sm: 8px;
  --t-shadow: 0 1px 3px rgba(0,0,0,0.1);
  --t-shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --t-transition: 0.2s ease;
  --sidebar-width: 380px;
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  color: var(--t-gray-800);
}

/* === Top Bar (inside sidebar) === */
.ta-topbar {
  height: 60px; background: var(--t-white); border-bottom: 1px solid var(--t-gray-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; flex-shrink: 0; gap: 6px;
}
.ta-brand {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.ta-brand:hover { text-decoration: none; }
.ta-brand-logo {
  height: 30.6px; width: auto; object-fit: contain;
}
.ta-topbar-actions {
  display: flex; align-items: center; gap: 6px;
  min-width: 0; flex-wrap: nowrap;
}
.ta-lang-select {
  padding: 5px 8px; border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  font-size: 0.8rem; background: var(--t-white); cursor: pointer; color: var(--t-gray-700);
}
/* Topbar language select: stay compact + shrinkable so it never overflows the 380px sidebar.
   Direct child only — the copy inside the profile dropdown stays full-width. */
.ta-topbar-actions > .ta-lang-select { max-width: 88px; min-width: 0; }
.ta-koinfo-link {
  font-size: 0.78rem; color: var(--t-gray-300); text-decoration: none;
  padding: 5px 10px; border-radius: var(--t-radius-sm); transition: all var(--t-transition);
}
.ta-koinfo-link:hover { color: var(--t-primary); background: var(--t-primary-bg); text-decoration: none; }

/* === Guide Button === */
.ta-guide-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--t-gray-200);
  border-radius: var(--t-radius-sm); background: var(--t-white);
  color: var(--t-gray-600); cursor: pointer; transition: all var(--t-transition);
  flex-shrink: 0;
}
.ta-guide-btn:hover { color: var(--t-primary); border-color: var(--t-primary); background: var(--t-primary-bg); }

/* === Travel Settings (Prefs) === */
.ta-prefs-wrap { position: relative; }
.ta-prefs-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--t-gray-200);
  border-radius: var(--t-radius-sm); background: var(--t-white);
  color: var(--t-gray-600); cursor: pointer; transition: all var(--t-transition);
  flex-shrink: 0; position: relative;
}
.ta-prefs-btn:hover { color: var(--t-primary); border-color: var(--t-primary); background: var(--t-primary-bg); }
.ta-prefs-btn.active { color: var(--t-primary); border-color: var(--t-primary); background: var(--t-primary-bg); }
.ta-prefs-badge {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; background: var(--t-primary);
  border-radius: 50%; border: 1.5px solid var(--t-white);
}
.ta-prefs-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 300;
  background: var(--t-white); border: 1px solid var(--t-gray-200);
  border-radius: var(--t-radius); box-shadow: var(--t-shadow-lg);
  min-width: 200px; padding: 12px; animation: prefsFadeIn 0.15s ease;
}
.ta-prefs-wrap.open .ta-prefs-dropdown { display: block; }
@keyframes prefsFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.ta-prefs-section { margin-bottom: 12px; }
.ta-prefs-section:last-of-type { margin-bottom: 10px; }
.ta-prefs-label {
  font-size: 0.72rem; font-weight: 700; color: var(--t-gray-600);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.ta-prefs-check, .ta-prefs-radio {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 0.82rem; color: var(--t-gray-700);
  cursor: pointer; user-select: none;
}
.ta-prefs-check input, .ta-prefs-radio input {
  width: 16px; height: 16px; margin: 0; accent-color: var(--t-primary); cursor: pointer;
}
.ta-prefs-apply {
  width: 100%; padding: 7px; border: none; border-radius: var(--t-radius-sm);
  background: var(--t-primary); color: var(--t-white);
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: background var(--t-transition);
}
.ta-prefs-apply:hover { background: var(--t-primary-dark); }

/* === App Guide Modal === */
.ta-modal-guide { max-width: 480px; }
.ta-guide-content { margin: 16px 0; }
.ta-guide-step {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--t-gray-100);
}
.ta-guide-step:last-child { border-bottom: none; }
.ta-guide-num {
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--t-primary); color: var(--t-white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}
.ta-guide-step-body h4 {
  font-size: 0.88rem; font-weight: 600; color: var(--t-gray-800); margin-bottom: 4px;
}
.ta-guide-step-body p {
  font-size: 0.8rem; color: var(--t-gray-600); line-height: 1.5; margin: 0;
}

/* Auth menu language selector */
.ta-auth-menu-lang {
  padding: 6px 14px 8px; border-bottom: 1px solid var(--t-gray-100); margin-bottom: 4px;
}
.ta-auth-menu-lang .ta-lang-select { width: 100%; }

/* Hide header lang select when logged in */
.ta-auth-logged-in #ta-lang-select { display: none; }

/* === Search (inside sidebar) === */
.ta-search-wrap {
  padding: 10px 14px 0; position: relative; flex-shrink: 0;
}
.ta-search {
  width: 100%; padding: 8px 14px 8px 36px;
  border: 1px solid var(--t-gray-200); border-radius: 50px;
  font-size: 0.88rem; background: var(--t-gray-50);
  transition: border-color var(--t-transition);
}
.ta-search:focus { outline: none; border-color: var(--t-primary); background: var(--t-white); }
.ta-search-icon {
  position: absolute; left: 26px; top: calc(10px + 50%); transform: translateY(-50%);
  color: var(--t-gray-300); pointer-events: none;
}

/* === Main Layout === */
.ta-layout {
  display: flex; height: 100vh; transition: all 0.3s ease;
}

/* === Sidebar === */
.ta-sidebar {
  width: var(--sidebar-width); height: 100%;
  background: var(--t-white); border-right: 1px solid var(--t-gray-200);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow: hidden; transition: width 0.3s ease, opacity 0.3s ease;
}

/* Sidebar collapsed state */
.ta-layout.sidebar-collapsed .ta-sidebar {
  width: 0; opacity: 0; overflow: hidden; border-right: none;
}
.ta-layout.sidebar-collapsed .ta-sidebar-toggle svg {
  transform: rotate(180deg);
}

/* === Sidebar Toggle Button === */
.ta-sidebar-toggle {
  position: absolute; top: 12px; z-index: 101;
  left: var(--sidebar-width);
  width: 28px; height: 48px;
  background: var(--t-white); border: 1px solid var(--t-gray-200);
  border-left: none; border-radius: 0 8px 8px 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--t-gray-600); transition: all 0.3s ease;
  box-shadow: 2px 0 6px rgba(0,0,0,0.06);
}
.ta-sidebar-toggle:hover { background: var(--t-gray-50); color: var(--t-primary); }
.ta-sidebar-toggle svg { transition: transform 0.3s ease; }
.ta-layout.sidebar-collapsed .ta-sidebar-toggle {
  left: 0;
}

/* === Filters === */
.ta-filters {
  padding: 10px 14px; border-bottom: 1px solid var(--t-gray-100);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.ta-cat-row {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.ta-cat-btn {
  padding: 4px 10px; border: 1px solid var(--t-gray-200); border-radius: 50px;
  background: var(--t-white); color: var(--t-gray-600); font-size: 0.76rem;
  font-weight: 500; cursor: pointer; transition: all var(--t-transition); white-space: nowrap;
}
.ta-cat-btn:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-cat-btn.active { background: var(--t-primary); color: var(--t-white); border-color: var(--t-primary); }
.ta-region-select {
  padding: 6px 10px; border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  font-size: 0.82rem; background: var(--t-white); color: var(--t-gray-700); width: 100%;
}

/* Spot list */
.ta-list {
  flex: 1; overflow-y: auto; padding: 8px;
}
.ta-spot-card {
  display: flex; gap: 12px; padding: 12px;
  border: 1px solid var(--t-gray-100); border-radius: var(--t-radius);
  margin-bottom: 8px; cursor: pointer; transition: all var(--t-transition);
  background: var(--t-white);
}
.ta-spot-card:hover { border-color: var(--t-primary); box-shadow: var(--t-shadow); }
.ta-spot-card.active { border-color: var(--t-primary); background: var(--t-primary-bg); }
.ta-spot-thumb {
  width: 80px; height: 80px; border-radius: var(--t-radius-sm);
  background: var(--t-gray-100); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ta-spot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ta-spot-thumb-empty { font-size: 1.5rem; }
.ta-spot-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ta-spot-cat {
  display: inline-block; padding: 2px 8px; border-radius: 50px;
  font-size: 0.68rem; font-weight: 600; width: fit-content;
}
.ta-spot-name {
  font-size: 0.92rem; font-weight: 600; color: var(--t-gray-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ta-spot-meta {
  font-size: 0.75rem; color: var(--t-gray-300);
  display: flex; gap: 8px; align-items: center;
}
.ta-spot-rating { color: var(--t-accent); font-weight: 600; }
.ta-spot-featured { color: var(--t-primary); font-weight: 600; font-size: 0.7rem; }
.ta-list-status {
  text-align: center; padding: 24px; color: var(--t-gray-300); font-size: 0.9rem;
}
.ta-load-more {
  display: block; width: 100%; padding: 10px; margin: 8px 0;
  border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  background: var(--t-white); color: var(--t-primary); font-weight: 600;
  font-size: 0.85rem; cursor: pointer; transition: all var(--t-transition);
}
.ta-load-more:hover { background: var(--t-primary-bg); border-color: var(--t-primary); }

/* === Detail Panel (replaces list) === */
.ta-detail {
  flex: 1; overflow-y: auto; display: none;
}
.ta-detail.active { display: block; }
.ta-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--t-gray-100);
}
.ta-detail-back {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  font-size: 0.85rem; color: var(--t-gray-600); cursor: pointer;
  border: none; background: none; text-align: left;
  transition: background var(--t-transition);
}
.ta-detail-back:hover { background: var(--t-gray-50); }
.ta-detail-header-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-right: 12px; }
.ta-detail-myspots-btn {
  display: flex; align-items: center; gap: 4px; padding: 5px 12px;
  font-size: 0.78rem; font-weight: 600; color: var(--t-primary); cursor: pointer;
  border: 1px solid var(--t-primary); border-radius: 50px; background: var(--t-white);
  transition: all var(--t-transition); white-space: nowrap;
}
.ta-detail-myspots-btn:hover { background: var(--t-primary-bg); }
.ta-detail-plan-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px;
  background: linear-gradient(135deg, var(--t-primary), var(--t-primary-dark));
  color: var(--t-white); border: none; border-radius: 50px;
  cursor: pointer; font-size: 0.78rem; font-weight: 700; line-height: 1.2;
  transition: transform var(--t-transition), box-shadow var(--t-transition);
  box-shadow: 0 2px 6px rgba(37,99,235,0.3); white-space: nowrap;
}
.ta-detail-plan-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(37,99,235,0.4); }
.ta-detail-plan-btn::before { content: '✨'; font-size: 0.85rem; }
.ta-detail-images {
  width: 100%; overflow-x: auto; display: flex; gap: 2px; background: var(--t-gray-900);
}
.ta-detail-images img {
  height: 220px; object-fit: cover; flex-shrink: 0;
}
.ta-detail-images img:only-child { width: 100%; }
.ta-detail-photos-loading { height: 120px; display: flex; align-items: center; justify-content: center; width: 100%; }
.ta-detail-photos-attr {
  position: absolute; bottom: 4px; right: 8px; font-size: 0.65rem;
  color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.4);
  padding: 2px 6px; border-radius: 3px; flex-shrink: 0; align-self: flex-end;
}
.ta-detail-images { position: relative; }
.ta-detail-body { padding: 16px; }
.ta-detail-body h2 { font-size: 1.25rem; color: var(--t-gray-900); margin: 8px 0; }
.ta-detail-meta {
  display: flex; gap: 12px; font-size: 0.82rem; color: var(--t-gray-600);
  margin-bottom: 12px; flex-wrap: wrap; align-items: center;
}
.ta-detail-stars { color: var(--t-accent); }
.ta-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ta-detail-tag {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 500; text-decoration: none;
}
.ta-detail-tag-ig { background: #F3E8FD; color: #7C3AED; }
.ta-detail-tag-tag { background: var(--t-gray-100); color: var(--t-gray-700); }
.ta-detail-tag:hover { text-decoration: none; opacity: 0.8; }
.ta-detail-desc {
  font-size: 0.92rem; line-height: 1.7; color: var(--t-gray-700);
  margin-bottom: 16px; white-space: pre-line;
}
.ta-detail-address {
  font-size: 0.85rem; color: var(--t-gray-600); margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 6px;
}
.ta-detail-info { margin-bottom: 12px; }
.ta-detail-info-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 0.85rem;
  border-bottom: 1px solid var(--t-gray-200);
}
.ta-detail-info-row:last-child { border-bottom: none; }
.ta-info-icon { font-size: 0.9rem; flex-shrink: 0; }
.ta-info-link {
  color: var(--t-primary); text-decoration: none; font-weight: 500;
}
.ta-info-link:hover { text-decoration: underline; }
.ta-info-busy { color: var(--t-gray-600); font-weight: 400; font-size: 0.8rem; }
.ta-hours-details { flex: 1; }
.ta-hours-details summary {
  cursor: pointer; color: var(--t-text); font-weight: 500;
  list-style: none;
}
.ta-hours-details summary::after { content: ' ▸'; font-size: 0.75rem; color: var(--t-gray-500); }
.ta-hours-details[open] summary::after { content: ' ▾'; }
.ta-hours-list {
  list-style: none; padding: 6px 0 0 0; margin: 0;
  font-size: 0.8rem; color: var(--t-gray-600);
}
.ta-hours-list li { padding: 2px 0; }
.ta-detail-naver {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: #03C75A; color: white;
  border-radius: var(--t-radius-sm); font-weight: 600; font-size: 0.88rem;
  text-decoration: none; transition: background var(--t-transition);
}
.ta-detail-naver:hover { background: #02b351; text-decoration: none; color: white; }
.ta-detail-by {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--t-gray-100);
  font-size: 0.78rem; color: var(--t-gray-300);
}

/* === Map === */
.ta-map-wrap {
  flex: 1; position: relative;
}
#ta-map { width: 100%; height: 100%; }
.ta-map-fallback {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; background: var(--t-gray-100); color: var(--t-gray-600);
}

/* Map provider toggle (offset to clear sidebar-toggle button on left) */
.ta-map-provider {
  position: absolute; top: 10px; left: 48px; z-index: 5;
  display: flex; gap: 2px;
  background: var(--t-white); border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.ta-map-provider-btn {
  padding: 5px 12px; border: none; background: var(--t-white);
  font-size: 0.72rem; font-weight: 600; color: var(--t-gray-600);
  cursor: pointer; transition: all var(--t-transition);
}
.ta-map-provider-btn:hover { background: var(--t-gray-100); }
.ta-map-provider-btn.active { background: var(--t-primary); color: var(--t-white); }

/* Map type toggle (Map / Satellite) */
.ta-map-type {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  display: flex; gap: 2px;
  background: var(--t-white); border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.ta-map-type-btn {
  padding: 5px 12px; border: none; background: var(--t-white);
  font-size: 0.72rem; font-weight: 600; color: var(--t-gray-600);
  cursor: pointer; transition: all var(--t-transition);
}
.ta-map-type-btn:hover { background: var(--t-gray-100); }
.ta-map-type-btn.active { background: var(--t-primary); color: var(--t-white); }

/* Google Map detail button */
.ta-detail-google {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: #4285F4; color: white;
  border-radius: var(--t-radius-sm); font-weight: 600; font-size: 0.88rem;
  text-decoration: none; transition: background var(--t-transition);
}
.ta-detail-google:hover { background: #3367D6; text-decoration: none; color: white; }

/* Spot share buttons */
.ta-spot-share {
  display: flex; gap: 6px; margin-top: 12px;
}
.ta-share-spot-btn {
  height: 32px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 0.75rem; font-weight: 600; color: var(--t-white);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; transition: opacity var(--t-transition);
}
.ta-share-spot-btn:hover { opacity: 0.85; }
.ta-share-spot-copy { width: 32px; padding: 0; background: var(--t-gray-200); color: var(--t-gray-700); border-radius: 50%; font-size: 1rem; }
.ta-share-spot-copy:hover { background: var(--t-primary-bg); color: var(--t-primary); }
.ta-share-spot-whatsapp { background: #25D366; }
.ta-share-spot-facebook { background: #1877F2; }
.ta-share-spot-zalo { background: #0068FF; }

/* FAB - "Share a Spot" button. Compact pill anchored to the bottom-right
   corner; bottom: 24px sits just above the Google attribution strip. */
.ta-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  padding: 10px 18px; background: var(--t-primary); color: var(--t-white);
  border: none; border-radius: 50px; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; box-shadow: 0 4px 16px rgba(225,29,46,0.4);
  transition: all var(--t-transition); display: flex; align-items: center; gap: 8px;
}
.ta-fab:hover { background: var(--t-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(225,29,46,0.5); }

/* === Submit Modal === */
.ta-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.ta-modal-overlay.active { display: flex; }
.ta-modal {
  background: var(--t-white); border-radius: var(--t-radius);
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 28px 24px;
}
.ta-modal h2 { font-size: 1.2rem; color: var(--t-gray-900); margin-bottom: 4px; }
.ta-modal-notice {
  font-size: 0.85rem; color: var(--t-primary); background: var(--t-primary-bg);
  padding: 8px 14px; border-radius: var(--t-radius-sm); margin-bottom: 20px;
}
.ta-form-group { margin-bottom: 16px; }
.ta-form-group label {
  display: block; font-weight: 600; font-size: 0.85rem;
  color: var(--t-gray-700); margin-bottom: 4px;
}
.ta-form-group input, .ta-form-group select, .ta-form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--t-gray-200);
  border-radius: var(--t-radius-sm); font-size: 0.88rem; font-family: inherit;
  transition: border-color var(--t-transition);
}
.ta-form-group input:focus, .ta-form-group select:focus, .ta-form-group textarea:focus {
  outline: none; border-color: var(--t-primary);
}
.ta-form-group textarea { resize: vertical; min-height: 100px; }
.ta-form-row { display: flex; gap: 8px; }
.ta-form-row input { flex: 1; }
.ta-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ta-btn-primary {
  padding: 9px 22px; background: var(--t-primary); color: var(--t-white);
  border: none; border-radius: var(--t-radius-sm); font-weight: 600;
  font-size: 0.88rem; cursor: pointer; transition: background var(--t-transition);
}
.ta-btn-primary:hover { background: var(--t-primary-dark); }
.ta-btn-secondary {
  padding: 9px 22px; background: var(--t-white); color: var(--t-gray-700);
  border: 1px solid var(--t-gray-300); border-radius: var(--t-radius-sm);
  font-weight: 500; font-size: 0.88rem; cursor: pointer; transition: all var(--t-transition);
}
.ta-btn-secondary:hover { border-color: var(--t-gray-600); }

/* === Auth === */
.ta-auth { position: relative; }
.ta-auth-login {
  padding: 5px 12px; border: 1px solid var(--t-primary); border-radius: var(--t-radius-sm);
  background: var(--t-white); color: var(--t-primary); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all var(--t-transition); white-space: nowrap;
}
.ta-auth-login:hover { background: var(--t-primary-bg); }
.ta-auth-profile {
  position: relative; cursor: pointer;
}
.ta-auth-avatar {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--t-gray-200);
  object-fit: cover; transition: border-color var(--t-transition);
}
.ta-auth-avatar:hover { border-color: var(--t-primary); }
.ta-auth-menu {
  display: none; position: absolute; top: 38px; right: 0; z-index: 300;
  background: var(--t-white); border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  box-shadow: var(--t-shadow-lg); min-width: 160px; padding: 6px 0;
}
.ta-auth-profile.open .ta-auth-menu { display: block; }
.ta-auth-name {
  padding: 8px 14px; font-size: 0.82rem; font-weight: 600; color: var(--t-gray-800);
  border-bottom: 1px solid var(--t-gray-100); margin-bottom: 4px;
}
.ta-auth-menu button {
  display: block; width: 100%; padding: 8px 14px; border: none; background: none;
  text-align: left; font-size: 0.82rem; color: var(--t-gray-700); cursor: pointer;
  transition: background var(--t-transition);
}
.ta-auth-menu button:hover { background: var(--t-gray-50); }

/* === Tabs === */
.ta-tabs {
  display: flex; border-bottom: 1px solid var(--t-gray-200); flex-shrink: 0;
}
.ta-tab {
  flex: 1; padding: 10px; border: none; background: none; font-size: 0.82rem;
  font-weight: 600; color: var(--t-gray-300); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all var(--t-transition);
}
.ta-tab:hover { color: var(--t-gray-600); }
.ta-tab.active { color: var(--t-primary); border-bottom-color: var(--t-primary); }

/* Tab content */
.ta-tab-content { display: none; flex: 1; overflow: hidden; flex-direction: column; }
.ta-tab-content.active { display: flex; }

/* === My Spots === */
.ta-myspots {
  flex: 1; overflow-y: auto; padding: 12px;
}
.ta-myspots-section { margin-bottom: 16px; padding: 10px; border-radius: var(--t-radius-sm); }
.ta-myspots-section h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.5px; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--t-gray-100);
}
.ta-myspots-section-visit { background: rgba(37,99,235,0.04); border: 1px solid rgba(37,99,235,0.18); }
.ta-myspots-section-visit h3 { color: var(--t-primary-dark); border-bottom-color: rgba(37,99,235,0.18); }
.ta-myspots-section-interested { background: rgba(239,68,68,0.04); border: 1px solid rgba(239,68,68,0.18); }
.ta-myspots-section-interested h3 { color: #B91C1C; border-bottom-color: rgba(239,68,68,0.18); }
.ta-myspots-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; color: #fff;
  font-size: 0.7rem; font-weight: 800; line-height: 1;
}
.ta-myspots-tag-visit { background: var(--t-navy); }
.ta-myspots-tag-interested { background: #EF4444; font-weight: 400; }
.ta-myspots-target-note {
  font-size: 0.72rem; color: var(--t-gray-500); padding: 0 4px 10px;
  text-align: center; line-height: 1.4;
}
.ta-myspots-list { min-height: 40px; }
.ta-myspots-empty {
  font-size: 0.82rem; color: var(--t-gray-300); padding: 12px 0;
}
.ta-myspot-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--t-gray-100); border-radius: var(--t-radius-sm);
  margin-bottom: 6px; cursor: pointer; transition: all var(--t-transition);
}
.ta-myspot-item:hover { border-color: var(--t-primary); background: var(--t-primary-bg); }
.ta-myspot-icon { font-size: 1.1rem; flex-shrink: 0; }
.ta-myspot-name { flex: 1; font-size: 0.85rem; font-weight: 500; color: var(--t-gray-800); }
.ta-myspot-remove {
  width: 22px; height: 22px; border: none; background: none; color: var(--t-gray-300);
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all var(--t-transition);
}
.ta-myspot-remove:hover { color: #EF4444; background: #FEF2F2; }

/* Planner CTA in My Spots — moved to top of panel for visibility */
.ta-planner-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 12px; margin: 0 0 6px;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--t-primary), var(--t-primary-dark));
  color: var(--t-white); border: none; border-radius: var(--t-radius);
  font-weight: 700; font-size: 0.92rem; cursor: pointer;
  box-shadow: 0 4px 12px rgba(225,29,46,0.3); transition: all var(--t-transition);
}
.ta-planner-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(225,29,46,0.4); }

/* === Detail Bookmark Buttons === */
.ta-detail-bookmarks {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.ta-bookmark-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 14px; flex: 1;
  border: 1px solid var(--t-gray-200); border-radius: 50px;
  background: var(--t-white); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all var(--t-transition); color: var(--t-gray-600);
}
.ta-bookmark-btn:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-bookmark-btn.active-visit {
  background: var(--t-navy-bg); border-color: var(--t-navy); color: var(--t-navy);
}
.ta-bookmark-btn.active-interested {
  background: #FEF3C7; border-color: #F59E0B; color: #F59E0B;
}
.ta-bookmark-btn svg { width: 14px; height: 14px; }

/* Spot card bookmark indicator */
.ta-spot-bookmark-badge {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ta-spot-bookmark-badge.visit { background: var(--t-navy); }
.ta-spot-bookmark-badge.interested { background: #F59E0B; }

/* === Planner Modal === */
.ta-modal-planner { max-width: 640px; }
.ta-planner-days {
  display: flex; align-items: center; gap: 10px;
}
.ta-planner-days input[type="range"] {
  flex: 1; accent-color: var(--t-primary); padding: 0;
}
.ta-planner-days span:first-of-type {
  font-size: 1.1rem; font-weight: 700; color: var(--t-primary); min-width: 24px; text-align: center;
}
.ta-planner-options {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.ta-option-btn {
  padding: 6px 14px; border: 1px solid var(--t-gray-200); border-radius: 50px;
  background: var(--t-white); color: var(--t-gray-600); font-size: 0.82rem;
  font-weight: 500; cursor: pointer; transition: all var(--t-transition);
}
.ta-option-btn:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-option-btn.active { background: var(--t-primary); color: var(--t-white); border-color: var(--t-primary); }

.ta-planner-spots {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  max-height: 200px; overflow-y: auto; width: 100%;
}
.ta-planner-spot-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--t-gray-100); border-radius: var(--t-radius-sm);
  font-size: 0.85rem; width: 100%; text-align: left;
}
.ta-planner-spot-item input[type="checkbox"] { accent-color: var(--t-primary); flex-shrink: 0; width: 16px; height: 16px; margin: 0; }
.ta-planner-spot-item label { cursor: pointer; flex: 1; text-align: left; }

/* Planner result */
.ta-planner-result {
  background: var(--t-gray-50); border: 1px solid var(--t-gray-200);
  border-radius: var(--t-radius-sm); padding: 20px; margin: 16px 0;
  font-size: 0.9rem; line-height: 1.8; color: var(--t-gray-800);
  max-height: 60vh; overflow-y: auto;
}
.ta-planner-result h1, .ta-planner-result h2, .ta-planner-result h3 {
  color: var(--t-gray-900); margin: 16px 0 8px;
}
.ta-planner-result h1 { font-size: 1.1rem; }
.ta-planner-result h2 { font-size: 1rem; }
.ta-planner-result h3 { font-size: 0.95rem; }
.ta-planner-result strong { color: var(--t-primary-dark); }
.ta-planner-result ul, .ta-planner-result ol { padding-left: 20px; margin: 8px 0; }
.ta-planner-result li { margin-bottom: 4px; }
.ta-planner-result li.ta-md-ol { list-style: none; }

/* Planner table styles */
.ta-table-wrap { overflow-x: auto; margin: 12px 0; -webkit-overflow-scrolling: touch; }
.ta-plan-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem; line-height: 1.5;
  white-space: nowrap;
}
.ta-plan-table th, .ta-plan-table td {
  border: 1px solid var(--t-gray-200); padding: 8px 12px; text-align: left;
}
.ta-plan-table th {
  background: var(--t-primary); color: var(--t-white); font-weight: 600;
  position: sticky; top: 0;
}
.ta-plan-table tbody tr:nth-child(even) { background: var(--t-white); }
.ta-plan-table tbody tr:nth-child(odd) { background: var(--t-gray-50); }
.ta-plan-table tbody tr:hover { background: rgba(225,29,46,0.06); }
.ta-plan-table td:last-child, .ta-plan-table th:last-child { white-space: normal; }

/* Planner loading */
.ta-planner-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 16px;
}
.ta-spinner {
  width: 40px; height: 40px; border: 3px solid var(--t-gray-200);
  border-top-color: var(--t-primary); border-radius: 50%;
  animation: ta-spin 0.8s linear infinite;
}
@keyframes ta-spin { to { transform: rotate(360deg); } }
.ta-planner-loading p { color: var(--t-gray-600); font-size: 0.92rem; }

/* Share button & panel */
.ta-btn-share {
  padding: 8px 16px; border-radius: var(--t-radius-sm); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: 2px solid var(--t-navy); background: var(--t-white); color: var(--t-navy);
}
.ta-btn-share:hover { background: var(--t-navy); color: var(--t-white); }
.ta-share-panel {
  border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  padding: 14px; margin: 12px 0; background: var(--t-gray-50);
}
.ta-share-header { font-size: 0.85rem; font-weight: 600; color: var(--t-gray-800); margin-bottom: 10px; }
.ta-share-url-row { display: flex; gap: 6px; margin-bottom: 10px; }
.ta-share-url {
  flex: 1; padding: 8px 10px; border: 1px solid var(--t-gray-200); border-radius: 4px;
  font-size: 0.8rem; color: var(--t-gray-700); background: var(--t-white); outline: none;
}
.ta-share-copy {
  padding: 8px 14px; border: 1px solid var(--t-gray-300); border-radius: 4px;
  background: var(--t-white); cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--t-gray-700); white-space: nowrap;
}
.ta-share-copy:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ta-share-btn {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; color: var(--t-white); text-decoration: none;
  transition: opacity 0.2s;
}
.ta-share-btn:hover { opacity: 0.85; }
.ta-share-whatsapp { background: #25D366; }
.ta-share-facebook { background: #1877F2; }
.ta-share-zalo { background: #0068FF; }
.ta-share-loading { font-size: 0.85rem; color: var(--t-gray-500); text-align: center; padding: 8px; }
.ta-share-error { font-size: 0.85rem; color: #EF4444; text-align: center; }

/* Save button */
.ta-btn-save {
  padding: 8px 16px; border-radius: var(--t-radius-sm); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: 2px solid var(--t-primary); background: var(--t-white); color: var(--t-primary);
}
.ta-btn-save:hover { background: var(--t-primary); color: var(--t-white); }

/* My Plans */
.ta-myplans-notice { font-size: 0.78rem; color: var(--t-gray-500); margin-bottom: 12px; }
.ta-myplans-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; }
.ta-myplans-card {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  cursor: pointer; transition: border-color 0.2s;
}
.ta-myplans-card:hover { border-color: var(--t-primary); }
.ta-myplans-card.selected { border-color: var(--t-primary); background: rgba(225,29,46,0.05); }
.ta-myplans-card-check { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--t-primary); }
.ta-myplans-card-info { flex: 1; min-width: 0; }
.ta-myplans-card-title { font-weight: 600; font-size: 0.9rem; color: var(--t-gray-900); }
.ta-myplans-card-meta { font-size: 0.78rem; color: var(--t-gray-500); margin-top: 2px; }
.ta-myplans-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ta-myplans-card-actions button {
  padding: 4px 10px; font-size: 0.75rem; border-radius: 4px; cursor: pointer; border: 1px solid var(--t-gray-300);
  background: var(--t-white); color: var(--t-gray-600);
}
.ta-myplans-card-actions button:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-myplans-card-actions .ta-btn-delete:hover { border-color: #EF4444; color: #EF4444; }
.ta-myplans-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ta-myplans-detail-header h2 { margin: 0; }
.ta-myplans-detail-meta { font-size: 0.82rem; color: var(--t-gray-500); margin-bottom: 12px; }
.ta-btn-back {
  padding: 6px 12px; border: 1px solid var(--t-gray-300); border-radius: var(--t-radius-sm);
  background: var(--t-white); cursor: pointer; font-size: 0.82rem; color: var(--t-gray-600);
}
.ta-btn-back:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-myplans-empty { text-align: center; padding: 40px 20px; color: var(--t-gray-500); font-size: 0.9rem; }

/* Compare Plans */
.ta-modal-compare { max-width: 900px; }
.ta-compare-content { display: flex; gap: 12px; max-height: 60vh; overflow-y: auto; }
.ta-compare-col {
  flex: 1; min-width: 0; border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm); overflow: hidden;
}
.ta-compare-col-header {
  padding: 10px 12px; background: var(--t-gray-50); border-bottom: 1px solid var(--t-gray-200);
}
.ta-compare-col-header h3 { font-size: 0.88rem; margin: 0 0 4px; color: var(--t-gray-900); }
.ta-compare-col-header .meta { font-size: 0.75rem; color: var(--t-gray-500); }
.ta-compare-col-body {
  padding: 12px; font-size: 0.82rem; line-height: 1.7; color: var(--t-gray-800);
  max-height: 50vh; overflow-y: auto; white-space: pre-wrap;
}
.ta-compare-col-body h1, .ta-compare-col-body h2, .ta-compare-col-body h3 { margin: 12px 0 6px; }
.ta-compare-col-body h1 { font-size: 1rem; }
.ta-compare-col-body h2 { font-size: 0.92rem; }
.ta-compare-col-body h3 { font-size: 0.85rem; }
.ta-compare-col-body strong { color: var(--t-primary-dark); }
.ta-compare-col-body ul, .ta-compare-col-body ol { padding-left: 16px; }
.ta-compare-tabs { display: none; }
.ta-compare-tab { padding: 8px 16px; border: none; background: none; cursor: pointer; font-size: 0.85rem; color: var(--t-gray-500); border-bottom: 2px solid transparent; }
.ta-compare-tab.active { color: var(--t-primary); border-bottom-color: var(--t-primary); font-weight: 600; }

/* Travel Tips */
.ta-tips-btn {
  display: block; width: calc(100% - 2.5rem); margin: 0 1.25rem 0.5rem; padding: 10px;
  background: var(--t-gray-50); border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  cursor: pointer; font-size: 0.85rem; color: var(--t-gray-700); text-align: center;
  transition: border-color 0.2s, color 0.2s;
}
.ta-tips-btn:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-modal-tips { max-width: 520px; }
.ta-tips-content { max-height: 60vh; overflow-y: auto; }
.ta-tips-section { margin-bottom: 20px; }
.ta-tips-section h3 { font-size: 0.92rem; color: var(--t-primary-dark); margin-bottom: 8px; border-bottom: 1px solid var(--t-gray-100); padding-bottom: 6px; }
.ta-tips-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 8px; }
.ta-tips-table td { padding: 6px 8px; border-bottom: 1px solid var(--t-gray-100); }
.ta-tips-table td:first-child { font-weight: 600; color: var(--t-gray-800); white-space: nowrap; width: 40%; }
.ta-tips-table td:last-child { color: var(--t-gray-600); }
.ta-tips-list { list-style: none; padding: 0; margin: 0; }
.ta-tips-list li { padding: 6px 0; font-size: 0.82rem; color: var(--t-gray-700); border-bottom: 1px solid var(--t-gray-50); line-height: 1.5; }
.ta-tips-list li:last-child { border-bottom: none; }
.ta-tips-official { font-size: 0.78rem; color: var(--t-gray-500); margin-bottom: 16px; text-align: center; }
.ta-tips-desc { font-size: 0.82rem; color: var(--t-gray-600); margin-bottom: 10px; line-height: 1.5; }
.ta-tips-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ta-tips-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px;
  border: 1px solid var(--t-gray-200); border-radius: var(--t-radius-sm);
  font-size: 0.82rem; color: var(--t-gray-700); text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.ta-tips-link:hover { border-color: var(--t-primary); color: var(--t-primary); }
.ta-tips-link-primary { border-color: var(--t-primary); color: var(--t-primary); font-weight: 600; }
.ta-tips-link-primary:hover { background: var(--t-primary); color: var(--t-white); }
.ta-tips-taxi { border-top: 2px solid var(--t-primary); padding-top: 16px; margin-top: 8px; }
.ta-tips-taxi h4 { font-size: 0.85rem; color: var(--t-gray-800); margin: 14px 0 6px; }
.ta-tips-updated { font-size: 0.75rem; color: var(--t-gray-400); text-align: right; margin-top: 12px; }

/* Toast notification */
.ta-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  padding: 10px 20px; background: var(--t-gray-900); color: var(--t-white);
  border-radius: 50px; font-size: 0.85rem; font-weight: 500;
  z-index: 500; opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.ta-toast.show { opacity: 1; }

/* === Category Colors === */
.cat-food { background: #FEF2F2; color: #EF4444; }
.cat-attraction { background: #EFF6FF; color: #3B82F6; }
.cat-cafe { background: #FFFBEB; color: #F59E0B; }
.cat-nature { background: #F0FDF4; color: #22C55E; }
.cat-shopping { background: #F5F3FF; color: #8B5CF6; }
.cat-nightlife { background: #FDF2F8; color: #EC4899; }
.cat-halal { background: #EFF6FF; color: #2563EB; }
.cat-mosque { background: #ECFEFF; color: #0891B2; }
.cat-vegetarian { background: #F7FEE7; color: #65A30D; }

/* (Muslim toggle removed — merged into Travel Settings dropdown) */

/* === Mobile Bottom Sheet === */
/* Drag handle hidden on desktop */
.ta-drag-handle { display: none; }

/* Map/List toggle FAB (mobile only) */
.ta-view-toggle {
  display: none; position: fixed; z-index: 60;
  left: 50%; transform: translateX(-50%);
  padding: 10px 20px; border: none; border-radius: 50px;
  background: var(--t-gray-900); color: var(--t-white);
  font-weight: 600; font-size: 0.82rem; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: opacity 0.2s, bottom 0.35s cubic-bezier(0.32, 0.72, 0, 1), transform 0.15s ease;
  gap: 6px; align-items: center;
}
.ta-view-toggle svg { width: 16px; height: 16px; }

/* Category scroll fade hint (mobile) */
.ta-cat-row-wrap {
  position: relative;
}
.ta-cat-row-wrap::after {
  content: ''; display: none;
  position: absolute; right: 0; top: 0; bottom: 0; width: 32px;
  background: linear-gradient(to right, transparent, var(--t-white));
  pointer-events: none; z-index: 1;
}

/* Modal close X button */
.ta-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border: none; background: var(--t-gray-100);
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  color: var(--t-gray-600); font-size: 1.1rem; transition: all 0.2s;
  z-index: 5;
}
.ta-modal-close:hover { background: var(--t-gray-200); color: var(--t-gray-900); }

/* Modal needs relative for close button positioning */
.ta-modal { position: relative; }

/* === Mobile Responsive === */
@media (max-width: 768px) {
  .ta-koinfo-link { display: none; }

  /* Bottom sheet layout */
  .ta-layout { flex-direction: column; position: relative; }
  .ta-map-wrap { flex: 1; height: 100vh; min-height: 0; padding-top: 44px; }
  .ta-sidebar {
    width: 100%; border-right: none;
    border-top: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 100;
    height: 50vh;
    transition: height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    will-change: height;
  }
  .ta-sidebar.dragging {
    transition: none;
  }
  /* Snap states */
  .ta-sidebar.snap-peek { height: 15vh; }
  .ta-sidebar.snap-half { height: 50vh; }
  .ta-sidebar.snap-full { height: 85vh; }

  .ta-sidebar-toggle { display: none; }
  .ta-layout.sidebar-collapsed .ta-sidebar {
    width: 100%; opacity: 1; border-right: none;
  }

  /* Drag handle */
  .ta-drag-handle {
    display: flex; align-items: center; justify-content: center;
    padding: 8px 0 4px; cursor: grab; flex-shrink: 0;
    touch-action: none;
  }
  .ta-drag-handle:active { cursor: grabbing; }
  .ta-drag-handle-bar {
    width: 40px; height: 4px; background: var(--t-gray-300);
    border-radius: 2px; transition: background 0.2s;
  }
  .ta-drag-handle:hover .ta-drag-handle-bar,
  .ta-drag-handle:active .ta-drag-handle-bar {
    background: var(--t-gray-600);
  }

  /* Hide old pseudo-element handle */
  .ta-sidebar::before { display: none; }

  /* Fixed top bar on mobile */
  .ta-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: 48px; padding: 0 10px;
  }
  .ta-brand-logo { height: 30px; }
  /* No padding-top needed: sidebar is bottom sheet, header floats above map */

  /* Category row: horizontal scroll with fade hint */
  .ta-cat-row-wrap::after { display: block; }
  .ta-cat-row-wrap.scrolled-end::after { display: none; }
  .ta-cat-row {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  .ta-cat-row::-webkit-scrollbar { display: none; }
  .ta-cat-btn { flex-shrink: 0; padding: 6px 12px; font-size: 0.78rem; }

  /* Filter area compact */
  .ta-filters { padding: 6px 10px; gap: 6px; }

  /* Better touch targets for spot cards */
  .ta-spot-card { padding: 10px; gap: 10px; min-height: 44px; }
  .ta-spot-thumb { width: 60px; height: 60px; }
  .ta-spot-name { font-size: 0.88rem; }

  /* Prefs dropdown full-width on mobile */
  .ta-prefs-dropdown { min-width: 180px; right: -40px; }

  /* Search */
  .ta-search-wrap { padding: 6px 10px 0; }
  .ta-search { padding: 10px 14px 10px 36px; font-size: 0.9rem; }

  /* Detail panel */
  .ta-detail-images img { height: 200px; }
  .ta-detail-body { padding: 12px; }
  .ta-detail-body h2 { font-size: 1.1rem; }
  .ta-detail-bookmarks { flex-wrap: nowrap; }
  .ta-bookmark-btn { padding: 8px 12px; font-size: 0.8rem; }
  .ta-detail-back { padding: 8px 12px; min-height: 44px; }
  .ta-detail-myspots-btn { margin-right: 10px; padding: 5px 10px; font-size: 0.75rem; }

  /* FAB position above bottom sheet, with extra clearance for the map's
     bottom attribution strip on the visible map portion */
  .ta-fab {
    bottom: calc(50vh + 44px); right: 12px;
    padding: 12px 18px; font-size: 0.85rem;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* View toggle visible on mobile */
  .ta-view-toggle { display: flex; }

  /* Modals: full-screen style with swipe-to-close */
  .ta-modal-overlay {
    padding: 0; align-items: flex-end;
  }
  .ta-modal {
    max-height: 92vh; border-radius: 16px 16px 0 0;
    max-width: 100%; padding: 24px 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .ta-modal h2 { font-size: 1.1rem; padding-right: 36px; }
  .ta-modal-planner { max-width: 100%; }
  .ta-modal-tips { max-width: 100%; }

  /* Modal drag indicator */
  .ta-modal::before {
    content: ''; display: block;
    width: 40px; height: 4px;
    background: var(--t-gray-300); border-radius: 2px;
    margin: 0 auto 16px;
  }

  /* Planner options better touch */
  .ta-option-btn { padding: 8px 16px; font-size: 0.85rem; }
  .ta-planner-days input[type="range"] { height: 28px; }

  /* Share buttons wrap */
  .ta-share-buttons { gap: 6px; }
  .ta-share-btn { padding: 8px 12px; font-size: 0.78rem; }
  .ta-share-url-row { flex-direction: column; }

  /* Compare: mobile friendly */
  .ta-compare-content { flex-direction: column; }
  .ta-compare-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--t-gray-200); margin-bottom: 8px; }
  .ta-compare-col { display: none; }
  .ta-compare-col.active { display: block; }

  /* Tabs better touch */
  .ta-tab { padding: 12px 8px; font-size: 0.85rem; min-height: 44px; }

  /* My spots better spacing */
  .ta-myspot-item { padding: 10px 12px; min-height: 44px; }
  .ta-myspot-remove { width: 28px; height: 28px; }

  /* Form actions stacked on narrow screens */
  .ta-form-actions { flex-wrap: wrap; }
  .ta-btn-primary, .ta-btn-secondary, .ta-btn-save, .ta-btn-share {
    padding: 10px 18px; font-size: 0.9rem;
  }

  /* Region select bigger */
  .ta-region-select { padding: 8px 10px; font-size: 0.85rem; }

  /* Footer hidden on mobile (moved to About) */

  /* Toast above sidebar */
  .ta-toast { bottom: calc(50vh + 60px); font-size: 0.82rem; }

  /* Content fade transition for smooth view toggle */
  .ta-sidebar .ta-search-wrap,
  .ta-sidebar .ta-tabs,
  .ta-sidebar .ta-tab-content,
  .ta-sidebar .ta-detail,
  .ta-sidebar .ta-tips-btn,
  .ta-sidebar .ta-footer,
  .ta-sidebar .ta-filters {
    transition: opacity 0.2s ease;
    opacity: 1;
  }

  /* Peek state: fade out and collapse content */
  .ta-sidebar.snap-peek .ta-search-wrap,
  .ta-sidebar.snap-peek .ta-tabs,
  .ta-sidebar.snap-peek .ta-tab-content,
  .ta-sidebar.snap-peek .ta-detail,
  .ta-sidebar.snap-peek .ta-tips-btn,
  .ta-sidebar.snap-peek .ta-footer,
  .ta-sidebar.snap-peek .ta-filters {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  /* Stack form actions vertically */
  .ta-form-actions {
    flex-direction: column;
  }
  .ta-form-actions button { width: 100%; }

  /* Bookmark buttons stay in row */
  .ta-detail-bookmarks { gap: 6px; }
  .ta-bookmark-btn { padding: 6px 8px; font-size: 0.75rem; }
}

/* Footer — two stacked lines */
.ta-footer {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.5rem 1rem; text-align: center;
  border-top: 1px solid var(--t-gray-200); background: var(--t-gray-50);
  font-size: 0.72rem; color: var(--t-gray-500);
}
.ta-footer-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.25rem; }
.ta-footer a { color: var(--t-gray-500); text-decoration: none; }
.ta-footer a:hover { color: var(--t-primary); text-decoration: underline; }
.ta-footer-sep { color: var(--t-gray-300); margin: 0 0.1rem; }

/* Auth menu footer (for app mode) */
.ta-auth-menu-footer {
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 6px 14px; font-size: 0.72rem; color: var(--t-gray-400);
  border-top: 1px solid var(--t-gray-100); margin-top: 4px;
}
.ta-auth-menu-footer a { color: var(--t-gray-400); text-decoration: none; font-size: 0.72rem; }
.ta-auth-menu-footer a:hover { color: var(--t-primary); }

/* Desktop-only: visible on desktop web, hidden on mobile and app */
.ta-desktop-only { display: block; }
@media (max-width: 768px) {
  .ta-desktop-only { display: none !important; }
}

/* App mode (standalone/TWA): hide web-only, show app-only */
.ta-app-only { display: none !important; }
@media (display-mode: standalone) {
  .ta-web-only { display: none !important; }
  .ta-desktop-only { display: none !important; }
  .ta-app-only { display: block !important; }
  .ta-auth-menu .ta-app-only { display: block !important; }
}

/* About modal */
.ta-modal-about { max-width: 400px; }
.ta-about-content { margin: 16px 0; }
.ta-about-logo { text-align: center; margin-bottom: 16px; }
.ta-about-logo img { height: 48px; border-radius: 8px; }
.ta-about-version {
  text-align: center; font-size: 0.78rem; color: var(--t-gray-600); margin-bottom: 16px;
}
.ta-about-links {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--t-gray-100);
}
.ta-about-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; font-size: 0.85rem; color: var(--t-gray-700);
  text-decoration: none; border-bottom: 1px solid var(--t-gray-100);
  transition: background var(--t-transition);
}
.ta-about-links a:hover { background: var(--t-gray-50); }
.ta-about-links a::after { content: '›'; color: var(--t-gray-300); font-size: 1.1rem; }

/* Splash Screen — hidden by default, shown only in standalone app mode */
.ta-splash { display: none; }
@media (display-mode: standalone) {
  .ta-splash {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--t-white);
    display: flex; align-items: center; justify-content: center;
    animation: splashOut 0.4s ease 1s forwards;
  }
}
.ta-splash-inner { text-align: center; }
.ta-splash-logo { width: min(70vw, 320px); height: auto; }
@keyframes splashOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* Guide auto-popup dismiss buttons */
.ta-guide-dismiss {
  display: flex; gap: 8px; margin-top: 12px;
  border-top: 1px solid var(--t-gray-100); padding-top: 12px;
}
.ta-guide-dismiss-btn {
  flex: 1; padding: 10px 8px; border: 1px solid var(--t-gray-200);
  border-radius: var(--t-radius-sm); background: var(--t-white);
  font-size: 0.8rem; color: var(--t-gray-600); cursor: pointer;
  transition: background var(--t-transition);
}
.ta-guide-dismiss-btn:hover { background: var(--t-gray-50); }
.ta-guide-dismiss-today { border-color: var(--t-primary-light); color: var(--t-primary); }

/* ============================================================ */
/* RTL Support — applied when <html dir="rtl"> + body.rtl set    */
/* (Currently active only for Arabic.)                            */
/* ============================================================ */
[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Tajawal', 'Cairo', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
[dir="rtl"] .ta-search-icon { left: auto; right: 16px; }
[dir="rtl"] .ta-search { padding-left: 14px; padding-right: 38px; text-align: right; }
[dir="rtl"] .ta-cat-row { flex-direction: row-reverse; }
[dir="rtl"] .ta-modal-close { left: 12px; right: auto; }
[dir="rtl"] .ta-detail-back::before { content: '→'; }
[dir="rtl"] .ta-detail-back { content: ''; }
[dir="rtl"] .ta-myspots-tag { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .ta-spot-bookmark-badge { right: auto; left: 6px; }
[dir="rtl"] .ta-spot-featured { float: left; }
[dir="rtl"] .ta-prefs-dropdown { right: auto; left: 0; }
[dir="rtl"] .ta-auth-menu { right: auto; left: 0; }
[dir="rtl"] .ta-fab { right: auto; left: 16px; }
[dir="rtl"] .ta-view-toggle { right: auto; left: 16px; }
[dir="rtl"] .ta-sidebar-toggle svg { transform: scaleX(-1); }
[dir="rtl"] .ta-tips-list { padding-right: 20px; padding-left: 0; }
[dir="rtl"] .ta-tips-table td:first-child { font-weight: 600; }
[dir="rtl"] .ta-form-actions { flex-direction: row-reverse; }
[dir="rtl"] .ta-spot-card { text-align: right; }
[dir="rtl"] .ta-detail-body { text-align: right; }
/* Map controls keep LTR (Google Maps native chrome doesn't honor dir reliably). */
[dir="rtl"] #ta-map { direction: ltr; }
[dir="rtl"] .ta-map-type { direction: ltr; }
