html.modal-open { overflow: hidden; }

.btn-bad { background: var(--bad); color: #1a0604; }
.btn-bad:hover:not(:disabled) { background: #ff8479; }
.btn-sm .i { width: 16px; height: 16px; }
.btn .i + .i { width: 14px; height: 14px; }

.sk-h { display: block; height: 36px; width: 55%; margin-bottom: 16px; }
.sk-btn { display: inline-block; width: 200px; height: 46px; border-radius: 3px; }
.sk-n { display: inline-block; width: 38px; vertical-align: middle; }
.rank-n .sk-n { width: 18px; }
.acct-side .sk-line, .pf-main .sk-line, .pf-id .sk-line { margin-bottom: 12px; }

.lb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 24px; }
.lb-server { width: auto; min-width: 200px; }
.lb-search { margin-left: auto; width: min(340px, 100%); }
.lb-search input::-webkit-search-cancel-button { filter: invert(.7); }
.lb-sort { display: none; }
.lb-sort span { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }

.lb-cmp { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 8px 8px 8px 14px; margin-bottom: 20px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 3px; }
.lb-cmp .who { font-weight: 500; color: var(--ink-2); }
.lb-cmp .who span { white-space: normal; }
.lb-cmp .who b { color: var(--ink); font-weight: 600; }

.tbl.lb { table-layout: fixed; }
.lb thead .rank-n { width: 60px; }
.lb thead .n { width: 10.5%; }
.lb th { vertical-align: bottom; }
.tbl th button::after { content: ""; width: 0; height: 0; border: 4px solid transparent; }
.tbl th.n button { flex-direction: row-reverse; }
.tbl th[aria-sort] button { color: var(--ink); }
.tbl th[aria-sort="descending"] button::after { border-top-color: currentColor; margin-top: 4px; }
.tbl th[aria-sort="ascending"] button::after { border-bottom-color: currentColor; margin-bottom: 4px; }
.lb td.on { color: var(--ink); }
.tbl.lb tbody tr:nth-child(n) .rank-n { color: var(--muted); }
.rk-medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 700 13px/1 var(--mono); color: #14110a; background: var(--medal); box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 10px color-mix(in srgb, var(--medal) 40%, transparent); }
.rk-1 { --medal: #f2c94c; } .rk-2 { --medal: #c9ced6; } .rk-3 { --medal: #d08a4e; }
.tbl.lb thead tr .rank-n { color: var(--muted); }
button.who { width: 100%; background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; color: inherit; text-align: left; }
button.who:hover span { color: var(--ring); }
.who img { object-fit: cover; }
.lb tr.is-cmp { background: rgba(255, 176, 87, .07); }
.lb tr.is-cmp .who span { color: var(--ring); }
.sk-row td { padding-top: 14px; padding-bottom: 14px; }
.lb-msg p { margin: 0; color: var(--muted); }
.lb-msg .btn { margin-top: 16px; }

.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 18px; min-height: 36px; }
.lb-count { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-count.stale { color: var(--moon); }
.who .you { flex: none; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ring); }
.lb tr.is-me { background: rgba(255, 176, 87, .05); }
.pager { display: flex; align-items: center; gap: 14px; }
.pager-n { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.pm-head { display: flex; align-items: center; gap: 18px; padding-right: 44px; margin-bottom: 24px; }
.pm-av { width: 64px; height: 64px; border-radius: 3px; flex: none; background: var(--panel-2); object-fit: cover; }
span.pm-av { display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--muted); }
.pm-id { min-width: 0; }
.pm-id h2 { font-size: clamp(32px, 4vw, 44px); text-transform: none; overflow-wrap: anywhere; }
.pm-sub { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.pm-ext { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--ring); font-weight: 600; }
.pm-ext .i { width: 14px; height: 14px; }
.pm-ext:hover { color: var(--moon); }
.pm-seg { margin-bottom: 18px; }
.pm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule); }
.pm-stats div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.pm-stats div:not(:nth-child(4n + 1)) { padding-left: 16px; border-left: 1px solid var(--rule); }
.pm-stats dt { font-size: 13px; color: var(--muted); }
.pm-stats dd { margin: 4px 0 0; font-size: 22px; line-height: 1.25; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-sec { margin-top: 28px; }
.pm-sec h3 { font-size: 22px; margin-bottom: 14px; }
.pm-sec > p { margin: 0; }
.pm-weap { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pm-weap li { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 56px; align-items: center; gap: 16px; font-size: 15px; }
.pm-weap span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-weap i { display: block; height: 6px; background: var(--panel-2); border-radius: 1px; overflow: hidden; }
.pm-weap i b { display: block; height: 100%; background: var(--sun); }
.pm-weap em { font-style: normal; text-align: right; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
.pm-foot p { margin: 0; font-size: 14px; }
.pm-msg { padding: 4px 0; }
.pm-msg p { margin: 0 0 14px; color: var(--ink-2); }
.pm-none { margin: 4px 0 0; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.pm-none + .pm-none { border-top: 0; margin-top: 0; }
.pm-none + .cmp-rows { margin-top: 12px; }

.cmp-title { font-size: 34px; margin-bottom: 20px; padding-right: 44px; }
.cmp-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.cmp-head .who { font-size: 18px; }
.cmp-head .who img, .cmp-head .who .av { width: 40px; height: 40px; }
.cmp-head .who.r { justify-content: flex-end; }
.cmp-rows { width: 100%; margin-top: 4px; border-collapse: collapse; font-variant-numeric: tabular-nums; border-top: 1px solid var(--rule); }
.cmp-row td, .cmp-row th { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.cmp-row th { font-weight: 500; font-size: 14px; color: var(--muted); text-align: center; white-space: nowrap; padding: 12px 10px; }
.cmp-row td { width: 40%; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.cmp-row td:last-child { text-align: right; }
.cmp-row td.win { color: var(--ring); font-weight: 700; }
.cmp-row td.win .i { width: 14px; height: 14px; margin-right: 6px; vertical-align: -1px; }
.cmp-row td:last-child.win .i { margin: 0 6px 0 0; }
.cmp-row td.lose { color: var(--muted); font-weight: 500; }
.cmp-row td.none { color: var(--faint); font-weight: 500; font-size: 15px; }

.acct-split { align-items: start; }
.acct-status { margin: 0 0 8px; font-weight: 600; font-size: 20px; line-height: 1.3; color: var(--ink); }
.acct-note { margin: 0 0 6px; color: var(--ink-2); max-width: 40ch; }
.acct-side .btn { margin-top: 18px; }
.acct-side .btn-lg .i { width: 18px; height: 18px; }

.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 6px 22px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.step-mark { align-self: start; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--rule-2); color: var(--muted); }
.step-mark b { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1; }
.step-mark .i { display: none; width: 18px; height: 18px; }
.step[data-state="current"] .step-mark { background: var(--sun); border-color: var(--sun); color: #160a02; }
.step[data-state="done"] .step-mark { background: var(--ok); border-color: var(--ok); color: #06140b; }
.step[data-state="done"] .step-mark .i { stroke-width: 3; }
.step[data-state="done"] .step-mark b { display: none; }
.step[data-state="done"] .step-mark .i { display: block; }
.step[data-state="wait"] .step-mark { border-style: dashed; color: var(--ink-2); }
.step-main { min-width: 0; }
.step-top { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
.step h2 { font-size: 30px; font-weight: 700; letter-spacing: .02em; }
.step-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.step[data-state="wait"] .step-tag { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.step[data-state="todo"] { opacity: .6; }
.step[data-state="todo"] h2 { color: var(--ink-2); }
.step-sub { margin: 6px 0 0; color: var(--ink-2); }
.step-sub:empty { display: none; }
.step[data-state="todo"] .step-sub, .step[data-state="loading"] .step-sub { color: var(--muted); }
.step-info { margin-top: 12px; }
.step-info:empty { display: none; }
.step-note { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.step-note.bad { color: var(--bad); }
.step-note a, .pf-sub-fail a { padding: 12px 0; color: var(--ring); text-decoration: underline; text-underline-offset: 3px; }
.link-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; border: 0; background: none; color: var(--ink-2); font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }
.link-btn[aria-disabled="true"] { color: var(--muted); text-decoration: none; cursor: default; }
.step-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.step-act > .btn-ghost:last-child { margin-right: -12px; }
.step-act:empty { display: none; }

.chip { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.chip img, .chip .av { width: 36px; height: 36px; border-radius: 2px; flex: none; background: var(--panel-2); object-fit: cover; }
.chip .av { display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--muted); }
.chip > span { display: grid; min-width: 0; line-height: 1.3; }
.chip b { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { font-size: 13px; color: var(--muted); }

.m-title { font-size: 36px; padding-right: 44px; margin-bottom: 14px; }
.m-text { margin: 0 0 26px; color: var(--ink-2); max-width: 54ch; }
.m-text code { color: var(--ring); }
.m-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.pf-id { display: grid; justify-items: start; align-content: start; }
.pf-av { width: 96px; height: 96px; border-radius: 3px; background: var(--panel-2); object-fit: cover; margin-bottom: 20px; }
span.pf-av { display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 40px; color: var(--muted); }
.pf-id .sk-h { width: 70%; }
.pf-name { margin: 0; font-weight: 600; font-size: 22px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; max-width: 100%; }
.pf-sid { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pf-actions .btn-ghost { padding-left: 0; }
.pf-main { display: grid; gap: 56px; min-width: 0; }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.pf-head h2 { font-size: 36px; }
.pf-head .link-arrow { font-size: 15px; min-height: 40px; }
.pf-sub-fail { font-size: 14px; color: var(--ink-2); }
.pf-head .link-arrow .i { width: 15px; height: 15px; }
.pf-acc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pf-acc li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; min-height: 60px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.pf-k { color: var(--muted); }
.pf-who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.pf-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-mini { width: 28px; height: 28px; border-radius: 2px; flex: none; background: var(--panel-2); object-fit: cover; }
span.pf-mini { display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--muted); }
.pf-acc .status, .pf-sub .status { font-size: 15px; white-space: nowrap; }
.pf-subs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pf-sub { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px 90px; align-items: center; gap: 10px 24px; min-height: 72px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.pf-sub-main { display: grid; gap: 3px; min-width: 0; }
.pf-sub-main b { font-weight: 600; }
.pf-sub-main > span { font-size: 14px; color: var(--muted); }
.pf-sub-main .mono { font-size: 13px; }
.pf-sub-main .sk-line { margin: 4px 0; }
.pf-sub-amt { color: var(--ink); text-align: right; }
.pf-sub-act { display: flex; justify-content: flex-end; }
.pf-msg p { margin: 0 0 14px; color: var(--ink-2); }
.pf-main > section > p { margin: 0; }
.pf-main .kv div:last-child:nth-child(odd) { grid-column: 1 / -1; padding-right: 0; }
.pf-out { padding: 8px 0 24px; }
.pf-out .acct-note { margin-bottom: 26px; }

@media (max-width: 1100px) {
  .pf-id { grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: center; }
  .pf-av { grid-row: span 3; width: 80px; height: 80px; margin: 0; }
  .pf-id .pf-actions { grid-column: 2; margin-top: 12px; }
}
@media (max-width: 640px) {
  .lb-controls { gap: 10px; margin-bottom: 16px; }
  .lb-controls .seg { display: flex; width: 100%; }
  .lb-controls .seg button { flex: 1; justify-content: center; padding: 0 8px; }
  .lb-server, .lb-search { width: 100%; margin-left: 0; }
  .lb-sort { display: flex; align-items: center; gap: 10px; width: 100%; }
  .lb-sort .select { flex: 1; }
  .btn-sm, .seg button { min-height: 40px; }
  .lb thead .rank-n { width: 40px; }
  .lb thead .n { width: 66px; }
  .lb-foot { flex-direction: column; align-items: stretch; }
  .pager { justify-content: space-between; }
  .pm-head { gap: 14px; margin-bottom: 18px; }
  .pm-head { align-items: flex-start; }
  .pm-av { width: 52px; height: 52px; }
  .pm-id h2 { font-size: 28px; }
  .pm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-stats div:nth-child(n) { padding-left: 0; border-left: 0; }
  .pm-stats div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule); }
  .pm-stats dd { font-size: 20px; }
  .pm-weap li { grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 44px; gap: 10px; }
  .cmp-title { font-size: 30px; }
  .cmp-head .who { font-size: 16px; gap: 8px; }
  .cmp-head .who img, .cmp-head .who .av { width: 32px; height: 32px; }
  .cmp-row td { font-size: 16px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 4px 14px; padding: 22px 0; }
  .step-mark { width: 32px; height: 32px; }
  .step h2 { font-size: 26px; }
  .step-act { grid-column: 2; justify-content: flex-start; margin-top: 14px; }
  .step-inline { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .step-inline .step-act { grid-column: auto; margin-top: 0; }
  .step-act .btn:not(.btn-sm) { flex: 1 1 auto; }
  .m-title { font-size: 30px; }
  .m-actions .btn { flex: 1; }
  .pf-acc li { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 0; }
  .pf-k { grid-column: 1 / -1; font-size: 14px; }
  .pf-sub { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .pf-sub-main { flex: 1 1 100%; }
  .pf-sub-act { margin-left: auto; }
  .pf-main { gap: 44px; }
  .pf-head h2 { font-size: 32px; }
}

/* Top 3 podium */
.lb-pod-title { margin: 0 0 16px; font-size: 28px; }
.podium { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.pod { --medal: #f2c94c; min-width: 0; }
.pod-1 { order: 2; } .pod-2 { order: 1; --medal: #c9ced6; } .pod-3 { order: 3; --medal: #d08a4e; }
.pod-btn { position: relative; width: 100%; display: grid; justify-items: center; gap: 6px; padding: 26px 16px 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 12%, var(--panel)), var(--panel) 70%); border: 1px solid color-mix(in srgb, var(--medal) 35%, transparent); border-radius: 3px; color: inherit; font: inherit; text-align: center; cursor: pointer; transition: border-color 140ms ease, transform 160ms var(--ease); }
.pod-btn:hover { border-color: var(--medal); transform: translateY(-2px); }
.pod-1 .pod-btn { padding-top: 40px; padding-bottom: 30px; box-shadow: 0 0 40px -12px color-mix(in srgb, var(--medal) 45%, transparent); }
.pod-rank { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--medal); color: #14110a; font: 800 16px/1 var(--display); box-shadow: 0 0 0 3px var(--ground); }
.pod-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--panel-2); box-shadow: 0 0 0 2px var(--medal); }
span.pod-av { display: grid; place-items: center; font: 700 22px/1 var(--display); color: var(--muted); }
.pod-1 .pod-av { width: 80px; height: 80px; }
.pod-name { max-width: 100%; margin-top: 6px; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-kills { font-size: 14px; color: var(--muted); }
.pod-kills b { font: 800 34px/1 var(--display); color: var(--ink); margin-right: 4px; }
.pod-1 .pod-kills b { font-size: 44px; color: var(--moon); }
.pod-sub { font-size: 13px; color: var(--muted); }
.pod.is-sk { display: grid; justify-items: center; gap: 12px; padding: 30px 16px; background: var(--panel); border-radius: 3px; }

/* Compare */
.lb-cmp-btn .i { width: 18px; height: 18px; }
.lb-cmp-btn[aria-pressed="true"] { border-color: var(--ring); color: var(--ring); }
.lb-hint { margin: -10px 0 18px; font-size: 14px; color: var(--muted); }
.lb-hint b { color: var(--ink-2); font-weight: 600; }
.lb-cmp { border-color: rgba(255, 176, 87, .45); background: rgba(255, 122, 24, .07); }
.lb-cmp .who .i { width: 20px; height: 20px; color: var(--ring); flex: none; }
body.lb-picking .lb tbody tr[data-player] { cursor: copy; }
body.lb-picking .lb tbody tr[data-player]:hover { background: rgba(255, 176, 87, .08); }
.pm-foot .btn .i { width: 16px; height: 16px; }
.pm-mini { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pm-mini dd { font-size: 19px; }
.pm-sec h3 { font-size: 20px; }

@media (max-width: 640px) {
  .podium { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pod-1, .pod-2, .pod-3 { order: 0; }
  .pod-btn, .pod-1 .pod-btn { grid-template-columns: auto minmax(0, 1fr) auto; justify-items: start; align-items: center; column-gap: 14px; row-gap: 2px; padding: 14px 16px; text-align: left; }
  .pod-rank { position: static; transform: none; grid-row: 1 / 3; width: 28px; height: 28px; }
  .pod .pod-av, .pod span.pod-av { display: none; }
  .pod-name { grid-column: 2; margin: 0; }
  .pod-sub { grid-column: 2; }
  .pod-kills { grid-column: 3; grid-row: 1 / 3; text-align: right; }
  .pod-kills b, .pod-1 .pod-kills b { font-size: 30px; display: block; margin: 0; }
  .pm-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-cmp-btn { order: 3; }
}
