/* Living Cosmos — site pages (front page, sign-in, price, legal, games shelf).
   The game's own night sky and white buttons, plus felt-tip strokes in the colours of real children's drawings.
   No glass, no glow, no capsule labels. Dials: VARIANCE 6 · MOTION 5 · DENSITY 3 */
:root {
  color-scheme: dark;
  --bg: #03040b;
  --text: #f3f5ff; --soft: rgba(243, 245, 255, 0.62); --faint: rgba(243, 245, 255, 0.4);
  --glass: #0c0d14; --well: #12131c; --well-hi: #1b1d29;
  --line: rgba(255, 255, 255, 0.14);
  --sun: #43c35a; --pen-green: #43c35a; --pen-red: #e2503f; --pen-blue: #4f7fe6; --white: #ffffff; --ink: #111113; --ok: #7ee2b8; --danger: #ff8d82;
  --display: "Geologica", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --body: "Geologica", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r-l: 14px; --r-m: 10px;
  /* names the pages still use */
  --edge: 1px solid var(--line); --paper: var(--well); --paper-2: var(--well); --night: var(--bg);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 400 18px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.8) 50%, transparent 51%), radial-gradient(1px 1px at 72% 9%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 42%, rgba(207, 214, 255, 0.7) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 55%, rgba(255, 255, 255, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 78%, rgba(207, 214, 255, 0.6) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 58% 88%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    var(--bg);
  background-size: 900px 900px, 900px 900px, 900px 900px, 900px 900px, 900px 900px, 900px 900px, auto;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
/* pages in another language stay hidden until their words are in place (set by the inline script in <head>) */
html.i18n-wait body { visibility: hidden; }
.wrap { position: relative; max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* top bar */
.bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); letter-spacing: -0.01em; text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; align-items: center; gap: 6px; font: 500 16px/1 var(--body); }
.nav a { text-decoration: none; padding: 12px 14px; border-radius: var(--r-m); color: var(--text); transition: color 0.2s ease, background-color 0.2s ease; }
.nav a:last-child { margin-left: 6px; padding: 12px 18px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.nav a:hover, .nav a:focus-visible { background: rgba(255, 255, 255, 0.12); }
.lang { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 12px 10px; border-radius: var(--r-m); color: var(--soft); cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease; }
.lang::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.lang:hover, .lang:focus-within { color: var(--text); background: rgba(255, 255, 255, 0.12); }
.lang select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.nav .me { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); background: var(--white); box-shadow: none; }
.nav .me:hover, .nav .me:focus-visible { color: var(--ink); background: #e9ecf7; }
.nav .me img { width: 22px; height: 22px; border-radius: 50%; margin: -4px 0 -4px -6px; }

/* buttons: the white button from the game menu, squared off */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 14px 28px;
  font: 700 17px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--white); border: 0; border-radius: var(--r-m);
  transition: transform 0.25s var(--ease), background-color 0.2s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); background: #dfe6ff; }
.btn:active { transform: scale(0.98); }
.btn.alt, .btn.mint { color: var(--text); background: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.btn.alt:hover, .btn.alt:focus-visible, .btn.mint:hover, .btn.mint:focus-visible { background: rgba(255, 255, 255, 0.12); }
.btn.small { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; }
.btn.wide { width: 100%; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* plain dark sheet on a hairline */
.card { background: var(--glass); color: var(--text); border: var(--edge); border-radius: var(--r-l); }
.tag { display: inline-block; font: 500 16px/1.2 var(--body); color: var(--soft); }

/* a felt-tip stroke under or around words: drawn in when it comes on screen */
.scribble { position: relative; display: inline-block; font-style: normal; white-space: nowrap; }
.scribble svg { position: absolute; left: -3%; bottom: -0.16em; width: 106%; height: 0.3em; overflow: visible; fill: none; stroke: var(--pen-green); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.scribble svg path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s 0.5s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.note { color: var(--soft); font-size: 15px; line-height: 1.6; }
.note a { color: var(--text); }
.err { min-height: 22px; margin-top: 12px; color: var(--danger); font-size: 15px; }

/* fields */
.field { display: block; width: 100%; min-height: 54px; padding: 12px 16px; font: 500 18px/1.2 var(--body); color: var(--text); background: var(--well); border: var(--edge); border-radius: var(--r-m); transition: border-color 0.2s ease, background-color 0.2s ease; }
.field:focus { outline: none; border-color: rgba(255, 255, 255, 0.5); background: var(--well-hi); }
.field::placeholder { color: var(--faint); }
label.lab { display: block; margin: 0 0 8px; font: 500 14px/1.2 var(--body); color: var(--soft); }

/* footer */
.foot { margin-top: 110px; padding: 28px 0 44px; border-top: var(--edge); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; color: var(--faint); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: var(--soft); text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: var(--text); }

/* every language as a plain link under the footer */
.langs { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: -26px; padding: 0 0 36px; font-size: 14px; }
.langs a { padding: 8px 0; color: var(--faint); text-decoration: none; transition: color 0.2s ease; }
.langs a:hover, .langs a:focus-visible, .langs a[aria-current] { color: var(--text); }

/* legal pages */
.doc { max-width: 760px; margin: 24px auto 0; padding: 40px 38px; }
.doc h1 { font-size: clamp(34px, 6vw, 52px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; letter-spacing: -0.02em; margin: 30px 0 8px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; margin: 0 0 10px; color: var(--soft); }
.doc a { color: var(--text); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  .nav a { padding: 10px 9px; font-size: 15px; } .lang { padding: 10px 6px; font-size: 15px; } .nav a:last-child { padding: 10px 13px; margin-left: 2px; }
  .logo span { display: none; }
  .nav .wide-only { display: none; }
  .doc { padding: 28px 22px; }
  .scribble { white-space: normal; }
  html { overflow-x: clip; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scribble svg path { stroke-dashoffset: 0; }
}
