/* Stil za predložak map.html — izdvojen iz HTML-a radi predmemorije
   i preglednosti. Adresa u predlošku ide kroz statika() da se
   nakon izmjene odmah povuče nova verzija. */

  :root {
    --navy:     var(--m-navy);
    --ocean:    var(--m-ocean);
    --sea:      var(--m-sea);
    --aqua:     var(--m-aqua);
    --gold:     var(--m-gold);
    --sand:     var(--m-pijesak);
    --white:    var(--m-bijela);
    --glass:    var(--m-staklo);
    --radius:   12px;
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--navy);
    color: var(--white);
    height: 100vh;
    overflow: hidden;
  }

  #header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2500;   /* uvijek iznad modala (2000) i booking modala (2100) */
    background: linear-gradient(135deg, rgba(10,22,40,0.96) 0%, rgba(14,52,96,0.93) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(232,200,109,0.15);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    flex-shrink: 0;
    max-width: 180px;
  }
  .back-link .bl-arrow { font-size: 16px; line-height: 1; }
  .back-link .bl-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .back-link:hover { background: rgba(255,255,255,0.12); color: var(--white); }
  @media (max-width: 640px) {
    .back-link { padding: 0 9px; max-width: 110px; }
    .back-link .bl-text { display: none; }   /* na mobitelu samo strelica radi prostora */
  }

  #header .brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--aqua), var(--sea));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  #header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--white);
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .stops-pill {
    background: rgba(42,157,143,0.18);
    border: 1px solid rgba(42,157,143,0.35);
    color: var(--aqua);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
  }

  .btn-tour {
    background: linear-gradient(135deg, var(--gold), #c9a227);
    color: var(--navy);
    border: none;
    padding: 7px 16px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btn-tour:hover { transform: scale(1.04); box-shadow: 0 4px 20px rgba(232,200,109,0.35); }
  .btn-tour.playing { background: rgba(255,255,255,0.1); color: var(--white); border: 1px solid rgba(255,255,255,0.15); }

  .layer-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .layer-toggle:hover { background: rgba(255,255,255,0.14); color: var(--white); }

  .duration-select {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    padding: 5px 8px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.5)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 22px;
  }

  .duration-select:hover { background-color: rgba(255,255,255,0.14); }
  .duration-select option { background: #0a1628; color: #fff; }

  /* Jezični izbornik — zaseban, pregledniji: globus lijevo, strelica desno,
     dovoljno razmaka da se ništa ne preklapa s tekstom (HR/EN/DE/IT). */
  #lang-select {
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    outline: none;
    border-radius: 20px;
    /* globus lijevo + strelica desno kao dvije pozadinske slike */
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e8c86d' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M0 0l4.5 6L9 0z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: left 10px center, right 11px center;
    background-size: 14px 14px, 9px 6px;
    padding: 7px 28px 7px 30px;       /* prostor za globus lijevo i strelicu desno */
    transition: background-color 0.2s, border-color 0.2s;
  }
  #lang-select:hover {
    background-color: rgba(255,255,255,0.18);
    border-color: rgba(232,200,109,0.5);
  }
  #lang-select:focus { border-color: rgba(232,200,109,0.7); }
  #lang-select option {
    background: #0a1628; color: #fff;
    font-weight: 500;
  }

  #map {
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
    z-index: 1;
  }

  /* Fix za rešetku (vidljive rubove) između pločica karte.
     Na ekranima visoke gustoće Leaflet pločice se zaokruže na pola piksela i
     između njih ostanu tanke crte. Lagano povećanje + transform ih preklopi. */
  .leaflet-tile {
    border: 0 !important;
    outline: 0 !important;
    /* malo "naduvamo" svaku pločicu da rubovi nalegnu jedan na drugi */
    transform: scale(1.003);
    transform-origin: 0 0;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
  }
  .leaflet-tile-container img.leaflet-tile {
    width: 256px;
    height: 256px;
    mix-blend-mode: normal;
  }
  /* dodatni sigurnosni sloj: spriječi da Leaflet panes pokazuju pozadinu kroz spojeve */
  .leaflet-container { background: #06101e; }
  .leaflet-tile-pane { will-change: transform; }

  /* ── Side panel ── */
  #side-panel {
    position: fixed;
    /* Pocinje ISPOD Leafletovih gumba +/- (karta pocinje na 60px, gumbi su
       70-130px). Prije je panel pocinjao na 76px i prekrivao ih — a kako
       #map ima z-index:1, sve u karti je ispod ovog panela bez obzira na
       Leafletov z-index:1000, pa gumbi nisu bili ni vidljivi ni klikabilni. */
    top: 142px;
    left: 16px;
    z-index: 900;
    width: 270px;
    max-height: calc(100vh - 158px);   /* isti razmak od dna kao prije (16px) */
    overflow-y: auto;
    /* Kartica se pri prelasku mišem pomakne 4px udesno. Bez ovoga sadržaj
       prelije panel po širini (overflow-y:auto čini i drugu os "auto"), pa
       ispod popisa iskoči vodoravni klizač — izgleda kao siva sjena. */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 6px;      /* mjesto za taj pomak, da se kartica ne odreže */
    padding-bottom: 16px;
  }

  #side-panel::-webkit-scrollbar { width: 3px; height: 3px; }
  #side-panel::-webkit-scrollbar-track { background: transparent; }
  #side-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

  .stop-card {
    background: var(--glass);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .stop-card:hover, .stop-card.active {
    border-color: rgba(232,200,109,0.35);
    background: rgba(14,52,96,0.92);
    transform: translateX(4px);
  }

  .stop-card.active { box-shadow: 0 4px 24px rgba(232,200,109,0.12); }

  .stop-card .stop-num {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aqua), var(--sea));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--white);
  }

  .stop-card.start .stop-num {
    background: linear-gradient(135deg, var(--gold), #c9a227);
    color: var(--navy);
  }

  .stop-card .stop-info h3 {
    font-size: 12px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 2px;
  }

  .stop-card .stop-meta {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    font-weight: 300;
    display: flex;
    gap: 8px;
  }

  /* ── Location modal ── */
  #location-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(5,14,28,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Header (z-index 2500) je iznad, pa klikovi na header uvijek prolaze.
       Gornji padding osigurava da modal-box nije sakriven iza headera. */
    padding-top: 70px;
  }

  #location-modal.open { display: flex; }

  #modal-box {
    background: linear-gradient(160deg, #0f2240 0%, #0a1628 100%);
    border: 1px solid rgba(232,200,109,0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 660px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0,0,0,0.65);
    animation: modalIn 0.35s cubic-bezier(.34,1.56,.64,1);
  }

  @keyframes modalIn {
    from { transform: scale(0.9) translateY(24px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
  }

  #modal-box::-webkit-scrollbar { width: 3px; }
  #modal-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

  .modal-header {
    padding: 28px 28px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .modal-stop-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--aqua);
    margin-bottom: 6px;
  }

  .modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.15;
  }

  .modal-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-left: 16px;
    transition: all 0.2s;
  }

  .modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: var(--white);
  }

  .modal-video {
    margin: 18px 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #06101e;
    aspect-ratio: 16/10;
    position: relative;
    box-shadow: 0 14px 44px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(232,200,109,0.12);
  }

  .modal-video video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    /* video uklizi i izoštri se umjesto naglog crnog bljeska */
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(.2,.6,.2,1);
    pointer-events: none;          /* nema interakcije = teže spremiti, nema pauze */
    user-select: none;
    -webkit-user-select: none;
  }
  .modal-video video.ready { opacity: 1; transform: scale(1); }

  /* shimmer dok se video učitava — da nema praznog crnila */
  .modal-video .vid-fs-btn {
    position: absolute; bottom: 10px; right: 10px; z-index: 5;
    width: 38px; height: 38px; border-radius: 9px;
    background: rgba(8,20,38,0.6); border: 1px solid rgba(255,255,255,0.18);
    color: #fff; cursor: pointer; backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0.85; transition: opacity .2s, background .2s; pointer-events: auto;
  }
  .modal-video .vid-fs-btn:hover { opacity: 1; background: rgba(42,169,189,0.7); }

  /* ── Passing-point video bar (vrh ekrana, paralelno s animacijom) ── */
  #passing-video {
    position: fixed; top: 68px; left: 50%; transform: translateX(-50%) translateY(-160%);
    z-index: 2600;   /* iznad headera (2500) da se cijeli vidi */
    width: min(560px, 92vw);
    transition: transform 0.5s cubic-bezier(.2,.9,.3,1.2);
    pointer-events: none;
  }
  #passing-video.show { transform: translateX(-50%) translateY(0); }
  #passing-video .pv-inner {
    background: rgba(8, 20, 36, 0.95); backdrop-filter: blur(12px);
    border: 1px solid rgba(123, 108, 217, 0.45);
    border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,0.55);
    overflow: hidden;
  }
  #passing-video .pv-video-wrap {
    width: 100%; aspect-ratio: 16 / 9; background: #000;
    position: relative;
  }
  #passing-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
  #passing-video .pv-info {
    padding: 12px 18px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  #passing-video .pv-label {
    font-size: 11px; color: #b3a7ec; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
  }
  #passing-video .pv-name {
    font-size: 20px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  @media (max-width: 560px) {
    #passing-video { width: 94vw; top: 118px; }   /* mobilni header je viši (column layout) */
    #passing-video .pv-name { font-size: 17px; }
  }

  /* Pseudo-fullscreen: CSS simulacija bez native API → nema browser "swipe to exit" poruke.
  /* ── Video fullscreen modal ── */
  #video-fs-modal {
    display: none;
    position: fixed; inset: 0; z-index: 99990;
    background: #000;
    align-items: center; justify-content: center;
  }
  #video-fs-modal.open { display: flex; }
  #video-fs-modal video {
    width: 100%; height: 100%;
    object-fit: contain;
  }
  /* X gumb — manji, u gornjem desnom kutu */
  #fs-exit-btn {
    display: none;
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 12px));
    right: 12px;
    z-index: 99999;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff; font-size: 16px; font-weight: 400; line-height: 1;
    cursor: pointer; align-items: center; justify-content: center;
  }
  #video-fs-modal.open ~ #fs-exit-btn,
  body.video-fs-open #fs-exit-btn { display: flex; }

    .modal-video .vid-loading {
    position: absolute; inset: 0;
    background: linear-gradient(110deg, #0a1628 30%, #14365f 50%, #0a1628 70%);
    background-size: 220% 100%;
    animation: vidShimmer 1.4s linear infinite;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.25); font-size: 26px;
  }
  @keyframes vidShimmer { from{background-position:200% 0} to{background-position:-20% 0} }

  /* suptilni gradijent na dnu videa za dojam "ugrađenosti" u karticu */
  .modal-video::after {
    content: ''; position: absolute; left:0; right:0; bottom:0; height: 38%;
    background: linear-gradient(180deg, transparent, rgba(6,16,30,0.45));
    pointer-events: none; z-index: 2;
  }

  .modal-video .no-video {
    width: 100%; aspect-ratio: 16/10;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(14,52,96,0.3) 0%, rgba(10,22,40,0.5) 100%);
    color: rgba(255,255,255,0.2);
    font-size: 13px;
    gap: 8px;
  }

  .modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 28px 20px;
  }

  .stat-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
  }

  .stat-box .stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 6px;
  }

  .stat-box .stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: var(--gold);
    font-weight: 600;
  }

  .modal-desc {
    margin: 0 28px 16px;
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255,255,255,0.65);
    font-weight: 300;
  }

  .modal-activities {
    margin: 0 28px 28px;
  }

  .modal-activities .label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 8px;
  }

  .activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .activity-tag {
    background: rgba(42,157,143,0.12);
    border: 1px solid rgba(42,157,143,0.25);
    color: var(--aqua);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
  }

  /* ── Marker pulse ── */
  @keyframes markerPulse {
    0%   { box-shadow: 0 0 0 0 rgba(42,157,143,0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(42,157,143,0); }
    100% { box-shadow: 0 0 0 0 rgba(42,157,143,0); }
  }

  @keyframes startPulse {
    0%   { box-shadow: 0 0 0 0 rgba(232,200,109,0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(232,200,109,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,200,109,0); }
  }

  .marker-dot {
    border-radius: 50%;
    transition: transform 0.3s;
  }

  .marker-dot:hover { transform: scale(1.15); }

  .marker-dot.pulse { animation: markerPulse 2s ease-out infinite; }
  .marker-dot.pulse-gold { animation: startPulse 2s ease-out infinite; }

  /* ── Route animation ── */
  @keyframes dashFlow {
    to { stroke-dashoffset: -24; }
  }
  .route-animated path {
    animation: dashFlow 1s linear infinite;
  }

  /* ── Leaflet overrides ── */
  .leaflet-control-attribution {
    background: rgba(10,22,40,0.85) !important;
    color: rgba(255,255,255,0.35) !important;
    font-size: 9px !important;
    backdrop-filter: blur(8px) !important;
  }
  .leaflet-control-attribution a { color: rgba(255,255,255,0.45) !important; }
  /* Poravnato s lijevim rubom kartica postaja (16px), da gumbi i popis
     cine jedan stupac. Leafletov zadani razmak je 10px. */
  .leaflet-control-zoom { border: none !important; margin-left: 16px !important; }
  .leaflet-control-zoom a {
    background: var(--glass) !important;
    color: rgba(255,255,255,0.7) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(12px) !important;
  }
  .leaflet-control-zoom a:hover {
    background: rgba(14,52,96,0.9) !important;
    color: var(--white) !important;
  }


  /* ── Rezerviraj — plutajući gumb i modal ── */
  #book-fab {
    position: fixed; right: 18px; bottom: 18px; z-index: 1100;
    background: linear-gradient(135deg, var(--gold), #c9a227);
    color: var(--navy); border: none; padding: 13px 22px; border-radius: 30px;
    font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
    letter-spacing: 0.03em; cursor: pointer;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; gap: 8px;
  }
  #book-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(232,200,109,0.35); }

  /* Podloga modala se NE smije pomicati. Prije je imala overflow-y:auto, pa
     je uz duzi sadrzaj (izbori uz turu) izlazila izvan zaslona i davala
     klizac uz desni rub prozora. Sada je visina kutije ogranicena na zaslon
     UMANJEN za odmake podloge, pa se po potrebi klize samo polja u kutiji. */
  #booking-modal {
    position: fixed; inset: 0; z-index: 2100;
    background: rgba(4,10,20,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: none; align-items: flex-start; justify-content: center;
    padding: max(70px, env(safe-area-inset-top, 16px) + 60px) 16px 20px;
    overflow: hidden;
  }
  #booking-modal.open { display: flex; }
  .bk-box {
    background: linear-gradient(160deg, #0e2240, #0a1628);
    border: 1px solid rgba(232,200,109,0.2); border-radius: 18px;
    width: 100%; max-width: 420px; padding: 26px 28px;
    /* visina zaslona MINUS odmaci podloge (gore + dolje) — isti izraz kao u
       paddingu iznad. dvh je zbog mobitela, gdje se adresna traka skriva. */
    max-height: calc(100vh - max(70px, env(safe-area-inset-top, 16px) + 60px) - 20px);
    max-height: calc(100dvh - max(70px, env(safe-area-inset-top, 16px) + 60px) - 20px);
    overflow-y: auto; position: relative;
    /* diskretan klizac unutar kutije umjesto debelog sistemskog */
    scrollbar-width: thin;
    scrollbar-color: rgba(232,200,109,0.35) transparent;
  }
  .bk-box::-webkit-scrollbar { width: 8px; }
  .bk-box::-webkit-scrollbar-track { background: transparent; }
  .bk-box::-webkit-scrollbar-thumb {
    background: rgba(232,200,109,0.3); border-radius: 999px;
  }
  .bk-box::-webkit-scrollbar-thumb:hover { background: rgba(232,200,109,0.5); }
  .bk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .bk-box h2 { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 600; }
  .bk-sub { font-size: 12px; color: rgba(255,255,255,0.45); margin: 4px 0 6px; }
  .bk-price { font-size: 13px; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
  .bk-departure { font-size: 12.5px; color: rgba(255,255,255,0.7); margin-bottom: 6px; line-height: 1.5; }
  .bk-price-calc { padding: 11px 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: var(--gold); font-weight: 700; font-size: 15px; }

  /* Izgled kalendara (flatpickr) je zajednicki za cijelu aplikaciju:
     static/css/kalendar.css, ucitan prije ove datoteke. Ovdje ga NE
     ponavljati — inace se javni dio i admin razidju. */
  .bk-x {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6); font-size: 14px; cursor: pointer;
  }
  .bk-x:hover { background: rgba(255,255,255,0.14); color: #fff; }
  .bk-box label {
    display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: rgba(255,255,255,0.4); margin: 13px 0 5px;
  }
  .bk-box input, .bk-box textarea {
    width: 100%; background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 9px;
    padding: 10px 13px; color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none;
    transition: border-color 0.2s;
  }
  .bk-box input:focus, .bk-box textarea:focus { border-color: rgba(232,200,109,0.5); }
  .bk-box textarea { resize: vertical; min-height: 70px; }
  .bk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .bk-send {
    width: 100%; margin-top: 18px;
    background: linear-gradient(135deg, var(--gold), #c9a227); color: var(--navy);
    border: none; border-radius: 10px; padding: 13px;
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: opacity 0.2s;
  }
  .bk-send:hover { opacity: 0.92; }
  .bk-send:disabled { opacity: 0.5; cursor: wait; }
  .bk-err { color: #fca5a5; font-size: 12px; margin-top: 10px; min-height: 16px; }
  .bk-ip-row { margin-top: 12px; }
  .bk-ip-row input[readonly] {
    background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.55);
    cursor: not-allowed; font-family: monospace; letter-spacing: 0.03em;
  }
  .bk-ip-hint { font-size: 10.5px; color: rgba(255,255,255,0.4); margin-top: 4px; }
  .bk-consent {
    display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 4px;
    font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.5; cursor: pointer;
  }
  .bk-consent input { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; }
  .bk-consent a { color: var(--gold, #e8c86d); text-decoration: underline; }
  .bk-ok { text-align: center; padding: 30px 8px 14px; }
  .bk-ok .ic { font-size: 48px; margin-bottom: 14px; }
  .bk-ok h3 { font-family: 'Cormorant Garamond', serif; font-size: 22px; margin-bottom: 8px; }
  .bk-ok p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.6; }

  /* ── Preskoči gumb (auto-tura) ── */
  .modal-skip {
    display: none; background: rgba(232,200,109,0.15);
    border: 1px solid rgba(232,200,109,0.35); color: var(--gold);
    padding: 6px 14px; border-radius: 20px;
    font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600;
    cursor: pointer; margin-right: 10px; flex-shrink: 0;
  }
  .modal-skip.visible { display: inline-flex; }
  .modal-skip:hover { background: rgba(232,200,109,0.25); }

  /* ── Mobilna traka postaja ── */
  #mobile-stops { display: none; }
  @media (max-width: 640px) {
    #mobile-stops {
      display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
      gap: 8px; padding: 14px 12px calc(12px + env(safe-area-inset-bottom));
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      background: linear-gradient(180deg, transparent, rgba(6,14,28,0.92) 35%);
      scrollbar-width: none;
    }
    #mobile-stops::-webkit-scrollbar { display: none; }
    .m-chip {
      flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
      background: rgba(10,22,40,0.92); border: 1px solid rgba(255,255,255,0.14);
      color: rgba(255,255,255,0.85); padding: 8px 14px 8px 8px; border-radius: 24px;
      font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500; cursor: pointer;
    }
    .m-chip span {
      width: 22px; height: 22px; border-radius: 50%;
      background: linear-gradient(135deg, #2a9d8f, #1a5f8a);
      display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: 11px; color: #fff;
    }
    .m-chip.active { border-color: var(--gold); color: #fff; }
    #book-fab { right: 12px; bottom: 72px; padding: 11px 18px; font-size: 12px; }
  }

  /* ── Mobile ── */
  @media (max-width: 640px) {
    #side-panel { display: none; }

    /* Zaglavlje: dva reda — gornji s nazivom, donji s kontrolama */
    #header {
      height: auto;
      min-height: 56px;
      flex-direction: column;
      align-items: stretch;
      padding: 8px 12px calc(8px + env(safe-area-inset-top));
      gap: 8px;
    }
    #header .brand { gap: 9px; min-width: 0; }
    #header .brand-icon { width: 32px; height: 32px; font-size: 15px; }
    #header h1 {
      font-size: 15px; line-height: 1.15;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    #header .company-eyebrow { font-size: 8px; letter-spacing: 0.16em; }

    /* Kontrole: vodoravna traka koja se može skrolati, START uvijek vidljiv */
    .header-actions {
      gap: 7px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      padding-bottom: 2px;
      flex-wrap: nowrap;
    }
    .header-actions::-webkit-scrollbar { display: none; }
    .stops-pill { flex-shrink: 0; padding: 6px 11px; }
    .layer-toggle, .duration-select { flex-shrink: 0; padding: 7px 11px; font-size: 12px; }
    .btn-tour {
      flex-shrink: 0;
      padding: 9px 18px;
      font-size: 13px;
      order: -1;                 /* START prvi, odmah vidljiv slijeva */
      box-shadow: 0 3px 14px rgba(232,200,109,0.4);
    }
    #lang-select { flex-shrink: 0; }

    /* Karta počinje ispod višeg zaglavlja */
    #map { top: 104px; }

    /* Modal lokacije — prikaži pri VRHU, malo ispod headera (ne lijepljen na dno) */
    #modal-box { max-width: 100%; margin: 0; border-radius: 20px; max-height: calc(100vh - 130px); }
    #location-modal { align-items: flex-start; justify-content: center; padding: 116px 10px 16px; }
    .modal-header { padding: 24px 20px 0; }
    .modal-video { margin: 16px 20px; }
    .modal-stats { margin: 0 20px 16px; gap: 8px; }
    .modal-desc { margin: 0 20px 12px; font-size: 13px; }
    .modal-activities { margin: 0 20px 24px; }
    .stat-box .stat-value { font-size: 18px; }

    /* donja traka s postajama starta iznad mobilnih chipova */
    #mobile-stops { bottom: 0; }
    #book-fab { right: 12px; bottom: 78px; padding: 11px 18px; font-size: 12px; }
  }

  /* vrlo uski ekrani */
  @media (max-width: 380px) {
    #header h1 { font-size: 14px; }
    .stops-pill { display: none; }   /* uštedi prostor, broj postaja je vidljiv dolje */
  }

  /* ── Polish v3 ── */
  .company-eyebrow {
    font-size: 9px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--gold);
    opacity: 0.85; margin-bottom: 2px;
  }
  #book-fab { border: 1px solid rgba(255,255,255,0.25); }
  .stop-card { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  @media (prefers-reduced-motion: reduce) {
    .route-animated path, .marker-dot.pulse, .marker-dot.pulse-gold { animation: none !important; }
  }

/* Način prodaje u modalu rezervacije — zajednička (tirkizna) ili privatna
   (zlatna). Stoji iznad iznosa jer bez toga cijena nema značenje. */
.bk-nacin {
  display: inline-block;
  margin: 2px 0 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(42,157,143,0.18);
  color: #7fd8cd;
  border: 1px solid rgba(42,157,143,0.4);
}
.bk-nacin.je-privatna {
  background: rgba(232,200,109,0.18);
  color: #e8c86d;
  border-color: rgba(232,200,109,0.45);
}

/* Izbori uz turu u modalu rezervacije (ručak, večera, piće).
   Gost upisuje koliko gostiju uzima koju mogućnost; zbroj se živo provjerava. */
.bk-izbori { margin: 14px 0 4px; }
.bk-izbori-uvod { font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 8px; }
.bk-grupa {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.bk-grupa.bk-nepotpuna { border-color: rgba(192,86,107,0.65); }
.bk-box .bk-grupa-glava { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bk-grupa-ime { font-weight: 600; font-size: 14px; color: #fff; }
.bk-grupa-znak {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(42,157,143,0.18); color: #7fd8cd; border: 1px solid rgba(42,157,143,0.4);
}
.bk-grupa-znak.obavezno {
  background: rgba(232,200,109,0.18); color: #e8c86d; border-color: rgba(232,200,109,0.45);
}
/* Specificnost: `.bk-box label` je display:block + uppercase, a `.bk-box
   input` je width:100%. Oba su specificnija od golih klasa, pa bi redak
   izbora ispao kao natpis + polje preko cijele sirine. Zato `.bk-box` ispred. */
.bk-box .bk-mog {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 0; margin: 0;
  font-size: 14px; font-weight: 400; letter-spacing: normal;
  text-transform: none; color: rgba(255,255,255,0.88);
}
.bk-box .bk-mog-ime { font-size: 14px; color: rgba(255,255,255,0.88); }
.bk-box .bk-mog-broj {
  width: 68px; flex: 0 0 auto; text-align: center; padding: 7px 8px;
}
.bk-grupa-zbroj { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px; text-align: right; }
.bk-grupa-zbroj.ok { color: #7fd8cd; }
.bk-grupa-zbroj.lose { color: #e0909f; }
/* Grupa je popunjena — prazna polja se vise ne mogu dizati, pa neka to i
   izgledaju tako. Polja s odabirom ostaju citljiva, da se moze smanjiti.
   Oznaku postavlja skripta: atribut value ne prati zivu vrijednost. */
.bk-mog-broj.zakljucano { opacity: 0.4; }
