/* ============================================================
   Beneath the Starlight — site styles
   Shared by every page. Fonts are served from /fonts (the same
   files the game uses), so nothing loads from Google.
   ============================================================ */

@font-face{
  font-family:'Playfair Display';
  font-style:italic;
  font-weight:700 900;
  font-display:swap;
  src:url(../fonts/playfair-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;
}
@font-face{
  font-family:'Playfair Display';
  font-style:italic;
  font-weight:700 900;
  font-display:swap;
  src:url(../fonts/playfair-italic-latin-ext.woff2) format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'Nunito';
  font-style:normal;
  font-weight:400 800;
  font-display:swap;
  src:url(../fonts/nunito-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:'Nunito';
  font-style:normal;
  font-weight:400 800;
  font-display:swap;
  src:url(../fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root{
  --bg:#000;
  --text:#fff;
  --text-soft:rgba(255,255,255,0.80);
  --text-muted:rgba(255,255,255,0.56);
  --line:rgba(255,255,255,0.14);
  --panel:rgba(10,10,12,0.86);
  --glow:0 0 24px rgba(255,255,255,0.25);
  --serif:'Playfair Display', Georgia, serif;
  --sans:'Nunito', system-ui, sans-serif;
  --page:1080px;
  --read:700px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ background:var(--bg); scroll-behavior:smooth; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body{
  margin:0;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  /* same sky as the game: near-black radial fade into pure black */
  background:radial-gradient(ellipse at 50% -10%, #050505, #000 78%);
  color:var(--text);
  font-family:var(--sans);
  font-size:1.0625rem;
  line-height:1.75;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; }
p{ margin:0 0 1.1em; }

h1,h2,h3{
  font-family:var(--serif);
  font-style:italic;
  font-weight:700;
  line-height:1.15;
  margin:0 0 0.5em;
  text-shadow:var(--glow);
  text-wrap:balance;
}
h1{ font-size:clamp(2.4rem, 7vw, 4.6rem); }
h2{ font-size:clamp(1.8rem, 4.4vw, 2.7rem); }
h3{ font-size:clamp(1.3rem, 2.8vw, 1.6rem); }

.skip-link{
  position:absolute; left:16px; top:-60px; z-index:100;
  background:#fff; color:#000; padding:8px 14px; border-radius:6px;
  font-weight:700; text-decoration:none;
}
.skip-link:focus{ top:12px; }

:focus-visible{ outline:2px solid rgba(255,255,255,0.75); outline-offset:3px; border-radius:4px; }

/* ---- starfield (copied from the game) ---- */
.stars-layer{
  position:fixed;
  /* bigger than the screen so its edge never slides into view when it leans */
  inset:-70px;
  z-index:0;
  overflow:hidden;
  pointer-events:none;
  will-change:transform;
}
.star{
  position:absolute;
  background:#fff;
  border-radius:50%;
  animation:twinkle ease-in-out infinite;
}
.star-still{ animation:none !important; opacity:0.55; }
.sparkle.star-still{ opacity:0.42; }
.sparkle{
  position:absolute;
  background:#f9f8f4;
  clip-path:polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  animation:twinkle ease-in-out infinite;
}
@keyframes twinkle{
  0%,100%{ opacity:0.15; }
  50%{ opacity:0.95; }
}

/* everything that isn't sky sits above it */
.site-header, main, .site-footer{ position:relative; z-index:1; }

/* ---- header & navigation ---- */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(0,0,0,0.82);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:var(--page);
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.logo{
  font-family:var(--serif);
  font-style:italic;
  font-weight:700;
  font-size:1.35rem;
  line-height:1.2;
  text-decoration:none;
  text-shadow:var(--glow);
  white-space:nowrap;
}
.nav-toggle{
  display:none;
  background:none;
  border:1px solid var(--line);
  color:#fff;
  border-radius:8px;
  width:44px; height:40px;
  cursor:pointer;
  padding:0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after{
  display:block;
  width:20px; height:2px;
  background:#fff;
  margin:0 auto;
  position:relative;
  transition:transform .25s ease, background .25s ease;
}
.nav-toggle span::before,
.nav-toggle span::after{ content:''; position:absolute; left:0; }
.nav-toggle span::before{ top:-6px; }
.nav-toggle span::after{ top:6px; }
.nav-open .nav-toggle span{ background:transparent; }
.nav-open .nav-toggle span::before{ transform:translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after{ transform:translateY(-6px) rotate(-45deg); }

.site-nav ul{
  list-style:none;
  margin:0; padding:0;
  display:flex;
  gap:2px;
}
.site-nav a{
  display:block;
  padding:8px 10px;
  font-size:0.8rem;
  font-weight:700;
  letter-spacing:0.06em;
  white-space:nowrap;
  text-transform:uppercase;
  text-decoration:none;
  color:var(--text-muted);
  border-radius:6px;
  transition:color .2s ease, text-shadow .2s ease;
}
.site-nav a:hover{ color:#fff; text-shadow:0 0 10px rgba(255,255,255,0.5); }
.site-nav a[aria-current]{ color:#fff; }
.site-nav a[aria-current]::after{
  content:'';
  display:block;
  height:1px;
  margin-top:3px;
  background:linear-gradient(90deg, transparent, #fff, transparent);
}

@media (max-width:1080px){
  .nav-toggle{ display:block; }
  .site-nav{
    display:none;
    position:absolute;
    left:0; right:0; top:100%;
    background:rgba(0,0,0,0.96);
    border-bottom:1px solid var(--line);
    padding:8px 16px 16px;
  }
  .nav-open .site-nav{ display:block; }
  .site-nav ul{ flex-direction:column; gap:0; }
  .site-nav a{ padding:14px 4px; font-size:0.95rem; border-bottom:1px solid var(--line); border-radius:0; }
  .site-nav li:last-child a{ border-bottom:none; }
  .site-nav a[aria-current]::after{ display:none; }
  .site-nav a[aria-current]{ text-shadow:0 0 10px rgba(255,255,255,0.5); }
}

/* ---- layout ---- */
main{ flex:1; width:100%; }
.section{
  max-width:var(--page);
  margin:0 auto;
  padding:clamp(48px, 8vw, 96px) 16px;
}
.section + .section{ padding-top:0; }
.reading{ max-width:var(--read); margin:0 auto; }
.center{ text-align:center; }
.eyebrow{
  display:block;
  font-family:var(--sans);
  font-style:normal;
  font-size:0.8rem;
  font-weight:700;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:10px;
  text-shadow:none;
}
.lead{ font-size:clamp(1.1rem, 2.2vw, 1.3rem); color:var(--text-soft); }
.soft{ color:var(--text-soft); }
.muted{ color:var(--text-muted); }
.small{ font-size:0.9rem; margin-top:12px; }
.divider{
  border:0;
  height:1px;
  max-width:var(--page);
  margin:0 auto;
  background:linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

/* ---- hero ---- */
.hero{
  text-align:center;
  padding:clamp(40px, 7vw, 80px) 16px clamp(48px, 8vw, 96px);
  max-width:var(--page);
  margin:0 auto;
}
.hero-art{
  width:min(560px, 100%);
  margin:0 auto clamp(20px, 4vw, 36px);
  /* the picture's soft round edge is built into the file (wanderer-hero.webp) */
}
.byline{
  font-size:clamp(1rem, 2.4vw, 1.25rem);
  font-weight:600;
  letter-spacing:0.05em;
  color:var(--text-soft);
  margin:0 0 1.4em;
}
.page-title{ text-align:center; padding-bottom:0; }
.page-title h1{ margin-bottom:0.25em; }

/* ---- buttons ---- */
.actions{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:8px; }
.actions.left{ justify-content:flex-start; }
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 22px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.6);
  font-weight:700;
  font-size:0.95rem;
  letter-spacing:0.04em;
  text-decoration:none;
  color:#fff;
  background:transparent;
  transition:background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:hover{ box-shadow:0 0 18px rgba(255,255,255,0.35); transform:translateY(-1px); }
.btn-primary{ background:#fff; color:#000; border-color:#fff; }
.btn-primary:hover{ background:#f3f1ea; }
.btn-static{ cursor:default; border-style:dashed; color:var(--text-soft); }
.btn-static:hover{ box-shadow:none; transform:none; }

/* ---- feature rows (text beside a picture) ---- */
.feature{
  display:grid;
  grid-template-columns:minmax(0, 1.5fr) minmax(0, 1fr);
  gap:clamp(28px, 5vw, 64px);
  align-items:center;
}
.feature.flip{ grid-template-columns:minmax(0, 1fr) minmax(0, 1.5fr); }
.feature.flip .feature-media{ order:-1; }
@media (max-width:760px){
  .feature, .feature.flip{ grid-template-columns:1fr; }
  .feature.flip .feature-media{ order:0; }
  .feature-media{ max-width:420px; margin:0 auto; width:100%; }
}

.cover{
  border-radius:6px;
  box-shadow:0 0 0 1px var(--line), 0 18px 50px rgba(0,0,0,0.8), 0 0 60px rgba(255,255,255,0.08);
  max-width:320px;
  margin:0 auto;
}
/* the ink drawings, shown like prints on paper */
.print{
  border-radius:4px;
  box-shadow:0 0 0 1px rgba(255,255,255,0.08), 0 20px 60px rgba(0,0,0,0.85);
}
.print-wide{ width:100%; max-width:560px; margin:2.2em auto; }

.pull{
  font-family:var(--serif);
  font-style:italic;
  font-weight:700;
  font-size:clamp(1.25rem, 2.6vw, 1.5rem);
  line-height:1.4;
  margin:1.4em 0;
  padding-left:18px;
  border-left:2px solid rgba(255,255,255,0.5);
}
.tags{ list-style:none; padding:0; margin:0 0 1.4em; display:flex; flex-wrap:wrap; gap:8px; }
.tags li{
  font-size:0.82rem;
  font-weight:700;
  letter-spacing:0.04em;
  padding:4px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--text-soft);
}

/* ---- cards ---- */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  padding:clamp(22px, 4vw, 36px);
}
.card h3{ margin-bottom:0.4em; }
.card p:last-child{ margin-bottom:0; }
.grid{
  display:grid;
  gap:18px;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.card-link{
  display:flex;
  gap:clamp(18px, 3vw, 28px);
  align-items:center;
  text-decoration:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.card-link:hover{ border-color:rgba(255,255,255,0.4); box-shadow:0 0 30px rgba(255,255,255,0.08); }
.card-link .arrow{ margin-left:auto; font-size:1.4rem; opacity:0.6; transition:transform .2s ease; }
.card-link:hover .arrow{ transform:translateX(4px); opacity:1; }
@media (max-width:560px){
  .card-link{ flex-direction:column; text-align:center; }
  .card-link .arrow{ margin:0; }
}

.app-icon{
  width:clamp(96px, 16vw, 140px);
  border-radius:24%;
  box-shadow:0 0 0 1px rgba(255,255,255,0.14), 0 0 40px rgba(255,255,255,0.12);
  flex-shrink:0;
}
.app-icon.big{ width:clamp(140px, 26vw, 200px); margin:0 auto 24px; }

/* ---- contact list ---- */
.contact-list{ list-style:none; padding:0; margin:0; display:grid; gap:14px; }
.contact-list a{
  display:flex;
  align-items:center;
  gap:16px;
  padding:16px 20px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  text-decoration:none;
  transition:border-color .2s ease, box-shadow .2s ease;
  overflow-wrap:anywhere;
}
.contact-list a:hover{ border-color:rgba(255,255,255,0.4); box-shadow:0 0 24px rgba(255,255,255,0.08); }
.contact-list svg{ flex-shrink:0; }
.contact-list strong{ display:block; font-size:0.78rem; letter-spacing:0.16em; text-transform:uppercase; color:var(--text-muted); }

/* ---- legal text ---- */
.legal h2{ font-size:clamp(1.3rem, 3vw, 1.6rem); margin-top:1.8em; }
.legal p{ color:var(--text-soft); }

/* ---- footer ---- */
.site-footer{
  border-top:1px solid var(--line);
  text-align:center;
  padding:28px 16px 32px;
  font-size:0.85rem;
  color:var(--text-muted);
}
.footer-links{ list-style:none; padding:0; margin:0 0 14px; display:flex; justify-content:center; flex-wrap:wrap; gap:6px 20px; }
.footer-links a{ text-decoration:none; color:var(--text-muted); }
.footer-links a:hover{ color:#fff; }
.site-footer p{ margin:0; }
.social{
  display:inline-flex;
  padding:6px;
  margin-bottom:10px;
  color:#fff;
  opacity:0.7;
  border-radius:8px;
  transition:opacity .2s ease, transform .2s ease, filter .2s ease;
}
.social:hover,
.social:focus-visible{
  opacity:1;
  transform:translateY(-1px);
  filter:drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .star, .sparkle{ animation:none !important; opacity:0.6; }
  .btn, .card-link, .social{ transition:none; }
}

/* small pictures inside link cards */
.thumb{ width:72px; flex-shrink:0; }
.thumb-cover{ border-radius:6px; box-shadow:0 0 0 1px var(--line); }
.pull.plain{ border:0; padding:0; }
.actions.spaced{ margin-top:2em; }

/* A faint dark halo behind text, so a bright sparkle drifting behind a word
   never eats into its letters. Invisible against the black sky itself. */
main p, main li, .eyebrow, .btn-static{ text-shadow:0 0 6px #000, 0 0 2px #000; }
h1, h2, h3, .logo{ text-shadow:0 0 6px #000, 0 0 24px rgba(255,255,255,0.25); }
.btn-primary, .tags li{ text-shadow:none; }
.btn-static{ background:rgba(0,0,0,0.6); }

/* let pictures shrink with narrow screens instead of pushing the page wider */
.cover{ width:100%; }
.feature > *{ min-width:0; }

/* ---- header layout: logo left, everything else right ---- */
.header-inner{ justify-content:flex-start; gap:8px; }
.logo{ margin-right:auto; }

/* a picture whose edges already fade to black needs no frame line */
.print-soft{ box-shadow:none; border-radius:0; }

/* ---- the game's sub-tabs ---- */
.subnav{
  max-width:var(--page);
  margin:0 auto;
  padding:clamp(20px, 4vw, 32px) 16px 0;
}
.subnav ul{
  list-style:none;
  margin:0 auto;
  padding:4px;
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:4px;
  width:fit-content;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(0,0,0,0.6);
}
.subnav a{
  display:block;
  padding:8px 16px;
  border-radius:999px;
  font-size:0.88rem;
  font-weight:700;
  letter-spacing:0.03em;
  text-decoration:none;
  color:var(--text-muted);
  white-space:nowrap;
  transition:color .2s ease, background .2s ease;
}
.subnav a:hover{ color:#fff; }
.subnav a[aria-current="page"]{ background:#fff; color:#000; }
@media (max-width:560px){
  .subnav ul{ border-radius:18px; width:100%; }
  .subnav li{ flex:1 1 45%; }
  .subnav a{ text-align:center; padding:10px 8px; }
}

/* ---- documents from the app (support, privacy, terms) ---- */
.doc h1{ font-size:clamp(2rem, 5.5vw, 3rem); }
.doc h2{ font-size:clamp(1.3rem, 3vw, 1.6rem); margin-top:1.9em; }
.doc p, .doc li{ color:var(--text-soft); }
.doc .doc-sub{ color:var(--text-muted); margin-top:-0.3em; margin-bottom:1.8em; }
.doc ul{ padding-left:1.3em; margin:0 0 1.1em; }
.doc li{ margin-bottom:0.45em; }
.doc li::marker{ color:rgba(255,255,255,0.45); }
.doc strong{ color:#fff; }
.doc a{ color:#fff; text-underline-offset:3px; }

/* ============================================================
   Moving between pages
   The header (and on the game pages, the sub-tab bar) holds still.
   The old page fades out as the new one arrives, in browsers that can
   (Chrome, Edge, Safari). In every browser the new page rises gently
   into place while js/site.js swings the sky across to a new part of
   the night and sends a shooting star or two.
   ============================================================ */
@view-transition{ navigation:auto; }

.site-header{ view-transition-name:site-header; }

/* The sky is not given a name of its own: it is part of the page, so it stays
   behind the words throughout. The new page's sky starts exactly where the old
   one left off and only begins to move once the old page has faded, so the
   two never show at once. */
::view-transition-old(root),
::view-transition-new(root){ animation-duration:.3s; }

/* the page rises into place on arrival */
main{ animation:page-rise .75s cubic-bezier(.2,.7,.2,1) .06s both; }
/* held until the page's opening picture is ready (see js/site.js) */
html.hero-wait main{ animation-play-state:paused; }
@keyframes page-rise{
  from{ opacity:0; transform:translateY(16px); }
}

/* ---- the sky's track: three copies of each layer side by side, so the view
   can swing a whole screen either way and still show unbroken sky ---- */
.sky-track{
  position:absolute;
  top:0; bottom:0;
  left:-100%;
  width:300%;
  display:flex;
}
.sky-tile{
  position:relative;
  flex:0 0 calc(100% / 3);
  height:100%;
}

/* ---- the game's shooting star (angle, length and speed vary per star) ---- */
.shooting-layer{
  position:fixed;
  inset:0;
  z-index:0;
  overflow:hidden;
  pointer-events:none;
}
.shooting-wrap{ position:absolute; }
.shooting-wrap.shooting-left{ transform:scaleX(-1); }
.shooting-star{
  position:absolute;
  width:2px; height:2px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 0 6px 1px rgba(255,255,255,0.85);
  opacity:0;
  animation:shootingStarFly var(--dur, 1.4s) linear var(--delay, .15s) forwards;
}
.shooting-star::after{
  content:'';
  position:absolute;
  top:50%; right:100%;
  width:var(--tail, 90px); height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.7));
  transform:translateY(-50%);
}
@keyframes shootingStarFly{
  /* flies along its own tilt, so the tail genuinely trails the head */
  0%{ opacity:0; transform:translate(0,0) rotate(var(--rot, 37.6deg)); }
  8%{ opacity:1; }
  85%{ opacity:0.9; }
  100%{ opacity:0; transform:translate(var(--dx, 260px), var(--dy, 200px)) rotate(var(--rot, 37.6deg)); }
}

@media (prefers-reduced-motion: reduce){
  @view-transition{ navigation:none; }
  main{ animation:page-fade .3s ease both; }
  @keyframes page-fade{ from{ opacity:0; } }
}

/* the game's sub-tab bar holds still while its pages change beneath it */
.subnav{ position:relative; z-index:1; width:100%; view-transition-name:game-subnav; }

/* a jump to a section on the page stops below the sticky header, not under it */
section[id]{ scroll-margin-top:72px; }

/* ---- a glass finish on the app icon, like an icon on a phone's home screen ----
   Pure styling over the untouched picture: a curved sheen across the top, a thin
   lit rim, and a little shade at the foot for depth. Remove the .icon-glass
   wrappers in the HTML (or this block) to go back to the flat icon. */
.icon-glass{
  position:relative;
  display:inline-block;
  flex-shrink:0;
  line-height:0;
  border-radius:24%;
  overflow:hidden;
  isolation:isolate;
  box-shadow:0 0 0 1px rgba(255,255,255,0.14), 0 0 40px rgba(255,255,255,0.12), 0 14px 30px rgba(0,0,0,0.6);
}
.icon-glass.big{ display:block; width:fit-content; margin:0 auto 24px; }
.icon-glass > img.app-icon{ display:block; margin:0; border-radius:0; box-shadow:none; }
/* the curved sheen: a wide ellipse of light falling across the upper half */
.icon-glass::before{
  content:'';
  position:absolute;
  left:-18%; right:-18%;
  top:-58%;
  height:104%;
  border-radius:50%;
  background:linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.10) 55%, rgba(255,255,255,0.02) 100%);
  pointer-events:none;
  z-index:1;
}
/* the rim: light along the top edge, a faint line all round, shade at the foot */
.icon-glass::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.16),
    inset 0 -14px 22px rgba(0,0,0,0.35);
  pointer-events:none;
  z-index:2;
}

/* ============================================================
   Phones and other touch screens
   ============================================================ */
/* no grey flash over links and buttons when they are tapped */
a, button{ -webkit-tap-highlight-color:transparent; }

/* fingertip-sized targets in the footer */
.footer-links a{ display:inline-block; padding:10px 6px; }
.social{ padding:9px; }

/* On a touch screen a tapped element keeps its :hover look until something
   else is tapped, so a glow would stay stuck on. Touch screens get a quick
   press effect instead. */
@media (hover:none){
  .btn:hover{ box-shadow:none; transform:none; }
  .btn-primary:hover{ background:#fff; }
  .card-link:hover{ border-color:var(--line); box-shadow:none; }
  .card-link:hover .arrow{ transform:none; opacity:0.6; }
  .contact-list a:hover{ border-color:var(--line); box-shadow:none; }
  .site-nav a:not([aria-current]):hover{ color:var(--text-muted); text-shadow:none; }
  .subnav a:not([aria-current]):hover{ color:var(--text-muted); }
  .footer-links a:hover{ color:var(--text-muted); }
  .social:hover{ opacity:0.7; transform:none; filter:none; }

  .btn:active, .card-link:active, .contact-list a:active,
  .site-nav a:active, .subnav a:active, .footer-links a:active, .social:active{
    opacity:0.7;
    transition:none;
  }
}
/* the logo and the links in the app's documents get a taller tap area; vertical
   padding on an inline link widens what a finger can hit without moving text */
.logo{ padding:8px 0; }
.doc li a{ padding:10px 0; }

/* ---- scrollbar: black, with a dark grey handle so it can still be found ----
   Only appears where a page is taller than the screen. Phones use their own
   thin overlay scrollbar, which the dark colour scheme also darkens. */
:root{ color-scheme:dark; }
html{ scrollbar-color:#2e2e2e #000; scrollbar-width:thin; }
::-webkit-scrollbar{ width:10px; height:10px; background:#000; }
::-webkit-scrollbar-track{ background:#000; }
::-webkit-scrollbar-thumb{ background:#2e2e2e; border-radius:10px; border:2px solid #000; }
::-webkit-scrollbar-thumb:hover{ background:#4a4a4a; }

/* ============================================================
   Phone tidy-up (2026-10-26)
   Small screens only. Nothing here changes the desktop layout.
   ============================================================ */
@media (max-width:1080px){
  /* the open menu is a solid sheet down to the bottom of the screen, so the
     picture and page underneath no longer show through the links */
  .site-nav{
    background:#000;
    height:calc(100dvh - 100%);
    overflow-y:auto;
    padding:8px 20px 32px;
  }
  .site-nav a{ padding:18px 4px; font-size:1.02rem; }
  html:has(.site-header.nav-open){ overflow:hidden; }
}

@media (max-width:560px){
  /* buttons: full width and the same size, easy to hit with a thumb */
  .actions, .actions.left{ flex-direction:column; align-items:stretch; max-width:420px; margin-left:auto; margin-right:auto; }
  .actions .btn{ width:100%; justify-content:center; text-align:center; padding-top:15px; padding-bottom:15px; }

  /* the near sparkles are quieter behind text on a small screen */
  #sparkleLayer{ opacity:0.5; }

  /* the game's sub-tabs: one swipeable row instead of a two-by-two block */
  .subnav ul{ flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; border-radius:999px; scrollbar-width:none; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; }
  .subnav ul::-webkit-scrollbar{ display:none; }
  .subnav li{ flex:0 0 auto; scroll-snap-align:start; }
  .subnav a{ padding:10px 16px; white-space:nowrap; }
  /* a soft fade at the edges hints that the row scrolls */
  .subnav ul{ -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image:linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); padding-left:8px; padding-right:24px; }

  /* slightly larger tags so they read as easily as the text around them */
  .tags li{ font-size:0.86rem; padding-top:7px; padding-bottom:7px; }
}
