:root {
  --ink: #f4f1ee;
  --ink-dim: rgba(244, 241, 238, 0.62);
  --glass: rgba(20, 16, 18, 0.55);
  --glass-strong: rgba(16, 12, 14, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #20a8b8;
  --accent-soft: rgba(32, 168, 184, 0.85);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #0d0b0c; color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
#stage { position: fixed; inset: 0; touch-action: none; cursor: grab; }
#stage.dragging { cursor: grabbing; }
#stage canvas { display: block; width: 100%; height: 100%; }
button { font: inherit; color: inherit; }

.kicker { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-dim); }

#brand { position: fixed; top: max(14px, env(safe-area-inset-top)); left: var(--gutter); pointer-events: none; text-shadow: 0 1px 12px rgba(0,0,0,.55); transition: opacity .6s; }
#brand h1 { margin: 2px 0 0; font-size: 20px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
#brand .sub { font-size: 12px; color: var(--ink-dim); margin-top: 2px; max-width: 46ch; }

#tools { position: fixed; top: max(12px, env(safe-area-inset-top)); right: var(--gutter); display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 2 * var(--gutter)); }
#tools button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); cursor: pointer; font-size: 13px; transition: background .2s, border-color .2s; }
#tools button:hover { background: rgba(40, 32, 36, 0.75); }
#tools button.on { border-color: var(--accent-soft); background: rgba(32, 168, 184, 0.28); }
#tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
#btnWorks svg, #btnGuide svg { fill: currentColor; stroke: none; }

#mapWrap { position: fixed; left: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom)); width: 230px; border-radius: 14px; overflow: hidden; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#map { display: block; width: 100%; height: auto; cursor: pointer; }
#stopLabel { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); padding: 6px 10px 8px; border-top: 1px solid var(--line); }

#pins { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.pin { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: auto; cursor: pointer; background: rgba(255,255,255,.9); box-shadow: 0 0 0 3px rgba(32,168,184,.5), 0 2px 8px rgba(0,0,0,.45); transition: transform .15s; }
.pin::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.pin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--accent); }
.pin:hover { transform: scale(1.25); }
.pin .lab { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; padding: 4px 9px; border-radius: 10px; background: var(--glass-strong); opacity: 0; transition: opacity .15s; pointer-events: none; }
.pin:hover .lab { opacity: 1; }
.wlab { position: absolute; left: 0; top: 0; max-width: 230px; padding: 6px 10px 7px; border-radius: 8px; background: rgba(16, 12, 14, 0.74); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0,0,0,.35); visibility: hidden; opacity: 0; transition: opacity .25s, visibility 0s .25s; pointer-events: none; cursor: pointer; }
.wlab.show { visibility: visible; opacity: 1; transition: opacity .25s; pointer-events: auto; }
.wlab:hover { border-color: var(--accent-soft); }
.wlab .a { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wlab .t { font-size: 12.5px; font-style: italic; color: var(--ink-dim); line-height: 1.25; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.navlab { position: absolute; transform: translate(-50%, -150%); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 9px; background: var(--glass-strong); opacity: 0; transition: opacity .15s; }
.navlab.show { opacity: 1; }

#panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-left: 1px solid var(--line); transform: translateX(105%); transition: transform .45s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; padding: max(56px, env(safe-area-inset-top)) 24px 24px; overflow-y: auto; }
#panel.open { transform: none; }
#panel > * { flex-shrink: 0; }
body:has(#panel.open) #credit, body:has(#viewer:not([hidden])) #credit { opacity: 0; }
#panelClose, #gridClose { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 14px; width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
#panel figure { margin: 0 0 18px; }
#panel figure img { width: 100%; max-height: 52vh; object-fit: contain; background: #000; border-radius: 6px; cursor: zoom-in; }
#panel figcaption { font-size: 11px; color: var(--ink-dim); margin-top: 6px; }
#panel h2 { font-size: 21px; font-weight: 400; font-style: italic; margin: 2px 0 4px; line-height: 1.25; }
#panelArtist { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-top: 8px; }
#panelDetails div { margin-top: 2px; }
#panelDetails { font-size: 13px; color: var(--ink-dim); margin-top: 10px; line-height: 1.5; }
#panel .row { display: flex; gap: 8px; margin-top: auto; padding-top: 22px; }
#panel .row button { flex: 1; height: 42px; border-radius: 21px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
#panel .row button:hover { border-color: var(--accent-soft); }

#grid { position: fixed; inset: 0; background: rgba(10, 8, 9, .94); overflow-y: auto; padding: max(20px, env(safe-area-inset-top)) var(--gutter) 40px; }
#grid .gridHead { display: flex; align-items: center; justify-content: space-between; max-width: 1400px; margin: 0 auto 18px; }
#grid h2 { font-weight: 500; font-size: 20px; letter-spacing: .04em; margin: 4px 0; }
#gridClose { position: static; }
#gridItems { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; max-width: 1400px; margin: 0 auto; }
.gi { cursor: pointer; border-radius: 8px; overflow: hidden; background: #1a1517; border: 1px solid transparent; transition: border-color .2s; }
.gi:hover { border-color: var(--accent-soft); }
.gi img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #0f0c0d; display: block; }
.gi div { font-size: 12px; padding: 7px 9px 9px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#about { position: fixed; inset: 0; background: rgba(10, 8, 9, .94); overflow-y: auto; padding: max(28px, env(safe-area-inset-top)) var(--gutter) 48px; }
#about .aboutInner { max-width: 680px; margin: 0 auto; position: relative; }
#about h2 { font-size: clamp(28px, 5vw, 44px); font-weight: 300; letter-spacing: .12em; text-transform: uppercase; margin: 8px 0 18px; }
#about .lede { font-size: 18px; line-height: 1.55; margin: 0 0 30px; }
#about #aboutStatement p { font-size: 15px; line-height: 1.7; color: rgba(244,241,238,.86); margin: 12px 0; }
#about .small { font-size: 12px; color: var(--ink-dim); line-height: 1.6; margin-top: 22px; }
#about a { color: var(--ink); }
#aboutClose { position: absolute; top: -4px; right: 0; width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }

#intro { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(8,6,7,.35), rgba(8,6,7,.85)); transition: opacity .9s; text-align: center; padding: 24px; }
#intro.gone { opacity: 0; pointer-events: none; }
#intro h1 { font-size: clamp(34px, 7vw, 76px); font-weight: 300; letter-spacing: .16em; text-transform: uppercase; margin: 10px 0 6px; }
#intro .sub { font-size: clamp(14px, 2vw, 18px); color: var(--ink-dim); margin: 0 0 30px; }
#enter { height: 50px; padding: 0 30px; border-radius: 25px; border: 1px solid rgba(255,255,255,.5); background: rgba(32,168,184,.35); font-size: 15px; letter-spacing: .08em; cursor: pointer; transition: background .2s; }
#enter:hover { background: rgba(32,168,184,.6); }
#intro .hint { font-size: 12px; color: var(--ink-dim); margin-top: 22px; }
#intro .adv { font-size: 11px; color: rgba(244,241,238,.45); margin-top: 6px; }

#loading { position: fixed; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; }
#loading .bar { height: 100%; width: 0; background: var(--accent); transition: width .3s, opacity .4s; }
#credit { position: fixed; right: var(--gutter); bottom: max(12px, env(safe-area-inset-bottom)); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,241,238,.42); pointer-events: none; }

#panelThumbs { display: flex; gap: 6px; overflow-x: auto; margin: -6px 0 16px; padding-bottom: 4px; }
#panelThumbs img { flex: 0 0 auto; width: 56px; height: 56px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: #000; cursor: zoom-in; }
#panelThumbs img:hover { border-color: var(--accent-soft); }
#panelArtistNote { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
#panelAbout p { font-size: 13.5px; line-height: 1.62; color: rgba(244,241,238,.86); margin: 14px 0 0; }
#panelCredit { font-size: 11px; color: var(--ink-dim); margin-top: 14px; line-height: 1.5; }
#panelLink { display: inline-block; font-size: 12.5px; color: var(--ink); margin-top: 10px; text-decoration: none; border-bottom: 1px solid var(--accent-soft); padding-bottom: 1px; }
#panelLink:hover { color: #fff; border-bottom-color: #fff; }

#viewer { position: fixed; inset: 0; z-index: 30; background: #070606; }
#vStage { position: absolute; left: 0; right: 0; top: 0; bottom: 104px; overflow: hidden; touch-action: none; cursor: zoom-in; }
#viewer.zoomed #vStage { cursor: grab; }
#vImg { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; image-rendering: auto; }
#vClose { position: absolute; top: max(12px, env(safe-area-inset-top)); right: var(--gutter); width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); font-size: 24px; line-height: 1; cursor: pointer; }
.vNav { position: absolute; top: calc(50% - 52px); transform: translateY(-50%); width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); font-size: 26px; line-height: 1; cursor: pointer; }
#vPrev { left: var(--gutter); } #vNext { right: var(--gutter); }
.vNav:hover, #vClose:hover { border-color: var(--accent-soft); }
#vBar { position: absolute; left: 0; right: 0; bottom: 0; height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 0 var(--gutter) max(8px, env(safe-area-inset-bottom)); }
#vThumbs { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
#vThumbs img { flex: 0 0 auto; width: 46px; height: 46px; object-fit: cover; border-radius: 4px; border: 1px solid transparent; opacity: .5; cursor: pointer; transition: opacity .2s; }
#vThumbs img.on, #vThumbs img:hover { opacity: 1; border-color: var(--accent-soft); }
#vCap { font-size: 12px; color: var(--ink-dim); text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* with people / empty beach */
#beachTabs { position: fixed; top: calc(max(12px, env(safe-area-inset-top)) + 46px); right: var(--gutter); display: flex; padding: 3px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#beachTabs button { height: 30px; padding: 0 14px; border-radius: 15px; border: 0; background: transparent; color: var(--ink-dim); font-size: 13px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
#beachTabs button:hover { color: var(--ink); }
#beachTabs button.on { background: rgba(32, 168, 184, 0.55); color: #fff; }
#beachTabs .sm { display: none; }

/* the pad: fly up / down, around the work */
#pad { position: fixed; right: var(--gutter); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 22px); display: grid; grid-template-columns: 48px 118px 48px; grid-template-rows: 38px 52px 38px; gap: 6px; align-items: center; justify-items: center; }
#pad .pb { width: 48px; height: 48px; border-radius: 24px; border: 1px solid rgba(255,255,255,.28); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: background .2s, border-color .2s, opacity .2s; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
#pad .pb:hover:not(:disabled) { background: rgba(32, 168, 184, 0.45); border-color: var(--accent-soft); }
#pad .pb:disabled { opacity: .28; cursor: default; }
#pad .pb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#pad .wide { width: 118px; height: 38px; border-radius: 19px; font-size: 13px; letter-spacing: .03em; white-space: nowrap; }
#pad .wide svg { width: 18px; height: 18px; margin-left: -4px; }
#padUp { grid-column: 2; grid-row: 1; }
#padLeft { grid-column: 1; grid-row: 2; }
#padInfo { grid-column: 2; grid-row: 2; align-self: stretch; justify-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.2; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); pointer-events: none; }
#padInfo b { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
#padInfo span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
#padRight { grid-column: 3; grid-row: 2; }
#padDown { grid-column: 2; grid-row: 3; }
#padUp:not(:disabled) { border-color: var(--accent-soft); }
#padHint { position: fixed; right: var(--gutter); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 22px + 150px); white-space: nowrap; font-size: 14px; padding: 8px 14px; border-radius: 18px; background: rgba(32, 168, 184, 0.9); color: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); animation: hintIn .5s ease-out, hintBob 1.6s ease-in-out .5s infinite; transition: opacity .8s; pointer-events: none; }
#padHint::after { content: ""; position: absolute; right: 52px; top: 100%; border: 7px solid transparent; border-top-color: rgba(32, 168, 184, 0.9); }
#padHint.fade { opacity: 0; }
@keyframes hintIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes hintBob { 50% { transform: translateY(-4px); } }
body.guiding #pad .pb { opacity: .6; }

/* the edge arrows: fly up / down at the top and bottom, the next spot left / right at the sides. Big but see-through,
   so the middle of the screen stays free for looking. */
#edge { position: fixed; inset: 0; pointer-events: none; transition: opacity .6s; }
body:has(#intro:not(.gone)) #edge { opacity: 0; }
body:has(#intro:not(.gone)) #edge .ea { pointer-events: none; }
#edge .ea { position: absolute; pointer-events: auto; width: 64px; height: 64px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); background: rgba(10, 8, 9, .16); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .8; transition: opacity .3s, background .2s, border-color .2s, scale .2s; filter: drop-shadow(0 1px 6px rgba(0,0,0,.5)); -webkit-tap-highlight-color: transparent; }
#edge .ea svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { #edge .ea:hover { opacity: 1; background: rgba(32, 168, 184, .42); border-color: rgba(255,255,255,.85); scale: 1.06; } }   /* phones: a tapped arrow doesn't stay lit */
#edge .ea.off { opacity: 0; pointer-events: none; }
#edge.busy .ea:not(.off), body.guiding #edge .ea:not(.off) { opacity: .35; }
#edgeUp { top: calc(max(12px, env(safe-area-inset-top)) + 6px); left: calc(50% - 32px); }
#edgeDown { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 6px); left: calc(50% - 32px); }
#edgeLeft { left: var(--gutter); top: calc(50% - 32px); }
#edgeRight { right: var(--gutter); top: calc(50% - 32px); }
#edge .el { position: absolute; white-space: nowrap; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 10px; background: rgba(10, 8, 9, .5); color: #fff; pointer-events: none; transition: opacity .2s; }
#edge .el:empty { display: none; }
#edgeUp .el { top: calc(100% + 7px); left: 50%; transform: translateX(-50%); }
#edgeDown .el { bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); }
#edgeLeft .el { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); opacity: 0; }
#edgeRight .el { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); opacity: 0; }
@media (hover: hover) { #edgeLeft:hover .el, #edgeRight:hover .el { opacity: 1; } }
#edgeUp.pulse { border-color: rgba(32, 168, 184, .95); opacity: .95; }
#edgeUp.pulse::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(32, 168, 184, .9); animation: edgePulse 1.8s ease-out infinite; pointer-events: none; }
@keyframes edgePulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }

body.guiding #tools #btnGuide { border-color: var(--accent-soft); background: rgba(32, 168, 184, 0.28); }

@media (max-width: 720px) {
  #brand { top: calc(max(12px, env(safe-area-inset-top)) + 46px); }
  #brand .kicker { display: none; }
  #brand h1 { font-size: 15px; }
  #brand .sub { display: none; }
  #tools button span { display: none; }
  #tools button { padding: 0 10px; }
  #mapWrap { width: 132px; }
  #beachTabs .lg { display: none; } #beachTabs .sm { display: inline; }
  #beachTabs button { height: 28px; padding: 0 11px; font-size: 12px; }
  #pad { bottom: max(12px, env(safe-area-inset-bottom)); grid-template-columns: 44px 84px 44px; grid-template-rows: 36px 48px 36px; gap: 5px; }
  #pad .pb { width: 44px; height: 44px; }
  #pad .wide { width: 84px; height: 36px; font-size: 12px; }
  #padInfo b { font-size: 10px; letter-spacing: .08em; }
  #padInfo span { font-size: 11px; }
  #padHint { font-size: 13px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 138px); }
  #padHint::after { right: 34px; }
  #edge .ea { width: 50px; height: 50px; }
  #edge .ea svg { width: 30px; height: 30px; stroke-width: 3.4; }
  #edgeUp { top: calc(max(12px, env(safe-area-inset-top)) + 88px); left: calc(50% - 25px); }      /* under the title and the tabs */
  #edgeDown { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 140px); left: calc(50% - 25px); }   /* above the map and the pad */
  #edgeLeft { left: 8px; top: calc(50% - 25px); }
  #edgeRight { right: 8px; top: calc(50% - 25px); }
  #edge .el { font-size: 10.5px; }
  #panel { top: auto; height: 62vh; width: 100vw; border-left: 0; border-top: 1px solid var(--line); transform: translateY(105%); padding-top: 52px; border-radius: 16px 16px 0 0; }
  #panel figure img { max-height: 30vh; }
  .vNav { display: none; }
  #vCap { white-space: normal; font-size: 11px; }
  #credit { display: none; }
  .wlab { max-width: 160px; padding: 4px 8px 5px; }
  .wlab .a { font-size: 9.5px; }
  .wlab .t { font-size: 11px; -webkit-line-clamp: 1; }
}
