.journey-progress {
  position: fixed;
  z-index: 420;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.opened .journey-progress {
  opacity: 1;
}

.journey-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--rose), #ffd1dc 52%, var(--gold));
  box-shadow: 0 0 12px rgba(255, 127, 159, 0.58);
  will-change: transform;
}

.journey-nav-toggle {
  position: fixed;
  z-index: 135;
  left: 16px;
  bottom: calc(16px + var(--safe-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 72px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(20, 10, 21, 0.68);
  color: #fff7fb;
  box-shadow: 0 10px 28px rgba(16, 6, 18, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.opened .journey-nav-toggle.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.journey-nav-toggle__icon {
  font-size: 16px;
  line-height: 1;
}

.journey-nav-panel[hidden] {
  display: none;
}

.journey-nav-panel {
  position: fixed;
  z-index: 460;
  inset: 0;
  display: grid;
  align-items: end;
  padding-top: calc(30px + var(--safe-top));
  background: rgba(15, 7, 17, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.journey-nav-sheet {
  width: min(100%, 620px);
  max-height: 78vh;
  max-height: min(78dvh, 720px);
  margin-inline: auto;
  padding: 18px 16px calc(18px + var(--safe-bottom));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: color-mix(in srgb, var(--night) 90%, transparent);
  color: var(--ink);
  box-shadow: 0 -24px 70px rgba(27, 11, 28, 0.28);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.journey-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.journey-nav-kicker {
  margin: 0 0 3px;
  color: var(--rose-deep);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.journey-nav-title {
  margin: 0;
  font-size: clamp(19px, 5vw, 25px);
  font-weight: 500;
}

.journey-nav-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(127, 91, 108, 0.18);
  border-radius: 50%;
  background: var(--glass);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.journey-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.journey-nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid rgba(127, 91, 108, 0.16);
  border-radius: 15px;
  background: var(--glass);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.journey-nav-item[aria-current="true"] {
  border-color: color-mix(in srgb, var(--rose) 70%, transparent);
  background: color-mix(in srgb, var(--rose) 13%, var(--glass));
  box-shadow: 0 8px 22px rgba(231, 95, 130, 0.12);
}

.journey-nav-number {
  color: var(--rose-deep);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.journey-nav-name {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-nav-home {
  width: 100%;
  min-height: 46px;
  margin-top: 11px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  color: #fff;
  box-shadow: 0 10px 26px rgba(231, 95, 130, 0.2);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

body.journey-nav-open {
  overflow: hidden;
}

:root:not([data-theme="cosmic"]) .journey-nav-toggle {
  border-color: rgba(90, 59, 72, 0.13);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

@supports not (background: color-mix(in srgb, white 50%, black)) {
  .journey-nav-sheet { background: var(--night); }
  .journey-nav-item[aria-current="true"] { background: rgba(255, 127, 159, 0.12); }
}

@media (max-width: 360px) {
  .journey-nav-grid { grid-template-columns: 1fr; }
  .journey-nav-sheet { max-height: 82dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .journey-progress,
  .journey-nav-toggle {
    transition: none;
  }
}
