/* ————————————————————————————————————————————————————————————
   Cavu Games — Clear Air (after the Cavu publishing reader).
   CAVU: ceiling and visibility unlimited. High-altitude blues, a
   horizon line, drifting haze, the flock of swallows. Display in
   Fraunces, everything else in Jost (geometric, flight-deck).

   Day/night: tokens for light, overridden by prefers-color-scheme,
   and pinned either way by data-theme on <html>.
   ———————————————————————————————————————————————————————————— */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/fraunces-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f4f7fb;
  --card: #ffffff;
  --ink: #1c2836;
  --muted: #5b6b7e;
  --accent: #2456a6;
  --rule: #d3deea;
  --wash: #e7eef6;
  --warn: #a33b22;

  --sky-zenith: #3f6fb4;
  --sky-mid: #a3c3e4;
  --sky-horizon: #eaf1f8;
  --hero-ink: #17273c;
  --hero-top-ink: #f2f6fb;
  --haze-o: 1;
  --flock-o: 0.95;
  --shadow: 0 18px 50px rgba(23, 39, 60, 0.18);

  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0d141f;
    --card: #131d2b;
    --ink: #dbe4ef;
    --muted: #8fa1b6;
    --accent: #85b4ea;
    --rule: #26384d;
    --wash: #18243a;
    --warn: #ff9a80;

    --sky-zenith: #060b18;
    --sky-mid: #1a3a52;
    --sky-horizon: #2b4a78;
    --hero-ink: #e8eff8;
    --hero-top-ink: #e8eff8;
    --haze-o: 0.35;
    --flock-o: 0.5;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme='dark'] {
  --paper: #0d141f;
  --card: #131d2b;
  --ink: #dbe4ef;
  --muted: #8fa1b6;
  --accent: #85b4ea;
  --rule: #26384d;
  --wash: #18243a;
  --warn: #ff9a80;

  --sky-zenith: #060b18;
  --sky-mid: #1a3a52;
  --sky-horizon: #2b4a78;
  --hero-ink: #e8eff8;
  --hero-top-ink: #e8eff8;
  --haze-o: 0.35;
  --flock-o: 0.5;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:root[data-theme='light'] {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code {
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
}

.skip:focus {
  top: 1rem;
}

.air-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ——— Sky ———————————————————————————————————————————————————— */

.page {
  position: relative;
  flex: 1 0 auto;
  overflow-x: clip;
}

/* Panel pages: one continuous sky, zenith behind the wordmark,
   fading through the horizon tone into paper. */
.sky-page {
  background: linear-gradient(
    to bottom,
    var(--sky-zenith) 0,
    var(--sky-mid) 11rem,
    var(--sky-horizon) 24rem,
    var(--paper) 44rem
  );
}

.sky-haze {
  position: absolute;
  top: 0;
  left: -8%;
  right: -8%;
  height: 34rem;
  background:
    radial-gradient(45% 24% at 22% 55%, rgba(255, 255, 255, 0.35), transparent 72%),
    radial-gradient(55% 26% at 76% 40%, rgba(255, 255, 255, 0.28), transparent 72%),
    radial-gradient(35% 18% at 48% 72%, rgba(255, 255, 255, 0.22), transparent 72%);
  opacity: var(--haze-o);
  animation: haze-drift 90s linear infinite alternate;
  pointer-events: none;
}

@keyframes haze-drift {
  from {
    transform: translateX(-4%);
  }
  to {
    transform: translateX(4%);
  }
}

/* The catalog: the masthead is the sky, down to the horizon. */
.page-hero .masthead {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--sky-zenith) 0%,
    var(--sky-mid) 42%,
    var(--sky-horizon) 100%
  );
}

.page-hero .sky-haze {
  height: auto;
  bottom: 0;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1.1rem clamp(1rem, 5vw, 4rem);
  color: var(--hero-top-ink);
}

.topbar :focus-visible {
  outline-color: var(--hero-top-ink);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.wordmark-mark {
  width: 2.3rem;
  height: auto;
  aspect-ratio: 171.7 / 160;
  flex: none;
}

.account {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.92rem;
}

.account form {
  margin: 0;
}

.who b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.who-label {
  opacity: 0.85;
}

/* ——— Buttons ——————————————————————————————————————————————— */

.air-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.air-btn-small {
  min-height: 2.3rem;
  padding: 0.45rem 1rem;
  font-size: 0.72rem;
}

.air-btn-solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.air-btn-solid:hover {
  background: transparent;
  color: var(--ink);
}

.air-btn-ghost:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* ——— Catalog ——————————————————————————————————————————————— */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(19rem, 56vh, 31rem);
  padding: 0 clamp(1rem, 5vw, 4rem) clamp(2.2rem, 6vh, 3.5rem);
  color: var(--hero-ink);
}

/* The flock, riding the open sky: white by day, a moonlit
   silhouette at night (--flock-o follows the theme). */
.hero-flock {
  position: absolute;
  top: clamp(0.5rem, 4vh, 2.5rem);
  right: clamp(1rem, 9vw, 8rem);
  width: clamp(9rem, 26vw, 18rem);
  height: auto;
  aspect-ratio: 171.7 / 160;
  color: var(--hero-top-ink);
  opacity: var(--flock-o);
  pointer-events: none;
}

.hero-body {
  position: relative;
  max-width: 40rem;
}

.hero-kicker {
  margin: 0 0 0.8rem;
  opacity: 0.85;
}

/* The motto under the name: free (as in speech) games, as the
   reader's "Libri Liberi". */
.hero-tagline {
  opacity: 0.9;
  margin: 0 0 1.6rem;
}

.hero h1 {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
}

.hero-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  line-height: 1.45;
  margin: 0;
  max-width: 34rem;
  text-wrap: pretty;
}

/* The horizon: a surveyed line with altitude ticks. */
.horizon {
  height: 14px;
  border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 10.5rem) bottom / 100% 14px no-repeat;
  background-color: var(--sky-horizon);
}

.paper {
  padding: clamp(2rem, 6vh, 3.5rem) clamp(1rem, 5vw, 4rem) 3rem;
}

.section-title {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  max-width: 96rem;
  gap: 1.25rem;
}

.game {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 1.4rem 1.5rem 1.5rem;
}

.game-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.game h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.game-desc {
  margin: 0;
  text-wrap: pretty;
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--rule);
  color: var(--muted);
  white-space: nowrap;
}

.tag-members {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.tag-dev {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 55%, transparent);
}

.caps-label {
  margin: 0.2rem 0 -0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.caps {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.caps li {
  position: relative;
  padding-left: 1.3rem;
  margin: 0.3rem 0;
}

/* Altitude marks: small open diamonds. */
.caps li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 0.42rem;
  height: 0.42rem;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

.caps-no li::before {
  border-color: var(--warn);
}

.game h3 a {
  color: inherit;
  text-decoration: none;
}

.game h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.game .game-actions {
  margin-top: auto;
  padding-top: 0.3rem;
}

.share-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.share-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.air-btn-big {
  min-height: 3.2rem;
  padding: 0.9rem 2rem;
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.back {
  margin: 2.5rem 0 0;
}

.empty {
  color: var(--muted);
}

.notice {
  margin: 0 0 1.6rem;
  padding: 0.8rem 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--warn);
}

.presence {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  margin: 0 0 2rem;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--rule);
}

.presence-text {
  flex: 1;
}

.presence-title {
  margin: 0;
  font-weight: 600;
}

.presence-desc {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.presence code {
  font-size: 0.85em;
}

@media (max-width: 34rem) {
  .presence {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ——— Panels (errors, sign in, the dev interstitial) ————————— */

.panel-wrap {
  position: relative;
  padding: clamp(1.5rem, 7vh, 4.5rem) clamp(1rem, 5vw, 4rem) 3rem;
}

.panel {
  max-width: 34rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 5vw, 2.2rem);
}

.panel h1 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

.panel p {
  margin: 0 0 1rem;
}

.panel .kicker {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.panel .lede {
  color: var(--muted);
  font-size: 0.95rem;
}

.panel .caps {
  margin: 0 0 1.2rem;
}

.panel .tag-dev {
  margin-bottom: 0.9rem;
}

.panel-dev {
  border-top: 3px solid var(--warn);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0 0 1.2rem;
  padding: 0.9rem 1rem;
  background: var(--wash);
  font-size: 0.95rem;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.inline-signin {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.inline-signin .signin-mark {
  display: none;
}

/* ——— Atmosphere Login (after Haiku Day) ————————————————————— */

.signin h2 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 0.2rem 0 0.7rem;
}

.signin > p {
  margin: 0 0 1rem;
  font-size: 0.97rem;
}

.signin-mark {
  width: 3rem;
  height: auto;
  aspect-ratio: 171.7 / 160;
  color: var(--accent);
}

.signin .how {
  margin: 0 0 1.3rem;
  padding: 0.7rem 0.95rem;
  background: var(--wash);
  font-size: 0.92rem;
}

.signin .how summary {
  cursor: pointer;
  font-weight: 600;
}

.signin .how p,
.signin .how ul {
  margin: 0.55rem 0 0;
}

.signin .how ul {
  padding-left: 1.2rem;
}

.signin .label,
.other-host label {
  display: block;
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hosts {
  display: grid;
  gap: 0.5rem;
}

/* Each host's own brand colour, as on their sign-in pages. */
.host {
  min-height: 3rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.97rem;
  text-decoration: none;
  transition: filter 0.15s;
}

.host:hover {
  filter: brightness(1.08);
}

.host span {
  font-weight: 400;
  opacity: 0.88;
}

.host strong {
  font-weight: 600;
}

.host-bluesky {
  background: #1185fe;
  border-color: #0a6fd8;
  color: #ffffff;
}

.host-northsky {
  background: #7628bd;
  border-color: #5f2099;
  color: #ffffff;
}

.host-blacksky {
  background: #111111;
  border-color: #000000;
  color: #ffffff;
}

.host-eurosky {
  background: #dc6bb5;
  border-color: #a83d84;
  color: #111111;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .host-blacksky {
    border-color: #4a5566;
  }
}

:root[data-theme='dark'] .host-blacksky {
  border-color: #4a5566;
}

.host-mark {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  margin-right: 0.15rem;
}

.other-host {
  margin: 1.3rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.handle-input input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
}

.handle-input input::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

.handle-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.suggestions {
  margin: 0.35rem 0 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 24px rgba(23, 39, 60, 0.16);
}

.suggestions[hidden] {
  display: none;
}

.suggestions li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.suggestions li.active,
.suggestions li:hover {
  background: var(--wash);
}

.suggestions li.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.suggestions .avatar {
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--card);
  font-weight: 600;
}

.suggestions .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.suggestions .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestions .at {
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.other-host .air-btn {
  width: 100%;
  margin-top: 0.8rem;
}

/* ——— The sign-in sheet ————————————————————————————————————— */

.sheet {
  width: min(30rem, calc(100vw - 2rem));
  max-width: none;
  max-height: min(92dvh, 52rem);
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.sheet::backdrop {
  background: color-mix(in srgb, #060b18 52%, transparent);
  backdrop-filter: blur(3px);
}

.sheet[open] {
  animation: sheet-in 0.22s ease-out;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.sheet-body {
  position: relative;
  padding: 1.6rem 1.6rem 1.8rem;
}

.sheet-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  margin: 0;
}

.close {
  width: 2.6rem;
  height: 2.6rem;
  font: 400 1.7rem/1 var(--font-ui);
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.close:hover {
  color: var(--ink);
}

/* Phones: a bottom sheet. */
@media (max-width: 560px) {
  .sheet {
    width: 100%;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 14px 14px 0 0;
  }

  .sheet-body {
    padding: 1.4rem 1.1rem calc(1.6rem + env(safe-area-inset-bottom));
  }

  .who-label {
    display: none;
  }
}

/* ——— A game's own page ————————————————————————————————————
   /g/<slug> wears the game's art, palette and type (its manifest
   overrides the tokens above); Cavu is the flock in the corner. */

.game-home {
  font-family: var(--font-ui);
}

.cavu-nav summary {
  position: fixed;
  bottom: 1.1rem;
  left: 1.1rem;
  z-index: 43;
  width: 2.4rem;
  list-style: none;
  color: var(--ink);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cavu-nav summary::-webkit-details-marker {
  display: none;
}

.cavu-nav summary:hover,
.cavu-nav summary:focus-visible,
.cavu-nav[open] summary {
  opacity: 0.9;
}

.cavu-nav summary .flock {
  display: block;
  width: 100%;
  height: auto;
}

.cavu-nav[open]::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 41;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}

.cavu-nav-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 42;
  width: min(17rem, 85vw);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.7rem 1.7rem 4.5rem;
  background: var(--paper);
  color: var(--ink);
  border-right: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

.cavu-nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.cavu-nav-flock {
  width: 2rem;
  height: auto;
  flex: none;
}

.cavu-nav-links {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cavu-nav-links form {
  margin: 0;
}

.cavu-nav-links a,
.cavu-nav-links button {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0.1rem;
  cursor: pointer;
}

.cavu-nav-links a:hover,
.cavu-nav-links button:hover {
  color: var(--accent);
}

.cavu-nav-who {
  margin: 0;
  padding: 0.9rem 0.1rem 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.cavu-nav-foot {
  margin: 0;
  color: var(--muted);
}

.title-screen {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2rem, 7vh, 4.5rem) 1rem 3rem;
}

.ts-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ts-art {
  align-self: stretch;
  display: flex;
  justify-content: center;
  margin: 0 0 1.4rem;
}

.ts-art picture {
  display: block;
  width: min(100%, 24rem);
}

.ts-art img {
  display: block;
  width: 100%;
  height: auto;
}

/* Cavu's square flight-deck buttons take the game's shape and type here. */
.game-home .air-btn {
  min-height: 2.6rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}

.ts-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 4.6rem);
  line-height: 1;
  margin: 0 0 1.2rem;
}

.ts-lede {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  line-height: 1.5;
  max-width: 32rem;
  margin: 0 0 2rem;
  text-wrap: pretty;
}

.ts-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
}

.ts-play {
  display: inline-block;
  min-width: 11rem;
  padding: 0.95rem 2.6rem;
  background: var(--ink);
  color: var(--paper);
  font: 700 1.15rem/1 var(--font-ui);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 22%, transparent);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.ts-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 24px color-mix(in srgb, var(--ink) 28%, transparent);
}

.ts-play:focus-visible {
  outline-offset: 3px;
}

.ts-meta {
  margin: 1.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.ts-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem 2.5rem;
  margin-top: clamp(3rem, 9vh, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.ts-facts h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.7rem;
}

.ts-facts p,
.ts-facts .caps {
  margin: 0 0 0.9rem;
}

.title-screen .presence {
  margin-top: 1.5rem;
}

.ts-foot {
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}

.ts-foot p {
  margin: 0;
}

.ts-foot code {
  font-size: 0.95em;
  word-break: break-all;
}

/* ——— Footer ———————————————————————————————————————————————— */

.foot {
  padding: 1.6rem clamp(1rem, 5vw, 4rem) 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

.foot p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sky-haze,
  .sheet[open] {
    animation: none !important;
  }

  .air-btn,
  .host,
  .ts-play,
  .cavu-nav summary {
    transition: none;
  }
}

/* A suggestion with no display name: the handle is the name. */
.suggestions .at:only-child {
  font-size: 0.97rem;
  color: var(--ink);
}
