/* Legendary Mir - the website.
 *
 * The palette is the client's own (ui/lib/theme.lua) and the launcher's
 * (launcher/src/renderer/style.css): the reference's gold, its dimmed gold for
 * borders, and the near-black of every window. The pixel face is Ark Pixel,
 * the font the client draws with (SIL OFL 1.1, img/art/ark-pixel-OFL.txt),
 * cut down to Latin and inlined so it needs no font host.
 *
 * One look, dark, on purpose: the game has no light mode either.
 */

@font-face {
  font-family: "Ark Pixel";
  src: url(data:font/woff2;base64,d09GMgABAAAAAA20AA0AAAAARegAAA1eAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG4gSBmAAfAruNNBBATYCJAOGHAuDEAAEIAWDbAcgFyQYgxAbhDRRlHHSk4iiZHDmZF8fcFNE8oLuIiOlHlWJgLFKEeMUE8HLRYyOY83TMupXcfyxxVV8NUbiuUTV3l/PLlmRVS6fhUHJeErgJMJT/mEk2SGR/GfVtOyZWYWbmb07x1D8kANLAYWke51fQPoQHcMHZOyPAJpAwUdGT6DLKGL/vFx7R23ll3Agkif8QE5NrbDmG+cIn3TRFzpaOjv73kVnMu15hOsd89+eMp/wvO1gILDzIZT5gyDJ/Jfg38ZFRJ2Eu+j+/69V2r4zSzQZGQQbYQhUZGxYGH71+73T/etXnUkPbs/uLCD0r1czqaruAKECwlEhcqwiHAmDUkXlrUpxN9cxqU0mSTssIkZEZGp7/7uMaXXc7Li5NEaKiBFTyuUo8P1PLIANnJSPcuPW7QJsBIC/g7lPZl4/n4Zo5iOAF8jtLdE7H1nuo1aySN/ys6/ILi7lnfreiz3rV+8e9Wj1CklA8AsSnCSWKouUkpaegYmVX0iBMlWq1Zo2Y9aceQvWnDpz7sKbDxT053V6gnNFtEAqXPDACx/8CCCEMApRhGKUoBRlKEcFKlGFatSgFnWYxgxmMYd5LGARm9jCNnaxh30c4BBHOMYJznCNG9ziHo94wjNe8Io3fMwU4nx/FwMMMDl/FyjIVgRFbXZNVSjJZOTjXwZdsv/VqXZQcDHm9Naqy6s1rqBoR+Q4H1XKjwlrracmioArTu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Tvk3iPIaHm0ZOGX3neBpKOe8vNxtgRRj8U86eB6buXfjLRX7Az0tQ33JxvQm3ARqsMP+HXGN9Bxja+6U6WbxO/omsIzVCwKNBnwbVUkzTVKolOoPguEfHOgLwLIYPgWbsP/cv2vBAlzhicbuRrMcWf4ms89Ime7ZDe1sllfPT+hxLHPloSBMM3Iq/RGK5aGPysq1GcASzEjsPJcoIQ+qMyVulFEitJ0g3SpUcq2BHtSjreRn06bH8g/tDJq+uAQpltFWMo4FCB/AAXg4mnNFwMKOL7YMFI7sHB1zzdXCC/bnwc6a4lvtw69FrTL82LVoNQtka5UAqCipK+VC5eh2q9OjUzJPs9Qf1GmAiJzfIjh0ZkGmEL9slh1O/DqhYm1FNOiElhV6jhO13ryA1UG+QH+hWuqy3GJq4fu1RpeOl46VHlRZJl87cxYCOrFrj4vJWRirApWp4aQet0VDOdF5HvHKAav+B1d3FS8Eprz4N83f9iAaC1I1lkEG1/1MvHqdOksG5sZ4B0g4zR38xStj7DgIJbS+IOF/UQECwLHMYVB3TcL2TBl3PbDjtt75ocMN1IiI8aRpYjm+WxLClUFxj/mH0yDEXZT3rfV5Ez6tWFAAAAA==) format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ink: #0b0907;
  --ink-2: #120d0a;
  --window: #100808;          /* theme.window_back */
  --row: #191400;             /* theme.row_back */
  --row-alt: #28210e;         /* theme.row_back_alt */
  --header: #060402;          /* theme.header_back */

  --gold: #c6a663;            /* theme.primary */
  --gold-hi: #f4dc9c;
  --gold-lo: #8d6424;
  --gold-dim: #7b6942;        /* theme.inactive_tab */
  --border: #635332;          /* theme.inactive_border */
  --line: rgba(198, 166, 99, .28);
  --line-faint: rgba(198, 166, 99, .12);

  --text: #e8dcc4;
  --text-dim: #b3a58b;
  --text-faint: #837560;

  --spell-key: #7fffd4;       /* theme.spell_key */
  --lime: #32cd32;
  --upgraded: #00c4d0;
  --red: #de4c4e;
  --amber: #deaf0c;
  --live: #7fcf7a;
  --wait: #e9b95a;
  --blocked: #e0725d;

  --display: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pixel: "Ark Pixel", "Silkscreen", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(198, 166, 99, .07), transparent 70%),
    var(--ink);
  color: var(--text);
  font: 17px/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }
h4 { font-size: 1.05rem; letter-spacing: .06em; }
p { margin: 0; }

.pixel {
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------------ top bar */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: linear-gradient(180deg, rgba(6, 4, 2, .96), rgba(11, 9, 7, .9));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .8), 0 8px 24px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .16em;
  color: var(--gold);
  white-space: nowrap;
}
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px;
  border: 1px solid transparent;
  -webkit-font-smoothing: none;
}
.nav a:hover { color: var(--gold-hi); border-color: var(--line); }
.nav a[aria-current="page"] { color: var(--gold-hi); border-color: var(--border); background: var(--row); }
.menu-toggle {
  display: none; margin-left: auto;
  background: var(--row); color: var(--gold); border: 1px solid var(--border);
  font: 13px var(--pixel); text-transform: uppercase; padding: 8px 12px; cursor: pointer;
}
/* The landing page's sign in / create account: two buttons on a wide screen,
   the gold one alone and Sign in in the nav when it is tighter, and a menu item
   once the nav folds. It folds at 1100px rather than 860px because it has more
   links than the portal's bar, which keeps the original fold. */
.top-actions { display: flex; gap: 8px; flex: none; }
.nav a.nav-account { display: none; }

@media (max-width: 1180px) {
  .top-actions .btn:not(.gold) { display: none; }
  .nav a.nav-account { display: inline-block; }
}

@media (max-width: 1100px) {
  .topbar.site .wrap { flex-wrap: wrap; padding-block: 8px; }
  .topbar.site .menu-toggle { display: inline-flex; }
  .topbar.site .nav { display: none; width: 100%; margin: 0; flex-direction: column; padding-bottom: 8px; }
  .topbar.site.open .nav { display: flex; }
  .topbar.site .top-actions { display: none; }
  .topbar.site .nav a.nav-account { display: block; }
}

@media (max-width: 860px) {
  .topbar .wrap { flex-wrap: wrap; padding-block: 8px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; margin: 0; flex-direction: column; padding-bottom: 8px; }
  .topbar.open .nav { display: flex; }
  .topbar .btn { display: none; }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 22px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  background: linear-gradient(180deg, #2c2211, #120c05);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .1), inset 0 0 0 1px rgba(0, 0, 0, .6);
  cursor: pointer;
  transition: color .15s, border-color .15s, box-shadow .2s, transform .15s;
  white-space: nowrap;
}
.btn:hover {
  color: var(--gold-hi);
  border-color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .14), 0 0 18px rgba(198, 166, 99, .22);
}
.btn:active { transform: translateY(1px); }
.btn.gold {
  color: #1a1206;
  background: linear-gradient(180deg, #f1d894, var(--gold) 52%, #94753b);
  border-color: #f1d894;
  text-shadow: 0 1px 0 rgba(255, 240, 200, .4);
}
.btn.gold:hover { color: #000; box-shadow: 0 0 26px rgba(198, 166, 99, .5); }
.btn.small { padding: 7px 14px; font-size: .78rem; }
.btn[aria-disabled="true"] {
  pointer-events: none; color: var(--text-faint);
  background: #140f09; border-color: #3a3020; box-shadow: none; text-shadow: none;
}

/* ------------------------------------------------------------------ the client's window */

/* A panel the way the client draws one: near-black, a bronze edge, a gold
   hairline inside it, and small gold brackets at the corners. */
.win {
  position: relative;
  background:
    linear-gradient(180deg, rgba(40, 33, 14, .35), rgba(16, 8, 8, 0) 120px),
    var(--window);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 0 0 3px rgba(6, 4, 2, .95),
    inset 0 0 0 4px var(--line-faint),
    0 18px 50px rgba(0, 0, 0, .55);
}
.win::before, .win::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
  pointer-events: none;
  opacity: .8;
}
.win::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.win::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

.win-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 30px;
  padding: 6px 40px;
  background: linear-gradient(180deg, #2a2010, #0e0905);
  border-bottom: 1px solid var(--border);
  color: var(--gold);
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  -webkit-font-smoothing: none;
  position: relative;
}
/* The round close stud every client window has, as ornament. */
.win-title::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #8a7a58, #3a2f1a 60%, #171108);
  box-shadow: 0 0 0 1px #6d5b35, inset 0 0 0 2px rgba(0, 0, 0, .5);
}
.win-body { padding: clamp(18px, 3vw, 30px); }

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

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
}
.hero .paint {
  position: absolute;
  inset: -4%;
  z-index: -3;
  background: url(img/art/login.webp) center 38% / cover no-repeat;
  animation: drift 60s ease-in-out infinite alternate;
}
.hero .shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8, 6, 4, .55) 0%, rgba(8, 6, 4, .1) 30%, rgba(8, 6, 4, .25) 60%, var(--ink) 100%),
    radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0, 0, 0, .55) 100%);
}
#embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1.4%, -1%, 0); }
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(72px, 13vw, 150px) clamp(56px, 9vw, 110px);
}
.eyebrow {
  color: var(--gold);
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  -webkit-font-smoothing: none;
  text-shadow: 0 1px 2px #000, 0 0 10px #000, 0 0 18px rgba(0, 0, 0, .9);
  padding: 4px 12px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55), transparent 75%);
}
.wordmark {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.8rem, 10vw, 7rem);
  line-height: .95;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold-hi) 22%, var(--gold) 55%, #7d5a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .85)) drop-shadow(0 0 30px rgba(198, 166, 99, .18));
}
.wordmark span { display: block; font-size: .42em; letter-spacing: .5em; margin-bottom: .1em; padding-left: .5em; }
.hero .lede {
  max-width: 34em;
  margin-top: 22px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #efe4cf;
  text-shadow: 0 1px 3px #000, 0 0 20px rgba(0, 0, 0, .8);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }

/* The strip of facts under the hero, set like the client's bottom panel. */
.facts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  margin-top: clamp(40px, 7vw, 72px);
  width: min(900px, 100%);
  background: rgba(6, 4, 2, .82);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 3px rgba(6, 4, 2, .95), inset 0 0 0 4px var(--line-faint);
}
.facts-strip div { padding: 14px 16px; text-align: left; border-left: 1px solid var(--line-faint); }
.facts-strip div:first-child { border-left: 0; }
.facts-strip b {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--gold-hi);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.facts-strip span { font-family: var(--pixel); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); -webkit-font-smoothing: none; }

/* ------------------------------------------------------------------ sections */

.section { padding-block: clamp(56px, 9vw, 104px); }
.section + .section { border-top: 1px solid rgba(99, 83, 50, .35); }
.section-head { display: grid; gap: 12px; max-width: 44em; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--text-dim); font-size: 1.08rem; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.rule {
  display: flex; align-items: center; gap: 12px;
  color: var(--gold-dim);
  font-family: var(--pixel); font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  -webkit-font-smoothing: none;
}
.rule::before, .rule::after { content: ""; flex: 0 0 28px; height: 1px; background: currentColor; }
.section-head.center .rule::after { display: block; }
.section-head:not(.center) .rule::after { display: none; }

/* ------------------------------------------------------------------ classes */

.classes {
  position: relative;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(11, 9, 7, .7) 20%, rgba(11, 9, 7, .75) 80%, var(--ink) 100%),
    url(img/art/hall.webp) center / cover no-repeat;
}
.class-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}
@media (max-width: 900px) { .class-grid { grid-template-columns: 1fr; } }

.stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: url(img/art/courtyard.webp) center 80% / cover no-repeat;
}
.stage .vignette {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 50% 60%, transparent 45%, rgba(0, 0, 0, .6) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 30%);
  pointer-events: none;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.stage .gender {
  position: absolute; z-index: 2; left: 14px; bottom: 14px;
  display: flex; gap: 0;
  border: 1px solid var(--border);
  background: rgba(6, 4, 2, .8);
}
.stage .gender button {
  font: 12px var(--pixel); letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); background: transparent; border: 0; padding: 7px 12px; cursor: pointer;
  -webkit-font-smoothing: none;
}
.stage .gender button[aria-pressed="true"] { background: var(--row-alt); color: var(--gold-hi); }
.stage .caption {
  position: absolute; z-index: 2; right: 14px; bottom: 14px;
  font: 11px var(--pixel); color: rgba(239, 228, 207, .7); letter-spacing: .08em; text-transform: uppercase;
  -webkit-font-smoothing: none; text-shadow: 0 1px 2px #000;
}

.class-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.class-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px 10px;
  background: linear-gradient(180deg, #1a130a, #0b0705);
  border: 0; border-right: 1px solid var(--line-faint);
  color: var(--gold-dim);
  font-family: var(--display); font-weight: 700; font-size: .92rem; letter-spacing: .06em;
  cursor: pointer; transition: color .15s, background .15s;
}
.class-tabs button:last-child { border-right: 0; }
.class-tabs button svg { width: 26px; height: 26px; fill: currentColor; }
.class-tabs button:hover { color: var(--gold); }
.class-tabs button[aria-selected="true"] {
  color: var(--gold-hi);
  background: linear-gradient(180deg, #3a2c14, #16100a);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.class-info { display: grid; gap: 16px; }
.class-info .role { font: 13px var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--spell-key); -webkit-font-smoothing: none; }
.class-info p { color: var(--text-dim); }
.meters { display: grid; gap: 8px; }
.meter { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 12px; }
.meter span { font: 12px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); -webkit-font-smoothing: none; }
.meter i {
  display: block; height: 10px;
  background: #050302; border: 1px solid #3a2f1c;
  position: relative; overflow: hidden;
}
.meter i::after {
  content: ""; position: absolute; inset: 0; right: auto;
  width: var(--v, 50%);
  background: linear-gradient(180deg, #f1d894, var(--gold) 50%, #7d5a22);
  transition: width .6s var(--ease);
}
.spells { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  background: var(--row);
  font: 12px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--text);
  -webkit-font-smoothing: none;
}

/* ------------------------------------------------------------------ screenshots */

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--window);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 3px rgba(6, 4, 2, .95), 0 12px 32px rgba(0, 0, 0, .45);
}
.shot > button {
  display: block; padding: 4px; margin: 0; border: 0; background: none; cursor: zoom-in;
  position: relative; overflow: hidden;
}
.shot img {
  width: 100%; height: auto;
  image-rendering: auto;
  transition: transform .5s var(--ease), filter .3s;
}
.shot > button:hover img { transform: scale(1.025); filter: brightness(1.08); }
.shot figcaption {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line-faint);
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.shot figcaption b { color: var(--gold); font-weight: 600; }
.shot.pixelated img { image-rendering: pixelated; }

.gallery {
  columns: 3 300px;
  column-gap: 18px;
}
.gallery .shot { break-inside: avoid; margin-bottom: 18px; }

/* A picture that does not exist yet, drawn as an empty client window. */
.placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  padding: 20px;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(198, 166, 99, .04) 0 10px, transparent 10px 20px),
    var(--header);
  color: var(--text-faint);
  border: 1px dashed var(--border);
}
.placeholder b { font: 13px var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dim); -webkit-font-smoothing: none; }
.placeholder small { font-size: .85rem; max-width: 28em; }

/* ------------------------------------------------------------------ HUD tour */

.tour { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .tour { grid-template-columns: 1fr; } }
.tour-screen { position: relative; padding: 4px; }
.tour-screen img { width: 100%; height: auto; }
.hotspot {
  position: absolute;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid var(--gold-hi);
  background: rgba(16, 8, 8, .75);
  color: var(--gold-hi);
  font: 12px/22px var(--pixel);
  text-align: center;
  cursor: pointer;
  padding: 0;
  -webkit-font-smoothing: none;
  box-shadow: 0 0 0 0 rgba(244, 220, 156, .6);
  animation: pulse 2.4s ease-out infinite;
}
.hotspot[aria-pressed="true"] { background: var(--gold); color: #1a1206; animation: none; box-shadow: 0 0 0 4px rgba(244, 220, 156, .25); }
.hotspot-box {
  position: absolute;
  border: 1px solid var(--gold-hi);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45), 0 0 18px rgba(244, 220, 156, .35);
  pointer-events: none;
  transition: all .35s var(--ease);
  opacity: 0;
}
.hotspot-box.on { opacity: 1; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 220, 156, .55); }
  70% { box-shadow: 0 0 0 12px rgba(244, 220, 156, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 220, 156, 0); }
}
.tour-list { list-style: none; margin: 0; padding: 0; display: grid; }
.tour-list li button {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  width: 100%; text-align: left; padding: 10px 14px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-faint);
  color: var(--text-dim); font: inherit; font-size: .95rem; cursor: pointer;
}
.tour-list li:nth-child(odd) button { background: rgba(198, 166, 99, .03); }
.tour-list li button:hover { background: rgba(198, 166, 99, .08); }
.tour-list li button[aria-pressed="true"] { background: var(--row-alt); color: var(--text); }
.tour-list .n {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold);
  font: 12px/20px var(--pixel); text-align: center; -webkit-font-smoothing: none;
}
.tour-list b { display: block; color: var(--gold); font-family: var(--display); font-size: .98rem; letter-spacing: .03em; }

/* ------------------------------------------------------------------ feature cards */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column;
  background: var(--window);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 3px rgba(6, 4, 2, .95), inset 0 0 0 4px var(--line-faint);
  color: var(--text);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
a.card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--text); box-shadow: inset 0 0 0 3px rgba(6, 4, 2, .95), inset 0 0 0 4px var(--line), 0 14px 30px rgba(0, 0, 0, .5); }
.card .thumb { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); margin: 4px 4px 0; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transition: transform .6s var(--ease); }
a.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.card .body p { color: var(--text-dim); font-size: .95rem; }
.card .more { font: 12px var(--pixel); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dim); margin-top: 4px; -webkit-font-smoothing: none; }
a.card:hover .more { color: var(--gold-hi); }

/* ------------------------------------------------------------------ news */

.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.news article { display: grid; gap: 10px; align-content: start; }
.news .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tag {
  font: 11px var(--pixel); letter-spacing: .12em; text-transform: uppercase; -webkit-font-smoothing: none;
  padding: 2px 8px; border: 1px solid currentColor;
}
.tag.patch { color: var(--spell-key); }
.tag.event { color: #b18cf0; }
.tag.dev { color: var(--gold); }
.news time { font: 12px var(--pixel); color: var(--text-faint); letter-spacing: .06em; -webkit-font-smoothing: none; }
.news p { color: var(--text-dim); }
.sample-note { font: 12px var(--pixel); color: var(--wait); letter-spacing: .06em; text-transform: uppercase; -webkit-font-smoothing: none; }

/* ------------------------------------------------------------------ download */

.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.dl { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 22px; text-align: center; }
.dl svg { width: 44px; height: 44px; fill: var(--gold); margin-bottom: 6px; }
.dl .note { color: var(--text-dim); font-size: .9rem; min-height: 1.5em; margin-bottom: 14px; }
.dl .btn { width: 100%; margin-top: auto; }
.dl.is-yours { border-color: var(--gold); box-shadow: inset 0 0 0 3px rgba(6, 4, 2, .95), inset 0 0 0 4px var(--line), 0 0 34px rgba(198, 166, 99, .18); }
.dl .yours { font: 11px var(--pixel); color: var(--spell-key); letter-spacing: .12em; text-transform: uppercase; -webkit-font-smoothing: none; visibility: hidden; }
.dl.is-yours .yours { visibility: visible; }
.status-line {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px; padding: 8px 14px;
  border: 1px solid var(--border); background: rgba(6, 4, 2, .7);
  font: 12px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
  -webkit-font-smoothing: none;
}
.status-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--wait); box-shadow: 0 0 8px var(--wait); }

/* ------------------------------------------------------------------ footer */

/* Built by js/footer.js on every page: the game in a line, the site map,
   then the small print. */
.site-foot { border-top: 1px solid var(--border); background: var(--header); padding-block: clamp(36px, 5vw, 56px) 22px; }
.site-foot .wrap { display: grid; gap: 34px; }
.site-foot-top { display: grid; gap: 40px; grid-template-columns: minmax(220px, 1.2fr) 3fr; align-items: start; }
.site-foot-about { display: grid; gap: 14px; justify-items: start; }
.site-foot-about .brand { display: inline-flex; align-items: center; gap: 10px; }
.site-foot-about p { margin: 0; color: var(--text-dim); font-size: .95rem; max-width: 30em; }
.site-foot-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.site-foot-map { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.site-foot-col h2 {
  margin: 0 0 12px; font: 12px var(--pixel); letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); -webkit-font-smoothing: none;
}
.site-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-foot-col a { color: var(--text-dim); text-decoration: none; font-size: .95rem; }
.site-foot-col a:hover { color: var(--gold-hi); }
.site-foot-col a[aria-current="page"] { color: var(--text); }
.site-foot-bottom {
  display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--line-faint);
}
.site-foot-bottom p { margin: 0; color: var(--text-faint); font-size: .86rem; max-width: 60em; }
.site-foot-bottom a { color: var(--text-dim); }
.site-foot-up { font: 12px var(--pixel); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; -webkit-font-smoothing: none; }
.site-foot-up:hover { color: var(--gold-hi); }
@media (max-width: 760px) {
  .site-foot-top { grid-template-columns: 1fr; gap: 30px; }
  .site-foot-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ guide */

.guide-head {
  position: relative;
  border-bottom: 1px solid var(--border);
  background:
    /* Dark under the words on the left, clearing towards the figure on the right. */
    linear-gradient(90deg, rgba(11, 9, 7, .95) 0%, rgba(11, 9, 7, .88) 32%, rgba(11, 9, 7, .45) 56%,
                    rgba(11, 9, 7, .12) 80%, rgba(11, 9, 7, .08) 100%),
    url(img/art/addons.webp) 65% 18% / cover no-repeat;
}
/* On a wide screen the picture is sized off the window so the figure's face
   (47% across the painting) lands just past the words, wherever the centred
   column puts them: 0.47 x size = 50vw - 590px + 48px gutter + 720px of text. */
@media (min-width: 1000px) {
  .guide-head { background-size: auto, calc(106.4vw + 379px) auto; background-position: 0 0, 0 14%; }
  .guide-head p { max-width: 36em; }
}
.guide-head .wrap { padding-block: clamp(44px, 7vw, 80px); display: grid; gap: 12px; }
.guide-head p { max-width: 40em; color: var(--text-dim); font-size: 1.08rem; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

.guide { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); padding-block: 36px 90px; }
@media (max-width: 980px) { .guide { grid-template-columns: 1fr; } }

/* Held beside the chapters while they scroll. Sized to fit a screen; on one too
   short it still scrolls by wheel or touch, but with no bar - a browser's grey
   scrollbar down a gilt frame - and guide.js keeps the lit chapter in view. */
.g-nav {
  position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px);
  overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
}
.g-nav::-webkit-scrollbar { display: none; }
@media (max-width: 980px) { .g-nav { position: static; max-height: none; } }
.g-nav .win-body { padding: 10px; }
.g-search {
  width: 100%; padding: 8px 10px; margin-bottom: 10px;
  background: #050302; border: 1px solid var(--border); color: var(--text);
  font: 13px var(--pixel); letter-spacing: .04em; -webkit-font-smoothing: none;
}
.g-search::placeholder { color: var(--text-faint); text-transform: uppercase; }
.g-search:focus { outline: none; border-color: var(--gold); }
.g-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; counter-reset: ch; }
/* The client's menu buttons (menu.lua): a bronze bar, gold words, lit when chosen. */
.g-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #2a2010, #120c06);
  border: 1px solid #4a3d24;
  color: var(--gold);
  font: 12px var(--pixel); letter-spacing: .08em; text-transform: uppercase;
  -webkit-font-smoothing: none;
  counter-increment: ch;
}
.g-nav a::before { content: counter(ch, decimal-leading-zero); color: var(--gold-dim); font-variant-numeric: tabular-nums; }
.g-nav a:hover { border-color: var(--gold); color: var(--gold-hi); }
.g-nav a.here { background: linear-gradient(180deg, #4a3818, #1f160b); border-color: var(--gold); color: var(--gold-hi); }
.g-nav li[hidden] { display: none; }

.g-body { display: grid; gap: 34px; min-width: 0; }
.chapter { scroll-margin-top: 80px; }
.chapter > .win-title { justify-content: flex-start; padding-left: 18px; font-size: 14px; }
.chapter .win-body { display: grid; gap: 22px; }
.chapter h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.chapter h4 { color: var(--gold); margin-top: 6px; }
.chapter p, .chapter li { color: var(--text-dim); max-width: 68ch; }
.chapter p strong, .chapter li strong { color: var(--text); font-weight: 600; }
.chapter ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.chapter ul li::marker { color: var(--gold-dim); }
.intro { font-size: 1.1rem; color: var(--text) !important; }

/* The addon guide (addons/guide/): its title, code, pictures and downloads. */
.guide-title { font-family: var(--display); color: var(--gold); letter-spacing: .06em; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.hero-actions.left { justify-content: flex-start; margin-top: 14px; }
.chapter code, .chapter li code, .chapter td code {
  font: .92em ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color: var(--gold-hi); background: rgba(0, 0, 0, .35); padding: 1px 4px; border: 1px solid rgba(198, 166, 99, .14);
  overflow-wrap: anywhere;
}
.chapter td:first-child { white-space: normal; }
.chapter td:first-child code { overflow-wrap: normal; }
pre.guide-code {
  position: relative; margin: 0; max-width: 100%;
  background: #050302; border: 1px solid var(--border); border-left: 3px solid var(--gold-lo);
  padding: 14px 16px; overflow-x: auto;
  font: 13.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color: var(--text); tab-size: 2;
}
pre.guide-code code { font: inherit; color: inherit; background: none; border: 0; padding: 0; overflow-wrap: normal; }
pre.guide-code .k { color: var(--gold); }
pre.guide-code .s { color: #a9d67a; }
pre.guide-code .c { color: var(--text-faint); font-style: italic; }
pre.guide-code .n { color: var(--spell-key); }
pre.guide-code .g { color: #e9b95a; }
pre.guide-code .h { color: var(--gold-hi); }
.code-copy {
  position: absolute; top: 6px; right: 6px;
  background: #140f09; color: var(--gold-dim); border: 1px solid #3a3020;
  font: 11px var(--pixel); letter-spacing: .1em; text-transform: uppercase; -webkit-font-smoothing: none;
  padding: 4px 8px; cursor: pointer; opacity: 0; transition: opacity .15s;
}
pre.guide-code:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
@media (hover: none) { .code-copy { opacity: 1; } }
.code-copy:hover { color: var(--gold-hi); border-color: var(--gold); }
.guide-shot { margin: 0; display: grid; gap: 6px; justify-items: start; }
.guide-shot img {
  max-width: 100%; height: auto; image-rendering: pixelated;
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.guide-shot figcaption { color: var(--text-faint); font-size: .9rem; }
.cards.examples .card { padding: 16px 18px; gap: 6px; }
.cards.examples .card b { color: var(--gold); font-family: var(--display); letter-spacing: .03em; }
.cards.examples .card span { color: var(--text-dim); font-size: .95rem; }
.cards.examples .card small { color: var(--text-faint); font: 11px var(--pixel); letter-spacing: .06em; -webkit-font-smoothing: none; margin-top: auto; padding-top: 6px; }
.chapter[hidden] { display: none; }
.playing-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* The player's guide (guide/): the list of its pages above this page's own
   sections, pictures of a window set side by side, and the way on at the foot. */
.guide-head.player {
  background-image:
    linear-gradient(90deg, rgba(11, 9, 7, .95) 0%, rgba(11, 9, 7, .88) 32%, rgba(11, 9, 7, .45) 56%,
                    rgba(11, 9, 7, .12) 80%, rgba(11, 9, 7, .08) 100%),
    url(img/art/guide.webp);
}
.g-nav h2 {
  margin: 12px 2px 6px; color: var(--gold-dim);
  font: 11px var(--pixel); letter-spacing: .12em; text-transform: uppercase; -webkit-font-smoothing: none;
}
.g-nav h2:first-child { margin-top: 0; }
.g-nav ol[data-pages] a, .g-nav ol[data-content-pages] a { font-size: 11px; padding: 4px 10px; }
.shots { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.shots .guide-shot { flex: 0 0 auto; max-width: 100%; }
/* portal.css caps `.shots img` at 320px for the addon pages; a guide picture is drawn 1:1. */
.shots .guide-shot img { width: auto; max-width: 100%; }
/* The picture sets the width; the caption wraps under it rather than widening it. */
.shots .guide-shot figcaption { width: 0; min-width: 100%; }
.g-turn { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cards.contents .card { padding: 16px 18px; gap: 6px; }
.cards.contents .card small { color: var(--gold-dim); font: 12px var(--pixel); letter-spacing: .1em; -webkit-font-smoothing: none; }
.cards.contents .card b { color: var(--gold); font-family: var(--display); font-size: 1.15rem; letter-spacing: .03em; }
.cards.contents .card span { color: var(--text-dim); font-size: .95rem; }

/* The skill pages (guide/skills.html and guide/skills/, written by skillguide):
   a skill's icon by its name, its picture on black beside its facts, the
   level table, and the cards on the chapter page. */
.skill-title { display: flex; align-items: center; gap: 16px; }
.skill-title img { flex: none; image-rendering: pixelated; border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.skill-top { display: grid; gap: 22px; justify-items: start; }
.skill-top > .table-wrap { width: 100%; }
.skill-film { margin: 0; display: grid; gap: 6px; justify-items: start; max-width: 100%; }
.skill-film img {
  display: block; max-width: 100%; height: auto; background: #000;
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.skill-film figcaption { color: var(--text-faint); font-size: .9rem; width: 0; min-width: 100%; }
.skill-film-empty {
  width: 480px; max-width: 100%; aspect-ratio: 3 / 2; display: grid; place-items: center;
  background: #000; border: 1px solid var(--border); color: var(--text-faint);
  font: 12px var(--pixel); letter-spacing: .1em; text-transform: uppercase; -webkit-font-smoothing: none;
}
.skill-facts th { width: 1%; white-space: nowrap; border-bottom: 0; border-top: 1px solid rgba(198, 166, 99, .08); }
.skill-facts td:first-child { white-space: normal; }
.skill-facts td { color: var(--text); }
.skill-levels tr.named td { background: rgba(198, 166, 99, .1); }
.skill-levels b { color: var(--gold-hi); }
.new-on-bar {
  margin-left: 8px; color: var(--spell-key); white-space: nowrap;
  font: 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; -webkit-font-smoothing: none;
}
.g-nav ol.skill-list a { font-size: 11px; padding: 4px 10px; }
/* A skill's book level where a chapter's number would be. */
.g-nav ol.skill-list a::before { content: attr(data-lv); min-width: 2ch; text-align: right; }
/* On a phone the class's list would push the skill itself forty rows down; the
   way round is the breadcrumb, the chapter page and the arrows at the foot. */
@media (max-width: 980px) { .g-nav ol.skill-list, .g-nav .skill-list-head { display: none; } }
.skill-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.skill-card {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center;
  padding: 7px 12px 7px 7px;
  background: linear-gradient(180deg, #1f170c, #0e0a05); border: 1px solid #4a3d24; color: var(--text);
  transition: border-color .15s, transform .15s var(--ease);
}
.skill-card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.skill-card img, .skill-card .no-icon { grid-row: span 2; width: 36px; height: 36px; image-rendering: pixelated; background: #000; }
.skill-card b { color: var(--gold); font-family: var(--display); letter-spacing: .03em; line-height: 1.2; }
.skill-card small { color: var(--text-faint); font-size: .85rem; }
.skill-card[hidden], .part[hidden] { display: none; }

/* The equipment pages (guide/weapons.html and armours.html, written by
   itemguide): one item a row - its picture from the game on the left, its
   name in its rarity's colour (ui/lib/theme.lua's rarity_colours) and its
   stats on the right. A picture is drawn at its own size: it is the game's
   art, not pixel art that scales cleanly. A weapon is its bag picture; a suit
   of armour is worn, glow and all, cut to a box the height of the character
   window's portrait and centred on black in a cell as tall as its row. The
   cell clips too, so a glow can never spill over the stats. */
.gear-cards { display: grid; gap: 14px; }
.gear-jump { display: flex; flex-wrap: wrap; gap: 10px; }
.gear-card {
  display: grid; grid-template-columns: 120px minmax(0, 1fr);
  background: linear-gradient(180deg, #1f170c, #0e0a05); border: 1px solid #4a3d24;
}
.gear-card.figure { grid-template-columns: 210px minmax(0, 1fr); }
.gear-card[hidden] { display: none; }
.gear-art { display: grid; place-items: center; padding: 12px 8px; background: #000; border-right: 1px solid #2a2114; }
.gear-art img { display: block; max-width: 100%; height: auto; }
.gear-card.figure .gear-art { padding: 0; width: 210px; overflow: hidden; }
.gear-body { padding: 14px 18px; display: grid; gap: 6px; align-content: start; }
@media (max-width: 520px) { .gear-card { grid-template-columns: 84px minmax(0, 1fr); } .gear-body { padding: 12px; } }
/* No room beside a suit on a phone: the suit over its stats. */
@media (max-width: 640px) {
  .gear-card.figure { grid-template-columns: minmax(0, 1fr); }
  .gear-card.figure .gear-art { width: 100%; place-items: center; border-right: 0; border-bottom: 1px solid #2a2114; }
}
.gear-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gear-body h3 { margin: 0; font-family: var(--display); font-size: 1.1rem; letter-spacing: .03em; line-height: 1.25; color: #fff; }
.gear-level { flex: none; color: var(--gold); font-variant-numeric: tabular-nums; }
.gear-who { margin: 0; color: var(--text-faint); font-size: .9rem; }
.gear-stats { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 4px 0; }
.gear-stats th, .gear-stats td { padding: 5px 12px; border-top: 1px solid rgba(198, 166, 99, .08); text-align: left; font-weight: 400; }
.gear-stats th { color: var(--text-dim); }
.gear-stats td { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.gear-stats tr.sub th { padding-left: 28px; }
.gear-stats tr.sub th::before { content: "\2514\00a0"; color: var(--gold-dim); }
.gear-foot { margin: 0; color: var(--text-faint); font-size: .85rem; }
/* A weapon's or shield's better grades under its stats: the grade in its colour and the
   level it needs, then only the lines that are not the common one's. */
.gear-tiers { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 2px 0 4px; }
.gear-tiers th, .gear-tiers td { padding: 5px 12px; border-top: 1px solid rgba(198, 166, 99, .14); text-align: left; font-weight: 400; vertical-align: top; }
.gear-tiers th { white-space: nowrap; }
.gear-tiers th .gear-level { margin-left: 8px; font-size: .85rem; }
.gear-tiers td { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
/* A set (guide/sets.html): its pieces' pictures down the left, wrapping into
   two columns when there are many, and its bonus as a table whose rows for
   some classes only sit under a heading of those classes. */
.gear-card.set { grid-template-columns: 150px minmax(0, 1fr); }
.set-pieces { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10px 14px; }
.set-pieces img { max-height: 120px; width: auto; }
.set-list { margin: 2px 0 6px; padding-left: 18px; display: grid; gap: 2px; }
.set-list a { color: var(--gold); }
.set-bonus-head { margin: 6px 0 0; color: var(--gold-dim); font: 11px var(--pixel); letter-spacing: .1em; text-transform: uppercase; -webkit-font-smoothing: none; }
.set-stats thead td { color: var(--text-faint); font-size: .8rem; }
.set-stats tr.who th { color: var(--gold); padding-top: 10px; }
/* The tooltip's own colours: how long it lasts in cyan, a warning in red. */
.gear-note { margin: 0; color: #5fd0d8; font-size: .9rem; }
.gear-note.warn { color: #e07b6f; }
.r-superior h3, .r-superior .grade { color: #98fb98; }
.r-elite h3, .r-elite .grade { color: #9370db; }
.r-trash h3, .r-trash .grade { color: #808080; }
.r-rare h3, .r-rare .grade { color: #5082ff; }
.r-legendary h3, .r-legendary .grade { color: #e84838; }

.part { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-faint); }
.part:first-of-type { border-top: 0; padding-top: 0; }
.part-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* A real sequence: the steps a player takes, in order. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: st; max-width: 68ch; }
/* The number sits in the padding, not in a grid column: as a grid, every bold
   word or key in a step became its own cell and the text after it wrapped into
   the 30px number column, one word per line. */
.steps li { position: relative; padding-left: 42px; min-height: 28px; counter-increment: st; }
.steps li::before {
  content: counter(st);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; margin-top: 1px;
  display: grid; place-items: center;
  border: 1px solid var(--gold); color: var(--gold-hi); background: var(--row);
  font: 12px var(--pixel); -webkit-font-smoothing: none;
}

.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pair.wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 760px) { .pair, .pair.wide-left, .trio { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); background: var(--header); max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th {
  text-align: left; padding: 8px 12px;
  background: var(--header); color: var(--gold);
  font: 12px var(--pixel); letter-spacing: .1em; text-transform: uppercase; -webkit-font-smoothing: none;
  border-bottom: 1px solid var(--border);
}
td { padding: 8px 12px; color: var(--text-dim); border-top: 1px solid rgba(198, 166, 99, .08); vertical-align: top; }
tr:nth-child(even) td { background: rgba(0, 0, 0, .28); }
tr:nth-child(odd) td { background: rgba(199, 166, 99, .04); }
td:first-child { color: var(--text); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* A key as the client draws a bound spell's key: aquamarine on black. */
kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 6px;
  border: 1px solid #4a3d24;
  border-bottom-width: 2px;
  background: #050302;
  color: var(--spell-key);
  font: 12px/1.6 var(--pixel);
  text-align: center;
  letter-spacing: .04em;
  -webkit-font-smoothing: none;
  white-space: nowrap;
}

.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 2px 9px;
  font: 11px var(--pixel); letter-spacing: .1em; text-transform: uppercase; -webkit-font-smoothing: none;
  border: 1px solid currentColor; white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.live { color: var(--live); }
.status.new { color: var(--wait); }
.status.soon { color: var(--blocked); }

.callout {
  display: grid; gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: rgba(40, 33, 14, .35);
  max-width: 72ch;
}
.callout.warn { border-left-color: var(--blocked); }
.callout b { color: var(--gold); font-family: var(--display); letter-spacing: .03em; }
.callout p { color: var(--text-dim); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 6px; border: 1px solid var(--border); background: #050302;
  font: 12px var(--pixel); letter-spacing: .06em; -webkit-font-smoothing: none;
}
.swatch i { width: 14px; height: 14px; background: currentColor; border: 1px solid rgba(0, 0, 0, .6); }

/* Floating combat numbers over a screenshot: the addon, as a demonstration. */
.fct { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fct span {
  position: absolute;
  font: 16px var(--pixel); font-weight: 700;
  -webkit-font-smoothing: none;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  animation: rise 1.4s ease-out forwards;
}
@keyframes rise {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  12% { transform: translateY(-6px) scale(1.15); opacity: 1; }
  100% { transform: translateY(-54px) scale(1); opacity: 0; }
}

/* ------------------------------------------------------------------ lightbox */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 24px 16px;
  background: rgba(3, 2, 1, .92);
  backdrop-filter: blur(4px);
  animation: fade .2s ease-out;
}
.lightbox figure { margin: 0; max-width: min(1200px, 100%); max-height: 100%; display: grid; gap: 10px; }
.lightbox img { max-height: calc(100vh - 140px); width: auto; margin: 0 auto; border: 1px solid var(--border); box-shadow: 0 30px 80px #000; }
.lightbox figcaption { text-align: center; color: var(--text-dim); max-width: 60em; margin: 0 auto; }
.lightbox .close { position: absolute; top: 16px; right: 16px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ views and entrances */

[data-view] { display: none; }
[data-view].shown { display: block; }

.reveal { animation: rise-in .8s var(--ease) both; }
@keyframes rise-in { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
