/* Icon labels remain visible without JavaScript. */
.nav a { display: inline-flex; align-items: center; gap: .38rem; white-space: nowrap; }
.nav a svg { flex: none; color: var(--accent-light, #c4a9ff); }
.nav a:hover svg, .nav a:focus-visible svg { color: currentColor; }
.nav { gap: .36rem clamp(.7rem, 1.4vw, 1.25rem); }
.nav a:focus-visible, .section-rail a:focus-visible {
  outline: 2px solid var(--accent-light, #c4a9ff);
  outline-offset: 3px;
  border-radius: 6px;
}

.section-rail { display: none; }
@media (min-width: 1200px) {
  body:has(.section-rail) .shell { max-inline-size: min(1240px, calc(100% - 156px)); }
  .section-rail[data-ready] {
    position: fixed;
    z-index: 5;
    inset-inline-end: clamp(14px, 2vw, 30px);
    inset-block-start: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: .5rem;
  }
  .section-rail::before {
    content: "";
    position: absolute;
    inset-block: 16px;
    inset-inline-start: 50%;
    width: 1px;
    background: #5a4a6d;
    pointer-events: none;
  }
  .section-rail a {
    position: relative;
    display: grid;
    place-items: center;
    inline-size: 36px;
    block-size: 36px;
    border-radius: 50%;
    border: 1px solid #42394e;
    color: #d3c6e2;
    background: #14111c;
    text-decoration: none;
  }
  .section-rail a[aria-current="location"] {
    border-color: #c5a4ff;
    color: #170f22;
    background: #c5a4ff;
  }
  .section-rail a span {
    position: absolute;
    inset-inline-end: calc(100% + .55rem);
    white-space: nowrap;
    border: 1px solid #6e5488;
    border-radius: 6px;
    padding: .32rem .62rem;
    background: #17111f;
    color: #fff;
    font-size: .83rem;
    opacity: 0;
    pointer-events: none;
  }
  .section-rail a:is(:hover,:focus-visible) span { opacity: 1; }
}

.welcome-splash { display: none; }
.welcome-playing .welcome-splash {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.7rem, 3vw, 1.2rem);
  background: #000;
  color: #fff;
  text-align: center;
  pointer-events: none;
  animation: joycat-cover 1.5s both;
}
.welcome-splash img { display: block; width: clamp(155px, 31vw, 305px); max-height: 56dvh; height: auto; object-fit: contain; }
.welcome-splash p { font-weight: 650; font-size: clamp(1rem, 3vw, 1.55rem); }
.welcome-line { width: min(54vw, 220px); height: 4px; overflow: hidden; background: #3c2b52; border-radius: 3px; }
.welcome-line span { display: block; height: 100%; transform-origin: left; background: #d1a8ff; animation: joycat-line 1.25s ease-out both; }
@keyframes joycat-cover { 0%, 84% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes joycat-line { from { transform: scaleX(.03); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .welcome-playing .welcome-splash { display: none; }
}
