/* Beyonds Launcher (D367, D371; renamed, with a game picker, 2026-10-02). Charcoal and bone, like the title
   screen. The window is the studio's: BEYONDS LAUNCHER in the title bar and a tile for each game under it. The
   page below wears the selected game's face -- for Skyhearth: Tribes the name card's SKYHEARTH over TRIBES and
   every heading in the game's own alphabet (D358, Skyhearth Tribal -- the same TTF the game loads from
   Content/UI/Fonts), the night henge behind it all. */

@font-face {
  font-family: "Skyhearth Tribal";
  src: url("/assets/tribal.ttf?v=1003b") format("truetype");
}

:root {
  --bg: #0b0d10;
  --panel: rgba(13, 15, 19, 0.78);
  --panel-solid: #14171c;
  --line: rgba(228, 212, 165, 0.16);
  --bone: #e4d4a5;
  --bone-dim: #b9ab84;
  --text: #ece7db;
  --muted: #9b968b;
  --error: #e0806e;
  --ok: #9fc28a;
  --rail: 232px;
  --bar: 92px;
  --title: 34px;
  --games: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
  user-select: none;
}

.hero {
  position: fixed;
  inset: 0;
  background: url("/assets/journey-11-dawn.webp?v=1108a") center 60% / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 13, 16, 0.96) 0%, rgba(11, 13, 16, 0.82) 30%, rgba(11, 13, 16, 0.25) 70%, rgba(11, 13, 16, 0.45) 100%),
    linear-gradient(0deg, rgba(11, 13, 16, 0.95) 0%, rgba(11, 13, 16, 0) 35%);
}

/* The title bar: the window has no frame of its own. */
.titlebar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--title);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 14px;
  z-index: 10;
}
.titlebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Skyhearth Tribal", "Segoe UI", serif;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--bone-dim);
}
.titlebar-right { display: flex; align-items: stretch; height: 100%; }
.account-chip {
  align-self: center;
  margin-right: 10px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 13, 16, 0.5);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.account-chip:hover { color: var(--text); border-color: var(--bone-dim); }
.win-btn {
  width: 46px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.win-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.win-close:hover { background: #b23a2e; color: #fff; }

/* The games (Adi, 2026-10-02): a tile each under the title bar, SKYHEARTH over the game's name like the rail's
   lockup. The selected one is bone and underlined; one not out yet is greyed, says "Coming soon" and opens nothing. */
.games {
  position: fixed;
  top: var(--title); left: 0; right: 0;
  height: var(--games);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.35), rgba(11, 13, 16, 0.6));
  z-index: 6;
}
.game-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 9, 12, 0.5);
  color: var(--bone-dim);
  font: inherit;
  cursor: pointer;
}
/* Hover is its own, lighter look (a faint bone wash), below the selected one: bone text, bone-dim border, the
   underline. A selected tile does not change on hover. */
.game-tile:hover:not([aria-disabled="true"]):not([aria-selected="true"]) { color: var(--text); border-color: rgba(228, 212, 165, 0.32); background: rgba(228, 212, 165, 0.05); }
.game-tile[aria-selected="true"] { color: var(--bone); border-color: var(--bone-dim); box-shadow: inset 0 -2px 0 var(--bone); }
.game-tile:focus { outline: none; }
.game-tile:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.tile-mark { display: flex; flex-direction: column; align-items: center; font-family: "Skyhearth Tribal", "Segoe UI", serif; line-height: 1; }
.tile-name { font-size: 15px; letter-spacing: 0.02em; }
.tile-sub { margin-top: 4px; padding-left: 0.5em; font-size: 9px; letter-spacing: 0.5em; color: var(--bone-dim); }
.tile-soon {
  padding: 2px 8px;
  border: 1px solid rgba(155, 150, 139, 0.35);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Greyed: the tile's content dimmed and drained of colour, the pointer plain; the focus ring stays full strength. */
.game-tile[aria-disabled="true"] { cursor: default; color: var(--muted); border-color: rgba(155, 150, 139, 0.14); background: rgba(8, 9, 12, 0.3); }
.game-tile[aria-disabled="true"] > * { opacity: 0.45; filter: grayscale(1); }
/* ...but the game's own name (ASCENSION) stays readable, about 3:1, still well under the bone Tribes tile. */
.game-tile[aria-disabled="true"] > .tile-mark { opacity: 0.62; }
.game-tile[aria-disabled="true"] .tile-sub { color: var(--muted); }
.game-tile[aria-disabled="true"] > .tile-soon { opacity: 0.85; }

/* The left rail: the selected game's wordmark and the four pages. */
.rail {
  position: fixed;
  top: calc(var(--title) + var(--games)); bottom: var(--bar); left: 0;
  width: var(--rail);
  padding: 26px 0 18px 30px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
/* The name card's lockup (D362): SKYHEARTH, and TRIBES small and spaced under it. */
.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 172px;
  margin: 2px 0 38px;
  color: var(--bone);
  font-family: "Skyhearth Tribal", "Segoe UI", serif;
  line-height: 1;
}
.wordmark .wm-name { font-size: 34px; letter-spacing: 0.02em; }
.wordmark .wm-sub { margin-top: 8px; padding-left: 0.5em; font-size: 15px; letter-spacing: 0.5em; color: var(--bone-dim); }
.rail ul { list-style: none; margin: 0; padding: 0; }
.nav {
  display: block;
  width: 100%;
  padding: 9px 0 9px 14px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: 19px/1.2 "Skyhearth Tribal", "Segoe UI", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.nav:hover { color: var(--text); }
.nav.active { color: var(--bone); border-left-color: var(--bone); }
.rail-foot { margin-top: auto; font-size: 11px; color: #6c6860; letter-spacing: 0.04em; }

/* Pages. */
.pages {
  position: fixed;
  top: calc(var(--title) + var(--games)); bottom: var(--bar); left: var(--rail); right: 0;
  overflow: hidden;
}
.page {
  display: none;
  position: absolute;
  inset: 0;
  padding: 44px 48px 24px 32px;
  overflow-y: auto;
  user-select: text;
}
.page.active { display: block; }
.page::-webkit-scrollbar { width: 8px; }
.page::-webkit-scrollbar-thumb { background: rgba(228, 212, 165, 0.18); border-radius: 4px; }

.eyebrow { margin: 0; color: var(--bone-dim); font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; }
.headline {
  margin: 6px 0 4px;
  font: 64px/1.05 "Skyhearth Tribal", "Segoe UI", serif;
  letter-spacing: 0.06em;
  color: var(--bone);
}
.subline { margin: 0 0 30px; color: var(--muted); }
.page-title {
  margin: 0 0 24px;
  font: 34px/1.1 "Skyhearth Tribal", "Segoe UI", serif;
  letter-spacing: 0.08em;
  color: var(--bone);
  font-weight: normal;
}
h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone-dim); font-weight: 600; }

.card {
  max-width: 560px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}
.notes { white-space: pre-wrap; color: var(--text); max-height: 230px; overflow-y: auto; }
.link { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--bone); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }

.history { max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.history-entry { padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.history-entry header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.history-entry .ver { font: 22px/1 "Skyhearth Tribal", "Segoe UI", serif; color: var(--bone); letter-spacing: 0.05em; }
.history-entry .date { color: var(--muted); font-size: 12px; }
.history-entry .tag { font-size: 11px; color: var(--bg); background: var(--bone); border-radius: 3px; padding: 1px 6px; }
.history-entry .body { white-space: pre-wrap; }
/* D373: a patch note -- the release, then its biggest changes, each a title and a line or two under it. */
.history-entry .title { font: 18px/1 "Skyhearth Tribal", "Segoe UI", serif; color: var(--bone-dim); letter-spacing: 0.06em; }
.history-entry .covers { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.changes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.changes h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.changes p { margin: 0; color: var(--muted); line-height: 1.5; }
.history-entry footer { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.change-list { margin: 0; padding-left: 18px; white-space: normal; }
.change-list li { margin: 2px 0; }
.history-entry .dim, .notes .dim { color: var(--muted); }

/* Forms. */
.form { max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.form.narrow { max-width: 380px; margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone-dim); }
.field small { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row input { flex: 1; }
input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 9px 11px;
  background: rgba(8, 9, 12, 0.72);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--bone-dim); }
input:disabled { opacity: 0.45; }
.check { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.saved { color: var(--ok); font-size: 13px; }
.tools { max-width: 620px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.notice {
  max-width: 560px;
  padding: 14px 18px;
  border-left: 3px solid var(--bone);
  background: var(--panel);
  color: var(--text);
}
.notice strong { display: block; color: var(--bone); margin-bottom: 4px; font-weight: 600; }

/* Buttons. */
.btn-primary {
  border: 0;
  border-radius: 4px;
  background: var(--bone);
  color: #15130e;
  font: 600 14px/1 "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: #f0e2b9; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }
.btn-primary.small { padding: 10px 18px; }
.btn-primary.big {
  min-width: 230px;
  height: 58px;
  padding: 0 30px;
  font: 26px/1 "Skyhearth Tribal", "Segoe UI", serif;
  letter-spacing: 0.16em;
  box-shadow: 0 0 24px rgba(228, 212, 165, 0.18);
}
.btn-primary.big.cancel { background: transparent; color: var(--bone); border: 1px solid var(--bone-dim); box-shadow: none; }
.btn-ghost {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 9, 12, 0.5);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--bone-dim); }
.btn-ghost:disabled { opacity: 0.4; cursor: default; }

/* The bottom bar: where the install stands and the one big button. */
.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 34px 0 30px;
  background: linear-gradient(0deg, rgba(8, 9, 12, 0.98), rgba(10, 12, 15, 0.9));
  border-top: 1px solid var(--line);
  z-index: 6;
}
.bar-status { flex: 1; min-width: 0; }
.status-line { font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-line .dim { color: var(--muted); }
.status-line.error { color: var(--error); }
.progress { margin-top: 8px; }
.progress-track { height: 6px; background: rgba(228, 212, 165, 0.12); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--bone); border-radius: 3px; transition: width 0.25s linear; }
.progress-text { margin-top: 6px; font-size: 12px; color: var(--muted); }

.toast {
  position: fixed;
  right: 34px;
  bottom: calc(var(--bar) + 16px);
  max-width: 460px;
  padding: 12px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 5px;
  z-index: 20;
  user-select: text;
}
.toast.error { border-color: rgba(224, 128, 110, 0.6); color: var(--error); }

@media (max-width: 1100px) {
  :root { --rail: 200px; }
  .headline { font-size: 52px; }
}

/* A short window (up to 680 px; the minimum is 620): the game strip took 56 px from the pages, so take it back
   here -- a slimmer strip and less air above the headline -- and the Play page fits without a scroll, as it did
   before the strip. The default 1200x720 is untouched. */
@media (max-height: 680px) {
  :root { --games: 46px; }
  .game-tile { height: 34px; }
  .rail { padding-top: 12px; }
  .page { padding-top: 22px; }
  .subline { margin-bottom: 20px; }
}
