@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap&font-display=swap');

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

:root {
  /* SeaVibe paleta */
  --teal:        #2ED3C6;
  --teal-dim:    rgba(46,211,198,.15);
  --teal-glow:   rgba(46,211,198,.25);
  --navy:        #0B1E2D;
  --navy2:       #0f2539;
  --navy3:       #162f42;
  --navy4:       #1d3a50;
  --sand:        #F4EDE4;
  --sand-dim:    rgba(244,237,228,.08);
  --yellow:      #FFC857;
  --yellow-dim:  rgba(255,200,87,.15);
  --text:        #F4EDE4;
  --text2:       #a8c0d0;
  --muted:       #5a7a8e;
  --border:      rgba(46,211,198,.12);
  --border2:     rgba(244,237,228,.08);
  --r:           14px;
  --r-sm:        8px;
  --r-pill:      100px;
  --shadow:      0 4px 24px rgba(0,0,0,.35);
  --shadow-glow: 0 4px 24px rgba(46,211,198,.2);
}

[data-theme="light"] {
  --navy:   #e8f4f8;
  --navy2:  #d0e8f2;
  --navy3:  #b8d8e8;
  --navy4:  #a0c8dc;
  --text:   #0B1E2D;
  --text2:  #2a4a5e;
  --muted:  #5a7a8e;
  --border: rgba(11,30,45,.12);
  --border2:rgba(11,30,45,.08);
  --sand-dim: rgba(11,30,45,.05);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
#header {
  background: rgba(11,30,45,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

/* LOGO */
.logo {
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--text);
  white-space: nowrap;
  font-family: 'Agbalumo', cursive;
}
.logo .wave { color: var(--teal); }
.logo .dot  { color: var(--yellow); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Plan badge */
.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .03em;
  transition: all .2s;
  flex-shrink: 0;
}
.plan-free { background: var(--sand-dim); color: var(--text2); border: 1.5px solid var(--border2); }
.plan-free:hover { border-color: var(--teal); color: var(--teal); }
.plan-pro  { background: var(--teal-dim); color: var(--teal); border: 1.5px solid rgba(46,211,198,.3); }

/* Lang toggle */
.lang-toggle {
  background: var(--sand-dim);
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 6px 10px;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--teal); color: var(--teal); }

/* Theme toggle */
#themeToggle {
  background: var(--sand-dim);
  border: 1.5px solid var(--border2);
  color: var(--text2);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
#themeToggle:hover { border-color: var(--teal); color: var(--teal); }

/* Logout */
#btnLogout {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--sand-dim);
  border: 1.5px solid var(--border2);
  border-radius: 50%;
  color: var(--text2);
  font-size: 13px;
  text-decoration: none;
  transition: all .15s;
  flex-shrink: 0;
}
#btnLogout:hover { border-color: #ef4444; color: #ef4444; }

/* ── SEARCH ROW ── */
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radius-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  flex-shrink: 0;
}

#radiusSlider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--teal) 0%, var(--teal) 20%, var(--border2) 20%);
}
#radiusSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 2px var(--teal);
  cursor: pointer;
  transition: transform .15s;
}
#radiusSlider::-webkit-slider-thumb:hover { transform: scale(1.2); }

#radiusVal {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  min-width: 44px;
  text-align: right;
  flex-shrink: 0;
}

/* Search button */
.btn-search {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--teal);
  color: var(--navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
  box-shadow: 0 2px 12px var(--teal-glow);
}
.btn-search:hover { background: #3ae8da; transform: translateY(-1px); }
.btn-search:active { transform: scale(.97); }

/* ═══════════════════════════════════════
   KATEGORIJE
   ═══════════════════════════════════════ */
#categoryBar {
  background: rgba(11,30,45,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 97px;
  z-index: 40;
}

.cat-scroll {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.cat-btn:hover { border-color: var(--teal); color: var(--teal); }
.cat-btn.active {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 12px var(--teal-glow);
}

/* ═══════════════════════════════════════
   FREE PLAN BANNER
   ═══════════════════════════════════════ */
#freeBanner {
  background: linear-gradient(135deg, rgba(46,211,198,.08), rgba(255,200,87,.06));
  border-bottom: 1px solid rgba(46,211,198,.15);
  overflow: hidden;
  max-height: 80px;
  transition: max-height .4s, opacity .3s;
}
#freeBanner.hidden { max-height: 0; opacity: 0; pointer-events: none; }
.free-banner-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
.free-banner-icon { font-size: 18px; flex-shrink: 0; }
.free-banner-text { flex: 1; min-width: 0; }
.free-banner-text strong { font-size: 12px; font-weight: 700; color: var(--text); display: block; }
.free-banner-text span { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.free-banner-cta {
  background: var(--teal); color: var(--navy); text-decoration: none;
  border-radius: 7px; padding: 6px 12px; font-size: 11.5px; font-weight: 800;
  white-space: nowrap; flex-shrink: 0; transition: background .15s;
}
.free-banner-cta:hover { background: #3ae8da; }
.free-banner-close { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 4px; flex-shrink: 0; opacity: .6; }
.free-banner-close:hover { opacity: 1; }

/* ═══════════════════════════════════════
   RESULTS HEADER
   ═══════════════════════════════════════ */
#resultsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  font-size: 12px;
  color: var(--text2);
}
#resultCount { font-size: 13px; font-weight: 700; color: var(--text); }
#cacheNote { font-size: 11px; color: var(--muted); }

/* ═══════════════════════════════════════
   SECRET SEARCH STRIP
   ═══════════════════════════════════════ */
#secretStrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(255,200,87,.08), rgba(46,211,198,.06));
  border-bottom: 1px solid rgba(255,200,87,.15);
}
.secret-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.secret-icon { font-size: 18px; flex-shrink: 0; }
.secret-text strong { font-size: 12px; font-weight: 700; color: var(--yellow); display: block; }
.secret-text span { font-size: 11px; color: var(--text2); }
.secret-uses {
  display: flex; gap: 4px;
}
.use-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border2);
  transition: background .2s;
}
.use-dot.used { background: var(--yellow); }

.btn-secret {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(255,200,87,.4);
  background: rgba(255,200,87,.1);
  color: var(--yellow);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
}
.btn-secret:hover { background: rgba(255,200,87,.2); border-color: var(--yellow); }
.btn-secret:disabled { opacity: .4; cursor: not-allowed; }

/* ═══════════════════════════════════════
   LISTA / MAIN
   ═══════════════════════════════════════ */
#list {
  flex: 1;
  padding: 12px 16px 100px;
}

@media (min-width: 600px) {
  #list, #resultsHeader { max-width: 600px; margin: 0 auto; }
  #list { padding-top: 12px; padding-bottom: 60px; padding-left: 0; padding-right: 0; }
  #header, #categoryBar, #freeBanner, #secretStrip, #resultsHeader {
    padding-left: calc(50% - 300px);
    padding-right: calc(50% - 300px);
  }
  #tabBar {
    padding-left: calc(50% - 300px);
    padding-right: calc(50% - 300px);
  }
  #installStrip { padding-left: calc(50% - 300px); padding-right: calc(50% - 300px); }
}

/* ═══════════════════════════════════════
   SPOT CARD — velika slika, vibe tagovi
   ═══════════════════════════════════════ */
.spot-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: all .2s;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.spot-card:hover { border-color: rgba(46,211,198,.3); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.spot-card:active { transform: scale(.99); }

/* Rank badge */
.spot-rank {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  background: rgba(11,30,45,.85);
  backdrop-filter: blur(8px);
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(46,211,198,.3);
  letter-spacing: .05em;
}
.spot-card:nth-child(1) .spot-rank { background: rgba(255,200,87,.2); color: var(--yellow); border-color: rgba(255,200,87,.4); }
.spot-card:nth-child(2) .spot-rank { background: rgba(192,192,192,.15); color: #c0c0c0; border-color: rgba(192,192,192,.3); }
.spot-card:nth-child(3) .spot-rank { background: rgba(205,127,50,.15); color: #cd7f32; border-color: rgba(205,127,50,.3); }

/* Slika */
.spot-img {
  width: 100%;
  height: 180px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--navy3);
  display: block;
}

.spot-img-placeholder {
  width: 100%;
  height: 180px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy3), var(--navy4));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: .7;
  contain: layout;
}

/* Favorit dugme na slici */
.fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  background: rgba(11,30,45,.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s;
}
.fav-btn:hover { border-color: #ef4444; background: rgba(239,68,68,.15); transform: scale(1.1); }
.fav-btn.active { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.4); }
.fav-btn.fav-pop { animation: favPop .3s cubic-bezier(.36,.07,.19,.97); }
@keyframes favPop { 0%{transform:scale(1)} 40%{transform:scale(1.4)} 70%{transform:scale(.9)} 100%{transform:scale(1)} }

/* Body */
.spot-body { padding: 12px 14px 14px; }

.spot-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 3px;
  letter-spacing: -.01em;
}
.spot-addr {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rating row */
.spot-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.stars { color: var(--yellow); font-size: 12px; letter-spacing: -1px; }
.rating-num { font-size: 13px; font-weight: 700; }
.rating-count { font-size: 11px; color: var(--text2); }

/* Vibe tags */
.spot-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.vibe-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(46,211,198,.2);
  white-space: nowrap;
}

/* Meta pills */
.spot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pill {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.pill-dist    { background: rgba(46,211,198,.1); color: var(--teal); border: 1px solid rgba(46,211,198,.2); }
.pill-open    { background: rgba(34,197,94,.1); color: #22c55e; border: 1px solid rgba(34,197,94,.2); }
.pill-closed  { background: rgba(239,68,68,.1); color: #ef4444; border: 1px solid rgba(239,68,68,.2); }
.pill-osm     { background: rgba(46,211,198,.08); color: var(--teal); border: 1px solid var(--border); }
.pill-source  { background: var(--sand-dim); color: var(--text2); border: 1px solid var(--border2); }

/* ═══════════════════════════════════════
   SECRET GEM CARD
   ═══════════════════════════════════════ */
.gem-card {
  background: linear-gradient(135deg, rgba(255,200,87,.06), rgba(46,211,198,.04));
  border: 1px solid rgba(255,200,87,.2);
  border-radius: var(--r);
  margin-bottom: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.gem-card::before {
  content: '🔍';
  position: absolute;
  top: 12px; right: 14px;
  font-size: 14px;
  opacity: .5;
}

.gem-vibe {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,200,87,.12);
  border: 1px solid rgba(255,200,87,.25);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 800;
  color: var(--yellow);
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.gem-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -.01em;
  padding-right: 28px;
}

.gem-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 8px;
}

.gem-why {
  font-size: 11.5px;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 10px;
}

.gem-source {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gem-source a { color: var(--teal); text-decoration: none; }
.gem-source a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   STATES
   ═══════════════════════════════════════ */
.state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 32px;
  text-align: center; color: var(--text2); gap: 12px;
}
.state .icon { font-size: 48px; line-height: 1; }
.state h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.state p { font-size: 13.5px; line-height: 1.7; max-width: 280px; }
.state p b { color: var(--text); font-weight: 600; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   DRAWER
   ═══════════════════════════════════════ */
#drawerOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 90;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
#drawerOverlay.show { display: block; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

#drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--navy2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  z-index: 100;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  max-height: 92dvh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 24px);
}
#drawer.open { transform: translateY(0); }

.drawer-handle { width: 36px; height: 4px; background: var(--border2); border-radius: 2px; margin: 14px auto 0; }
#drawerContent { padding: 16px 20px 28px; position: relative; }

.d-img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--r); margin-bottom: 16px; }
.d-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.d-addr { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.d-vibes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.d-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 10px; margin-bottom: 20px; }
.d-stat { background: var(--navy3); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 8px; text-align: center; }
.d-stat-val { display: block; font-size: 1.3rem; font-weight: 800; color: var(--teal); line-height: 1; margin-bottom: 4px; }
.d-stat-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }

.d-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.d-actions .btn { flex: 1; justify-content: center; min-width: 120px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 18px; border-radius: var(--r-sm); border: 1.5px solid transparent; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .15s; text-decoration: none; }
.btn-primary { background: var(--teal); color: var(--navy); box-shadow: 0 2px 12px var(--teal-glow); }
.btn-primary:hover { background: #3ae8da; }
.btn-ghost { background: var(--navy3); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.d-close { position: absolute; top: 16px; right: 20px; background: var(--navy3); border: 1px solid var(--border); color: var(--text2); width: 34px; height: 34px; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.d-close:hover { background: var(--teal); color: var(--navy); }

/* ═══════════════════════════════════════
   TABS (Lista / Favoriti)
   ═══════════════════════════════════════ */
#tabBar {
  display: flex;
  background: rgba(11,30,45,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
  position: sticky;
  z-index: 35;
}

.tab-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px;
  background: none; border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--text2);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }

#favBadge {
  background: var(--teal); color: var(--navy);
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: var(--r-pill); padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */
#toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--navy2); border: 1px solid var(--border);
  color: var(--text); padding: 11px 22px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 500;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 200; box-shadow: var(--shadow);
  max-width: calc(100vw - 40px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════
   INSTALL STRIP
   ═══════════════════════════════════════ */
#installStrip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(46,211,198,.06);
  border-bottom: 1px solid rgba(46,211,198,.12);
  gap: 12px;
}
#installStrip span { font-size: 13px; font-weight: 600; color: var(--teal); }
#installStrip button { background: var(--teal); color: var(--navy); border: none; border-radius: 7px; padding: 7px 14px; font-family: inherit; font-size: 12px; font-weight: 800; cursor: pointer; flex-shrink: 0; }

/* iOS banner */
#iosBanner { position: fixed; bottom: -160px; left: 16px; right: 16px; background: var(--navy2); border: 1px solid var(--border); border-radius: 16px; z-index: 300; box-shadow: var(--shadow); transition: bottom .4s cubic-bezier(.32,.72,0,1); max-width: 480px; margin: 0 auto; padding: 16px; }
#iosBanner.show { bottom: 24px; }
.ios-arrow { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width:0;height:0; border-left:10px solid transparent; border-right:10px solid transparent; border-top:10px solid var(--navy2); }
.ios-inner { display: flex; align-items: center; gap: 12px; }
.ios-icon { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.ios-body strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.ios-body p { font-size: 13px; color: var(--text2); line-height: 1.5; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ios-share-icon { display: inline-flex; align-items: center; justify-content: center; background: #007aff; color: #fff; width: 22px; height: 22px; border-radius: 5px; }
#iosClose { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--text2); font-size: 16px; cursor: pointer; }

/* ═══════════════════════════════════════
   APP FOOTER
   ═══════════════════════════════════════ */
#appFooter { text-align: center; padding: 20px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
#appFooter a { font-size: 11.5px; color: var(--muted); text-decoration: none; transition: color .15s; }
#appFooter a:hover { color: var(--teal); }
#appFooter span { color: var(--muted); font-size: 11px; opacity: .4; }

/* ═══════════════════════════════════════
   TEST MODE BANNER
   ═══════════════════════════════════════ */
#testBanner { display: none; background: linear-gradient(90deg, #4f1d96, #7c3aed); color: #fff; text-align: center; padding: 8px 16px; font-size: 12px; font-weight: 500; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (min-width: 600px) {
  #drawer { max-width: 560px; left: 50%; right: auto; transform: translateX(-50%) translateY(100%); }
  #drawer.open { transform: translateX(-50%) translateY(0); }
  #iosBanner { left: 50%; right: auto; transform: translateX(-50%); width: 420px; }
  #installStrip { padding-left: calc(50% - 300px); padding-right: calc(50% - 300px); }
}

/* ═══════════════════════════════════════
   ACCESSIBILITY — focus, skip link, WCAG
   ═══════════════════════════════════════ */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--teal);
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus {
  top: 0;
}

/* Keyboard focus ring — visible, high contrast */
:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure sufficient tap target size on mobile (WCAG 2.5.5) */
.tab-btn, .cat-btn, .fav-btn, .btn-search {
  min-height: 44px;
  min-width: 44px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
