/* Longwalker landing page: the app's colors (ui/theme/Color.kt, ui/components/Kit.kt), night by default,
   parchment for day. Serif titles, sans body, cards, chips and bars like the app. */

:root {
  --bg: #151F24;
  --surface: #252A24;
  --surface-high: #2F352E;
  --surface-highest: #3A4038;
  --ink: #EBE2CC;
  --ink-soft: #B5AC97;
  --ink-faint: #5E6458;
  --primary: #E8896C;          /* NightEmber */
  --primary-ink: #151F24;
  --primary-wash: #5A2A1E;
  --sea: #86B7CF;

  /* Meaning colors (night): strong / container / on-container */
  --hp: #E24B4A;       --hp-c: #501313;       --hp-on: #F7C1C1;
  --xp: #EF9F27;       --xp-c: #412402;       --xp-on: #FAC775;
  --strydes: #5DCAA5;  --strydes-c: #04342C;  --strydes-on: #9FE1CB;
  --gold: #EFC14A;     --gold-c: #3D2E06;     --gold-on: #F8DE8E;
  --energy: #85B7EB;   --energy-c: #042C53;   --energy-on: #B5D4F4;
  --talent: #AFA9EC;   --talent-c: #26215C;   --talent-on: #CECBF6;
  --danger: #F09595;   --danger-c: #501313;
  --good: #97C459;     --good-c: #173404;     --good-on: #C0DD97;
  --neutral-c: #2F352E; --neutral-on: #D8CDB5;

  /* Rarity */
  --r-common: #BDB6A6; --r-uncommon: #7CCB6B; --r-rare: #6FA8F0; --r-epic: #C08AF0; --r-legendary: #F0A34E;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

/* Day: the visitor's device setting, or the switch in the menu (data-theme on <html>, saved in this browser). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ECE4CF;
    --surface: #F4EEDF;
    --surface-high: #E3D9C0;
    --surface-highest: #D8CDB5;
    --ink: #2D2922;
    --ink-soft: #6A6152;
    --ink-faint: #B9AE95;
    --primary: #8A2F1C;
    --primary-ink: #ECE4CF;
    --primary-wash: #EBCDBF;
    --sea: #2F5A70;
    --hp: #C0392B;       --hp-c: #FCEBEB;       --hp-on: #791F1F;
    --xp: #BA7517;       --xp-c: #FAEEDA;       --xp-on: #633806;
    --strydes: #0F6E56;  --strydes-c: #E1F5EE;  --strydes-on: #085041;
    --gold: #9A7208;     --gold-c: #FAF0D2;     --gold-on: #5C4405;
    --energy: #185FA5;   --energy-c: #E6F1FB;   --energy-on: #0C447C;
    --talent: #534AB7;   --talent-c: #EEEDFE;   --talent-on: #3C3489;
    --danger: #A32D2D;   --danger-c: #FCEBEB;
    --good: #3B6D11;     --good-c: #EAF3DE;     --good-on: #27500A;
    --neutral-c: #E3D9C0; --neutral-on: #2D2922;
    --r-common: #6B6558; --r-uncommon: #2E7D32; --r-rare: #1E5BB8; --r-epic: #7B2FBE; --r-legendary: #B25400;
    --shadow: 0 10px 30px rgba(45, 41, 34, .15);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #ECE4CF;
  --surface: #F4EEDF;
  --surface-high: #E3D9C0;
  --surface-highest: #D8CDB5;
  --ink: #2D2922;
  --ink-soft: #6A6152;
  --ink-faint: #B9AE95;
  --primary: #8A2F1C;
  --primary-ink: #ECE4CF;
  --primary-wash: #EBCDBF;
  --sea: #2F5A70;
  --hp: #C0392B;       --hp-c: #FCEBEB;       --hp-on: #791F1F;
  --xp: #BA7517;       --xp-c: #FAEEDA;       --xp-on: #633806;
  --strydes: #0F6E56;  --strydes-c: #E1F5EE;  --strydes-on: #085041;
  --gold: #9A7208;     --gold-c: #FAF0D2;     --gold-on: #5C4405;
  --energy: #185FA5;   --energy-c: #E6F1FB;   --energy-on: #0C447C;
  --talent: #534AB7;   --talent-c: #EEEDFE;   --talent-on: #3C3489;
  --danger: #A32D2D;   --danger-c: #FCEBEB;
  --good: #3B6D11;     --good-c: #EAF3DE;     --good-on: #27500A;
  --neutral-c: #E3D9C0; --neutral-on: #2D2922;
  --r-common: #6B6558; --r-uncommon: #2E7D32; --r-rare: #1E5BB8; --r-epic: #7B2FBE; --r-legendary: #B25400;
  --shadow: 0 10px 30px rgba(45, 41, 34, .15);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }
.accent { color: var(--primary); font-weight: 500; letter-spacing: .04em; }

/* ---- Top bar ---- */
/* The floating menu sits over the page's top picture and stays see-through until the visitor scrolls (site.js adds .scrolled). */
:root { --top-h: 64px; }
.top {
  position: sticky; top: 0; z-index: 10; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.top.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom-color: color-mix(in srgb, var(--ink-faint) 40%, transparent);
}
/* The first picture section slides up under the menu; its text keeps clear of it. */
main > .hero:first-child, main > .page-hero:first-child { margin-top: calc(-1 * var(--top-h)); }
.hero-inner, .page-hero-inner { padding-top: calc(var(--top-h) + clamp(28px, 6vw, 72px)) !important; }
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: calc(var(--top-h) + 40px); z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
}
.top:not(.scrolled) .icon-btn { background: color-mix(in srgb, var(--surface-high) 70%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.brand-mark { width: auto; height: 40px; filter: drop-shadow(0 0 6px rgba(40, 210, 220, .35)); }

/* ---- Buttons and chips ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--primary); color: var(--primary-ink);
  font: 500 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:focus-visible, .link-btn:focus-visible, .option:focus-visible, input:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.btn-tiny { padding: 5px 10px; font-size: .72rem; }
.btn-wide { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; filter: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips.tight { gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--neutral-c); color: var(--neutral-on);
  font-size: .85rem; font-weight: 500;
}
.chips.tight .chip { padding: 4px 9px; font-size: .7rem; }
.chip-strydes { background: var(--strydes-c); color: var(--strydes-on); }
.chip-xp { background: var(--xp-c); color: var(--xp-on); }
.chip-gold { background: var(--gold-c); color: var(--gold-on); }
.chip-talent { background: var(--talent-c); color: var(--talent-on); }
.chip-neutral { background: var(--neutral-c); color: var(--neutral-on); }
.t-strydes { color: var(--strydes); }
.t-gold { color: var(--gold); }
.r-common { color: var(--r-common); font-weight: 500; }
.r-legendary { color: var(--r-legendary); font-weight: 500; }
.rare { color: var(--r-rare); font-weight: 500; }
.link { color: var(--primary); font-weight: 500; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card-title { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; font-weight: 500; letter-spacing: .06em; color: var(--sea); margin-bottom: 8px; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; }
.hero-map {
  position: absolute; inset: 0;
  background: url("assets/art/hero-greenhollow.webp") center 40% / cover no-repeat;
  opacity: .75;
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 42%, transparent 75%),
    linear-gradient(to bottom, transparent 70%, var(--bg) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1160px; margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(16px, 4vw, 40px) clamp(48px, 8vw, 96px);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero-logo { width: clamp(96px, 12vw, 140px); height: auto; margin-bottom: 14px; }
.eyebrow { color: var(--primary); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; font-size: .8rem; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

/* The phone mock, drawn like the app */
.phone {
  justify-self: center;
  width: min(340px, 100%);
  padding: 12px;
  border-radius: 38px;
  background: #0d1316;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5), inset 0 0 0 2px #2b3338;
  transform: rotate(2deg);
}
.phone-screen {
  border-radius: 28px; overflow: hidden;
  background: #151F24; color: #EBE2CC;
  padding: 16px 12px; display: grid; gap: 10px;
  /* The phone always shows the app at night, like the screenshots will. */
  --surface: #252A24; --ink-soft: #B5AC97; --primary: #E8896C; --sea: #86B7CF;
  --strydes-c: #04342C; --strydes-on: #9FE1CB; --gold-c: #3D2E06; --gold-on: #F8DE8E; --neutral-c: #2F352E; --neutral-on: #D8CDB5;
  --hp: #E24B4A; --xp: #EF9F27; --r-rare: #6FA8F0;
}
.phone .card { padding: 12px; box-shadow: none; background: #252A24; }
.phone .muted { color: #B5AC97; }
.hero-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.emblem { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #4F7F3A; font-size: 1.2rem; }
.hero-name { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; }
.bar { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.bar-icon { width: 14px; font-size: .8rem; text-align: center; }
.bar-icon.hp { color: var(--hp); } .bar-icon.xp { color: var(--xp); }
.track { flex: 1; height: 7px; border-radius: 99px; background: #3A4038; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; }
.fill.hp { background: var(--hp); } .fill.xp { background: var(--xp); }
.card-region-sm { background: #14263A !important; }
.track.road { margin-bottom: 8px; } .fill.road { background: #6FB3D6; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #B5AC97; border-radius: 99px; overflow: hidden; font-size: .78rem; text-align: center; }
.toggle span { padding: 6px; } .toggle .on { background: #5A2A1E; }
.card-encounter { box-shadow: inset 0 0 0 1.5px #E8896C !important; }
.card-encounter p { margin: 4px 0 8px; font-size: .88rem; }
.encounter-actions { display: flex; gap: 6px; }

/* ---- Sections ---- */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 40px); }
.section-lede { color: var(--ink-soft); font-size: 1.08rem; max-width: 46em; margin-bottom: 28px; }
.grid { display: grid; gap: 16px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.feature p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 12px; }
.tone-strydes { background: var(--strydes-c); } .tone-energy { background: var(--energy-c); }
.tone-gold { background: var(--gold-c); } .tone-talent { background: var(--talent-c); }

/* ---- World ---- */
.map-frame { margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--ink-faint) 50%, transparent); }
.regions { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: region; }
.region {
  counter-increment: region;
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tone) 14%, var(--surface));
  box-shadow: var(--shadow);
}
.region img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.region-text { display: grid; gap: 2px; padding: 12px 14px 14px 46px; border-top: 3px solid var(--tone); }
.region::before {
  content: counter(region);
  position: absolute; left: 16px; bottom: 22px;
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--tone);
}
.region-name { font-family: var(--serif); font-weight: 600; }
.region-meta { font-size: .85rem; color: var(--ink-soft); }

/* ---- Monsters and adventures ---- */
.monsters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.monster, .place, .race, .hero-class { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.monster img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.monster figcaption { padding: 10px 14px; font-family: var(--serif); font-weight: 600; }
.places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.place { position: relative; }
.place img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.place figcaption { position: absolute; inset: auto 0 0; display: grid; padding: 36px 16px 12px; color: #EBE2CC; background: linear-gradient(to top, rgba(10, 14, 16, .88), transparent); }
.place strong { font-family: var(--serif); font-size: 1.15rem; }
.place span { font-size: .85rem; color: #D8CDB5; }

/* ---- Classes ---- */
.classes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
/* Class portraits fill their frame (painted backgrounds since 2026-11-20). */
.class-art { background: var(--surface-high); }
.class-art img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; }
.hero-class figcaption { display: grid; gap: 1px; padding: 10px 12px 12px; }
.hero-class strong { font-family: var(--serif); font-size: 1.02rem; }
.hero-class .role { width: auto; margin: 0; font-size: .8rem; font-weight: 500; }
.sub { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 44px 0 .4em; }
.races { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.race img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.race figcaption { display: grid; gap: 1px; padding: 10px 12px 12px; }
.race strong { font-family: var(--serif); font-size: .98rem; }
.race span { font-size: .78rem; color: var(--ink-soft); }

/* ---- Guilds ---- */
.guild { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(20px, 4vw, 40px); align-items: center; padding: clamp(20px, 4vw, 32px); }
.guild-copy p { color: var(--ink-soft); }
.guild-art { width: 100%; border-radius: var(--radius-sm); }
/* Six icons on one line, small enough to fit a phone. */
.guild-icons { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(6, max-content); gap: 8px; }
.guild-icons li { width: 48px; height: 48px; padding: 7px; border-radius: 50%; background: var(--disc); }
.guild-icons img { width: 100%; height: 100%; object-fit: contain; }

.role { width: 100%; font-size: 1rem; margin: 0 0 4px; }
.role.tank { color: var(--energy); } .role.heal { color: var(--good); } .role.support { color: var(--talent); } .role.dps { color: var(--hp); }

/* ---- Fair ---- */
.fair { border-left: 4px solid var(--good); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; color: var(--ink-soft); }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.ticks strong { color: var(--ink); }

/* ---- Join form ---- */
.join { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(20px, 4vw, 48px); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--primary); }
.join-copy p { color: var(--ink-soft); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 500; font-size: .92rem; }
.field input, .challenge-input {
  width: 100%; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--surface-highest);
  background: var(--bg); color: var(--ink);
  font: 1rem var(--sans);
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus, .challenge-input:focus { border-color: var(--primary); outline: none; }

/* Honeypot: off-screen for people and screen readers; bots fill it in. */
.honeypot { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.challenge {
  margin: 0; padding: 14px 16px 10px;
  border: 1.5px dashed var(--talent); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--talent-c) 45%, transparent);
}
.challenge legend { padding: 0 6px; font-family: var(--serif); font-weight: 600; color: var(--talent); }
.challenge-prompt { margin: 0 0 10px; font-size: 1.02rem; word-spacing: .08em; }
.challenge-prompt .critters { display: block; font-size: 1.5rem; letter-spacing: .12em; margin-top: 6px; line-height: 1.5; }
.challenge-prompt .scramble { display: inline-block; margin-top: 6px; font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: .3em; color: var(--gold); }
.challenge-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.challenge-options:empty { display: none; }
.option {
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--surface-highest); background: var(--surface-high); color: var(--ink);
  font: 500 .95rem var(--sans); text-align: left; cursor: pointer;
}
.option:hover { border-color: var(--talent); }
.option[aria-checked="true"] { border-color: var(--talent); background: var(--talent-c); color: var(--talent-on); }
.challenge-input { margin-bottom: 4px; }
.link-btn { background: none; border: 0; padding: 12px 0; min-height: 44px; color: var(--talent); font: 500 .85rem var(--sans); cursor: pointer; }
.challenge.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 24px; height: 24px; margin-top: 0; flex: none; accent-color: var(--primary); }
.required { color: var(--primary); font-weight: 500; white-space: nowrap; }
.consent-hint { margin: -6px 0 0; text-align: center; }
.form-note { margin: -4px 0 0; font-size: .82rem; color: var(--ink-soft); }
.form-message { min-height: 1.4em; margin: 0; font-size: .92rem; }
.form-message.error { color: var(--danger); }
.joined { text-align: center; align-self: center; padding: 24px; border-radius: var(--radius); background: var(--good-c); color: var(--good-on); }
.joined h3 { font-size: 1.6rem; }
.joined-icon { font-size: 3rem; }

/* ---- Privacy policy and other text pages ---- */
.legal { max-width: 780px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 40px); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal section { scroll-margin-top: 80px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal strong { color: var(--ink); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; margin: 0 0 1em; }
.legal-summary { margin: 24px 0; border-left: 4px solid var(--good); }
.legal-summary h2, .legal-toc h2 { margin-top: 0; font-size: 1.15rem; }
.legal-summary .ticks { padding-left: 0; }
.legal-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.legal-toc li { margin: 2px 0; break-inside: avoid; }
.legal-toc li a { display: inline-block; padding: 8px 0; }
@media (max-width: 560px) { .legal-toc ol { columns: 1; } }

/* ---- Footer ---- */
.footer { text-align: center; padding: 40px 16px 56px; border-top: 1px solid color-mix(in srgb, var(--ink-faint) 40%, transparent); }
.footer p { margin: 4px 0; }

/* ---- Floating menu: pages, day/night switch, and a menu button on phones ---- */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-high); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--primary-wash); }
.icon-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface-high); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-highest); }
.icon-btn:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
}
.menu-btn { display: none; }
.nav .btn-small { margin-left: 8px; }

/* ---- Inner page banner ---- */
.page-hero { position: relative; overflow: hidden; }
.page-hero-art { position: absolute; inset: 0; background-size: cover; background-position: center 40%; opacity: .55;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); }
.page-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 75%, transparent) 55%, transparent 100%), linear-gradient(to bottom, transparent 60%, var(--bg) 100%); }
.page-hero-inner { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) clamp(16px, 4vw, 40px) clamp(28px, 5vw, 48px); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 18em; }
.page-hero .lede { margin-bottom: 0; }

/* ---- Hero sign-up (home) ---- */
.hero-join { padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--primary); }
.hero-join h2 { font-size: 1.45rem; margin-bottom: .3em; }
.hero-join .join-intro { color: var(--ink-soft); font-size: .95rem; margin-bottom: 14px; }
.field-hint { font-weight: 400; font-size: .8rem; color: var(--ink-soft); }

/* ---- Teasers: a picture, a line, and a link to the page ---- */
.teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.teaser { display: grid; grid-template-rows: auto 1fr; overflow: hidden; padding: 0; color: inherit; text-decoration: none; transition: transform .12s ease; }
.teaser:hover { transform: translateY(-2px); }
.teaser img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.teaser-text { padding: 14px 16px 16px; }
.teaser-text h3 { margin-bottom: .3em; }
.teaser-text p { color: var(--ink-soft); font-size: .95rem; margin-bottom: .6em; }
.more { color: var(--primary); font-weight: 500; }

/* ---- Lists of things with pictures ---- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
.tile { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile.square img { aspect-ratio: 1; }
.tile figcaption { display: grid; gap: 3px; padding: 12px 14px 14px; }
.tile strong { font-family: var(--serif); font-size: 1.05rem; }
.tile .meta { font-size: .82rem; color: var(--primary); font-weight: 500; }
.tile span { font-size: .88rem; color: var(--ink-soft); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 64px; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary-wash); color: var(--ink); font-family: var(--serif); font-weight: 700; }
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--ink-soft); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.cap-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cap-table th, .cap-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--surface-highest); }
.cap-table th { color: var(--ink-soft); font-weight: 500; }
.note { color: var(--ink-soft); font-size: .9rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }

/* ---- Heroes: the Male / Female switch ---- */
.look-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 18px; }
.look-switch button { border: 0; border-radius: 999px; padding: 8px 18px; min-height: 44px; background: transparent; color: var(--ink-soft); font: 500 .95rem var(--sans); cursor: pointer; }
.look-switch button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.class-text { display: grid; gap: 4px; padding: 10px 12px 14px; }
.class-text p { margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* ---- Detail cards: the app's item / monster card, as a pop-up ---- */
.tile-btn { display: block; width: 100%; padding: 0; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .12s ease; }
.tile-btn:hover { transform: translateY(-2px); }
.tile-btn:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; }
.tile-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile-cap { display: grid; gap: 3px; padding: 12px 14px 14px; }
.tile-cap strong { font-family: var(--serif); font-size: 1.05rem; }
.tile-cap .meta { font-size: .82rem; color: var(--primary); font-weight: 500; }
.tile-cap span { font-size: .88rem; color: var(--ink-soft); }
dialog.detail {
  width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto;
  border: 0; border-top: 4px solid var(--tone, var(--primary)); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
dialog.detail::backdrop { background: rgba(8, 12, 14, .66); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog.detail[open] { animation: detail-in .18s ease-out; }
@keyframes detail-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.detail-art { position: relative; }
.detail-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 30%; }
.detail-art::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to top, var(--surface), transparent); }
.detail-close { position: absolute; top: 14px; right: 14px; font-size: 1rem; background: color-mix(in srgb, var(--surface) 80%, transparent) !important; }
.detail-body { padding: 0 20px 18px; margin-top: -30px; position: relative; }
.detail-body h3 { font-size: 1.55rem; margin-bottom: .35em; }
.detail-home { background: color-mix(in srgb, var(--tone) 22%, var(--surface)); color: var(--ink); }
.detail-line { color: var(--ink-soft); margin: 10px 0 0; }
.detail-section { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--surface-highest); }
.detail-title { font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--sea); margin-bottom: 6px; }
.detail-section p { color: var(--ink-soft); font-size: .93rem; line-height: 1.5; margin-bottom: .6em; }
.detail-section p:last-child { margin-bottom: 0; }
.detail-facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .88rem; }
.detail-facts li { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-high); }
.detail-facts li span:first-child { color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { dialog.detail[open] { animation: none; } }

/* ---- Adventures: how many foes there are ---- */
.foe-count { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); margin-top: 18px; box-shadow: var(--shadow), inset 0 0 0 1.5px var(--primary); }
.foe-count-number { flex: none; font-family: var(--serif); font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1; color: var(--primary); }
.foe-count h3 { margin-bottom: .25em; }
.foe-count p { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .foe-count { flex-direction: column; align-items: flex-start; } }

/* ---- App screenshots in a phone frame ---- */
.shot-phone { justify-self: center; width: min(320px, 100%); padding: 10px; border-radius: 34px; background: #0d1316;
  box-shadow: 0 26px 56px rgba(0, 0, 0, .45), inset 0 0 0 2px #2b3338; }
.shot-phone img { width: 100%; height: auto; border-radius: 25px; }
button.shot-phone { display: block; border: 0; cursor: zoom-in; transition: transform .15s ease; }
button.shot-phone:hover { transform: translateY(-3px); }
.split > button.shot-phone:hover { transform: rotate(2deg) translateY(-3px); }
button.shot-phone:focus-visible { outline: 3px solid var(--sea); outline-offset: 4px; }
dialog.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(6, 9, 11, .9); color: #EBE2CC; overflow: hidden; }
dialog.lightbox::backdrop { background: transparent; }
dialog.lightbox[open] { display: grid; place-items: center; animation: detail-in .18s ease-out; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 56px 72px 20px; height: 100%; align-content: center; }
.lightbox img { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); max-width: 100%; width: auto; height: auto; border-radius: 22px;
  box-shadow: 0 0 0 8px #0d1316, 0 0 0 10px #2b3338, 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox figcaption { max-width: 520px; text-align: center; font-size: .95rem; color: #D8CDB5; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(47, 53, 46, .85) !important; color: #EBE2CC; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; }
.lightbox-prev { left: 16px; } .lightbox-next { right: 16px; }
@media (max-width: 560px) {
  .lightbox figure { padding: 56px 12px 84px; }
  .lightbox img { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
  .lightbox figcaption { font-size: .88rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); } .lightbox-next { right: calc(50% - 60px); }
}
.split > .shot-phone { transform: rotate(2deg); }
.shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.shot { margin: 0; display: grid; gap: 12px; align-content: start; }
.shot .shot-phone { width: 100%; padding: 7px; border-radius: 24px; }
.shot .shot-phone img { border-radius: 18px; }
.shot figcaption { display: grid; gap: 2px; padding: 0 4px; }
.shot strong { font-family: var(--serif); }
.shot span { font-size: .86rem; color: var(--ink-soft); }
@media (max-width: 960px) {
  .shots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 200px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .shot { scroll-snap-align: start; }
  .split > .shot-phone { transform: none; }
}

/* ---- Professions ---- */
.prof-tiles { grid-template-columns: repeat(3, 1fr); }
.prof img { aspect-ratio: 1; }
.tile.trainer { max-width: 360px; justify-self: center; }
.tile.trainer img { aspect-ratio: 3 / 4; }
.split > .tile:not(.trainer) img { aspect-ratio: 1; }
.two-cards { grid-template-columns: repeat(2, 1fr); }
.prof-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.prof-card img { width: 120px; height: 120px; border-radius: var(--radius-sm); object-fit: cover; }
.prof-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
@media (max-width: 960px) { .two-cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .prof-card { grid-template-columns: 1fr; } .prof-tiles { grid-template-columns: repeat(2, 1fr); } }

/* ---- Community: guilds and heroes from the game ---- */
.community-note { color: var(--ink-soft); }
.community-page { display: grid; gap: 16px; padding-top: calc(var(--top-h) + 24px); }
.community-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .2em; }
.guild-badge { --size: 56px; width: var(--size); height: var(--size); flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--disc); padding: calc(var(--size) * .14); }
.guild-badge img { width: 100%; height: 100%; object-fit: contain; }
.guild-list { display: grid; gap: 12px; }
.guild-row, .hero-row { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; transition: transform .12s ease; }
.guild-row:hover, .hero-row:hover { transform: translateY(-2px); }
.guild-row-text, .hero-row-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.guild-row-text strong, .hero-row-text strong { font-family: var(--serif); font-size: 1.15rem; }
.guild-row-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.community-search { width: min(420px, 100%); margin-bottom: 16px; padding: 12px 16px; border-radius: 999px;
  border: 1.5px solid var(--surface-highest); background: var(--surface); color: var(--ink); font: 1rem var(--sans); }
.community-search:focus { outline: none; border-color: var(--primary); }
.hero-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hero-thumb { width: 64px; height: 64px; flex: none; border-radius: 12px; object-fit: cover; object-position: top; background: var(--surface-high); }
.hero-title { color: var(--xp); font-size: .9rem; margin: 0; }
.guild-head { display: flex; gap: 20px; align-items: center; }
.guild-head p { margin: 0; }
.guild-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.roster, .plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.roster li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-high); }
.roster li > :first-child { font-weight: 500; }
.roster .rank { margin-left: auto; font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--neutral-c); color: var(--neutral-on); }
.roster .rank-master { background: var(--gold-c); color: var(--gold-on); }
.roster .rank-officer { background: var(--talent-c); color: var(--talent-on); }
.roster .rank-recruit { background: var(--strydes-c); color: var(--strydes-on); }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--surface-highest); }
.plain-list li:last-child { border-bottom: 0; }
.boss-now { display: grid; gap: 6px; margin-bottom: 12px; }
.boss-now p { margin: 0; }
.boss-fill { background: var(--hp); }
.hero-head { display: grid; gap: 14px; }
/* The class portrait is a tall 3:4 picture: shown whole beside the name, on top on phones. */
.hero-head.with-portrait { grid-template-columns: minmax(200px, 300px) 1fr; gap: 22px; align-items: start; }
.hero-side { display: grid; gap: 14px; align-content: start; }
.hero-banner { border-radius: calc(var(--radius) - 4px); overflow: hidden; background: var(--surface-high); box-shadow: 0 0 0 1px var(--surface-highest); }
.hero-banner-img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 640px) { .hero-head.with-portrait { grid-template-columns: 1fr; } .hero-banner { width: min(100%, 340px); justify-self: center; } }
.hero-head-text { display: grid; gap: 4px; }
.hero-head-text p { margin: 0; }
.hero-guild { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.hero-motto { font-style: italic; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; text-align: center; }
.stat-row div { display: grid; gap: 2px; padding: 10px 6px; border-radius: var(--radius-sm); background: var(--surface-high); }
.stat-row strong { font-family: var(--serif); font-size: 1.25rem; }
.stat-row span { font-size: .78rem; color: var(--ink-soft); }
.gear-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.gear-list li { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--surface-highest); }
.gear-list li:last-child { border-bottom: 0; }
.r-uncommon { color: var(--r-uncommon); font-weight: 500; } .r-rare { color: var(--r-rare); font-weight: 500; } .r-epic { color: var(--r-epic); font-weight: 500; }
.talent-line { display: grid; gap: 2px; }
@media (max-width: 760px) { .roster li a, .hero-guild { padding: 6px 0; } .guild-cols { grid-template-columns: 1fr; } .guild-row { flex-wrap: wrap; } .guild-row-chips { justify-content: flex-start; } }

/* ---- FAQ ---- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--radius-sm); padding: 0 18px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--ink-soft); margin: 0 0 16px; }

/* ---- Footer links ---- */
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 10px; }
.footer-links a { display: inline-block; padding: 10px 4px; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 10px clamp(16px, 4vw, 40px) 16px;
    flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid color-mix(in srgb, var(--ink-faint) 40%, transparent); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .menu-btn { display: grid; }
}
@media (max-width: 960px) {
  .teasers, .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles.four { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .teasers, .tiles { grid-template-columns: 1fr; }
  .tiles.four { grid-template-columns: repeat(2, 1fr); }
  .nav .btn-small { display: none; }
  .guild-icons { gap: 6px; }
  .guild-icons li { width: 40px; height: 40px; padding: 6px; }
}

/* ---- Small screens ---- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero::after { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 80%, transparent) 0%, var(--bg) 100%); }
  .phone { transform: none; }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .classes { grid-template-columns: repeat(3, 1fr); }
  .races { grid-template-columns: repeat(3, 1fr); }
  .regions { grid-template-columns: repeat(2, 1fr); }
  .monsters { grid-template-columns: repeat(2, 1fr); }
  .guild { grid-template-columns: 1fr; }
  .join { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid.four, .regions, .places { grid-template-columns: 1fr; }
  .classes, .races { grid-template-columns: repeat(2, 1fr); }
  .challenge-options { grid-template-columns: 1fr; }
  .top .btn-small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .challenge.shake { transition: none; animation: none; }
}

/* ---- Hero profile tabs and talent trees (community.js) ---- */
.chip-energy { background: var(--energy-c); color: var(--energy-on); }
.tabs { display: grid; gap: 16px; }
.tab-bar { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--surface-highest); scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 12px 14px; min-height: 44px;
  font: 600 .95rem var(--sans); color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 6px; }
.tab-panel { display: grid; gap: 12px; }
.tab-panel[hidden] { display: none; }
.branch-tabs { padding: 0; background: none; box-shadow: none; border: 0; }
.branch-tabs .tab { font-size: .85rem; padding: 10px 12px; }
.branch-tabs .tab[aria-selected="true"] { color: var(--talent); border-bottom-color: var(--talent); }
.talent-sum { margin: 0; }
.talent-extras { display: grid; gap: 10px; margin-top: 8px; }

.ttree-wrap { display: grid; gap: 10px; }
.ttree-wrap > p { margin: 0; }
.ttree { position: relative; width: 100%; max-width: 560px; margin: 0 auto; }
.ttree-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ttree-lines .flow { stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: .6; }
.ttree-lines .need { stroke: var(--ink-faint); stroke-width: 2; stroke-linecap: round; }
.ttree-lines .need.lit { stroke: var(--talent); stroke-width: 3; }
.ttree-row { position: absolute; left: 0; font-size: .72rem; color: var(--ink-faint); }
.ttree-row.open { color: var(--talent); }
.tnode { position: absolute; transform: translateX(-50%); width: min(104px, 24%); display: grid; justify-items: center; gap: 10px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); font: inherit; }
.tnode-pic { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg); box-shadow: 0 0 0 2px var(--surface-highest); }
.tnode.art .tnode-pic { border-radius: 6px; }
.tnode-pic img { width: 52px; height: 52px; border-radius: inherit; display: block; }
.tnode-ring { position: absolute; inset: 6px; border-radius: 50%; border: 2px dashed var(--surface-highest); }
.tnode-rank { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: 8px;
  font: 600 .7rem var(--sans); background: var(--surface-high); color: var(--ink-soft); white-space: nowrap; }
.tnode-act { position: absolute; top: -6px; right: -12px; padding: 1px 5px; border-radius: 999px; font-size: .62rem;
  background: var(--energy-c); color: var(--energy-on); }
.tnode-name { font-size: .74rem; line-height: 1.2; text-align: center; background: var(--surface); padding: 0 2px; border-radius: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tnode.has .tnode-pic { box-shadow: 0 0 0 3px var(--talent); }
.tnode.has .tnode-ring { border: 4px solid var(--talent); }
.tnode.has .tnode-rank { background: var(--talent-c); color: var(--talent-on); }
.tnode.has .tnode-name { color: var(--talent); }
.tnode.locked .tnode-pic, .tnode.locked .tnode-name { opacity: .45; }
.tnode.capstone .tnode-pic { box-shadow: 0 0 0 2px var(--xp); }
.tnode.capstone.has .tnode-pic { box-shadow: 0 0 0 3px var(--xp); }
.tnode.capstone .tnode-name { color: var(--xp); }
.tnode.capstone:not(.art) .tnode-pic { border-radius: 10px; }
.tnode.selected .tnode-pic { box-shadow: 0 0 0 3px var(--ink); }
.tnode:focus-visible { outline: none; }
.tnode:focus-visible .tnode-pic { outline: 2px solid var(--primary); outline-offset: 4px; }
.ttree-info { background: var(--surface-high); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 64px; }
.ttree-info p { margin: 0 0 6px; }
.ttree-info p:last-child { margin-bottom: 0; }
.ttree-info-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ttree-info .chip { padding: 2px 8px; font-size: .72rem; }
.ttree-body { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .ttree-body { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  .ttree-info { position: sticky; top: calc(var(--top-h) + 16px); }
}

/* ---------- My guild (my-guild.js): signed-in guild management ---------- */
.mg-page { max-width: 960px; }
.mg-card { display: grid; gap: 12px; }
.mg-h2 { font-size: 1.25rem; margin: 0; }
.mg-h3 { font-size: 1rem; margin: 6px 0 0; }
.mg-note { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.mg-msg { min-height: 1.2em; margin: 0; color: var(--ink-soft); }
.mg-pre { white-space: pre-wrap; margin: 0; }
.mg-form { display: grid; gap: 12px; max-width: 420px; }
.mg-label { display: grid; gap: 4px; font-size: .88rem; color: var(--ink-soft); }
.mg-label > span { font-weight: 500; }
.mg-page input[type="text"], .mg-page input[type="email"], .mg-page input[type="number"], .mg-page select, .mg-textarea {
  min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--surface-highest); background: var(--surface-high);
  color: var(--ink); font: inherit; max-width: 100%;
}
.mg-textarea { width: 100%; resize: vertical; }
.mg-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.mg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mg-row .grow { flex: 1 1 200px; min-width: 0; }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.mg-head { flex-wrap: wrap; }
.mg-head-text { flex: 1 1 260px; display: grid; gap: 8px; }
.mg-head-text h1 { margin: 0; }
.mg-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mg-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-tab { background: var(--surface-high); color: var(--ink); box-shadow: none; padding: 8px 14px; font-size: .9rem; }
.mg-tab.on { background: var(--primary); color: var(--primary-ink); }
.mg-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.mg-member { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--surface-highest); }
.mg-member:first-of-type { border-top: 0; }
.mg-member-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mg-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-high); border-left: 4px solid var(--ink-faint); }
.mg-item .grow { flex: 1 1 180px; min-width: 0; }
.mg-item.rarity-uncommon { border-left-color: #6FAE4F; }
.mg-item.rarity-rare { border-left-color: #4C8DD6; }
.mg-item.rarity-epic { border-left-color: #A46BD8; }
.mg-item.rarity-legendary { border-left-color: #E09A33; }
.mg-rule, .mg-logline { padding: 6px 0; border-top: 1px solid var(--surface-highest); }
.mg-icon-preview { display: inline-flex; }
.btn-danger { background: var(--danger-c); color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.mg-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 50;
  background: var(--surface-highest); color: var(--ink); padding: 12px 18px; border-radius: 12px; max-width: min(92vw, 520px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.mg-toast.show { transform: translate(-50%, 0); opacity: 1; }
.mg-toast.bad { background: var(--danger-c); color: var(--danger); }
@media (max-width: 560px) { .mg-head { gap: 14px; } .mg-tab { padding: 7px 11px; } }
/* My guild: keep everything inside a phone's width (long option text would otherwise widen the cards). */
.mg-page > *, .mg-card, .mg-card > *, .mg-row > *, .mg-grid > * { min-width: 0; max-width: 100%; }
.mg-page select { width: 100%; text-overflow: ellipsis; }
.mg-row select { width: auto; flex: 1 1 180px; }
.mg-label input, .mg-label select { width: 100%; }
.mg-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.mg-tabs .mg-tab { flex: none; }

/* Android or iPhone on the sign-up (2026-11-27) */
.phone-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone-pick legend { font-weight: 500; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.phone-option { position: relative; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--surface-highest); background: var(--surface-high); }
.phone-option input { position: absolute; opacity: 0; pointer-events: none; }
.phone-option:hover { border-color: var(--primary); }
.phone-option:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.phone-option:has(input:focus-visible) { outline: 3px solid var(--sea); outline-offset: 2px; }
.phone-name { font-weight: 700; }
.phone-when { font-size: .8rem; color: var(--ink-soft); }

/* About and the mock invoice (2026-11-27) */
.about-letter { max-width: 46em; display: grid; gap: 4px; }
.about-letter p { font-size: 1.05rem; line-height: 1.65; margin: 0 0 12px; }
.about-sign { font: 700 1.3rem var(--serif); color: var(--primary); margin-top: 4px !important; }
.about-cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 16px; }
.about-cols ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.about-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 8px 0 20px; }
.about-stats .card { display: grid; gap: 2px; padding: 16px; }
.about-stats strong { font: 700 1.4rem var(--serif); }
.about-stats span { color: var(--ink-soft); font-size: .88rem; }
.about-big { font: 700 1.35rem var(--serif); color: var(--primary); margin: 6px 0; }
.about-sources { max-width: 60em; }
.invoice { display: grid; gap: 20px; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.inv-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; }
.inv-stamp { margin: 0 0 6px; color: var(--primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.inv-meta dl, .inv-totals { display: grid; grid-template-columns: auto auto; gap: 4px 16px; margin: 0; font-size: .9rem; }
.inv-meta dt, .inv-totals dt { color: var(--ink-soft); }
.inv-meta dd, .inv-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.inv-parties, .inv-notes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.inv-parties h3, .inv-notes h3 { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 4px; }
.inv-parties p, .inv-notes p { margin: 0; font-size: .92rem; line-height: 1.5; }
.inv-table-wrap { overflow-x: auto; }
.inv-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.inv-table th, .inv-table td { padding: 8px 6px; border-bottom: 1px solid var(--surface-highest); vertical-align: top; text-align: left; }
.inv-table thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
.inv-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-section th { color: var(--primary); font-family: var(--serif); padding-top: 16px; border-bottom: 0; }
.inv-note, .inv-unit { color: var(--ink-soft); font-size: .82rem; }
.inv-totals { justify-self: end; min-width: min(100%, 360px); }
.inv-totals .inv-total { font: 700 1.3rem var(--serif); color: var(--ink); padding-top: 8px; border-top: 2px solid var(--ink); }
.inv-actual { border: 2px dashed var(--primary); border-radius: 12px; padding: 14px 16px; }
.inv-actual h3 { margin: 0 0 4px; }
.inv-actual p { margin: 0; }
.about-promise { margin: 4px 0 0; padding: 14px 18px; border-radius: 12px; border-left: 4px solid var(--primary); background: var(--surface-high); font-size: 1.05rem; }
.about-tip { margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.about-tip > div { flex: 1 1 320px; }
.about-tip h3 { margin: 0 0 6px; }
.about-tip p { margin: 0; }

/* ---- Menu groups (2026-11-27): dropdowns on wide screens, headed sections in the phone menu ---- */
.nav-group { position: relative; }
.nav-group-btn { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border: 0; border-radius: 999px; background: none;
  color: var(--ink-soft); font: 500 .92rem var(--sans); cursor: pointer; }
.nav-group-btn:hover, .nav-group.open .nav-group-btn { color: var(--ink); background: var(--surface-high); }
.nav-group.here .nav-group-btn { color: var(--ink); background: var(--primary-wash); }
.nav-group-btn:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.nav-group-btn .chev { width: 14px; height: 14px; transition: transform .15s; }
.nav-group.open .nav-group-btn .chev { transform: rotate(180deg); }
.nav-sub { display: none; list-style: none; margin: 0; padding: 8px; }
.nav-sub a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.nav-sub a strong { font-weight: 600; font-size: .95rem; }
.nav-sub a span { color: var(--ink-soft); font-size: .8rem; font-weight: 400; }
.nav-sub a:hover { background: var(--surface-high); }
.nav-sub a[aria-current="page"] { background: var(--primary-wash); }
@media (min-width: 961px) {
  .nav-sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 330px; z-index: 20; border-radius: 16px;
    background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .28), 0 0 0 1px color-mix(in srgb, var(--ink-faint) 30%, transparent); }
  .nav-group.open .nav-sub { display: grid; }
  /* A mouse opens it by hovering; the gap under the button is bridged so it doesn't close on the way down. */
  @media (hover: hover) {
    .nav-group:hover .nav-sub { display: grid; }
    .nav-group:hover .nav-group-btn { color: var(--ink); background: var(--surface-high); }
    .nav-group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
  }
}
@media (max-width: 960px) {
  .nav-group-btn { pointer-events: none; padding: 14px 14px 4px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; background: none !important; color: var(--ink-faint) !important; }
  .nav-group-btn .chev { display: none; }
  .nav-sub { display: grid; padding: 0 0 4px; }
  .nav-sub a span { display: none; }
  .nav-sub a { padding: 10px 14px; }
  /* Wiki, Beta and About under the groups, looking like the links above them. */
  .nav-links > li > a { padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: .95rem; }
  .nav-links > li:not(.nav-group) { border-top: 1px solid transparent; }
  .nav-group + li:not(.nav-group) { margin-top: 8px; padding-top: 8px; border-top-color: color-mix(in srgb, var(--ink-faint) 40%, transparent); }
}

/* The home page's first screen fits a laptop without scrolling (2026-11-27): less room above, a tighter sign-up card. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero .hero-inner { padding-top: calc(var(--top-h) + clamp(16px, 2.5vw, 28px)) !important; padding-bottom: clamp(28px, 4vw, 48px); }
.hero-join .join-intro { margin-bottom: 10px; }
.hero-join .form { gap: 10px; }
.hero-join .field { gap: 4px; }
.hero-join .field input { padding: 10px 14px; }
.hero-join .phone-option { padding: 8px 12px; }
.hero-join .challenge { padding: 10px 14px 4px; }
.hero-join .challenge-prompt { margin-bottom: 8px; }
.hero-join .option { padding: 8px 12px; }
.hero-join .form-note { margin: -2px 0 0; }
.hero-join .consent-hint { margin: -4px 0 0; }
.hero-join .form-message:empty { min-height: 0; margin-top: -10px; }
@media (min-width: 961px) { .hero-join .link-btn { padding: 6px 0; min-height: 32px; } }
.challenge[hidden] { display: none; }
.challenge.reveal { animation: reveal .25s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .challenge.reveal { animation: none; } }
.about-text { max-width: 46em; font-size: 1.05rem; line-height: 1.65; }

/* ---- Home: a full-screen slideshow of the Wendway with one email box ([Decided] 2026-11-30, after neta.art) ----
   The pictures are paintings, so the text over them is light in both themes; a dark wash keeps it readable. */
.slides-hero { position: relative; display: grid; place-items: center; height: 100vh; height: 100svh; min-height: 560px;
  margin-top: calc(-1 * var(--top-h)); overflow: hidden; background: #0D1316; color: #F4EEDD; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.on { opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); transition: transform 9s linear; }
.slide.on img { transform: scale(1); }
.slides::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 48%, rgba(9, 13, 15, .55), rgba(9, 13, 15, .12) 75%),
    linear-gradient(to bottom, rgba(9, 13, 15, .6) 0, transparent 20%, transparent 62%, rgba(9, 13, 15, .8) 100%); }
.slides-inner { position: relative; z-index: 2; max-width: 780px; padding: var(--top-h) 16px 110px; text-align: center; }
.slides-inner .eyebrow { color: #F6B9A4; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.slides-inner h1 { color: #FFF8EA; font-size: clamp(2.3rem, 6.4vw, 4.4rem); line-height: 1.08; margin: .2em 0 .35em; text-shadow: 0 2px 24px rgba(0, 0, 0, .55); }
.slides-inner .lede { color: rgba(244, 238, 221, .92); margin: 0 auto; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.email-box { display: flex; align-items: center; gap: 6px; max-width: 540px; margin: 30px auto 0; padding: 6px;
  border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .38), 0 10px 30px rgba(0, 0, 0, .3); transition: box-shadow .2s ease; }
.email-box:focus-within { box-shadow: inset 0 0 0 2px #FFF8EA, 0 10px 30px rgba(0, 0, 0, .3); }
.email-box input { flex: 1; min-width: 0; padding: 12px 8px 12px 20px; border: 0; background: transparent; color: #FFF8EA; font: 400 1.05rem var(--sans); }
.email-box input::placeholder { color: rgba(255, 248, 234, .72); }
.email-box input:focus-visible { outline: none; }
.email-box button { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--primary); color: #151F24; cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.email-box button svg { width: 22px; height: 22px; }
.email-box button:hover { filter: brightness(1.08); transform: translateX(2px); }
.email-box button:focus-visible { outline: 3px solid #FFF8EA; outline-offset: 2px; }
.email-box-error { min-height: 1.4em; margin: 8px 0 0; color: #FFD2C4; font-size: .9rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.slides-note { margin: 2px 0 0; color: rgba(244, 238, 221, .82); font-size: .9rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.slides-note a { color: #FFF8EA; }
.slides-foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 10px 20px; padding: 0 clamp(16px, 4vw, 40px) clamp(16px, 3vw, 28px); }
.slide-caption { display: grid; gap: 2px; margin: 0; transition: opacity .5s ease; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.slide-caption.fading { opacity: 0; }
.slide-caption strong { font-family: var(--serif); font-size: 1.1rem; color: #FFF8EA; }
.slide-caption span { font-size: .85rem; color: rgba(244, 238, 221, .85); }
.slide-controls { display: flex; align-items: center; gap: 2px; }
.slide-dot { width: 28px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.slide-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 248, 234, .5); transition: width .3s ease, background-color .3s ease; }
.slide-dot[aria-current="true"]::before { width: 22px; background: #FFF8EA; }
.slide-dot:focus-visible, .slide-pause:focus-visible { outline: 2px solid #FFF8EA; outline-offset: 0; border-radius: 8px; }
.slide-pause { display: grid; place-items: center; width: 36px; height: 36px; margin-left: 8px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #FFF8EA; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.slide-pause svg { width: 16px; height: 16px; }
.slide-pause .i-play, .slide-pause[aria-pressed="true"] .i-pause { display: none; }
.slide-pause[aria-pressed="true"] .i-play { display: block; }
.explore-chips { margin: -8px 0 24px; }

/* The menu reads light over the pictures until the page scrolls (phones: the open menu counts as scrolled). */
.home .top:not(.scrolled) :is(.brand, .nav-links > li > a, .nav-group-btn, .icon-btn) { color: #F4EEDD; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.home .top:not(.scrolled) :is(.nav-links > li > a, .nav-group-btn):hover { background: rgba(255, 255, 255, .16); }
.home .top:not(.scrolled) .icon-btn { background: rgba(255, 255, 255, .14); }

/* The rest of the sign-up opens over the page. */
.join-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: auto; }
.join-dialog::backdrop { background: rgba(6, 9, 11, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.join-dialog[open] { animation: join-in .22s ease-out; }
@keyframes join-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.join-dialog .hero-join h2 { padding-right: 40px; }
.join-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface-high); color: var(--ink); font: 400 1.6rem/1 var(--sans); }
.join-close:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }

@media (max-width: 560px) {
  .slides-inner { padding-bottom: 130px; }
  .email-box input { padding-left: 16px; font-size: 1rem; }
  .slide-caption span { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
  .slide img, .slide.on img { transform: none; transition: none; }
  .join-dialog[open] { animation: none; }
}
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--hp); }

/* The painted backdrop behind the home page below the slideshow ([Decided] 2026-11-30): one painting per theme, the
   road darkening from Greenhollow to Dragonspine down its edges. The builder only adds it once a painting exists
   (bd-night / bd-day say which), so a theme without one keeps its plain color. */
.home-rest { position: relative; isolation: isolate; }
/* The painting is tall and the page below the slideshow is about square on a laptop, so it isn't stretched to fill:
   it's scaled to the page's full height and split, its left half on the left and its right half on the right, with the
   empty middle fading into the page. The whole road shows on every screen, meadows at the top to the dragon at the bottom. */
/* At half strength (owner, 2026-11-30) so the slideshow above stays the clear header and this reads as scenery. */
.backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; --bd: none; opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 320px, #000 calc(100% - 140px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 320px, #000 calc(100% - 140px), transparent 100%); }
.backdrop::before, .backdrop::after { content: ""; position: absolute; top: 0; bottom: 0; aspect-ratio: 9 / 32;
  background: var(--bd) 0 0 / 200% 100% no-repeat; }
.backdrop::before { left: 0; background-position: left top;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent); mask-image: linear-gradient(to right, #000 55%, transparent); }
.backdrop::after { right: 0; background-position: right top;
  -webkit-mask-image: linear-gradient(to left, #000 55%, transparent); mask-image: linear-gradient(to left, #000 55%, transparent); }
.backdrop.bd-night { --bd: url("assets/art/backdrop-night.webp"); }
:root[data-theme="light"] .backdrop { --bd: none; }
:root[data-theme="light"] .backdrop.bd-day { --bd: url("assets/art/backdrop-day.webp"); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .backdrop { --bd: none; }
  :root:not([data-theme="dark"]) .backdrop.bd-day { --bd: url("assets/art/backdrop-day.webp"); }
}
/* Phones have no side margins, so the scenery sits behind the text: keep it faint there. */
@media (max-width: 760px) { .backdrop { opacity: .22; } }

/* ---- Footer: the company, centered ([Decided] 2026-11-30) ---- */
.footer { display: grid; justify-items: center; gap: 10px; padding: 44px 16px 48px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.footer-brand img { width: auto; height: 36px; filter: drop-shadow(0 0 6px rgba(40, 210, 220, .3)); }
.footer-tag { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.footer .footer-links { margin: 4px 0 0; gap: 0 22px; }
.footer-social { display: flex; justify-content: center; gap: 12px; list-style: none; margin: 0; padding: 0; }
.footer-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-soft);
  background: var(--surface-high); transition: color .15s ease, background-color .15s ease, transform .12s ease; }
.footer-social a:hover { color: #fff; background: #1877F2; transform: translateY(-1px); }
.footer-social a:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.footer-social svg { width: 22px; height: 22px; }
.footer-copy { margin: 4px 0 0; color: var(--ink-soft); font-size: .82rem; }

/* ---- Contact page ([Decided] 2026-11-30) ---- */
.contact { padding-top: clamp(8px, 2vw, 20px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: start; }
.contact-card { padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--primary); }
.contact-card h2 { font-size: 1.5rem; margin: 0; }
.contact-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--surface-highest);
  background: var(--bg); color: var(--ink); font: 1rem var(--sans);
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; }
.field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--hp); }
.contact-count { justify-self: end; }
.contact-count.over { color: var(--xp); }
.contact-side { display: grid; gap: 16px; }
.contact-side h3 { margin-top: 0; }
.contact-tips { display: grid; gap: 10px; margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: .94rem; }
.contact-tips strong { color: var(--ink); }
.contact-fb { gap: 10px; }
.contact-fb svg { width: 20px; height: 20px; }
.contact-card .joined { padding: 28px 16px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .contact-two { grid-template-columns: 1fr; } }
.page-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.contact-two { align-items: start; }
