:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.65;
    letter-spacing: 0;
    background: var(--bg);
    color: var(--text);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .35; cursor: default; }
button:disabled:hover { color: inherit; background: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 5; top: -80px; left: 16px; padding: 12px; color: var(--bg); background: var(--accent); }
.skip-link:focus { top: 16px; }
.page-width { width: var(--site-content-width); margin-inline: auto; }
.site-footer a:hover { color: var(--accent); }
.raid-directory { position: relative; display: flex; flex-wrap: wrap; gap: 20px 10px; max-height: 64px; overflow: hidden; padding-block: 14px 12px; padding-right: 110px; border-bottom: 1px solid var(--rule); transition: max-height .2s ease; }
.raid-directory.is-expanded { max-height: 400px; }
.raid-directory button { padding: 4px 14px 6px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); font-size: 15px; color: var(--muted); }
.raid-directory button[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--soft); box-shadow: inset 3px 0 var(--accent); }
.raid-directory button:not(.raid-toggle):hover:not([aria-pressed="true"]) { color: var(--text); background: var(--soft); }
.raid-directory .raid-toggle { position: absolute; right: 0; top: 14px; padding-inline: 0; border: 0; border-radius: 0; color: var(--accent); background: var(--bg); }
.raid-directory .raid-toggle:hover { color: var(--text); background: var(--bg); text-decoration: underline; text-underline-offset: 4px; }
.page-heading { display: flex; align-items: center; padding-block: 8px 10px; }
.eyebrow { font-size: 12px; color: var(--accent); margin-bottom: 10px; }
.scope-selectors { display: flex; align-items: center; gap: 10px; color: var(--muted); }
select { background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 8px 20px 8px 4px; min-height: 40px; color: var(--text); max-width: 100%; }
option { background: var(--bg); color: var(--text); }
.boss-navigation { display: flex; flex-wrap: wrap; gap: 8px 26px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.boss-navigation button { background: none; border: 0; padding: 6px 0; font-size: 14px; color: var(--muted); }
.boss-navigation button[aria-pressed="true"] { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; }
.boss-navigation button:hover { color: var(--text); }
.leaderboard { margin-top: 34px; }
.leaderboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
h2 { font-size: 25px; line-height: 1.5; font-weight: 550; }
.metric-switch { display: flex; align-items: center; gap: 24px; }
.metric-switch button { padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); }
.metric-switch button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.metric-switch button:hover { color: var(--text); }
.ranking-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.ranking-scope { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.scope-note { font-size: 12px; color: var(--muted); }
#search-form { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); width: 280px; flex-shrink: 0; }
#keyword { flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--text); padding: 9px 0; }
#keyword::placeholder { color: var(--muted); }
.search-button { flex-shrink: 0; color: var(--accent); background: none; border: 0; padding: 9px 0 9px 12px; font-size: 14px; }
.search-button:hover { color: #ffc68c; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 40px; width: min(920px, 100%); margin: 8px auto 24px; }
.podium-entry { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0; border: 0; background: none; text-align: center; font: inherit; }
.podium-identity { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 40px; }
.podium-medal { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 4px 4px #00000050); }
.podium-name { color: var(--rank-color); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.podium-score { display: flex; justify-content: center; align-items: baseline; gap: 8px; color: var(--rank-color); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 4px; }
.podium-score small { font-size: 12px; font-weight: 400; color: var(--muted); }
.podium-base { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 52px; margin-top: 12px; padding: 8px 22px; border: 1px solid var(--rank-edge); border-bottom: 4px solid var(--rank-color); border-radius: 4px; background: linear-gradient(180deg, var(--rank-hover), var(--rank-bg)); box-shadow: 0 10px 0 -4px #191b1d, 0 16px 20px -6px #00000060, inset 0 2px 0 #ffffff20; transition: box-shadow .2s; }
.podium-rank { color: var(--rank-color); font-size: 32px; font-weight: 500; line-height: 1; }
.podium-profession { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.podium-profession .class-icon { width: 24px; height: 24px; }
.podium-meta { display: flex; flex-direction: column; gap: 2px; min-height: 42px; width: 100%; margin-top: 10px; color: var(--muted); font-size: 12px; }
.podium-meta span { overflow-wrap: anywhere; }
.podium-entry.place-1 .podium-base { height: 72px; }
.podium-entry.place-3 .podium-base { height: 40px; }
.podium-entry.place-1 .podium-medal { width: 40px; height: 40px; }
.podium-entry.place-1 .podium-name { font-size: 24px; }
.podium-entry.place-1 .podium-score { font-size: 34px; }
.podium-entry:hover .podium-base { background: var(--rank-hover); box-shadow: 0 10px 0 -4px #191b1d, 0 18px 24px -6px #00000070, inset 0 2px 0 #ffffff35; }
.podium-entry:hover .podium-name { text-decoration: underline; text-underline-offset: 5px; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; min-width: 1000px; text-align: left; font-size: 14px; }
th { background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
th, td { padding: 17px 18px; border-bottom: 1px solid var(--rule); }
th:first-child, td:first-child { padding-left: 12px; width: 72px; }
th:last-child, td:last-child { padding-right: 12px; }
td { padding-block: 21px; }
tbody tr:nth-child(even):not(.top-rank) { background: #ffffff03; }
tbody tr:hover, tbody tr:nth-child(even):not(.top-rank):hover { background: #252220; }
.rank { font-size: 22px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.place-1 { --rank-color: #edc477; --rank-bg: #2c2318; --rank-hover: #493923; --rank-edge: #8c7043; }
.place-2 { --rank-color: #c2ceda; --rank-bg: #222426; --rank-hover: #383e44; --rank-edge: #6c7883; }
.place-3 { --rank-color: #d5a07b; --rank-bg: #2a211c; --rank-hover: #463329; --rank-edge: #8b6650; }
.top-rank { background: var(--rank-bg); }
.top-rank:hover { background: var(--rank-hover); }
.top-rank td:first-child { box-shadow: inset 3px 0 var(--rank-color); }
.rank-medal { display: block; width: 36px; height: 36px; object-fit: contain; }
.top-rank .player-name { font-weight: 600; }
.player-button { display: flex; align-items: center; gap: 12px; padding: 0; background: none; border: 0; font: inherit; text-align: left; }
.class-icon { width: 32px; height: 32px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.player-name { font-size: 16px; font-weight: 500; white-space: nowrap; }
.player-button:hover .player-name { text-decoration: underline; text-underline-offset: 4px; }
td small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-value { font-size: 21px; font-weight: 550; }
.top-rank .metric-value { color: var(--rank-color); font-weight: 650; }
.muted { color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; color: var(--muted); font-size: 12px; }
.page-controls { display: flex; align-items: center; gap: 18px; }
.page-controls button { display: grid; place-items: center; height: 34px; width: 34px; padding: 0; background: none; border: 0; font-size: 18px; }
.page-controls button:hover:not(:disabled) { color: var(--accent); }
.empty-state { padding: 64px 20px; text-align: center; }
.empty-state h3 { font-size: 20px; font-weight: 500; }
.empty-state p { color: var(--muted); margin: 12px 0 24px; font-size: 14px; }
.ranking-status { padding: 36px 16px; text-align: center; color: var(--muted); }
.ranking-status .secondary-button { margin-top: 16px; }
.ranking-status.is-error { color: #ffc294; }
.class-placeholder { display: inline-grid; place-items: center; background: var(--soft); color: var(--muted); }
tbody tr.is-target { outline: 1px solid var(--accent); outline-offset: -1px; background: #33251b; }
.scope-selectors label { min-width: 0; }
.scope-selectors select { width: 100%; }
.scope-selectors { max-width: 100%; }
.secondary-button { border: 1px solid var(--rule); border-radius: 4px; background: var(--soft); color: var(--text); padding: 9px 18px; }
.secondary-button:hover { border-color: var(--accent); background: #33291f; }
.ranking-rules { padding-block: 20px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.ranking-rules summary { width: fit-content; }
.ranking-rules p { max-width: 900px; margin-top: 14px; line-height: 1.9; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 26px; margin-top: 40px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.site-footer > div { display: flex; flex-wrap: wrap; gap: 12px 26px; }
dialog { width: min(560px, calc(100% - 32px)); max-height: 85vh; overflow-y: auto; border: 1px solid #68503b; border-radius: 6px; padding: 28px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px #00000080; }
dialog::backdrop { background: #080604bd; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-heading h2 { font-size: 24px; }
.close-button { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; padding: 0; border: 0; background: none; font-size: 28px; }
.close-button:hover { color: var(--accent); }
.fight-player { display: flex; align-items: center; gap: 12px; }
.fight-player p { color: var(--muted); font-size: 13px; }
.fight-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 24px; }
.fight-stats dt, .fight-facts dt { font-size: 12px; color: var(--muted); }
.fight-stats dd { margin: 4px 0 0; font-size: 27px; font-variant-numeric: tabular-nums; }
.fight-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--rule); padding-top: 20px; margin: 0; }
.fight-facts dd { margin: 4px 0 0; }
.dialog-note { font-size: 12px; color: var(--muted); margin-top: 24px; }
.dialog-footer { display: flex; justify-content: flex-end; margin-top: 24px; }
@media (max-width: 1000px) {
    .podium { gap: 24px; }
    .podium-base { padding-inline: 16px; }
}
@media (min-width: 701px) {
    .podium-active .top-rank { display: none; }
}
@media (max-width: 700px) {
    .raid-directory { max-height: 70px; gap: 20px 8px; padding-block: 18px 14px; }
    .raid-directory .raid-toggle { top: 18px; }
    .raid-directory button { font-size: 14px; }
    .boss-navigation { gap: 8px 20px; padding-bottom: 24px; }
    .boss-navigation button { font-size: 13px; }
    .leaderboard { margin-top: 24px; }
    .podium { display: none; }
    h2 { font-size: 23px; }
    .metric-switch { gap: 20px; }
    .ranking-tools { flex-direction: column; align-items: stretch; gap: 16px; }
    .ranking-scope { justify-content: space-between; gap: 10px; }
    #search-form { width: 100%; }
    table { min-width: 0; table-layout: fixed; }
    th, td { padding-inline: 8px; }
    th:first-child, td:first-child { width: 48px; padding-left: 8px; }
    th:last-child, td:last-child { width: 88px; padding-right: 8px; }
    th:nth-child(3), td:nth-child(3),
    th:nth-child(4), td:nth-child(4),
    th:nth-child(5), td:nth-child(5),
    th:nth-child(6), td:nth-child(6),
    th:nth-child(7), td:nth-child(7) { display: none; }
    .player-button { gap: 8px; max-width: 100%; }
    .class-icon { width: 28px; height: 28px; }
    .player-name { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
    .rank { font-size: 18px; }
    .rank-medal { width: 30px; height: 30px; }
    .metric-value { font-size: 18px; }
    .pagination { align-items: flex-start; flex-direction: column; gap: 14px; }
    .page-controls { align-self: flex-end; }
    .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 24px; }
    .site-footer > div { gap: 10px 20px; }
    dialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .podium-base { transition: none; }
}
