:root {
  color-scheme: light;
  font: 17px/1.48 -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --ink: #102e37;
  --muted: #4c6670;
  --sea: #006a62;
  --foam: #e0f3ec;
  --canvas: #f5f8f6;
  --line: #d7e3de;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box }
body { margin: 0 }
[hidden] { display: none !important }
#screen, .reader { max-width: 720px; margin: auto }
#screen { min-height: 100vh; padding-bottom: 90px }
.content { padding: 8px clamp(16px,5vw,32px) 20px }
h1,h2,h3,p,dl,dd { margin: 0 }
h1,h2,h3,strong { overflow-wrap: anywhere }
h1 { font-size: clamp(32px,8.5vw,46px); line-height: 1.06; letter-spacing: -.05em; font-weight: 780 }
h2 { font-size: 22px; line-height: 1.18; letter-spacing: -.035em; margin: 23px 0 11px }
h3 { font-size: 18px; line-height: 1.3 }
a,button,summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation }
a { color: var(--sea); text-decoration: none }
button,input { font: inherit }
button { border: 0; cursor: pointer }
a:active,button:active,summary:active { opacity: .78 }
:focus-visible { outline: 3px solid #009b92; outline-offset: -3px }
button:disabled { opacity: .45 }
svg { flex-shrink: 0; vertical-align: middle }
.atlas-hero, .region-hero { position: relative; isolation: isolate; overflow: hidden; background: #093e46; color: white }
.atlas-hero { height: clamp(194px,27vh,270px); border-radius: 0 0 28px 28px }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2 }
.atlas-hero .hero-image { object-position: 50% 37% }
.atlas-hero::before,.region-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg,rgba(0,27,34,.5),transparent 90%), linear-gradient(0deg,rgba(0,28,34,.87),rgba(0,30,34,.03) 85%);
}
.brand { position: absolute; top: 20px; left: 5%; display: flex; align-items: center; gap: 7px; color: white; font-weight: 760; font-size: 20px; letter-spacing: -.055em; text-shadow: 0 1px 5px #002f37 }
.brand img { width: 26px; height: 26px; border-radius: 7px }
.hero-copy { position: absolute; inset: auto 5% 22px; }
.hero-copy h1 { font-size: clamp(36px,10vw,54px); margin-top: 6px }
.badge { display: inline-flex; gap: 7px; align-items: center; color: var(--sea); font-size: 13px; font-weight: 660 }
.badge svg { width: 16px; height: 16px }
.atlas-hero .badge { color: #ceffed }
.destinations { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px }
.tile { display: block; min-width: 0; background: white; border-radius: 18px; overflow: hidden; color: var(--ink); border: 1px solid var(--line) }
.tile img { width: 100%; height: clamp(90px,27vw,140px); object-fit: cover; display: block }
.tile-caption { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 10px 12px 12px }
.tile-caption small,.lines small,dt,.meta { color: var(--muted); font-size: 13px }
.tile-caption small,.tile-caption strong,.lines small,.lines strong { display: block }
.tile-caption strong { font-size: 21px; letter-spacing: -.035em; line-height: 1.2 }
.tile-caption svg,.row>svg { width: 17px; color: #647d7d }
.group { background: white; border: 1px solid var(--line); border-radius: 18px; overflow: hidden }
.row,.fact { display: flex; align-items: center; gap: 12px; padding: 13px 15px; color: var(--ink) }
.row+.row,.fact+.fact { border-top: 1px solid var(--line) }
.glyph,.empty-glyph { display: grid; place-items: center; flex-shrink: 0; border-radius: 13px }
.glyph { width: 41px; height: 41px }
.sea,.empty-glyph { background: var(--foam); color: var(--sea) }
.sand { background: #faf0dc; color: #86541d }
.lines { flex: 1; min-width: 0 }
.lines strong { font-size: 16px; font-weight: 660; line-height: 1.3 }
.lines small { margin-top: 3px }
.tabs,.action-dock { position: fixed; z-index: 4; left: 0; right: 0; bottom: 0; margin: auto; max-width: 720px; background: #fff; border-top: 1px solid var(--line) }
.tabs { display: flex; justify-content: center; padding: 5px 12px 4px }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 50px; color: var(--muted); font-size: 12px; font-weight: 590 }
.tabs svg { width: 54px; height: 27px; padding: 3px 15px; border-radius: 20px }
.tabs a[aria-current] { color: var(--sea); font-weight: 720 }
.tabs a[aria-current] svg { background: var(--foam); stroke-width: 2.2 }
.toolbar { position: sticky; top: 0; z-index: 3; min-height: 52px; display: flex; align-items: center; padding: 0 max(10px,3%); background: var(--canvas); border-bottom: 1px solid var(--line) }
.back,.text-action { display: inline-flex; align-items: center; gap: 5px; min-height: 46px; color: var(--sea); font-weight: 630; background: transparent; padding: 4px 7px }
.back { font-size: 16px }
.region-hero { height: clamp(174px,24vh,240px); border-radius: 21px; margin-top: 6px }
.region-hero .hero-copy { bottom: 17px }
.place-country { font-size: 14px; font-weight: 650 }
.guide-action,.primary,.secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 8px; border-radius: 14px; padding: 10px 16px; font-size: 16px; font-weight: 680 }
.guide-action { min-height: 44px; margin-top: 12px; color: #073e38; background: #e5fff2 }
.primary { background: var(--sea); color: white }
.secondary { background: var(--foam); color: #07564f }
.segmented { display: flex; padding: 3px; margin: 0 0 13px; background: #e4ede8; border-radius: 14px }
.segmented button { flex: 1; min-height: 44px; border-radius: 11px; color: var(--muted); background: transparent; font-size: 15px; font-weight: 630 }
.segmented button[aria-pressed=true] { color: var(--ink); background: white; box-shadow: 0 1px 4px #163c3b19 }
.trip { padding-top: 30px }
.trip>h1,.import h1 { margin-bottom: 20px }
.empty { padding: 30px 18px 22px; border: 1px solid var(--line); border-radius: 22px; background: white; text-align: center }
.empty-glyph { width: 62px; height: 62px; border-radius: 21px; margin: auto }
.empty-glyph svg { width: 30px; height: 30px }
.empty h2 { margin: 18px 0 8px }
.empty p,.description { line-height: 1.6 }
.empty p { color: var(--muted); margin: 0 auto 20px; max-width: 30ch }
.empty a { display: flex; justify-content: center }
.empty .text-action { margin-top: 6px }
.import,.detail { padding-top: 20px }
.import label { display: block; font-size: 15px; font-weight: 650 }
.input-wrap { display: flex; align-items: center; background: white; border: 1px solid #9aafa8; border-radius: 14px; padding-left: 13px; color: var(--muted); margin: 8px 0 16px }
.input-wrap:focus-within { outline: 2px solid var(--sea) }
input { width: 100%; min-width: 0; border: 0; border-radius: 14px; padding: 13px; background: transparent; color: var(--ink) }
input:focus-visible { outline: none }
form .primary,.action-dock button { width: 100% }
.import .text-action { margin-top: 10px }
.detail h1 { margin: 10px 0 9px }
.location { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 15px }
.location svg,.text-action svg { width: 18px }
.detail h2 { font-size: 19px }
.fact { align-items: flex-start }
.fact>svg { color: var(--sea); width: 19px; margin-top: 2px }
dd { overflow-wrap: anywhere; font-weight: 570; user-select: text }
.meta { margin-top: 24px }
.aux-actions { display: flex; flex-wrap: wrap; gap: 12px }
.action-dock { padding: 9px clamp(16px,5vw,32px) }
.status:not(:empty) { padding: 8px 0; color: var(--sea); font-size: 14px }
.article { padding: 22px clamp(18px,5vw,36px) 40px; font-size: 18px; line-height: 1.64; overflow-wrap: anywhere }
.article header small { color: var(--muted); font-size: 13px }
.article h1 { margin: 6px 0 16px; font-size: clamp(28px,6.8vw,40px) }
.article p,.article ul,.article ol { margin: 0 0 1em }
.article h2,.article h3 { scroll-margin-top: 70px }
.article img { display: block; width: 100%; height: auto; border-radius: 16px; margin: 14px 0 }
.article .cover { max-height: 230px; object-fit: cover; margin-bottom: 18px }
.article .toc { padding: 0 14px; margin: 18px 0; border-radius: 14px; border: 1px solid var(--line); background: white }
.toc summary { padding: 12px 0; color: var(--sea); font-weight: 650; cursor: pointer }
.toc a { display: block; padding: 8px 0; min-height: 44px; border-top: 1px solid var(--line); font-size: 15px }
.article table { display: block; overflow-x: auto; border-collapse: collapse }
.article td,.article th { padding: 8px; border: 1px solid var(--line) }
.article div>span+span:before { content: ' ' }
.article li { margin-bottom: 6px }
@media (min-width: 600px) {
  .destinations { gap: 18px }
  .tile img { height: 160px }
}
@media (max-height: 430px) and (orientation: landscape) {
  .atlas-hero,.region-hero { height: 159px }
  .toolbar { position: static }
}
.logbook > .primary,.logbook > .secondary { width:100% }
.logbook > .description { margin: 9px 0 15px }
.log-summary,.log-measures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px }
.log-summary { background:var(--foam); color:var(--sea); border-radius:18px; margin-bottom:15px; padding:16px }
.log-summary strong { display:block; font-size:22px; color:var(--ink) }
.dive-form { display:grid; gap:16px }
.dive-form input,.dive-form textarea { box-sizing:border-box; width:100%; min-width:0; margin-top:5px; background:white; padding:12px; border:1px solid #9aafa8; color:var(--ink); border-radius:12px; font:inherit }
.dive-form :is(input,textarea):focus-visible { outline:2px solid var(--sea) }
.dive-notes { white-space:pre-wrap; overflow-wrap:anywhere }
.detail > .secondary { margin-top:16px }
