/* ==========================================================================
   Guide pages (server/*): the pieces the Guide pages share beyond the wiki
   layout in roclassicplus-dark.css. Loaded by header.php on module=server.
   Prefixes: gs- Town services, ga- At a glance, gst- Getting started.
   ========================================================================== */

:root {
  /* One colour per kind of service, used by the map pins and list dots. */
  --gs-records: #e3b45c;
  --gs-looks: #f19ac0;
  --gs-cards: #b79cff;
  --gs-modes: #ff8f7e;
  --gs-professions: #7fd6a4;
  --gs-classes: #8ec5ff;
  --gs-shops: #d9c79e;
  --gs-elsewhere: #9fb0c8;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* A page's own menu as a second box under the Guide's: the two hold together in the sticky column, each
   its own panel. */
.rcp-wiki > .rcp-wiki-side {
  position: sticky;
  z-index: 0;
  min-width: 0;
  top: 78px;
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 197, 255, 0.34) transparent;
}
.rcp-wiki-side > .rcp-wiki-nav { position: static; max-height: none; overflow: visible; }
.rcp-wiki-subnav .rcp-wiki-navtitle { margin-bottom: 6px; }
@media (max-width: 900px) {
  .rcp-wiki > .rcp-wiki-side { position: static; max-height: none; overflow: visible; gap: 8px; min-width: 0; }
  /* On a phone each box is a row of links that scrolls sideways, as the Guide's own menu does. */
  .rcp-wiki-side > .rcp-wiki-nav { min-width: 0; overflow-x: auto; overflow-y: hidden; }
}

/* A panel the page's script has put away stays away, whatever its display. */
.rcp-wiki [hidden] { display: none !important; }

/* Tab panels that take turns in one place: all of them share one grid cell, so the place is as tall as
   the tallest and switching never moves the page. The ones not showing are kept, unseen. */
.g-stack { display: grid; }
.g-stack > * { grid-area: 1 / 1; min-width: 0; }
.rcp-wiki .g-stack > [hidden] { display: block !important; visibility: hidden; }
.rcp-wiki .g-stack > .gst-maps[hidden] { display: grid !important; }

/* A scene from the game, full card width. */
.g-scene {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border-node);
  background: var(--bg-panel-deep);
}
.g-caption { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }

/* ---- Town services: the map ------------------------------------------- */

.gs-map {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}
.gs-mapframe {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-node);
  background: #0e1218;
  aspect-ratio: 1 / 1;
}
.gs-mapzoom { position: absolute; }
.gs-mapimg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.gs-pin {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #10151d;
  background: var(--gs-c, var(--accent));
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.gs-pin:hover,
.gs-pin:focus-visible { transform: scale(1.35); outline: none; }
.gs-pin:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.gs-pin.is-on {
  transform: scale(1.45);
  box-shadow: 0 0 0 2px var(--text), 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.gs-tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, calc(-100% - 12px));
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(10, 14, 20, 0.92);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.gs-pin--records { --gs-c: var(--gs-records); }
.gs-pin--looks { --gs-c: var(--gs-looks); }
.gs-pin--cards { --gs-c: var(--gs-cards); }
.gs-pin--modes { --gs-c: var(--gs-modes); }
.gs-pin--professions { --gs-c: var(--gs-professions); }
.gs-pin--classes { --gs-c: var(--gs-classes); }
.gs-pin--shops { --gs-c: var(--gs-shops); }
.gs-pin--elsewhere { --gs-c: var(--gs-elsewhere); }

.gs-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gs-c);
  vertical-align: middle;
  font-size: 0;
}
/* Beside a line of text the dot sits on the middle of the letters, not on the baseline. */
.gs-key { display: inline-flex; align-items: center; }
.rcp-card-title h3:has(> .gs-dot) { display: flex; align-items: center; }
.gs-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* The card beside the map. */
.gs-card h4 { margin: 12px 0 2px; font-size: 18px; color: var(--text); }
.gs-card p { margin: 6px 0 0; }
.gs-card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-node);
  background: var(--bg-panel-deep);
}
.gs-card-where,
.gs-row-where { color: var(--text-muted); font-size: 13px; }

/* ---- Town services: the lists ----------------------------------------- */

.gs-list { display: grid; gap: 2px; }
.gs-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(140, 170, 210, 0.14);
}
.gs-row:first-child { border-top: 0; padding-top: 0; }
.gs-thumb {
  width: 120px;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-panel-deep);
  border: 1px solid var(--border-node);
}
.gs-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-row-body p { margin: 0; }
.gs-row-body p + p { margin-top: 4px; }
.gs-row-name { font-weight: 700; color: var(--text); }
.gs-row-where a { margin-left: 10px; }
.gs-row-show {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(142, 197, 255, 0.4);
  text-underline-offset: 3px;
}
.gs-row-show:hover,
.gs-row-show:focus-visible { color: var(--accent); text-decoration-color: currentColor; }

@media (max-width: 760px) {
  .gs-map { grid-template-columns: minmax(0, 1fr); }
  .gs-row { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .gs-thumb { width: 84px; }
}

/* ---- Tabs inside a Guide page (level bands and the like) -------------- */

.g-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 14px;
  border-bottom: 1px solid rgba(140, 170, 210, 0.2);
}
.g-tab {
  padding: 7px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.g-tab:hover { color: var(--text); }
.g-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); }
.g-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- At a glance ------------------------------------------------------ */

.ga-hero { position: relative; margin: 0 0 16px; }
/* An NPC's sign over its head, as the game draws it (5_Legacy/src/UI/Components/EntityRoom/EntityRoom.css):
   a bubble padded 2px round a 1px themed border, radius 5, a tail under it, the theme's colours and icon. */
.ga-sign,
.ga-sign:visited {
  --sign-bg: #ffffff;
  --sign-line: #c1c6c2;
  --sign-text: #000000;
  position: absolute;
  z-index: 1;
  transform: translate(-50%, calc(-100% - 12px));
  text-decoration: none;
}
.ga-sign-box {
  position: relative;
  display: block;
  padding: 2px;
  border-radius: 5px;
  background: var(--sign-fill, var(--sign-bg));
  white-space: nowrap;
}
.ga-sign-in {
  display: flex;
  align-items: center;
  padding-right: 6px;
  border: 1px solid var(--sign-line);
  border-radius: 5px;
  color: var(--sign-text);
  font-size: 12px;
  line-height: 20px;
}
/* The tail: the same rotated triangle the client puts under its bubble. */
.ga-sign-box::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  margin-left: -10px;
  z-index: -1;
  border-style: solid;
  border-width: 0 10.5px 26px 10.5px;
  border-color: transparent transparent var(--sign-bg) transparent;
  transform: rotate(220deg);
}
.ga-sign-icon { width: 24px; height: 24px; margin: -1px 5px -3px 0; image-rendering: pixelated; }
.ga-sign:hover, .ga-sign:focus-visible { z-index: 3; text-decoration: none; outline: none; }
.ga-sign:hover .ga-sign-box, .ga-sign:focus-visible .ga-sign-box { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.ga-sign .ga-tag-what strong { color: var(--accent); margin-right: 4px; }

.ga-sign.theme-survivors { --sign-fill: linear-gradient(#f7f7ff, #e2e3f3); --sign-bg: #e2e3f3; --sign-line: #7a80b4; --sign-text: #232846; }
.ga-sign.theme-tactics { --sign-fill: linear-gradient(#fbf3de, #eddcb4); --sign-bg: #eddcb4; --sign-line: #9a7442; --sign-text: #3b2a12; }
.ga-sign.theme-aram { --sign-bg: #f5f8ff; --sign-text: #1b2233; }
.ga-sign.theme-aram .ga-sign-in {
  border-color: transparent;
  background: linear-gradient(var(--sign-bg), var(--sign-bg)) padding-box, linear-gradient(90deg, #3f9bff 30%, #ff4a42 70%) border-box;
}
.ga-sign.theme-deeps { --sign-fill: linear-gradient(#f9f5ff, #e6dcf5); --sign-bg: #e6dcf5; --sign-line: #8a6cc4; --sign-text: #2c1f48; }
.ga-sign.theme-hunting { --sign-fill: linear-gradient(#f4eddb, #e2d4ae); --sign-bg: #e2d4ae; --sign-line: #5f7b3a; --sign-text: #2c3418; }
.ga-sign.theme-stylist { --sign-fill: linear-gradient(#fff5f8, #f7dbe5); --sign-bg: #f7dbe5; --sign-line: #b85c7c; --sign-text: #4a1f30; }
.ga-sign.theme-reset { --sign-fill: linear-gradient(#f2fcf6, #d6f0e2); --sign-bg: #d6f0e2; --sign-line: #4c9a7c; --sign-text: #1d3f33; }
.ga-sign.theme-cards { --sign-fill: linear-gradient(#fdf8e8, #f0e2ba); --sign-bg: #f0e2ba; --sign-line: #34578f; --sign-text: #22304a; }
.ga-sign.theme-vault { --sign-fill: linear-gradient(#fff9e0, #f5e3a4); --sign-bg: #f5e3a4; --sign-line: #a87a22; --sign-text: #40300c; }
.ga-sign.theme-graves { --sign-fill: linear-gradient(#f4f5f7, #dcdfe4); --sign-bg: #dcdfe4; --sign-line: #a8343a; --sign-text: #2a2d33; }
.ga-sign.theme-loyalty { --sign-fill: linear-gradient(#fff4f2, #f8d9d6); --sign-bg: #f8d9d6; --sign-line: #b3424c; --sign-text: #4a171c; }
.ga-sign.theme-prestige { --sign-fill: linear-gradient(#f6f1ff, #e3d8f6); --sign-bg: #e3d8f6; --sign-line: #b8891f; --sign-text: #3a2a66; }
.ga-sign.theme-kafra { --sign-fill: linear-gradient(#f1f6ff, #d7e4f8); --sign-bg: #d7e4f8; --sign-line: #4a6fb0; --sign-text: #1c2c4a; }
.ga-sign.theme-auction { --sign-fill: linear-gradient(#eef9f8, #cfeae7); --sign-bg: #cfeae7; --sign-line: #2f8a84; --sign-text: #143836; }
.ga-sign.theme-ledger { --sign-fill: linear-gradient(#fbf7ec, #ebe0c2); --sign-bg: #ebe0c2; --sign-line: #7a4a34; --sign-text: #33211a; }
.ga-sign.theme-guild { --sign-fill: linear-gradient(#fbf1e6, #eedac4); --sign-bg: #eedac4; --sign-line: #94372f; --sign-text: #3a1c16; }

.ga-tag-what {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  width: max-content;
  max-width: 240px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(10, 14, 20, 0.94);
  border: 1px solid rgba(140, 170, 210, 0.3);
  color: var(--text);
  font-size: 12px;
  white-space: normal;
  text-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity 160ms ease, transform 160ms var(--ease-out), visibility 160ms;
  pointer-events: none;
}
.ga-sign:hover .ga-tag-what,
.ga-sign:focus-visible .ga-tag-what { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* A phone's picture is too small for ten names: it shows the NPCs alone. */
@media (max-width: 620px) {
  .ga-sign { display: none; }
}
.ga-hero-img { aspect-ratio: 1120 / 500; object-fit: cover; }

.ga-ladder {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(140, 170, 210, 0.16);
}
.ga-ladder-title { margin: 0 0 10px; font-weight: 700; color: var(--text); }
.ga-ladder-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  height: 150px;
}
.ga-step { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; }
.ga-step-bar {
  align-self: end;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: var(--ga-h);
  padding-top: 6px;
  border-radius: 6px 6px 0 0;
  background: rgba(227, 180, 92, 0.22);
  border: 1px solid rgba(227, 180, 92, 0.5);
  border-bottom: 0;
  color: #f4d79a;
  font-size: 18px;
}
.ga-step.is-base .ga-step-bar {
  background: rgba(142, 197, 255, 0.16);
  border-color: rgba(142, 197, 255, 0.45);
  color: var(--accent);
}
.ga-step-label { text-align: center; font-size: 12px; color: var(--text-muted); }

.ga-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ga-tile,
.ga-tile:visited {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
}
.ga-tile-pic {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-node);
  background: var(--bg-panel-deep);
  font-size: 0;
}
.ga-tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease-out);
}
.ga-tile-name { color: var(--text); font-weight: 700; font-size: 15px; }
.ga-tile-text { font-size: 13px; line-height: 1.5; }
.ga-tile:hover,
.ga-tile:focus-visible { text-decoration: none; color: var(--text-muted); }
.ga-tile:hover .ga-tile-name,
.ga-tile:focus-visible .ga-tile-name { color: var(--accent); }
.ga-tile:hover .ga-tile-img { transform: scale(1.04); }
.ga-tile:hover .ga-tile-pic { border-color: rgba(142, 197, 255, 0.5); }

@media (max-width: 900px) {
  .ga-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ga-tiles { grid-template-columns: minmax(0, 1fr); }
  .ga-ladder-steps { height: 120px; gap: 6px; }
  .ga-step-bar { font-size: 15px; }
}

/* ---- Getting started -------------------------------------------------- */

.gst-steps {
  list-style: none;
  counter-reset: gst;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.gst-step {
  counter-increment: gst;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0 18px 46px;
  position: relative;
  border-top: 1px solid rgba(140, 170, 210, 0.14);
}
.gst-step:first-child { border-top: 0; padding-top: 4px; }
.gst-step::before {
  content: counter(gst);
  position: absolute;
  left: 0;
  top: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(142, 197, 255, 0.14);
  border: 1px solid rgba(142, 197, 255, 0.45);
  color: var(--accent);
  font-weight: 700;
}
.gst-step:first-child::before { top: 4px; }
.gst-step-text { min-width: 0; }
.gst-step-text:only-child { grid-column: 1 / -1; }
.gst-step h4 { margin: 4px 0 6px; font-size: 17px; color: var(--text); }
.gst-step p { margin: 0 0 8px; max-width: 62ch; }
.gst-step-pic { aspect-ratio: 1120 / 500; object-fit: cover; }

.gst-town {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.gst-town-npc,
.gst-town-npc:visited { display: grid; gap: 4px; color: var(--text-muted); font-size: 12px; text-decoration: none; }
.gst-town-pic {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border-node);
  background: var(--bg-panel-deep);
  font-size: 0;
}
.gst-town-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gst-town-npc:hover { color: var(--accent); text-decoration: none; }
.gst-town-npc:hover .gst-town-pic { border-color: rgba(142, 197, 255, 0.5); }

/* The first-job picker. */
.gst-jobs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}
.gst-job {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-node);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.gst-job .rcp-sprites { min-height: 104px; align-items: flex-end; transition: transform 220ms var(--ease-out); }
.gst-job:hover { color: var(--text); border-color: rgba(180, 210, 250, 0.5); }
.gst-job:hover .rcp-sprites { transform: translateY(-3px); }
.gst-job.is-on { color: var(--text); border-color: var(--accent); background: rgba(142, 197, 255, 0.1); }
.gst-job:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.gst-path { margin-top: 16px; }
.gst-path h4 { margin: 0 0 4px; font-size: 18px; color: var(--text); }
/* Room for two lines of description whatever the job, so the chain below never moves when you switch. */
.gst-path > p { margin: 0 0 12px; max-width: 70ch; min-height: 3.2em; }
.gst-tree {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 2fr) auto minmax(0, 2fr);
  align-items: end;
  gap: 12px;
  padding: 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(140, 170, 210, 0.14);
}
.gst-tier { display: grid; gap: 8px; justify-items: center; align-content: end; }
.gst-tier-name { font-size: 12px; color: var(--text-muted); }
.gst-forms { display: flex; gap: 14px; align-items: flex-end; justify-content: space-evenly; width: 100%; }
.gst-form { margin: 0; display: grid; justify-items: center; gap: 4px; }
.gst-form .rcp-sprites { min-height: 104px; }
.gst-form figcaption { font-size: 12px; color: var(--text); text-align: center; }
.gst-arrow { color: var(--text-muted); flex: 0 0 auto; align-self: center; }
.gst-path-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 13px; }

/* Where to level. */
.gst-maps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.gst-map {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: rgba(0, 0, 0, 0.12);
}
.gst-map p { margin: 0; }
.gst-map-name { color: var(--text); font-weight: 700; }
.gst-map-name code { margin-left: 6px; font-weight: 400; }
.gst-map-facts { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.gst-mobs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gst-mob,
.gst-mob:visited {
  display: grid;
  grid-template-columns: 40px auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 4px 10px 4px 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}
.gst-mob:hover { background: rgba(142, 197, 255, 0.12); text-decoration: none; color: var(--text); }
.gst-mob-pic {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 0;
}
.gst-mob-pic img { max-width: 40px; max-height: 40px; image-rendering: pixelated; }
.gst-mob-lv { color: var(--text-muted); font-size: 11px; }

@media (max-width: 900px) {
  .gst-step { grid-template-columns: minmax(0, 1fr); }
  .gst-town { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gst-jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gst-maps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .gst-step { padding-left: 40px; }
  .gst-tree { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .gst-arrow { transform: rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  .gs-pin,
  .ga-tile-img,
  .gst-job,
  .gst-job .rcp-sprites,
  .pr-class,
  .lp-bar,
  .at-card,
  .ui-shot img { transition: none; }
}

/* ---- Prestige -------------------------------------------------------- */

.pr-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.pr-intro p { margin: 0 0 8px; }
.pr-intro-pic { aspect-ratio: 3 / 2; object-fit: cover; }

/* Male or female: both are drawn, the holder's data-sex shows one. */
[data-sex="m"] .pr-sx-f,
[data-sex="f"] .pr-sx-m { display: none; }
.pr-sexes {
  display: inline-flex;
  margin-top: 12px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(140, 170, 210, 0.2);
}
.pr-sex {
  padding: 5px 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pr-sex:hover { color: var(--text); }
.pr-sex.is-on { background: rgba(227, 180, 92, 0.18); color: #f4d79a; }
.pr-sex:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pr-classes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px;
  margin-top: 14px;
}
.pr-class {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.2);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.pr-class .rcp-sprites { min-height: 100px; }
.pr-class:hover { color: var(--text); border-color: rgba(180, 210, 250, 0.5); }
.pr-class.is-on { color: var(--text); border-color: #e3b45c; background: rgba(227, 180, 92, 0.1); }
.pr-class:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pr-chain { margin-top: 16px; }
.pr-looks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 12px 12px;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(227, 180, 92, 0.14), transparent 70%),
    rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(227, 180, 92, 0.22);
}
.pr-look { margin: 0; display: grid; justify-items: center; align-content: end; gap: 8px; }
.pr-look .rcp-sprites { min-height: 200px; }
.pr-look figcaption { display: grid; justify-items: center; text-align: center; gap: 1px; font-size: 12px; }
.pr-look figcaption strong { color: var(--text); font-size: 14px; }
.pr-look-when { color: #e3b45c; }
.pr-look.is-base .pr-look-when { color: var(--text-muted); }
.pr-look-rate { color: var(--text-muted); }
.pr-chain-note { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }

.pr-ladder { display: grid; gap: 8px; margin-top: 14px; }
.pr-rung {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.pr-rung-label { color: var(--text-muted); }
.pr-rung-track { display: block; }
.pr-rung-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, rgba(227, 180, 92, 0.12), rgba(227, 180, 92, 0.42));
  border: 1px solid rgba(227, 180, 92, 0.5);
  border-left: 0;
  color: #f4d79a;
}
.pr-rung.is-base .pr-rung-bar {
  background: linear-gradient(90deg, rgba(142, 197, 255, 0.08), rgba(142, 197, 255, 0.3));
  border-color: rgba(142, 197, 255, 0.45);
  color: var(--accent);
}
.pr-rung-kills { color: var(--text); font-variant-numeric: tabular-nums; }

.pr-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pr-how h4 { margin: 0 0 8px; }
.pr-how ul { margin: 0; }
.pr-checks { list-style: none; padding-left: 0 !important; }
.pr-checks li { position: relative; padding-left: 24px; margin-bottom: 6px; }
.pr-checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 4px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--rcp-success);
  border-bottom: 2px solid var(--rcp-success);
  transform: rotate(-45deg);
}
.pr-window { display: block; max-width: 100%; height: auto; margin: 18px auto 0; }

@media (max-width: 760px) {
  .pr-intro, .pr-how { grid-template-columns: minmax(0, 1fr); }
  .pr-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .pr-rung { grid-template-columns: 84px minmax(0, 1fr); }
  .pr-rung-kills { grid-column: 2; font-size: 12px; color: var(--text-muted); }
}

/* ---- The Ledger and Card announcements ------------------------------- */

.lg-age { font-size: 12px; color: var(--text-muted); }
.lg-section { margin: 20px 0 10px; font-size: 16px; color: var(--text); }
.lg-section span { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.lg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.lg-card {
  padding: 12px 12px 8px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: rgba(0, 0, 0, 0.14);
}
.lg-title { margin: 0 0 8px; color: var(--text); font-weight: 700; font-size: 13px; }
.lg-title small { display: block; font-weight: 400; color: var(--text-muted); font-size: 11px; }
.lg-empty { margin: 0 0 6px; font-size: 13px; color: var(--text-muted); }
.lg-rows { list-style: none; margin: 0; padding: 0; }
.lg-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-top: 1px solid rgba(140, 170, 210, 0.1);
  font-size: 13px;
}
.lg-row:first-child { border-top: 0; }
.lg-rank {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  font-variant-numeric: tabular-nums;
}
.lg-row.is-p1 .lg-rank { background: #e3b45c; color: #2a1d05; font-weight: 700; }
.lg-row.is-p2 .lg-rank { background: #c8d2e0; color: #1b2330; font-weight: 700; }
.lg-row.is-p3 .lg-rank { background: #c9875a; color: #2a1406; font-weight: 700; }
.lg-row.is-p1 .lg-name { color: #f4d79a; }
.lg-who { min-width: 0; display: grid; }
.lg-who a, .lg-who a:visited { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.lg-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-who small { color: var(--text-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-mob { max-width: 28px; max-height: 28px; image-rendering: pixelated; }
.lg-value { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

.lg-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.lg-event {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: rgba(0, 0, 0, 0.14);
}
.lg-event p { margin: 0; }
.lg-event-kind { font-size: 12px; color: var(--text-muted); }
.lg-event-title { color: var(--text); font-weight: 700; margin-top: 2px !important; }
.lg-event-facts { font-size: 12px; color: var(--text-muted); }
.lg-event-won { margin-top: 8px !important; color: #f4d79a; font-size: 13px; }

/* The announcement as the game draws it: yellow broadcast text on a dark band. */
.ca-banner {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(8, 10, 14, 0.75);
  border: 1px solid rgba(255, 239, 79, 0.25);
}
.ca-banner-text { color: #ffef4f; font-size: 14px; }
.ca-banner-text strong { color: #ffef4f; }
.ca-feed { list-style: none; margin: 0; padding: 0; }
.ca-find {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(140, 170, 210, 0.1);
}
.ca-find:first-child { border-top: 0; }
.ca-icon { width: 28px; height: 28px; display: grid; place-items: center; font-size: 0; }
.ca-text { min-width: 0; }
.ca-text strong { color: var(--text); }
.ca-hc {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #ffb4ab;
  border: 1px solid rgba(240, 128, 136, 0.45);
}
.ca-when { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.ca-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- Loyalty: the points calculator ---------------------------------- */

.lp-calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-areas: "controls bars" "totals totals";
  gap: 14px 20px;
  margin: 16px 0;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid rgba(227, 180, 92, 0.25);
  background: rgba(0, 0, 0, 0.16);
}
.lp-controls { grid-area: controls; display: grid; gap: 10px; align-content: start; }
.lp-field { display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; gap: 10px; align-items: center; margin: 0; font-weight: 400; }
.lp-field span { font-size: 13px; color: var(--text-muted); }
.lp-field input[type="range"] { width: 100%; accent-color: #e3b45c; }
.lp-field output { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.lp-check { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 400; font-size: 13px; color: var(--text); }
.lp-check input { accent-color: #e3b45c; margin: 0; }
.lp-hours {
  grid-area: bars;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(140, 170, 210, 0.25);
  font-size: 0;
}
.lp-bar {
  flex: 1 1 0;
  max-width: 28px;
  border-radius: 3px 3px 0 0;
  background: rgba(142, 197, 255, 0.45);
  transition: height 200ms var(--ease-out);
}
.lp-bar.is-mid { background: rgba(227, 180, 92, 0.55); }
.lp-bar.is-top { background: #e3b45c; }
.lp-totals { grid-area: totals; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.lp-totals p { margin: 0; display: grid; }
.lp-totals strong { font-size: 22px; color: #f4d79a; font-variant-numeric: tabular-nums; }
.lp-totals span { font-size: 12px; color: var(--text-muted); }

@media (max-width: 760px) {
  .lp-calc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "controls" "bars" "totals"; }
  .ca-week { grid-template-columns: minmax(0, 1fr); }
  .ca-find { grid-template-columns: 28px minmax(0, 1fr); }
  .ca-when { grid-column: 2; }
}

/* ---- Headgear Atelier ------------------------------------------------ */

.at-desks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.at-desk {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
  color: var(--text-muted);
}
.at-desk strong { color: var(--text); font-size: 13px; }
.at-desk .rcp-navi { justify-self: start; }
.at-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.at-filters input { flex: 1 1 220px; }
.at-filters select { flex: 0 0 180px; }
.at-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.at-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.at-card:hover { border-color: rgba(180, 210, 250, 0.5); }
.at-card.is-on { border-color: #e3b45c; background: rgba(227, 180, 92, 0.08); }
.at-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.at-card-head { display: flex; gap: 8px; align-items: center; }
.at-icon { width: 24px; height: 24px; flex: 0 0 24px; font-size: 0; }
.at-name { color: var(--text); font-weight: 700; font-size: 13px; }
.at-mats { display: flex; flex-wrap: wrap; gap: 4px; }
.at-mat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px 1px 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.at-mat img { width: 20px; height: 20px; }
.at-zeny { padding-left: 6px; color: #f4d79a; }
.at-note { color: var(--text-muted); }

/* ---- Player commands -------------------------------------------------- */

.cm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.cm-row { min-width: 0; }
/* The command as it sits in the game's chat box. */
.cm-chat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px 5px 10px;
  border-radius: 4px;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid rgba(140, 170, 210, 0.16);
}
.cm-cmd { color: #ffffff; font-size: 14px; }
.cm-copy {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(140, 170, 210, 0.3);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.cm-copy:hover { color: var(--text); border-color: var(--accent); }
.cm-copy.is-copied { color: var(--rcp-success); border-color: var(--rcp-success); }
.cm-what { margin: 6px 0 0; font-size: 13px; }

/* ---- Server rules ----------------------------------------------------- */

.ru-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.ru-point,
.ru-point:visited {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.2);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.ru-point strong { color: var(--text); font-size: 14px; }
.ru-point:hover { border-color: rgba(142, 197, 255, 0.5); color: var(--text-muted); text-decoration: none; }

@media (max-width: 760px) {
  .cm-list { grid-template-columns: minmax(0, 1fr); }
  .ru-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Reworked UI and Quality of life -------------------------------- */

.ui-rows { display: grid; gap: 0; }
.ui-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid rgba(140, 170, 210, 0.14);
}
.ui-row:first-child { border-top: 0; padding-top: 4px; }
.ui-row.is-text { grid-template-columns: minmax(0, 1fr); }
.ui-row:nth-child(even):not(.is-text) .ui-text { order: 2; }
.ui-text h4 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.ui-text p { margin: 0 0 6px; max-width: 62ch; }
.ui-whereline { font-size: 12px; color: var(--text-muted); }
.ui-where { color: var(--text-muted); }
.ui-shot {
  display: grid;
  place-items: center;
  max-height: 340px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.16);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(142, 197, 255, 0.08), transparent 70%),
    rgba(0, 0, 0, 0.18);
  overflow: hidden;
  cursor: zoom-in;
}
.ui-shot img {
  display: block;
  max-width: 100%;
  max-height: 318px;
  object-fit: contain;
  transition: transform 320ms var(--ease-out);
}
.ui-shot:hover img { transform: scale(1.03); }
.ui-shot:hover { border-color: rgba(142, 197, 255, 0.45); }

@media (max-width: 760px) {
  .ui-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ui-row:nth-child(even):not(.is-text) .ui-text { order: 0; }
}

/* ---- Game modes: shared pieces (_partials/mode-art.php) --------------- */

.md-icon { flex: 0 0 auto; image-rendering: pixelated; vertical-align: middle; }
.md-sprite { display: block; image-rendering: pixelated; }
.md-mob { display: block; max-width: 64px; max-height: 64px; image-rendering: pixelated; }
.md-card-icon { width: 24px; height: 24px; flex: 0 0 24px; font-size: 0; }

/* Survivors: cards. */
.md-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.md-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.16);
  background: rgba(0, 0, 0, 0.12);
  font-size: 13px;
}
.md-card-body { display: grid; gap: 2px; min-width: 0; }
.md-card-body strong { color: var(--text); }
.md-card-body small { color: var(--text-muted); font-size: 11px; }

/* Survivors: evolutions, skill + card -> evolved skill. */
.md-evos { display: grid; gap: 6px; }
.md-evo {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 14px minmax(0, 0.7fr) 18px minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(140, 170, 210, 0.12);
  font-size: 12px;
}
.md-evo-skill, .md-evo-card { display: flex; gap: 8px; align-items: center; min-width: 0; }
.md-evo-skill > span { display: grid; min-width: 0; }
.md-evo-skill strong { color: var(--text); font-size: 13px; }
.md-evo-skill small { color: var(--text-muted); }
.md-evo-skill.is-evolved strong { color: #f4d79a; }
.md-evo-plus, .md-evo-arrow { color: var(--text-muted); text-align: center; }
.md-evo-card span { color: var(--text); }

/* Survivors: the class roster. */
.md-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.md-class {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.16);
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
}
.md-class-pic { display: grid; place-items: end center; font-size: 0; }
.md-class-body p { margin: 0 0 4px; }
.md-class-name { color: var(--text); font-weight: 700; font-size: 14px; }
.md-class-name span { margin-left: 6px; font-weight: 400; font-size: 12px; color: #f4d79a; }
.md-class-start { display: flex; gap: 6px; align-items: center; color: var(--text); }
.md-class-stats { color: var(--rcp-success); }
.md-class-unlock { color: var(--text-muted); font-size: 11px; }

/* Survivors: stages with bosses and the run's timeline. */
.md-stages { display: grid; gap: 12px; }
.md-stage {
  padding: 14px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.16);
  background: rgba(0, 0, 0, 0.12);
}
.md-stage-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.md-stage-head h4 { margin: 0; font-size: 16px; color: var(--text); }
.md-stage-head span { font-size: 12px; color: var(--text-muted); }
.md-stage > p { margin: 6px 0 0; font-size: 13px; }
.md-bosses { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 4px; }
.md-boss, .md-boss:visited { display: grid; justify-items: center; align-content: end; gap: 4px; min-width: 72px; color: var(--text); font-size: 12px; text-decoration: none; }
.md-boss:hover { color: #ff8f7e; text-decoration: none; }
.md-timeline {
  position: relative;
  height: 14px;
  margin: 12px 0 4px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(142, 197, 255, 0.10), rgba(240, 128, 136, 0.18));
  border: 1px solid rgba(140, 170, 210, 0.18);
}
.md-tick {
  position: absolute;
  top: 2px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgba(200, 215, 235, 0.65);
  font-size: 0;
}
.md-tick--elite { background: #e3b45c; }
.md-tick--boss, .md-tick--final { background: #ff6f61; width: 10px; height: 10px; top: 1px; margin-left: -5px; }
.md-timeline-end { position: absolute; right: -1px; top: -3px; bottom: -3px; width: 2px; background: #ff6f61; font-size: 0; }
.md-stage-unlock { font-size: 12px !important; color: var(--text-muted); }

/* Tactics: shop odds, traits and units. */
.tc-cost-1 { background: #9aa7b8; } .tc-cost-2 { background: #6fcf8e; } .tc-cost-3 { background: #5aa9ff; }
.tc-cost-4 { background: #c08cff; } .tc-cost-5 { background: #f0b950; }
.tc-odds { display: grid; gap: 4px; margin: 10px 0 8px; }
.tc-odds-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12px; }
.tc-odds-level { color: var(--text-muted); }
.tc-odds-bar { display: flex; height: 20px; border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, 0.2); }
.tc-seg { display: grid; place-items: center; color: #10151d; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-odds-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--text-muted); }
.tc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; font-size: 0; }
.tc-traits { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.tc-trait {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.tc-trait:hover { border-color: rgba(180, 210, 250, 0.5); }
.tc-trait.is-on { border-color: #e3b45c; background: rgba(227, 180, 92, 0.1); }
.tc-trait:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc-trait-head { display: flex; gap: 8px; align-items: center; }
.tc-trait-head strong { color: var(--text); font-size: 13px; }
.tc-trait-counts { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tc-cost-head { display: flex; align-items: center; margin: 18px 0 8px; }
.tc-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.tc-unit {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.16);
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
  transition: opacity 200ms ease, border-color 200ms ease, transform 200ms var(--ease-out);
}
.tc-unit p { margin: 0 0 3px; }
.tc-unit-pic { display: grid; place-items: end center; font-size: 0; }
.tc-unit-name { color: var(--text); font-weight: 700; font-size: 13px; }
.tc-unit-traits { color: var(--text-muted); }
.tc-unit-ability { display: flex; gap: 6px; align-items: center; color: var(--text); }
.tc-unit-stats { color: var(--text-muted); font-size: 11px; }
.tc-unit.is-dim { opacity: 0.32; }
.tc-unit.is-lit { border-color: #e3b45c; transform: translateY(-2px); }

/* ARAM: kits, the lane and the shop. */
.ar-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; margin: 12px 0; }
.ar-pick {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.18);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.ar-pick:hover { color: var(--text); border-color: rgba(180, 210, 250, 0.5); }
.ar-pick.is-on { color: var(--text); border-color: var(--accent); background: rgba(142, 197, 255, 0.1); }
.ar-pick img { max-height: 90px; width: auto; }
.ar-kit-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 10px; }
.ar-kit-head h4 { margin: 0; font-size: 18px; color: var(--text); }
.ar-kit-head span { font-size: 12px; color: var(--text-muted); }
.ar-abilities { display: grid; gap: 8px; }
.ar-ability {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(140, 170, 210, 0.12);
  font-size: 13px;
}
.ar-ability p { margin: 0 0 4px; }
.ar-key {
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 6px;
  background: rgba(142, 197, 255, 0.12);
  border: 1px solid rgba(142, 197, 255, 0.4);
  color: var(--accent);
  font-weight: 700;
}
.ar-ability.is-passive .ar-key { font-size: 11px; color: #f4d79a; border-color: rgba(227, 180, 92, 0.5); background: rgba(227, 180, 92, 0.1); }
.ar-ability-name { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 700; }
.ar-ability-meta { font-size: 12px; color: var(--text-muted); }
.ar-rank { color: var(--text-muted); }
.ar-rank-sep { color: rgba(180, 189, 208, 0.45); margin: 0 1px; }
.ar-ad { color: #ff9f6b; } .ar-ap { color: #8ec5ff; } .ar-hp { color: #7fd6a4; } .ar-armor { color: #e3b45c; }
.ar-lane { margin: 16px 0 0; display: grid; justify-items: center; gap: 8px; }
.ar-lane svg { width: min(100%, 360px); height: auto; border-radius: 6px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(140, 170, 210, 0.16); }
.ar-lane figcaption { font-size: 12px; color: var(--text-muted); text-align: center; max-width: 60ch; }
.ar-lane-road { stroke: rgba(216, 199, 158, 0.35); stroke-width: 26; stroke-linecap: round; }
.ar-fountain { opacity: 0.35; }
.ar-team-0 { fill: #5aa9ff; } .ar-team-1 { fill: #ff6f61; }
.ar-struct { stroke: #10151d; stroke-width: 1; }
.ar-herb { fill: #7fd6a4; }
.ar-shop-head { margin: 16px 0 8px; }
.ar-tier-silver { color: #c8d2e0; } .ar-tier-gold { color: #e3b45c; } .ar-tier-prismatic { color: #d7a6ff; }
.ar-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ar-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.16);
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
}
.ar-item p { margin: 0 0 3px; }
.ar-item-name { color: var(--text); font-weight: 700; font-size: 13px; }
.ar-item-name span { margin-left: 6px; font-weight: 400; color: #f4d79a; font-size: 12px; }
.ar-item-stats { color: var(--rcp-success); }
.ar-item-comps { color: var(--text-muted); font-size: 11px; }

@media (max-width: 760px) {
  .md-evo { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .md-evo-plus, .md-evo-arrow { display: none; }
  .md-evo-skill.is-evolved::before { content: 'Evolves into'; font-size: 11px; color: var(--text-muted); margin-right: 4px; }
  .tc-odds-row { grid-template-columns: 56px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tc-trait, .tc-unit { transition: none; }
}

/* A window capture (a /uishot, transparent): drawn at its own pixels, never stretched past them. */
.gst-step-win { display: block; max-width: 100%; height: auto; margin: 0 auto; image-rendering: auto; }

/* ---- Questlines: css/questlines.css ---- */
