/* Navigator — desktop (≥960px): sidebar + map */

@media (min-width: 960px) {
  .stud-nav-stage {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    --nav-ui-bottom: 0px;
    --nav-sheet-peek: 0px;
  }

  .stud-nav-map-layer {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    min-width: 0;
  }

  .stud-nav-panel {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--color-elevated);
    border-right: 1px solid var(--color-border);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    pointer-events: auto;
  }

  html.dark .stud-nav-panel {
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.25);
  }

  .stud-nav-gesture-hint {
    display: none !important;
  }

  .stud-nav-top-back {
    display: none !important;
  }

  .stud-nav-top {
    flex-shrink: 0;
    padding: 18px 18px 12px;
  }

  .stud-nav-planner-card {
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: none;
  }

  .stud-nav-stage.is-navigating .stud-nav-top {
    display: none !important;
  }

  .stud-nav-panel-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .stud-nav-route-panel {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
    transform: none !important;
    visibility: visible;
    pointer-events: auto;
    max-height: none;
    background: transparent;
    margin: 0;
  }

  .stud-nav-route-panel.is-open {
    display: flex;
  }

  .stud-nav-sheet-grab {
    display: none;
  }

  .stud-nav-sheet-peek {
    flex-shrink: 0;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(26, 115, 232, 0.06) 0%, transparent 100%);
  }

  .stud-nav-sheet-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
  }

  .stud-nav-route-panel:not(.is-expanded) .stud-nav-sheet-scroll {
    display: none !important;
  }

  .stud-nav-route-panel.is-expanded .stud-nav-sheet-scroll,
  .stud-nav-route-panel.is-open .stud-nav-sheet-scroll {
    display: block !important;
  }

  .stud-nav-route-panel.is-open .stud-nav-sheet-scroll[hidden] {
    display: none !important;
  }

  .stud-nav-sheet-bar {
    flex-shrink: 0;
    padding: 12px 18px 18px;
    border-top: 1px solid var(--color-border);
  }

  .stud-nav-map-legend {
    position: absolute;
    left: 16px;
    bottom: 52px;
    z-index: 11;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
  }

  .stud-nav-legend-item {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--color-elevated);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .stud-nav-legend-item--elevator::before,
  .stud-nav-legend-item--stairs::before,
  .stud-nav-legend-item--toilet::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
  }

  .stud-nav-legend-item--elevator::before { background: #f9ab00; }
  .stud-nav-legend-item--stairs::before { background: #7b5ea7; }
  .stud-nav-legend-item--toilet::before { background: #0d9488; }

  .stud-nav-floor-stack {
    position: absolute;
    left: 16px;
    right: auto;
    top: auto;
    bottom: 20px;
    z-index: 12;
  }

  .stud-nav-floor-badge {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
  }

  .stud-nav-fabs--mobile {
    display: none;
  }

  .stud-nav-map-controls {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 12;
    display: flex;
    gap: 4px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    pointer-events: auto;
  }

  html.dark .stud-nav-map-controls {
    background: rgba(26, 31, 41, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .stud-nav-map-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 56px;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
  }

  .stud-nav-map-tool:hover,
  .stud-nav-map-tool.is-active {
    background: rgba(0, 122, 255, 0.12);
    color: var(--color-brand);
  }

  .stud-nav-map-tool .icon {
    font-size: 1.25rem;
  }

  .stud-nav-guidance {
    top: 16px;
    left: 16px;
    max-width: 480px;
  }

  .stud-nav-map-hint {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 11;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  html.dark .stud-nav-map-hint {
    background: rgba(26, 31, 41, 0.92);
  }

  .stud-nav-stage.is-navigating .stud-nav-map-hint,
  .stud-nav-stage.is-navigating .stud-nav-map-controls,
  .stud-nav-stage.is-navigating .stud-nav-map-legend {
    display: none;
  }
}

@media (min-width: 1200px) {
  .stud-nav-stage {
    grid-template-columns: 400px minmax(0, 1fr);
  }
}
