/* Myndir viewer and camera-only map. Every rule is either the viewer itself
   or gated on body[data-myndir], so Kort, Stöðvar, Sjór and Vegir are unchanged. */
body[data-myndir="1"] #particleCanvas{visibility:hidden!important}
body[data-myndir="1"] .harbour-marker,
body[data-myndir="1"] .buoy-marker,
body[data-myndir="1"] .camera-marker{display:none!important}

#myndirViewer{
  position:absolute;z-index:24;display:flex;flex-direction:column;gap:0;box-sizing:border-box;
  left:max(8px,env(safe-area-inset-left));
  right:max(56px,calc(48px + env(safe-area-inset-right)));
  top:62px;
  bottom:calc(var(--graph-system-height, 120px) + 8px);
  padding:0;border:1px solid rgba(255,255,255,.16);border-radius:16px;
  background:rgba(10,16,28,.94);color:#f4f7fb;box-shadow:0 12px 40px rgba(0,0,0,.35);
  overflow:hidden;
  touch-action:pan-y;
}
#myndirViewer[hidden]{display:none!important}
#myndirScroll{
  flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;
  touch-action:pan-x pan-y;overscroll-behavior:contain;padding:8px;display:flex;flex-direction:column;gap:6px;
}
#myndirViewer header{display:flex;flex-direction:column;gap:1px;min-width:0;padding-right:40px}
#myndirViewer header .myndir-head{display:flex;flex-direction:column;gap:1px;min-width:0}
#myndirViewer header small{font-size:10px;letter-spacing:.08em;color:#9eb0c4}
#myndirViewer header b{font-size:15px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#myndirClose{
  position:absolute;top:8px;right:8px;z-index:3;width:44px;height:44px;border:0;border-radius:12px;
  background:#f4f7fb;color:#121820;font-size:28px;line-height:1;cursor:pointer;
}
#myndirStage{position:relative;flex:1 1 auto;min-height:0;border-radius:12px;overflow:hidden;background:#10151c}
#myndirStage img,#myndirStage video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#10151c}
#myndirStage video{opacity:0}
#myndirStage video.is-on{opacity:1}
#myndirViewer .myndir-loading{
  position:absolute;left:10px;bottom:10px;z-index:2;padding:4px 9px;border-radius:999px;
  background:rgba(8,14,24,.82);color:#fff;font-size:12px;
}
#myndirViewer .myndir-open{
  position:absolute;right:10px;bottom:10px;z-index:2;padding:8px 12px;border-radius:999px;
  background:#f4f7fb;color:#121820;font-size:13px;font-weight:650;text-decoration:none;
}
#myndirViewer .myndir-note{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:16px;text-align:center;color:#d5deea}
#myndirViews{display:flex;gap:6px;overflow:auto;flex:0 0 auto;touch-action:pan-x}
#myndirViews button{flex:0 0 auto;min-height:36px;padding:0 10px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:transparent;color:#f4f7fb;font-size:12px}
#myndirViews button[aria-pressed="true"]{background:#f4f7fb;color:#121820}
.myndir-expand{
  position:absolute;top:8px;right:8px;z-index:3;width:36px;height:36px;border:0;border-radius:10px;
  background:rgba(8,14,24,.82);color:#fff;font-size:18px;line-height:1;cursor:pointer;
}
#myndirFilm{display:none}
#myndirViewer.is-film header{flex-direction:row;align-items:center;gap:8px;padding-right:0}
#myndirViewer.is-film header .myndir-head{flex:1 1 auto}
#myndirViewer.is-film #myndirClose{position:static;flex:0 0 auto;width:36px;height:36px;font-size:24px}
#myndirViewer.is-film #myndirFilm{
  display:flex;flex:1 1 auto;gap:6px;min-height:0;align-items:center;justify-content:safe center;
  box-sizing:border-box;overflow-x:auto;overflow-y:hidden;container-type:size;
  -webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
}
#myndirViewer.is-film #myndirStage,
#myndirViewer.is-film #myndirViews{display:none!important}
.myndir-tile{
  --myndir-cap:26px;
  position:relative;flex:0 0 auto;align-self:center;
  width:min(calc((100cqh - var(--myndir-cap)) * 4 / 3), calc((100cqi - 16px) / 3));
  display:flex;flex-direction:column;gap:0;margin:0;padding:0;border:0;border-radius:10px;overflow:hidden;
  background:transparent;color:inherit;text-align:left;scroll-snap-align:start;cursor:pointer;
}
.myndir-tile img{display:block;width:100%;aspect-ratio:4/3;height:auto;object-fit:cover;background:#10151c;border-radius:8px}
.myndir-cap{flex:0 0 var(--myndir-cap);height:var(--myndir-cap);display:flex;align-items:center;gap:4px;min-width:0}
.myndir-cap > span{flex:1 1 auto;min-width:0;font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.myndir-tile .myndir-expand{position:static;width:22px;height:22px;flex:0 0 auto;border-radius:6px;font-size:14px}
#myndirFull{
  position:fixed;inset:0;z-index:500;box-sizing:border-box;width:100vw;height:100dvh;display:flex;flex-direction:column;
  background:#000;color:#fff;touch-action:pan-y;
}
#myndirFull[hidden]{display:none!important}
#myndirFull img{flex:1 1 auto;min-height:0;width:100%;object-fit:contain;background:#000}
#myndirFull footer{flex:0 0 auto;display:flex;flex-direction:column;gap:2px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));padding-right:72px}
#myndirFull footer b{font-size:16px;line-height:1.2}
#myndirFull footer time{font-size:13px;color:#d5deea}
#myndirFullClose{
  position:absolute;top:max(12px,env(safe-area-inset-top));right:12px;z-index:2;width:48px;height:48px;
  border:0;border-radius:12px;background:#f4f7fb;color:#121820;font-size:28px;line-height:1;cursor:pointer;
}

@media (orientation:landscape) and (max-height:520px){
  #myndirViewer{top:62px;bottom:calc(var(--graph-system-height, 78px) + 6px);right:max(52px,calc(46px + env(safe-area-inset-right)))}
  #myndirViewer header b{font-size:13px}
}
/* 9.21.10 MYN-01/07 fullscreen viewer: prev/next + count, zoom, full view labels */
#myndirFull{overflow:hidden;touch-action:none}
#myndirFull img{transform-origin:center center;transition:transform .05s linear;object-fit:contain}
#myndirFull .myndir-full-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:44px;height:64px;border:0;border-radius:12px;background:rgba(10,16,22,.55);color:#fff;font-size:34px;line-height:1;display:none}
#myndirFull.is-multi .myndir-full-nav{display:block}
#myndirFull .myndir-full-nav.prev{left:max(8px,env(safe-area-inset-left))}#myndirFull .myndir-full-nav.next{right:max(8px,env(safe-area-inset-right))}
#myndirFull.is-zoomed .myndir-full-nav{opacity:.35}
#myndirFull footer .myndir-count{margin:0 8px;font-variant-numeric:tabular-nums;opacity:.85}
#myndirViews button{white-space:normal!important;text-overflow:clip!important;overflow:visible!important;max-width:none!important;line-height:1.15}
/* 9.21.10 MYN-08: the fullscreen still is the front-most layer; no window chrome or tab bar lies on top of it */
#myndirFull{z-index:2147483000!important}
/* 9.21.12 MYN-04: preview vs live */
.myndir-still.myndir-preview{filter:grayscale(.5) brightness(.55)}
.myndir-loading .myndir-loading-text{margin-left:8px;font:600 12px/1 system-ui,sans-serif;color:#fff;white-space:nowrap}
.myndir-loading:has(.myndir-loading-text){width:auto!important;padding:6px 12px!important;border-radius:999px!important;display:inline-flex!important;align-items:center}
