/* The palette is src/data/theme.json, so the site and the game are one thing. */
:root {
  --screen-bg: #1A1410;
  --surface: #2A211A;
  --surface-alt: #221A15;
  --border: #6B4F3A;
  --text-primary: #F7EEE1;
  --text-secondary: #E2D4C1;
  --text-muted: #A38E78;
  --accent: #E3A03C;
  --accent-text: #231A13;
  --accent-2: #9C6244;
  --success: #89A45C;

  --measure: 40rem;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--screen-bg);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", "PingFang TC", "Noto Sans TC", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

/* ---------------------------------------------------------------- typography */

h1, h2, h3 { color: var(--text-primary); line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 .5rem; }
h2 {
  font-size: 1.25rem;
  margin: 2.75rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(107, 79, 58, .45);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; color: var(--accent); }

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .4rem; }
strong { color: var(--text-primary); }

a { color: var(--accent); text-decoration-color: rgba(227, 160, 60, .4); }
a:hover { text-decoration-color: var(--accent); }

code {
  background: var(--surface-alt);
  border: 1px solid rgba(107, 79, 58, .5);
  border-radius: 5px;
  padding: .1em .4em;
  font-size: .875em;
}

.lede { font-size: 1.075rem; color: var(--text-secondary); }
.muted { color: var(--text-muted); font-size: .925rem; }

/* -------------------------------------------------------------------- header */

.site-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.site-head img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1px solid var(--border);
  flex: none;
}
.site-head .kicker {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .7rem;
  color: var(--accent-2);
  margin: 0;
}
.site-head h1 { margin: 0; font-size: 1.6rem; }

/* --------------------------------------------------------------------- hero */

.hero { text-align: center; padding: 1rem 0 .5rem; }
.hero img.icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.hero .kicker {
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .72rem;
  color: var(--accent-2);
  margin: 1.5rem 0 .35rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 8vw, 3rem);
  color: var(--accent);
  margin: 0 0 .75rem;
}
.hero p { max-width: 32rem; margin: 0 auto 1rem; }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.badges li {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--surface-alt);
}

/* ------------------------------------------------------------------- shelves */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}
.shots li { margin: 0; }
.shots img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.shots figcaption {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .5rem;
  text-align: center;
}
.shots figure { margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
  margin: 1.5rem 0;
}
.cards li {
  margin: 0;
  background: var(--surface);
  border: 1px solid rgba(107, 79, 58, .55);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.cards h3 { margin: 0 0 .35rem; font-size: 1rem; }
.cards p { margin: 0; font-size: .95rem; }

/* --------------------------------------------------------------------- notes */

.note {
  background: var(--surface);
  border: 1px solid rgba(107, 79, 58, .55);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }

.plain {
  background: var(--surface-alt);
  border: 1px solid rgba(107, 79, 58, .45);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}
.plain p:last-child { margin-bottom: 0; }

dl { margin: 1rem 0; }
dt { color: var(--accent); font-weight: 600; margin-top: 1rem; }
dd { margin: .25rem 0 0; }

/* --------------------------------------------------------------------- table */

.table-scroll { overflow-x: auto; margin: 1.25rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 26rem; font-size: .95rem; }
th, td {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: 1px solid rgba(107, 79, 58, .4);
  vertical-align: top;
}
th { color: var(--text-primary); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

/* --------------------------------------------------------------------- links */

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: 1.25rem 0 0;
  margin: 3rem 0 0;
  border-top: 1px solid rgba(107, 79, 58, .45);
  font-size: .925rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin: 1.75rem 0 0;
}
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
  padding: .7rem 1.5rem;
  border-radius: 999px;
}
.button.ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(107, 79, 58, .45);
  color: var(--text-muted);
  font-size: .875rem;
}

/* ----------------------------------------------------------------- languages */
/* One URL, four languages. Without JavaScript the English pane is the one
   already marked .is-on in the markup, and the buttons are hidden rather than
   left dead — so a reader with scripts off gets a whole page, not a broken one. */

.langbar {
  display: none;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2.25rem;
  padding: 0;
  list-style: none;
}
html.js .langbar { display: flex; }
.langbar li { margin: 0; }
.langbar button {
  font: inherit;
  font-size: .85rem;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  border-radius: 999px;
  padding: .4rem .95rem;
}
.langbar button:hover { color: var(--text-primary); border-color: var(--accent-2); }
.langbar button[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.lang-pane { display: none; }
.lang-pane.is-on { display: block; }
