/* Xīng's web pages: the front page and the manual (2026-10-15), in the game's look, 星图 Xīngtú the star chart
   (docs/xing/look.md): ink-blue night, lacquer navy panels, gold hairlines, amber, cinnabar seals and jade, over Bootstrap's
   dark theme. The fonts are the game's own (game/fonts). */
@font-face { font-family: "Space Grotesk"; src: url("../../game/fonts/spacegrotesk/SpaceGrotesk-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../../game/fonts/spacegrotesk/SpaceGrotesk-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../../game/fonts/spacegrotesk/SpaceGrotesk-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../../game/fonts/notosans/NotoSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../../game/fonts/notosans/NotoSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../../game/fonts/notosans/NotoSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root, [data-bs-theme="dark"] {
  --space: #070b18; --panel: #0c1221; --panel-2: #121a2c; --line: #45577c; --rule: #28344f;
  --text: #ece7dc; --text-dim: #9aa1b2; --amber: #ffc65a; --amber-2: #d9952a; --cyan: #5ad6e6; --violet: #c27ae8;
  --gold: #c9a45c; --gold-line: rgba(201, 164, 92, 0.65); --cinnabar: #d9483b; --jade: #5fc49a;
  --font-head: "Space Grotesk", "Noto Sans", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-cjk: "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bs-body-bg: var(--space); --bs-body-color: var(--text); --bs-body-font-family: var(--font-body);
  --bs-link-color: var(--amber); --bs-link-hover-color: #fff; --bs-border-color: var(--rule);
  --bs-heading-color: var(--text);
}
body { background: var(--space); color: var(--text); font-family: var(--font-body); line-height: 1.5; }
h1, h2, h3, h4, .xg-head { font-family: var(--font-head); font-weight: 500; letter-spacing: 0.01em; }
h2.xg-heading { color: var(--amber); font-size: 1.5rem; margin: 2.5rem 0 1rem; }
h2.xg-heading::after { content: ""; display: block; width: 64px; height: 1px; background: var(--gold-line); margin-top: 0.5rem; }
h3 { font-size: 1.15rem; color: var(--text); margin-top: 1.5rem; }
p.dim, .dim { color: var(--text-dim); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* the seal: a race's character on its colour (the game's .seal) */
.seal { display: inline-grid; place-items: center; width: 1.32em; height: 1.32em; margin-right: 0.12em; border-radius: 2px;
  background: var(--seal, var(--cinnabar)); color: var(--seal-ink, #f6f1e6); font: 700 0.9em/1 var(--font-cjk);
  vertical-align: -0.24em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.seal-lg { width: 2.4em; height: 2.4em; font-size: 1.1em; border-radius: 4px; }

/* panels and cards: lacquer navy with a gold hairline, no glow */
.xg-card { background: var(--panel); border: 1px solid var(--rule); box-shadow: inset 0 0 0 1px rgba(201, 164, 92, 0.12); border-radius: 3px; padding: 1rem 1.1rem; height: 100%; }
.xg-card h3 { margin-top: 0; font-size: 1.1rem; }
.xg-card .race-name { color: var(--race, var(--text)); font-family: var(--font-head); font-size: 1.3rem; }
.xg-card .race-meaning { color: var(--text-dim); font-size: 0.9rem; }
.trait { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 2px; background: var(--panel-2); border: 1px solid var(--rule); font-size: 0.85rem; cursor: help; }
.trait.minus { border-color: #6a3338; color: #ffb3b3; }
.trait.plus { color: var(--text); }

/* buttons: the game's, amber */
.btn-xing { font-family: var(--font-head); font-weight: 500; color: var(--amber); background: #131b2e; border: 1px solid var(--line); border-radius: 2px; padding: 0.6rem 1.4rem; }
.btn-xing:hover, .btn-xing:focus { color: #fff; background: #1b2541; border-color: var(--gold); }
.btn-xing.primary { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.btn-xing-quiet { font-family: var(--font-head); color: var(--text-dim); background: none; border: 1px solid var(--rule); border-radius: 2px; padding: 0.6rem 1.2rem; }
.btn-xing-quiet:hover { color: var(--amber); border-color: var(--gold); }
/* the keyboard's focus, as in the game: Bootstrap's own ring is undefined for these (the evening review, 2026-10-15) */
.btn-xing:focus-visible, .btn-xing-quiet:focus-visible { outline: 1px dashed var(--amber); outline-offset: 2px; box-shadow: none; }

/* the banner: the galaxy of the day under the title */
.xg-banner { position: relative; min-height: 520px; overflow: hidden; border-bottom: 1px solid var(--gold-line); background: var(--space); }
.xg-banner canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.xg-banner .xg-banner-text { position: relative; z-index: 1; padding: 4rem 0 3rem; max-width: 640px; }
.xg-banner .xg-banner-text::before { content: ""; position: absolute; inset: -2rem -2rem -1rem -2rem; z-index: -1;
  background: radial-gradient(ellipse at 30% 40%, rgba(7, 11, 24, 0.92), rgba(7, 11, 24, 0.55) 60%, rgba(7, 11, 24, 0) 100%); }
.xg-title { font-family: var(--font-head); font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 500; letter-spacing: 0.02em; margin: 0; line-height: 1.05; }
.xg-title .seal { font-size: 0.72em; vertical-align: -0.12em; margin-right: 0.18em; }
.xg-sub { font-family: var(--font-head); color: var(--amber); font-size: 1.15rem; margin: 0.4rem 0 1.2rem; }
.xg-pitch { font-size: 1.1rem; max-width: 560px; }
.xg-continue { display: none; margin-top: 1rem; padding: 0.8rem 1rem; border: 1px solid var(--gold-line); border-radius: 3px; background: rgba(12, 18, 33, 0.85); max-width: 560px; }
.xg-continue.show { display: block; }
.xg-continue .who { font-family: var(--font-head); color: var(--amber); }
.xg-note { color: var(--text-dim); font-size: 0.9rem; margin-top: 1rem; }

/* the share image's mode: the banner alone, filling the page */
body.share .xg-banner { min-height: 100vh; border: 0; }
body.share .xg-banner-text { padding-top: 7rem; }
body.share main, body.share footer { display: none; }

/* features */
.feature { border-left: 2px solid var(--gold-line); padding-left: 1rem; margin-bottom: 1.4rem; }
.feature h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--amber); }
.feature p { margin: 0; color: var(--text-dim); }

/* the gate section */
.xg-gate { border: 1px solid var(--gold-line); border-radius: 3px; padding: 1.2rem 1.4rem; background: var(--panel); }
.xg-gate .marks { font-family: var(--font-head); color: var(--amber); }

/* the manual */
.xg-manual h2 { color: var(--amber); font-size: 1.5rem; margin: 2.4rem 0 0.8rem; scroll-margin-top: 1rem; }
.xg-manual h2::after { content: ""; display: block; width: 64px; height: 1px; background: var(--gold-line); margin-top: 0.5rem; }
.xg-manual h3 { font-size: 1.1rem; margin-top: 1.4rem; }
.xg-manual kbd { font-family: var(--font-head); background: var(--panel-2); border: 1px solid var(--line); border-radius: 2px; padding: 0 5px; color: var(--text); }
.xg-manual table { font-size: 0.95rem; }
.xg-manual .table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--rule); }
.xg-contents { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }   /* a short screen scrolls the list */
.xg-contents-head { font-family: var(--font-head); font-weight: 500; margin: 0 0 0.4rem; color: var(--text); }
.xg-contents ol { padding-left: 1.2rem; margin: 0; }
.xg-contents li { margin: 0.2rem 0; }
.xg-contents a { color: var(--text-dim); }
.xg-contents a:hover, .xg-contents a.now { color: var(--amber); text-decoration: none; }
.xg-manual .note { border-left: 3px solid var(--amber); padding: 0.4rem 0.8rem; background: var(--panel); color: var(--text-dim); }
.xg-top { font-size: 0.85rem; }

footer.xg-footer { border-top: 1px solid var(--gold-line); margin-top: 3rem; padding: 1.5rem 0 2rem; color: var(--text-dim); font-size: 0.9rem; }
