:root {
  --paper: #ffffff;
  --paper-2: #f2f4f7;
  --ink: #16202b;
  --ink-soft: #4a5866;
  --line: #ccd3dc;
  --sea: #0b3d91;
  --accent: #0b3d91;

  --good: #2f7d5b;
  --good-bg: #dcefe4;
  --ok: #a8741a;
  --ok-bg: #f6e9cc;
  --bad: #b23a2e;
  --bad-bg: #f6dcd7;

  --hold-3: #f2c14e;   /* sand */
  --hold-2: #b5835a;   /* mud */
  --hold-1: #9aa5b8;   /* gravel */
  --hold-0: #3d405b;   /* rock */
  --grass: #2a9d5c;

  --shadow: 0 1px 2px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.08);
  --radius: 4px;
  --font-display: var(--font-body);
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --bar-h: 54px;
  --bar-top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); /* visina trake s podacima */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121a24;
    --paper-2: #1a2431;
    --ink: #e8edf3;
    --ink-soft: #b4c0cc;
    --line: #2e3b4a;
    --sea: #8fb4ff;
    --accent: #2f6fe0;
    --good: #6fcf9f;
    --good-bg: #183a2c;
    --ok: #e6b85c;
    --ok-bg: #3a2f17;
    --bad: #f08878;
    --bad-bg: #3d1e1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  --paper: #121a24; --paper-2: #1a2431; --ink: #e8edf3; --ink-soft: #b4c0cc; --line: #2e3b4a;
  --sea: #8fb4ff; --accent: #2f6fe0; --good: #6fcf9f; --good-bg: #183a2c; --ok: #e6b85c; --ok-bg: #3a2f17;
  --bad: #f08878; --bad-bg: #3d1e1a; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  overflow: hidden;
}

#map { position: fixed; inset: 0; background: #f3df9e; } /* kopno na pregledu karte (more crtaju pločice dubine) */
#map.sat { background: #1c2a33; }
.sat-toggle {
  width: 64px; height: 64px; padding: 0; border: 2px solid #fff; border-radius: var(--radius); cursor: pointer; overflow: hidden;
  display: flex; align-items: flex-end; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  background: url("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/11/738/1105") center / cover;
}
.sat-toggle.on { background: #f3df9e url("tiles/depth/10/553/368.png") center / cover; }
.sat-toggle span { width: 100%; padding: 2px 0 3px; background: rgba(0, 0, 0, .55); color: #fff; font: 600 11px var(--font-body); }
.sat-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.leaflet-container { font: inherit; }
.chart-land { filter: url(#chart-land-fx); } /* kopno žuto kao na pomorskoj karti, filter je u index.html */
.chart-land-mask { filter: url(#chart-land-mask-fx); } /* isto kopno iznad dubine, voda prozirna */
.leaflet-control-attribution { font-size: 10px; }
.leaflet-top { top: var(--bar-top); }
.leaflet-top.leaflet-right { top: calc(var(--bar-top) + 64px); } /* ispod gumba za lokaciju */

/* ---------- traka s podacima (stil plotera) ---------- */
.databar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1001; height: var(--bar-top);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  background: #0b1118; color: #f5f7fa; border-bottom: 1px solid #2a3846;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.db-cell { display: grid; align-content: center; min-width: 0; padding: 0 clamp(6px, 1.6vw, 18px); border-left: 1px solid #2a3846; overflow: hidden; }
.db-cell:first-child { border-left: 0; }
.db-cell small { font: 600 10px/1.2 var(--font-body); letter-spacing: .1em; color: #c3ccd6; white-space: nowrap; }
.db-cell b { font: 500 clamp(14px, 2.6vw, 22px)/1.15 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.db-pos b { font-size: clamp(11px, 1.6vw, 14px); line-height: 1.2; }
.db-cell .wind-arrow { font-size: .85em; color: #f2c14e; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: calc(var(--bar-top) + 12px); left: 12px; right: 12px; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 8px; flex: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 14px 9px 10px; box-shadow: var(--shadow);
}
.brand-mark { width: 24px; height: 24px; color: var(--sea); flex: none; }
.brand h1 { font: 600 16px/1.1 var(--font-display); margin: 0; letter-spacing: 0; white-space: nowrap; }

.search {
  flex: 1; min-width: 0; max-width: 440px; display: flex; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0 4px 0 16px; margin-right: auto;
}
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 500 15px var(--font-body); padding: 12px 0; outline: none;
}
.search input::placeholder { color: var(--ink-soft); }
.search button { border: 0; background: none; color: var(--ink-soft); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.search button svg { width: 20px; height: 20px; }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius);
  padding: 10px 16px; font: 600 14px var(--font-body); cursor: pointer; box-shadow: var(--shadow);
}
.btn svg { width: 18px; height: 18px; }
.btn.round { padding: 12px; flex: none; }
.btn.primary {
  width: 100%; justify-content: center; font-size: 16px; padding: 14px 20px;
  background: var(--accent); color: #fff; box-shadow: none;
}
.btn.primary svg { width: 24px; height: 24px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; text-decoration: none; flex: 1; justify-content: center; }
.btn:hover { filter: brightness(1.12); }
.btn.primary:hover { filter: none; background: #082d6b; }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- panel: side sheet on desktop, bottom sheet on phones ---------- */
.panel {
  position: fixed; z-index: 1000; top: calc(var(--bar-top) + 76px); left: 12px; max-height: calc(100vh - 100px - var(--bar-top)); width: 380px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow-y: auto; padding: 18px 20px 20px;
  border-top: 4px solid var(--sea);
}
.grip { display: none; }

@media (max-width: 720px) {
  :root { --bar-h: 46px; }
  .topbar { top: calc(var(--bar-top) + 8px); left: 8px; right: 8px; }
  .brand h1 { display: none; }
  .brand { padding: 9px; }
  /* panel na dnu: tri visine, mijenja se ručkom */
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 50vh;
    border-radius: 16px 16px 0 0; border: 0; border-top: 4px solid var(--sea); padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    transition: max-height .25s ease; overscroll-behavior: contain; box-shadow: 0 -8px 30px rgba(0,0,0,.18);
  }
  .panel.sheet-peek { max-height: 132px; overflow: hidden; }
  .panel.sheet-half { max-height: 50vh; }
  .panel.sheet-full { max-height: calc(100dvh - var(--bar-top) - 70px); }
  .grip { display: grid; place-items: center; position: sticky; top: 0; z-index: 2; width: calc(100% + 32px); height: 26px; margin: 0 -16px 4px;
    background: var(--paper); border: 0; padding: 0; cursor: grab; touch-action: none; }
  .grip span { width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
  .leaflet-bottom { bottom: var(--sheet-now, 50vh); transition: bottom .25s ease, opacity .2s; }
  body[data-sheet="full"] .leaflet-bottom { opacity: 0; pointer-events: none; }
  .search input { font-size: 16px; } /* bez zumiranja na iOS-u */
  .leaflet-control-zoom { display: none; } /* na mobitelu se zumira prstima */
  .leaflet-top.leaflet-right { top: calc(var(--bar-top) + 64px); }
  .leaflet-control-attribution { max-width: calc(100vw - 110px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
  .leaflet-control-attribution.open { white-space: normal; max-width: 100vw; }
  /* traka s podacima: udaljenost i smjer tek kad je poznat položaj broda */
  body:not(.has-me) .databar .db-cell:nth-child(2), body:not(.has-me) .databar .db-cell:nth-child(3) { display: none; }
  body:not(.has-me) .databar { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .db-cell b { font-size: 15px; }
  .toast { max-width: calc(100vw - 32px); font-size: 13px; width: max-content; }
  /* veći ciljevi za prst */
  .spots button { padding: 14px 12px; }
  .back, .btn { min-height: 44px; }
  .boat-form input { font-size: 16px; }
}

h2 { font: 600 20px/1.25 var(--font-display); margin: 0 0 8px; }
h3 {
  font: 600 11px var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); margin: 18px 0 8px;
}
.lead { margin: 0 0 16px; color: var(--ink-soft); }
.hint { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 10px 0 0; }

details.more { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--sea); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }
details.more .legend { margin-top: 12px; }

.spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.spots button {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; color: var(--ink); font: inherit;
}
.spots button:hover { border-color: var(--sea); }
.sp-main { display: grid; gap: 2px; min-width: 0; }
.sp-main b { font: 600 15px var(--font-display); }
.sp-main span { font-size: 13px; color: var(--ink-soft); }
.sp-side { display: grid; justify-items: end; }
.sp-side b { font: 600 20px/1 var(--font-mono); }
.sp-side small { color: var(--ink-soft); font-size: 12px; }

.num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px var(--font-body); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.num.good { background: #2f7d5b; } .num.ok { background: #d29a2a; } .num.bad { background: #b23a2e; }

.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar div { height: 100%; width: 0; background: var(--sea); transition: width .25s; }
.bar.indet div { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

.chain { margin: 12px 0 4px; font-size: 15px; }
.chain b { font: 600 20px var(--font-mono); color: var(--sea); }
.actions { display: flex; gap: 8px; margin-top: 14px; }

.saved-tag { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: #eef3f7; color: #34495c; font-size: 13px; border-left: 3px solid var(--sea); }
.is-offline .databar { background: #3a2a0b; }
.is-offline .databar::after { content: "BEZ INTERNETA"; position: absolute; right: 8px; bottom: 2px; font: 600 9px var(--font-body); letter-spacing: .1em; color: #f2c14e; }
.toast {
  position: fixed; left: 50%; top: calc(var(--bar-top) + 76px); transform: translateX(-50%); z-index: 2000;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius); font-weight: 500; box-shadow: var(--shadow);
}

.legend { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.legend .sw { width: 22px; height: 14px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.legend .sw.grass { background: repeating-linear-gradient(45deg, var(--grass) 0 3px, transparent 3px 6px); border-color: var(--grass); }
.legend small { color: var(--ink-soft); margin-left: auto; }

.layers { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; display: grid; gap: 6px; }
.layers legend { font: 600 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); padding: 0 4px; }
.layers label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.layers input { accent-color: var(--sea); width: 16px; height: 16px; }

/* ---------- verdict ---------- */
.back {
  background: none; border: 0; color: var(--sea); font: 600 13px var(--font-body);
  padding: 0; margin-bottom: 10px; cursor: pointer;
}
.coords { font: 500 12px var(--font-mono); color: var(--ink-soft); margin: 0 0 10px; }

.verdict {
  border-radius: var(--radius); border: 1px solid currentColor; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center;
}
.verdict.good { background: var(--good-bg); color: var(--good); }
.verdict.ok   { background: var(--ok-bg);   color: var(--ok); }
.verdict.bad  { background: var(--bad-bg);  color: var(--bad); }
.verdict .score {
  grid-row: span 2; font: 600 30px/1 var(--font-mono); width: 64px; height: 64px; border-radius: var(--radius);
  display: grid; place-items: center; border: 3px solid currentColor;
}
.verdict .title { font: 600 18px/1.25 var(--font-display); }
.verdict .sub { font-size: 13.5px; color: var(--ink); opacity: .85; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fact {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.fact:last-child { border-bottom: 0; }
.fact .dot { width: 12px; height: 12px; border-radius: 50%; margin: 5px auto 0; }
.fact .dot.good { background: var(--good); } .fact .dot.ok { background: var(--ok); } .fact .dot.bad { background: var(--bad); } .fact .dot.na { background: var(--line); }
.fact .k { font-weight: 600; }
.fact .v { font: 500 13px var(--font-mono); color: var(--ink-soft); text-align: right; white-space: nowrap; }
.fact .d { grid-column: 2 / 4; font-size: 13.5px; color: var(--ink-soft); margin-top: -2px; }

.tip {
  margin-top: 14px; background: var(--paper-2); border-left: 3px solid var(--sea);
  border-radius: var(--radius); padding: 10px 12px; font-size: 13.5px;
}
.tip b { color: var(--sea); }

.wind-arrow { display: inline-block; transition: transform .3s; }

.loading { display: flex; gap: 10px; align-items: center; color: var(--ink-soft); padding: 18px 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--sea); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sources { font-size: 11.5px; color: var(--ink-soft); margin-top: 16px; line-height: 1.45; }
.sources a { color: inherit; }

/* map pin */
.pin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.pin.good { background: #2f7d5b; } .pin.ok { background: #d29a2a; } .pin.bad { background: #b23a2e; } .pin.wait { background: #1d4e6e; }
.leaflet-tooltip.sa-tip { font: 500 12px var(--font-body); }

/* ---------- moj brod ---------- */
.boat { margin: 14px 0 4px; }
.boat-sum {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; color: var(--ink); font: inherit;
}
.boat-sum svg { width: 26px; height: 26px; color: var(--sea); flex: none; }
.boat-sum span { flex: 1; min-width: 0; display: grid; }
.boat-sum small { color: var(--ink-soft); font-size: 13px; }
.boat-sum u { color: var(--sea); font-weight: 600; font-size: 14px; text-underline-offset: 3px; }
.boat-form { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.boat-form label { display: grid; gap: 4px; font: 600 13px var(--font-body); color: var(--ink-soft); }
.boat-form label span { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-weight: 500; }
.boat-form input { width: 100%; min-width: 0; font: 500 16px var(--font-mono); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px; }
.boat-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.boat-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.boat-form .hint { grid-column: 1 / -1; margin: 0; }
.boat-tag, .from-me { display: flex; align-items: center; gap: 8px; color: var(--sea); font: 500 14px var(--font-body); margin: 4px 0 10px; }
.boat-tag svg, .from-me svg { width: 18px; height: 18px; flex: none; }
.me { width: 30px; height: 30px; border-radius: 50%; background: var(--sea); color: #fff; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 0 0 6px rgba(29, 78, 110, .25), var(--shadow); }
.me svg { width: 18px; height: 18px; }

/* ---------- loše vrijeme ---------- */
.alert { display: grid; gap: 4px; border-radius: var(--radius); padding: 12px 14px; margin: 6px 0 12px; border: 1px solid; }
.alert b { font: 600 15px/1.3 var(--font-display); }
.alert span { font-size: 14px; }
.alert.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--ink); }
.alert.bad b { color: var(--bad); }
.alert.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ink); }
.alert.ok b { color: var(--ok); }
.wstrip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin: 8px 0 2px; }
.wstrip > div { display: grid; justify-items: center; gap: 1px; padding: 6px 0; border-radius: var(--radius); background: var(--paper-2); }
.wstrip small { font: 500 11px var(--font-mono); color: var(--ink-soft); }
.wstrip b { font: 600 14px var(--font-mono); }
.wstrip .wind-arrow { display: inline-block; font-size: 14px; line-height: 1; color: var(--sea); }
.wstrip .ok { background: var(--ok-bg); } .wstrip .ok b { color: var(--ok); }
.wstrip .bad { background: var(--bad-bg); } .wstrip .bad b { color: var(--bad); }
.wstrip-cap { margin: 0 0 10px; font-size: 12px; color: var(--ink-soft); }
.sim { margin: 0 0 10px; font: 600 12px var(--font-mono); letter-spacing: .04em; color: var(--accent); }

/* ---------- SOS (stvarne upute + DEMO) ---------- */
.btn.sos { width: 44px; height: 44px; padding: 0; justify-content: center; background: #c62828; color: #fff; font: 800 13px var(--font-body); letter-spacing: .04em; }
.sos-title { color: var(--bad); }
.sos-real { background: var(--bad-bg); border: 2px solid var(--bad); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 6px; }
.sos-real ol { margin: 6px 0 0; padding-left: 20px; }
.sos-real li { margin: 5px 0; }
.sos-real a { color: inherit; font-size: 18px; }
.sos-steps { padding-left: 20px; margin: 0 0 10px; }
.sos-steps li { margin: 3px 0; }
.sos-demo { border: 2px dashed var(--line); border-radius: var(--radius); padding: 12px; margin-top: 14px; display: grid; gap: 10px; }
.demo-tag { font: 700 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.sos-demo label { display: grid; gap: 4px; font: 600 13px var(--font-body); color: var(--ink-soft); }
.sos-demo select, .sos-demo input { font: 500 16px var(--font-body); padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); }
.sos-hold { position: relative; overflow: hidden; justify-content: center; background: #c62828; color: #fff; padding: 14px; border-radius: var(--radius); font-size: 16px; user-select: none; -webkit-user-select: none; touch-action: none; }
.sos-hold .fill { position: absolute; inset: 0; width: 0; background: rgba(0, 0, 0, .35); }
.sos-hold.holding .fill { width: 100%; transition: width 2s linear; }
.sos-hold .lbl { position: relative; }
.sos-hold:disabled { opacity: .55; cursor: default; }
.sos-log { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; font-size: 13.5px; }
.sos-log li::before { content: "• "; }
.sos-log .ok::before { content: "✓ "; color: var(--good); }
.sos-log .no::before { content: "✗ "; color: var(--bad); }
.sos-log .tx { color: var(--bad); font-weight: 700; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sos-log .tx { animation: none; } }
.mayday { font: 500 12.5px/1.5 var(--font-mono); background: #0b1118; color: #9fe39f; padding: 10px 12px; border-radius: var(--radius); white-space: pre-wrap; margin: 0 0 10px; }
.mayday span.now { background: #9fe39f; color: #0b1118; }

/* eksperimentalni sloj plićaka (research/sdb): oštri 10 m pikseli */
.sdb-layer { image-rendering: pixelated; }

/* ---------- opažanja na moru (demo) ---------- */
.obs-box { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; display: grid; gap: 10px; }
.obs-box p { display: flex; align-items: center; gap: 12px; margin: 0; }
.obs-box p > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.obs-box small { color: var(--ink-soft); font-size: 13px; }
.obs-box .btn { justify-content: center; }
.obs-box .hint { margin: 0; }
.linkish { background: none; border: 0; padding: 4px; color: var(--sea); font: 600 14px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.obs-login { grid-template-columns: 1fr; }
.obs-login input { font-family: var(--font-body); }
#map.marking, #map.marking .leaflet-interactive { cursor: crosshair; }
.pin.obs { background: var(--accent); }
.obs-pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.obs-pin svg { width: 16px; height: 16px; }
.obs-box p > svg { width: 24px; height: 24px; color: var(--sea); flex: none; }
.obs-head { display: flex; align-items: center; gap: 6px; }
.obs-head i { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.obs-head i svg { width: 12px; height: 12px; }
.mono { font-family: var(--font-mono); }
.obs-form { display: grid; gap: 12px; }
.obs-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.obs-kinds label { cursor: pointer; }
.obs-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.obs-kinds span { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px 6px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--paper-2); font: 500 13px var(--font-body); color: var(--ink); min-height: 72px; align-content: center; }
.obs-kinds i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.obs-kinds i svg { width: 20px; height: 20px; }
.obs-kinds input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.obs-kinds input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.obs-note { display: grid; gap: 4px; font: 600 13px var(--font-body); color: var(--ink-soft); }
.obs-note textarea { font: 400 16px var(--font-body); padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); resize: vertical; }

/* ---------- brodovi uživo (VesselFinder prozor) ---------- */
.vessels-box {
  position: absolute; z-index: 1001; right: 12px; bottom: 120px; width: min(420px, calc(100% - 24px)); height: min(340px, 45vh);
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); overflow: hidden;
}
.vessels-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.vessels-head small { color: var(--ink-soft); flex: 1; }
.vessels-head button { border: 0; background: none; color: var(--ink); font-size: 24px; line-height: 1; min-width: 40px; min-height: 36px; padding: 2px 8px; cursor: pointer; }
@media (max-width: 720px) {
  /* na mobitelu iznad panela, ispod gornje trake */
  .vessels-box { left: 8px; right: 8px; width: auto; top: calc(var(--bar-top) + 64px); bottom: calc(var(--sheet-now, 50vh) + 8px); height: auto; min-height: 150px; }
  .vessels-head { align-items: center; }
}
.vessels-box iframe { flex: 1; width: 100%; border: 0; }

/* brodovi uživo (AIS) na našoj karti */
.ais-ship svg { width: 22px; height: 22px; display: block; overflow: visible; }
.ais-ship path, .ais-ship circle { fill: #c2186b; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }

/* legenda dubine sa satelita */
.sdbd-legend { display: flex; flex-wrap: wrap; gap: 2px; margin: -2px 0 4px 26px; font-size: 11px; }
.sdbd-legend span { padding: 1px 5px; border-radius: 3px; background: var(--c); color: #111; }
.sdbd-legend span:last-child { color: #fff; }
