/* Explore Port Selby: the Scrollcraft look (2026-10-30).
   Chrome, tokens and buttons come from ../maps.css (body.w-dragons = teal accent).
   Every marker and control is at least 44px to a finger. */
:root { --glass: rgb(8 8 10 / .82); --sea: #0B1E2C; --sea-2: #123444; --gold: #F0C46A; --app-h: calc(100svh - 100px); --aside: 340px; --cinzel: "Cinzel", Georgia, serif; }
button { cursor: pointer; background: none; border: 0; color: inherit; }
button:disabled { cursor: default; }
.quiet { background: transparent; color: var(--teal); font-size: 14px; font-weight: 500; min-height: 44px; padding: 0 4px; }
.quiet:hover { color: #fff; }

/* ---------------------------------------------------------------- layout */
.explorer { display: grid; grid-template-columns: var(--aside) minmax(0, 1fr); height: min(var(--app-h), calc((100vw - var(--aside)) * .5628)); min-height: 520px; border-top: 1px solid var(--line); }
aside { padding: 18px 28px 26px; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
        background: radial-gradient(120% 50% at 0% 0%, rgb(140 197 190 / .08), transparent 60%), var(--sc-canvas); }
aside .crumbs { margin: -4px 0 6px; }
.back-link { color: var(--mute); }
.series { font-family: var(--cinzel); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--moon); margin: 0 0 14px; }
aside h1 { margin: 8px 0 14px; font-size: clamp(40px, 1.4rem + 1.5vw, 54px); line-height: 1; }
aside h1 em { color: var(--moon); }
.intro { font: italic 20px/1.4 var(--sc-font-display); color: var(--silver); margin: 0 0 18px; }
.about-btn { height: 44px; padding: 0 18px; border-radius: 9999px; box-shadow: inset 0 0 0 1px var(--line-2); color: #fff; font-size: 14px; font-weight: 500; margin-bottom: 22px; }
.about-btn:hover { box-shadow: inset 0 0 0 1px #777a88; }
.guide-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 4px; font-size: 13px; font-weight: 500; color: var(--teal); }
#toggle-list { display: none; }
#place-list h3 { font: 500 12px/1.3 var(--sc-font-text); letter-spacing: .02em; color: var(--mute); margin: 20px 0 4px; }
#place-list button { display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; min-height: 46px; padding: 6px 4px; border-top: 1px solid var(--line); color: #fff; font: 400 20px/1.15 var(--sc-font-display); transition: color 160ms, padding 200ms var(--ease); }
#place-list button:hover, #place-list button.selected { color: var(--moon); padding-left: 10px; }
#place-list button span { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(140 197 190 / .5); font: 500 11px/1 var(--sc-font-text); color: var(--teal); }
.guide-foot { font-size: 13px; line-height: 1.7; color: var(--dim); margin-top: 24px; }

/* ---------------------------------------------------------------- map */
.map-panel { position: relative; background: #061019; overflow: hidden; min-width: 0; }
.viewport { width: 100%; height: 100%; overflow: auto; scrollbar-width: none; touch-action: pan-x pan-y; cursor: grab; overscroll-behavior: contain; }
.viewport::-webkit-scrollbar { display: none; }
.viewport.dragging { cursor: grabbing; user-select: none; }
.viewport.dragging #markers { pointer-events: none; }
#world { position: relative; min-width: 100%; min-height: 100%; background: radial-gradient(ellipse, #123444, #061019); }
#canvas { position: absolute; }
#map { width: 100%; height: 100%; display: block; object-fit: fill; user-select: none; -webkit-user-drag: none; }
#markers { position: absolute; inset: 0; }
/* a 44px button; the visible numbered ring sits in its middle and stays on the landmark */
.marker { position: absolute; width: 44px; height: 44px; transform: translate(-50%, -50%); display: grid; place-items: center; padding: 0; z-index: 2; }
.marker b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgb(8 8 10 / .82); color: var(--moon); font: 600 12px/1 var(--sc-font-text);
            box-shadow: inset 0 0 0 1.5px var(--teal), 0 0 0 4px rgb(8 8 10 / .25), 0 0 18px 2px rgb(140 197 190 / .35); transition: background 160ms, color 160ms, transform 160ms var(--ease); }
.marker span { position: absolute; left: 42px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 9999px; background: rgb(8 8 10 / .85); color: #fff; font: 500 12px/1.2 var(--sc-font-text); white-space: nowrap;
               box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.marker.flip span { left: auto; right: 42px; }
.marker:hover, .marker:focus-visible, .marker.active { z-index: 10; }
.marker:hover b, .marker:focus-visible b, .marker.active b { background: var(--teal); color: #08080a; transform: scale(1.1); }
.no-labels .marker span { display: none; }
.no-labels .marker:hover span, .no-labels .marker:focus-visible span { display: block; }
.map-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.map-badge, .map-top button, .map-bottom p, .zoom { background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 9999px; }
.map-badge { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; font-family: var(--cinzel); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--moon); }
.map-badge i { padding: 0 6px; font-style: normal; color: var(--teal); }
.map-top button { pointer-events: auto; height: 44px; padding: 0 16px; color: #fff; }
.map-top button:hover { box-shadow: inset 0 0 0 1px #777a88; }
.map-bottom { position: absolute; bottom: 34px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.map-bottom p { margin: 0; height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 13px; color: var(--silver); }
.glow { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px 3px rgb(140 197 190 / .55); margin-right: 8px; }
.zoom { display: flex; pointer-events: auto; overflow: hidden; height: 44px; }
.zoom button { height: 44px; min-width: 44px; padding: 0 14px; color: #fff; font-size: 13px; font-weight: 500; }
.zoom button:first-child, .zoom button:last-child { font-size: 20px; }
.zoom button:hover:not(:disabled) { background: rgb(255 255 255 / .08); }
.zoom button:disabled { opacity: .35; }
.map-credit { position: absolute; bottom: 10px; left: 18px; font-size: 11px; color: #d4ded7; text-shadow: 0 1px 3px #000; pointer-events: none; }

/* ---------------------------------------------------------------- dialogs */
dialog { padding: 0; border: 0; background: #0b1218; color: var(--sc-ink); border-radius: 16px; width: min(640px, calc(100% - 32px)); max-height: 90dvh; box-shadow: 0 0 0 1px var(--line-2), 0 40px 120px -20px #000; }
dialog::backdrop { background: rgb(3 8 12 / .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.close { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; background: var(--glass); color: #fff; z-index: 2; box-shadow: inset 0 0 0 1px var(--line-2); }
.close:hover { background: #fff; color: #08080a; }
.detail-view { height: 240px; background-image: url('images/port-selby-map-v1.webp'); background-repeat: no-repeat; background-size: 240%; background-color: #061019; border-bottom: 1px solid var(--line); }
.detail-body { padding: 24px 30px 20px; }
dialog h2 { font-size: clamp(32px, 1.4rem + 1.4vw, 42px); line-height: 1.04; margin: 6px 0 14px; }
.description, .about-body > p { font-size: 15px; line-height: 1.65; color: var(--silver); font-weight: 300; margin: 0 0 12px; }
.about-body strong { color: #fff; font-weight: 500; }
blockquote { margin: 20px 0; padding: 0 0 0 18px; border-left: 1px solid var(--teal); }
blockquote p { margin: 0 0 8px; font: italic 20px/1.4 var(--sc-font-display); color: var(--moon); }
cite { font: 12px/1.6 var(--sc-font-text); font-style: normal; color: var(--mute); }
details { border-top: 1px solid var(--line); }
summary { cursor: pointer; color: var(--teal); font-size: 14px; font-weight: 500; min-height: 46px; display: flex; align-items: center; }
summary:hover { color: #fff; }
details p { font-size: 14px; line-height: 1.7; color: var(--mute); margin: 0 0 12px; }
.detail-nav { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.about-body { padding: 36px 34px 30px; }
.gold { height: 48px; padding: 0 22px; margin-top: 8px; border-radius: 9999px; background: #fff; color: #08080a; font-size: 15px; font-weight: 500; }
.gold:hover { background: #e9e6df; }
@media (prefers-reduced-motion: no-preference) { dialog[open] { animation: arrive .2s ease-out; } @keyframes arrive { from { opacity: 0; transform: translateY(8px); } } }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  :root { --aside: 290px; }
  aside { padding: 18px 20px; }
  .map-bottom p { display: none; }
}
/* ---------------------------------------------------------------- phones: guide on top, a tall map that pans sideways */
@media (max-width: 760px) {
  .explorer { display: block; height: auto; min-height: 0; }
  aside { border-right: 0; overflow: visible; padding: 12px var(--pad) 10px; }
  .series { font-size: 11px; margin-bottom: 8px; }
  aside h1 { font-size: 38px; margin: 6px 0 8px; }
  aside h1 br { display: none; }
  .intro { font-size: 18px; margin-bottom: 12px; }
  .about-btn { margin-bottom: 8px; }
  .guide-heading { border-top: 1px solid var(--line); }
  #toggle-list { display: block; }
  #place-list { display: none; padding-bottom: 12px; }
  #place-list.open { display: block; }
  .guide-foot { display: none; }
  .map-panel { height: 64svh; min-height: 420px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .map-top { top: 10px; left: 10px; right: 10px; }
  .map-badge { font-size: 9px; letter-spacing: .1em; padding: 0 12px; height: 36px; }
  .map-bottom { left: 10px; right: 10px; bottom: 30px; justify-content: flex-end; }
  .map-credit { left: 12px; bottom: 8px; font-size: 10px; }
  .zoom button { padding: 0 12px; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .detail-view { height: 190px; }
  .detail-body { padding: 20px 20px 16px; }
  .about-body { padding: 28px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
