:root {
  --page-rail-width: 112px;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--amber) #0b0c0d;
  scrollbar-width: thin;
}

body::-webkit-scrollbar {
  width: 11px;
}

body::-webkit-scrollbar-track {
  background: #0b0c0d;
}

body::-webkit-scrollbar-thumb {
  border: 3px solid #0b0c0d;
  border-radius: 0;
  background: var(--amber);
}

.site-shell {
  padding-right: var(--page-rail-width);
}

#birthday-board,
#aircraft-gallery,
#live-airspace {
  scroll-margin-top: 0;
}

.aircraft-gallery {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.14);
  background: #060708;
  isolation: isolate;
}

.aircraft-slide::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 5, 7, 0.82) 0, rgba(2, 5, 7, 0.32) 31%, transparent 58%),
    linear-gradient(0deg, rgba(2, 4, 6, 0.72) 0, transparent 30%);
  content: "";
}

.aircraft-gallery-track {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  outline: none;
  touch-action: pan-x pan-y;
  cursor: grab;
}

.aircraft-gallery-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.aircraft-gallery-track::-webkit-scrollbar {
  display: none;
}

.aircraft-gallery-track:focus-visible {
  box-shadow: inset 0 0 0 3px var(--amber);
}

.aircraft-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #0c1013;
}

.aircraft-slide img {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.01);
}

.aircraft-slide-copy {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 6vw, 94px);
  bottom: clamp(116px, 17vh, 178px);
  width: min(590px, calc(100% - 56px));
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.66);
}

.aircraft-slide-kicker,
.aircraft-spec,
.aircraft-gallery-count,
.page-rail-title,
.page-rail-index {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.15em;
}

.aircraft-slide-kicker {
  display: block;
  margin-bottom: clamp(22px, 4vh, 40px);
  color: var(--amber);
  font-size: clamp(0.68rem, 0.75vw, 0.82rem);
  font-weight: 500;
}

.aircraft-manufacturer {
  margin: 0 0 2px;
  color: #fff;
  font-size: clamp(1.35rem, 2.2vw, 2.3rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
}

.aircraft-slide h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(4.2rem, 10vw, 9.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.86;
}

.aircraft-spec {
  margin: clamp(22px, 3vh, 34px) 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.72rem, 0.85vw, 0.9rem);
  line-height: 1.5;
}

.aircraft-gallery-controls {
  position: absolute;
  z-index: 6;
  left: clamp(28px, 6vw, 94px);
  bottom: clamp(28px, 5vh, 54px);
  display: grid;
  grid-template-columns: 52px 52px minmax(120px, 240px) auto;
  align-items: center;
  gap: 10px;
}

.aircraft-gallery-button {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 0;
  color: #fff;
  background: rgba(5, 8, 10, 0.58);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.aircraft-gallery-button:hover,
.aircraft-gallery-button:focus-visible {
  border-color: var(--amber);
  color: var(--ink);
  background: var(--amber);
  outline: none;
}

.aircraft-gallery-button:disabled,
.page-rail-actions button:disabled {
  opacity: 0.34;
  cursor: default;
}

.aircraft-gallery-button:disabled:hover {
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
  background: rgba(5, 8, 10, 0.58);
}

.aircraft-gallery-button svg {
  width: 22px;
  height: 22px;
}

.aircraft-gallery-progress {
  width: 100%;
  height: 2px;
  margin-inline: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.aircraft-gallery-progress span {
  display: block;
  width: 25%;
  height: 100%;
  transform-origin: left;
  background: var(--amber);
  transition: transform 360ms ease;
}

.aircraft-gallery-count {
  min-width: 68px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.72rem;
  white-space: nowrap;
}

.page-rail {
  position: fixed;
  z-index: 1600;
  inset: 0 0 0 auto;
  width: var(--page-rail-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--ivory);
  background:
    linear-gradient(180deg, rgba(16, 18, 20, 0.96), rgba(6, 7, 8, 0.98));
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.2);
}

.page-rail-title {
  padding: 26px 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.61rem;
  text-align: center;
}

.page-rail-line {
  position: absolute;
  top: 94px;
  bottom: 96px;
  left: 18px;
  width: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.page-rail-line span {
  display: block;
  width: 100%;
  height: 0;
  background: var(--amber);
  transition: height 300ms ease;
}

.page-rail-link {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 5px;
  align-items: center;
  min-height: 118px;
  padding: 18px 10px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.48);
  text-decoration: none;
  transition: color 170ms ease, background 170ms ease;
}

.page-rail-link::before {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: #101214;
  content: "";
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 170ms ease, background 170ms ease;
}

.page-rail-link:hover,
.page-rail-link:focus-visible,
.page-rail-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}

.page-rail-link.is-active::before {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 14px rgba(239, 169, 47, 0.45);
}

.page-rail-index {
  z-index: 1;
  color: var(--amber);
  font-size: 0.63rem;
  text-align: right;
}

.page-rail-label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-transform: uppercase;
}

.page-rail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.page-rail-actions button {
  min-width: 0;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
}

.page-rail-actions button:last-child {
  border-right: 0;
}

.page-rail-actions button:hover,
.page-rail-actions button:focus-visible {
  color: var(--ink);
  background: var(--amber);
  outline: none;
}

.page-rail-actions svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  :root {
    --page-rail-width: 38px;
  }

  .page-rail-title,
  .page-rail-label,
  .page-rail-actions {
    display: none;
  }

  .page-rail-line {
    top: 22px;
    bottom: 22px;
    left: 18px;
  }

  .page-rail-link {
    grid-template-columns: 1fr;
    min-height: 86px;
    padding: 0;
  }

  .page-rail-link::before {
    left: 13px;
  }

  .page-rail-index {
    position: absolute;
    left: -1px;
    width: 38px;
    transform: translateY(24px);
    font-size: 0.54rem;
    text-align: center;
  }

  .aircraft-slide-copy {
    bottom: 132px;
  }

  .aircraft-gallery-controls {
    grid-template-columns: 46px 46px minmax(74px, 1fr) auto;
    right: 24px;
    bottom: 34px;
  }

  .aircraft-gallery-button {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 600px) {
  .aircraft-gallery {
    min-height: 82svh;
  }

  .aircraft-slide img {
    min-height: 82svh;
    object-position: 60% center;
  }

  .aircraft-slide::after {
    background:
      linear-gradient(90deg, rgba(2, 5, 7, 0.8) 0, rgba(2, 5, 7, 0.18) 74%, transparent),
      linear-gradient(0deg, rgba(2, 4, 6, 0.82) 0, transparent 46%);
  }

  .aircraft-slide-copy {
    left: 22px;
    bottom: 116px;
    width: calc(100% - 44px);
  }

  .aircraft-slide-kicker {
    margin-bottom: 18px;
    font-size: 0.58rem;
  }

  .aircraft-manufacturer {
    font-size: 1.1rem;
  }

  .aircraft-slide h3 {
    font-size: clamp(3.2rem, 18vw, 5.5rem);
  }

  .aircraft-spec {
    margin-top: 17px;
    font-size: 0.61rem;
    letter-spacing: 0.1em;
  }

  .aircraft-gallery-controls {
    left: 22px;
    right: 18px;
    bottom: 24px;
    grid-template-columns: 44px 44px 1fr auto;
    gap: 7px;
  }

  .aircraft-gallery-button {
    width: 44px;
    height: 44px;
  }

  .aircraft-gallery-progress {
    margin-inline: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .aircraft-gallery-track {
    scroll-behavior: auto;
  }

  .aircraft-gallery-progress span,
  .page-rail-link,
  .page-rail-link::before,
  .page-rail-line span {
    transition: none;
  }
}
