/* The site's frame, the same on every page: the bar on top and the footer
   (pages/layout.ts siteHeader / siteFooter). Linked by the static pages and
   by index.html, where the landing page adopts both (ui/lobby.ts), so the
   game and the pages are one site with one bar. Nothing here touches the
   page around them: the reading pages have pages.css, the game style.css.
   At the end, the pill of the site's script (site.js). */

.site-head,
.site-foot {
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* --- The bar: the name, then the tabs (Play first), then whatever the page
   adds on the right (the landing page: how many people are around) --- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 28px;
  min-height: 56px;
  padding: 0 20px;
  background: rgba(10, 15, 27, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #e6e9ef;
}

.site-head .brand {
  display: flex;
  align-items: center;
  color: #e6e9ef;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
}

.site-head .brand img {
  flex: none;
  width: 36px;
  height: 28px;
  margin-right: 9px;
}

.site-head .brand .tld {
  color: #8b98ad;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-self: stretch;
  gap: 6px;
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #9fadc4;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #ffd166;
}

/* Below this the bar no longer fits on one row: the tabs go under the name. */
@media (max-width: 900px) {
  .site-head {
    gap: 4px 18px;
    padding: 8px 16px 0;
  }

  .site-nav {
    order: 3;
    flex-wrap: wrap; /* a phone's width doesn't hold all the tabs on one row */
    width: 100%;
    margin-left: -14px;
  }

  .site-nav a {
    min-height: 40px;
  }
}

/* --- The footer --- */

.site-foot {
  flex: none;
  padding: 20px 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #0b101c; /* solid: on the home page the game's map lies under it */
  color: #8b98ad;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-bottom: 8px;
}

.site-foot nav a {
  color: #9fadc4;
  text-decoration: none;
}

.site-foot nav a:hover,
.site-foot nav a[aria-current="page"] {
  color: #e6e9ef;
}

.site-foot p {
  margin: 3px 0;
}

.site-foot .credit,
.site-foot .credit a {
  color: #6f7d94;
  font-size: 12px;
}

/* --- "Copied to clipboard" (site.js): a pill by an email link for a couple
   of seconds after a click on it. It lies on the page, above everything (the
   game's interface too), where the script puts it; --from is where it slides
   in from. --- */

.copied-toast {
  position: absolute;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px 7px 11px;
  border: 1px solid rgba(86, 104, 140, 0.8);
  border-radius: 17px;
  background: #18223a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #e6e9ef;
  font: 600 12.5px/1.3 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.2px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateY(var(--from, 6px));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.copied-toast.show {
  opacity: 1;
  transform: none;
}

.copied-toast svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: #5fd07a;
}

@media (prefers-reduced-motion: reduce) {
  .copied-toast {
    transition: opacity 0.18s ease;
    transform: none;
  }
}

@media print {
  .site-head,
  .site-foot,
  .copied-toast {
    display: none;
  }
}
