@import url("/controls.css");

/* The site navigation bar that public/nav.js builds: one row on every page, which scrolls
   sideways when its links are wider than the screen. */
.art-nav {
  background: #181425;
  border-bottom: 1px solid #3a4466;
  font:
    13px/1 "Atkinson Hyperlegible",
    system-ui,
    sans-serif;
  touch-action: pan-x;
}
/* The extra top padding holds the current page's lift, frame and badge inside the scroller. */
.art-nav ul {
  list-style: none;
  margin: 0 auto;
  max-width: 1240px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 11px 7px;
  /* The game page's turned frame moves the safe-area insets onto its own edges as --inset-*
     (the kit's frameTurnPortraitGame.css); other pages have no turn and no --inset-*. */
  padding-left: max(16px, var(--inset-left, env(safe-area-inset-left, 0px)));
  padding-right: max(16px, var(--inset-right, env(safe-area-inset-right, 0px)));
  white-space: nowrap;
}
.art-nav ul::-webkit-scrollbar {
  display: none;
}
.art-nav li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 10px;
  vertical-align: -1px;
  background: #3a4466;
}
/* Below 380px the separators close up, to 6px a side at 340px, so all six links fit inside the
   16px gutters. */
@media (max-width: 379.98px) {
  .art-nav li + li::before {
    margin: 0 max(6px, (100vw - 280px) / 10);
  }
}
.art-nav a {
  color: #c0cbdc;
  text-decoration: none;
}
.art-nav a:hover {
  color: #feae34;
}
/* The current page in the game's selected state, held still: a yellow face with plum text, the
   ui-select frame (ink, an amber band, ink) 3px outside its ink edge, lifted 2px onto a plum
   shadow, and the ui-check tick at its top-left corner. */
.art-nav a[aria-current="page"] {
  position: relative;
  top: -2px;
  padding: 1px 6px 1px 10px;
  color: #3e2731;
  background: #fee761;
  border: 1px solid #181425;
  font-weight: 700;
  box-shadow:
    0 0 0 2px #feae34,
    0 0 0 3px #181425,
    0 2px 0 3px #3e2731;
}
.art-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -7px;
  top: -8px;
  width: 16px;
  height: 16px;
  background: url("/art/sprites/ui-check.png") -48px 0 / 64px 16px;
  image-rendering: pixelated;
}
/* Inside the link, so the scroller does not clip it. */
.art-nav a:focus-visible {
  outline: 2px solid #feae34;
  outline-offset: -2px;
}
/* The shared icon control, fixed inside the safe area on long pages. */
.to-top {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}
.to-top-spacer {
  height: calc(76px + env(safe-area-inset-bottom, 0px));
}
