/* ETHERSEA · Charts */

.page-charts .deck { padding: 120px 56px 60px; max-width: 1500px; margin: 0 auto; }

.head {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--hairline-strong);
}
.page-title { font-size: clamp(48px, 6vw, 88px); margin: 8px 0 12px; letter-spacing: 0.02em; color: var(--chart); line-height: 0.95; }
.lede { font-size: 15.5px; line-height: 1.55; color: var(--chart-dim); max-width: 60ch; margin: 0; }
.head-kv {
  grid-template-columns: 110px 1fr;
  gap: 8px 14px;
  padding: 16px 20px;
  border: 1px solid var(--hairline-strong);
  background: rgba(5,10,20,0.55);
}

.chart-room {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  margin-bottom: 80px;
}

.chart-paper {
  position: relative;
  aspect-ratio: 1200 / 720;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(232, 222, 195, 0.04), transparent 70%),
    linear-gradient(180deg, #0a1a26 0%, #061520 70%, #04101c 100%);
  border: 1px solid var(--hairline-strong);
  overflow: hidden;
}
.chart-paper #bathy { display: block; width: 100%; height: 100%; }

/* contour layers will be styled in JS but base styles here */
#bathy .iso { fill: none; stroke: rgba(45,200,210,0.35); stroke-width: 0.5; }
#bathy .iso.major { stroke-width: 1; stroke: rgba(45,200,210,0.55); }
#bathy .land { fill: rgba(232,197,72,0.06); stroke: rgba(232,197,72,0.6); stroke-width: 0.8; }
#bathy .deepfill { fill: rgba(5,10,20,0.4); }

/* lat/lon ticks */
.latlon {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(232,197,72,0.12) calc(100% - 1px));
  background-size: 80px 100%;
  pointer-events: none;
}
.latlon::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(232,197,72,0.12) calc(100% - 1px));
  background-size: 100% 60px;
}

.rose {
  position: absolute;
  right: 22px; bottom: 22px;
  width: 130px; height: 130px;
  opacity: 0.85;
  pointer-events: none;
}
.rose svg { width: 100%; height: 100%; }

.beacon {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 14px; height: 14px;
  transform: translate(-50%, -50%);
}
.b-ring, .b-pip {
  position: absolute;
  left: 50%; top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.b-pip {
  width: 8px; height: 8px;
  background: var(--beacon);
  box-shadow: 0 0 14px rgba(232,197,72,0.9);
  animation: blink 1.2s infinite;
}
.b-ring {
  width: 16px; height: 16px;
  border: 1px solid var(--beacon);
  opacity: 0;
  animation: ringExp 2.4s infinite;
}
.b-ring.d2 { animation-delay: 0.8s; }
.b-ring.d3 { animation-delay: 1.6s; }
@keyframes ringExp {
  0% { transform: translate(-50%,-50%) scale(0.4); opacity: 0.9; }
  100% { transform: translate(-50%,-50%) scale(6); opacity: 0; }
}
.b-label {
  position: absolute;
  top: 16px; left: 12px;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--beacon);
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

.floor-mark {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
}
.fm-pip {
  display: block;
  width: 10px; height: 10px;
  background: var(--rust);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(198, 70, 25, 0.6);
}
.fm-label {
  position: absolute;
  top: 12px; left: 14px;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--rust);
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

.ann {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: var(--sonar);
  background: rgba(5,10,20,0.6);
  padding: 1px 5px;
  letter-spacing: 0.14em;
  pointer-events: none;
}

.stamp {
  position: absolute;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--chart-dim);
  padding: 4px 8px;
  pointer-events: none;
}
.stamp.tl { top: 16px; left: 16px; }
.stamp.tr { top: 16px; right: 16px; }
.stamp.bl { bottom: 16px; left: 16px; }
.stamp.br { bottom: 16px; right: 180px; }

/* Legend */
.chart-legend {
  border: 1px solid var(--hairline-strong);
  background: rgba(5,10,20,0.55);
  padding: 22px;
}
.chart-legend h4 {
  font-family: var(--captain);
  font-variant: small-caps;
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--chart);
  letter-spacing: 0.04em;
}
.chart-legend ul, .chart-legend ol {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px;
  font-size: 11px;
  color: var(--chart-dim);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
.chart-legend ul li {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
}
.chart-legend ul li i {
  width: 18px; height: 12px;
  background: var(--c);
  border: 1px solid var(--hairline);
}
.chart-legend ul li b { font-weight: 400; color: var(--chart-dim); font-size: 10px; }

.symbols li { grid-template-columns: 20px 1fr; }
.symbols li > span:first-child {
  width: 14px; height: 14px;
  display: inline-block;
}
.s-beacon { background: var(--beacon); border-radius: 50%; box-shadow: 0 0 6px var(--beacon); }
.s-floor { background: var(--rust); transform: rotate(45deg); width: 10px !important; height: 10px !important; margin: 2px; }
.s-wreck { width: 14px; height: 14px; border: 1px solid var(--chart-dim); position: relative; }
.s-wreck::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--chart-dim); font-size: 10px; }
.s-vent { background: radial-gradient(circle, #e8c548, transparent 70%); }

.contacts li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--hairline);
}
.contacts li b { font-weight: 400; color: var(--chart); }
.contacts li span { color: var(--chart-dim); font-size: 10px; }

@media (max-width: 1100px) {
  .head { grid-template-columns: 1fr; }
  .chart-room { grid-template-columns: 1fr; }
}
