/* Svetko Guide.
   Palette and typeface taken from svetko.si: brand blue #3166AA, deep navy
   #1A2C3F, sand #AA9581, Work Sans.
   Mobile first. 99% of traffic is a phone held one-handed on a moving boat,
   so: big tap targets, high contrast, nothing that depends on hover. */

:root {
  /* brand */
  --brand: #3166aa;
  --brand-700: #2a5892;
  --brand-mid: #5a82c8;
  --brand-lt: #789dd2;
  --brand-wash: #eef3fa;
  --navy: #1a2c3f;
  --navy-2: #24405b;
  --sand: #aa9581;
  --sand-wash: #f6f2ed;

  /* neutrals */
  --ink: #1a2c3f;
  --ink-2: #46586c;
  --muted: #718096;
  --line: #e2e8f0;
  --surface: #ffffff;
  --page: #eff3f8;

  --live: #16a34a;
  --warn: #b8791a;
  --warn-bg: #fdf6e7;

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --tap: 46px;

  --sh-1: 0 1px 2px rgba(26, 44, 63, .06), 0 4px 12px rgba(26, 44, 63, .06);
  --sh-2: 0 8px 28px rgba(26, 44, 63, .13);
  --sh-3: 0 18px 44px rgba(26, 44, 63, .18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
body { overscroll-behavior-y: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.02em; }
p { margin: 0; }
[hidden] { display: none !important; }

.app { max-width: 560px; margin: 0 auto; background: var(--surface); min-height: 100vh; min-height: 100dvh; }

/* shared buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px;
  border: 0; border-radius: var(--r);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.975); }
.btn-lg { min-height: 54px; width: 100%; font-size: 16.5px; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(49, 102, 170, .26); }
.btn-soft { background: var(--brand-wash); color: var(--brand-700); }
.btn-light { background: #fff; color: var(--navy); }
.btn:disabled { opacity: .4; box-shadow: none; }

/* =============== language gate =============== */

.gate {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--navy);
  display: grid; place-items: center;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.gate-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 55% at 50% -8%, rgba(120, 157, 210, .42), transparent 70%),
    linear-gradient(180deg, #24405b 0%, #1a2c3f 55%, #14222f 100%);
}
.gate-bg::after {
  content: ''; position: absolute; inset: 0;
  background: url('img/stripes-w.svg') repeat;
  opacity: .05;
}
.gate-inner { position: relative; width: 100%; max-width: 380px; text-align: center; }

.gate-logo { width: 96px; height: auto; margin: 0 auto; border-radius: 4px 22px 4px 4px; }
.gate-title { color: #fff; font-size: 30px; font-weight: 700; margin-top: 28px; }
.gate-sub { color: rgba(255, 255, 255, .68); font-size: 15px; margin-top: 10px; }

.gate-langs { display: grid; gap: 9px; margin: 28px 0 0; }
.gate-lang {
  display: flex; align-items: center; gap: 13px;
  min-height: 58px; padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, .16);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .06);
  color: #fff; font-size: 16px; font-weight: 500; text-align: left;
  transition: border-color .15s, background .15s;
}
.gate-lang .fl {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border-radius: 9px;
  font-size: 19px; line-height: 1;
}
.gate-lang[aria-pressed="true"] { border-color: var(--brand-lt); background: rgba(120, 157, 210, .2); }
.gate-lang[aria-pressed="true"]::after {
  content: ''; margin-left: auto; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-lt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a2c3f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.gate .btn-lg { margin-top: 26px; }
.gate-note { color: rgba(255, 255, 255, .45); font-size: 12px; margin-top: 16px; }

/* =============== top bar =============== */

.topbar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo { width: 34px; height: auto; border-radius: 2px 8px 2px 2px; }
.topbar-tag { flex: 1; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.langpill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-2);
  letter-spacing: .04em;
}
.langpill span:first-child { font-size: 16px; line-height: 1; }

/* =============== map stage =============== */

.stage { position: relative; height: 44vh; min-height: 300px; max-height: 440px; background: #cddfe6; }
#map { position: absolute; inset: 0; }
.leaflet-container { background: #cddfe6; font-family: inherit; }
.leaflet-control-attribution { font-size: 9px; background: rgba(255, 255, 255, .7) !important; }

.chip-row {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 500;
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--live); box-shadow: var(--sh-1); white-space: nowrap;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip.is-live .chip-dot { animation: blip 1.9s infinite; }
.chip.is-demo { color: var(--brand); }
.chip.is-off { color: var(--warn); }
.chip.is-wait { color: var(--muted); }
@keyframes blip { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .3; transform: scale(.8) } }

.chip-dark { background: rgba(26, 44, 63, .9); color: #fff; letter-spacing: .06em; }
.chip-dark:empty { display: none; }

.stage-btns { position: absolute; right: 12px; bottom: 14px; z-index: 500; display: grid; gap: 8px; }
.iconbtn {
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  box-shadow: var(--sh-2);
  font-size: 19px; line-height: 1; color: var(--navy);
  transition: transform .12s;
}
.iconbtn:active { transform: scale(.93); }
.iconbtn.is-on { background: var(--brand); color: #fff; }
.iconbtn-accent { background: var(--brand); color: #fff; }

/* map markers */
.mk {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-lt);
  box-shadow: 0 2px 8px rgba(26, 44, 63, .28);
  display: grid; place-items: center; font-size: 15px;
  transition: transform .2s, border-color .2s;
}
.mk-done { opacity: .45; }
.mk-next { border-color: var(--sand); border-width: 3px; transform: scale(1.18); }
.mk-at { border-color: var(--live); border-width: 3px; transform: scale(1.3); }
.boat {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); border: 3px solid #fff;
  display: grid; place-items: center; font-size: 18px;
  box-shadow: 0 4px 14px rgba(26, 44, 63, .4);
}
.boat-halo { animation: halo 2.4s infinite; }
@keyframes halo {
  0% { box-shadow: 0 4px 14px rgba(26,44,63,.4), 0 0 0 0 rgba(22,163,74,.45) }
  100% { box-shadow: 0 4px 14px rgba(26,44,63,.4), 0 0 0 24px rgba(22,163,74,0) }
}

/* =============== sheet =============== */

.sheet {
  position: relative; z-index: 600; margin-top: -22px;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 22px 18px calc(30px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 22px rgba(26, 44, 63, .09);
}

/* live strip */
.live {
  background: linear-gradient(160deg, var(--brand-wash) 0%, #f7fafd 100%);
  border: 1px solid #dbe6f4;
  border-radius: var(--r-lg);
  padding: 14px 16px 15px;
  margin-bottom: 24px;
}
.live-head, .live-names, .live-foot { display: flex; justify-content: space-between; gap: 12px; }
.live-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-mid); }
.live-lbl-r, .live-name-r { text-align: right; }
.live-name {
  font-size: 14px; font-weight: 600; color: var(--navy);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px;
}
.rail {
  position: relative; height: 4px; border-radius: 99px;
  background: #d3e0f0; margin: 13px 0 12px;
}
.rail-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 99px; background: var(--brand);
  transition: width .7s cubic-bezier(.4, 0, .2, 1);
}
.rail-boat {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  font-size: 15px; line-height: 1;
  transition: left .7s cubic-bezier(.4, 0, .2, 1);
  filter: drop-shadow(0 1px 2px rgba(26, 44, 63, .3));
}
.live-foot { align-items: baseline; }
.live-dist { font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: -.03em; }
.live-dist small { font-size: 13px; font-weight: 600; color: var(--brand-mid); margin-left: 3px; letter-spacing: 0; }
.live-eta { font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* current POI */
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sand); }
.poi-title { font-size: 28px; font-weight: 700; color: var(--navy); margin-top: 7px; }
.poi-sub { font-size: 14px; color: var(--muted); margin-top: 5px; }
.poi-desc { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); margin-top: 16px; }

.look {
  display: inline-flex; align-items: center; margin-top: 14px;
  background: var(--sand-wash); color: #7a6552;
  border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 600;
}

/* photo rail */
.rail-photos {
  display: grid; grid-auto-flow: column; grid-auto-columns: 76%;
  gap: 10px; margin: 18px -18px 0; padding: 0 18px 2px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.rail-photos::-webkit-scrollbar { display: none; }
.rail-photos:empty { display: none; }
.gal-fig {
  position: relative; margin: 0; scroll-snap-align: start;
  aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden;
  background: var(--brand-wash);
  display: grid; place-items: center;
}
.gal-fig::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(26, 44, 63, .07);
  border-radius: inherit; pointer-events: none;
}
.gal-fig .ph-label {
  font-size: 11.5px; font-weight: 600; color: var(--brand-mid);
  text-align: center; padding: 10px; line-height: 1.3;
}
.gal-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.notice {
  margin-top: 18px; padding: 13px 15px;
  background: var(--warn-bg); border: 1px solid #f0e2c2; border-radius: var(--r);
  font-size: 13.5px; line-height: 1.5; color: #74521a;
}
.notice.is-info { background: var(--brand-wash); border-color: #d5e2f3; color: var(--brand-700); }

.acts { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 20px; }

.sec {
  margin: 34px 0 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted);
}
.sec-light { color: rgba(255, 255, 255, .55); margin: 0 0 4px; }

/* =============== stop timeline =============== */

.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; }
.tl-btn {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 14px;
  width: 100%; padding: 9px 0; border: 0; background: none; text-align: left;
}
/* the connecting line */
.tl-item:not(:last-child) .tl-node::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 2px; height: 22px; transform: translateX(-50%);
  background: var(--line);
}
.tl-node {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: #fff; border: 2px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.tl-icon { font-size: 14px; }
.tl-t { font-size: 15px; font-weight: 600; color: var(--ink); }
.tl-s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tl-badge { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

.tl-item.is-done .tl-node { background: var(--brand-wash); border-color: var(--brand-wash); color: var(--brand-mid); }
.tl-item.is-done .tl-t { color: var(--muted); font-weight: 500; }
.tl-item.is-next .tl-node { border-color: var(--sand); color: var(--sand); }
.tl-item.is-next .tl-badge { color: var(--sand); }
.tl-item.is-at .tl-node { background: var(--live); border-color: var(--live); color: #fff; }
.tl-item.is-at .tl-t { color: var(--navy); font-weight: 700; }
.tl-item.is-at .tl-badge { color: var(--live); }

/* =============== horizon panel =============== */

.panel {
  position: relative; overflow: hidden;
  margin-top: 32px; padding: 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--navy-2) 0%, var(--navy) 100%);
  color: #fff;
}
.panel-stripes {
  position: absolute; inset: 0;
  background: url('img/stripes-w.svg') repeat;
  opacity: .06;
}
.panel > *:not(.panel-stripes) { position: relative; }
.hrow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 13px 0; font-size: 15px; font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, .11);
}
.hrow:first-of-type { border-top: 0; }
.hrow span { opacity: .6; font-size: 12.5px; font-weight: 500; }

.foot { margin-top: 30px; text-align: center; }
.foot img { margin: 0 auto 10px; opacity: .3; }
.foot p { font-size: 11.5px; line-height: 1.5; color: var(--muted); }

/* =============== lightbox =============== */

.lightbox {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(20, 34, 47, .97);
  display: grid; place-items: center; padding: 20px;
}
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: var(--r); }
.lb-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px;
  width: var(--tap); height: var(--tap); border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 17px;
}
.lb-cap { color: rgba(255, 255, 255, .75); font-size: 13px; margin-top: 16px; text-align: center; }

/* =============== larger screens =============== */

@media (min-width: 640px) {
  body { padding: 22px 0; }
  .app { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-3); min-height: auto; }
  .stage { height: 400px; max-height: none; }
  .topbar { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
}
