:root {
    color-scheme: dark;
    font-family: Inter, system-ui, sans-serif;
    background: #001b2e;
    color: #eef8fa;
    --panel: #092a3c;
    --line: #315565;
    --muted: #bdd2dc;
    --accent: #77efdb;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
p, li { line-height: 1.55; }
a { color: var(--accent); }
button { font: inherit; }
:focus-visible { outline: 3px solid #f8d387; outline-offset: 3px; }
.container { width: min(100% - 2rem, 76rem); margin-inline: auto; }

.skip-link { position: absolute; z-index: 1001; top: .75rem; left: .75rem; padding: .75rem; background: #001b2e; }
.skip-link:not(:focus) { transform: translateY(-200%); }
.site-header { border-bottom: 1px solid var(--line); }
.header-content { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 700; color: inherit; text-decoration: none; }
.brand img { flex: none; }

.page-heading { margin-block: clamp(1.75rem, 5vw, 3.75rem) 1.35rem; }
.page-heading h1 { font-size: clamp(2.05rem, 6vw, 4.1rem); line-height: 1.07; letter-spacing: -.046em; margin-block: .3rem .65rem; }
.page-heading p { color: var(--muted); max-width: 48rem; }
.page-heading .place-label { color: var(--accent); font-size: .9rem; font-weight: 750; }
h2 { font-size: 1.14rem; line-height: 1.3; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; min-width: 0; }
.location, .region-panel, .notice { padding: 1rem; }
.location { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; margin-bottom: 1rem; }
.location p, .region-panel > p { margin-top: .35rem; color: var(--muted); }
.location p { max-width: 46rem; }
.notice { margin-bottom: 1rem; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem .85rem; border-radius: .55rem; border: 1px solid transparent; cursor: pointer; font-weight: 700; line-height: 1.25; }
.button-primary { background: var(--accent); color: #002b33; }
.button-primary:hover { background: #a9fff0; }
.button-quiet { color: var(--accent); background: transparent; border-color: var(--line); }
.button-quiet:hover, .choice:hover { background: #153e51; }
.button:disabled { cursor: wait; opacity: .7; }

.explorer { display: grid; align-items: start; gap: 1rem; }
.details { display: grid; align-items: start; gap: 1rem; min-width: 0; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem; min-height: 4rem; padding: .65rem 1rem; }
.panel-heading .button { font-size: .85rem; }
#beach-map { position: relative; aspect-ratio: 4 / 3; isolation: isolate; overflow: hidden; background: #cee5e4; }
.map-illustration, .map-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-region { fill: #8eae82; stroke: #547852; stroke-width: 1.15; vector-effect: non-scaling-stroke; cursor: pointer; }
.map-region[data-muted="true"] { fill: #aec8aa; stroke: #83a183; pointer-events: none; }
.map-region[data-highlighted="true"], .map-region:active { fill: var(--region-color); stroke: #234e48; stroke-width: 2.5; }
.map-region:focus-visible { outline: none; stroke: #1b3d36; stroke-width: 3.5; }
.map-labels { pointer-events: none; fill: #17362f; stroke: #edf8e9; stroke-width: 2.1; stroke-linejoin: round; paint-order: stroke; font-size: 15px; font-weight: 760; text-anchor: middle; }
.map-trails, .map-pins { pointer-events: none; }
.map-trail { fill: none; stroke: #60466d; stroke-width: 2.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.map-trail-point { fill: #60466d; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-reference { fill: #634600; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem .75rem; padding: .65rem 1rem; }
.map-footer p, .offline-note { color: var(--muted); font-size: .84rem; }
.map-pin { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); border: 0; border-radius: 50%; padding: 0; background: transparent; pointer-events: auto; cursor: pointer; }
.map-pin::before { content: ''; width: 16px; height: 16px; border: 2px solid white; border-radius: 50%; background: #00665b; box-shadow: 0 0 0 1px #123945; }
.map-pin:focus-visible { outline-color: #173c39; outline-offset: -5px; }
.map-pin[aria-pressed="true"] { z-index: 1; }
.map-pin[aria-pressed="true"]::before { width: 21px; height: 21px; background: #ffce72; border-color: #243b35; }

.region-list, .beach-list, .access-list { display: grid; gap: .5rem; }
.region-list:not(:empty), .beach-list:not(:empty), .access-list:not(:empty) { margin-top: .75rem; }
.choice { text-align: left; width: 100%; background: #0e3346; border-color: var(--line); color: #eef8fa; justify-content: flex-start; }
.choice[aria-pressed="true"] { background: #17483f; border-color: var(--accent); color: #e4fff9; }
.region-choice { gap: .65rem; }
.region-choice::before { content: ''; flex: 0 0 .65rem; height: .65rem; border-radius: 50%; background: var(--region-color); }
.region-choice:hover, .region-choice[aria-pressed="true"] { border-color: var(--region-color); }
.beach-card { border-top: 1px solid var(--line); padding-top: .75rem; }
.beach-card + .beach-card { margin-top: .45rem; }
.beach-card h3 { font-size: 1.05rem; }
.beach-card p { margin-top: .3rem; }
.access-list { list-style: none; padding: 0; margin-bottom: 0; }
.access-detail { padding: .45rem .5rem .7rem; color: var(--muted); overflow-wrap: anywhere; }
.access-detail .button { margin-top: .55rem; text-decoration: none; font-size: .9rem; }
.access-detail h4 { margin-top: .75rem; font-size: .95rem; color: #eef8fa; }
.access-detail ol { padding-left: 1.5rem; margin-block: .4rem; }
.status:empty { display: none; }
.status + .button, .offline-note + .button { margin-top: .55rem; }
.status[data-loading="true"]::before { content: ''; display: inline-block; width: .85em; height: .85em; margin-right: .5em; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.guidance .destination { color: var(--accent); font-weight: 700; }
.guidance .distance { margin-top: .65rem; color: #eef8fa; font-weight: 700; }
.compass { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.compass-arrow { display: grid; place-items: center; border: 1px solid var(--line); color: var(--accent); border-radius: 50%; width: 3rem; height: 3rem; flex: none; font-size: 1.75rem; }
.app-status { min-height: 1.4em; margin-top: .8rem; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-block: 1rem .5rem; border-top: 1px solid var(--line); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }

@media (min-width: 51rem) {
    .explorer { grid-template-columns: minmax(0, 1.65fr) minmax(17.5rem, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .status[data-loading="true"]::before { animation: none; }
}
