/* LP案モック — 概略ゲレンデマップ（七戸 /map レイアウト参考） */

:root {
  --map-bg: #0f1419;
  --map-slope: #1a2332;
  --map-slope-mid: #243044;
  --map-rail-bg: #f8f9fb;
  --map-rail-border: #e2e6ec;
  --map-rail-text: #1a1f26;
  --map-rail-muted: #5c6570;
  --map-lift: #3b82f6;
  --map-trail-beginner: #4ade80;
  --map-trail-intermediate: #facc15;
  --map-trail-advanced: #374151;
  --map-trail-mixed: #f97316;
  --map-status-op: #22c55e;
  --map-status-stop: #ef4444;
  --map-status-hold: #eab308;
}

*, *::before, *::after { box-sizing: border-box; }

body.map-page {
  margin: 0;
  min-height: 100dvh;
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  background: var(--map-bg);
  color: var(--map-rail-text);
  display: flex;
  flex-direction: column;
}

.map-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--map-rail-border);
  flex-shrink: 0;
}

.map-topbar a { color: inherit; text-decoration: none; font-size: 0.8125rem; }
.map-topbar .logo { font-weight: 700; font-size: 0.875rem; }
.map-topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.map-fidelity-notice {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--map-rail-muted);
  background: #f3f5f8;
  border-bottom: 1px solid var(--map-rail-border);
  flex-shrink: 0;
}

.map-shell {
  flex: 1;
  display: flex;
  min-height: 0;
  min-height: calc(100dvh - 52px);
}

.map-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #0f1419;
  overflow: hidden;
}

.map-stage-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 4;
  padding: 0.2rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e2e8f0;
  background: rgba(15, 20, 25, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 3px;
  pointer-events: none;
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-hero {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: pointer;
}

.map-highlight {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95));
}

.map-highlight--lift {
  stroke: #60a5fa;
  stroke-width: 6;
  stroke-dasharray: 8 6;
}

.map-highlight--trail {
  stroke-width: 10;
}

.map-highlight--trail[data-difficulty="beginner"] { stroke: #4ade80; }
.map-highlight--trail[data-difficulty="intermediate"] { stroke: #facc15; }
.map-highlight--trail[data-difficulty="advanced"] { stroke: #f8fafc; }
.map-highlight--trail[data-difficulty="intermediate-advanced"] { stroke: #fb923c; }
.map-highlight--trail[data-difficulty="nordic"] { stroke: #c4b5fd; }
.map-highlight--trail[data-difficulty="sled"] { stroke: #cbd5e1; }

/* legacy schematic classes removed — hero image + overlay */

.map-disclaimer {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  max-width: min(22rem, 70%);
  padding: 0.5rem 0.65rem;
  background: rgba(15, 20, 25, 0.72);
  color: #cbd5e1;
  font-size: 0.6875rem;
  line-height: 1.5;
  border-radius: 4px;
  pointer-events: none;
}

.map-rail {
  width: 20rem;
  max-width: 42vw;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--map-rail-bg);
  border-left: 1px solid var(--map-rail-border);
}

.map-rail-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--map-rail-border);
}

.map-rail-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.map-rail-updated {
  margin: 0.25rem 0 0;
  font-size: 0.625rem;
  color: var(--map-rail-muted);
  font-family: "IBM Plex Mono", monospace;
}

.map-tabs {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  border-bottom: 1px solid var(--map-rail-border);
}

.map-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--map-rail-muted);
  cursor: pointer;
}

.map-tab[aria-selected="true"] {
  color: var(--map-rail-text);
  border-bottom-color: var(--map-rail-text);
}

.map-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.map-group-title {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--map-rail-muted);
}

.map-list-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--map-rail-text);
}

.map-list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-list-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-list-badge {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  flex-shrink: 0;
}

.map-list-badge.is-live {
  background: #7ec8e3;
  color: #0f172a;
}

.map-detail-status {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--map-rail-muted);
}

.map-canvas-content {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  transform-origin: center center;
  will-change: transform;
}

.map-canvas-content.is-ready {
  opacity: 1;
}

.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 22;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: pointer;
}

.map-hit.is-dimmed {
  opacity: 0.35;
}

.map-status-line.is-dimmed {
  opacity: 0.25 !important;
}

/* Selection on snow: dark halo + amber core (white disappears on piste) */
.map-select-ring {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-select-ring--halo {
  stroke: #0b1220;
  stroke-width: 9;
  stroke-opacity: 0.92;
}
.map-select-ring--core {
  stroke: #f59e0b;
  stroke-width: 4;
  stroke-opacity: 1;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.75));
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1419;
}

.map-loading::after {
  content: "";
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.8);
  animation: map-spin 0.8s linear infinite;
}

@keyframes map-spin {
  to { transform: rotate(360deg); }
}

.map-zoom-fabs {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}

.map-zoom-btn {
  pointer-events: auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--map-rail-border);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 700;
  color: var(--map-rail-text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.map-zoom-btn:hover {
  background: #fff;
}

.map-list-item:hover { background: #eef1f5; }
.map-list-item.is-selected { background: #e8edf4; }

.map-detail {
  border-top: 1px solid var(--map-rail-border);
  padding: 1rem;
  background: #fff;
}

.map-detail h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
}

.map-detail-meta {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--map-rail-muted);
}

.map-detail-meta li { display: flex; gap: 0.5rem; }
.map-detail-meta strong { color: var(--map-rail-text); min-width: 4.5rem; font-weight: 600; }

.map-legend {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--map-rail-border);
  font-size: 0.625rem;
  color: var(--map-rail-muted);
}

.map-legend-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.35rem; }
.map-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 3px;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.map-mobile-fab {
  display: none;
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--map-rail-bg);
  border: 1px solid var(--map-rail-border);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.map-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 30;
}

.map-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(70dvh, 520px);
  z-index: 40;
  flex-direction: column;
  background: var(--map-rail-bg);
  border-top: 1px solid var(--map-rail-border);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
}

.map-sheet.is-open,
.map-sheet-backdrop.is-open { display: flex; }

.map-error {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #94a3b8;
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 767px) {
  .map-rail { display: none; }
  .map-mobile-fab { display: block; }
  .map-sheet .map-rail {
    display: flex;
    width: 100%;
    max-width: none;
    border-left: none;
    max-height: min(70dvh, 520px);
  }
}
