:root{color-scheme:dark;--paper:#f7f5e6;--muted:#adc6bd;--forest:#163a31;--line:#6d8b7990}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:#103e49;color:var(--paper);font:14px Tahoma,"Geeza Pro","Segoe UI",Arial,sans-serif}
.symbols{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
button,a{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}
button{cursor:pointer;background:none;border:0;padding:0}a{text-decoration:none}
button:focus-visible,a:focus-visible,#stage:focus-visible{outline:2px solid #e8ca8e;outline-offset:2px}
button:disabled{opacity:.35;cursor:default}[hidden]{display:none!important}
.mast,.dock{position:relative;z-index:2;background:var(--forest)}
.mast{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));border-bottom:1px solid var(--line);min-height:66px}
.back,.title,.extra,.tools,.group,.fit{display:flex;align-items:center}
.back{justify-self:start;gap:9px;padding:8px 13px;font-weight:bold;font-size:12px;border:1px solid var(--line);border-radius:25px;white-space:nowrap}
.back:hover,.top-button:hover,.tools button:not(:disabled):hover{background:#ffffff13}
.title{gap:10px}.title h1{font-size:19px;line-height:1.45;margin:0}
.byline{font-size:10px;color:#c9d6c7}.emblem{width:36px;height:36px;display:grid;place-items:center;border:1px solid #bfa97766;border-radius:10px;color:#e3cd98}
.extra{justify-self:end;gap:6px}.top-button,.tools button,.compass{display:grid;place-items:center}.top-button{height:39px;width:39px;border:1px solid var(--line);border-radius:50%}
.back svg,.emblem svg,.top-button svg,.tools svg{height:19px;width:19px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
#stage{direction:ltr;isolation:isolate;position:relative;min-height:0;overflow:hidden;touch-action:none;cursor:grab;outline-offset:-3px;background:#0e3943}
#stage.dragging{cursor:grabbing}#sea{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#reef{position:absolute;left:0;top:0;transform-origin:0 0;pointer-events:none;will-change:transform}
#stage canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#skyBand{position:absolute;left:0;top:0;right:0;overflow:hidden;pointer-events:none;background:#b7d7e6}
#cloudPano{position:absolute;inset:0;background:#b7d7e6 url("sky.jpg") repeat-x center bottom}
#sunDisc{position:absolute;width:calc(var(--sun-radius)*16);height:calc(var(--sun-radius)*16);transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,#fffcef 0% 7%,#fffdf3 8%,#fff6d4 9%,#ffedba9e 14%,#fff3d348 27%,#ffefbd17 48%,transparent 72%);pointer-events:none}
.compass{position:absolute;left:max(14px,env(safe-area-inset-left));top:14px;width:46px;height:46px;border:1px solid #c2d9c880;color:#edf0dd;border-radius:50%;background:#163a38de;box-shadow:0 2px 9px #0b2b3425}.compass svg{width:40px;height:40px}
.loading{direction:rtl;position:absolute;bottom:12px;left:50%;transform:translateX(-50%);background:#103734e8;border:1px solid var(--line);padding:6px 12px;border-radius:20px;color:#e6e9da;font-size:11px;pointer-events:none}
.guide{direction:rtl;position:absolute;left:12px;top:12px;background:#fbfaf0;color:#213f36;width:min(334px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;touch-action:pan-y;cursor:auto;padding:18px;border:1px solid #bbc9b8;border-radius:12px;box-shadow:0 6px 28px #17352e40}
.guide h2{font-size:16px;margin:0 0 10px}.guide p{font-size:13px;line-height:1.8;margin:7px 0}.guide b{display:block}.guide button{float:left;width:32px;height:32px;font:24px Arial;border-radius:50%;background:#e4e9dd}
.dock{display:flex;align-items:center;justify-content:center;gap:24px;padding:6px 12px max(6px,env(safe-area-inset-bottom));border-top:1px solid var(--line);min-height:57px}
.tools{gap:7px}.group{gap:2px}.tools button{width:40px;min-height:40px;border-radius:9px}.tools .fit{display:flex;width:auto;gap:7px;padding-inline:10px;font-size:12px;font-weight:bold}
.flipped{transform:scaleX(-1)}#ratio{min-width:44px;text-align:center;font:12px/1 monospace;color:#e5d7ad}
.divider{width:1px;height:23px;background:var(--line)}.hint{margin:0;font-size:11px;color:var(--muted)}.touch-hint{display:none}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(pointer:coarse){.touch-hint{display:inline}.mouse-hint{display:none}}
@media(max-width:600px){.mast{gap:6px;min-height:58px;padding-inline:9px}.title{gap:5px}.title h1{font-size:16px}.byline{font-size:9px}.emblem{display:none}.back{padding:7px 9px;gap:5px;font-size:11px}.back svg{width:15px}.extra{gap:4px}.top-button{width:31px;height:34px}.dock{flex-direction:column;gap:0}.hint{font-size:10px;padding-bottom:2px}.compass{width:36px;height:36px;left:9px;top:9px}.compass svg{width:32px;height:32px}.tools{gap:3px}.tools .fit{padding-inline:6px}}
@media(max-width:360px){.mast{padding-inline:5px}.back{padding-inline:5px}.extra{gap:2px}.tools button{width:36px}.top-button{width:28px}}
@media(max-height:480px){.mast{min-height:43px;padding-block:3px}.dock{min-height:40px;padding-block:2px}.hint,.byline{display:none}.tools button{min-height:34px}}

.height-tools{direction:rtl;position:absolute;right:max(12px,env(safe-area-inset-right));bottom:14px;display:grid;overflow:hidden;border:1px solid #c4d6c8;border-radius:12px;background:#fbfaf0ef;color:#23483d;box-shadow:0 3px 15px #12382e28}
.height-tools button{display:grid;justify-items:center;gap:1px;min-width:45px;min-height:42px;padding:4px 8px;font-size:11px;font-weight:bold}.height-tools button+button{border-top:1px solid #b7c5b8}.height-tools span{font:18px/18px Arial}
.tools .modes,.tools .views{gap:2px}.tools .modes{border-radius:18px;background:#0c2b24;padding:2px}.tools .modes button,.tools .views button{display:block;width:auto;padding:7px 12px;font-weight:bold;font-size:12px;white-space:nowrap}.tools .modes button{border-radius:16px}.tools button[aria-pressed="true"]{background:#e6e9d4;color:#224438}
@media(max-width:610px){.tools .modes button,.tools .views button{padding-inline:8px}.dock{gap:2px}.tools button{min-height:34px;width:33px}.height-tools{right:9px;bottom:9px}}
@media(max-width:365px){.tools .modes button,.tools .views button{font-size:11px;padding-inline:5px}.tools{gap:2px}}

@media(max-width:480px){.tools{width:100%;justify-content:center;flex-wrap:wrap}.tools .views button,.tools .modes button{padding-inline:5px;font-size:11px}.tools button{width:30px}.tools .views,.tools .modes{gap:0}.hint{max-width:100%;text-align:center}}

.stations-trigger,.station-sheet{direction:rtl;position:absolute;right:max(13px,env(safe-area-inset-right));top:13px}
.stations-trigger{border:1px solid #bdc9b7;border-radius:22px;background:#f8f7ebef;color:#26463b;padding:8px 13px;font-weight:700;font-size:12px}
.station-sheet{background:#faf9f1;color:#254538;box-shadow:0 7px 24px #153e4430;border:1px solid #c3cbb8;border-radius:12px;width:min(250px,calc(100% - 22px));max-height:calc(100% - 26px);overflow:auto;touch-action:pan-y;cursor:auto;padding:15px;z-index:1}
.station-sheet h2{font-size:15px;margin:0 0 10px}.station-close{float:left;width:27px;height:27px;border-radius:50%;font-size:19px;background:#e7eddf}
#stationLinks{display:grid}.station-link{display:flex;text-align:right;align-items:center;gap:9px;color:#294d40;font-weight:bold;padding:8px;border-bottom:1px solid #dee4d7}.station-link:hover{background:#e6ecdf}.station-link small{color:#84988a;font-size:10px}
#locator{position:relative;display:block;width:100%;height:110px;margin-top:12px;overflow:hidden;border-radius:8px;background:#16729a url('reef.webp?v=tidal3') no-repeat center / 100% 100%}
#locationMark{position:absolute;width:9px;height:9px;border:2px solid #fff4ba;border-radius:50%;box-shadow:0 0 0 1px #264738;transform:translate(-50%,-50%)}.station-sheet p{font-size:10px;color:#526858;margin:6px 0 0}
