:root {
  --r: 14px;
  --tr: 150ms ease;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background:
    radial-gradient(
      900px 480px at 85% -120px,
      rgba(99, 102, 241, 0.14),
      transparent 60%
    ),
    radial-gradient(
      700px 400px at -10% 8%,
      rgba(34, 211, 238, 0.06),
      transparent 55%
    ),
    var(--bg);
  color: var(--tx);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 100vh;
}
.tabnum,
.tn {
  font-variant-numeric: tabular-nums;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--a2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- header ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bd);
}
.top-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.45);
  flex: none;
}
.bt {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 15.5px;
  white-space: nowrap;
}
.bt em {
  font-style: normal;
  font-weight: 600;
  color: var(--dim);
  margin-left: 4px;
}
nav.pills {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: rgba(var(--ink), 0.03);
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
nav.pills::-webkit-scrollbar {
  display: none;
}
.pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  transition:
    color var(--tr),
    background var(--tr);
}
.pill:hover {
  color: var(--tx);
  background: rgba(var(--ink), 0.05);
}
.pill.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 12px rgba(79, 120, 240, 0.4);
}
.hgrp {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.upd {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}
.upd small {
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.upd span {
  font-size: 12.5px;
  color: var(--dim);
}
button.rnd {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--s2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color var(--tr),
    transform var(--tr);
}
button.rnd:hover {
  border-color: var(--bd2);
}
button.rnd:active {
  transform: scale(0.94);
}
button.rnd svg {
  width: 16px;
  height: 16px;
  stroke: var(--dim);
}
button.rnd.spin svg {
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.usr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--bd);
}
.usr b {
  font-size: 12.5px;
  color: var(--dim);
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usr button {
  font-size: 12px;
  color: var(--faint);
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: var(--tr);
}
.usr button:hover {
  color: var(--err);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

/* ---------- layout ---------- */
main.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 16px 72px;
}
.banner {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(248, 113, 113, 0.09);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--error-text);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.banner.info {
  background: rgba(99, 102, 241, 0.09);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--info-text);
}
section.grp {
  margin-bottom: 26px;
}
.seclabel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--dim);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.seclabel .hint {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
  font-weight: 500;
}
.grid {
  display: grid;
  gap: 12px;
}
.grid > * {
  min-width: 0;
}
.g2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  transition:
    border-color var(--tr),
    box-shadow var(--tr),
    transform var(--tr);
}
.card.lift:hover {
  border-color: var(--bd2);
  box-shadow: var(--shadow-card);
}
.card.pad0 {
  padding: 0;
  overflow: hidden;
}
.card.pad0 > .seclabel {
  padding: 14px 16px 2px;
  margin-bottom: 2px;
}
.chip-l {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
}
.stat .v {
  overflow-wrap: anywhere;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat .vs {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.delta {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.delta.up {
  color: var(--ok);
  background: rgba(52, 211, 153, 0.12);
}
.delta.dn {
  color: var(--err);
  background: rgba(248, 113, 113, 0.12);
}
.delta.flat {
  color: var(--dim);
  background: rgba(var(--ink), 0.06);
}

/* ---------- hero (daily) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 12px;
}
.hero-main {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  background:
    radial-gradient(
      420px 220px at 108% -30%,
      rgba(34, 211, 238, 0.16),
      transparent 60%
    ),
    radial-gradient(
      360px 240px at -20% 120%,
      rgba(99, 102, 241, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid rgba(var(--ink), 0.1);
  border-radius: var(--r);
}
.hero-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--a2);
}
.hero-total {
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(
    115deg,
    var(--hero-ink1) 10%,
    var(--hero-ink2) 90%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-total-sub {
  font-size: 13px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.hero-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mtag {
  font-size: 11.5px;
  color: var(--dim);
  border: 1px solid var(--bd);
  background: rgba(var(--ink), 0.03);
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.mtag i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-content: stretch;
}
.statgrid .card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- chart boxes ---------- */
.chart-card {
  position: relative;
}
.chart-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
  max-width: 100%;
}
.chart-scroll svg {
  display: block;
}
svg text {
  font-family: inherit;
}
.axis {
  fill: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.gline {
  stroke: rgba(var(--ink), 0.055);
  stroke-width: 1;
}
svg .col {
  transition: opacity var(--tr);
}
svg.dim .col {
  opacity: 0.32;
}
svg .col.hi {
  opacity: 1;
}
svg .seg {
  transition:
    opacity var(--tr),
    filter var(--tr);
}
svg .hitrect {
  fill: transparent;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--dim);
  border: 1px solid var(--bd);
  background: rgba(var(--ink), 0.02);
  padding: 3.5px 10px;
  border-radius: 999px;
  transition: var(--tr);
  cursor: pointer;
  user-select: none;
}
.lg:hover {
  border-color: var(--bd2);
  color: var(--tx);
}
.lg i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.lg.off {
  opacity: 0.38;
}
.lg.off i {
  filter: grayscale(1);
}

/* donut side list */
.donut-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.dl-row {
  display: grid;
  grid-template-columns: 9px 1fr auto auto;
  gap: 9px;
  align-items: center;
  padding: 5.5px 6px;
  border-radius: 8px;
  font-size: 12.5px;
  transition: background var(--tr);
}
.dl-row:hover {
  background: rgba(var(--ink), 0.04);
}
.dl-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.dl-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tx);
}
.dl-name small {
  display: block;
  color: var(--dim);
  font-size: 10.5px;
}
.dl-v {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.dl-p {
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--tx);
  font-weight: 600;
}

/* heatmap */
.hm-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--faint);
  margin-top: 10px;
}
.hm-bar {
  width: 120px;
  height: 8px;
  border-radius: 4px;
  border: 1px solid var(--bd);
}

/* ---------- tables ---------- */
.tscroll {
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
  max-width: 100%;
}
table.tbl {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.tbl th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dim);
  text-align: right;
  padding: 9px 7px;
  border-bottom: 1px solid var(--bd);
  white-space: normal;
  overflow-wrap: anywhere;
}
table.tbl th:first-child {
  text-align: left;
}
table.tbl td {
  padding: 8px 7px;
  border-bottom: 1px solid rgba(var(--ink), 0.04);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.tbl td:first-child {
  text-align: left;
}
table.tbl tbody tr {
  transition: background var(--tr);
}
table.tbl tbody tr:hover {
  background: rgba(var(--ink), 0.035);
}
table.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.mcell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: 100%;
}
.mcell .dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.mcell .mn {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mcell .mp {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.2;
}
.ratio {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.rbar {
  width: 30%;
  max-width: 56px;
  height: 6px;
  border-radius: 3px;
  background: rgba(var(--ink), 0.06);
  overflow: hidden;
  flex: none;
}
.rbar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--grad);
  transform-origin: left;
  transition: width 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.err-hi {
  color: var(--err);
  font-weight: 700;
}
.err-md {
  color: var(--warn);
}
.ok-c {
  color: var(--ok);
}

/* ranking */
.rank-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}
.rank-val b {
  display: block;
  font-weight: 700;
}
.rank-val span {
  color: var(--faint);
  font-size: 11px;
}
.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: rgba(var(--ink), 0.025);
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: var(--tr);
}
.model-chip:hover {
  border-color: var(--bd2);
  color: var(--tx);
  background: rgba(var(--ink), 0.06);
}
.model-chip.sel {
  border-color: rgba(99, 102, 241, 0.7);
  background: rgba(99, 102, 241, 0.18);
  color: var(--tx);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.14) inset;
}
.model-chip i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.model-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-detail {
  scroll-margin-top: 78px;
}
.table-pair {
  grid-template-columns: minmax(0, 1fr);
}
.range-panels {
  grid-template-columns: minmax(0, 1fr);
}
.daily-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
}
.tbl-week th:nth-child(1) {
  width: 13%;
}
.tbl-week th:nth-child(2) {
  width: 9%;
}
.tbl-week th:nth-child(3) {
  width: 14%;
}
.tbl-week th:nth-child(4) {
  width: 14%;
}
.tbl-week th:nth-child(5) {
  width: 13%;
}
.tbl-week th:nth-child(6) {
  width: 11%;
}
.tbl-week th:nth-child(7) {
  width: 8%;
}
.tbl-week th:nth-child(8) {
  width: 18%;
}
.tbl-month th:nth-child(1) {
  width: 15%;
}
.tbl-month th:nth-child(2) {
  width: 12%;
}
.tbl-month th:nth-child(3) {
  width: 17%;
}
.tbl-month th:nth-child(4) {
  width: 17%;
}
.tbl-month th:nth-child(5) {
  width: 15%;
}
.tbl-month th:nth-child(6) {
  width: 13%;
}
.tbl-month th:nth-child(7) {
  width: 11%;
}
.tbl-model th:nth-child(1) {
  width: 20%;
}
.tbl-model th:nth-child(2) {
  width: 13%;
}
.tbl-model th:nth-child(3) {
  width: 9%;
}
.tbl-model th:nth-child(4) {
  width: 11%;
}
.tbl-model th:nth-child(5) {
  width: 11%;
}
.tbl-model th:nth-child(6) {
  width: 11%;
}
.tbl-model th:nth-child(7) {
  width: 9%;
}
.tbl-model th:nth-child(8) {
  width: 10%;
}
.tbl-model th:nth-child(9) {
  width: 90px;
}

/* skeleton */
.sk {
  position: relative;
  overflow: hidden;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: var(--r);
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--ink), 0.05),
    transparent
  );
  animation: sh 1.3s infinite;
}
@keyframes sh {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* tooltip */
.tt {
  position: fixed;
  z-index: 99;
  pointer-events: none;
  background: var(--s2);
  border: 1px solid var(--bd2);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: var(--tip-shadow);
  opacity: 0;
  transition: opacity 120ms;
  max-width: 280px;
}
.tt.on {
  opacity: 1;
}
.tt b {
  font-variant-numeric: tabular-nums;
}
.tt .tt-t {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 3px;
  color: var(--tx);
  white-space: nowrap;
}
.tt .tt-r,
.ectt .tt-r {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tt .tt-r i,
.ectt .tt-r i {
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  display: inline-block;
  margin-right: 5px;
}
.tt .tt-r b,
.ectt .tt-r b {
  color: var(--tx);
}
.ectt .tt-t {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 3px;
  color: var(--tx);
  white-space: normal;
  overflow-wrap: anywhere;
}
.ectt {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  max-width: min(240px, calc(100vw - 90px));
  pointer-events: none;
}

.ectt .tt-r > span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ectt .tt-r > b {
  flex-shrink: 0;
}

/* ---------- echarts ---------- */
.ecbox {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.ecbox > div,
.ecbox > canvas,
.ecbox canvas {
  max-width: 100%;
}

/* ---------- range controls ---------- */
.rangectl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.fld {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fld label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-weight: 700;
}
.fld input[type="date"] {
  background: var(--s1);
  border: 1px solid var(--bd);
  color: var(--tx);
  border-radius: 10px;
  padding: 8px 11px;
  font: inherit;
  font-size: 13.5px;
  color-scheme: dark;
  transition: border-color var(--tr);
  font-variant-numeric: tabular-nums;
}
.fld input[type="date"]:hover {
  border-color: var(--bd2);
}
.fld input[type="date"]:focus {
  outline: none;
  border-color: var(--a1);
}
.btn {
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 10px;
  transition:
    filter var(--tr),
    transform var(--tr);
  box-shadow: 0 4px 16px rgba(90, 90, 240, 0.35);
}
.btn:hover {
  filter: brightness(1.12);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: progress;
  filter: none;
}
.btn.ghost {
  background: var(--s2);
  border: 1px solid var(--bd);
  box-shadow: none;
  color: var(--dim);
  font-weight: 600;
}
.btn.ghost:hover {
  color: var(--tx);
  border-color: var(--bd2);
}
.quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.quick button {
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--bd);
  padding: 5px 11px;
  border-radius: 999px;
  transition: var(--tr);
}
.quick button:hover {
  border-color: var(--a1);
  color: var(--tx);
  background: rgba(99, 102, 241, 0.12);
}

/* ---------- login ---------- */
.auth-stage {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  padding: 24px 16px 64px;
}
.auth-card {
  width: min(400px, 100%);
  background:
    radial-gradient(
      300px 160px at 50% -40px,
      rgba(99, 102, 241, 0.22),
      transparent 70%
    ),
    linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid rgba(var(--ink), 0.11);
  border-radius: 18px;
  padding: 30px 28px 26px;
  box-shadow: var(--shadow-login);
}
.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  margin: 0 auto 14px;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}
.auth-card h1 {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
}
.auth-card .auth-sub {
  font-size: 12.5px;
  color: var(--dim);
  text-align: center;
  margin: 5px 0 22px;
}
.f {
  margin-bottom: 14px;
}
.f label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.f input[type="text"],
.f input[type="password"] {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--bd);
  color: var(--tx);
  border-radius: 11px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  transition:
    border-color var(--tr),
    box-shadow var(--tr);
}
.f input:focus {
  outline: none;
  border-color: var(--a1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dim);
  margin: 2px 0 18px;
  user-select: none;
  cursor: pointer;
}
.remember input {
  accent-color: #6366f1;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.auth-err {
  display: none;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: var(--error-text);
  font-size: 12.5px;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
}
.auth-err.show {
  display: block;
}
#loginBtn {
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 8px;
}
#loginBtn .sp {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(var(--ink), 0.4);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 0.6s linear infinite;
  display: none;
}
#loginBtn.busy .sp {
  display: inline-block;
}
.auth-foot {
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  margin-top: 18px;
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--dim);
}
.empty b {
  display: block;
  font-size: 16px;
  color: var(--tx);
  margin-bottom: 6px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .g2,
  .g3 {
    grid-template-columns: 1fr;
  }
  .table-pair,
  .range-panels,
  .daily-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .dl-side {
    width: 100%;
  }
  .rank-val {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 640px) {
  .top-in {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 12px 12px;
    gap: 10px;
  }
  nav.pills {
    order: 3;
    width: 100%;
  }
  .brand {
    margin-right: auto;
  }
  .upd span {
    font-size: 11.5px;
  }
  main.wrap {
    padding: 16px 12px 60px;
  }
  .statgrid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .hero-total {
    font-size: 40px;
  }
  .mcell {
    min-width: 0;
  }
  .ratio {
    gap: 0;
  }
  .ratio .rbar {
    display: none;
  }
  table.tbl {
    font-size: 11.5px;
  }
  table.tbl th,
  table.tbl td {
    padding: 7px 4px;
  }
  .tbl-week th:nth-child(2),
  .tbl-week td:nth-child(2),
  .tbl-week th:nth-child(4),
  .tbl-week td:nth-child(4),
  .tbl-week th:nth-child(7),
  .tbl-week td:nth-child(7) {
    display: none;
  }
  .tbl-week th:nth-child(1) {
    width: 21%;
  }
  .tbl-week th:nth-child(3) {
    width: 25%;
  }
  .tbl-week th:nth-child(5) {
    width: 19%;
  }
  .tbl-week th:nth-child(6) {
    width: 15%;
  }
  .tbl-week th:nth-child(8) {
    width: 20%;
  }
  .tbl-month th:nth-child(2),
  .tbl-month td:nth-child(2),
  .tbl-month th:nth-child(4),
  .tbl-month td:nth-child(4),
  .tbl-month th:nth-child(7),
  .tbl-month td:nth-child(7) {
    display: none;
  }
  .tbl-month th:nth-child(1) {
    width: 22%;
  }
  .tbl-month th:nth-child(3) {
    width: 28%;
  }
  .tbl-month th:nth-child(5) {
    width: 25%;
  }
  .tbl-month th:nth-child(6) {
    width: 25%;
  }
  .tbl-model th:nth-child(4),
  .tbl-model td:nth-child(4),
  .tbl-model th:nth-child(5),
  .tbl-model td:nth-child(5),
  .tbl-model th:nth-child(6),
  .tbl-model td:nth-child(6),
  .tbl-model th:nth-child(8),
  .tbl-model td:nth-child(8),
  .tbl-model th:nth-child(9),
  .tbl-model td:nth-child(9) {
    display: none;
  }
  .tbl-model th:nth-child(1) {
    width: 38%;
  }
  .tbl-model th:nth-child(2) {
    width: 28%;
  }
  .tbl-model th:nth-child(3) {
    width: 16%;
  }
  .tbl-model th:nth-child(7) {
    width: 18%;
  }
  .model-chip {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 11.5px;
  }
  .rank-val b {
    font-size: 12px;
  }
  .rank-val span {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.data-note {
  font-size: 12px;
  color: var(--dim);
  margin-top: 10px;
  line-height: 1.65;
}
.number-label {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-exact {
  color: var(--dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  margin-top: 4px;
}
.tbl-model td svg {
  max-width: 100%;
}

/* A single persistent model browser, with detail visible beside the choice. */
.model-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.model-browser {
  position: sticky;
  top: calc(var(--header-height, 59px) + 16px);
  padding: 16px;
  max-height: calc(100dvh - var(--header-height, 59px) - 32px);
  display: flex;
  flex-direction: column;
}
.model-browser .chip-l {
  margin-bottom: 10px;
}
#modelSearch {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--tx);
  font: inherit;
}
.model-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-gutter: stable;
}
.model-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: none;
  width: 100%;
  padding: 12px;
  gap: 5px;
  cursor: pointer;
}
.model-choice[hidden] {
  display: none;
}
.model-choice .model-choice-name {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.model-choice-name b {
  min-width: 0;
}
.model-choice-provider {
  color: var(--faint);
  font-size: 11px;
}
.model-choice .rank-val {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  white-space: normal;
}
.model-choice .rank-val span {
  font-size: 10px;
  overflow: visible;
  white-space: normal;
}
.model-content {
  min-width: 0;
}
.model-comparisons {
  margin-top: 28px;
}
.model-comparisons .g2 {
  grid-template-columns: minmax(0, 1fr);
}
.model-mobile-picker {
  display: none;
}
#modelNoResults {
  color: var(--dim);
  font-size: 12px;
}
@media (max-width: 800px) {
  .model-workspace {
    display: block;
  }
  .model-browser {
    display: none;
  }
  .model-mobile-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: calc(var(--header-height, 59px) + 8px);
    z-index: 40;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--bd);
    border-radius: 10px;
    background: var(--s1);
  }
  .model-mobile-picker label {
    color: var(--dim);
    font-size: 11px;
  }
  #modelSelect {
    width: 100%;
    min-width: 0;
    color: var(--tx);
    background: var(--s1);
    border: 0;
    font: inherit;
    font-size: 13px;
    padding: 5px 0;
  }
  .model-detail {
    scroll-margin-top: 150px;
  }
}
.chart-caption {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0 10px;
}
.comparison-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}
.comparison-controls .fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--dim);
  font-size: 12px;
}
.comparison-controls select {
  font: inherit;
  color: var(--tx);
  background: var(--input);
  border: 1px solid var(--bd2);
  border-radius: 8px;
  padding: 9px;
}
#comparePicker {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 10px;
}
#comparePicker summary {
  cursor: pointer;
  color: var(--tx);
  font-size: 12px;
}
.comparison-help {
  color: var(--dim);
  font-size: 12px;
  margin: 12px 0;
  line-height: 1.6;
}
.comparison-options {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  margin-bottom: 10px;
}
.comparison-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px;
  font-size: 12px;
  cursor: pointer;
}
.comparison-options input {
  accent-color: var(--a1);
  flex: none;
}
.comparison-options span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.comparison-options label:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}
.comparison-values {
  border-top: 1px solid var(--bd);
}
.comparison-values > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bd);
  font-size: 12px;
}
.comparison-values button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.comparison-values i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}
.comparison-values > div > span {
  text-align: right;
  flex: none;
}
.comparison-values small {
  display: block;
  color: var(--dim);
  font-size: 10px;
}
