:root {
  color-scheme: dark;
  --bg: #050c13;
  --surface: #091520;
  --surface-2: #0c1a27;
  --surface-3: #102230;
  --line: #1e394c;
  --line-soft: #142a39;
  --text: #f3f8fb;
  --muted: #8da9bb;
  --muted-2: #68869a;
  --accent: #46e0d5;
  --accent-strong: #25c6bc;
  --cyan: #55d7ff;
  --yellow: #ffd96b;
  --danger: #ff6877;
  --radius: 12px;
  --font: "Pretendard", "SUIT", "Noto Sans KR", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -18%, rgba(25, 83, 105, 0.18), transparent 39rem),
    linear-gradient(180deg, #07111a 0%, var(--bg) 36rem);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

body.detail-open {
  overflow: hidden;
}

button,
select {
  font: inherit;
}

button,
select,
.job-row {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.11;
  pointer-events: none;
}

.ambient-one {
  top: 16%;
  left: -24rem;
  background: #34d5ff;
}

.ambient-two {
  right: -25rem;
  bottom: 6%;
  background: #41dacb;
}

.app-shell {
  width: min(1220px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid #254253;
  border-radius: 11px;
  background: #07131d;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  overflow: hidden;
  color: #f8fbfd;
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  margin-top: 5px;
  color: #8eadc0;
  font-size: 12.5px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-pill,
.ghost-button {
  min-height: 38px;
  border: 1px solid #286778;
  border-radius: 11px;
  background: rgba(12, 47, 56, 0.84);
  color: #eaffff;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  white-space: nowrap;
}

.live-pill strong {
  color: #fff;
  font-weight: 900;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(70, 224, 213, 0.8);
}

.ghost-button {
  min-width: 42px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: border-color 120ms ease, background 120ms ease;
}

.ghost-button:hover {
  border-color: #42b4bf;
  background: rgba(18, 65, 74, 0.96);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.45fr 1.15fr 0.86fr 0.86fr auto;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 22, 33, 0.94);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.16);
}

.filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.filter-field > span {
  padding-left: 2px;
  color: #7f9bac;
  font-size: 10.5px;
  font-weight: 800;
}

select {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 12px;
  border: 1px solid #29485d;
  border-radius: 8px;
  outline: none;
  background:
    linear-gradient(45deg, transparent 50%, #7998a9 50%) calc(100% - 15px) 16px / 5px 5px no-repeat,
    linear-gradient(135deg, #7998a9 50%, transparent 50%) calc(100% - 10px) 16px / 5px 5px no-repeat,
    #0b1925;
  color: #f3f8fb;
  font-size: 13px;
  font-weight: 800;
  appearance: none;
}

select:focus-visible,
button:focus-visible,
.job-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  height: 38px;
  gap: 7px;
  padding: 0 17px;
  border: 1px solid #51d8d0;
  border-radius: 9px;
  background: linear-gradient(180deg, #55e1d7, #3ccdc4);
  color: #052224;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(44, 204, 195, 0.13);
  transition: filter 120ms ease, transform 120ms ease;
}

.refresh-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.refresh-button:active {
  transform: translateY(0);
}

.refresh-button.compact {
  align-self: auto;
  height: 36px;
  margin-top: 16px;
}

.refresh-button[disabled] .refresh-glyph {
  animation: spin 800ms linear infinite;
}

.refresh-glyph {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
}

.snapshot-bar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding: 9px 13px 9px 18px;
  border: 1px solid #17636a;
  border-radius: 10px;
  background: rgba(7, 31, 39, 0.8);
  box-shadow: inset 4px 0 0 var(--accent);
}

.snapshot-bar > div:first-child {
  min-width: 0;
}

.snapshot-bar strong {
  display: block;
  overflow: hidden;
  color: #f3f9fb;
  font-size: 13.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#snapshot-caption {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

#snapshot-caption[hidden] {
  display: none;
}

.snapshot-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 5px 9px;
  border: 1px solid #23485b;
  border-radius: 8px;
  background: #0b202b;
  color: #9bb4c4;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.meta-divider {
  width: 1px;
  height: 12px;
  background: #315366;
}

.ranking-panel {
  min-height: 560px;
  margin-top: 11px;
  border-top: 1px solid #152b39;
  background: rgba(4, 11, 17, 0.5);
}

.view-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 8px;
}

.back-button {
  width: 36px;
  height: 34px;
  border: 1px solid #4b5660;
  border-radius: 8px;
  background: #262f37;
  color: #fff;
  cursor: pointer;
  font-size: 27px;
  font-weight: 500;
  line-height: 27px;
}

.heading-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.heading-line h2 {
  font-size: 18px;
  font-weight: 900;
}

.top-badge {
  padding: 3px 7px;
  border: 1px solid #187c7a;
  border-radius: 7px;
  background: #073c3d;
  color: #4fe3d5;
  font-size: 9px;
  font-weight: 900;
}

#class-caption {
  margin-top: 3px;
  color: #8ba8b9;
  font-size: 11px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: #295165 #08131c;
  scrollbar-width: thin;
}

.ranking-table {
  width: 100%;
  min-width: 840px;
  border-collapse: separate;
  border-spacing: 0 7px;
  table-layout: fixed;
}

.ranking-table thead {
  transform: translateY(3px);
}

.ranking-table th {
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #142835;
  background: #08131d;
  color: #9ab3c3;
  font-size: 10.5px;
  font-weight: 800;
  text-align: left;
}

.ranking-table th.number-column {
  text-align: right;
}

.ranking-table td {
  height: 55px;
  padding: 0 10px;
  background: #0d1b28;
  color: #e8f1f6;
  vertical-align: middle;
}

.ranking-table tr > :first-child {
  border-radius: 9px 0 0 9px;
}

.ranking-table tr > :last-child {
  border-radius: 0 9px 9px 0;
}

.ranking-table tbody tr {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.14));
}

.ranking-table tbody tr:nth-child(1) td {
  background: #171b1c;
  border-top: 1px solid rgba(255, 221, 105, 0.27);
  border-bottom: 1px solid rgba(255, 221, 105, 0.16);
}

.ranking-table tbody tr:nth-child(2) td {
  background: #102837;
  border-top: 1px solid rgba(107, 219, 255, 0.37);
  border-bottom: 1px solid rgba(107, 219, 255, 0.21);
}

.ranking-table tbody tr:nth-child(3) td {
  background: #1a1b1c;
  border-top: 1px solid rgba(231, 158, 102, 0.3);
  border-bottom: 1px solid rgba(231, 158, 102, 0.18);
}

.job-row {
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

.job-row:hover {
  filter: brightness(1.14);
  transform: translateX(1px);
}

.rank-column {
  width: 58px;
  text-align: center !important;
}

.number-column {
  width: 120px;
}

.distribution-column {
  width: 150px;
}

.chevron-column {
  width: 27px;
  padding-left: 0 !important;
  padding-right: 8px !important;
}

.rank-badge {
  display: inline-flex;
  width: 34px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid #45647a;
  border-radius: 7px;
  background: rgba(72, 105, 128, 0.18);
  color: #9cb8ca;
  font-size: 12px;
  font-weight: 900;
}

tr:nth-child(1) .rank-badge {
  border-color: #a48a32;
  background: rgba(164, 138, 50, 0.2);
  color: #ffe070;
}

tr:nth-child(2) .rank-badge {
  border-color: #648b9c;
  background: rgba(100, 139, 156, 0.18);
  color: #c7efff;
}

tr:nth-child(3) .rank-badge {
  border-color: #916440;
  background: rgba(145, 100, 64, 0.18);
  color: #f1ba86;
}

.job-cell,
.character-main,
.party-icons {
  display: flex;
  align-items: center;
}

.job-cell {
  gap: 10px;
  min-width: 0;
}

.job-icon-frame {
  display: inline-flex;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #345365;
  border-radius: 8px;
  background: #122432;
}

.job-icon-frame img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.job-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-change {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #587082;
  border-radius: 6px;
  background: rgba(151, 169, 184, 0.12);
  color: #aebdca;
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.weekly-change.up {
  border-color: rgba(67, 219, 162, 0.55);
  background: rgba(67, 219, 162, 0.12);
  color: #5ee3ae;
}

.weekly-change.down {
  border-color: rgba(255, 112, 125, 0.55);
  background: rgba(255, 112, 125, 0.12);
  color: #ff8792;
}

.numeric {
  color: #ecf5fa;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  text-align: right;
}

.numeric.accent {
  color: var(--accent);
}

.numeric.median {
  color: #f5f8fa;
}

.numeric.max {
  color: #f8fbfd;
}

.distribution {
  display: grid;
  gap: 5px;
}

.distribution-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #243746;
}

.distribution-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3ee0d2, #58a2ff);
}

.distribution-label {
  overflow: hidden;
  color: #7196ad;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-chevron {
  color: #7ca2b8;
  font-size: 21px;
  font-weight: 400;
}

.class-table {
  min-width: 720px;
}

.class-table th:nth-child(3) {
  width: 180px;
}

.class-table .detail-column {
  width: 68px;
  text-align: center;
}

.character-cell {
  padding: 6px 10px !important;
}

.character-stack {
  display: grid;
  gap: 4px;
}

.character-main {
  gap: 8px;
  min-width: 0;
}

.character-name {
  max-width: 270px;
  overflow: hidden;
  color: #f0f7fa;
  font-size: 13.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-badge,
.tw-badge {
  display: inline-flex;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border: 1px solid #296b70;
  border-radius: 6px;
  background: #0b3b3e;
  color: #67ece4;
  font-size: 9.5px;
  font-weight: 900;
}

.cp-badge img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.tw-badge {
  position: relative;
  width: 20px;
  height: 14px;
  overflow: hidden;
  padding: 0;
  border-color: #7f8995;
  border-radius: 2px;
  background: #fe0000;
  color: transparent;
}

.tw-badge::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 50%;
  background: #000095;
  content: "";
}

.tw-badge::after {
  position: absolute;
  top: 25%;
  left: 25%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transform: translate(-50%, -50%);
}

.party-icons {
  gap: 3px;
  padding-left: 39px;
}

.party-label {
  margin-right: 3px;
  color: #708da0;
  font-size: 8.5px;
  font-weight: 900;
}

.party-icons .job-icon-frame {
  width: 19px;
  height: 19px;
  border-radius: 5px;
}

.party-icons .job-icon-frame img {
  width: 15px;
  height: 15px;
}

.class-detail-row {
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

.class-detail-row:hover {
  filter: brightness(1.12);
  transform: translateX(1px);
}

.detail-link {
  color: #77d9e6;
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(1, 6, 10, 0.78);
  backdrop-filter: blur(5px);
}

.detail-modal[hidden] {
  display: none;
}

.detail-panel {
  display: flex;
  width: min(1380px, 100%);
  height: min(820px, calc(100vh - 40px));
  min-height: 620px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #263a4b;
  border-radius: 12px;
  background: #070b11;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.detail-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid #223344;
  background: #0c121b;
}

.detail-identity,
.detail-title-line {
  display: flex;
  align-items: center;
}

.detail-identity {
  min-width: 0;
  gap: 11px;
}

.detail-identity > div {
  min-width: 0;
}

.detail-title-line {
  gap: 9px;
}

.detail-boss-icon {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.detail-title-line h2 {
  overflow: hidden;
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-duration {
  padding: 5px 9px;
  border: 1px solid #273b4b;
  border-radius: 8px;
  background: #111b27;
  color: #eef6fa;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.detail-character-line {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #4ce1d4;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid #9a4444;
  border-radius: 8px;
  background: #d4473e;
  color: #fff;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.detail-display-settings {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  border-bottom: 1px solid #223344;
  background: #0c121b;
}

.detail-display-settings > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-settings-mark {
  width: 4px;
  height: 22px;
  border-radius: 3px;
  background: #4ce1d4;
}

.detail-display-settings strong {
  color: #eef6fa;
  font-size: 11px;
}

.detail-display-settings button {
  border: 0;
  background: transparent;
  color: #91a2b1;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
}

.detail-settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid #223344;
  background: #0b1119;
}

.detail-settings-options button {
  padding: 4px 9px;
  border: 1px solid #263b4c;
  border-radius: 7px;
  background: #0c141f;
  color: #718392;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.detail-settings-options button.active {
  border-color: #277a76;
  background: #102827;
  color: #4ce1d4;
}

.detail-content {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 14px 0;
}

.detail-summary,
.detail-ledger {
  min-height: 0;
  border: 1px solid #223344;
  border-radius: 12px;
  background: #0c121b;
}

.detail-summary {
  overflow-y: auto;
  padding: 12px;
  scrollbar-color: #294759 #0b1119;
  scrollbar-width: thin;
}

.detail-summary-metric {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  padding: 5px 10px;
  border: 1px solid #263441;
  border-radius: 9px;
  background: #131c28;
}

.detail-summary-metric span {
  color: #91a2b1;
  font-size: 11px;
  font-weight: 800;
}

.detail-summary-metric strong {
  overflow: hidden;
  color: #eef6fa;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-summary-metric:nth-child(1) strong {
  color: #2ddcc4;
}

.detail-summary-metric:nth-child(2) strong {
  color: #4ade80;
}

.detail-summary-metric:nth-child(3) strong {
  color: #4ce1d4;
}

.detail-cp-metric {
  border-color: #245c66;
  background: #102128;
}

.detail-cp-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-cp-label img {
  width: 17px;
  height: 17px;
}

.detail-cp-metric strong {
  color: #66e9ff;
}

.detail-rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

.detail-rate-grid > div {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 8px;
  border: 1px solid #223344;
  border-radius: 9px;
  background: #0c141f;
}

.detail-rate-grid span {
  color: #91a2b1;
  font-size: 9.8px;
  font-weight: 800;
}

.detail-rate-grid strong {
  color: #eef6fa;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.detail-rate-grid [data-detail-metric="critical"] strong {
  color: #ff7349;
}

.detail-rate-grid [data-detail-metric="front"] strong,
.detail-rate-grid [data-detail-metric="back"] strong {
  color: #60b5ff;
}

.detail-rate-grid [data-detail-metric="perfect"] strong {
  color: #c897ff;
}

.detail-rate-grid [data-detail-metric="double"] strong {
  color: #ffac37;
}

.detail-ledger {
  display: flex;
  overflow: hidden;
  flex-direction: column;
}

.detail-ledger-header {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 8px 12px 8px 54px;
  border-bottom: 1px solid #223344;
  background: #111a25;
  color: #91a2b1;
  font-size: 11px;
}

.detail-ledger-header strong:first-child {
  color: #eef6fa;
  text-align: left;
}

.detail-ledger-header strong:last-child {
  text-align: right;
}

.detail-skill-list {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 8px 4px;
  scrollbar-color: #294759 #0b1119;
  scrollbar-width: thin;
}

.detail-skill-row {
  position: relative;
  display: grid;
  height: 56px;
  overflow: hidden;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-rows: 24px 24px;
  margin-bottom: 4px;
  padding: 4px 10px;
  border: 1px solid #263441;
  border-radius: 8px;
  background: #070b11;
}

.detail-skill-row:nth-child(even) {
  background: #131c28;
}

.detail-skill-bar {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 3px;
  border-radius: 8px 0 0 8px;
  background: rgba(29, 157, 147, 0.25);
  pointer-events: none;
}

.detail-skill-icon,
.detail-buff-icon {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid #334b5e;
  background-color: #131c28;
  background-repeat: no-repeat;
}

.detail-skill-icon {
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  align-self: center;
  border-radius: 6px;
}

.detail-skill-name,
.detail-skill-damage,
.detail-skill-chips {
  position: relative;
  z-index: 1;
}

.detail-skill-name {
  align-self: center;
  overflow: hidden;
  color: #eef6fa;
  font-size: 12.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-skill-damage {
  align-self: center;
  color: #2ddcc4;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.detail-skill-damage span {
  color: #91a2b1;
  font-size: 11px;
  font-weight: 500;
}

.detail-skill-chips {
  display: flex;
  min-width: 0;
  grid-column: 2 / 4;
  align-items: center;
  overflow: hidden;
  gap: 5px;
}

.detail-chip {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #233445;
  border-radius: 7px;
  background: #0c141f;
  color: #91a2b1;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 13px;
  white-space: nowrap;
}

.detail-chip b {
  color: #eef6fa;
  font-weight: 900;
}

.detail-chip.accent b { color: #4ce1d4; }
.detail-chip.critical b { color: #ff7349; }
.detail-chip.position b { color: #60b5ff; }
.detail-chip.perfect b { color: #c897ff; }
.detail-chip.double b { color: #ffac37; }
.detail-chip.healing b { color: #7dd3fc; }

.detail-spec-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 4px;
}

.detail-spec-dots i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #2f3d4e;
}

.detail-spec-dots i.active {
  background: #2db26f;
}

.detail-buff-strip {
  min-height: 86px;
  max-height: 174px;
  flex: 0 0 auto;
  margin: 12px 14px 14px;
  padding: 10px 12px;
  overflow-y: auto;
  border: 1px solid #263441;
  border-radius: 10px;
  background: #131c28;
  scrollbar-color: #294759 #0b1119;
  scrollbar-width: thin;
}

.detail-buff-strip h3 {
  margin: 0 0 7px;
  color: #dcaaFF;
  font-size: 12px;
}

.detail-buff-strip h3 span:nth-child(n + 2) {
  color: #91a2b1;
}

.detail-buffs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-buff {
  position: relative;
  display: grid;
  width: 196px;
  height: 48px;
  overflow: hidden;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 34px 4px;
  align-items: center;
  column-gap: 7px;
  padding: 3px 7px 5px 4px;
  border: 1px solid #223344;
  border-radius: 8px;
  background: #0c121b;
}

.detail-buff-icon {
  display: block;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
}

.detail-buff-icon-slot {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.detail-buff-up {
  position: absolute;
  z-index: 2;
  top: 1px;
  left: 50%;
  display: flex;
  min-width: 20px;
  height: 11px;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  transform: translateX(-50%);
  border: 1px solid #fff7be;
  border-radius: 6px;
  background: #a16207;
  color: #fff7be;
  font-size: 7px;
  font-weight: 900;
  line-height: 8px;
  pointer-events: none;
}

.detail-buff-text {
  min-width: 0;
}

.detail-buff-text strong,
.detail-buff-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-buff-text strong {
  color: #eef6fa;
  font-size: 11px;
  line-height: 13px;
}

.detail-buff-text span {
  color: #dcaaFF;
  font-size: 10px;
  font-weight: 900;
  line-height: 12px;
}

.detail-buff-gauge {
  grid-column: 2;
  height: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: #1c2634;
}

.detail-buff-gauge i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #dcaaFF;
}

.loading-state,
.error-state,
.empty-state {
  display: flex;
  min-height: 470px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #9fbed0;
  text-align: center;
}

.loading-state p,
.empty-state p {
  margin-top: 14px;
}

.spinner {
  width: 31px;
  height: 31px;
  border: 3px solid #173342;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

.error-state h2 {
  margin-top: 12px;
  font-size: 17px;
}

.error-state p {
  max-width: 520px;
  margin-top: 8px;
  color: #819eaf;
  font-size: 12px;
}

.error-mark {
  display: flex;
  width: 37px;
  height: 37px;
  align-items: center;
  justify-content: center;
  border: 1px solid #934657;
  border-radius: 50%;
  background: rgba(146, 49, 69, 0.18);
  color: #ff8090;
  font-size: 20px;
  font-weight: 900;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px 0;
  color: #5e7b8d;
  font-size: 10.5px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .refresh-button {
    grid-column: 1 / -1;
  }

  .snapshot-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .snapshot-meta {
    align-self: stretch;
    justify-content: center;
  }

  .detail-panel {
    min-height: 0;
  }

  .detail-content {
    grid-template-columns: 210px minmax(520px, 1fr);
    overflow-x: auto;
  }
}

@media (max-width: 600px) {
  .app-shell {
    width: min(100% - 16px, 1220px);
    padding-top: 10px;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .brand-icon {
    width: 39px;
    height: 39px;
  }

  .brand p {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .live-pill {
    min-height: 34px;
    padding: 0 9px;
    font-size: 10.5px;
  }

  .live-pill [data-i18n="dailyUsers"] {
    display: none;
  }

  .ghost-button {
    min-height: 34px;
  }

  .filter-panel {
    gap: 9px;
    padding: 10px;
  }

  .filter-field:first-child {
    grid-column: 1 / -1;
  }

  .snapshot-bar {
    padding-left: 14px;
  }

  .snapshot-bar strong {
    white-space: normal;
  }

  .snapshot-meta {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .ranking-panel {
    min-height: 490px;
  }

  .page-footer {
    flex-direction: column;
    gap: 5px;
  }

  .detail-modal {
    align-items: flex-end;
    padding: 0;
  }

  .detail-panel {
    width: 100%;
    height: 94vh;
    min-height: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  .detail-header {
    padding: 10px 12px;
  }

  .detail-title-line h2 {
    max-width: 220px;
    font-size: 14px;
  }

  .detail-display-settings {
    padding-inline: 10px;
  }

  .detail-content {
    grid-template-columns: 190px minmax(520px, 1fr);
    padding: 10px;
  }

  .detail-buff-strip {
    margin: 0 10px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
