/* Project Dynasty Cap Lab (2026-10-07).
   Drilled-in cap room launched from the Owner Desk cap cockpit. Layered
   surfaces, display-type counters, inline SVG charts. Light + dark parity,
   1440/390 with zero horizontal overflow. Scoped under .cap-lab / .cl-entry. */

.cap-lab {
  position: fixed;
  inset: 0;
  z-index: 2147482200;
  color: var(--pd-text-primary);
  font-family: var(--pd-font-body);
}

.cap-lab-open,
html.cap-lab-open body {
  overflow: hidden;
}

.cl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 13, 21, 0.66);
  backdrop-filter: blur(5px);
}

.cap-lab-room {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(1rem, 2.4vw, 2.25rem)) clamp(0.9rem, 3vw, 2.5rem) 4.5rem;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(31, 85, 197, 0.1), transparent 60%),
    radial-gradient(900px 480px at 88% 4%, rgba(201, 146, 47, 0.08), transparent 58%),
    linear-gradient(180deg, #f6f8fb, #eef2f7 42%, #e9eef5);
}

.cap-lab-room > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.cl-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #e8eef6;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  background: #0d1b2c;
}

/* ------------------------------------------------------------------ entry -- */

.cl-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  padding: 1.15rem 1.35rem;
  border: 1px solid #2c4f78;
  border-left: 6px solid #c9922f;
  border-radius: 16px;
  background: linear-gradient(135deg, #0e2138, #16395f 58%, #102944);
  box-shadow: 0 16px 34px rgba(9, 22, 38, 0.28);
  color: #f4f8fc;
  text-align: left;
  cursor: pointer;
  font-family: var(--pd-font-body);
}

.cl-entry:hover,
.cl-entry:focus-visible {
  border-color: #d7a93c;
  box-shadow: 0 18px 40px rgba(9, 22, 38, 0.4);
  outline: none;
}

.cl-entry-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.cl-entry-copy small {
  color: #e2b457;
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.18em;
}

.cl-entry-copy strong {
  font: 1000 clamp(1.05rem, 1.6vw, 1.4rem) / 1.12 var(--pd-font-display);
  letter-spacing: 0.01em;
}

.cl-entry-copy em {
  color: #c3d3e6;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.45;
  max-width: 56ch;
}

.cl-entry-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 180, 87, 0.55);
  background: rgba(12, 26, 44, 0.6);
  color: #f8e6b8;
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cl-entry-go i {
  font-style: normal;
  font-size: 1rem;
}

.cl-entry:hover .cl-entry-go {
  background: #c9922f;
  color: #14202f;
}

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

.cl-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.cl-back {
  flex: 0 0 auto;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--pd-border);
  background: var(--pd-surface-base);
  color: var(--pd-text-primary);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.cl-back:hover,
.cl-back:focus-visible {
  border-color: var(--pd-border-strong);
  outline: none;
}

.cl-title {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.cl-title small {
  color: #a87b16;
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.2em;
}

.cl-title h2 {
  margin: 0;
  font: 1000 clamp(1.7rem, 3.4vw, 2.7rem) / 1 var(--pd-font-display);
  letter-spacing: -0.01em;
  color: #102944;
}

.cl-title em {
  color: #66768a;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.cl-live {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  border: 1px solid #cfa64a;
  background: #fdf3dd;
  color: #7a5a10;
  font-size: 0.6rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
}

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

.cl-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.cl-counter {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d6e0e9;
  border-radius: 15px;
  background: linear-gradient(160deg, #ffffff, #f4f8fc);
  box-shadow: 0 12px 26px rgba(11, 31, 52, 0.07);
}

.cl-counter small {
  color: #7b8aa0;
  font-size: 0.6rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
}

.cl-counter strong {
  color: #102944;
  font: 1000 clamp(1.5rem, 2.6vw, 2.15rem) / 1 var(--pd-font-display);
  letter-spacing: -0.01em;
}

.cl-counter em {
  color: #66768a;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
}

.cl-meter {
  display: block;
  height: 5px;
  margin-top: 0.35rem;
  border-radius: 99px;
  background: #e6edf4;
  overflow: hidden;
}

.cl-meter b {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2b6cb0, #7fb2e5);
}

/* ---------------------------------------------------------------- section -- */

.cl-section {
  margin-bottom: 1.1rem;
  border: 1px solid #d6e0e9;
  border-radius: 16px;
  background: linear-gradient(170deg, #ffffff, #f7fafd);
  box-shadow: 0 12px 28px rgba(11, 31, 52, 0.06);
  overflow: hidden;
}

.cl-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.2rem 0.8rem;
  border-bottom: 1px solid #e8eef4;
}

.cl-section-head small {
  display: block;
  color: #a87b16;
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
}

.cl-section-head h3 {
  margin: 0.1rem 0 0.15rem;
  color: #102944;
  font: 1000 clamp(1.15rem, 2vw, 1.6rem) / 1.05 var(--pd-font-display);
}

.cl-section-head em {
  color: #66768a;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 750;
}

.cl-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  color: #7b8aa0;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cl-legend-bar {
  width: 22px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #1f4e7c, #7fb2e5);
}

.cl-legend-avg {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: #c9922f;
}

/* ----------------------------------------------------------------- board -- */

.cl-board-rows {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0.8rem 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.cl-board-row {
  display: grid;
  grid-template-columns: 30px 42px minmax(110px, 1.25fr) minmax(150px, 2.1fr) 82px 78px 106px;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e6ecf2;
  border-radius: 11px;
  background: #fbfdff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: var(--pd-font-body);
  min-width: 0;
}

.cl-board-row:hover,
.cl-board-row:focus-visible {
  border-color: #9fb8cf;
  background: #f2f8fd;
  outline: none;
}

.cl-board-item:first-child .cl-board-row {
  border-color: #d9b25c;
  background: linear-gradient(120deg, #fff9ec, #fbfdff 66%);
}

.cl-rank {
  color: #7b8aa0;
  font: 1000 0.85rem / 1 var(--pd-font-mono);
}

.cl-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(160deg, #16395f, #0d1b2c);
  color: #dbe7f4;
  font-weight: 1000;
}

.cl-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cl-avatar b {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.cl-avatar-sm {
  width: 40px;
  height: 44px;
}

.cl-avatar-lg {
  width: 58px;
  height: 64px;
}

.cl-identity {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.cl-identity strong {
  color: #102944;
  font-size: 0.82rem;
  font-weight: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-identity small {
  color: #7b8aa0;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-bar {
  position: relative;
  display: block;
  height: 14px;
  border-radius: 7px;
  background: #eef3f8;
  overflow: hidden;
  min-width: 0;
}

.cl-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 7px;
  background: linear-gradient(90deg, #1f4e7c, #7fb2e5);
}

.cl-board-avg {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  border-radius: 2px;
  background: #d7a93c;
  box-shadow: 0 0 0 1px rgba(19, 32, 47, 0.22);
}

.cl-hit {
  color: #102944;
  font: 1000 0.85rem / 1 var(--pd-font-mono);
  text-align: right;
}

.cl-share {
  color: #66768a;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.cl-pos-rank {
  color: #1f55c5;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 1000;
  text-align: right;
  white-space: nowrap;
}

.cl-empty {
  padding: 1rem 0.6rem;
  color: #66768a;
  font-size: 0.78rem;
  font-weight: 800;
}

/* --------------------------------------------------------------- scatter -- */

.cl-controls {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
  flex: 0 0 auto;
}

.cl-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid #d6e0e9;
  background: #eef3f8;
}

.cl-toggle button {
  padding: 0.35rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #52525b;
  font-family: var(--pd-font-body);
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.cl-toggle button.is-active {
  background: #102944;
  color: #f4f8fc;
}

.cl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.cl-chip {
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #d6e0e9;
  background: #ffffff;
  color: #52525b;
  font-family: var(--pd-font-body);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.cl-chip.is-active {
  border-color: #173c63;
  background: #173c63;
  color: #f4f8fc;
}

.cl-quad-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.8rem 1.2rem 0;
}

.cl-quad-chip {
  display: grid;
  gap: 0.05rem;
  padding: 0.4rem 0.65rem;
  border-radius: 9px;
  border: 1px solid #e6ecf2;
  background: #fbfdff;
  min-width: 0;
}

.cl-quad-chip b {
  font-size: 0.68rem;
  font-weight: 1000;
}

.cl-quad-chip small {
  color: #7b8aa0;
  font-size: 0.6rem;
  font-weight: 800;
}

.cl-plot {
  padding: 0.6rem 0.9rem 0.2rem;
}

.cl-scatter-svg {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 0 auto;
}

.cl-q-fill {
  opacity: 1;
}

.cl-q-bargain-fill {
  fill: rgba(31, 138, 84, 0.09);
}

.cl-q-elite-fill {
  fill: rgba(201, 146, 47, 0.11);
}

.cl-q-overpaid-fill {
  fill: rgba(180, 85, 47, 0.1);
}

.cl-q-fair-fill {
  fill: rgba(123, 138, 160, 0.08);
}

.cl-grid {
  stroke: #e2e9f0;
  stroke-width: 1;
}

.cl-axis-ref {
  stroke: #a87b16;
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
}

.cl-tick {
  fill: #66768a;
  font-size: 13px;
  font-weight: 900;
  font-family: var(--pd-font-mono);
  text-anchor: middle;
}

.cl-axis-title {
  fill: #7b8aa0;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-anchor: middle;
}

.cl-dot {
  stroke: #ffffff;
  stroke-width: 1.6;
  cursor: pointer;
}

.cl-dot.cl-q-bargain {
  fill: #1f8a54;
}

.cl-dot.cl-q-elite {
  fill: #c9922f;
}

.cl-dot.cl-q-overpaid {
  fill: #b4552f;
}

.cl-dot.cl-q-fair {
  fill: #66768a;
}

.cl-dot.is-fallback {
  fill: none;
  stroke: #b4552f;
  stroke-width: 2.4;
  stroke-dasharray: 3 3;
}

.cl-q-bargain b {
  color: #1f8a54;
}

.cl-q-elite b {
  color: #8a6312;
}

.cl-q-overpaid b {
  color: #b4552f;
}

.cl-q-fair b {
  color: #52525b;
}

/* ---------------------------------------------------------------- detail -- */

.cl-detail {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 14, 22, 0.58);
  backdrop-filter: blur(3px);
}

.cl-detail-panel {
  width: min(760px, 100%);
  max-height: min(88vh, 880px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d6e0e9;
  border-radius: 18px;
  background: linear-gradient(170deg, #ffffff, #f4f8fc);
  box-shadow: 0 26px 60px rgba(7, 17, 31, 0.4);
}

.cl-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.1rem 1.2rem 0.9rem;
  border-bottom: 1px solid #e8eef4;
}

.cl-detail-head > span {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.cl-detail-head small {
  color: #7b8aa0;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.cl-detail-head h3 {
  margin: 0.1rem 0;
  color: #102944;
  font: 1000 clamp(1.2rem, 2.2vw, 1.7rem) / 1.05 var(--pd-font-display);
}

.cl-detail-head em {
  color: #66768a;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.cl-detail-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #d6e0e9;
  background: #ffffff;
  color: #102944;
  font-size: 0.9rem;
  font-weight: 1000;
  cursor: pointer;
}

.cl-detail-close:hover,
.cl-detail-close:focus-visible {
  border-color: #173c63;
  outline: none;
}

.cl-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.2rem 1.2rem;
}

.cl-detail-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e6ecf2;
  border-radius: 13px;
  background: #fbfdff;
  min-width: 0;
}

.cl-detail-card > small {
  color: #a87b16;
  font-size: 0.6rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
}

.cl-detail-card h4 {
  margin: 0;
  color: #102944;
  font: 1000 1.05rem / 1.1 var(--pd-font-display);
}

.cl-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
}

.cl-detail-stats span {
  display: grid;
  gap: 0.15rem;
}

.cl-detail-stats small {
  color: #7b8aa0;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.cl-detail-stats b {
  color: #102944;
  font: 1000 0.95rem / 1 var(--pd-font-mono);
}

.cl-detail-stats b.is-dead {
  color: #b4552f;
}

.cl-detail-stats b.is-clear {
  color: #1f8a54;
}

.cl-season-svg {
  display: block;
  width: 100%;
  height: auto;
}

.cl-season-bar {
  fill: #a9c3de;
}

.cl-season-bar.is-current {
  fill: #1f4e7c;
}

.cl-season-label {
  fill: #7b8aa0;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.cl-season-value {
  fill: #102944;
  font-size: 13px;
  font-weight: 1000;
  text-anchor: middle;
}

.cl-compare {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: #eef3f8;
  overflow: hidden;
}

.cl-compare > i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 7px;
  background: linear-gradient(90deg, #1f4e7c, #7fb2e5);
}

.cl-compare > b {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  border-radius: 2px;
  background: #d7a93c;
  box-shadow: 0 0 0 1px rgba(19, 32, 47, 0.22);
}

.cl-note {
  margin: 0.15rem 0 0;
  color: #66768a;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1.45;
}

/* ------------------------------------------------------------------ dark -- */

:root[data-theme="dark"] .cap-lab-room {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(63, 110, 166, 0.22), transparent 60%),
    radial-gradient(900px 480px at 88% 4%, rgba(201, 146, 47, 0.1), transparent 58%),
    linear-gradient(180deg, #0a1524, #0b1727 46%, #0a1220);
}

:root[data-theme="dark"] .cl-title h2,
:root[data-theme="dark"] .cl-section-head h3,
:root[data-theme="dark"] .cl-counter strong,
:root[data-theme="dark"] .cl-identity strong,
:root[data-theme="dark"] .cl-hit,
:root[data-theme="dark"] .cl-detail-head h3,
:root[data-theme="dark"] .cl-detail-card h4,
:root[data-theme="dark"] .cl-detail-stats b,
:root[data-theme="dark"] .cl-season-value,
:root[data-theme="dark"] .cl-detail-close {
  color: #f4f7fa;
}

:root[data-theme="dark"] .cl-title em,
:root[data-theme="dark"] .cl-counter em,
:root[data-theme="dark"] .cl-section-head em,
:root[data-theme="dark"] .cl-identity small,
:root[data-theme="dark"] .cl-share,
:root[data-theme="dark"] .cl-detail-head em,
:root[data-theme="dark"] .cl-note,
:root[data-theme="dark"] .cl-empty {
  color: #9fb0c4;
}

:root[data-theme="dark"] .cl-back,
:root[data-theme="dark"] .cl-detail-close {
  border-color: #2a3b4e;
  background: #0d1b2c;
  color: #f4f7fa;
}

:root[data-theme="dark"] .cl-counter {
  border-color: #2a3b4e;
  background: linear-gradient(160deg, #101f31, #0d1b2c);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .cl-meter {
  background: #1c2f45;
}

:root[data-theme="dark"] .cl-section {
  border-color: #2a3b4e;
  background: linear-gradient(170deg, #0f1e2f, #0c1929);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .cl-section-head {
  border-bottom-color: #1d2f44;
}

:root[data-theme="dark"] .cl-legend {
  color: #9fb0c4;
}

:root[data-theme="dark"] .cl-board-row {
  border-color: #24364b;
  background: #0d1b2c;
}

:root[data-theme="dark"] .cl-board-row:hover,
:root[data-theme="dark"] .cl-board-row:focus-visible {
  border-color: #3f6ea6;
  background: #122740;
}

:root[data-theme="dark"] .cl-board-item:first-child .cl-board-row {
  border-color: #8a6a24;
  background: linear-gradient(120deg, #1c2433, #101f31 70%);
}

:root[data-theme="dark"] .cl-bar,
:root[data-theme="dark"] .cl-compare {
  background: #1c2f45;
}

:root[data-theme="dark"] .cl-pos-rank {
  color: #8eb4ff;
}

:root[data-theme="dark"] .cl-toggle {
  border-color: #2a3b4e;
  background: #101f31;
}

:root[data-theme="dark"] .cl-toggle button {
  color: #9fb0c4;
}

:root[data-theme="dark"] .cl-toggle button.is-active {
  background: #e8eef7;
  color: #102944;
}

:root[data-theme="dark"] .cl-chip {
  border-color: #2a3b4e;
  background: #0d1b2c;
  color: #9fb0c4;
}

:root[data-theme="dark"] .cl-chip.is-active {
  border-color: #8eb4ff;
  background: #24405f;
  color: #eef4fb;
}

:root[data-theme="dark"] .cl-quad-chip,
:root[data-theme="dark"] .cl-detail-card {
  border-color: #24364b;
  background: #0d1b2c;
}

:root[data-theme="dark"] .cl-quad-chip small {
  color: #9fb0c4;
}

:root[data-theme="dark"] .cl-q-bargain b {
  color: #6fd39a;
}

:root[data-theme="dark"] .cl-q-elite b {
  color: #ecc35e;
}

:root[data-theme="dark"] .cl-q-overpaid b {
  color: #ff9d7a;
}

:root[data-theme="dark"] .cl-q-fair b {
  color: #c2ccd9;
}

:root[data-theme="dark"] .cl-grid {
  stroke: #1d3147;
}

:root[data-theme="dark"] .cl-axis-ref {
  stroke: #e0b64f;
}

:root[data-theme="dark"] .cl-tick,
:root[data-theme="dark"] .cl-axis-title,
:root[data-theme="dark"] .cl-season-label {
  fill: #9fb0c4;
}

:root[data-theme="dark"] .cl-dot {
  stroke: #0b1727;
}

:root[data-theme="dark"] .cl-dot.cl-q-bargain {
  fill: #4ec483;
}

:root[data-theme="dark"] .cl-dot.cl-q-elite {
  fill: #e0b64f;
}

:root[data-theme="dark"] .cl-dot.cl-q-overpaid {
  fill: #ff8f6b;
}

:root[data-theme="dark"] .cl-dot.cl-q-fair {
  fill: #9fb0c4;
}

:root[data-theme="dark"] .cl-dot.is-fallback {
  fill: none;
  stroke: #ff9d7a;
}

:root[data-theme="dark"] .cl-season-bar {
  fill: #33506f;
}

:root[data-theme="dark"] .cl-season-bar.is-current {
  fill: #8eb4ff;
}

:root[data-theme="dark"] .cl-detail-panel {
  border-color: #2a3b4e;
  background: linear-gradient(170deg, #101f31, #0c1929);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.56);
}

:root[data-theme="dark"] .cl-detail-head {
  border-bottom-color: #1d2f44;
}

/* ----------------------------------------------------------------- phone -- */

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

  .cl-top {
    flex-wrap: wrap;
  }

  .cl-live {
    margin-left: 0;
  }

  .cl-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cl-controls {
    justify-items: start;
    width: 100%;
  }

  .cl-chips {
    justify-content: flex-start;
  }

  .cl-board-row {
    grid-template-columns: 26px 38px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank avatar identity hit"
      "bar bar bar bar"
      "share share posrank posrank";
    row-gap: 0.35rem;
  }

  .cl-rank {
    grid-area: rank;
  }

  .cl-board-row > .cl-avatar {
    grid-area: avatar;
  }

  .cl-identity {
    grid-area: identity;
  }

  .cl-bar {
    grid-area: bar;
  }

  .cl-hit {
    grid-area: hit;
  }

  .cl-share {
    grid-area: share;
    text-align: left;
  }

  .cl-pos-rank {
    grid-area: posrank;
  }

  .cl-avatar-sm {
    width: 36px;
    height: 40px;
  }

  .cl-entry {
    flex-direction: column;
    align-items: flex-start;
  }

  .cl-detail {
    padding: 0.6rem;
    place-items: end center;
  }

  .cl-detail-panel {
    max-height: 92vh;
    border-radius: 16px;
  }

  .cl-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cap-lab *,
  .cl-entry {
    transition: none !important;
    animation: none !important;
  }
}
