/* Magic Colours — shared styles for every page */

:root {
  --bg: #fbf4e8;
  --bg-glow: #ffe6c4;
  --fg: #3a2f2c;
  --muted: #7a6a63;
  --card: #fffdf8;
  --card2: #f4eadb;
  --border: #eadfcf;
  --glass: #9c8a82;
  --accent: #c94a63;
  --accent-soft: #fde3e6;
  --link: #b8405a;
  --ok: #2f8a5a;
  --ok-soft: #dff3e6;
  --shadow: 0 24px 64px rgba(96, 62, 36, 0.14), 0 4px 16px rgba(96, 62, 36, 0.06);
  --radius: 18px;

  /* the game's liquids (Liquid.swift), light appearance */
  --honey: #ecd46c;
  --apricot: #ec8831;
  --blush: #f97c86;
  --lilac: #b566c3;
  --periwinkle: #316cd2;
  --sky: #2ab6f5;
  --seaglass: #46dacc;
  --sage: #4c9a4e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2e2a2d;
    --bg-glow: #4a3b33;
    --fg: #f5ece2;
    --muted: #b3a69c;
    --card: #38333a;
    --card2: #413a3f;
    --border: #4d4549;
    --glass: #a8958c;
    --accent: #f28fa2;
    --accent-soft: #4a2f37;
    --link: #f5a3b3;
    --ok: #7fd49a;
    --ok-soft: #26382d;
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.2);

    --honey: #dac45c;
    --apricot: #d97820;
    --blush: #e76c77;
    --lilac: #a456b2;
    --periwinkle: #195ebe;
    --sky: #25a5de;
    --seaglass: #2cc9bb;
    --sage: #3c8a40;
  }
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: 'Fredoka', 'Nunito', sans-serif; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; color: var(--fg); }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@media (max-width: 640px) { nav { padding: 0.7rem 1rem; } }

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--fg);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-links { display: flex; gap: 1rem; font-size: 0.9rem; font-weight: 600; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); text-decoration: none; }
@media (max-width: 640px) {
  .brand { font-size: 1.02rem; gap: 0.5rem; }
  .brand img { width: 28px; height: 28px; }
  .nav-right { gap: 0.5rem; }
  .nav-links { gap: 0.6rem; font-size: 0.82rem; }
  .lang-switch { font-size: 0.8rem; gap: 0; }
  .lang-switch button { padding: 0.2rem 0.35rem; }
}
@media (max-width: 370px) { .brand span { display: none; } }

.lang-switch { display: flex; align-items: center; gap: 0.2rem; font-size: 0.85rem; }
.lang-switch button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.lang-switch button:hover, .lang-switch button.active { background: var(--card2); color: var(--fg); }
.sep { color: var(--border); }

/* ── SECTIONS ── */
.section { max-width: 1000px; margin: 0 auto; padding: 4rem 2rem; }
@media (max-width: 640px) { .section { padding: 2.5rem 1rem; } }

.label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
.section-intro { color: var(--muted); max-width: 580px; margin: 0 0 2.5rem; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── TUBES (drawn in CSS, shared by hero and cards) ── */
.tube {
  --w: 34px;
  --h: 80px;
  --line: 3px;
  position: relative;
  width: var(--w);
  height: var(--h);
  flex-shrink: 0;
}
.glass {
  position: absolute;
  inset: calc(var(--line) * 1.2) 0 0 0;
  border: var(--line) solid var(--glass);
  border-top: none;
  border-radius: 0 0 999px 999px;
  background: color-mix(in srgb, var(--card) 45%, transparent);
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
}
.tube::before {           /* the rim */
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--line) * -1.6);
  right: calc(var(--line) * -1.6);
  height: calc(var(--line) * 2.6);
  border: var(--line) solid var(--glass);
  border-radius: 999px;
  background: var(--card);
  z-index: 2;
}
.tube::after {            /* the glass highlight */
  content: "";
  position: absolute;
  top: 20%;
  left: 22%;
  width: 12%;
  height: 52%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  z-index: 1;
  pointer-events: none;
}
.layer {
  flex: 0 0 21%;
  background: var(--c);
  box-shadow: inset 0 3px 0 color-mix(in srgb, #ffffff 30%, var(--c));
  transition: background 0.3s;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 640px) { footer { padding: 1.5rem 1rem; } }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ── DOCUMENT PAGES (privacy, support) ── */
.page { max-width: 740px; margin: 0 auto; padding: 4rem 2rem 5rem; }
@media (max-width: 640px) { .page { padding: 2.5rem 1rem 4rem; } }
.page h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.page h2 { font-size: 1.2rem; font-weight: 600; margin: 2.5rem 0 0.6rem; }
.page p { color: var(--muted); margin: 0 0 0.75rem; }
.page hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 2rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.card p { margin: 0; }
.card p + p { margin-top: 0.5rem; }

.notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--ok-soft);
  border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.notice.ads { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.notice-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.notice p { margin: 0; color: var(--fg); }

.list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.list li { color: var(--muted); padding-left: 1.1rem; position: relative; }
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.boxes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.boxes li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1.15rem;
  color: var(--muted);
}
.boxes li strong { display: block; margin-bottom: 0.2rem; font-family: 'Fredoka', sans-serif; font-weight: 500; }

.table-wrap { overflow-x: auto; margin: 0 0 0.75rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 800; color: var(--fg); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
td { color: var(--muted); }

.mail-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  margin: 0.5rem 0 0.5rem;
}
.mail-card .icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  font-size: 1.2rem;
}
.mail-card a { font-weight: 700; word-break: break-all; }
.mail-card small { display: block; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
