/* ------------------------------------------------------------------
   SolouMerdeka#26
   Palette sampled from the Solou server logo (cream / deep red / ink)
   and the Minecraft key art (sky, grass, water, dirt, gold).
   Committed light design — every colour painted, holds on any ground.
   ------------------------------------------------------------------ */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root {
  /* Solou brand, sampled */
  --cream:      #f4ecca;
  --cream-lt:   #faf5e2;
  --paper:      #fffdf5;
  --ink:        #2c2d32;
  --ink-soft:   #5d5c58;
  --ink-faint:  #8a877c;
  --red:        #750c06;
  --red-bright: #a8231a;
  --red-wash:   #f7e2dc;
  --salmon:     #d28879;

  /* Jalur Gemilang — Merdeka */
  --navy:       #16276b;
  --navy-lt:    #2b4192;
  --navy-wash:  #e6e9f5;
  --flag-red:   #c1121c;
  --flag-gold:  #d9a406;
  --gold-wash:  #faf0cf;

  /* Minecraft key art, sampled — used sparingly */
  --sky:        #198ef6;
  --water:      #71dbe3;
  --grass-deep: #2a7247;
  --dirt:       #896954;
  --gold:       #d08e46;

  --rule:       #ded3ab;
  --rule-soft:  #ebe2c3;

  --measure: 66ch;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Literata", Georgia, serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* language switching */
[data-lang="en"] [lang="zh"] { display: none !important; }
[data-lang="zh"] [lang="en"] { display: none !important; }
[data-lang="zh"] .cjk-sans { font-family: "Noto Sans SC", sans-serif; }
[data-lang="zh"] p, [data-lang="zh"] dd { line-height: 1.9; }


/* ---------- site header bar ---------- */
.topbar {
  background: var(--ink);
  border-bottom: 4px solid var(--red);
}
.topbar-in {
  max-width: 1000px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .wordmark {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 19px;
  letter-spacing: .07em; color: #d84a3f;
  -webkit-text-stroke: .06em #0f1013; paint-order: stroke fill;
}
.foot-in .wordmark {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 16px;
  letter-spacing: .07em; color: #d84a3f;
}
.brand .tag {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cream);
}
[data-lang="zh"] .brand .tag { font-family: "Noto Sans SC", sans-serif; letter-spacing: .06em; }

.topnav { display: flex; gap: 4px; flex: 1 1 auto; }
.topnav a {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: #b9b6ab; padding: 6px 11px; border-bottom: 3px solid transparent;
  transition: color .12s ease, border-color .12s ease;
}
.topnav a:hover { color: var(--cream); border-bottom-color: var(--flag-gold); }

.langset { display: flex; gap: 0; flex: 0 0 auto; }
.langbtn {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 14px; letter-spacing: .06em;
  padding: 6px 13px; cursor: pointer;
  background: transparent; color: #b9b6ab;
  border: 2px solid #4a4a4f;
  transition: background .12s ease, color .12s ease;
}
.langbtn + .langbtn { border-left-width: 0; }
.langbtn:hover { color: var(--cream); }
.langbtn[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ---------- banner ---------- */
.banner { position: relative; background: var(--ink); overflow: hidden; }
.banner img.art {
  display: block; width: 100%; height: clamp(230px, 32vw, 430px);
  object-fit: cover; object-position: 50% 42%;
}
/* title sits straight on the art — no box, outlined like a game logo */
.bannertitle {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 18px; text-align: center; pointer-events: none;
}
.logotype {
  font-family: "Silkscreen", monospace; font-weight: 700;
  font-size: clamp(1.45rem, 6.6vw, 3.5rem);
  line-height: 1.08; margin: 0; max-width: 100%;
  letter-spacing: .015em; overflow-wrap: break-word;
  -webkit-text-stroke: .155em #191a1e;
  paint-order: stroke fill;
  text-shadow: 0 .06em 0 rgba(0,0,0,.5), 0 .12em .18em rgba(0,0,0,.35);
}
/* Solou brand red for the name and the number */
.logotype .solou-red { color: #a8231a; }
/* MERDEKA — one letter per Jalur Gemilang colour, cycling */
.logotype .f-blue  { color: #2f55c8; }
.logotype .f-red   { color: #d5201d; }
.logotype .f-white { color: #fdfaf0; }
.logotype .f-gold  { color: #ffcc00; }

.banner .when {
  font-family: "Literata", Georgia, serif; font-weight: 700;
  font-size: clamp(12px, 2.6vw, 16px); letter-spacing: .14em; text-transform: uppercase;
  color: #fdfaf0; margin: 0;
  -webkit-text-stroke: .16em #191a1e; paint-order: stroke fill;
  text-shadow: 0 2px 3px rgba(0,0,0,.5);
}
[data-lang="zh"] .banner .when { font-family: "Noto Sans SC", sans-serif; font-weight: 700; }

/* ---------- layout ---------- */
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 90px; }
.col { max-width: var(--measure); }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: break-word; }
a:hover { color: var(--red-bright); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--flag-gold); outline-offset: 2px; }
code {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .9em;
  font-weight: 600; color: var(--red); background: none; overflow-wrap: break-word;
}

/* ---------- intro ---------- */
.intro { padding: 34px 0 0; }
.lede { font-size: 18.5px; color: var(--ink-soft); max-width: var(--measure); }
.lede b { color: var(--ink); font-weight: 700; }

/* ---------- facts ---------- */
.facts {
  margin: 28px 0 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 3px solid var(--ink); background: var(--paper);
}
.facts div { padding: 12px 16px; border-right: 1px solid var(--rule); }
.facts div:last-child { border-right: 0; }
.facts .k {
  display: block; font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1px;
}
[data-lang="zh"] .facts .k { font-family: "Noto Sans SC", sans-serif; letter-spacing: .04em; }
.facts div:nth-child(1) .k { color: var(--red-bright); }
.facts div:nth-child(2) .k { color: var(--navy); }
.facts div:nth-child(3) .k { color: #9a7304; }
.facts div:nth-child(4) .k { color: var(--red); }
.facts .v { display: block; font-weight: 700; font-size: 16.5px; color: var(--ink); }

/* ---------- the one overline ---------- */
.overline {
  scroll-margin-top: 18px;
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12.5px;
  letter-spacing: .26em; text-transform: uppercase; color: var(--red);
  margin: 58px 0 0;
}
[data-lang="zh"] .overline { font-family: "Noto Sans SC", sans-serif; letter-spacing: .1em; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: step; }
.step { padding: 26px 0; border-top: 2px solid var(--rule-soft); }
.step:first-child { border-top: 0; padding-top: 16px; }
.step[data-done="1"] { opacity: .48; }

.stephead { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; }
.stepnum {
  counter-increment: step; flex: 0 0 auto;
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 1.35rem;
  color: var(--red); font-variant-numeric: tabular-nums;
}
.stepnum::before { content: counter(step, decimal-leading-zero); }
.step[data-done="1"] .stepnum { color: var(--grass-deep); }

h2 {
  font-family: "Silkscreen", monospace; font-weight: 700;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem); line-height: 1.35;
  letter-spacing: .01em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
[data-lang="zh"] h2 { font-family: "Noto Sans SC", sans-serif; letter-spacing: .01em; }
.stepbody { display: flex; flex-direction: column; gap: 14px; }

.tick {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  font-family: "Literata", Georgia, serif; font-size: 15px; color: var(--ink-faint);
  cursor: pointer; user-select: none; margin-top: 2px;
}
[data-lang="zh"] .tick { font-family: "Noto Sans SC", sans-serif; }
.tick input { width: 17px; height: 17px; accent-color: var(--grass-deep); cursor: pointer; margin: 0; }
.tick:hover { color: var(--ink-soft); }

/* ---------- asides: no box, just text ---------- */
.note, .warn { max-width: var(--measure); color: var(--ink-soft); font-size: 16.5px; }
.note b, .warn b { font-weight: 700; }

/* ---------- panels ---------- */
.panel { background: var(--paper); border: 3px solid var(--ink); padding: 16px; }

.kvrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kvrow + .kvrow { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.kvrow .lab {
  width: 100%; font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-faint);
}
[data-lang="zh"] .kvrow .lab { font-family: "Noto Sans SC", sans-serif; letter-spacing: .04em; }
.kvrow .val {
  font-family: "IBM Plex Mono", monospace; font-weight: 600;
  font-size: clamp(1rem, 3.4vw, 1.2rem); color: var(--red);
  overflow-wrap: anywhere; flex: 1 1 200px;
}

button.btn {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 15px; letter-spacing: .04em;
  padding: 8px 16px; cursor: pointer; flex: 0 0 auto;
  background: var(--ink); color: var(--cream);
  border: 2px solid var(--ink);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
[data-lang="zh"] button.btn { font-family: "Noto Sans SC", sans-serif; }
button.btn:hover { background: var(--red); border-color: var(--red); }
button.btn[data-copied="1"] { background: var(--grass-deep); border-color: var(--grass-deep); }

/* ---------- name builder ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-faint);
}
[data-lang="zh"] .field label { font-family: "Noto Sans SC", sans-serif; letter-spacing: .04em; }
.field input {
  font-family: "IBM Plex Mono", monospace; font-size: 15px; padding: 10px 12px;
  background: var(--cream-lt); color: var(--ink); border: 2px solid var(--rule); width: 100%;
}
.field input:focus { border-color: var(--flag-gold); }
.preview {
  font-family: "IBM Plex Mono", monospace; font-size: 14.5px;
  background: var(--cream-lt); border: 2px dashed var(--rule);
  padding: 12px 14px; color: var(--ink-faint); margin-top: 14px; overflow-wrap: anywhere;
}
.preview.filled { color: var(--red); border-style: solid; border-color: var(--salmon); }

/* ---------- discord cards ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.linkcard {
  display: flex; flex-direction: column; gap: 3px; text-decoration: none;
  background: var(--paper); padding: 15px 16px; color: var(--ink);
  border: 3px solid var(--ink); border-left-width: 10px;
  transition: transform .12s ease;
}
.linkcard.text { border-left-color: var(--navy); }
.linkcard.voice { border-left-color: var(--flag-red); }
.linkcard:hover { color: var(--ink); background: var(--cream-lt); }
.linkcard .lab {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12.5px;
  letter-spacing: .15em; text-transform: uppercase;
}
[data-lang="zh"] .linkcard .lab { font-family: "Noto Sans SC", sans-serif; letter-spacing: .04em; }
.linkcard.text .lab { color: var(--navy); }
.linkcard.voice .lab { color: var(--flag-red); }
.linkcard .name { font-weight: 600; font-size: 15.5px; }
.linkcard .url { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--ink-faint); overflow-wrap: anywhere; }

/* ---------- table ---------- */
.tablewrap { overflow-x: auto; border: 3px solid var(--ink); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 460px; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { background: var(--ink); color: var(--cream); border-bottom: 0;
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
[data-lang="zh"] thead th { font-family: "Noto Sans SC", sans-serif; letter-spacing: .04em; }
td.set { color: var(--ink); font-weight: 600; }
td.val { font-family: "IBM Plex Mono", monospace; font-weight: 700; color: var(--red); white-space: nowrap; }
td.why { color: var(--ink-soft); font-size: 14.5px; }

/* ---------- faq ---------- */
dl.faq { margin: 16px 0 0; max-width: var(--measure); }
dl.faq dt { font-weight: 700; color: var(--red); margin: 22px 0 3px; }
dl.faq dt:first-of-type { margin-top: 0; }
dl.faq dd { margin: 0; color: var(--ink-soft); }

/* ---------- footer ---------- */
footer { background: var(--ink); color: #b9b6ab; margin-top: 70px; }
.foot-in {
  max-width: 1000px; margin: 0 auto; padding: 24px 20px 30px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; font-size: 13.5px;
}
.foot-in .sep { color: #4a4a4f; }
.disclaimer { width: 100%; color: #7c7a72; font-size: 12px; line-height: 1.6; margin: 0; max-width: none; }


/* ---------- emphasis: Jalur Gemilang, used by meaning ----------
   navy   = the thing being named (a mod, a tool, a place)
   red    = an imperative — the bit that breaks if ignored
   yellow = a value to type or a fact to hold on to
   cream  = emphasis sitting on a dark surface
   ------------------------------------------------------------- */
b, strong { font-weight: 700; color: var(--ink); }
.topbar b, .bannertitle b, footer b { color: var(--cream); }

/* server name cycles the flag colours, like Merdeka in the banner */
.mv1 { color: #1b6ef5; }
.mv2 { color: #f01f18; }
.mv3 { color: #e0a005; }

/* ---------- chip in ---------- */
.chipin { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 18px; }
.chipin .qr { flex: 0 0 auto; background: var(--paper); border: 3px solid var(--ink); padding: 12px; }
.chipin .qr img { display: block; width: 190px; height: auto; }
.chipin .said { flex: 1 1 280px; max-width: var(--measure); }

/* ---------- author's aside ---------- */
.aside-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 2px; }
.aside-links a { font-weight: 600; }

/* ---------- keyboard hints ---------- */
.keys {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--cream-lt); border: 2px solid var(--rule);
  border-left: 8px solid var(--navy);
  padding: 11px 14px; max-width: var(--measure);
  font-size: 15px; color: var(--ink-soft);
}
.keys .what {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--navy);
  flex: 1 0 100%;
}
[data-lang="zh"] .keys .what { font-family: "Noto Sans SC", sans-serif; letter-spacing: .04em; }
kbd {
  font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 13.5px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-bottom-width: 4px;
  padding: 3px 9px 2px; white-space: nowrap; line-height: 1.4;
}
.keys .then { color: var(--ink-faint); font-size: 13.5px; }

/* Jalur Gemilang stripe, used once above the footer */
.stripe {
  height: 10px; margin: 54px 0 0;
  background: repeating-linear-gradient(to bottom,
    var(--flag-red) 0 2px, var(--cream-lt) 2px 4px);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px 66px; }
  .facts div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .facts div:last-child { border-bottom: 0; }
  .topbar-in { padding: 9px 16px; flex-wrap: wrap; row-gap: 4px; }
  .topnav { order: 3; flex: 1 0 100%; gap: 0; margin: 0 -4px; }
  .topnav a { font-size: 12px; padding: 5px 8px; letter-spacing: .07em; }
  .brand .wordmark { font-size: 16px; }
  .brand .tag { display: none; }
}
/* ---------- major sections (JOIN / ABOUT / WHO ARE WE) ---------- */
.sectionhead {
  scroll-margin-top: 8px;
  margin: 76px -20px 0; padding: 26px 20px 24px;
  background: var(--ink); color: var(--cream);
  border-top: 4px solid var(--flag-gold);
}
.sectionhead:first-child { margin-top: 30px; }
.sectionhead .kicker {
  font-family: "Literata", Georgia, serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: .26em; text-transform: uppercase; color: var(--flag-gold);
  margin: 0 0 6px; max-width: none;
}
[data-lang="zh"] .sectionhead .kicker { font-family: "Noto Sans SC", sans-serif; letter-spacing: .12em; }
.sectionhead h2 {
  font-family: "Silkscreen", monospace; color: var(--cream);
  font-size: clamp(1.3rem, 5vw, 2rem); line-height: 1.2; margin: 0;
}
[data-lang="zh"] .sectionhead h2 { font-family: "Noto Sans SC", sans-serif; font-weight: 700; }
.sectionhead .blurb {
  margin: 10px 0 0; max-width: var(--measure);
  color: #b9b6ab; font-size: 16px;
}
.sectionhead .blurb b { color: var(--cream); }

/* first overline inside a section shouldn't push another 58px gap */
.sectionhead + .overline, .sectionhead + .intro { margin-top: 26px; padding-top: 26px; }

/* ---------- unwritten copy: Sean fills these in ---------- */
.tofill {
  max-width: var(--measure); margin: 14px 0 0; padding: 14px 16px;
  background: var(--gold-wash); border: 2px dashed var(--flag-gold);
  color: var(--ink-soft); font-size: 15.5px;
}
.tofill .fillhead {
  display: block; font-family: "Literata", Georgia, serif; font-weight: 700;
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #9a7304; margin-bottom: 5px;
}
.tofill ul { margin: 6px 0 0; padding-left: 20px; }
.tofill li { margin: 2px 0; }
[data-drafts="off"] .tofill { display: none; }

@media (max-width: 620px) {
  .sectionhead { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}
/* ---------- who's speaking ---------- */
.whoami { display: flex; gap: 18px; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; }
.whoami .pfp {
  flex: 0 0 auto; width: 104px; height: 104px;
  border: 3px solid var(--ink); background: var(--paper);
  display: block; object-fit: cover;
}
.whoami .saidby { flex: 1 1 260px; max-width: var(--measure); }
.whoami .saidby p:first-child { margin-top: 0; }
@media (max-width: 620px) { .whoami .pfp { width: 84px; height: 84px; } }
/* ---------- the rig ---------- */
figure.rig { margin: 22px 0 28px; max-width: 100%; }
figure.rig .shots { display: grid; gap: 12px; grid-template-columns: 1.4fr 1fr; }
figure.rig img {
  display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 3px solid var(--ink); background: var(--ink);
}
figure.rig img.tall { object-position: 50% 38%; }
figure.rig figcaption {
  margin-top: 12px; max-width: var(--measure);
  font-size: 14.5px; line-height: 1.55; color: var(--ink-soft);
}
[data-lang="zh"] figure.rig figcaption { font-family: "Noto Sans SC", sans-serif; }
@media (max-width: 620px) { figure.rig .shots { grid-template-columns: 1fr; } }

/* ---------- three pages: about left, join centre, who right ---------- */
.topnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; }
.topnav .nav-about { justify-self: start; }
.topnav .nav-join  { justify-self: center; }
.topnav .nav-who   { justify-self: end; }
.topnav a[aria-current="page"] {
  color: var(--cream); border-bottom-color: var(--flag-red);
}
@media (max-width: 620px) {
  .topnav { grid-template-columns: 1fr 1fr 1fr; }
  .topnav a { text-align: center; }
  .topnav .nav-about, .topnav .nav-join, .topnav .nav-who { justify-self: stretch; }
}


/* ---------- topbar layout, 2026-08-31 (Sean) ----------
   Brand pinned to the left corner, language toggle pinned to the right,
   the three page links grouped tightly in the true centre of the bar.
   Replaces the old flex/space-between bar and the 1fr auto 1fr .topnav grid
   that stretched the three links across the whole width.
   ------------------------------------------------------ */
.topbar-in {
  max-width: 1440px;
  padding: 10px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand   { justify-self: start; }
.langset { justify-self: end; }

/* "Server & Events" dropped from the brand block - wordmark only */
.brand .tag { display: none; }

.topnav {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  justify-self: center;
  grid-template-columns: none;
}

.topnav .nav-about,
.topnav .nav-join,
.topnav .nav-who { justify-self: auto; }

@media (max-width: 760px) {
  .topbar-in { grid-template-columns: auto auto; padding: 9px 14px; row-gap: 4px; }
  .brand   { grid-column: 1; }
  .langset { grid-column: 2; }
  .topnav  { grid-column: 1 / -1; justify-self: center; flex-wrap: wrap; justify-content: center; }
}


/* ------------------------------------------------------------------
   MAP + RECORDS (added 2026-08-31 evening)
   ------------------------------------------------------------------ */

/* index: live bar under the banner */
.livebar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin: 18px 0 4px;
}
.livebar .live-pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 2px solid var(--ink); background: var(--paper);
  padding: 10px 16px; text-decoration: none; color: var(--ink);
  font-family: "IBM Plex Mono", monospace; font-size: 14.5px;
  box-shadow: 3px 3px 0 var(--rule);
}
.livebar .live-pill:hover { background: var(--gold-wash); box-shadow: 3px 3px 0 var(--flag-gold); }
.livebar .live-pill .dot {
  width: 9px; height: 9px; background: var(--grass-deep); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(42,114,71,.18);
}
.livebar .live-pill b { font-weight: 600; }

/* shared page bits */
.pagehead { margin: 26px 0 10px; }
.pagehead .kicker { margin-bottom: 2px; }
.stamp {
  font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.stamp .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grass-deep); }

/* ---------- map page ---------- */
.map-frame {
  border: 3px solid var(--ink); background: var(--paper);
  box-shadow: 6px 6px 0 var(--rule); margin: 14px 0 10px;
}
#worldmap {
  height: min(70vh, 680px); width: 100%;
  background: #dbe9d2; outline: none;
  font-family: "IBM Plex Mono", monospace;
}
.leaflet-container { cursor: grab; }
.leaflet-container:active { cursor: grabbing; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,253,245,.8); }
.head-marker { background: none; border: none; }
.head-marker .hm {
  display: grid; place-items: center; position: relative;
  transition: transform .12s ease;
}
.head-marker:hover .hm { transform: scale(1.15); z-index: 30; }
.head-marker img {
  width: 34px; height: 34px; image-rendering: pixelated;
  border: 2px solid var(--ink); background: var(--cream-lt);
  box-shadow: 2px 2px 0 rgba(44,45,50,.45);
}
.head-marker .nm {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font: 600 11px "IBM Plex Mono", monospace;
  background: var(--ink); color: var(--cream); padding: 1px 6px;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.head-marker:hover .nm { opacity: 1; }
.maplegend {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin: 10px 0 26px; font-size: 14px; color: var(--ink-soft);
}
.maplegend .p-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 2px solid var(--rule); background: var(--paper);
  padding: 4px 10px 4px 4px; text-decoration: none; color: var(--ink);
  font-family: "IBM Plex Mono", monospace; font-size: 13px;
}
.p-chip img { width: 22px; height: 22px; image-rendering: pixelated; border: 1px solid var(--ink); }
.p-chip:hover { border-color: var(--ink); background: var(--gold-wash); }
.p-chip .dimtag { color: var(--red-bright); font-size: 11.5px; }

/* ---------- records page ---------- */
.roster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px; margin: 14px 0 26px;
}
.roster a {
  display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px;
  border: 2px solid var(--rule); background: var(--paper);
  text-decoration: none; color: var(--ink);
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
}
.roster a img { width: 44px; height: 44px; image-rendering: pixelated; border: 2px solid var(--ink); }
.roster a:hover, .roster a[aria-current="true"] {
  border-color: var(--ink); background: var(--gold-wash); box-shadow: 3px 3px 0 var(--rule);
}
.player-panel { border-top: 2px solid var(--rule); padding-top: 18px; }
.p-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.p-head h3 { margin: 0; font-size: 30px; }
.p-head .sub { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--ink-soft); }
.p-cols { display: grid; grid-template-columns: 1fr 240px; gap: 22px; align-items: start; }
@media (max-width: 720px) { .p-cols { grid-template-columns: 1fr; } }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px; margin: 12px 0 4px;
}
.stat {
  border: 2px solid var(--rule); background: var(--paper); padding: 10px 12px 8px;
}
.stat b {
  display: block; font-family: "IBM Plex Mono", monospace; font-weight: 600;
  font-size: 22px; letter-spacing: -.5px;
}
.stat span { display: block; font-size: 12px; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }
.stat[data-none] b { color: var(--ink-faint); }
.stat small { color: var(--ink-faint); font-size: 10.5px; }
.viewer-card {
  border: 2px solid var(--ink); background: linear-gradient(180deg, var(--navy-wash), var(--paper));
  box-shadow: 4px 4px 0 var(--rule); display: grid; justify-items: center; padding: 8px 8px 4px;
}
.viewer-card canvas { max-width: 100%; }
.viewer-card .cap { font-size: 11.5px; color: var(--ink-soft); padding: 4px 0 6px; text-align: center; }

/* hotbar / armour slots + Minecraft-style tooltip */
.slotrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
.slot {
  position: relative; width: 52px; height: 52px;
  border: 2px solid var(--rule); background: var(--cream-lt);
  display: grid; place-items: center; text-align: center;
  font: 600 9.5px "IBM Plex Mono", monospace; color: var(--ink-soft);
  padding: 2px; overflow: visible;
}
.slot[data-filled] { border-color: var(--ink); background: var(--paper); color: var(--ink); cursor: help; }
.slot[data-sel] { outline: 3px solid var(--flag-gold); outline-offset: 1px; }
.slot .cnt {
  position: absolute; right: 2px; bottom: 1px;
  font: 700 11px "IBM Plex Mono", monospace; color: var(--ink);
}
.slot .ench { position: absolute; left: 3px; top: 2px; font-size: 9px; color: #7a3fd4; }
.slot .lbl { display: block; max-height: 100%; overflow: hidden; line-height: 1.15; }
.slothead { font-size: 12.5px; color: var(--ink-soft); margin: 14px 0 0; text-transform: uppercase; letter-spacing: .8px; }
.mc-tip {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 130px; max-width: 210px; z-index: 40; text-align: left;
  background: rgba(16, 0, 16, .96); color: #fff;
  border: 2px solid #2d0a63; outline: 2px solid rgba(16,0,16,.96);
  padding: 6px 9px; pointer-events: none; opacity: 0; transition: opacity .1s;
  font: 12.5px "IBM Plex Mono", monospace; line-height: 1.45; white-space: normal;
}
.slot:hover .mc-tip, .slot:focus .mc-tip { opacity: 1; }
.mc-tip .t-name { color: #fff; font-weight: 600; }
.mc-tip .t-ench { color: #a8a8ff; }
.mc-tip .t-sub { color: #8a877c; font-size: 11px; }
.armor-flex { display: flex; gap: 18px; flex-wrap: wrap; }
.kv { font-family: "IBM Plex Mono", monospace; font-size: 13.5px; margin: 2px 0; }
.kv b { font-weight: 600; }
.backlink { margin: 26px 0 8px; }
.backlink a { color: var(--red); }

/* links inside the dark section head (map/records blurbs) */
.sectionhead .blurb a { color: var(--flag-gold); text-decoration-color: var(--flag-gold); }
.sectionhead .blurb a:hover { color: var(--gold-wash); }


/* ------------------------------------------------------------------
   SIDEBAR (injected by app.js on every page, 2026-08-31)
   The three-slot header nav now only shows on the INFO pages.
   ------------------------------------------------------------------ */
[data-page="map"] .topnav,
[data-page="records"] .topnav,
[data-page="directory"] .topnav { display: none; }

.menubtn {
  display: inline-flex; align-items: center; gap: 9px;
  background: none; border: 2px solid var(--cream); color: var(--cream);
  font: 600 12px "IBM Plex Mono", monospace; letter-spacing: .12em;
  padding: 8px 12px; cursor: pointer; text-transform: uppercase;
}
.menubtn:hover { background: var(--red); border-color: var(--red); }
.menubtn .bars { display: grid; gap: 3px; }
.menubtn .bars i { display: block; width: 16px; height: 2px; background: currentColor; }
.menubtn { flex: 0 0 auto; }
@media (max-width: 620px) { .menubtn span[lang] { display: none; } .menubtn { padding: 8px 10px; } }

.scrim {
  position: fixed; inset: 0; background: rgba(20,18,12,.55);
  opacity: 0; pointer-events: none; transition: opacity .22s ease; z-index: 60;
}
[data-menu="open"] .scrim { opacity: 1; pointer-events: auto; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(310px, 84vw);
  background: var(--ink); color: var(--cream); z-index: 70;
  transform: translateX(-102%); transition: transform .24s cubic-bezier(.3,.7,.3,1);
  display: flex; flex-direction: column; border-right: 4px solid var(--red);
  overflow-y: auto;
}
[data-menu="open"] .sidebar { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } .scrim { transition: none; } }

.sidebar .sb-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid rgba(244,236,202,.16);
}
.sidebar .sb-top .wordmark { color: var(--salmon); }
.sb-close {
  background: none; border: none; color: var(--cream); cursor: pointer;
  font: 400 24px/1 "IBM Plex Mono", monospace; padding: 2px 6px;
}
.sb-close:hover { color: var(--salmon); }

.sb-links { padding: 12px 0 4px; }
.sb-links a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 13px 20px; text-decoration: none; color: var(--cream);
  font-family: "Silkscreen", "IBM Plex Mono", monospace; font-size: 15px; letter-spacing: .06em;
  border-left: 4px solid transparent;
}
.sb-links a .sb-sub {
  font-family: "Literata", Georgia, serif; font-size: 12.5px; letter-spacing: 0;
  color: var(--ink-faint);
}
.sb-links a:hover { background: rgba(244,236,202,.07); border-left-color: var(--salmon); }
.sb-links a[aria-current="page"] { background: rgba(168,35,26,.22); border-left-color: var(--flag-gold); }
.sb-links a[aria-current="page"] .sb-sub { color: var(--cream); opacity: .7; }

.sb-foot { margin-top: auto; padding: 16px 20px 22px; border-top: 1px solid rgba(244,236,202,.16); }
.sb-foot .sb-label {
  font: 600 10.5px "IBM Plex Mono", monospace; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 9px;
}
.sb-foot .langset { display: flex; gap: 0; width: 100%; border: none; background: none; }
.sb-foot .langbtn {
  flex: 1; background: none; color: var(--cream); border: 2px solid rgba(244,236,202,.3);
  padding: 8px 0; cursor: pointer; font: 600 13px "IBM Plex Mono", monospace;
}
.sb-foot .langbtn + .langbtn { border-left: none; }
.sb-foot .langbtn[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.sb-foot .sb-note { margin: 14px 0 0; font-size: 11.5px; color: var(--ink-faint); line-height: 1.5; }

/* ---------- directory page ---------- */
.tabbar { display: flex; gap: 0; margin: 16px 0 0; flex-wrap: wrap; }
.tabbar button {
  background: var(--paper); border: 2px solid var(--rule); border-bottom-width: 3px;
  color: var(--ink-soft); cursor: pointer; padding: 11px 18px;
  font: 600 13px "IBM Plex Mono", monospace; letter-spacing: .04em;
}
.tabbar button + button { border-left: none; }
.tabbar button:hover { background: var(--gold-wash); }
.tabbar button[aria-selected="true"] {
  background: var(--ink); color: var(--cream); border-color: var(--ink);
}
.tabbar .n { opacity: .6; font-weight: 400; margin-left: 6px; }
.dirbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 6px; }
.dirsearch {
  flex: 1 1 240px; padding: 10px 12px; border: 2px solid var(--ink); background: var(--paper);
  font: 400 15px "IBM Plex Mono", monospace; color: var(--ink);
}
.dirsearch:focus { outline: 3px solid var(--flag-gold); outline-offset: 1px; }
.dirfilter { display: flex; gap: 6px; flex-wrap: wrap; }
.dirfilter button {
  border: 2px solid var(--rule); background: var(--paper); cursor: pointer;
  font: 400 12.5px "IBM Plex Mono", monospace; padding: 7px 11px; color: var(--ink-soft);
}
.dirfilter button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--gold-wash); }
.dircount { font: 400 13px "IBM Plex Mono", monospace; color: var(--ink-faint); }

/* directory cards */
.dirlist { margin: 14px 0 30px; }
.entry {
  border: 2px solid var(--rule); background: var(--paper);
  margin-bottom: -2px; padding: 0;
}
.entry > summary {
  list-style: none; cursor: pointer; padding: 12px 14px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.entry > summary::-webkit-details-marker { display: none; }
.entry > summary:hover { background: var(--cream-lt); }
.entry[open] { border-color: var(--ink); position: relative; z-index: 2; }
.entry[open] > summary { background: var(--cream-lt); border-bottom: 2px solid var(--rule); }
.entry .e-name { font-weight: 600; font-size: 17px; }
.entry .e-meta { font: 400 12.5px "IBM Plex Mono", monospace; color: var(--ink-faint); }
.entry .e-body { padding: 14px; }
.pill {
  display: inline-block; font: 600 10.5px "IBM Plex Mono", monospace;
  letter-spacing: .09em; text-transform: uppercase; padding: 3px 8px;
  border: 1.5px solid currentColor;
}
.pill.hostile { color: var(--flag-red); }
.pill.passive { color: var(--grass-deep); }
.pill.neutral { color: var(--dirt); }
.pill.boss    { color: var(--red); background: var(--red-wash); }
.pill.utility { color: var(--navy-lt); }
.pill.new     { color: var(--flag-gold); background: var(--gold-wash); border-style: dashed; }
.hpbar { display: inline-flex; align-items: center; gap: 6px; font-family: "IBM Plex Mono", monospace; }
.hpbar b { font-size: 15px; }
.hearts { color: var(--flag-red); letter-spacing: -1px; font-size: 12px; }
.dmg b { color: var(--red-bright); }

.statline { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 0 12px; }
.statline > div { min-width: 90px; }
.statline .k {
  font: 600 10.5px "IBM Plex Mono", monospace; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 2px;
}
.droplist { list-style: none; margin: 0; padding: 0; }
.droplist li {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 7px 0; border-top: 1px dashed var(--rule-soft);
}
.droplist li:first-child { border-top: none; }
.droplist .d-name { font-weight: 600; }
.droplist .d-num { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--ink-soft); }
.droplist .d-pct {
  font: 600 12px "IBM Plex Mono", monospace; color: var(--ink);
  background: var(--gold-wash); border: 1px solid var(--flag-gold); padding: 1px 6px;
}
.droplist .d-note { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }
.nothing { color: var(--ink-faint); font-style: italic; }

/* crafting grid */
.craftway { margin: 0 0 18px; }
.craftway + .craftway { border-top: 1px dashed var(--rule); padding-top: 16px; }
.craft-head {
  font: 600 10.5px "IBM Plex Mono", monospace; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px;
}
.craftrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 4px; }
.gcell {
  width: 62px; height: 62px; border: 2px solid var(--rule); background: var(--cream-lt);
  display: grid; place-items: center; text-align: center; padding: 3px;
  font: 600 9.5px/1.15 "IBM Plex Mono", monospace; color: var(--ink); overflow: hidden;
}
.gcell.empty { border-style: dotted; background: transparent; }
.gcell.tagcell { border-color: var(--navy-lt); color: var(--navy-lt); }
.arrow { font-size: 22px; color: var(--ink-faint); }
.outcell { border-color: var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--rule); }
.outcell .cnt { display: block; font-size: 13px; font-weight: 700; }
.tagnote { font-size: 12px; color: var(--ink-soft); margin: 8px 0 0; }
.srclist { list-style: none; margin: 0; padding: 0; }
.srclist li { padding: 6px 0 6px 16px; position: relative; border-top: 1px dashed var(--rule-soft); }
.srclist li:first-child { border-top: none; }
.srclist li::before { content: "▸"; position: absolute; left: 0; color: var(--flag-gold); }
