:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --paper-2: #ebe4d6;
  --ink: #161814;
  --muted: #63685f;
  --faint: #8d9186;
  --line: #d7cebe;
  --line-strong: #b6a98f;
  --panel: #fffdf8;
  --panel-dark: #252922;
  --moss: #496a46;
  --moss-2: #2f4e35;
  --brass: #b4833a;
  --brass-2: #d0a45c;
  --gold: #d8a63f;
  --silver: #b9c0c0;
  --bronze: #b06a36;
  --steel: #74807c;
  --steel-2: #a7b0aa;
  --graph-spark: #f1c86e;
  --clay: #9a4f39;
  --blue: #415d75;
  --glass: rgba(255, 253, 248, .78);
  --inner-glow: inset 0 1px 0 rgba(255, 253, 248, .46), 0 18px 50px rgba(57, 47, 32, .16);
  --shadow: 0 18px 50px rgba(57, 47, 32, .16);
  --shadow-soft: 0 8px 24px rgba(57, 47, 32, .10);
  --radius: 8px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d100e;
  --paper-2: #151a15;
  --ink: #f6efe2;
  --muted: #b9b0a2;
  --faint: #858f7d;
  --line: #30372f;
  --line-strong: #58664f;
  --panel: #171c17;
  --panel-dark: #090c0a;
  --moss: #7fa36f;
  --moss-2: #b8d69a;
  --brass: #c99b4b;
  --brass-2: #f0c977;
  --gold: #d7a83f;
  --silver: #b4bcbb;
  --bronze: #bd7240;
  --steel: #747f7b;
  --steel-2: #a6b0a9;
  --graph-spark: #ffd06d;
  --clay: #d98060;
  --blue: #7f949c;
  --glass: rgba(23, 28, 23, .82);
  --inner-glow: inset 0 1px 0 rgba(255, 253, 248, .09), 0 22px 80px rgba(0, 0, 0, .46);
  --shadow: 0 22px 70px rgba(0, 0, 0, .42);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, .30);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(73, 106, 70, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 106, 70, .055) 1px, transparent 1px),
    radial-gradient(780px 440px at 74% -10%, rgba(180, 131, 58, .18), transparent 62%),
    radial-gradient(620px 420px at 0% 18%, rgba(65, 93, 117, .12), transparent 58%),
    var(--paper);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  overflow-x: hidden;
  animation: ambientGrid 20s ease-in-out infinite alternate;
}

html[data-theme="dark"] body {
  background:
    linear-gradient(rgba(127, 163, 111, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 176, 169, .04) 1px, transparent 1px),
    radial-gradient(760px 440px at 80% -10%, rgba(201, 155, 75, .18), transparent 62%),
    radial-gradient(620px 420px at 0% 16%, rgba(116, 127, 123, .10), transparent 58%),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgba(22, 24, 20, .045) 49.8% 50.2%, transparent 50.2% 100%),
    linear-gradient(transparent 0 49.8%, rgba(22, 24, 20, .045) 49.8% 50.2%, transparent 50.2% 100%);
  background-size: 170px 170px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
  z-index: -1;
}

html[data-theme="dark"] body::before {
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgba(255, 253, 248, .04) 49.8% 50.2%, transparent 50.2% 100%),
    linear-gradient(transparent 0 49.8%, rgba(255, 253, 248, .04) 49.8% 50.2%, transparent 50.2% 100%);
  background-size: 170px 170px;
}

a {
  color: var(--moss-2);
  text-decoration: none;
}

a:hover { color: var(--clay); }

button,
input,
select {
  font: inherit;
}

button { -webkit-tap-highlight-color: transparent; }

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 18px;
  animation: pageDrop .48s cubic-bezier(.2, .8, .2, 1) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--panel-dark);
  color: var(--brass-2);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  animation: markFloat 4.2s ease-in-out infinite;
}

.brand__text {
  font-size: 15px;
}

.top-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.top-links a {
  color: var(--muted);
}

.top-links .home-site-button {
  position: relative;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 0 13px;
  color: #20160a;
  font-size: 13px;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 248, .34),
    0 10px 24px rgba(201, 155, 75, .13);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  animation: homeButtonFloat 3.4s ease-in-out infinite;
}

.top-links .home-site-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 32%, rgba(255, 253, 248, .42) 46%, transparent 60% 100%);
  transform: translateX(-125%);
  animation: homeButtonSweep 4.6s ease-in-out infinite;
}

.home-site-button__spark {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #2f7f46;
  box-shadow: 0 0 0 3px rgba(47, 127, 70, .16);
  transform: rotate(45deg);
  animation: homeButtonSpark 1.9s ease-in-out infinite;
}

.top-links .home-site-button span:last-child {
  position: relative;
}

.top-links .home-site-button:hover,
.top-links .home-site-button:focus-visible {
  color: #140d04;
  filter: saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 248, .45),
    0 14px 30px rgba(201, 155, 75, .22);
  transform: translateY(-1px);
}

.top-links a:hover {
  color: var(--ink);
}

.settings-btn,
.theme-btn,
.modal__close,
.share-btn,
.replay-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .78);
  color: var(--ink);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.settings-btn,
.theme-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.settings-btn:hover,
.theme-btn:hover,
.modal__close:hover,
.share-btn:hover,
.replay-btn:hover {
  border-color: var(--moss);
  background: #fffaf0;
  color: var(--moss-2);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .settings-btn,
html[data-theme="dark"] .theme-btn,
html[data-theme="dark"] .modal__close,
html[data-theme="dark"] .share-btn,
html[data-theme="dark"] .replay-btn {
  background: rgba(23, 28, 23, .88);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .settings-btn:hover,
html[data-theme="dark"] .theme-btn:hover,
html[data-theme="dark"] .modal__close:hover,
html[data-theme="dark"] .share-btn:hover,
html[data-theme="dark"] .replay-btn:hover {
  background: #202720;
  border-color: var(--moss);
  color: var(--moss-2);
}

.theme-btn__sun {
  display: none;
}

html[data-theme="dark"] .theme-btn__moon {
  display: none;
}

html[data-theme="dark"] .theme-btn__sun {
  display: block;
}

.settings-btn:hover svg {
  transform: rotate(35deg);
}

.settings-btn svg,
.theme-btn svg,
.share-btn svg,
.replay-btn svg {
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

main {
  padding-bottom: 64px;
}

.command-center {
  position: relative;
  isolation: isolate;
  padding: clamp(24px, 3.6vw, 42px);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(520px 240px at 15% 0%, rgba(232, 187, 99, .20), transparent 64%),
    radial-gradient(520px 240px at 88% 12%, rgba(116, 128, 124, .14), transparent 66%),
    linear-gradient(135deg, rgba(255,253,248,.97), rgba(246,239,226,.92)),
    linear-gradient(90deg, rgba(73,106,70,.07) 1px, transparent 1px),
    linear-gradient(rgba(73,106,70,.07) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--inner-glow);
  overflow: visible;
  animation: sectionReveal .58s .04s cubic-bezier(.2, .8, .2, 1) both;
}

html[data-theme="dark"] .command-center {
  background:
    radial-gradient(560px 260px at 16% -2%, rgba(255, 211, 111, .14), transparent 64%),
    radial-gradient(520px 260px at 90% 10%, rgba(166, 176, 169, .11), transparent 64%),
    linear-gradient(135deg, rgba(24, 29, 24, .98), rgba(13, 16, 14, .95)),
    linear-gradient(90deg, rgba(184, 255, 157, .06) 1px, transparent 1px),
    linear-gradient(rgba(166, 176, 169, .04) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  border-color: rgba(240, 201, 119, .18);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .08), 0 28px 90px rgba(0, 0, 0, .48), 0 0 34px rgba(201, 155, 75, .07);
}

.command-center::before {
  content: "";
  position: absolute;
  right: -18px;
  top: 24px;
  color: rgba(22, 24, 20, .06);
  font-family: var(--mono);
  font-size: 92px;
  font-weight: 700;
  line-height: .9;
  max-width: 360px;
  pointer-events: none;
  z-index: -1;
  animation: none;
  text-shadow: 0 0 22px rgba(232, 187, 99, .10);
}

html[data-theme="dark"] .command-center::before {
  color: rgba(246, 239, 226, .055);
}

.command-center::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: linear-gradient(90deg, var(--moss), var(--brass), var(--blue), var(--clay));
  background-size: 240% 100%;
  box-shadow: 0 0 28px rgba(232, 187, 99, .36);
  animation: railSweep 7s ease-in-out infinite;
}

.command-center__intro {
  max-width: 760px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  max-width: 920px;
  font-size: clamp(36px, 5.25vw, 58px);
  line-height: 1.02;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.command-center__intro p {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  margin-bottom: 26px;
}

.search {
  width: 100%;
  position: relative;
  z-index: 60;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(150px, .5fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(37, 41, 34, .98), rgba(11, 15, 12, .96));
  background-size: auto;
  border: 1px solid rgba(255, 211, 111, .22);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 253, 248, .08), 0 0 28px rgba(201, 155, 75, .08);
  overflow: visible;
  animation: liftIn .5s .16s cubic-bezier(.2, .8, .2, 1) both;
}

.search::before {
  content: none;
}

.search__field {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.search__field label,
.setting__label,
.eyebrow {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.search__field label {
  color: rgba(255, 253, 248, .58);
}

.search__field input,
.search__field select,
.setting input,
.setting select {
  width: 100%;
  min-height: 46px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  outline: none;
  padding: 11px 12px;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.search__field input,
.search__field select {
  color: #f9f3e7;
  background: rgba(255, 253, 248, .085);
  border-color: rgba(255, 253, 248, .16);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .07);
}

html[data-theme="dark"] .search__field input,
html[data-theme="dark"] .search__field select {
  background: rgba(255, 253, 248, .08);
}

.search__field input::placeholder {
  color: rgba(255, 253, 248, .38);
}

.search__field input:focus,
.search__field select:focus,
.setting input:focus,
.setting select:focus {
  border-color: var(--brass-2);
  box-shadow: 0 0 0 3px rgba(208, 164, 92, .18), 0 0 18px rgba(201, 155, 75, .10);
}

.search__field--username {
  z-index: 90;
}

.search__field--target {
  z-index: 86;
}

.username-suggest {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 10px);
  z-index: 220;
  width: min(520px, calc(100vw - 48px));
}

.username-suggest[hidden] {
  display: none;
}

.username-suggest__panel {
  overflow: auto;
  max-height: min(480px, calc(100vh - 180px));
  padding: 8px;
  color: #f7f1e8;
  background:
    radial-gradient(220px 140px at 12% 0%, rgba(240, 201, 119, .10), transparent 72%),
    linear-gradient(145deg, rgba(17, 19, 18, .98), rgba(5, 7, 7, .98));
  border: 1px solid rgba(240, 201, 119, .18);
  border-radius: 8px;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, .46),
    0 0 0 1px rgba(255, 253, 248, .06) inset;
  backdrop-filter: blur(16px);
  animation: suggestIn .16s ease both;
}

.username-suggest__row,
.username-suggest__all {
  width: 100%;
  appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.username-suggest__row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 7px 8px;
  background: transparent;
  border-radius: 6px;
  text-align: left;
  transition: background .14s ease, transform .14s ease, box-shadow .14s ease;
}

.username-suggest__row:hover,
.username-suggest__row.is-active {
  background: linear-gradient(90deg, rgba(240, 201, 119, .16), rgba(255, 253, 248, .06));
  box-shadow: inset 2px 0 0 var(--brass-2);
  transform: translateX(2px);
}

.username-suggest__avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 253, 248, .16);
  border-radius: 8px;
  color: #1c160f;
  background: linear-gradient(145deg, #d9c9aa, #756d62);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
}

.username-suggest__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username-suggest__body,
.username-suggest__name,
.username-suggest__handle {
  min-width: 0;
}

.username-suggest__body {
  display: grid;
  gap: 3px;
}

.username-suggest__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  line-height: 1.2;
}

.username-suggest__name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.username-suggest__title {
  color: #6fd1ff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.username-suggest__flag {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 253, 248, .16);
  border-radius: 3px;
  background: rgba(255, 253, 248, .08);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
}

.username-suggest__flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username-suggest__flag-code {
  color: rgba(255, 253, 248, .8);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.username-suggest__handle {
  display: flex;
  gap: 7px;
  color: rgba(255, 253, 248, .54);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.username-suggest__handle span {
  color: rgba(240, 201, 119, .72);
}

.username-suggest__status,
.username-suggest__empty {
  padding: 9px 10px;
  color: rgba(255, 253, 248, .58);
  font-size: 12px;
}

.username-suggest__empty {
  display: grid;
  gap: 3px;
}

.username-suggest__empty strong {
  color: #f7f1e8;
}

.username-suggest__all {
  margin-top: 6px;
  padding: 12px 10px 6px;
  color: #f0cf8c;
  background: transparent;
  border-top: 1px solid rgba(255, 253, 248, .10);
  text-align: left;
  font-weight: 800;
}

.username-suggest__all:hover {
  color: #fff7df;
}

.search__field select {
  appearance: none;
  cursor: pointer;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #f9f3e7 50%),
    linear-gradient(135deg, #f9f3e7 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 11px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.search__field select option {
  background: var(--panel-dark);
  color: #fffdf8;
}

.search__btn {
  position: relative;
  z-index: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  appearance: none;
  border: 1px solid #d9b06b;
  border-radius: 6px;
  padding: 0 18px;
  color: #20160a;
  background: linear-gradient(180deg, #f0cf8c, #c89141);
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .18) inset, 0 12px 26px rgba(180, 131, 58, .18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.search__btn::before {
  content: "";
  position: absolute;
  inset: -80% -35%;
  background: conic-gradient(from 90deg, transparent, rgba(255,255,255,.28), transparent, rgba(123,216,255,.18), transparent);
  opacity: .35;
  animation: buttonHalo 4.5s linear infinite;
}

.search__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 35%, rgba(255,255,255,.55) 50%, transparent 65% 100%);
  transform: translateX(-130%);
}

.search__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .22) inset, 0 14px 34px rgba(180, 131, 58, .34), 0 0 22px rgba(201, 155, 75, .12);
  filter: saturate(1.04);
}

.search__btn:hover:not(:disabled)::after {
  animation: shimmer .85s ease;
}

.search__btn:disabled {
  opacity: .66;
  cursor: wait;
}

.search__status,
.search__log,
.cache-info {
  max-width: 780px;
}

.search__status {
  margin-top: 14px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff9ed;
  border: 1px solid var(--line);
  border-left: 4px solid var(--moss);
  border-radius: var(--radius);
  font-size: 14px;
}

html[data-theme="dark"] .search__status {
  background: #151a15;
  border-color: var(--line);
}

.search__status.is-error {
  border-left-color: var(--clay);
  background: #fff4ef;
}

html[data-theme="dark"] .search__status.is-error {
  background: #211511;
}

.search__status.is-working {
  border-left-color: var(--brass);
}

.spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border: 2px solid rgba(73, 106, 70, .22);
  border-top-color: var(--moss);
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin .75s linear infinite;
}

.search__status .counters {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.search__status .counters b {
  color: var(--moss-2);
  font-family: var(--mono);
}

.search-queue {
  display: grid;
  gap: 10px;
  max-width: 780px;
  margin-top: 12px;
  padding: 12px;
  color: var(--ink);
  background:
    radial-gradient(260px 110px at 0% 0%, rgba(201, 155, 75, .12), transparent 70%),
    rgba(255, 253, 248, .70);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .search-queue {
  background:
    radial-gradient(260px 110px at 0% 0%, rgba(201, 155, 75, .14), transparent 70%),
    #121713;
}

.search-queue__head,
.search-queue__grid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-queue__head {
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-queue__head strong {
  color: var(--brass-2);
}

.search-queue__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(72px, 1fr));
}

.search-queue__grid span {
  min-width: 0;
  padding: 8px;
  background: rgba(255, 253, 248, .055);
  border: 1px solid rgba(255, 253, 248, .08);
  border-radius: 6px;
}

.search-queue__grid small,
.search-queue p {
  color: var(--muted);
}

.search-queue__grid small {
  display: block;
  margin-bottom: 2px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.search-queue__grid b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-queue p {
  margin: 0;
  font-size: 12px;
}

.search__log {
  margin-top: 10px;
  max-height: 160px;
  overflow: auto;
  color: #e9dfcf;
  background: var(--panel-dark);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.65;
}

.search__log .log__line {
  opacity: 0;
  transform: translateX(-8px);
  animation: logIn .26s ease forwards;
}

.search__log .log__line:last-child {
  color: #f0cf8c;
}

.cache-info {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.quick-targets {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 14px;
  background:
    radial-gradient(420px 180px at 18% 0%, rgba(240, 201, 119, .10), transparent 68%),
    linear-gradient(135deg, rgba(17, 22, 17, .78), rgba(8, 11, 9, .66));
  border: 1px solid rgba(240, 201, 119, .16);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .07);
}

.quick-targets__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.quick-targets__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.quick-label {
  display: block;
  color: rgba(246, 239, 226, .72);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .1em;
  overflow-wrap: anywhere;
}

.quick-targets__head p {
  margin: 6px 0 0;
  color: rgba(246, 239, 226, .58);
  font-size: 13px;
  line-height: 1.35;
}

.quick-targets__source {
  color: var(--brass-2);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.quick-targets__source:hover {
  color: #ffe4a0;
}

.quick-targets__trace {
  min-height: 36px;
  padding: 0 13px;
  color: #211708;
  background: linear-gradient(145deg, #ffe7a2, #c99933);
  border: 1px solid rgba(255, 239, 179, .58);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(201, 155, 75, .18), inset 0 1px 0 rgba(255, 255, 255, .38);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.quick-targets__trace:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(201, 155, 75, .24), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.quick-targets__trace:disabled {
  cursor: progress;
  opacity: .62;
}

.quick-target-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-targets__empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  min-height: 96px;
  align-content: center;
  padding: 18px;
  color: rgba(246, 239, 226, .62);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, .055), rgba(255, 253, 248, .02)),
    rgba(7, 10, 8, .34);
  border: 1px dashed rgba(240, 201, 119, .22);
  border-radius: 8px;
}

.quick-targets__empty strong {
  color: #fff8e8;
  font-size: 14px;
}

.quick-targets__empty span {
  font-size: 13px;
}

.quick-group {
  min-width: 0;
  animation: chipLift .44s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(.12s + var(--group-index) * .05s);
}

.quick-group__title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin-bottom: 8px;
  color: #f5eddc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.quick-group__title small {
  margin-left: auto;
  color: rgba(246, 239, 226, .45);
  font-size: 10px;
  letter-spacing: .08em;
}

.quick-group__icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #221707;
  background: linear-gradient(145deg, #f4d58c, var(--gold));
  border: 1px solid rgba(255, 240, 179, .52);
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(240, 201, 119, .16);
}

.quick-group__icon--rapid {
  background: linear-gradient(145deg, #e7ece8, var(--silver));
}

.quick-group__icon--blitz {
  background: linear-gradient(145deg, #ffe7a0, var(--gold));
}

.quick-group__icon--bullet {
  background: linear-gradient(145deg, #d9ae83, var(--bronze));
}

.quick-group__image-icon,
.quick-group__icon svg {
  width: 16px;
  height: 16px;
}

.quick-group__image-icon {
  display: block;
  object-fit: contain;
}

.quick-group__icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-group__icon svg path:first-child:last-child,
.quick-group__icon--blitz svg path {
  fill: currentColor;
  stroke: none;
}

.quick-group__players {
  display: grid;
  gap: 7px;
}

.chip.quick-player {
  position: relative;
  appearance: none;
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(255, 253, 248, .11);
  border-radius: 8px;
  padding: 8px;
  color: #f5eddc;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, .07), rgba(255, 253, 248, .025)),
    rgba(7, 10, 8, .42);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .07);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.chip.quick-player::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(var(--steel-2), var(--brass-2));
  opacity: .26;
  transform: scaleY(.45);
  transition: opacity .18s ease, transform .18s ease;
}

.chip.quick-player:hover,
.chip.quick-player.is-active {
  border-color: rgba(240, 201, 119, .46);
  background:
    radial-gradient(180px 70px at 10% 50%, rgba(240, 201, 119, .16), transparent 70%),
    linear-gradient(135deg, rgba(255, 253, 248, .10), rgba(255, 253, 248, .035));
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .11), 0 10px 24px rgba(0, 0, 0, .20), 0 0 18px rgba(201, 155, 75, .10);
  transform: translateY(-1px);
}

.chip.quick-player:hover::before,
.chip.quick-player.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.chip.quick-player.is-active .quick-player__avatar {
  border-color: var(--brass-2);
  box-shadow: 0 0 0 3px rgba(240, 201, 119, .13), 0 0 18px rgba(240, 201, 119, .18);
}

.quick-player__avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #20160a;
  background: linear-gradient(145deg, #f0cf8c, #7e8b83);
  border: 1px solid rgba(255, 253, 248, .18);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.quick-player__avatar[data-profile-trigger],
[data-profile-trigger].card__avatar,
[data-profile-trigger].card__avatar-fallback {
  cursor: pointer;
}

.quick-player__photo,
.quick-player__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-player__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-player__name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #fff8e8;
  font-size: 12.5px;
  line-height: 1.1;
}

.quick-player__name strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-player__rank,
.quick-player__title {
  flex: 0 0 auto;
  color: var(--brass-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.quick-player__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: rgba(246, 239, 226, .52);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.1;
}

.quick-more {
  width: 100%;
  min-height: 48px;
  color: var(--brass-2);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, .045), rgba(255, 253, 248, .018)),
    rgba(7, 10, 8, .28);
  border: 1px solid rgba(240, 201, 119, .22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.quick-more:hover {
  color: #ffe4a0;
  border-color: rgba(240, 201, 119, .46);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}

.quick-more--all {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.graph-section,
.leaderboard-section,
.cards-section,
.explain {
  position: relative;
  isolation: isolate;
  margin-top: 22px;
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(116, 128, 124, .10), transparent 66%),
    linear-gradient(135deg, rgba(255, 253, 248, .92), rgba(245, 241, 232, .88));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  animation: sectionReveal .58s cubic-bezier(.2, .8, .2, 1) both;
}

.graph-section { animation-delay: .12s; }
.cards-section { animation-delay: .2s; }
.explain { animation-delay: .28s; }
.leaderboard-section { animation-delay: .36s; }

html[data-theme="dark"] .graph-section,
html[data-theme="dark"] .leaderboard-section,
html[data-theme="dark"] .cards-section,
html[data-theme="dark"] .explain {
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(116, 128, 124, .09), transparent 66%),
    linear-gradient(135deg, rgba(23, 28, 23, .92), rgba(12, 16, 13, .88));
  border-color: rgba(184, 255, 157, .12);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .06), var(--shadow-soft);
}

.graph-section {
  padding: clamp(20px, 3vw, 30px);
}

.graph-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.graph-header h2,
.section-heading h2,
.explain h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

.leaderboard-section {
  padding: clamp(20px, 3vw, 28px);
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 14px;
}

.leaderboard-tab {
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255, 253, 248, .04);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.leaderboard-tab:hover,
.leaderboard-tab.is-active {
  color: #201408;
  background: linear-gradient(145deg, #fff0b3, var(--gold) 60%, #9a6b24);
  border-color: rgba(255, 240, 179, .55);
  transform: translateY(-1px);
}

.leaderboard-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.leaderboard {
  display: grid;
  gap: 8px;
}

.leaderboard-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

html[data-theme="dark"] .leaderboard-row {
  background: #151a15;
}

.leaderboard-row:hover,
.leaderboard-row.is-active {
  background: #fffdf8;
  border-color: var(--brass);
  box-shadow: 0 10px 24px rgba(57, 47, 32, .10);
  transform: translateY(-1px);
}

html[data-theme="dark"] .leaderboard-row:hover,
html[data-theme="dark"] .leaderboard-row.is-active {
  background: #1b211b;
}

.leaderboard-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fffdf8;
  background: var(--panel-dark);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-player {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaderboard-player strong,
.leaderboard-player small,
.leaderboard-count small {
  display: block;
}

.leaderboard-player strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-player small,
.leaderboard-count small {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: #fffdf8;
  background: var(--moss-2);
  border: 2px solid #fffdf8;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  font-weight: 800;
  object-fit: cover;
}

html[data-theme="dark"] .leaderboard-avatar {
  border-color: #111511;
}

.leaderboard-count {
  min-width: 88px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.leaderboard-count strong {
  display: block;
  color: var(--brass-2);
  font-family: var(--mono);
  font-size: 28px;
  line-height: 1;
}

.leaderboard-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.graph-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  color: #fffdf8;
  background: linear-gradient(135deg, rgba(37, 41, 34, .98), rgba(12, 16, 13, .96));
  border: 1px solid rgba(255, 211, 111, .22);
  border-radius: var(--radius);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .08), 0 0 22px rgba(201, 155, 75, .08);
  animation: metricGlow 3.6s ease-in-out infinite;
}

.graph-length {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: var(--brass-2);
}

.graph-length-label {
  color: rgba(255, 253, 248, .7);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.share-btn,
.replay-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
}

.share-btn:hover svg,
.replay-btn:hover svg {
  transform: rotate(-80deg);
}

.share-btn--image {
  border-color: rgba(116, 127, 123, .38);
}

.graph-explorer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  color: var(--ink);
  background:
    radial-gradient(280px 130px at 0% 0%, rgba(201, 155, 75, .12), transparent 68%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .graph-explorer {
  background:
    radial-gradient(280px 130px at 0% 0%, rgba(201, 155, 75, .14), transparent 68%),
    #111611;
}

.graph-explorer__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.graph-explorer__avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #201408;
  background: linear-gradient(145deg, #fff0b3, var(--gold));
  border: 1px solid rgba(255, 240, 179, .52);
  border-radius: 50%;
  font-weight: 900;
}

.graph-explorer__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.graph-explorer h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.graph-explorer p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.graph-explorer__close {
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 253, 248, .06);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.graph-explorer__close:hover {
  color: var(--ink);
  border-color: rgba(240, 201, 119, .32);
}

.graph-explorer__list {
  display: grid;
  gap: 7px;
}

.graph-explorer__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  background: rgba(255, 253, 248, .045);
  border: 1px solid rgba(255, 253, 248, .08);
  border-radius: 7px;
}

.graph-explorer__row strong,
.graph-explorer__row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-explorer__row button {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.graph-explorer__row small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.share-btn.is-copied {
  border-color: rgba(240, 201, 119, .48);
  color: #20160a;
  background: linear-gradient(145deg, #fff0b3, var(--gold));
}

.graph-wrap {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(460px 220px at 20% 50%, rgba(232, 187, 99, .12), transparent 66%),
    radial-gradient(460px 220px at 82% 38%, rgba(116, 128, 124, .10), transparent 66%),
    linear-gradient(90deg, rgba(22,24,20,.055) 1px, transparent 1px),
    linear-gradient(rgba(22,24,20,.055) 1px, transparent 1px),
    #f7f2e8;
  background-size: auto, auto, 52px 52px, 52px 52px, auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .18), inset 0 0 50px rgba(73, 106, 70, .08);
  transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease;
}

.graph-wrap:hover {
  border-color: var(--brass);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .22), 0 16px 40px rgba(57, 47, 32, .12);
  transform: translateY(-1px);
}

html[data-theme="dark"] .graph-wrap {
  background:
    radial-gradient(460px 220px at 20% 50%, rgba(255, 211, 111, .10), transparent 66%),
    radial-gradient(460px 220px at 82% 38%, rgba(166, 176, 169, .10), transparent 66%),
    linear-gradient(90deg, rgba(184,255,157,.04) 1px, transparent 1px),
    linear-gradient(rgba(166,176,169,.035) 1px, transparent 1px),
    #111511;
  background-size: auto, auto, 52px 52px, 52px 52px, auto;
}

.graph-wrap::before,
.graph-wrap::after {
  position: absolute;
  color: rgba(22, 24, 20, .22);
  font-family: var(--mono);
  font-size: 11px;
  pointer-events: none;
  z-index: 4;
}

html[data-theme="dark"] .graph-wrap::before,
html[data-theme="dark"] .graph-wrap::after {
  color: rgba(246, 239, 226, .22);
}

.graph-wrap::before {
  content: "a     b     c     d     e     f     g     h";
  top: 10px;
  left: 18px;
}

.graph-wrap::after {
  content: "1  2  3  4  5  6  7  8";
  right: 12px;
  bottom: 12px;
  writing-mode: vertical-rl;
}

#graph {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: var(--chain-graph-height, 330px);
  overflow: visible;
}

#graph.is-tree-graph {
  height: var(--tree-graph-height, 620px);
}

.graph-wrap:has(#graph.is-tree-graph) {
  border-color: rgba(240, 201, 119, .48);
  box-shadow:
    inset 0 0 0 1px rgba(255, 253, 248, .12),
    inset 0 0 70px rgba(201, 155, 75, .08),
    0 18px 46px rgba(0, 0, 0, .18);
}

.graph-hint {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.node {
  cursor: pointer;
  pointer-events: visiblePainted;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tree-node {
  transform-box: fill-box;
  transform-origin: center;
}

.tree-node.is-placed {
  animation: nodePlace .5s ease-out both;
}

.node.is-profile-loaded .node__img {
  animation: profileLock .42s ease-out both;
}

@keyframes nodePlace {
  0% {
    opacity: 0;
    filter:
      drop-shadow(0 0 0 rgba(240, 201, 119, 0))
      saturate(.82);
  }
  44% {
    opacity: 1;
    filter:
      drop-shadow(0 0 14px rgba(240, 201, 119, .32))
      saturate(1.08);
  }
  100% {
    opacity: 1;
    filter:
      drop-shadow(0 0 0 rgba(240, 201, 119, 0))
      saturate(1);
  }
}

@keyframes profileLock {
  0% {
    opacity: .18;
    filter: saturate(.7) brightness(.82);
  }
  58% {
    opacity: 1;
    filter: saturate(1.1) brightness(1.08);
  }
  100% {
    opacity: 1;
    filter: none;
  }
}

.node:focus {
  outline: none;
}

.node:focus .node__ring,
.node:focus-visible .node__ring {
  stroke: var(--gold);
  stroke-width: 3.5;
  filter: drop-shadow(0 0 10px rgba(240, 201, 119, .42));
}

.node__hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.node__shadow {
  fill: rgba(57, 47, 32, .15);
}

html[data-theme="dark"] .node__shadow {
  fill: rgba(0, 0, 0, .42);
}

.node__ring {
  fill: #fffdf8;
  stroke: var(--line-strong);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: filter .2s ease, stroke-width .2s ease;
}

.node:hover .node__ring {
  filter: drop-shadow(0 0 9px rgba(208, 164, 92, .38));
  stroke-width: 3;
}

html[data-theme="dark"] .node__ring {
  fill: #141914;
}

.node.is-start .node__ring {
  stroke: var(--moss);
  stroke-width: 3;
}

.node.is-target .node__ring {
  stroke: var(--brass);
  stroke-width: 3;
}

.node__pulse {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2;
  opacity: 0;
}

.node.is-start .node__pulse {
  stroke: var(--moss);
}

.node__img {
  display: block;
}

.node__icon {
  font-size: 34px;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--panel-dark);
}

.node__label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.node__title {
  fill: var(--brass);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 800;
  text-anchor: middle;
}

.edge-line {
  fill: none;
  stroke: url(#edge-grad);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 4px 8px rgba(57, 47, 32, .12));
}

.edge-glow {
  fill: none;
  stroke: var(--brass-2);
  stroke-width: 11;
  stroke-linecap: round;
  opacity: .12;
  filter: blur(4px);
}

.tree-edge-line {
  stroke: url(#edge-grad);
  stroke-width: 5.5;
  stroke-opacity: 1;
  filter:
    drop-shadow(0 0 8px rgba(201, 155, 75, .42))
    drop-shadow(0 4px 10px rgba(0, 0, 0, .28));
}

.tree-edge-glow {
  stroke: var(--brass-2);
  stroke-width: 18;
  stroke-linecap: round;
  opacity: 0;
  filter: blur(5px);
}

.traveller {
  font-size: 23px;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--gold);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .34)) drop-shadow(0 0 7px rgba(240, 201, 119, .34));
  pointer-events: none;
}

.tree-riders {
  pointer-events: none;
}

.tree-rider {
  fill: var(--gold);
  font-size: 20px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  transition: opacity .18s ease, filter .18s ease;
  filter:
    drop-shadow(0 4px 7px rgba(0, 0, 0, .42))
    drop-shadow(0 0 7px rgba(240, 201, 119, .34));
}

.tree-rider.is-arrived {
  animation: riderArrive .72s ease both;
  filter:
    drop-shadow(0 5px 9px rgba(0, 0, 0, .46))
    drop-shadow(0 0 15px rgba(240, 201, 119, .58));
}

@keyframes riderArrive {
  0% {
    opacity: 1;
    font-size: 20px;
  }
  42% {
    opacity: 1;
    font-size: 27px;
  }
  100% {
    opacity: .92;
    font-size: 22px;
  }
}

.edge-spark {
  fill: var(--graph-spark);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(240, 201, 119, .72));
}

.cards-section {
  padding: clamp(20px, 3vw, 28px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.cards {
  display: grid;
  gap: 10px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .98), rgba(255, 253, 248, .88));
  border: 1px solid var(--line);
  border-left: 4px solid var(--moss);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(16px);
  overflow: hidden;
  transition: opacity .42s ease, transform .42s cubic-bezier(.2,.8,.2,1), border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

html[data-theme="dark"] .card {
  background:
    linear-gradient(135deg, rgba(21, 26, 21, .96), rgba(11, 15, 12, .90));
}

.card.in {
  opacity: 1;
  transform: none;
}

.card:hover {
  background: #fffdf8;
  border-color: var(--line-strong);
  border-left-color: var(--brass);
  box-shadow: 0 14px 30px rgba(57, 47, 32, .10), 0 0 0 1px rgba(180, 131, 58, .08);
  transform: translateY(-2px);
}

html[data-theme="dark"] .card:hover {
  background: #1b211b;
}

.card__avatars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__avatar,
.card__avatar-fallback {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 2px solid #fffdf8;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(57, 47, 32, .12);
}

html[data-theme="dark"] .card__avatar,
html[data-theme="dark"] .card__avatar-fallback {
  border-color: #111511;
}

.card__avatar {
  object-fit: cover;
  background: var(--paper-2);
}

.card__avatar.is-titled {
  box-shadow: 0 0 0 1px var(--brass), 0 6px 16px rgba(180, 131, 58, .18);
}

.card__avatar-fallback {
  display: grid;
  place-items: center;
  color: #fffdf8;
  background: var(--moss-2);
  font-weight: 800;
}

.card__arrow {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--moss-2);
  background: rgba(73, 106, 70, .12);
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.card:hover .card__arrow {
  color: #20160a;
  background: var(--brass-2);
  transform: translateX(3px);
}

.card__body {
  min-width: 0;
}

.card__line {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.card__line .winner,
.card__line .loser {
  font-weight: 800;
}

.card__line .winner {
  color: var(--moss-2);
}

.card__line .loser {
  color: var(--blue);
}

.card__title-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 5px;
  color: #fffdf8;
  background: var(--brass);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 800;
  vertical-align: 1px;
}

.card__sub {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

.card__proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.card__proof:hover {
  color: #fffdf8;
  background: var(--panel-dark);
  border-color: var(--panel-dark);
  transform: translateY(-1px);
}

.tree-proof {
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-left-color: rgba(240, 201, 119, .72);
  background:
    linear-gradient(90deg, rgba(240, 201, 119, .08), transparent 34%),
    linear-gradient(135deg, rgba(21, 26, 21, .97), rgba(9, 13, 10, .92));
}

.tree-proof:hover {
  border-left-color: var(--gold);
}

.tree-proof__rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  color: #20160a;
  background: linear-gradient(145deg, #ffe8a6, #b98727);
  border: 1px solid rgba(255, 239, 179, .50);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 8px 18px rgba(0, 0, 0, .20);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.tree-proof:nth-child(n+4) .tree-proof__rank {
  color: var(--ink);
  background: rgba(255, 253, 248, .07);
  border-color: rgba(255, 253, 248, .12);
}

.tree-proof__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tree-proof__meta span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  color: rgba(246, 239, 226, .74);
  background: rgba(255, 253, 248, .055);
  border: 1px solid rgba(255, 253, 248, .09);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
}

.tree-proof__path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  max-width: 100%;
}

.tree-proof__path-node {
  appearance: none;
  max-width: min(210px, 100%);
  overflow: hidden;
  padding: 4px 7px;
  color: rgba(246, 239, 226, .66);
  background: rgba(0, 0, 0, .16);
  border: 1px solid rgba(255, 253, 248, .075);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.tree-proof__path-node.is-root {
  color: var(--moss-light);
  border-color: rgba(159, 205, 132, .18);
}

.tree-proof__path-node.is-target {
  color: var(--brass-2);
  border-color: rgba(240, 201, 119, .24);
}

.tree-proof__path-node:hover,
.tree-proof__path-node:focus-visible {
  color: var(--gold);
  background: rgba(240, 201, 119, .10);
  border-color: rgba(240, 201, 119, .42);
  outline: none;
  transform: translateY(-1px);
}

.tree-proof__path-arrow {
  color: rgba(240, 201, 119, .58);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.player-text {
  appearance: none;
  display: inline;
  max-width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.player-text:hover,
.player-text:focus-visible {
  color: var(--gold);
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.explain {
  display: grid;
  grid-template-columns: minmax(180px, .6fr) minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: clamp(20px, 3vw, 28px);
}

.explain p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.text-link:hover {
  color: #fffdf8;
  background: var(--moss-2);
  border-color: var(--moss-2);
}

.footer {
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.footer p {
  margin: 0;
}

.profile-popover {
  position: fixed;
  z-index: 360;
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f6efe2;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(240, 201, 119, .14), transparent 70%),
    linear-gradient(135deg, rgba(25, 30, 25, .98), rgba(8, 11, 9, .98));
  border: 1px solid rgba(240, 201, 119, .24);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .44), inset 0 1px 0 rgba(255, 253, 248, .08);
  pointer-events: auto;
  animation: popIn .16s cubic-bezier(.2, .8, .2, 1);
}

.profile-popover__top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.profile-popover__avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #20160a;
  background: linear-gradient(145deg, #fff0b3, var(--gold));
  border: 1px solid rgba(255, 240, 179, .55);
  border-radius: 50%;
  font-weight: 900;
}

.profile-popover__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-popover__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-popover__main strong {
  overflow: hidden;
  color: #fff8e8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover__main small {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  color: rgba(246, 239, 226, .58);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.profile-popover__main small > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-popover__identity-flag {
  display: inline-flex;
  flex: 0 0 auto;
}

.profile-popover__identity-flag .profile-popover__flag {
  width: 26px;
  height: 19px;
  border-radius: 4px;
}

.profile-popover__country {
  min-width: 44px;
  justify-content: center;
  padding-inline: 7px;
}

.profile-popover__country .profile-popover__flag {
  width: 30px;
  height: 22px;
  border-radius: 5px;
}

.profile-popover__title {
  margin-right: 6px;
  color: var(--brass-2);
  font-family: var(--mono);
  font-size: 11px;
}

.profile-popover__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.profile-popover__meta > span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 253, 248, .10);
  border-radius: 999px;
  padding: 3px 7px;
  color: rgba(246, 239, 226, .68);
  background: rgba(255, 253, 248, .045);
  font-size: 11px;
  font-weight: 800;
}

.profile-popover__flag {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 253, 248, .08);
  border: 0;
  padding: 0;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
}

.profile-popover__flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-popover__flag-code {
  color: rgba(255, 253, 248, .8);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.profile-popover__status.is-premium {
  color: #231607;
  background: linear-gradient(145deg, #fff0b3, var(--gold) 58%, #9c6a1d);
  border-color: rgba(255, 240, 179, .62);
  box-shadow: 0 0 18px rgba(240, 201, 119, .18);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.profile-stat {
  min-width: 0;
  padding: 9px 8px;
  background: rgba(255, 253, 248, .045);
  border: 1px solid rgba(255, 253, 248, .09);
  border-radius: 7px;
}

.profile-stat span,
.profile-stat small {
  display: block;
  overflow: hidden;
  color: rgba(246, 239, 226, .58);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stat strong {
  display: block;
  margin: 3px 0 2px;
  color: #fff8e8;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}

.profile-games {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.profile-games__title {
  color: rgba(246, 239, 226, .58);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.profile-game {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  padding: 6px 7px;
  color: rgba(246, 239, 226, .72);
  background: rgba(255, 253, 248, .045);
  border: 1px solid rgba(255, 253, 248, .08);
  border-radius: 7px;
  text-decoration: none;
}

.profile-game:hover {
  border-color: rgba(240, 201, 119, .28);
  background: rgba(240, 201, 119, .08);
}

.profile-game strong,
.profile-game small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-game strong {
  color: #fff8e8;
  font-size: 12px;
}

.profile-game small {
  color: rgba(246, 239, 226, .52);
  font-family: var(--mono);
  font-size: 10px;
}

.profile-game__result {
  color: rgba(246, 239, 226, .64);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-game__result.is-win {
  color: #f4d282;
}

.profile-game__result.is-loss {
  color: #ffb49b;
}

.profile-popover__open {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #20160a;
  background: linear-gradient(145deg, #fff0b3, var(--gold));
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.profile-popover__loading {
  color: rgba(246, 239, 226, .72);
  font-size: 13px;
  font-weight: 800;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 24, 20, .46);
  backdrop-filter: blur(8px);
  animation: fadeIn .18s ease;
}

.modal {
  width: min(460px, 100%);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: popIn .24s cubic-bezier(.2, .8, .2, 1);
}

html[data-theme="dark"] .modal {
  background: #171c17;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal__header h2 {
  margin: 0;
  font-size: 20px;
}

.modal__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  align-self: center;
  padding: 0;
  border-radius: var(--radius);
  line-height: 0;
}

.modal__close svg {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.modal__body {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.setting {
  display: grid;
  gap: 7px;
}

.setting__label {
  color: var(--ink);
  margin: 0;
}

.setting__hint {
  color: var(--muted);
  font-size: 12px;
}

.cache-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting__btn {
  min-height: 36px;
  appearance: none;
  border: 1px solid rgba(154, 79, 57, .32);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--clay);
  background: #fff6f1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

html[data-theme="dark"] .setting__btn {
  color: #f0b093;
  background: #251914;
}

.setting__btn:hover {
  background: #ffece2;
}

html[data-theme="dark"] .setting__btn:hover {
  background: #311f18;
}

.setting__btn:disabled {
  opacity: .55;
  cursor: default;
}

.setting__btn--gold {
  color: #221608;
  border-color: rgba(240, 201, 119, .52);
  background: linear-gradient(145deg, #fff0b3, var(--gold) 60%, #b8832b);
  box-shadow: 0 10px 22px rgba(201, 155, 75, .16);
}

html[data-theme="dark"] .setting__btn--gold {
  color: #201408;
  background: linear-gradient(145deg, #fff0b3, var(--gold) 60%, #9a6b24);
}

.owner-setting {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 253, 248, .10);
}

.owner-unlock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.owner-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.owner-filters[hidden] {
  display: none;
}

.owner-tools {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(232, 187, 99, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, .055), rgba(232, 187, 99, .045)),
    rgba(10, 13, 11, .72);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .08);
}

.owner-tools[hidden] {
  display: none;
}

.owner-tools__head,
.owner-tool-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.owner-tools__head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.owner-tools__head strong {
  color: var(--brass-2);
  font-size: 13px;
  text-transform: uppercase;
}

.owner-tool-actions {
  justify-content: flex-start;
}

.owner-warm-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.owner-warm-metrics span {
  display: grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  padding: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid rgba(255, 253, 248, .10);
  border-radius: 8px;
  background: rgba(255, 253, 248, .045);
}

.owner-warm-metrics strong {
  color: var(--ink);
  font-size: 15px;
  text-transform: none;
}

.owner-warm-metrics .owner-warm-metric--wide {
  grid-column: 1 / -1;
}

.owner-speed {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.owner-speed[hidden] {
  display: none;
}

.owner-speed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.owner-speed__head strong {
  color: var(--ink);
  text-transform: uppercase;
}

.owner-speed__rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.owner-speed__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(255, 253, 248, .10);
  border-radius: 8px;
  background: rgba(255, 253, 248, .045);
}

.owner-speed__row span,
.owner-speed__row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-speed__row span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-speed__row strong {
  color: var(--brass-2);
  font-family: var(--mono);
  font-size: 13px;
}

.owner-speed__row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.owner-speed__row.is-bad {
  border-color: rgba(240, 176, 147, .24);
  background: rgba(154, 79, 57, .14);
}

.owner-analytics {
  display: grid;
  gap: 9px;
  max-height: min(380px, 46vh);
  overflow: auto;
  padding-right: 2px;
}

.owner-analytics[hidden] {
  display: none;
}

.owner-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.owner-summary div {
  display: grid;
  gap: 2px;
}

.owner-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.owner-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.owner-metrics span,
.owner-empty {
  border: 1px solid rgba(255, 253, 248, .10);
  border-radius: 8px;
  background: rgba(255, 253, 248, .045);
}

.owner-metrics span {
  display: grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  padding: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-metrics strong {
  color: var(--brass-2);
  font-size: 15px;
}

.owner-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  color: var(--muted);
}

.owner-empty strong {
  color: var(--ink);
}

.owner-event {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: rgba(255, 253, 248, .055);
  border: 1px solid rgba(255, 253, 248, .10);
  border-radius: 8px;
}

.owner-event__top,
.owner-event__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.owner-event__path {
  min-width: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-event__status {
  flex: 0 0 auto;
  border: 1px solid rgba(240, 201, 119, .24);
  border-radius: 999px;
  padding: 3px 7px;
  color: #211608;
  background: linear-gradient(145deg, #ffe9a6, #d4a84c);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-event__status.is-error,
.owner-event__status.is-not-found,
.owner-event__status.is-timeout {
  color: #ffcfbd;
  background: rgba(154, 79, 57, .18);
  border-color: rgba(240, 176, 147, .24);
}

.owner-event__status.is-started {
  color: #d9e6d1;
  background: rgba(73, 106, 70, .20);
  border-color: rgba(174, 205, 154, .24);
}

.owner-event__meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.owner-event__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.owner-event__stats span {
  border: 1px solid rgba(240, 201, 119, .16);
  border-radius: 999px;
  padding: 3px 7px;
  color: rgba(246, 239, 226, .66);
  background: rgba(240, 201, 119, .06);
  font-size: 10px;
  font-weight: 900;
}

.owner-event__chain {
  color: rgba(246, 239, 226, .56);
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes logIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shimmer {
  0% { transform: translateX(-120%); }
  54%, 100% { transform: translateX(120%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes suggestIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageDrop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sectionReveal {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes markFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes railSweep {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes rowReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes medalShine {
  0%, 65% { transform: translateX(-120%) rotate(18deg); }
  100% { transform: translateX(120%) rotate(18deg); }
}

@keyframes avatarSettle {
  from {
    opacity: 0;
    transform: scale(.76) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 28px, 1180px);
  }

  .masthead {
    align-items: flex-start;
  }

  .top-links a:not(.home-site-button) {
    display: none;
  }

  .command-center {
    padding: 30px 18px 34px;
    min-height: 0;
  }

  .command-center::before {
    font-size: 56px;
    max-width: 220px;
  }

  .search {
    grid-template-columns: 1fr;
  }

  .username-suggest {
    position: absolute;
    top: calc(100% + 8px);
    margin-top: 0;
    width: min(100%, calc(100vw - 88px));
  }

  .search__btn {
    width: 100%;
  }

  .search-queue__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-target-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graph-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .leaderboard-summary {
    text-align: left;
  }

  .graph-metric,
  .share-btn,
  .replay-btn {
    width: fit-content;
  }

  #graph {
    height: 320px;
  }

  #graph.is-tree-graph {
    height: min(var(--tree-graph-height, 620px), 760px);
  }

  .explain {
    grid-template-columns: 1fr;
  }

  .text-link {
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .command-center::before {
    display: none;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(30px, 10.4vw, 38px);
    line-height: 1.06;
  }

  .command-center__intro p {
    font-size: 16px;
  }

  .quick-targets__head {
    align-items: start;
    flex-direction: column;
  }

  .quick-targets__actions {
    width: 100%;
    justify-content: space-between;
  }

  .quick-target-groups {
    grid-template-columns: 1fr;
  }

  .search-queue__grid,
  .leaderboard-tabs {
    grid-template-columns: 1fr;
  }

  .leaderboard-tabs {
    display: grid;
  }

  .graph-explorer__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .graph-explorer__close {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chip.quick-player {
    min-height: 58px;
  }

  .card {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .tree-proof {
    grid-template-columns: 1fr;
  }

  .tree-proof .card__avatars {
    flex-wrap: wrap;
  }

  .tree-proof__path-node {
    max-width: 100%;
  }

  .leaderboard-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .leaderboard-count {
    grid-column: 2;
    min-width: 0;
    padding-left: 0;
    border-left: 0;
    text-align: left;
  }

  .leaderboard-count strong,
  .leaderboard-count small {
    display: inline;
  }

  .leaderboard-count strong {
    margin-right: 5px;
    font-size: 20px;
  }

  .card__proof {
    width: fit-content;
  }

  .card__line {
    font-size: 14px;
  }

  .owner-unlock {
    grid-template-columns: 1fr;
  }

  .owner-filters {
    grid-template-columns: 1fr;
  }

  .owner-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-tool-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-warm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-speed__rows {
    grid-template-columns: 1fr;
  }

  .owner-event__top,
  .owner-event__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .graph-wrap::before,
  .graph-wrap::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- LEADERBOARD ---------- */
.leaderboard-section {
  margin-top: 56px;
  background:
    radial-gradient(620px 300px at 12% 0%, rgba(232, 187, 99, .12), transparent 64%),
    radial-gradient(520px 260px at 100% 20%, rgba(116, 128, 124, .12), transparent 64%),
    linear-gradient(135deg, rgba(255, 253, 248, .94), rgba(245, 241, 232, .88));
}

html[data-theme="dark"] .leaderboard-section {
  background:
    radial-gradient(620px 300px at 12% 0%, rgba(255, 211, 111, .10), transparent 64%),
    radial-gradient(520px 260px at 100% 20%, rgba(116, 128, 124, .10), transparent 64%),
    linear-gradient(135deg, rgba(23, 28, 23, .94), rgba(9, 12, 10, .88));
}

#leaderboard-list {
  display: grid;
  gap: 10px;
}

.lb-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--faint);
  font-weight: 400;
}

.lb-loading, .lb-empty {
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  padding: 32px 16px;
  background: var(--glass);
  border: 1px dashed rgba(184, 255, 157, .20);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .06);
}

.lb-row {
  position: relative;
  width: 100%;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, .88), rgba(245, 241, 232, .76)),
    linear-gradient(90deg, rgba(73, 106, 70, .055) 1px, transparent 1px);
  background-size: auto, 30px 30px;
  border: 1px solid rgba(73, 106, 70, .18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 253, 248, .32);
  color: inherit;
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  overflow: hidden;
  animation: rowReveal .5s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--row-index, 0) * 70ms);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
}

html[data-theme="dark"] .lb-row {
  background:
    linear-gradient(135deg, rgba(20, 26, 21, .92), rgba(8, 11, 9, .84)),
    linear-gradient(90deg, rgba(166, 176, 169, .04) 1px, transparent 1px);
  background-size: auto, 30px 30px;
  border-color: rgba(166, 176, 169, .16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 253, 248, .06);
}

.lb-row::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(var(--steel-2), var(--brass-2), var(--steel));
  box-shadow: 0 0 12px rgba(201, 155, 75, .18);
  opacity: .45;
  transform: scaleY(.42);
  transform-origin: center;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

.lb-row:hover {
  border-color: var(--brass);
  box-shadow: 0 18px 42px rgba(57, 47, 32, .16), 0 0 24px rgba(201, 155, 75, .10);
  transform: translateX(5px) translateY(-1px);
}

html[data-theme="dark"] .lb-row:hover {
  border-color: rgba(255, 211, 111, .42);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .34), 0 0 24px rgba(201, 155, 75, .12);
}

.lb-row:hover::before {
  opacity: 1;
  transform: scaleY(1);
  box-shadow: 0 0 16px rgba(240, 201, 119, .28);
}

.lb-row--top {
  background:
    radial-gradient(340px 160px at 0% 0%, rgba(232, 187, 99, .16), transparent 70%),
    linear-gradient(120deg, rgba(180,131,58,.08), rgba(73,106,70,.06));
  border-color: var(--brass-2);
}

html[data-theme="dark"] .lb-row--top {
  background:
    radial-gradient(340px 160px at 0% 0%, rgba(255, 211, 111, .14), transparent 70%),
    linear-gradient(120deg, rgba(255, 211, 111, .065), rgba(166, 176, 169, .045));
}

.lb-rank {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink);
  background: rgba(255, 253, 248, .28);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .34);
  transition: transform .2s ease, box-shadow .2s ease;
}

html[data-theme="dark"] .lb-rank {
  background: rgba(255, 253, 248, .07);
}

.lb-row:hover .lb-rank {
  transform: scale(1.06);
  box-shadow: 0 8px 18px rgba(57, 47, 32, .16);
}

.lb-rank::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-120%) rotate(18deg);
  pointer-events: none;
}

.lb-rank.is-gold {
  color: #241500;
  background: linear-gradient(145deg, #fff0b3, var(--gold) 54%, #8d5f18);
  border-color: #f3c45c;
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .22) inset, 0 0 24px rgba(255, 211, 111, .28);
}

html[data-theme="dark"] .lb-rank.is-gold {
  background: linear-gradient(145deg, #fff0b3, var(--gold) 54%, #8d5f18);
}

.lb-rank.is-gold::after,
.lb-rank.is-silver::after,
.lb-rank.is-bronze::after {
  animation: medalShine 2.8s ease-in-out infinite;
}

.lb-rank.is-silver {
  color: #151a1c;
  background: linear-gradient(145deg, #f4f7f5, var(--silver) 54%, #6f7977);
  border-color: #d9e1e5;
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .24) inset, 0 0 20px rgba(180, 188, 187, .18);
}

html[data-theme="dark"] .lb-rank.is-silver {
  background: linear-gradient(145deg, #f4f7f5, var(--silver) 54%, #6f7977);
}

.lb-rank.is-bronze {
  color: #1f1108;
  background: linear-gradient(145deg, #e7b783, var(--bronze) 54%, #70401e);
  border-color: #cf8a4e;
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .18) inset, 0 0 18px rgba(232, 187, 99, .18);
}

html[data-theme="dark"] .lb-rank.is-bronze {
  background: linear-gradient(145deg, #e7b783, var(--bronze) 54%, #70401e);
}

.lb-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 253, 248, .32);
  background: rgba(255, 253, 248, .08);
  box-shadow: 0 0 0 1px rgba(73, 106, 70, .12), 0 8px 20px rgba(57, 47, 32, .10);
  animation: avatarSettle .44s cubic-bezier(.34, 1.56, .64, 1) both;
  animation-delay: calc(var(--row-index, 0) * 70ms + 100ms);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

html[data-theme="dark"] .lb-avatar {
  border-color: rgba(255, 253, 248, .16);
  box-shadow: 0 0 0 1px rgba(166, 176, 169, .13), 0 8px 20px rgba(0, 0, 0, .26);
}

.lb-row:hover .lb-avatar {
  border-color: var(--brass-2);
  box-shadow: 0 0 0 3px rgba(208, 164, 92, .16), 0 0 18px rgba(201, 155, 75, .16);
  transform: scale(1.07);
}

.lb-avatar--fallback {
  display: grid;
  place-items: center;
  color: var(--ink);
  font-weight: 800;
  font-family: var(--mono);
}

.lb-main { min-width: 0; flex: 1; }
.lb-path {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--mono);
}

.lb-title {
  color: var(--brass);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lb-meta {
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-score {
  min-width: 78px;
  display: grid;
  justify-items: end;
  gap: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 253, 248, .10);
}

.lb-score strong {
  color: var(--brass-2);
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1;
}

.lb-score small {
  color: var(--faint);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes ambientGrid {
  from { background-position: 0 0, 0 0, center, center, center; }
  to { background-position: 20px 18px, -18px 14px, center, center, center; }
}

@keyframes dataDrift {
  from {
    opacity: .78;
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  to {
    opacity: .48;
    transform: translate3d(-22px, 12px, 0) rotate(1deg);
  }
}

@keyframes buttonHalo {
  to { transform: rotate(360deg); }
}

@keyframes homeButtonFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes homeButtonSweep {
  0%,
  42% {
    transform: translateX(-125%);
  }
  64% {
    transform: translateX(125%);
  }
  100% {
    transform: translateX(125%);
  }
}

@keyframes homeButtonSpark {
  0%,
  100% {
    opacity: .58;
    transform: rotate(45deg) scale(.86);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.08);
  }
}

@keyframes chipLift {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes metricGlow {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255, 253, 248, .08), 0 0 18px rgba(201, 155, 75, .08);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 253, 248, .12), 0 0 30px rgba(255, 211, 111, .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 640px) {
  .lb-row { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .lb-rank {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .lb-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .lb-path { font-size: 13px; }
  .lb-score {
    width: 100%;
    grid-template-columns: auto auto;
    justify-content: start;
    justify-items: start;
    padding-left: 0;
    border-left: 0;
  }
}

/* Accessibility and loading fixes retained with the original layout. */
html {
  scroll-padding-top: 88px;
}

body,
html[data-theme="dark"] body {
  animation: none;
}

body.has-open-dialog {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: #171006;
  background: #f0c977;
  border: 2px solid #fff8e8;
  border-radius: var(--radius);
  font-weight: 800;
  transform: translateY(calc(-100% - 20px));
  transition: transform .16s ease;
}

.skip-link:focus {
  color: #171006;
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--brass-2);
  outline-offset: 3px;
}

.graph-wrap #graph:not(.is-tree-graph) {
  height: var(--chain-graph-height, 330px);
}

.top-links .home-site-button,
.home-site-button__spark,
.brand__mark,
.command-center::after,
.search__btn::before,
.lb-rank.is-gold::after,
.lb-rank.is-silver::after,
.lb-rank.is-bronze::after,
.graph-metric {
  animation: none;
}

.profile-popover {
  padding-top: 42px;
}

.profile-popover__close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 30px;
  padding: 4px 9px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.profile-popover__close:hover,
.profile-popover__close:focus-visible {
  color: var(--ink);
  border-color: var(--brass);
}

@media (max-width: 340px) {
  .site-shell {
    width: calc(100% - 12px);
  }

  .brand__text {
    display: none;
  }

  .top-links {
    gap: 4px;
  }

  .top-links .home-site-button {
    padding-inline: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none !important;
  }
}
