/* ---------- font: Linux Libertine (self-hosted as Libertinus Serif) ---------- */

@font-face {
  font-family: "Libertine";
  src: local("Linux Libertine O"), local("Libertinus Serif"),
       url("/static/fonts/LibertinusSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Libertine";
  src: local("Linux Libertine O Semibold"), local("Libertinus Serif Semibold"),
       url("/static/fonts/LibertinusSerif-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Libertine";
  src: local("Linux Libertine O Italic"), local("Libertinus Serif Italic"),
       url("/static/fonts/LibertinusSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- base ---------- */

:root {
  /* palette comes from gw2ceo/custom_colors.py, served as /theme.css */
  /* the three theme roles (theme.css): default phthalo blue / ruby red /
     aureus, one palette per profession once one is chosen */
  --gold: var(--theme-bright, var(--aureus, #c8aa6e));
  --accent: var(--theme-mid, var(--ruby-red, #c02f2f));
  --bg: color-mix(in srgb, var(--theme-dark, #001c67) var(--alpha-soft, 30%), var(--shadow-abyss, #000));
  --bg-glow: color-mix(in srgb, var(--theme-glow, var(--theme-dark, #001c67)) var(--glow-mix, var(--alpha-strong, 70%)), var(--shadow-abyss, #000));
  /* cards and borders: a neutral dark slate with a hint of the theme */
  --bg-card: color-mix(in srgb, var(--theme-dark, #001c67) 35%, #12141c);
  --border: color-mix(in srgb, var(--theme-mid, #28304a) var(--alpha-soft, 30%), #262b3a);
  transition: background .3s ease;
  --text: #e8e4da;
  --text-dim: #9a958a;
}

* { box-sizing: border-box; }

/* the page colour reaches every edge: the html element carries it (phones
   paint it behind the status bar and when over-scrolling), dark form
   controls and scrollbars, and content stays clear of notches */
html { background-color: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% -20%, var(--bg-glow) 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--text);
  font-family: "Libertine", "Linux Libertine", Georgia, serif;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}

.hidden { display: none !important; }

/* legal notice link at the foot of every page (and inside the optimizer's picker) */
.contact-line {
  max-width: 62ch;
  margin: 44px auto 0;
  color: var(--text-dim);
  line-height: 1.55;
}
.contact-line a { color: var(--gold); text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

.site-footer, .picker-footer {
  max-width: 1100px;
  margin: 48px auto 24px;
  text-align: center;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.picker-footer { margin-top: 40px; }
.site-footer a, .picker-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover, .picker-footer a:hover { color: var(--gold); }

button { font: inherit; cursor: pointer; }

a.ghost-button { text-decoration: none; }
.ghost-button {
  background: none;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  transition: color .15s, border-color .15s;
}
.ghost-button:hover { color: var(--text); border-color: var(--gold); }

/* ---------- selection overlay ("the popup") ---------- */

.overlay {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  background: radial-gradient(ellipse at 50% -20%, var(--bg-glow) 0%, var(--bg) 70%);
  padding: 40px 16px 60px;
  animation: overlay-in .35s ease;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.overlay.closing { animation: overlay-out .3s ease forwards; }
@keyframes overlay-out {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .overlay { animation: none; }
  .overlay.closing { animation-duration: .01s; }
  .prof-char, .spec-tile, .prof-char .name { transition: none; }
}

.picker { max-width: 1500px; width: 100%; margin: auto; text-align: center; }

.brand {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: .05em;
  margin: 0 0 4px;
  color: var(--gold);
  font-variant: small-caps;     /* Libertine ships real small caps */
  font-weight: 400;
}
.brand .versal {                /* enlarged initials, like a chapter opening */
  font-size: 1.45em;
  line-height: 0;
}
.tagline { color: var(--text-dim); margin: 0 0 36px; }
.question {
  font-weight: 500;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: .04em;
  margin: 0 0 28px;
}

/* ---------- profession lineup (one continuous image, like the GW2 poster) ---------- */

.prof-lineup {
  display: flex;
  justify-content: center;
  align-items: flex-end;      /* everyone stands on the same ground line */
  position: relative;
  padding-bottom: 46px;       /* room for the name label */
}
.prof-char {
  background: none;
  border: none;
  padding: 0;
  position: relative;
  min-width: 0;               /* let the whole lineup shrink proportionally */
  flex: 0 1 auto;
  margin-inline: -2%;         /* characters overlap into one composition */
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .55));
  transition: transform .2s ease, filter .25s ease;
}
/* the Thief's cape runs solid to its right edge, the Guardian is the
   narrowest cut-out and the Revenant's banner starts at its left edge: no
   overlap on the two seams around the Guardian */
.prof-char[data-profession="Thief"] { margin-right: .5%; }
.prof-char[data-profession="Guardian"] { margin-left: 0; margin-right: .5%; }
.prof-char[data-profession="Revenant"] { margin-left: 0; }
.prof-char img {
  display: block;
  height: clamp(220px, 50vh, 520px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;    /* keep everyone's feet on the ground line */
}
.prof-char .name {
  position: absolute;
  left: 50%;
  bottom: -38px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

/* the hovered character steps forward, the rest recede into the painting */
.prof-lineup:has(.prof-char:hover, .prof-char:focus-visible)
  .prof-char:not(:hover):not(:focus-visible) {
  filter: brightness(.55) saturate(.75) drop-shadow(0 14px 22px rgba(0, 0, 0, .55));
}
.prof-char:hover, .prof-char:focus-visible {
  transform: translateY(-12px) scale(1.05);
  z-index: 2;
  outline: none;
}
.prof-char:hover .name, .prof-char:focus-visible .name { opacity: 1; }

@media (max-width: 1000px) {                 /* mobile: 3x3, still borderless */
  .prof-lineup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 6px; padding-bottom: 0; }
  .prof-char { margin-inline: 0; }
  .prof-char img { height: auto; width: 100%; max-height: 30vh; object-fit: contain; }
  .prof-char .name { position: static; transform: none; opacity: 1; display: block; margin-top: 6px; }
}

/* chat link import on the landing page */

.chatlink-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}
.chatlink-row input {
  width: min(420px, 70vw);
  background: color-mix(in srgb, var(--bg-card) var(--alpha-strong, 70%), transparent);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  padding: 8px 12px;
}
.chatlink-row input::placeholder { color: var(--text-dim); }
.chatlink-row input:focus { outline: none; border-color: var(--gold); }
.chatlink-error { color: var(--accent); font-size: .9rem; margin-top: 10px; }

/* ---------- the chosen profession's introduction (spec picker) ---------- */

.prof-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto 30px;
  text-align: left;
}
.prof-intro img {
  height: clamp(180px, 28vh, 260px);
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .55));
}
.prof-intro-text { min-width: 0; }
.prof-intro-text .brand { margin: 0 0 8px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.prof-intro-text p { margin: 0; color: var(--text); font-size: 1.02rem; line-height: 1.55; max-width: 60ch; }
.prof-intro-text .credit { display: block; margin-top: 8px; color: var(--text-dim); font-size: .78rem; letter-spacing: .04em; }
@media (max-width: 700px) {
  .prof-intro { flex-direction: column; text-align: center; gap: 14px; }
  .prof-intro-text p { max-width: none; }
}

/* ---------- specialization grid ---------- */

.back { position: absolute; left: 0; top: 0; text-decoration: none; }
#spec-picker { position: relative; padding-top: 56px; }
#profession-picker { position: relative; padding-top: 44px; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.spec-tile {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.spec-tile:hover, .spec-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) var(--alpha-soft, 30%), transparent);
  outline: none;
}
.spec-tile .art {
  display: block;
  width: 100%;
  height: 88px;       /* fixed banner-strip height: aspect-ratio + flex min-sizing
                         inflates the box around tall images in some engines */
  min-height: 0;
  padding: 6px;       /* breathing room so the art doesn't touch the edges */
}
.spec-tile .art img {
  width: 100%;
  height: 100%;
  /* cover: every banner fills the strip; the older (taller) banners lose a
     little splash-fade top and bottom, the wide ones a little of the right
     tail - the character always sits on the left and stays safe */
  object-fit: cover;
  object-position: left center;
}
.spec-tile .art.core-art {         /* core has no banner: an emblem card instead */
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 50%, var(--bg-glow) 0%,
              color-mix(in srgb, var(--theme-dark, #001c67) 15%, var(--shadow-abyss, #000)) 78%);
}
.spec-tile .art.core-art img {
  width: auto;
  height: 64px;       /* explicit: a percentage would fall back to the image's
                         intrinsic 200px during intrinsic sizing in some engines */
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gold) var(--alpha-mid, 50%), transparent));
}
.spec-tile .label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.spec-tile .label img { width: 38px; height: 38px; }
.spec-tile .label .name {
  font-size: 1.1rem;
  letter-spacing: .05em;
  color: var(--text);
}

/* ---------- app shell after selection ---------- */

/* ---------- the site header, shared by the optimizer and the builds pages ----------
   brand on the left (the optimizer adds its current selection), navigation
   links and the action buttons on the right */
.site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.site-left, .site-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.site-brand {
  color: var(--gold);
  text-decoration: none;
  font-variant: small-caps;
  letter-spacing: .05em;
  font-size: 1.25rem;
  white-space: nowrap;
}
.site-brand .versal { font-size: 1.35em; line-height: 0; }
.site-selection {                   /* the optimizer's chosen spec, beside the brand */
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  color: var(--text);
  letter-spacing: .03em;
  white-space: nowrap;
}
.topbar-icon { width: 30px; height: 30px; }
/* the navigation: the same buttons on every page (Optimizer, Builds, Home),
   styled like every other ghost button, the current page in gold */
.site-nav { display: flex; gap: 8px; }
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  letter-spacing: .02em;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: var(--text); border-color: var(--gold); }
.site-nav a.active {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) var(--alpha-soft, 30%), var(--border));
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
}
.picker-nav { position: absolute; right: 0; top: 0; }   /* on the optimizer's picker, where there is no bar */

.main { max-width: 1100px; margin: 20px auto; }

/* ---------- builder: traits + gear ---------- */

.builder {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px 18px;
}
.panel h2 {
  margin: 0 0 6px;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: .05em;
  color: var(--gold);
}
.hint { color: var(--text-dim); font-size: .88rem; margin: 0 0 14px; }

/* trait groups */

.trait-group { margin-bottom: 18px; }
.trait-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.trait-group-header img { width: 26px; height: 26px; }
.trait-group-header .name { letter-spacing: .05em; }

.trait {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.trait:hover { background: color-mix(in srgb, var(--border) var(--alpha-mid, 50%), transparent); }
.trait input {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  margin-top: 5px;
  flex-shrink: 0;
}
.trait img { width: 34px; height: 34px; margin-top: 1px; flex-shrink: 0; }
.trait-name { display: block; }
.trait-name .slot-tag {
  font-size: .72rem;
  color: var(--text-dim);
  font-style: italic;
  margin-left: 6px;
}
.trait-effects {
  display: block;
  font-size: .82rem;
  color: var(--text-dim);
}
.trait.disabled { opacity: var(--alpha-mid, 50%); cursor: not-allowed; }
.trait-condition {
  display: block;
  font-size: .8rem;
  color: var(--gold);
}

/* gear controls */

.control-row { margin-bottom: 16px; }
.control-label {
  display: block;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.segmented { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 8px 10px;
  font: inherit;
}
.segmented button.active {
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
  color: var(--gold);
}

.mini-button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 6px;
  font-size: .72rem;
  padding: 2px 8px;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: normal;
}
.mini-button:hover { color: var(--gold); border-color: var(--gold); }

.slot-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chip {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  padding: 6px 10px;
  font-size: .85rem;
}
.slot-chip.asc {
  border-color: var(--gold);
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
}

.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.check .check-note { color: var(--text-dim); font-size: .82rem; }
.check input[type="checkbox"] { accent-color: var(--gold); width: 15px; height: 15px; }
.check.might input[type="range"] { flex: 1; accent-color: var(--gold); }
.check.might output { min-width: 2ch; text-align: right; color: var(--gold); }

.cta {
  width: 100%;
  margin-top: 4px;
  background: color-mix(in srgb, var(--accent) var(--alpha-strong, 70%), black);
  border: 1px solid var(--accent);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: .08em;
  font-variant: small-caps;
  border-radius: 8px;
  padding: 10px;
  transition: background .15s ease;
}
.cta:hover { background: var(--accent); }
.cta:disabled { opacity: var(--alpha-strong, 70%); cursor: wait; }
.cta.busy::before {           /* loading circle while the optimizer runs */
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  vertical-align: -2px;
  border: 2px solid color-mix(in srgb, var(--text) 40%, transparent);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .cta.busy::before { animation: none; border-top-color: inherit; }
}

.slot-hint { margin: 8px 0 0; }

.build-warnings {
  border: 1px solid color-mix(in srgb, var(--gold) var(--alpha-strong, 70%), transparent);
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
  border-radius: 8px;
  padding: 4px 12px;
  margin-bottom: 12px;
  font-size: .88rem;
}
.build-warnings p { margin: 8px 0; }
.build-warnings p::before { content: "⚠ "; color: var(--gold); }

.calc-error {
  margin-top: 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: .9rem;
}

/* result card */

.result { margin-top: 14px; }
.result-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.result-tabs button {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 6px;
  color: var(--text-dim);
  font: inherit;
  font-size: .9rem;
}
.result-tabs button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
}
.result .ep {
  text-align: center;
  padding: 10px 0 14px;
}
.result .ep .value {
  font-size: 2.2rem;
  color: var(--gold);
  display: block;
  line-height: 1.1;
}
.result .ep .caption {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.result dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 0 0 12px;
}
.result dt { color: var(--text-dim); }
.result dd { margin: 0; text-align: right; color: var(--text); }
.result .stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.result .stats div { text-align: center; }
.result .stats .stat-value { display: block; color: var(--text); }
.result .stats .stat-name { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.result .warning { color: var(--gold); font-size: .85rem; margin-top: 10px; }
.result .cap-miss { color: var(--accent); }  /* missing the cap is the severe case */
.equipment-heading {
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: .05em;
  color: var(--gold);
  border-top: 1px solid var(--border);
  margin: 12px 0 8px;
  padding-top: 10px;
}
.copy-link {
  width: 100%;
  margin-top: 12px;
  overflow-wrap: anywhere;
}

/* ---------- optimizer mode bar (crit vs boon duration) ---------- */

.mode-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
}
.mode-bar .control-label { margin-bottom: 0; }
.mode-bar .segmented { flex: 1; max-width: 420px; }
@media (max-width: 600px) {           /* phones: the label above, the three modes across the full width */
  .mode-bar { flex-wrap: wrap; gap: 8px 14px; }
  .mode-bar .segmented { flex: 1 1 100%; max-width: none; }
  .segmented button { padding: 8px 6px; font-size: .92rem; min-width: 0; }
}

/* boon mode: ranking tabs above the best/backup tabs */
.rank-tabs { margin-bottom: 10px; }
.rank-note {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin: 2px 0 6px;
}

/* ---------- boon mode: healing-profile slider + skill picker ---------- */

.k-slider { width: 100%; accent-color: var(--gold); margin: 4px 0 2px; }
.k-readout {
  text-align: center;
  color: var(--gold);
  font-size: .95rem;
  margin-bottom: 4px;
}

.skill-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.skill-popup-inner {
  scrollbar-color: var(--border) transparent;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  width: min(620px, 94vw);
  max-height: 82vh;
  overflow-y: auto;
}
.skill-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.skill-popup-head h3 { margin: 0; font-weight: 500; color: var(--gold); }
.skill-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.skill-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  text-align: left;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.skill-row:hover { border-color: var(--gold); }
.skill-row .skill-name { font-size: .92rem; }
.skill-row .skill-k { color: var(--gold); font-size: .92rem; justify-self: end; }
.skill-row .skill-formula {
  grid-column: 1 / -1;
  color: var(--text-dim);
  font-size: .78rem;
}

/* ---------- per-trait assumptions: stack sliders + attunement chips ---------- */

.trait-options {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 10px 46px;
  font-size: .82rem;
  color: var(--text-dim);
}
.trait-options input[type="range"] {
  flex: 0 1 170px;
  accent-color: var(--gold);
}
.variant-chip {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--text-dim);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.variant-chip.active {
  border-color: var(--gold);
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) var(--alpha-faint, 10%), transparent);
}
