/* The nine views, Fresh Loot, PvP Corner and the player page. */

/* --- 9. the race banner: name, clock, road and the podium ------------------- */

/* The dashboard's one ornate frame (.frame-ornate): the race on the left, the
   podium on the right; stacked and centred on narrower screens. */
.hero {
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 3.4vw, 2.8rem) clamp(1.2rem, 2.4vw, 1.9rem);
  background:
    radial-gradient(70% 120% at 78% 0%, rgba(154, 123, 255, 0.24), transparent 65%),
    radial-gradient(50% 90% at 10% 110%, rgba(255, 138, 43, 0.1), transparent 70%),
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1rem, 3vw, 2.6rem);
  align-items: center;
}

.hero-info {
  min-width: 0;
}

@media (max-width: 1023.98px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
}

/* The competition's name (and the one game version of a strict race) as a
   small-caps line: the masthead already carries the brand. */
.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
}

@media (max-width: 1023.98px) {
  .hero-kicker {
    justify-content: center;
  }
}

.hero-name {
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--text-gold);
}

.hero-version {
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--panel-line-strong);
  background: rgba(8, 6, 12, 0.6);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gold-bright);
}

.hero-status {
  margin-top: var(--sp-3);
  font-size: var(--fs-lead);
  font-style: italic;
  color: var(--text-muted);
}

.countdown {
  margin-top: var(--sp-2);
  display: flex;
  gap: clamp(0.4rem, 1.2vw, 0.8rem);
}

@media (max-width: 1023.98px) {
  .countdown {
    justify-content: center;
  }
}

.clock-cell {
  flex: 0 1 5.6rem;
  min-width: 0;
  padding: 0.45rem 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid #8a6420;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 40%),
    linear-gradient(180deg, #17121e, #0b0910);
  box-shadow:
    0 0 0 1px var(--ink-line),
    inset 0 1px 0 rgba(255, 235, 180, 0.12),
    inset 0 -8px 14px rgba(0, 0, 0, 0.5),
    0 6px 14px rgba(0, 0, 0, 0.45);
}

.clock-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);
  line-height: 1.05;
  background: linear-gradient(180deg, var(--gold-text-top), var(--gold-text-mid) 55%, var(--gold-text-low));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 var(--ink-line));
}

.clock-label {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .countdown {
    gap: 0.35rem;
  }

  .clock-cell {
    padding-inline: 0.1rem;
  }

  .clock-label {
    letter-spacing: 0;
  }
}

.hero-road {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 30rem;
  margin-top: var(--sp-5);
}

@media (max-width: 1023.98px) {
  .hero-road {
    margin-inline: auto;
  }
}

.hero-road-end-label {
  flex: none;
  min-width: 1.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-text);
  font-weight: 700;
  color: var(--text-muted);
}

.hero-road-track {
  position: relative;
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #050307, #17121d);
  border: 2px solid #8a6420;
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 2px 4px rgba(0, 0, 0, 0.9);
}

.hero-road-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 50%, #8a6420);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.6);
  transition: width var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-road-gem {
  position: absolute;
  top: 50%;
  left: var(--p, 0%);
  width: 20px;
  height: 20px;
  translate: -50% -50%;
  rotate: 45deg;
  background: radial-gradient(circle at 35% 30%, #fffbe9, var(--gold) 60%, #8a6a1f);
  border: 2px solid var(--ink-line);
  box-shadow: 0 0 18px rgba(255, 220, 140, 0.95);
  transition: left var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-foot {
  margin-top: var(--sp-3);
  font-size: var(--fs-text);
  font-style: italic;
  line-height: 1.45;
  color: var(--text-muted);
}

.hero-winner {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--class-text);
}

/* --- ribbon: the race at a glance, one strip of four numbers ---------------- */

.ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 235, 180, 0.1), 0 22px 44px -22px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.ribbon-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 0.85rem;
  align-items: center;
  padding: 0.85rem clamp(0.8rem, 1.6vw, 1.3rem);
  background: radial-gradient(80% 120% at 0% 0%, rgba(212, 175, 55, 0.08), transparent 70%);
}

.ribbon-tile + .ribbon-tile {
  border-left: 1px solid var(--panel-rule);
}

.ribbon-tile .glyph {
  grid-row: 1 / 4;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.4rem;
  border-radius: 50%;
  border: 1px solid var(--panel-line-strong);
  background: radial-gradient(circle at 35% 28%, rgba(212, 175, 55, 0.2), rgba(10, 8, 14, 0.9) 70%);
  box-sizing: content-box;
}

.ribbon-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--gold-text-top), var(--gold-text-mid) 60%, var(--gold-text-low));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 var(--ink-line));
}

.ribbon-label {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-gold);
}

.ribbon-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-note);
  font-style: italic;
  line-height: 1.35;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ribbon-tile:nth-child(3) {
    border-left: 0;
  }

  .ribbon-tile:nth-child(n + 3) {
    border-top: 1px solid var(--panel-rule);
  }
}

@media (max-width: 420px) {
  .ribbon-tile {
    column-gap: 0.6rem;
    padding: 0.7rem 0.7rem;
  }

  .ribbon-tile .glyph {
    width: 1.9rem;
    height: 1.9rem;
    padding: 0.3rem;
  }

  .ribbon-label {
    letter-spacing: 0.03em;
  }
}

/* --- the dashboard's grid ------------------------------------------------------

   The standings with a live rail beside them (dings, gear), then the race so
   far, the feats / shame / PvP trio, the auguries and the Tavern Tales. */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 26rem);
  gap: var(--gap);
  align-items: start;
}

.home-rail {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

@media (max-width: 1100px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Side by side under the standings while there is room. */
  .home-rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    align-items: start;
  }
}

.home-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: var(--gap);
  align-items: stretch;
}

.race-panel .panel-head {
  row-gap: 0.6rem;
}

.race-note {
  margin-bottom: var(--sp-3);
}

.race-page:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

@media (max-width: 620px) {
  .race-panel .seg-tabs {
    display: flex;
    width: 100%;
  }

  .race-panel .seg-tab {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 0.5rem;
  }
}

/* --- 1. leaderboard ------------------------------------------------------- */

/* The filters above the list and the pages under it (js/views/board.js). */
.board-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.75rem;
  margin-bottom: 0.85rem;
}

.board-tools[hidden],
.board-pager[hidden] {
  display: none;
}

.board-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 8.5rem;
  min-width: 0;
}

.board-field-search {
  flex: 2 1 13rem;
}

.board-check {
  flex: none;
  min-height: 2.6rem;
}

.board-clear,
.board-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  background: rgba(10, 8, 14, 0.8);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-gold-bright);
  cursor: pointer;
}

.board-clear:hover,
.board-page-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--text-strong);
}

.board-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.board-page-btn.is-current {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.22);
  color: var(--text-strong);
}

.board-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.5rem;
  margin-top: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.board-page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.board-page-gap {
  padding: 0 0.15rem;
  color: var(--text-muted);
}

.board-page-go {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

.board-page-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.board-page-input {
  width: 4.2rem;
  min-height: 2.6rem;
  text-align: center;
}

@media (max-width: 480px) {
  /* Phones: the search on its own line, class / race / level side by side,
     the labels left to the controls' own names ("All classes" ...). */
  .board-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .board-field-search {
    grid-column: 1 / -1;
  }

  .board-field .pf-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .board-field .pf-select {
    padding-inline: 0.4rem;
  }

  .board-check {
    grid-column: 1 / 3;
    min-height: 2.2rem;
  }

  .board-clear {
    justify-self: end;
    min-height: 2.2rem;
  }

  .board-page-go {
    margin-left: 0;
  }

  .board-page-btn {
    padding: 0.3rem 0.6rem;
  }
}

.board {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.board-row {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: linear-gradient(90deg, var(--tint-row), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 235, 180, 0.05), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: border-color var(--t-fast), background var(--t-fast), translate var(--t-fast), box-shadow var(--t-fast);
}

.board-row:hover {
  border-color: var(--gold);
  background: linear-gradient(90deg, var(--tint-gold), rgba(212, 175, 55, 0.04));
  translate: 3px 0;
  box-shadow: inset 0 1px 0 rgba(255, 235, 180, 0.05), 0 6px 16px rgba(0, 0, 0, 0.45), -3px 0 0 color-mix(in srgb, var(--class-color) 70%, transparent);
}

.board-link {
  display: grid;
  grid-template-columns: 3.7rem minmax(0, 1fr) 4.2rem minmax(110px, 11rem) 6.9rem;
  align-items: center;
  gap: 0.3rem 0.85rem;
  padding: 0.6rem 1rem 0.6rem 0.9rem;
  color: inherit;
}

.board-link:hover {
  color: inherit;
}

/* The cartoon bust with the class icon and the rank coin on its shoulders. */
.portrait {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  transition: scale var(--t-fast), rotate var(--t-fast);
}

.board-row:hover .portrait {
  scale: 1.06;
  rotate: -3deg;
}

.portrait > .medal {
  width: 100%;
  height: 100%;
}

.rank {
  position: absolute;
  left: -0.45rem;
  bottom: -0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid #b8902c;
  background: radial-gradient(circle at 35% 28%, #3a3046, #120e17);
  box-shadow: 0 0 0 1.5px var(--ink-line), 0 3px 6px rgba(0, 0, 0, 0.6);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.rank-1 .rank,
.rank-2 .rank,
.rank-3 .rank {
  width: 2rem;
  height: 2rem;
  left: -0.55rem;
  bottom: -0.5rem;
  color: var(--text-on-gold);
  border-color: #fff2c4;
}

.rank-1 .rank {
  background: radial-gradient(circle at 34% 26%, #fff8dc 0%, var(--surface-gold) 45%, #c99a2e 100%);
  box-shadow: 0 0 0 1.5px var(--ink-line), 0 0 14px rgba(255, 210, 100, 0.8);
}

.rank-2 .rank {
  background: radial-gradient(circle at 34% 26%, #ffffff 0%, var(--surface-silver) 50%, #a4aab8 100%);
}

.rank-3 .rank {
  background: radial-gradient(circle at 34% 26%, #ffe2c4 0%, var(--surface-bronze) 50%, #c98450 100%);
}

/* Who: the character name (bold, class colour) on a line of its own, the
   real name under it when public, then race, class, item level and the
   status badge as a small-caps line. */
.who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
}

/* "Firstname Surname" may take two lines (it wraps at the space) before it
   gives way. */
.char-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-name);
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--class-text);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8), 0 0 16px color-mix(in srgb, var(--class-color) 35%, transparent);
}

.board-link:hover .char-name {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--class-color) 60%, transparent);
  text-underline-offset: 4px;
}

.real-name {
  max-width: 100%;
  font-size: var(--fs-text);
  font-style: italic;
  line-height: 1.25;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Race and class give way (ellipsis); the item level never does, and the
   status badge wraps under them rather than squeezing them. */
.who-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.6rem;
  max-width: 100%;
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-faint);
}

.who-meta {
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.who-sub .badge {
  flex: none;
}

.kin {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who-ilvl {
  flex: none;
}

.who-sub .sep {
  padding: 0 0.4rem;
}

.ilvl {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.level-block {
  text-align: center;
  line-height: 1;
}

.level-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem);
  color: var(--text);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.85);
}

.board-row.at-cap .level-num {
  background: linear-gradient(180deg, var(--gold-text-top), var(--gold-text-mid) 60%, var(--gold-text-low));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 0 var(--ink-line)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.55));
}

.level-word {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.xp {
  min-width: 0;
}

.xp-text {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--fs-note);
  line-height: 1.3;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.trail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.trail-main {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-muted);
}

.trail-leader {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.trail-crown {
  width: 1.2rem;
  height: 1.2rem;
  fill: var(--gold);
  stroke: var(--ink-line);
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.8));
}

.trail-sub {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-faint);
  white-space: nowrap;
}

/* Under the level: the flame for 3+ levels in 24 hours. */
.streak {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.35rem;
  white-space: nowrap;
  padding: 0.05rem 0.5rem 0.05rem 0.3rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 138, 43, 0.6);
  background: rgba(60, 20, 4, 0.55);
  color: var(--text-ember);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.streak:empty {
  display: none;
}

.streak-icon {
  width: 1rem;
  height: 1rem;
  fill: var(--ember);
  stroke: var(--ink-line);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 4px rgba(255, 138, 43, 0.8));
}

/* The leader: a gold-lit row with a slow sheen. */
.board-row.rank-1 {
  border: 2px solid var(--gold);
  background: linear-gradient(90deg, var(--tint-gold), rgba(212, 175, 55, 0.05) 60%, rgba(255, 255, 255, 0.01));
  box-shadow:
    0 0 0 1px var(--ink-line),
    inset 0 0 24px rgba(212, 175, 55, 0.12),
    0 0 24px rgba(212, 175, 55, 0.18);
}

.board-row.rank-1::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 190, 0.1) 50%, transparent 65%);
  translate: -100% 0;
  animation: leader-sheen 7s ease-in-out infinite;
}

@keyframes leader-sheen {
  0%,
  55% {
    translate: -100% 0;
  }
  100% {
    translate: 100% 0;
  }
}

/* Phones: race and class on one line (wrapping rather than cut off), the
   item level on the next. */
@media (max-width: 520px) {
  .who-meta {
    flex-direction: column;
    white-space: normal;
  }

  .who-ilvl .sep {
    display: none;
  }
}

@media (max-width: 760px) {
  .who-sub {
    font-size: var(--fs-label);
  }

  .board-link {
    grid-template-columns: 3.6rem minmax(0, 1fr) 3.6rem;
    row-gap: 0.55rem;
    padding: 0.75rem 0.75rem 0.7rem 0.85rem;
  }

  .xp {
    grid-column: 1 / 4;
  }

  .trail {
    grid-column: 1 / 4;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    margin-top: -0.2rem;
  }
}

/* --- 2. race track -------------------------------------------------------- */

.track {
  position: relative;
  padding: 0.4rem 0.2rem 0.2rem;
}

.track-scale {
  position: relative;
  height: 1.5rem;
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--text-faint);
}

.track-tick {
  position: absolute;
  top: 0;
  left: var(--at, 0%);
  translate: -50% 0;
  white-space: nowrap;
}

.track-lane {
  position: relative;
  height: 3.9rem;
  margin-bottom: 0.1rem;
}

/* The road runs low in the lane, so the figures stand on it. */
.track-road {
  position: absolute;
  inset: auto 0 0.75rem;
  height: 8px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(212, 175, 55, 0.28) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.55));
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.track-lane:hover .track-road {
  border-color: rgba(212, 175, 55, 0.45);
}

.track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--at, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--class-color) 60%, transparent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--class-color) 35%, transparent);
  transition: width var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

.track-goal {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

/* A figure walking the road (feet on its line), its level chip and name beside it. */
.token {
  position: absolute;
  bottom: 0.45rem;
  left: var(--at, 0%);
  translate: -1.25rem 0;
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  color: inherit;
  transition: left var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

.token-flip {
  flex-direction: row-reverse;
  translate: calc(-100% + 1.25rem) 0;
}

.token-fig {
  flex: none;
  width: 2.5rem;
  height: 3.25rem;
  transition: translate var(--t-fast), scale var(--t-fast);
}

.token-fig > .fig {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.6));
}

.token:hover .token-fig,
.token:focus-visible .token-fig {
  translate: 0 -4px;
  scale: 1.1;
}

.token-chip,
.token-name {
  margin-bottom: 0.15rem;
}

/* A gem-cut chip in the class colour, lightened so the dark number reads. */
.token-chip {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 2.1rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--text-on-gold);
  background: linear-gradient(180deg,
      color-mix(in srgb, var(--class-color) 50%, #fff),
      color-mix(in srgb, var(--class-color) 68%, #fff));
  clip-path: polygon(50% 0%, 100% 22%, 100% 70%, 50% 100%, 0% 70%, 0% 22%);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--class-color) 70%, transparent));
}

.token-name {
  padding: 0.05rem 0.45rem;
  border-radius: 5px;
  background: rgba(10, 8, 14, 0.9);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--class-text);
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token:hover .token-name,
.token:focus-visible .token-name {
  color: var(--text-gold-bright);
}

.token-crown {
  position: absolute;
  top: -0.85rem;
  left: 1.25rem;
  translate: -50% 0;
  width: 1.4rem;
  height: 1rem;
  fill: var(--gold);
  stroke: var(--ink-line);
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.85));
}

.token-flip .token-crown {
  left: auto;
  right: 1.25rem;
  translate: 50% 0;
}

.token-dinged .token-chip {
  animation: token-ding 1.6s ease-out 2;
}

.token-dinged .token-fig {
  animation: token-hop 0.8s cubic-bezier(0.3, 1.6, 0.5, 1) 3;
}

@keyframes token-hop {
  0%,
  100% {
    translate: 0 0;
  }
  40% {
    translate: 0 -10px;
  }
}

@keyframes token-ding {
  0% {
    scale: 1;
    filter: brightness(1);
  }
  30% {
    scale: 1.4;
    filter: brightness(1.5);
  }
  100% {
    scale: 1;
    filter: brightness(1);
  }
}

@media (max-width: 620px) {
  .token-name {
    display: none;
  }
}

/* --- 3. race chart -------------------------------------------------------- */

.chart-box {
  position: relative;
  height: clamp(240px, 34vw, 360px);
}

@media (max-width: 620px) {
  .chart-box {
    height: 400px;
  }
}

/* --- 4. ding feed --------------------------------------------------------- */

.feed {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feed-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid color-mix(in srgb, var(--class-color) 80%, transparent);
  background: var(--tint-row);
}

/* The level, struck on a round stone coin. */
.feed-level {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: var(--fs-text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-gold-bright);
  background: radial-gradient(circle at 35% 28%, #3a3046, #110d16);
  border: 2px solid #9a7426;
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
}

/* "Firstname Surname reached level 20": the ding text wraps under a long
   name instead of cutting it off. */
.feed-body {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
  font-size: var(--fs-text);
  line-height: 1.35;
}

.feed-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--class-text);
}

.feed-name:hover {
  text-decoration: underline;
}

.feed-text {
  flex: none;
  white-space: nowrap;
  color: var(--text-muted);
}

.feed-time {
  font-size: var(--fs-small);
  color: var(--text-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.feed-max {
  background: linear-gradient(90deg, var(--tint-gold), var(--tint-row));
}

.race-dings .feed-text {
  color: var(--text);
}

.feed-max .feed-level {
  color: var(--text-on-gold);
  background: radial-gradient(circle at 34% 26%, #fff8dc 0%, var(--surface-gold) 50%, #c99a2e 100%);
  border-color: #fff2c4;
}

/* --- Fresh Loot ------------------------------------------------------------ */

.loot,
.pvp {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* An empty Treasure Vault: one line under the newest gear. */
.loot-vault-note {
  margin-top: var(--sp-3);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(212, 162, 251, 0.35);
  background: rgba(154, 123, 255, 0.06);
  font-size: var(--fs-note);
  font-style: italic;
  line-height: 1.4;
  color: var(--text-muted);
}

.loot-item {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid color-mix(in srgb, var(--class-color) 80%, transparent);
  background: var(--tint-row);
}

.loot-gem {
  width: 0.8rem;
  height: 0.8rem;
  justify-self: center;
  rotate: 45deg;
  border-radius: 2px;
  border: 1.5px solid var(--ink-line);
  background: var(--quality-color);
  box-shadow: 0 0 9px color-mix(in srgb, var(--quality-color) 70%, transparent);
}

.loot-body {
  min-width: 0;
  font-size: var(--fs-text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.loot-who {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--class-text);
}

.loot-who:hover,
.pvp-who:hover {
  text-decoration: underline;
}

.loot-verb {
  color: var(--text-muted);
}

/* Item names in their quality colour, in [brackets] like an item link. */
.loot-name {
  color: var(--quality-color);
  font-weight: 700;
}

/* Item names link to Wowhead (js/wowhead.js, a new tab): the quality colour
   stays on hover and focus, an underline shows the link. */
a.item-link:hover,
a.item-link:focus-visible {
  color: var(--quality-color);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.loot-name::before,
.slot-name::before,
.doll-row-name::before,
.vault-item::before,
.jackpot-name::before,
.levelup-item::before {
  content: "[";
}

.loot-name::after,
.slot-name::after,
.doll-row-name::after,
.vault-item::after,
.jackpot-name::after,
.levelup-item::after {
  content: "]";
}

.loot-sub {
  display: block;
  margin-top: 0.1rem;
  font-size: var(--fs-small);
  color: var(--text-faint);
}

.loot-time {
  font-size: var(--fs-small);
  color: var(--text-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --- 6. records: achievement plaques ---------------------------------------- */

.records {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.record {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 2px solid #6d5518;
  background:
    linear-gradient(180deg, rgba(255, 235, 180, 0.05), transparent 45%),
    linear-gradient(180deg, rgba(36, 29, 46, 0.6), rgba(0, 0, 0, 0.35));
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 1px 0 rgba(255, 235, 180, 0.08);
}

.record-sigil {
  width: 3.4rem;
  height: 3.4rem;
  padding: 0.55rem;
  border-radius: 50%;
  border: 3px solid #d9ad45;
  background: radial-gradient(circle at 36% 28%, #45385a, #120e17 75%);
  box-shadow: 0 0 0 1.5px var(--ink-line), inset 0 -5px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(212, 175, 55, 0.3);
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.record-body {
  min-width: 0;
}

.record-title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: var(--track-label);
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-gold);
}

.record-value {
  display: block;
  margin-top: 0.1rem;
  font-size: var(--fs-text);
  line-height: 1.35;
  color: var(--text);
}

.record-who {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--class-text);
}

.record-sub {
  display: block;
  font-size: var(--fs-note);
  font-style: italic;
  line-height: 1.35;
  color: var(--text-faint);
}

.record-who:hover,
.shame-who:hover,
.augury-who:hover {
  text-decoration: underline;
}

/* --- PvP Corner --------------------------------------------------------------- */

.panel-pvp {
  --panel-line: rgba(85, 168, 255, 0.3);
  --panel-line-strong: rgba(85, 168, 255, 0.55);
  --panel-rule: rgba(85, 168, 255, 0.16);
}

.panel-pvp::before {
  background: linear-gradient(90deg, transparent, rgba(147, 202, 255, 0.7), transparent);
}

.panel-pvp .panel-glyph {
  background: radial-gradient(circle at 35% 28%, rgba(85, 168, 255, 0.28), rgba(10, 8, 14, 0.9) 70%);
}

.panel-pvp .panel-glyph svg {
  stroke: #cfe6ff;
}

.panel-pvp .panel-title::before {
  background: linear-gradient(135deg, #cfe6ff, var(--azure) 55%, #1d4c8a);
}

.panel-pvp:has(.pvp-peace:not([hidden])) {
  display: flex;
  flex-direction: column;
}

.pvp-peace {
  flex: 1;
  display: flex;
}

.pvp-peace-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-align: center;
  padding: 1.4rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(85, 168, 255, 0.28);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(85, 168, 255, 0.12), transparent 70%),
    rgba(0, 0, 0, 0.3);
}

.pvp-peace-seal {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 2px solid rgba(147, 202, 255, 0.7);
  background: radial-gradient(circle at 36% 28%, #253a5c, #0b0f18 75%);
  box-shadow: 0 0 0 1.5px var(--ink-line), 0 0 16px rgba(85, 168, 255, 0.25);
}

.pvp-peace-seal svg {
  width: 2.2rem;
  height: 2.2rem;
  fill: none;
  stroke: #cfe6ff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pvp-peace-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-azure);
}

.pvp-peace-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-azure);
}

.pvp-peace-text {
  margin-top: 0.35rem;
  font-size: var(--fs-note);
  font-style: italic;
  line-height: 1.4;
  color: var(--text-muted);
}

.pvp-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(85, 168, 255, 0.22);
  font-size: var(--fs-text);
}

.pvp-top {
  border: 2px solid rgba(85, 168, 255, 0.6);
  box-shadow: inset 0 0 18px rgba(85, 168, 255, 0.1);
}

.pvp-pos {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-faint);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pvp-top .pvp-pos {
  color: var(--text-azure);
}

.pvp-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--class-text);
}

.pvp-kills {
  color: var(--text);
  white-space: nowrap;
}

.pvp-unit,
.pvp-rank {
  font-size: var(--fs-small);
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- 5. hall of shame: wanted notices on parchment ----------------------------- */

.panel-shame {
  --panel-line: rgba(214, 69, 63, 0.38);
  --panel-line-strong: rgba(214, 69, 63, 0.6);
  --panel-rule: rgba(214, 69, 63, 0.2);
}

.panel-shame::before {
  background: linear-gradient(90deg, transparent, rgba(255, 180, 170, 0.7), transparent);
}

.panel-shame .panel-glyph {
  background: radial-gradient(circle at 35% 28%, rgba(214, 69, 63, 0.3), rgba(10, 8, 14, 0.9) 70%);
}

.panel-shame .panel-glyph svg {
  stroke: #ffb4aa;
}

.panel-shame .panel-title {
  background: linear-gradient(180deg, #ffe1dc, var(--text-shame));
  -webkit-background-clip: text;
  background-clip: text;
}

.panel-shame .panel-title::before {
  background: linear-gradient(135deg, #ffb4aa, var(--blood) 55%, #5e120e);
}

.shame {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.2rem 0.15rem 0.3rem;
}

.shame-item {
  position: relative;
  padding: 0.75rem 1rem 0.8rem 1.1rem;
  background:
    radial-gradient(120% 90% at 30% 20%, #f6ead0 0%, transparent 70%),
    linear-gradient(180deg, #efe0bb, var(--surface-parchment));
  border-left: 5px solid color-mix(in srgb, var(--class-color) 85%, #000);
  clip-path: polygon(0 2%, 4% 0, 18% 1.5%, 34% 0, 52% 2%, 70% 0, 88% 1.8%, 100% 0, 99.2% 30%, 100% 62%, 99% 100%, 80% 98.4%, 61% 100%, 40% 98.2%, 22% 100%, 6% 98.6%, 0 100%);
  box-shadow: inset 0 0 22px rgba(120, 80, 30, 0.35);
  rotate: -0.5deg;
}

.shame-item:nth-child(2) {
  rotate: 0.6deg;
}

/* A red wax seal in the corner of each notice. */
.shame-item::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #e8574a, #9c1c14 60%, #5e0d09);
  box-shadow: 0 0 0 2px rgba(94, 13, 9, 0.5), inset 0 -2px 3px rgba(0, 0, 0, 0.4);
}

.shame-title {
  display: block;
  padding-right: 2rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-on-parchment-red);
}

.shame-who {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-on-parchment);
}

.shame-why {
  display: block;
  font-size: var(--fs-text);
  font-style: italic;
  line-height: 1.35;
  color: var(--text-on-parchment);
}

/* --- 7. projections: one table row per contender ----------------------------- */

.augury-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}

.augury {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.35rem;
  margin-top: -0.35rem;
  font-variant-numeric: tabular-nums;
}

.augury thead th {
  padding: 0 0.85rem 0.1rem;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-faint);
}

.augury thead .augury-col-num {
  text-align: right;
}

.augury-col-who {
  width: 34%;
}

.augury-col-pace {
  width: 36%;
}

.augury-row > * {
  padding: 0.55rem 0.85rem;
  vertical-align: middle;
  background: var(--tint-row);
  transition: background var(--t-fast);
}

.augury-row:hover > * {
  background: rgba(255, 255, 255, 0.07);
}

.augury-row > :first-child {
  border-left: 3px solid color-mix(in srgb, var(--class-color) 80%, transparent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.augury-row > :last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.augury-who-cell {
  min-width: 11rem;
  text-align: left;
  font-weight: 400;
}

.augury-pos {
  display: inline-block;
  min-width: 1.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--text-faint);
}

.augury-who {
  font-family: var(--font-display);
  font-size: var(--fs-text);
  font-weight: 700;
  color: var(--class-text);
}

.augury-level {
  margin-left: 0.55rem;
  font-size: var(--fs-small);
  font-style: italic;
  white-space: nowrap;
  color: var(--text-faint);
}

/* Pace: a bar against the fastest contender, the number beside it. */
.augury-pace {
  min-width: 12rem;
}

.augury-meter {
  display: inline-block;
  position: relative;
  width: min(15rem, 58%);
  height: 8px;
  margin-right: 0.65rem;
  vertical-align: middle;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.18);
  overflow: hidden;
}

.augury-meter::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--class-color) 45%, transparent), var(--class-color));
  box-shadow: 0 0 8px color-mix(in srgb, var(--class-color) 45%, transparent);
}

.augury-num {
  font-size: var(--fs-text);
  white-space: nowrap;
  color: var(--text);
}

.augury-cell-num {
  text-align: right;
  white-space: nowrap;
  font-size: var(--fs-text);
  color: var(--text-muted);
}

.augury-when {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-gold-bright);
}

.augury-rhythm {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-muted);
}

.augury-text {
  font-family: var(--font-body);
  font-size: var(--fs-note);
  font-style: italic;
  font-weight: 400;
  color: var(--text-faint);
}

.augury-done .augury-when {
  color: var(--text-gold);
}

.augury-foot {
  margin-top: var(--sp-3);
  font-size: var(--fs-note);
  font-style: italic;
  line-height: 1.4;
  color: var(--text-faint);
}

@media (max-width: 620px) {
  .augury-togo {
    display: none;
  }

  .augury-row > *,
  .augury thead th {
    padding-inline: 0.5rem;
  }

  .augury-who-cell,
  .augury-pace {
    min-width: 0;
  }

  .augury-pos {
    display: none;
  }

  .augury-level {
    display: block;
    margin-left: 0;
  }

  .augury-meter {
    display: block;
    width: 100%;
    margin: 0 0 0.25rem;
  }
}

/* --- 8. player page ------------------------------------------------------- */

.player-page {
  padding-top: var(--sp-4);
}

/* "← Standings" and the neighbours in the standings, one row. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.crumbs-nb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.back-link,
.crumb-nb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.4rem;
  padding: 0.25rem 0.95rem 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--panel-line-strong);
  background: rgba(10, 8, 14, 0.8);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: border-color var(--t-fast), color var(--t-fast), translate var(--t-fast);
}

.back-link {
  text-transform: uppercase;
}

.back-link:hover,
.crumb-nb:hover {
  color: var(--text-gold-bright);
  border-color: var(--gold);
}

.crumb-prev:hover {
  translate: -2px 0;
}

.crumb-next {
  padding: 0.25rem 0.75rem 0.25rem 0.95rem;
}

.crumb-next:hover {
  translate: 2px 0;
}

.crumb-arrow {
  font-size: var(--fs-lead);
  line-height: 1;
  color: var(--text-gold);
}

.crumb-words {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}

.crumb-rank {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.crumb-name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--class-text);
}

@media (max-width: 520px) {
  .crumbs-nb {
    width: 100%;
  }

  .crumb-nb {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }

  .crumb-name {
    max-width: 100%;
  }
}

.player-crest {
  width: clamp(84px, 10vw, 124px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px color-mix(in srgb, var(--class-color) 40%, transparent));
}

.player-crest path {
  stroke: var(--ink-line);
  stroke-width: 2.6;
  stroke-linejoin: round;
}

.player-crest .crest-rim {
  fill: url(#def-gold);
}

.player-crest .crest-field {
  fill: url(#def-stone);
}

.crest-alliance .crest-field {
  fill: url(#def-blue);
}

.crest-horde .crest-field {
  fill: url(#def-red);
}

.crest-horde .crest-rim,
.crest-horde .crest-spikes {
  fill: url(#def-iron);
}

.player-crest .crest-chevron {
  fill: rgba(255, 220, 130, 0.22);
  stroke: none;
}

.crest-horde .crest-chevron {
  fill: rgba(0, 0, 0, 0.35);
}

.player-crest .crest-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 3;
  stroke-linecap: round;
}

.player-crest .crest-star {
  fill: url(#def-gold);
  stroke-width: 1.4;
}

.player-crest .crest-rivets {
  fill: #d8c9a8;
  stroke-width: 1.2;
}

.player-crest .ci path {
  stroke-width: 2.2;
}

.meta-bit {
  white-space: nowrap;
}

.charwin-meta .sep {
  padding: 0 0 0 0.45rem;
}

.player-missing {
  text-align: center;
  padding: 2rem 1rem;
}

/* The rank medal: gold, silver or bronze for the podium, stone below it. */
.player-rank {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 5.6rem;
  padding: 0.5rem 0.9rem 0.5rem;
  border-radius: var(--radius);
  border: 2px solid #8a6420;
  background: linear-gradient(180deg, #17121e, #0b0910);
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 1px 0 rgba(255, 235, 180, 0.12), 0 6px 14px rgba(0, 0, 0, 0.45);
}

.player-rank.rank-gold {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 0 18px rgba(212, 175, 55, 0.2), 0 0 22px rgba(212, 175, 55, 0.35);
}

.player-rank.rank-silver {
  border-color: var(--surface-silver);
}

.player-rank.rank-bronze {
  border-color: var(--surface-bronze);
}

.player-rank-word,
.player-rank-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.player-rank-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
  line-height: 1.05;
  background: linear-gradient(180deg, var(--gold-text-top), var(--gold-text-mid) 60%, var(--gold-text-low));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 var(--ink-line));
}

/* --- the character window (js/views/sheet.js): title band, tabs, pages ------- */

.charwin {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* The title band: the page's one ornate frame, tinted in the class colour,
   the figure on its stage at the left. */
.phero {
  display: grid;
  grid-template-columns: clamp(11rem, 20vw, 16rem) minmax(0, 1fr);
  gap: clamp(1rem, 2.6vw, 2.2rem);
  align-items: stretch;
  padding: clamp(1rem, 2.4vw, 1.7rem);
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in srgb, var(--class-color) 24%, transparent), transparent 70%),
    radial-gradient(60% 120% at 100% 0%, rgba(154, 123, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
}

.phero-stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 15rem;
  padding: 1.4rem 0.6rem 1.2rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--class-color) 45%, rgba(212, 175, 55, 0.35));
  background:
    radial-gradient(62% 46% at 50% 45%, color-mix(in srgb, var(--class-color) 34%, transparent), transparent 72%),
    radial-gradient(42% 7% at 50% 84%, rgba(0, 0, 0, 0.8), transparent 72%),
    linear-gradient(180deg, #1d1727 0%, #120e18 62%, #0a080d 100%);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 235, 180, 0.08);
}

.phero-rune {
  position: absolute;
  top: 47%;
  left: 50%;
  width: 92%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--class-color) 40%, rgba(212, 175, 55, 0.3));
  box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.04), inset 0 0 0 10px rgba(212, 175, 55, 0.035);
  animation: rune-turn 60s linear infinite;
}

.phero-fig {
  position: relative;
  width: min(96%, 13.5rem);
  aspect-ratio: 200 / 260;
}

.phero-fig > .fig {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.6));
}

.phero-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.phero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.charwin-id {
  min-width: 0;
}

.charwin-name {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--class-text);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.85), 0 0 26px color-mix(in srgb, var(--class-color) 35%, transparent);
  overflow-wrap: anywhere;
}

.charwin-real {
  margin-top: 0.2rem;
  font-size: var(--fs-lead);
  font-style: italic;
  line-height: 1.3;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.charwin-info {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-gold-bright);
}

.charwin-guild {
  color: var(--text);
}

/* A long guild name may wrap; the separator stays at the end of its line. */
.charwin-meta .charwin-guild {
  white-space: normal;
  overflow-wrap: anywhere;
}

.charwin-meta {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
  align-items: center;
  font-size: var(--fs-text);
  color: var(--text-muted);
}

.charwin-source {
  margin-top: 0.25rem;
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-muted);
}

.charwin-xp .xpbar {
  max-width: 40rem;
}

/* The tally: small stat chips under the XP bar, up to four a row; the last
   chip of a short row stretches to its end (--cols, --span: js/views/player.js). */
.phero-stats {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 0.5rem;
}

.phero-stats > :last-child {
  grid-column: span var(--span, 1);
}

.phero-stats .stat {
  padding: 0.55rem 0.75rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-line);
  background:
    linear-gradient(180deg, rgba(255, 235, 180, 0.05), transparent 60%),
    rgba(6, 5, 9, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 235, 180, 0.06);
}

.phero-stats .stat-value {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
}

.phero-stats .stat-gold {
  border-color: var(--panel-line-strong);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.16), rgba(6, 5, 9, 0.55));
}

.phero-stats .stat-ember {
  border-color: rgba(255, 138, 43, 0.5);
  background: linear-gradient(180deg, rgba(255, 138, 43, 0.12), rgba(6, 5, 9, 0.55));
}

/* Narrow: the figure and the rank above the name, the tally two to a row. */
@media (max-width: 760px) {
  .phero {
    grid-template-columns: minmax(0, 1fr);
  }

  .phero-stage {
    min-height: 0;
    padding-top: 0.8rem;
  }

  .phero-fig {
    width: min(52%, 10.5rem);
  }

  /* The rank medal rides on the stage's top right corner. */
  .phero-body {
    position: static;
  }

  .phero-top .player-rank {
    position: absolute;
    z-index: 2;
    top: clamp(1rem, 2.4vw, 1.7rem);
    right: clamp(1rem, 2.4vw, 1.7rem);
    min-width: 4.6rem;
    padding: 0.35rem 0.7rem;
  }

  .phero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phero-stats > :last-child {
    grid-column: span var(--span-sm, 1);
  }
}

.charwin-missing .player-missing {
  padding: 2rem 1rem;
  text-align: center;
}

/* The sheet below the band: a calm panel with the bookmark tabs on top. */
.charwin-body {
  padding: 0;
  overflow: hidden;
}

.charwin-tabbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding: 0.75rem clamp(0.8rem, 2.2vw, 1.5rem) 0;
  border-bottom: 2px solid var(--gold-mid);
  background: linear-gradient(180deg, rgba(255, 235, 180, 0.04), transparent);
}

.charwin-tabnote {
  align-self: center;
  padding-bottom: 0.6rem;
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-faint);
}

/* Bookmark tabs, like the addon's: the selected one joins the page below. */
.charwin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.7rem clamp(0.8rem, 2.2vw, 1.5rem) 0;
  border-bottom: 2px solid var(--gold-mid);
}

.charwin-tabbar .charwin-tabs {
  padding: 0;
  border-bottom: 0;
}

.charwin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  margin-bottom: -2px;
  padding: 0.35rem 1.05rem 0.4rem 0.85rem;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-bottom-color: var(--gold-mid);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #1a1522, #0d0a12);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast), translate var(--t-fast), border-color var(--t-fast);
}

.charwin-tab:hover {
  translate: 0 -2px;
  color: var(--text-gold-bright);
  border-color: rgba(212, 175, 55, 0.6);
}

.charwin-tab[aria-selected="true"] {
  translate: none;
  color: var(--text-gold-bright);
  border-color: var(--gold-mid);
  border-bottom-color: #18131f;
  background: linear-gradient(180deg, #2c2338, #18131f);
  box-shadow: 0 -6px 14px rgba(212, 175, 55, 0.14);
}

.charwin-tab svg {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  stroke: var(--gold);
}

.charwin-tab:focus-visible,
.charwin-page:focus-visible,
.slot:focus-visible,
.tal:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.charwin-page {
  padding: clamp(0.9rem, 2.4vw, 1.5rem) clamp(0.6rem, 2vw, 1.3rem) clamp(0.8rem, 1.8vw, 1.2rem);
  background: linear-gradient(180deg, rgba(24, 19, 31, 0.9), rgba(10, 8, 14, 0.4) 40%);
}

/* The Race tab: the climb beside every ding. */
.player-race {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 1fr);
  gap: 1.1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .player-race {
    grid-template-columns: minmax(0, 1fr);
  }
}

.race-climb-note {
  margin: -0.35rem 0 0.6rem;
}

.chart-box-player {
  height: clamp(280px, 32vw, 420px);
}

/* --- Gear: the paper doll ----------------------------------------------------- */

.gearpage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
  gap: var(--gap);
  align-items: start;
}

.gearpage-solo {
  grid-template-columns: minmax(0, 1fr);
}

.doll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(10rem, 20vw, 15rem) minmax(0, 1fr);
  grid-template-areas:
    "left stage right"
    "bottom bottom bottom";
  gap: 0.9rem 1.1rem;
}

.doll-left {
  grid-area: left;
}

.doll-right {
  grid-area: right;
}

.doll-stage {
  grid-area: stage;
}

.doll-bottom {
  grid-area: bottom;
}

.doll-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.doll-bottom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  min-height: 3.1rem;
  border-radius: var(--radius-sm);
}

/* A linked slot: the list item only holds the <a class="slot">. */
.slot-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.slot:hover .slot-name,
.slot:focus-visible .slot-name {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.doll-right .slot {
  flex-direction: row-reverse;
  text-align: right;
}

.doll-bottom .slot {
  flex-direction: column;
  width: 9.5rem;
  text-align: center;
}

.slot-tile {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 3.05rem;
  height: 3.05rem;
  border-radius: 9px;
  border: 2px solid var(--quality-color);
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--quality-color) 24%, #1a1422), #0b0910 82%);
  box-shadow:
    0 0 0 1.5px var(--ink-line),
    inset 0 0 10px rgba(0, 0, 0, 0.75),
    0 0 12px color-mix(in srgb, var(--quality-color) 32%, transparent);
  transition: translate var(--t-fast), box-shadow var(--t-fast);
}

.slot:hover .slot-tile,
.slot:focus-visible .slot-tile {
  translate: 0 -2px;
  box-shadow:
    0 0 0 1.5px var(--ink-line),
    inset 0 0 10px rgba(0, 0, 0, 0.75),
    0 0 20px color-mix(in srgb, var(--quality-color) 60%, transparent);
}

.slot-tile .slot-glyph {
  width: 72%;
  height: 72%;
  stroke: var(--quality-color);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8));
}

.slot-empty .slot-tile {
  border: 2px dashed rgba(201, 184, 143, 0.35);
  background: radial-gradient(circle at 50% 32%, #1a1520, #0b0910 82%);
  box-shadow: 0 0 0 1.5px var(--ink-line), inset 0 0 10px rgba(0, 0, 0, 0.75);
}

.slot-empty .slot-glyph {
  stroke: rgba(201, 184, 143, 0.4);
}

.slot-ilvl {
  position: absolute;
  right: -0.45rem;
  bottom: -0.45rem;
  min-width: 1.6rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  background: #0b0910;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.slot-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.slot-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: var(--fs-note);
  font-weight: 700;
  color: var(--quality-color);
}

.slot-none {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-faint);
}

.slot-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* The stage: the figure under a class-coloured light, a rune circle behind. */
.doll-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  min-height: 100%;
  padding: 1rem 0.5rem 0.7rem;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background:
    radial-gradient(60% 42% at 50% 40%, color-mix(in srgb, var(--class-color) 26%, transparent), transparent 72%),
    radial-gradient(48% 9% at 50% 84%, rgba(0, 0, 0, 0.7), transparent 72%),
    linear-gradient(180deg, #1d1727 0%, #120e18 62%, #0a080d 100%);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 235, 180, 0.08);
}

.doll-rune {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 82%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px dashed rgba(212, 175, 55, 0.22);
  box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.04), inset 0 0 0 10px rgba(212, 175, 55, 0.035);
  animation: rune-turn 60s linear infinite;
}

@keyframes rune-turn {
  to {
    rotate: 360deg;
  }
}

/* The gear ledger in the doll's middle (js/views/doll.js): the item level
   over the rune, then average item level per group, the best piece and the
   quality mix of what is worn. */
.doll-ledger {
  justify-content: center;
  align-items: stretch;
  gap: 0.3rem;
  padding: 1rem 0.95rem 0.9rem;
}

.doll-ledger .doll-rune {
  top: 15%;
  width: 62%;
}

.doll-ledger .doll-ilvl {
  margin-bottom: 0.35rem;
}

.ledger-label {
  position: relative;
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.ledger-groups {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ledger-group {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr) 1.8rem;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-small);
}

.ledger-group-name {
  color: var(--text-muted);
}

.ledger-group-val {
  text-align: right;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.ledger-bar {
  position: relative;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.25);
}

.ledger-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold) 70%, var(--gold-bright));
}

.ledger-best {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.4rem 0.55rem;
  border-left: 3px solid color-mix(in srgb, var(--quality-color) 75%, transparent);
  border-radius: var(--radius-sm);
  background: var(--tint-row);
  line-height: 1.3;
}

.ledger-best-name {
  font-weight: 700;
  color: var(--quality-color);
  overflow-wrap: anywhere;
}

.ledger-best-meta {
  font-size: var(--fs-small);
  color: var(--text-faint);
}

.ledger-mix-bar {
  position: relative;
  display: flex;
  height: 0.6rem;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--ink-line);
}

.ledger-seg {
  flex: 0 0 var(--share, 0%);
  background: var(--quality-color);
}

.ledger-seg + .ledger-seg {
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.65);
}

.ledger-mix {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.7rem;
  font-size: var(--fs-small);
}

.ledger-mix-item {
  color: var(--quality-color);
}

.ledger-slots {
  position: relative;
  margin-top: 0.45rem;
  font-size: var(--fs-small);
  font-style: italic;
  text-align: center;
  color: var(--text-muted);
}

.doll-ilvl {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  text-align: center;
}

.doll-ilvl-word {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.doll-ilvl-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  font-weight: 900;
  color: var(--text-gold-bright);
  text-shadow: 0 2px 0 var(--ink-line), 0 0 14px rgba(212, 175, 55, 0.45);
}

.doll-ilvl-sub,
.doll-note {
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--text-muted);
}

.doll-note {
  position: relative;
  text-align: center;
}

/* Item names under the doll on narrow screens (and the slots the doll has no place for). */
.doll-list,
.doll-extra {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.doll-list {
  display: none;
  margin-top: 1rem;
}

.doll-extra {
  margin-top: 0.4rem;
}

.gearpage-doll > .sheet-title {
  margin-top: 1rem;
}

.doll-row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) 2.2rem;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid color-mix(in srgb, var(--quality-color) 70%, transparent);
  background: var(--tint-row);
  font-size: var(--fs-text);
  line-height: 1.35;
}

.doll-row-slot {
  font-size: var(--fs-small);
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doll-row-name {
  min-width: 0;
  font-weight: 700;
  color: var(--quality-color);
  overflow-wrap: anywhere;
}

.doll-row-ilvl {
  text-align: right;
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
  .gearpage {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Narrow: tiles only beside the stage, the names in the list below. */
@media (max-width: 720px) {
  .doll {
    grid-template-columns: 3.1rem minmax(0, 1fr) 3.1rem;
    gap: 0.5rem 0.6rem;
  }

  .doll .slot-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .doll-bottom .slot {
    width: auto;
  }

  .doll-list {
    display: flex;
  }

  .doll-ledger {
    padding: 0.8rem 0.6rem;
  }

  .ledger-group {
    grid-template-columns: minmax(0, 1fr) 1.8rem;
    gap: 0.1rem 0.4rem;
  }

  .ledger-group .ledger-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* --- the info column: vitals, guild, standing, companions ---------------------- */

.gearpage-info {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.sheet-block {
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(180deg, var(--tint-row), rgba(0, 0, 0, 0.25));
  box-shadow: inset 0 1px 0 rgba(255, 235, 180, 0.06);
}

.sheet-title {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-gold);
}

.sheet-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sheet-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.6rem;
  font-size: var(--fs-text);
  line-height: 1.35;
}

.sheet-label {
  color: var(--text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.sheet-value {
  margin-left: auto;
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
}

.sheet-extra {
  flex-basis: 100%;
  text-align: right;
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-faint);
}

/* Health and power as unit-frame bars, dark enough for the white numbers. */
.vitals {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.vital {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
}

.vital-label {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.vital-bar {
  display: block;
  border-radius: 6px;
  border: 1.5px solid var(--ink-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -4px 8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.vital-health {
  background: linear-gradient(180deg, #237030, #165222);
}

.vital-mana {
  background: linear-gradient(180deg, #2a55b8, #173a8a);
}

.vital-rage {
  background: linear-gradient(180deg, #a32a24, #6e1612);
}

.vital-energy {
  background: linear-gradient(180deg, #7a6500, #4f4200);
}

.vital-focus {
  background: linear-gradient(180deg, #9a4e14, #67320a);
}

.vital-runic {
  background: linear-gradient(180deg, #156b80, #0c4656);
}

.vital-power {
  background: linear-gradient(180deg, #4a3f6e, #2c2546);
}

.vital-value {
  display: block;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  text-align: center;
  color: var(--text-strong);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
  font-variant-numeric: tabular-nums;
}

.sheet-guild {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sheet-guild-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-gold-bright);
  overflow-wrap: anywhere;
}

.sheet-guild-rank {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-muted);
}

.reps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rep {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.6rem;
  font-size: var(--fs-text);
  line-height: 1.3;
}

.rep-name {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.rep-standing {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.rep-bar {
  grid-column: 1 / -1;
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
}

.rep-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rep, 50%);
  border-radius: inherit;
  background: #8a8a8a;
}

.rep-hated::after,
.rep-hostile::after {
  background: #c0392b;
}

.rep-unfriendly::after {
  background: #d9732b;
}

.rep-neutral::after {
  background: #d9c22b;
}

.rep-friendly::after,
.rep-honored::after,
.rep-revered::after {
  background: #3fae4a;
}

.rep-exalted::after {
  background: linear-gradient(90deg, #3fae4a, #4fd3c4);
  box-shadow: 0 0 8px rgba(79, 211, 196, 0.6);
}

/* --- Talents: three trees side by side ---------------------------------------- */

.tal-summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.tal-medal {
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
}

.tal-spec {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 1.2;
  color: var(--class-text);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8);
}

.tal-split {
  font-size: var(--fs-text);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.tal-trees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.9rem;
}

.tal-tree {
  min-width: 0;
  padding: 0.8rem 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.32));
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.tal-tree-active {
  border: 2px solid color-mix(in srgb, var(--class-color) 70%, transparent);
  background:
    radial-gradient(90% 35% at 50% 0%, color-mix(in srgb, var(--class-color) 16%, transparent), transparent 75%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.32));
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45), 0 0 20px color-mix(in srgb, var(--class-color) 24%, transparent);
}

.tal-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tal-name {
  min-width: 0;
  font-size: var(--fs-text);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-gold);
  overflow-wrap: anywhere;
}

.tal-points {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 900;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.tal-active {
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-gold);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-gold);
}

.tal-share {
  position: relative;
  display: block;
  height: 6px;
  margin: 0.55rem 0 0.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.22);
}

.tal-share::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--share, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--class-color) 55%, #0b0910), var(--class-color));
  box-shadow: 0 0 8px color-mix(in srgb, var(--class-color) 50%, transparent);
  transition: width var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

.tal-note,
.tal-foot {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-muted);
}

.tal-foot {
  margin-top: 0.9rem;
}

/* The talent frame's grid: four columns, one row per tier. */
.tal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(var(--tiers, 7), auto);
  gap: 0.55rem 0.4rem;
  justify-items: center;
}

.tal {
  position: relative;
  grid-row: var(--tier);
  grid-column: var(--col);
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 3.1rem;
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  background: radial-gradient(circle at 50% 30%, #2a2234, #0e0b13 85%);
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 0 8px rgba(0, 0, 0, 0.7);
  transition: translate var(--t-fast);
}

.tal:hover {
  translate: 0 -2px;
}

.tal-face {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--text-muted);
}

.tal-locked {
  border-style: dashed;
  border-color: rgba(201, 184, 143, 0.25);
  background: #0e0b13;
}

.tal-locked .tal-face {
  color: var(--text-faint);
}

.tal-some {
  border: 2px solid #3fbf3f;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--class-color) 22%, #1d1726), #0e0b13 85%);
  box-shadow: 0 0 0 1px var(--ink-line), 0 0 10px rgba(63, 191, 63, 0.4);
}

.tal-max {
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--class-color) 30%, #1d1726), #0e0b13 85%);
  box-shadow: 0 0 0 1px var(--ink-line), 0 0 12px rgba(212, 175, 55, 0.55);
}

.tal-some .tal-face,
.tal-max .tal-face {
  color: var(--text-strong);
}

/* The game's icon (js/gamedata.js), greyed while the talent has no point;
   its tooltip is the shared box (js/tooltip.js), drawn above everything. */
.tal-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.tal-open .tal-icon {
  filter: grayscale(1);
  opacity: 0.6;
}

.tal-locked .tal-icon {
  filter: grayscale(1);
  opacity: 0.35;
}

.tal-rank {
  position: absolute;
  right: -0.4rem;
  bottom: -0.45rem;
  padding: 0 0.28rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #0b0910;
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.tal-some .tal-rank {
  color: var(--text-ok);
}

.tal-max .tal-rank {
  border-color: var(--ink-line);
  background: var(--surface-gold);
  color: var(--text-on-gold);
}

/* --- Professions: Dingboard's profession window --------------------------------- */

.profpage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prof-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.prof {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
}

.prof-badge {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  border: 2.5px solid #b8902c;
  background: radial-gradient(circle at 38% 30%, #3a3046, #110d16);
  box-shadow: 0 0 0 1.5px var(--ink-line), inset 0 -5px 10px rgba(0, 0, 0, 0.5);
}

.prof-badge .prof-glyph {
  width: 64%;
  height: 64%;
  stroke: var(--gold-bright);
}

.prof-maxed .prof-badge {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1.5px var(--ink-line), 0 0 14px rgba(212, 175, 55, 0.55);
}

.prof-body {
  min-width: 0;
}

.prof-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.6rem;
}

.prof-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.prof-title {
  margin-left: auto;
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--text-muted);
}

.prof-bar {
  position: relative;
  display: block;
  margin-top: 0.3rem;
  overflow: hidden;
  border-radius: 7px;
  border: 2px solid #6d5518;
  background: #120d06;
  box-shadow: 0 0 0 1px var(--ink-line), inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.prof-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--skill, 0%);
  background: linear-gradient(180deg, #2b5fb8, #173b80);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: width var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

.prof-maxed .prof-fill {
  background: linear-gradient(180deg, #f2cf6a, #c99a2e);
}

.prof-value {
  position: relative;
  display: block;
  padding: 0.05rem 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  text-align: center;
  color: var(--text-strong);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
  font-variant-numeric: tabular-nums;
}

.prof-maxed .prof-value {
  color: var(--text-on-gold);
  text-shadow: none;
}

.prof-compact {
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: 0.6rem;
}

.prof-compact .prof-badge {
  width: 2.3rem;
  height: 2.3rem;
  border-width: 2px;
}

/* Every skill in one row above the filters: a crafting skill's card is a
   button that opens its recipe book (the pressed one glows). */
.pf-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 0.6rem;
}

.pf-skill {
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-sm);
  background: var(--tint-row);
  font-family: inherit;
  font-size: var(--fs-body);
  text-align: left;
}

button.pf-skill {
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

button.pf-skill:hover {
  border-color: var(--panel-line-strong);
  background: rgba(212, 175, 55, 0.08);
}

.pf-skill[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--tint-gold);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 0 18px rgba(212, 175, 55, 0.16);
}

.pf-skill .prof-body {
  display: block;
}

.pf-skill-static {
  border-style: dashed;
}

.pf-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem 0.8rem;
}

.pf-field {
  display: flex;
  flex: 1 1 9rem;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.pf-field-wide {
  flex: 2 1 15rem;
}

.pf-label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pf-select,
.pf-search {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.3rem 0.6rem;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius-sm);
  background: #110d16;
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-small);
}

.pf-select:hover,
.pf-search:hover {
  border-color: var(--gold);
}

.pf-select:focus-visible,
.pf-search:focus-visible,
.pf-row button:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 1px;
}

.pf-count {
  flex: 0 0 auto;
  min-width: 6rem;
  padding-bottom: 0.55rem;
  font-size: var(--fs-small);
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pf-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.pf-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pf-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--ink-line);
}

.pf-dot-o { background: #ff8040; }
.pf-dot-m { background: #ffff00; }
.pf-dot-e { background: #40bf40; }
.pf-dot-t { background: #9d9d9d; }

/* The list on the left, the selected recipe on the right; stacked on phones. */
.pf-body {
  display: grid;
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  gap: 1rem;
  align-items: start;
}

.pf-list-wrap {
  max-height: 34rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.3rem 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  background: #0e0b13;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
}

.pf-note {
  padding: 0.5rem 0.8rem;
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--text-muted);
}

.pf-row button {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  width: 100%;
  min-height: 1.9rem;
  padding: 0.15rem 0.7rem;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-small);
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.pf-cat {
  margin-top: 0.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-gold);
}

.pf-fold {
  flex: none;
  width: 0.9rem;
  text-align: center;
}

.pf-cat-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pf-cat-count {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-muted);
}

.pf-row .pf-recipe {
  padding-left: 2rem;
}

.pf-recipe:hover {
  background: #1d1726;
}

.pf-recipe[aria-current="true"] {
  background: #2a2234;
  box-shadow: inset 3px 0 0 var(--gold);
}

.pf-recipe-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The game's difficulty colours (TradeSkillTypeColor), lifted for AA. */
.pf-d-o { color: var(--text-diff-optimal); }
.pf-d-m { color: var(--text-diff-medium); }
.pf-d-e { color: var(--text-diff-easy); }
.pf-d-t { color: var(--text-diff-trivial); }

.pf-detail {
  min-height: 12rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  background: #16111c;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.5);
}

.pf-product {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.pf-product-icon {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border: 2px solid rgba(212, 175, 55, 0.55);
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--ink-line);
}

.pf-icon-none {
  background: radial-gradient(circle at 40% 30%, #3a3046, #110d16);
}

.pf-product-words {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.pf-product-name {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 700;
  line-height: 1.25;
  color: var(--quality-color);
  overflow-wrap: anywhere;
}

.pf-recipe-name,
.pf-facts {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.pf-tools {
  margin-top: 0.85rem;
  font-size: var(--fs-small);
  color: var(--text);
}

.pf-tools-label,
.pf-reagents-title {
  font-weight: 800;
  color: var(--text-gold);
}

.pf-reagents-title {
  margin: 0.9rem 0 0.45rem;
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-reagents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 0.6rem 0.9rem;
}

.pf-reagent {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.pf-reagent-pic {
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
}

.pf-reagent-icon {
  display: block;
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 6px;
}

.pf-reagent-count {
  position: absolute;
  right: -0.35rem;
  bottom: -0.4rem;
  padding: 0 0.28rem;
  border-radius: 5px;
  background: #0b0910;
  font-size: var(--fs-label);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.pf-reagent-name {
  font-size: var(--fs-small);
  color: var(--quality-color);
  overflow-wrap: anywhere;
}

.pf-empty {
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .pf-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .pf-list-wrap {
    max-height: 22rem;
  }

  .pf-count {
    text-align: left;
  }
}

/* --- Import to addon: the Dingboard import string in a modal ------------------ */

.import-dialog {
  width: min(40rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.import-dialog::backdrop {
  background: rgba(3, 2, 6, 0.8);
}

.import-box {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.import-help {
  font-size: var(--fs-text);
  color: var(--text);
}

.import-count {
  margin-top: 0.3rem;
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-muted);
}

.import-text {
  display: block;
  width: 100%;
  min-height: 8rem;
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.8rem;
  resize: vertical;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(212, 175, 55, 0.45);
  background: var(--stone-950);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: anywhere;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
}

.import-text:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

/* Left of the buttons; above them where the row is too narrow. */
.import-status {
  flex: 1 1 13rem;
  min-width: 0;
  font-size: var(--fs-note);
  line-height: 1.4;
  color: var(--text-muted);
}

.import-status-ok {
  color: var(--text-ok);
}

.import-status-hint {
  color: var(--text-warn);
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.import-button {
  min-width: 7.5rem;
  min-height: 2.75rem;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  border: 2px solid rgba(212, 175, 55, 0.55);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.08), rgba(10, 8, 14, 0.9));
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.import-button:hover {
  color: var(--text-gold-bright);
  border-color: var(--gold);
}

.import-button-gold {
  border-color: var(--ink-line);
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--surface-gold) 50%, var(--gold-mid) 100%);
  color: var(--text-on-gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(212, 175, 55, 0.5),
    0 4px 14px rgba(0, 0, 0, 0.45);
}

.import-button-gold:hover {
  border-color: var(--ink-line);
  color: var(--text-on-gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 1px var(--gold-bright),
    0 0 16px rgba(212, 175, 55, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  .import-dialog[open] {
    animation: import-in var(--t-mid) cubic-bezier(0.22, 1, 0.36, 1);
  }

  .import-dialog[open]::backdrop {
    animation: import-fade var(--t-mid) ease-out;
  }
}

@keyframes import-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

@keyframes import-fade {
  from {
    opacity: 0;
  }
}

/* --- dev bar -------------------------------------------------------------- */

.devbar {
  position: fixed;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-line);
  background: rgba(8, 6, 12, 0.94);
  max-width: min(94vw, 30rem);
}

.devbar-title {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.dev-button {
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(30, 24, 40, 0.95);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  cursor: pointer;
}

.dev-button:hover {
  color: var(--text-gold-bright);
  border-color: var(--gold);
}

.dev-button[aria-pressed="true"] {
  color: var(--text-on-gold);
  background: var(--surface-gold);
}

/* --- the podium: the top three as cartoon figures on plinths ------------------ */

/* In the race banner, right of the clock (under it on narrower screens). */
.podium {
  position: relative;
  min-width: 0;
}

/* Spotlights from above, a stone floor below. */
.podium::before {
  content: "";
  position: absolute;
  inset: -1rem 4% 0;
  pointer-events: none;
  background:
    radial-gradient(22% 70% at 50% 0%, rgba(255, 230, 160, 0.16), transparent 75%),
    radial-gradient(16% 60% at 22% 10%, rgba(200, 210, 230, 0.09), transparent 75%),
    radial-gradient(16% 60% at 78% 10%, rgba(230, 170, 120, 0.09), transparent 75%),
    radial-gradient(60% 18% at 50% 100%, rgba(0, 0, 0, 0.55), transparent 75%);
}

.podium-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.4rem, 2vw, 1.4rem);
  padding-top: 0.8rem;
}

.podium-spot {
  flex: 0 1 11.5rem;
  min-width: 0;
}

.podium-1 {
  order: 2;
}

.podium-2 {
  order: 1;
}

.podium-3 {
  order: 3;
}

.podium-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
}

.podium-link:hover {
  color: inherit;
}

.podium-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 90%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--class-color) 32%, transparent), transparent 68%);
  pointer-events: none;
}

.podium-fig {
  position: relative;
  z-index: 1;
  width: clamp(5rem, 9vw, 8rem);
  aspect-ratio: 200 / 260;
  margin-bottom: -0.5rem;
  transition: translate var(--t-mid) cubic-bezier(0.3, 1.6, 0.5, 1);
}

.podium-1 .podium-fig {
  width: clamp(6.2rem, 11vw, 10rem);
}

.podium-link:hover .podium-fig,
.podium-link:focus-visible .podium-fig {
  translate: 0 -8px;
}

.podium-fig > .fig {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.6));
}

/* --head-top: where the leader's head starts (js/views/podium.js measures it). */
.podium-crown,
.phero-crown {
  position: absolute;
  top: calc(var(--head-top, 22%) - 15%);
  left: 50%;
  width: 38%;
  translate: -50% 0;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(255, 210, 100, 0.8));
  animation: crown-bob 2.8s ease-in-out infinite;
}

@keyframes crown-bob {
  0%,
  100% {
    translate: -50% 0;
    rotate: -4deg;
  }
  50% {
    translate: -50% -5px;
    rotate: 4deg;
  }
}

/* Stone plinths with a gold lip; first is the tallest. The figure stands on
   the lip; the medal, name and level are carved into the face. */
.podium-plinth {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 5.8rem;
  padding: 0.5rem 0.45rem 0.55rem;
  border-radius: 6px 6px 2px 2px;
  border-top: 4px solid var(--gold);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.35)),
    linear-gradient(180deg, #3a3144, #221b2a 55%, #15111b);
  box-shadow: 0 0 0 1.5px var(--ink-line), inset 0 2px 0 rgba(255, 240, 200, 0.22), 0 10px 22px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.podium-1 .podium-plinth {
  min-height: 7.2rem;
}

.podium-3 .podium-plinth {
  min-height: 5rem;
}

.podium-name {
  max-width: 100%;
  margin-top: 0.3rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--fs-text);
  font-weight: 800;
  line-height: 1.2;
  color: var(--class-text);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8);
}

.podium-level {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.podium-medal {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #fff2c4;
  background: radial-gradient(circle at 34% 26%, #fff8dc 0%, var(--surface-gold) 45%, #c99a2e 100%);
  box-shadow: 0 0 0 1.5px var(--ink-line), 0 0 14px rgba(255, 210, 100, 0.6);
  font-family: var(--font-display);
  font-size: var(--fs-text);
  font-weight: 900;
  color: var(--text-on-gold);
}

.podium-2 .podium-medal {
  background: radial-gradient(circle at 34% 26%, #ffffff 0%, var(--surface-silver) 50%, #a4aab8 100%);
  box-shadow: 0 0 0 1.5px var(--ink-line);
}

.podium-3 .podium-medal {
  background: radial-gradient(circle at 34% 26%, #ffe2c4 0%, var(--surface-bronze) 50%, #c98450 100%);
  box-shadow: 0 0 0 1.5px var(--ink-line);
}

@media (max-width: 1023.98px) {
  .podium-fig {
    width: clamp(4.6rem, 18vw, 7rem);
  }

  .podium-1 .podium-fig {
    width: clamp(5.6rem, 22vw, 8.4rem);
  }

  .podium-plinth {
    min-height: 5rem;
  }

  .podium-1 .podium-plinth {
    min-height: 6rem;
  }

  .podium-3 .podium-plinth {
    min-height: 4.4rem;
  }
}

@media (max-width: 480px) {
  .podium-plinth {
    padding-inline: 0.3rem;
  }

  .podium-name {
    font-size: var(--fs-small);
  }
}

/* --- Fresh Loot: the rarity filter ---------------------------------------------- */

/* Always the four boxes in one row, sharing the width. */
.loot-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

/* --- Treasure Vault: epic and legendary finds ------------------------------------ */

/* Across the page: the jackpot, then the finds and the treasure still worn,
   then the luckiest; stacked on narrow screens. */
.vault {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem 1.5rem;
  align-items: start;
}

.vault-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* The jackpot: the newest find, big, under turning rays. */
.jackpot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1rem 1.05rem 0.95rem;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--quality-color) 75%, transparent);
  background:
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--quality-color) 18%, transparent), transparent 75%),
    linear-gradient(180deg, #1a1322, #0c0910);
  box-shadow:
    0 0 0 1px var(--ink-line),
    inset 0 0 26px rgba(0, 0, 0, 0.6),
    0 0 22px color-mix(in srgb, var(--quality-color) 32%, transparent);
  animation: jackpot-glow 3.4s ease-in-out infinite;
}

/* A legendary gets a running fire-gold rim. */
.jackpot-legendary {
  border-color: transparent;
  background:
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--quality-color) 20%, #0c0910), #0c0910 75%) padding-box,
    conic-gradient(from var(--rim-angle, 0deg), #ff8000, #ffd27a, #ff4d00, #ffb347, #ff8000) border-box;
  animation: jackpot-glow 3.4s ease-in-out infinite, rim-run 4s linear infinite;
}

@property --rim-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes rim-run {
  to {
    --rim-angle: 360deg;
  }
}

@keyframes jackpot-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px var(--ink-line),
      inset 0 0 26px rgba(0, 0, 0, 0.6),
      0 0 18px color-mix(in srgb, var(--quality-color) 26%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 1px var(--ink-line),
      inset 0 0 26px rgba(0, 0, 0, 0.6),
      0 0 34px color-mix(in srgb, var(--quality-color) 55%, transparent);
  }
}

.jackpot-rays {
  position: absolute;
  z-index: -1;
  top: -60%;
  left: 50%;
  width: 240%;
  aspect-ratio: 1;
  translate: -50% 0;
  background: repeating-conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--quality-color) 16%, transparent) 0deg 7deg,
    transparent 7deg 20deg
  );
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.9) 6%, transparent 42%);
  animation: rays-spin 36s linear infinite;
  pointer-events: none;
}

/* Embers rising off a legendary. */
.jackpot-sparks {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.jackpot-spark {
  position: absolute;
  bottom: -0.5rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--quality-color);
  box-shadow: 0 0 8px var(--quality-color);
  opacity: 0;
}

.jackpot-legendary .jackpot-spark {
  animation: ember-rise 3.2s ease-in infinite;
}

.jackpot-spark:nth-child(1) { left: 12%; animation-delay: 0s; }
.jackpot-spark:nth-child(2) { left: 28%; animation-delay: 1.1s; }
.jackpot-spark:nth-child(3) { left: 46%; animation-delay: 2.2s; }
.jackpot-spark:nth-child(4) { left: 61%; animation-delay: 0.6s; }
.jackpot-spark:nth-child(5) { left: 77%; animation-delay: 1.7s; }
.jackpot-spark:nth-child(6) { left: 90%; animation-delay: 2.7s; }

@keyframes ember-rise {
  0% {
    opacity: 0;
    translate: 0 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: 10px -9rem;
  }
}

/* A find that arrived in this fetch: a big flash. */
.jackpot-fresh {
  animation: jackpot-flash 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) 2, jackpot-glow 3.4s ease-in-out 2.8s infinite;
}

.jackpot-legendary.jackpot-fresh {
  animation: jackpot-flash 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) 2, jackpot-glow 3.4s ease-in-out 2.8s infinite, rim-run 4s linear infinite;
}

@keyframes jackpot-flash {
  0% {
    scale: 1;
    filter: brightness(1);
  }
  25% {
    scale: 1.04;
    filter: brightness(1.6);
  }
  100% {
    scale: 1;
    filter: brightness(1);
  }
}

.jackpot-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quality-color);
  text-shadow: 0 2px 0 var(--ink-line);
}

.jackpot-gem,
.vault-gem {
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  rotate: 45deg;
  border-radius: 2px;
  border: 1.5px solid var(--ink-line);
  background: var(--quality-color);
  box-shadow: 0 0 10px var(--quality-color);
}

.jackpot-item {
  margin-top: 0.35rem;
  line-height: 1.2;
}

.jackpot-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.55rem);
  font-weight: 800;
  color: var(--quality-color);
  text-shadow: 0 2px 0 var(--ink-line), 0 0 18px color-mix(in srgb, var(--quality-color) 55%, transparent);
  overflow-wrap: anywhere;
}

.jackpot-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
  margin-top: 0.55rem;
  font-size: var(--fs-text);
}

.jackpot-bust,
.vault-bust,
.luck-bust {
  flex: none;
  width: 2.3rem;
  height: 2.3rem;
  border-width: 2px;
}

.jackpot-player,
.vault-who,
.luck-name {
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--class-text);
  overflow-wrap: anywhere;
}

.jackpot-player:hover,
.vault-who:hover,
.luck-name:hover {
  text-decoration: underline;
}

.jackpot-verb {
  color: var(--text-muted);
}

.jackpot-sub {
  margin-top: 0.35rem;
  font-size: var(--fs-small);
  color: var(--text-faint);
}

.vault-block {
  min-width: 0;
}

.vault-title {
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-gold);
}

.vault-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vault-find,
.vault-worn {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid color-mix(in srgb, var(--quality-color) 80%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--quality-color) 9%, transparent), var(--tint-row));
}

.vault-worn {
  grid-template-columns: 1rem minmax(0, 1fr);
}

.vault-gem {
  justify-self: center;
  width: 0.7rem;
  height: 0.7rem;
}

.vault-find-body {
  min-width: 0;
  font-size: var(--fs-text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.vault-item {
  display: block;
  font-weight: 700;
  color: var(--quality-color);
}

.vault-by {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.vault-time {
  font-size: var(--fs-small);
  color: var(--text-faint);
  white-space: nowrap;
}

.vault-new {
  animation: feed-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 2;
}

.vault-empty,
.vault-foot,
.vault-more {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-faint);
}

.vault-empty {
  padding: 0.8rem 0.2rem;
  text-align: center;
}

.vault-more {
  margin-top: 0.3rem;
}

/* Luckiest adventurers: places, busts, counts. */
.luck-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.luck {
  display: grid;
  grid-template-columns: 1.4rem auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--tint-row);
}

.luck:first-child {
  background: linear-gradient(90deg, var(--tint-gold), var(--tint-row));
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.luck-place {
  font-family: var(--font-display);
  font-weight: 900;
  text-align: center;
  color: var(--text-gold);
}

.luck-portrait {
  position: relative;
}

.luck-crown {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  width: 1.4rem;
  translate: -50% 0;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(255, 210, 100, 0.8));
}

.luck-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.luck-count {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* --- The armory's talents, professions and reputations ---------------------
   Source lines under the talent summary and the profession's skill bar, and
   the reputation bars' progress into the standing (characters.json fields
   from Blizzard's Profile API, js/armory.js). */

.tal-source {
  font-size: var(--fs-small);
  font-style: italic;
}

.pf-source {
  margin: 0.45rem 0 0;
  font-size: var(--fs-small);
  font-style: italic;
  text-align: right;
  color: var(--text-muted);
}

.pf-source[hidden] {
  display: none;
}

.rep-value {
  font-variant-numeric: tabular-nums;
}

.rep-progress::after {
  min-width: 2px;
  transition: width var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 760px) {
  .pf-source {
    text-align: left;
  }
}

/* --- Turn on Blizzard's API: the "no API data" badge's guide (js/views/apihelp.js) --- */

.badge-action {
  cursor: pointer;
  transition: box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}

/* A small "?" in the badge's own colour: there is more behind it. */
.badge-action::after {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 1.05em;
  height: 1.05em;
  margin-left: 0.35em;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 1;
  vertical-align: -0.08em;
}

.badge-action:hover {
  background-color: rgba(40, 14, 14, 0.9);
  box-shadow: 0 0 0 1px currentColor, 0 0 10px rgba(255, 110, 90, 0.35);
}

.badge-action:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.apihelp-sub {
  flex-basis: 100%;
}

.apihelp-intro {
  font-size: var(--fs-text);
  color: var(--text);
}

.apihelp-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: apihelp-step;
}

.apihelp-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-height: 2rem;
  padding-left: 2.7rem;
}

.apihelp-step::before {
  content: counter(apihelp-step);
  counter-increment: apihelp-step;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: #0d0a12;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-gold-bright);
}

.apihelp-step-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-gold-bright);
}

.apihelp-step-text {
  font-size: var(--fs-text);
  color: var(--text);
}

/* Battle.net's own labels, so they can be spotted on its page. */
.apihelp-label {
  font-weight: 700;
  color: var(--text-gold-bright);
}

.apihelp-label::before {
  content: "“";
}

.apihelp-label::after {
  content: "”";
}

/* "Still missing at level 10?": the second list of the low-level guide. */
.apihelp-then {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: var(--fs-text);
  font-weight: 700;
  color: var(--text-gold-bright);
}

.apihelp-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  text-decoration: none;
}

.apihelp-notes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.apihelp-note {
  font-size: var(--fs-note);
  font-style: italic;
  color: var(--text-muted);
}
