    :root {
      --bg:         #0d1117;
      --bg2:        #141b24;
      --bg3:        #1c2634;
      --border:     #2a3a4a;
      --accent:     #4fc3a1;
      --accent2:    #e8a838;
      --accent3:    #e05c5c;
      --text:       #dce8f0;
      --muted:      #7a9ab0;
      --dim:        #4a6a80;
      --hover:      #1e2d3e;
      --font-d:     'Playfair Display', serif;
      --font-m:     'DM Mono', monospace;
      --font-b:     'DM Sans', sans-serif;
      --r:  10px;
      --rl: 18px;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body { background: var(--bg); color: var(--text); font-family: var(--font-b); font-size: 15px; line-height: 1.6; }

    /* HEADER */
    header { background: linear-gradient(135deg, #0a1520 0%, #0d2030 50%, #081820 100%); border-bottom: 1px solid var(--border); padding: 36px 40px 28px; position: relative; overflow: hidden; }
    header::before { content: ''; position: absolute; top: -60px; right: -60px; width: 340px; height: 340px; background: radial-gradient(circle, rgba(79,195,161,0.12) 0%, transparent 70%); pointer-events: none; }
    .header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
    .header-title { font-family: var(--font-d); font-size: clamp(2rem,5vw,3.4rem); font-weight: 700; line-height: 1.1; }
    .header-title span { color: var(--accent); }
    .header-sub { font-family: var(--font-m); font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: .08em; }
    .header-badge { background: var(--bg3); border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px; font-family: var(--font-m); font-size: 11px; color: var(--accent2); letter-spacing: .06em; white-space: nowrap; }

    /* TABS */
    .tabs-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
    .tabs-bar { display: flex; gap: 4px; padding: 20px 0 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
    .tabs-bar::-webkit-scrollbar { display: none; }
    .tab-btn { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--font-b); font-size: 13px; font-weight: 500; padding: 10px 18px; cursor: pointer; white-space: nowrap; transition: color .2s, border-color .2s; letter-spacing: .03em; text-transform: uppercase; }
    .tab-btn:hover { color: var(--text); }
    .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
    .tab-emoji { margin-right: 6px; }

    /* PANELS */
    .tab-panel { display: none; padding: 36px 0 60px; }
    .tab-panel.active { display: block; }
    .panel-title { font-family: var(--font-d); font-size: 1.9rem; font-weight: 700; margin-bottom: 8px; }
    .panel-title em { color: var(--accent); font-style: italic; }
    .panel-desc { color: var(--muted); font-size: 14px; margin-bottom: 32px; max-width: 660px; }

    /* SECTION LABELS */
    .section-label { font-family: var(--font-m); font-size: 10px; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; margin: 36px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
    .section-label:first-of-type { margin-top: 0; }

    /* CARDS */
    .cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
    .card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--rl); padding: 20px 22px; transition: background .2s, border-color .2s, transform .2s; position: relative; overflow: hidden; }
    .card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--card-accent, var(--accent)); border-radius: 3px 0 0 3px; opacity: 0; transition: opacity .2s; }
    .card:hover { background: var(--hover); border-color: #3a5060; transform: translateY(-2px); }
    .card:hover::before { opacity: 1; }
    .card-name { font-weight: 500; font-size: 15px; margin-bottom: 3px; }
    .card-addr { font-family: var(--font-m); font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; }
    .card-note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }

    /* HOURS BLOCK */
    .card-hours { margin: 8px 0 10px; padding: 10px 12px; background: rgba(0,0,0,0.28); border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
    .card-hours-title { font-family: var(--font-m); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
    .hours-row { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-m); font-size: 11px; line-height: 1.8; }
    .hours-row .day { color: var(--muted); }
    .hours-row .time { color: var(--text); text-align: right; }
    .closed { color: var(--accent3) !important; }
    .hours-warning { margin-top: 7px; font-size: 11px; color: var(--accent2); display: flex; align-items: flex-start; gap: 5px; line-height: 1.45; padding-top: 7px; border-top: 1px solid rgba(255,255,255,0.06); }
    .hours-warning::before { content: '⚠'; flex-shrink: 0; }

    /* TAGS */
    .card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
    .tag { display: inline-block; font-family: var(--font-m); font-size: 10px; padding: 2px 8px; border-radius: 999px; letter-spacing: .05em; }
    .tg  { background: rgba(79,195,161,.1);  border: 1px solid rgba(79,195,161,.25);  color: var(--accent); }
    .tgo { background: rgba(232,168,56,.1);  border: 1px solid rgba(232,168,56,.25);  color: var(--accent2); }
    .tr  { background: rgba(224,92,92,.1);   border: 1px solid rgba(224,92,92,.25);   color: var(--accent3); }
    .tp  { background: rgba(176,108,240,.1); border: 1px solid rgba(176,108,240,.25); color: #b06cf0; }
    .tb  { background: rgba(122,176,224,.1); border: 1px solid rgba(122,176,224,.25); color: #7ab0e0; }

    /* MAP BUTTON */
    .card-mapbtn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-family: var(--font-m); font-size: 10px; padding: 4px 10px; cursor: pointer; transition: all .2s; text-decoration: none; margin-top: 4px; }
    .card-mapbtn:hover { border-color: var(--accent); color: var(--accent); }

    /* ITINERARY */
    .itinerary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
    .day-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--rl); padding: 18px 20px; transition: border-color .2s; }
    .day-card:hover { border-color: #3a5060; }
    .day-card.arrival   { border-top: 2px solid var(--accent2); }
    .day-card.departure { border-top: 2px solid var(--accent3); }
    .day-card.full      { border-top: 2px solid var(--accent); }
    .day-date { font-family: var(--font-m); font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
    .day-name { font-family: var(--font-d); font-size: 1rem; margin-bottom: 8px; }
    .day-status { display: inline-block; font-family: var(--font-m); font-size: 10px; padding: 2px 8px; border-radius: 999px; letter-spacing: .06em; margin-bottom: 10px; }
    .day-status.arr  { background: rgba(232,168,56,.12); color: var(--accent2); border: 1px solid rgba(232,168,56,.25); }
    .day-status.dep  { background: rgba(224,92,92,.12);  color: var(--accent3); border: 1px solid rgba(224,92,92,.25); }
    .day-status.full { background: rgba(79,195,161,.12); color: var(--accent);  border: 1px solid rgba(79,195,161,.25); }
    .day-notes { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
    .day-food { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
    .day-food-title { font-family: var(--font-m); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 7px; }
    .day-food-item { font-size: 12px; color: var(--muted); line-height: 1.7; }
    .day-food-item .hl  { color: var(--accent2); }
    .day-food-item .ok  { color: var(--accent); }
    .day-food-item .no  { color: var(--accent3); }
    .day-food-divider { font-family: var(--font-m); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 6px 0 4px; }

    /* NEIGHBORHOOD CARDS */
    .nc-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--rl); padding: 22px 24px; transition: background .2s, border-color .2s; }
    .nc-card:hover { background: var(--hover); border-color: #3a5060; }
    .nc-name { font-family: var(--font-d); font-size: 1.2rem; margin-bottom: 6px; }
    .nc-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }

    /* LODGING */
    .lodging-card { background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%); border: 1px solid var(--border); border-radius: var(--rl); padding: 28px 30px; max-width: 500px; }
    .lodging-name { font-family: var(--font-d); font-size: 1.5rem; margin-bottom: 4px; }
    .lodging-addr { font-family: var(--font-m); font-size: 12px; color: var(--accent); margin-bottom: 16px; }
    .lodging-detail { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
    .ldl { font-family: var(--font-m); font-size: 10px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
    .ldv { font-size: 14px; margin-top: 2px; }

    /* MAP */
    .map-instructions { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 22px; margin-bottom: 20px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
    .map-instructions strong { color: var(--text); }
    .map-instructions a { color: var(--accent); }
    .map-container { border-radius: var(--rl); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 4px 24px rgba(0,0,0,.45); }
    .map-container iframe { width: 100%; height: 540px; display: block; border: none; }
    .directions-builder { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--rl); padding: 24px 26px; margin-top: 24px; }
    .directions-builder h3 { font-family: var(--font-d); font-size: 1.1rem; margin-bottom: 18px; }
    .dir-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
    .dir-field { flex: 1; min-width: 200px; }
    .dir-field label { display: block; font-family: var(--font-m); font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
    .dir-field select { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); font-family: var(--font-b); font-size: 13.5px; padding: 9px 12px; outline: none; transition: border-color .2s; }
    .dir-field select:focus { border-color: var(--accent); }
    .dir-field select option { background: var(--bg3); }
    .dir-btn { background: var(--accent); border: none; border-radius: var(--r); color: #0a1520; font-family: var(--font-b); font-weight: 600; font-size: 14px; padding: 10px 22px; cursor: pointer; transition: background .2s, transform .15s; white-space: nowrap; align-self: flex-end; }
    .dir-btn:hover { background: #62d4b2; transform: translateY(-1px); }
    .dir-note { font-size: 12px; color: var(--dim); margin-top: 12px; font-style: italic; }

    footer { border-top: 1px solid var(--border); padding: 24px 40px; text-align: center; font-family: var(--font-m); font-size: 11px; color: var(--dim); letter-spacing: .06em; }


    /* WEATHER BLOCK */
    .day-weather { margin: 10px 0 8px; padding: 10px 12px; background: rgba(79,195,161,0.06); border: 1px solid rgba(79,195,161,0.15); border-radius: 8px; }
    .day-weather-row { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
    .dw-icon { font-size: 18px; line-height: 1; }
    .dw-cond { font-size: 12.5px; font-weight: 500; color: var(--text); }
    .day-weather-temps { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-m); font-size: 11px; margin-bottom: 5px; }
    .dw-hi  { color: #e8a838; }
    .dw-lo  { color: #7ab0e0; }
    .dw-sun { color: var(--muted); }
    .dw-note { font-size: 11px; color: var(--dim); font-style: italic; line-height: 1.4; }

    /* ============================================================
       SCRAPBOOK
    ============================================================ */
    /* Upload zone */
    .sb-upload-zone {
      border: 2px dashed var(--border);
      border-radius: var(--rl);
      padding: 36px 24px;
      text-align: center;
      cursor: pointer;
      transition: border-color .2s, background .2s;
      background: var(--bg2);
      margin-bottom: 28px;
      position: relative;
    }
    .sb-upload-zone:hover, .sb-upload-zone.drag-over {
      border-color: var(--accent);
      background: rgba(79,195,161,0.05);
    }
    .sb-upload-zone input[type=file] {
      position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
    }
    .sb-upload-icon { font-size: 2.4rem; margin-bottom: 8px; }
    .sb-upload-label { font-size: 15px; color: var(--text); font-weight: 500; margin-bottom: 4px; }
    .sb-upload-sub { font-size: 12px; color: var(--muted); }

    /* Toolbar */
    .sb-toolbar {
      display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
      margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
    }
    .sb-filter-btn {
      background: var(--bg2); border: 1px solid var(--border); border-radius: 999px;
      color: var(--muted); font-family: var(--font-m); font-size: 11px;
      padding: 5px 14px; cursor: pointer; transition: all .2s; white-space: nowrap;
    }
    .sb-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
    .sb-filter-btn.active { background: rgba(79,195,161,.12); border-color: var(--accent); color: var(--accent); }
    .sb-count { font-family: var(--font-m); font-size: 11px; color: var(--dim); margin-left: auto; }

/* With this: */
.sb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

/*
    .sb-grid {
      columns: 3 220px; gap: 14px;
    }
    .sb-item {
      break-inside: avoid; margin-bottom: 14px;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--rl); overflow: hidden;
      transition: transform .2s, border-color .2s;
      cursor: pointer; position: relative;
    }
    */
    .sb-item:hover { transform: translateY(-3px); border-color: #3a5060; }
    .sb-item img, .sb-item video {
      width: 100%; display: block; object-fit: cover; max-height: 340px;
    }
    .sb-item-meta {
      padding: 10px 12px 12px;
    }
    .sb-item-caption {
      font-size: 13px; color: var(--text); margin-bottom: 7px; line-height: 1.45;
      background: none; border: none; width: 100%; resize: none;
      font-family: var(--font-b); color: var(--text); padding: 0;
      outline: none; cursor: text;
    }
    .sb-item-caption::placeholder { color: var(--dim); }
    .sb-item-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
    .sb-tag {
      display: inline-flex; align-items: center; gap: 4px;
      font-family: var(--font-m); font-size: 10px; padding: 2px 8px;
      border-radius: 999px; letter-spacing: .04em; cursor: default;
    }
    .sb-tag-remove {
      background: none; border: none; color: inherit; cursor: pointer;
      font-size: 12px; padding: 0; line-height: 1; opacity: .7;
    }
    .sb-tag-remove:hover { opacity: 1; }
    .sb-tag-add {
      background: var(--bg3); border: 1px dashed var(--border);
      border-radius: 999px; color: var(--dim); font-family: var(--font-m);
      font-size: 10px; padding: 2px 10px; cursor: pointer; transition: all .2s;
      white-space: nowrap;
    }
    .sb-tag-add:hover { border-color: var(--accent); color: var(--accent); }
    .sb-item-footer {
      display: flex; justify-content: space-between; align-items: center;
      padding: 0 12px 10px; gap: 8px;
    }
    .sb-item-date { font-family: var(--font-m); font-size: 10px; color: var(--dim); }
    .sb-delete-btn {
      background: none; border: none; color: var(--dim); font-size: 13px;
      cursor: pointer; transition: color .2s; padding: 2px 6px; border-radius: 4px;
    }
    .sb-delete-btn:hover { color: var(--accent3); background: rgba(224,92,92,.1); }

    /* Tag picker modal */
    .sb-modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
      z-index: 999; align-items: center; justify-content: center;
    }
    .sb-modal-overlay.open { display: flex; }
    .sb-modal {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--rl); padding: 28px; width: min(480px, 92vw);
      max-height: 80vh; overflow-y: auto;
    }
    .sb-modal h3 { font-family: var(--font-d); font-size: 1.2rem; margin-bottom: 18px; }
    .sb-modal-section { margin-bottom: 20px; }
    .sb-modal-section-title {
      font-family: var(--font-m); font-size: 9px; letter-spacing: .12em;
      text-transform: uppercase; color: var(--dim); margin-bottom: 10px;
    }
    .sb-tag-grid { display: flex; flex-wrap: wrap; gap: 7px; }
    .sb-tag-option {
      font-family: var(--font-m); font-size: 11px; padding: 4px 12px;
      border-radius: 999px; cursor: pointer; transition: all .15s;
      border: 1px solid var(--border); background: var(--bg3); color: var(--muted);
    }
    .sb-tag-option:hover { border-color: var(--accent); color: var(--accent); }
    .sb-tag-option.selected { background: rgba(79,195,161,.15); border-color: var(--accent); color: var(--accent); }
    .sb-custom-tag-row { display: flex; gap: 8px; margin-top: 10px; }
    .sb-custom-input {
      flex: 1; background: var(--bg3); border: 1px solid var(--border);
      border-radius: var(--r); color: var(--text); font-family: var(--font-b);
      font-size: 13px; padding: 7px 12px; outline: none; transition: border-color .2s;
    }
    .sb-custom-input:focus { border-color: var(--accent); }
    .sb-modal-btn {
      background: var(--accent); border: none; border-radius: var(--r);
      color: #0a1520; font-family: var(--font-b); font-weight: 600;
      font-size: 13px; padding: 8px 18px; cursor: pointer; transition: background .2s;
    }
    .sb-modal-btn:hover { background: #62d4b2; }
    .sb-modal-btn.cancel {
      background: var(--bg3); border: 1px solid var(--border); color: var(--muted);
    }
    .sb-modal-btn.cancel:hover { background: var(--hover); }
    .sb-modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

    /* Lightbox */
    .sb-lightbox {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,.92); z-index: 1000;
      align-items: center; justify-content: center;
      flex-direction: column;
    }
    .sb-lightbox.open { display: flex; }
    .sb-lightbox img, .sb-lightbox video {
      max-width: 90vw; max-height: 80vh; object-fit: contain;
      border-radius: var(--r);
    }
    .sb-lightbox-close {
      position: absolute; top: 20px; right: 24px;
      background: none; border: none; color: var(--text);
      font-size: 28px; cursor: pointer; opacity: .7; transition: opacity .2s;
    }
    .sb-lightbox-close:hover { opacity: 1; }
    .sb-lightbox-caption {
      margin-top: 14px; color: var(--muted); font-size: 14px; max-width: 600px; text-align: center;
    }
    .sb-lightbox-nav {
      position: absolute; top: 50%; transform: translateY(-50%);
      background: rgba(255,255,255,.08); border: none; border-radius: 50%;
      color: var(--text); font-size: 22px; width: 44px; height: 44px;
      cursor: pointer; transition: background .2s; display: flex; align-items: center; justify-content: center;
    }
    .sb-lightbox-nav:hover { background: rgba(255,255,255,.18); }
    .sb-lightbox-prev { left: 20px; }
    .sb-lightbox-next { right: 20px; }

    /* Empty state */
    .sb-empty {
      text-align: center; padding: 60px 20px;
      color: var(--dim); font-size: 14px; line-height: 1.7;
    }
    .sb-empty-icon { font-size: 3rem; margin-bottom: 14px; }

    /* Storage warning */
    .sb-storage-bar-wrap {
      background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
      padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
    }
    .sb-storage-label { font-family: var(--font-m); font-size: 10px; color: var(--dim); white-space: nowrap; }
    .sb-storage-bar { flex: 1; height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
    .sb-storage-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s; }
    .sb-storage-fill.warn { background: var(--accent2); }
    .sb-storage-fill.full { background: var(--accent3); }
    .sb-storage-pct { font-family: var(--font-m); font-size: 10px; color: var(--muted); white-space: nowrap; }

    /* Lock button & locked state */
    .sb-lock-btn {
      display: inline-flex; align-items: center; gap: 6px;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 999px; color: var(--muted); font-family: var(--font-m);
      font-size: 11px; letter-spacing: .06em; padding: 6px 16px;
      cursor: pointer; transition: all .2s; white-space: nowrap; flex-shrink: 0;
    }
    .sb-lock-btn:hover { border-color: var(--accent); color: var(--accent); }
    .sb-lock-btn.unlocked { border-color: var(--accent); color: var(--accent); background: rgba(79,195,161,.08); }

    /* Elements hidden while locked */
    .sb-locked-hide { display: none !important; }
    .sb-editor-unlocked .sb-locked-hide { display: block !important; }
    .sb-editor-unlocked .sb-upload-zone { display: block !important; }

    /* Password modal */
    .sb-pw-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
      z-index: 1001; align-items: center; justify-content: center;
    }
    .sb-pw-overlay.open { display: flex; }
    .sb-pw-box {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--rl); padding: 32px 28px; width: min(380px, 90vw);
      text-align: center;
    }
    .sb-pw-icon { font-size: 2rem; margin-bottom: 12px; }
    .sb-pw-title { font-family: var(--font-d); font-size: 1.2rem; margin-bottom: 6px; }
    .sb-pw-sub { font-size: 12px; color: var(--dim); margin-bottom: 20px; }
    .sb-pw-input {
      width: 100%; background: var(--bg3); border: 1px solid var(--border);
      border-radius: var(--r); color: var(--text); font-family: var(--font-b);
      font-size: 15px; padding: 10px 14px; outline: none; text-align: center;
      letter-spacing: .1em; transition: border-color .2s; box-sizing: border-box;
    }
    .sb-pw-input:focus { border-color: var(--accent); }
    .sb-pw-error { color: var(--accent3); font-size: 12px; margin-top: 8px; min-height: 18px; }
    .sb-pw-btn {
      margin-top: 16px; width: 100%; background: var(--accent); border: none;
      border-radius: var(--r); color: #0a1520; font-family: var(--font-b);
      font-weight: 600; font-size: 14px; padding: 10px; cursor: pointer;
      transition: background .2s;
    }
    .sb-pw-btn:hover { background: #62d4b2; }
    .sb-pw-cancel {
      margin-top: 10px; background: none; border: none; color: var(--dim);
      font-size: 12px; cursor: pointer; font-family: var(--font-b);
    }
    .sb-pw-cancel:hover { color: var(--muted); }

    @media (max-width: 600px) {
      .sb-grid { columns: 1; }
    }
      header { padding: 24px 20px 18px; }
      .tabs-wrapper { padding: 0 16px; }
      .tab-btn { padding: 8px 12px; font-size: 12px; }
      .tab-panel { padding: 24px 0 48px; }
    }
	
	/* ROUTE WIDGET */
.route-widget {
    position: fixed;
    top: 100px;
    left: 28px;    /* ← was right: 28px */
    z-index: 500;
    font-family: var(--font-b);
	transform: none !important;  /* ← add this */
    will-change: auto !important;
	display: flex;
}
.route-widget-collapsed {
	position: fixed;
	top: 100px;
	left: 28px;
	z-index: 500;
    background: var(--accent);
    color: #0a1520;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: background .2s, transform .15s;
    display: flex;
    align-items: center;
    gap: 7px;
}
.route-widget-collapsed:hover { background: #62d4b2;; }
.route-widget-panel {
    display: none;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    padding: 18px 20px;
    width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    position: absolute;
    top: 48px;     /* ← opens downward from the button */
    bottom: auto;  /* ← remove the bottom anchor */
    left: 0;        /* anchors to left edge of widget */
}
.route-widget-panel.open { display: block; position: fixed; }
.route-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.route-widget-title {
    font-family: var(--font-d);
    font-size: 1rem;
    color: var(--text);
}
.route-widget-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.route-widget-close:hover { color: var(--text); }
.route-field label {
    display: block;
    font-family: var(--font-m);
    font-size: 9px;
    color: var(--dim);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.route-field select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text);
    font-family: var(--font-b);
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
    transition: border-color .2s;
    margin-bottom: 10px;
}
.route-field select:focus { border-color: var(--accent); }
.route-field select option { background: var(--bg3); }
.route-go-btn {
    width: 100%;
    background: var(--accent);
    border: none;
    border-radius: var(--r);
    color: #0a1520;
    font-family: var(--font-b);
    font-weight: 600;
    font-size: 13px;
    padding: 9px;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.route-go-btn:hover { background: #62d4b2; }

/* Card route button */
.card-routebtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-family: var(--font-m);
    font-size: 10px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all .2s;
    margin-top: 4px;
    margin-left: 4px;
    position: relative;
}
.card-routebtn:hover { border-color: var(--accent2); color: var(--accent2); }
.card-route-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.card-route-dropdown.open { display: block; }
.card-route-opt {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-m);
    font-size: 11px;
    padding: 8px 14px;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.card-route-opt:hover { background: var(--hover); color: var(--accent); }

.card-route-wrap {
    position: relative;
    display: inline-block;
}

.map-filter-btn {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--font-m);
    font-size: 11px;
    padding: 5px 14px;
    cursor: pointer;
    transition: all .2s;
}
.map-filter-btn.active  { background: var(--bg3); color: var(--text); border-color: #3a5060; }
.map-filter-btn:hover   { border-color: var(--accent); color: var(--accent); }

/* Lazy-load thumbnail wrapper — reserves space to prevent scroll jump */
.sb-thumb-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg3);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Thumbnail image — hidden until loaded */
.sb-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sb-thumb.sb-thumb-loaded {
    opacity: 1;
}

/* Video placeholder card */
.sb-video-thumb {
    width: 100%;
    height: 100%;
    background: var(--bg3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.sb-video-icon {
    font-size: 2rem;
    color: var(--muted);
    line-height: 1;
}
.sb-video-label {
    font-family: var(--font-m);
    font-size: 10px;
    color: var(--dim);
    text-align: center;
    padding: 0 12px;
    word-break: break-all;
}