/* ============================================================
   HALL OF LEGENDS - /plugins/legendary-ratings.html
   Community tier list + Most Wanted votes for every legendary.
   Layered on ranks/rank-pages.css + plugins/plugin-pages.css +
   site-fx.css. Everything is prefixed hl- and scoped to .rankpage.
   ============================================================ */
.rankpage.hl {
  --hl-s: #ffd964;  --hl-s-line: rgba(255, 217, 100, 0.55); --hl-s-dim: rgba(255, 217, 100, 0.14);
  --hl-a: #ff5c48;  --hl-a-line: rgba(255, 92, 72, 0.55);   --hl-a-dim: rgba(255, 92, 72, 0.14);
  --hl-b: #ff9f43;  --hl-b-line: rgba(255, 159, 67, 0.55);  --hl-b-dim: rgba(255, 159, 67, 0.14);
  --hl-c: #4fd1c5;  --hl-c-line: rgba(79, 209, 197, 0.55);  --hl-c-dim: rgba(79, 209, 197, 0.14);
  --hl-d: #7c8ff0;  --hl-d-line: rgba(124, 143, 240, 0.55); --hl-d-dim: rgba(124, 143, 240, 0.14);
  --hl-u: #6b7280;  --hl-u-line: rgba(107, 114, 128, 0.5);  --hl-u-dim: rgba(107, 114, 128, 0.12);
  --hl-crown: #ffd964;
  --hl-vault: #a4f5ee;
}

/* ---------- Full-window vault art: fixed behind the whole page, hero blends into the content ---------- */
.hl .hl-hero-art {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("/images/legendary-hall-hero.jpg");
  background-size: cover; background-position: center center; background-repeat: no-repeat;
}
.hl .hl-hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 13, 0.28) 0%, rgba(5, 7, 13, 0.5) 40%, rgba(5, 7, 13, 0.68) 100%),
    radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(5, 7, 13, 0.45) 100%);
}
.hl .rk-hero { min-height: 0; background: transparent; border-bottom: 0; }
.hl .rk-hero::before { display: none; }
.hl .rk-hero-inner { padding-top: 1.4rem; padding-bottom: 1rem !important; z-index: 1; }
.hl .rk-kicker { margin-top: 0.6rem; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.hl .rk-title { margin-bottom: 0.4rem; font-size: clamp(2.4rem, 5.5vw, 3.6rem); text-shadow: 0 0 55px rgba(230, 200, 74, 0.35), 0 4px 30px rgba(0, 0, 0, 0.9); }
.hl .breadcrumb, .hl .breadcrumb a { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.hl .rk-section-head h2 { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9); }
.hl .pp-prose p, .hl .hl-board-foot, .hl .rk-fineprint { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.hl .hl-signin { background: linear-gradient(120deg, rgba(20, 18, 8, 0.85), rgba(12, 13, 18, 0.8)); backdrop-filter: blur(8px); }
.hl .hl-stat, .hl .hl-how-item, .hl-card, .hl-pod, .hl-insight, .hl-crowns { backdrop-filter: blur(4px); }
.hl-crowns { background: rgba(20, 18, 8, 0.75); }

/* Crest: crown over a hex gem, orbit rings from site-fx */
.hl .hl-crest { position: relative; flex: 0 0 auto; width: clamp(120px, 14vw, 170px); align-self: center; filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.6)); }
.hl .hl-crest::before { content: ""; position: absolute; inset: -14%; background: radial-gradient(circle, var(--rk-glow) 0%, transparent 62%); animation: rk-glow 4.5s ease-in-out infinite; pointer-events: none; }
.hl .hl-crest svg { position: relative; width: 100%; height: auto; display: block; }
.hl .hl-crest .hl-crest-spin { transform-origin: 100px 100px; animation: hl-spin 60s linear infinite; }
@keyframes hl-spin { to { transform: rotate(360deg); } }

/* ---------- Sign-in call ---------- */
.hl-signin {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: 0.9rem 0 0; padding: 0.75rem 1rem;
  border: 1px solid var(--rk-accent-line); border-radius: 14px;
  background: linear-gradient(120deg, rgba(230, 200, 74, 0.16), rgba(230, 200, 74, 0.04) 60%, transparent);
}
.hl-signin p { margin: 0; flex: 1 1 260px; font-size: 0.95rem; color: var(--muted); }
.hl-signin p b { color: var(--text); }
.hl-signin-btn {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.6rem 1.1rem; border-radius: 999px;
  background: linear-gradient(180deg, var(--rk-accent-bright), var(--rk-accent)); color: #14120a; font-weight: 800; text-decoration: none;
  border: 1px solid var(--rk-accent); box-shadow: 0 8px 26px rgba(230, 200, 74, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hl-signin-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(230, 200, 74, 0.4); }
.hl-signin-btn svg { width: 18px; height: 18px; }
.hl-signin[hidden] { display: none; }

/* ---------- Compact how-it-works strip ---------- */
.hl-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.6rem; margin: 0 0 1.6rem; }
.hl-how-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.85rem; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, var(--rk-panel-2), var(--rk-panel)); font-size: 0.88rem; line-height: 1.4; color: var(--muted); }
.hl-how-item b { color: var(--text); }
.hl-how-ico { flex: 0 0 auto; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--rk-accent-dim); border: 1px solid var(--rk-accent-line); color: var(--rk-accent-bright); }
.hl-how-ico svg { width: 17px; height: 17px; }
.hl-tierkey { display: inline-flex; gap: 0.25rem; flex: 0 0 auto; margin-left: auto; }
.hl-tierkey .hl-t { width: 22px; height: 22px; font-size: 0.8rem; border-radius: 6px; }

/* Tier letter badge, reused everywhere */
.hl-t {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px;
  font-family: "Cinzel", serif; font-weight: 800; font-size: 0.95rem; line-height: 1; color: #0b0c10; text-align: center;
  background: var(--tc, var(--hl-u)); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 0 12px var(--tl, transparent);
}
.hl-t.is-S { --tc: var(--hl-s); --tl: var(--hl-s-line); }
.hl-t.is-A { --tc: var(--hl-a); --tl: var(--hl-a-line); }
.hl-t.is-B { --tc: var(--hl-b); --tl: var(--hl-b-line); }
.hl-t.is-C { --tc: var(--hl-c); --tl: var(--hl-c-line); }
.hl-t.is-D { --tc: var(--hl-d); --tl: var(--hl-d-line); }
.hl-t.is-U { --tc: #2a2e3a; color: var(--muted); font-size: 0.7rem; }

/* ---------- Live stats strip ---------- */
.hl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; margin: 0 0 1rem; }
.hl-stat { position: relative; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, var(--rk-panel-2), var(--rk-panel)); overflow: hidden; }
.hl-stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--rk-accent), transparent); opacity: 0.6; }
.hl-stat-value { display: block; font-family: "Cinzel", serif; font-weight: 800; font-size: 1.7rem; line-height: 1.1; color: var(--rk-accent-bright); }
.hl-stat-label { display: block; margin-top: 0.15rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hl-stat.is-you .hl-stat-value { color: var(--hl-vault); }
.hl-stat.is-you::after { background: linear-gradient(90deg, transparent, var(--hl-vault), transparent); }

/* ---------- Most Wanted podium ---------- */
.hl-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 0.9rem; align-items: end; margin: 0.4rem 0 1.4rem; }
.hl-pod {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center;
  padding: 1.3rem 0.9rem 1rem; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--rk-panel-2), var(--rk-panel)); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hl-pod:hover { transform: translateY(-3px); }
.hl-pod::before { content: ""; position: absolute; inset: 0; background: radial-gradient(220px 140px at 50% -20%, var(--pc-dim, transparent), transparent 70%); pointer-events: none; }
.hl-pod-rank { position: absolute; top: 0.6rem; left: 0.75rem; font-family: "Cinzel", serif; font-weight: 800; font-size: 1.1rem; color: var(--pc, var(--muted)); }
.hl-pod.is-1 { --pc: #ffd964; --pc-dim: rgba(255, 217, 100, 0.28); border-color: rgba(255, 217, 100, 0.5); box-shadow: 0 0 40px rgba(255, 217, 100, 0.12); min-height: 260px; }
.hl-pod.is-2 { --pc: #d9dde8; --pc-dim: rgba(217, 221, 232, 0.2); border-color: rgba(217, 221, 232, 0.35); min-height: 226px; }
.hl-pod.is-3 { --pc: #d08a4e; --pc-dim: rgba(208, 138, 78, 0.22); border-color: rgba(208, 138, 78, 0.4); min-height: 210px; }
.hl-pod-crown { width: 34px; height: 34px; color: var(--pc); filter: drop-shadow(0 0 10px var(--pc-dim)); animation: hl-float 4s ease-in-out infinite; }
.hl-pod.is-1 .hl-pod-crown { width: 44px; height: 44px; }
@keyframes hl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hl-pod .hl-sigil { width: 74px; height: 74px; }
.hl-pod.is-1 .hl-sigil { width: 92px; height: 92px; }
.hl-pod-name { margin: 0; font-family: "Cinzel", serif; font-weight: 700; font-size: 1.02rem; line-height: 1.25; color: #fff; }
.hl-pod-count { font-size: 0.85rem; color: var(--muted); }
.hl-pod-count b { color: var(--pc); font-size: 1.05rem; }
.hl-pod-empty { color: var(--muted); font-size: 0.88rem; padding: 0.6rem 0; }
.hl-pod-link { position: absolute; inset: 0; }
@media (max-width: 640px) {
  .hl-podium { grid-template-columns: 1fr; align-items: stretch; }
  .hl-pod, .hl-pod.is-1, .hl-pod.is-2, .hl-pod.is-3 { min-height: 0; }
}

/* Wanted bars under the podium */
.hl-wantlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.35rem 1.4rem; }
.hl-wantlist li { display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); font-size: 0.92rem; }
.hl-wantlist .n { font-family: "Cinzel", serif; font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.hl-wantlist .bar { position: relative; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.hl-wantlist .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(255, 217, 100, 0.35), rgba(255, 217, 100, 0.75)); border-radius: 6px; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hl-wantlist .bar span { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 0.6rem; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.hl-wantlist .c { font-weight: 700; color: var(--rk-accent-bright); min-width: 2ch; text-align: right; }

/* ---------- Community tier board ---------- */
.hl-board { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0f1117; }
.hl-row { display: grid; grid-template-columns: 74px 1fr; min-height: 78px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.hl-row:last-child { border-bottom: 0; }
.hl-row-label {
  display: grid; place-items: center; font-family: "Cinzel", serif; font-weight: 800; font-size: 2rem; color: #0b0c10;
  background: var(--tc); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); position: relative;
}
.hl-row-label small { position: absolute; bottom: 4px; font-family: "Inter", sans-serif; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.hl-row.is-S { --tc: var(--hl-s); --tl: var(--hl-s-line); --td: var(--hl-s-dim); }
.hl-row.is-A { --tc: var(--hl-a); --tl: var(--hl-a-line); --td: var(--hl-a-dim); }
.hl-row.is-B { --tc: var(--hl-b); --tl: var(--hl-b-line); --td: var(--hl-b-dim); }
.hl-row.is-C { --tc: var(--hl-c); --tl: var(--hl-c-line); --td: var(--hl-c-dim); }
.hl-row.is-D { --tc: var(--hl-d); --tl: var(--hl-d-line); --td: var(--hl-d-dim); }
.hl-row.is-U { --tc: #2a2e3a; --tl: var(--hl-u-line); --td: var(--hl-u-dim); }
.hl-row.is-U .hl-row-label { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: "Inter", sans-serif; }
.hl-row.is-S { background: linear-gradient(90deg, rgba(255, 217, 100, 0.08), transparent 60%); }
.hl-row-items { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.6rem 0.7rem; align-content: flex-start; }
.hl-row-empty { align-self: center; font-size: 0.85rem; color: var(--muted); padding: 0 0.3rem; }
.hl-chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.65rem 0.3rem 0.35rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text); text-decoration: none; font-size: 0.86rem; font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.hl-chip:hover { transform: translateY(-2px); border-color: var(--tl); background: var(--td); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.hl-chip .hl-sigil { width: 26px; height: 26px; }
.hl-chip small { color: var(--muted); font-weight: 500; font-size: 0.76rem; }
.hl-chip.is-mine { box-shadow: 0 0 0 1px var(--tl); }
.hl-chip.is-mine::after { content: "you"; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.35rem; border-radius: 999px; background: var(--tc); color: #0b0c10; }
.hl-board-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 0.7rem; font-size: 0.82rem; color: var(--muted); }
@media (max-width: 560px) { .hl-row { grid-template-columns: 54px 1fr; } .hl-row-label { font-size: 1.5rem; } }

/* ---------- Insights ---------- */
.hl-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; }
.hl-insight { position: relative; display: flex; align-items: center; gap: 0.85rem; padding: 0.95rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, var(--rk-panel-2), var(--rk-panel)); overflow: hidden; }
.hl-insight .hl-sigil { width: 50px; height: 50px; flex: 0 0 auto; }
.hl-insight-k { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rk-accent); }
.hl-insight-v { display: block; font-family: "Cinzel", serif; font-weight: 700; font-size: 1rem; color: #fff; line-height: 1.25; }
.hl-insight-s { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.hl-insight.is-empty .hl-insight-v { color: var(--muted); font-family: "Inter", sans-serif; font-weight: 500; font-size: 0.9rem; }

/* ---------- Toolbar ---------- */
.hl-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 17, 23, 0.9); backdrop-filter: blur(10px); }
.hl-search { flex: 1 1 220px; display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: #0b0d12; }
.hl-search svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.hl-search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; font-size: 0.92rem; outline: none; }
.hl-search input::placeholder { color: #6b7280; }
.hl-select { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.hl-select select { background: #0b0d12; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.6rem; font: inherit; font-size: 0.88rem; }
.hl-filters { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.hl-filter { padding: 0.38rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.hl-filter:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }
.hl-filter.is-on { color: var(--rk-accent-bright); border-color: var(--rk-accent-line); background: var(--rk-accent-dim); }
.hl-progress { display: inline-flex; align-items: center; gap: 0.55rem; margin-left: auto; font-size: 0.82rem; color: var(--muted); }
.hl-ring { position: relative; width: 40px; height: 40px; }
.hl-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.hl-ring circle { fill: none; stroke-width: 4; }
.hl-ring .bg { stroke: rgba(255, 255, 255, 0.08); }
.hl-ring .fg { stroke: var(--rk-accent); stroke-linecap: round; stroke-dasharray: 100.53; stroke-dashoffset: 100.53; transition: stroke-dashoffset 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hl-ring.is-done .fg { stroke: var(--hl-vault); filter: drop-shadow(0 0 6px var(--hl-vault)); }
.hl-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.66rem; font-weight: 800; color: var(--text); }
.hl-progress-text b { color: var(--text); }
@media (max-width: 760px) { .hl-progress { margin-left: 0; width: 100%; } .hl-toolbar { position: static; } }

/* ---------- Card grid ---------- */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0.9rem; }
.hl-card {
  position: relative; display: flex; flex-direction: column; gap: 0.55rem; padding: 0.8rem 0.9rem 0.75rem;
  border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, var(--rk-panel-2), var(--rk-panel));
  overflow: hidden; scroll-margin-top: 90px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.hl-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px 120px at 100% -30%, var(--cd, transparent), transparent 70%); pointer-events: none; transition: opacity 0.3s ease; }
.hl-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.hl-card.is-S { --cc: var(--hl-s); --cl: var(--hl-s-line); --cd: var(--hl-s-dim); }
.hl-card.is-A { --cc: var(--hl-a); --cl: var(--hl-a-line); --cd: var(--hl-a-dim); }
.hl-card.is-B { --cc: var(--hl-b); --cl: var(--hl-b-line); --cd: var(--hl-b-dim); }
.hl-card.is-C { --cc: var(--hl-c); --cl: var(--hl-c-line); --cd: var(--hl-c-dim); }
.hl-card.is-D { --cc: var(--hl-d); --cl: var(--hl-d-line); --cd: var(--hl-d-dim); }
.hl-card.is-rated { border-color: var(--cl); }
.hl-card.is-wanted { box-shadow: 0 0 0 1px rgba(255, 217, 100, 0.35), 0 0 30px rgba(255, 217, 100, 0.12); }
.hl-card.is-flash { animation: hl-flash 0.7s ease-out; }
@keyframes hl-flash { 0% { box-shadow: 0 0 0 0 var(--cl, var(--rk-accent-line)), 0 0 40px var(--cd, var(--rk-accent-dim)); } 100% { box-shadow: 0 0 0 14px transparent, 0 0 0 transparent; } }
.hl-card.is-hidden { display: none; }
.hl-card:target { border-color: var(--rk-accent); box-shadow: 0 0 0 2px var(--rk-accent-line), 0 0 40px rgba(230, 200, 74, 0.2); }

.hl-card-head { display: flex; align-items: center; gap: 0.75rem; }
.hl-card .hl-sigil { width: 54px; height: 54px; flex: 0 0 auto; }
.hl-card-title { flex: 1; min-width: 0; }
.hl-card-title h3 { margin: 0; font-family: "Cinzel", serif; font-size: 1.02rem; font-weight: 700; line-height: 1.25; color: #fff; }
.hl-card-title h3 a { color: inherit; text-decoration: none; }
.hl-card-sub { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.2rem; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.hl-card-sub .hl-t { width: 20px; height: 20px; font-size: 0.72rem; border-radius: 5px; }
.hl-card-sub b { color: var(--text); }
.hl-card-badges { position: absolute; top: 0.6rem; right: 0.6rem; display: flex; gap: 0.3rem; }
.hl-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--muted); }
.hl-badge svg { width: 13px; height: 13px; }
.hl-badge.is-crown { color: var(--hl-crown); border-color: rgba(255, 217, 100, 0.45); background: rgba(255, 217, 100, 0.12); }
.hl-badge.is-vault { color: var(--hl-vault); border-color: rgba(164, 245, 238, 0.4); background: rgba(164, 245, 238, 0.1); }

/* Distribution bar: 5 segments S..D */
.hl-dist { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.hl-dist i { display: block; height: 100%; width: 0; transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hl-dist .s { background: var(--hl-s); } .hl-dist .a { background: var(--hl-a); } .hl-dist .b { background: var(--hl-b); } .hl-dist .c { background: var(--hl-c); } .hl-dist .d { background: var(--hl-d); }
.hl-dist-legend { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; }
.hl-dist-legend span b { color: var(--text); font-weight: 700; }

/* Tier picker */
.hl-pick { display: grid; grid-template-columns: 1.25fr repeat(5, 1fr); gap: 0.3rem; }
.hl-pick button {
  position: relative; height: 36px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03);
  font-family: "Cinzel", serif; font-weight: 800; font-size: 1.05rem; color: var(--muted); cursor: pointer; overflow: hidden;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.hl-pick button:hover { transform: translateY(-2px); color: var(--pc); border-color: var(--pl); background: var(--pd); }
.hl-pick button:active { transform: translateY(0) scale(0.96); }
.hl-pick button.is-on { color: #0b0c10; background: var(--pc); border-color: var(--pc); box-shadow: 0 0 18px var(--pl), 0 4px 14px rgba(0, 0, 0, 0.4); }
.hl-pick button[data-t="S"] { --pc: var(--hl-s); --pl: var(--hl-s-line); --pd: var(--hl-s-dim); }
.hl-pick button[data-t="A"] { --pc: var(--hl-a); --pl: var(--hl-a-line); --pd: var(--hl-a-dim); }
.hl-pick button[data-t="B"] { --pc: var(--hl-b); --pl: var(--hl-b-line); --pd: var(--hl-b-dim); }
.hl-pick button[data-t="C"] { --pc: var(--hl-c); --pl: var(--hl-c-line); --pd: var(--hl-c-dim); }
.hl-pick button[data-t="D"] { --pc: var(--hl-d); --pl: var(--hl-d-line); --pd: var(--hl-d-dim); }
.hl-pick button:disabled { cursor: not-allowed; opacity: 0.55; }
.hl-pick button:disabled:hover { transform: none; }
.hl-pick button.is-busy { animation: hl-pulse 0.8s ease-in-out infinite; }
@keyframes hl-pulse { 50% { opacity: 0.5; } }

/* Card footer toggles */
.hl-pick .hl-crown-btn { font-family: "Inter", sans-serif; color: var(--muted); --pc: var(--hl-crown); --pl: rgba(255, 217, 100, 0.55); --pd: rgba(255, 217, 100, 0.14); }
.hl-pick .hl-crown-btn svg { width: 18px; height: 18px; vertical-align: middle; }
.hl-pick .hl-crown-btn:hover { color: var(--hl-crown); border-color: var(--pl); background: var(--pd); }
.hl-pick .hl-crown-btn.is-on { color: #14120a; background: linear-gradient(180deg, var(--rk-accent-bright), var(--rk-accent)); border-color: var(--rk-accent); box-shadow: 0 0 16px rgba(255, 217, 100, 0.4); }
.hl-pick .hl-crown-btn.is-shake { animation: hl-shake 0.4s ease; }
.hl-tog {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.48rem 0.6rem; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  transition: all 0.15s ease;
}
.hl-tog svg { width: 15px; height: 15px; }
.hl-tog:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }
.hl-tog:disabled { cursor: not-allowed; opacity: 0.55; }
.hl-tog.is-crown.is-on { color: #14120a; background: linear-gradient(180deg, var(--rk-accent-bright), var(--rk-accent)); border-color: var(--rk-accent); box-shadow: 0 0 16px rgba(255, 217, 100, 0.35); }
.hl-tog.is-vault.is-on { color: #06201e; background: linear-gradient(180deg, #c8fbf6, var(--hl-vault)); border-color: var(--hl-vault); box-shadow: 0 0 16px rgba(164, 245, 238, 0.3); }
.hl-tog.is-shake { animation: hl-shake 0.4s ease; }
@keyframes hl-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Vote burst particles */
.hl-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.hl-burst i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--bc, var(--rk-accent-bright)); box-shadow: 0 0 8px var(--bc, var(--rk-accent-bright)); animation: hl-burst 0.65s ease-out forwards; }
@keyframes hl-burst { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }

/* ---------- Sigil (procedural crest per item) ---------- */
.hl-sigil { display: inline-block; width: 48px; height: 48px; flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.hl-sigil svg { width: 100%; height: 100%; display: block; }
.hl-sigil img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Your crowns tray ---------- */
.hl-crowns { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1.2rem; padding: 0.7rem 0.9rem; border: 1px solid var(--rk-accent-line); border-radius: 12px; background: var(--rk-accent-dim); font-size: 0.88rem; }
.hl-crowns[hidden] { display: none; }
.hl-crowns-label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 800; color: var(--rk-accent-bright); letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.76rem; }
.hl-crowns-label svg { width: 16px; height: 16px; }
.hl-crown-slot { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.6rem 0.25rem 0.3rem; border-radius: 999px; border: 1px dashed var(--rk-accent-line); color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.hl-crown-slot.is-filled { border-style: solid; color: var(--text); background: rgba(0, 0, 0, 0.3); }
.hl-crown-slot .hl-sigil { width: 22px; height: 22px; }

/* ---------- Toast ---------- */
.hl-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 60; padding: 0.7rem 1.1rem; border-radius: 12px; background: #15181f; border: 1px solid var(--rk-accent-line); color: var(--text); font-size: 0.9rem; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; max-width: min(92vw, 460px); text-align: center; }
.hl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.hl-toast.is-err { border-color: var(--fx-red-line, rgba(255, 92, 72, 0.5)); }

/* ---------- Empty / offline ---------- */
.hl-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.hl-offline { margin: 0 0 1.4rem; }

@media (prefers-reduced-motion: reduce) {
  .hl .hl-crest .hl-crest-spin, .hl-pod-crown, .hl-card.is-flash, .hl-burst i { animation: none; }
  .hl-card, .hl-chip, .hl-pick button, .hl-pod { transition: none; }
}

/* ---------- Enriched cards: skin art, base item, source, perks ---------- */
.hl-sigil.is-art { border-radius: 12px; overflow: hidden; background: #0b0d12; border: 1px solid rgba(255, 217, 100, 0.35); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.55); }
.hl-sigil.is-art img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform 0.3s ease; }
.hl-card:hover .hl-sigil.is-art img, .hl-pod:hover .hl-sigil.is-art img { transform: scale(1.1); }
.hl-card .hl-sigil { width: 58px; height: 58px; }
.hl-pod .hl-sigil { width: 96px; height: 96px; }
.hl-pod.is-1 .hl-sigil { width: 124px; height: 124px; }
.hl-chip .hl-sigil.is-art { border-radius: 6px; border-width: 1px; box-shadow: none; }
.hl-card-kind { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0 0.35rem; }
.hl-kind { display: inline-flex; align-items: center; padding: 0.14rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.12); color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.hl-kind.is-base { text-transform: none; letter-spacing: 0; font-size: 0.76rem; color: var(--text); }
.hl-kind.is-craft { color: var(--rk-accent-bright); border-color: var(--rk-accent-line); background: var(--rk-accent-dim); }
.hl-kind.is-drop { color: #ff8f80; border-color: rgba(255, 92, 72, 0.45); background: rgba(255, 92, 72, 0.1); }
.hl-card-blurb { margin: -0.15rem 0 0; font-size: 0.86rem; font-style: italic; line-height: 1.45; color: #cfd5e3; }
.hl-card-blurb::before { content: "\201C"; color: var(--rk-accent); } .hl-card-blurb::after { content: "\201D"; color: var(--rk-accent); }
.hl-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.hl-perks li { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.16rem 0.5rem; border-radius: 7px; font-size: 0.76rem; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--muted); }
.hl-perks li b { color: var(--text); font-weight: 600; }
.hl-perks li span { color: var(--rk-accent-bright); font-weight: 700; font-variant-numeric: tabular-nums; }
.hl-toolbar-row { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; width: 100%; align-items: center; }
.hl-toolbar-row .hl-progress { margin-left: auto; }
.hl-toolbar-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-right: 0.1rem; }

/* ---------- Detail modal ---------- */
.hl-card { cursor: pointer; }
.hl-card .hl-pick, .hl-card .hl-pick button { cursor: pointer; }
.hl-card:focus-visible { outline: 2px solid var(--rk-accent); outline-offset: 2px; }
body.hl-modal-open { overflow: hidden; }
.hl-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 1rem; opacity: 0; transition: opacity 0.18s ease; }
.hl-modal[hidden] { display: none; }
.hl-modal.is-on { opacity: 1; }
.hl-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 10, 0.78); backdrop-filter: blur(6px); }
.hl-modal-panel {
  position: relative; width: min(860px, 100%); max-height: calc(100vh - 2rem); overflow: auto;
  border-radius: 16px; border: 1px solid var(--rk-accent-line); background: linear-gradient(180deg, #1d2029, #14161d);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(230, 200, 74, 0.1);
  transform: translateY(12px) scale(0.98); transition: transform 0.2s ease;
}
.hl-modal.is-on .hl-modal-panel { transform: none; }
.hl-modal-x { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; width: 34px; height: 34px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(0, 0, 0, 0.45); color: var(--text); font-size: 1.35rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.hl-modal-x:hover { background: var(--rk-accent-dim); color: var(--rk-accent-bright); border-color: var(--rk-accent-line); }
.hl-modal-body { display: grid; grid-template-columns: 300px 1fr; gap: 1.2rem; padding: 1.2rem; }
.hl-modal-art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #0b0d12; border: 1px solid rgba(255, 217, 100, 0.35); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); align-self: start; }
.hl-modal-art img, .hl-modal-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-modal-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45); }
.hl-modal-main { min-width: 0; padding-right: 1.6rem; }
.hl-modal-main h3 { margin: 0 0 0.35rem; font-family: "Cinzel", serif; font-weight: 700; font-size: 1.5rem; line-height: 1.2; color: #fff; }
.hl-modal-blurb { margin: 0.5rem 0 0; font-size: 0.92rem; font-style: italic; line-height: 1.5; color: #cfd5e3; }
.hl-modal-sec { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.hl-modal-sec h4 { margin: 0 0 0.5rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rk-accent); }
.hl-modal-sec h4 small { font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: var(--muted); margin-left: 0.4rem; }
.hl-modal-muted { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--muted); }
.hl-modal-sec .hl-card-sub { margin-bottom: 0.5rem; font-size: 0.86rem; }
.hl-modal-sec .hl-pick { max-width: 420px; }
.hl-modal-sec .hl-pick button { height: 40px; }
.hl-recipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.3rem 0.8rem; }
.hl-recipe li { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.86rem; color: var(--text); padding: 0.25rem 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); }
.hl-recipe-n { flex: 0 0 auto; min-width: 3.2ch; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--rk-accent-bright); text-align: right; }
.hl-recipe li.is-comp .hl-recipe-name { color: #fff; font-weight: 600; }
.hl-recipe-name small { color: var(--muted); font-weight: 400; }
.hl-modal-link { display: inline-block; margin-top: 1rem; font-size: 0.82rem; color: var(--accent); }
.hl-modal-link:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .hl-modal { padding: 0.5rem; }
  .hl-modal-body { grid-template-columns: 1fr; padding: 1rem; }
  .hl-modal-art { width: min(240px, 100%); margin: 0 auto; }
  .hl-modal-main { padding-right: 0; }
}

/* ---------- Staff export button (revealed by includes.js for servers.edit holders) ---------- */
.hl-admin-btn { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0.2rem 0 0.6rem; padding: 0.42rem 0.85rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; text-decoration: none; color: var(--hl-vault); background: rgba(164, 245, 238, 0.1); border: 1px solid rgba(164, 245, 238, 0.4); backdrop-filter: blur(6px); transition: background 0.15s ease, transform 0.15s ease; }
.hl-admin-btn[hidden] { display: none; }
.hl-admin-btn svg { width: 15px; height: 15px; }
.hl-admin-btn:hover { background: rgba(164, 245, 238, 0.2); transform: translateY(-1px); }
