/* Map page — uses ../css/tokens.css */

.front-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0 14px;
}

.front-intro h1 {
  font: 700 clamp(1.6rem, 5.5vw, 2.3rem) / 1.15 var(--font-display);
  letter-spacing: 0.02em;
}

.front-note {
  max-width: 62ch;
  font: 400 0.875rem/1.5 var(--font-ui);
  color: var(--text-dim);
}

/* ---------- Volume chips ---------- */
.chips {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 14px;
  padding: 2px var(--gutter) 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font: 600 0.875rem var(--font-ui);
  cursor: pointer;
}

.chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.chip:hover {
  color: var(--text);
  border-color: var(--accent);
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.chip[aria-pressed="true"] i {
  background: var(--on-accent);
}

/* ---------- Map ---------- */
.front-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 960px) {
  .front-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
}

.map-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0908;
}

.map {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

@media (min-width: 640px) {
  .map {
    aspect-ratio: 780 / 627;
  }
}

.map:active {
  cursor: grabbing;
}

.map .sea {
  fill: #0e0c0b;
}
.map .land {
  fill: #33271c;
  stroke: #5a4630;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}
.map .water {
  fill: #0e0c0b;
  stroke: #4a3a2b;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.map .grat {
  fill: none;
  stroke: #ffffff;
  stroke-opacity: 0.05;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.map .arctic {
  fill: none;
  stroke: var(--gold);
  stroke-opacity: 0.45;
  stroke-width: 1;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}
.map .sea-label {
  fill: #ffffff;
  fill-opacity: 0.22;
  font: italic 400 11px var(--font-serif);
  letter-spacing: 0.08em;
  text-anchor: middle;
  pointer-events: none;
}
.map .arctic-label {
  fill: var(--gold);
  fill-opacity: 0.6;
  font: 500 9px var(--font-ui);
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* Places */
.pl {
  cursor: pointer;
}

.pl .dot {
  fill: var(--gold);
  stroke: #0b0908;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: opacity 0.15s ease;
}

.pl .ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.pl .hit {
  fill: transparent;
}

.pl text {
  fill: var(--text);
  font: 600 12px var(--font-ui);
  paint-order: stroke;
  stroke: #0b0908;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
}

.map.has-vol .pl:not(.on) .dot {
  opacity: 0.22;
}

.pl.on .dot {
  fill: var(--accent);
}

.pl.on .ring {
  opacity: 0.9;
}

.pl.on text,
.pl.focus text {
  opacity: 1;
}

.pl.focus .ring {
  opacity: 0.9;
  stroke: var(--text);
}

.map-ctl {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-ctl button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(24, 18, 13, 0.92);
  color: var(--text);
  font: 600 1.25rem var(--font-ui);
  cursor: pointer;
}

.map-ctl button:hover {
  border-color: var(--gold);
}

/* ---------- Panel ---------- */
.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}

.panel h2 {
  font: 700 1.3rem/1.2 var(--font-display);
  letter-spacing: 0.02em;
}

.panel .eyebrow {
  color: var(--accent);
}

.panel p {
  color: var(--text-dim);
}

.panel-vol {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: start;
}

.panel-vol img {
  width: 84px;
  aspect-ratio: 5 / 8;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

.panel-vol > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.panel-vol .blurb {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.plist {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plist li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.plist button,
.plist a.row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--text);
  font: 600 0.9375rem var(--font-ui);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.plist li:hover {
  border-color: var(--accent);
}

.plist .sub {
  font: 400 0.8125rem var(--font-ui);
  color: var(--text-dim);
}

.plist .sub a {
  color: var(--accent);
}

.panel .btn {
  align-self: stretch;
}

.noscript {
  padding: 16px;
  color: var(--text-dim);
  font-family: var(--font-ui);
}
