:root { --content: 1080px; }
* { box-sizing: border-box; border-radius: 0; }
/* tier badges/chips just show hover info - not selectable */
.pill, .tcol-tier, .rank-badge, .staff-star, .tab, .tip { user-select: none; -webkit-user-select: none; }

/* ── Top banner — VIOLET logo (left) + NEPRAC support (right) ── */
.hero {
  max-width: var(--content);
  margin: 0 auto;
  padding: 28px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #000;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.02em;
  font-size: clamp(34px, 8vw, 84px);   /* drives both star + wordmark sizing */
  text-decoration: none;
  color: inherit;
}
/* NEPRAC support block, opposite the logo */
.support {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.support-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.support-top:hover { text-decoration: underline; }
.neprac-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.3);
}
.support-ip {
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.5;
}
.logo-star {
  width: 1.3em;
  height: 1.3em;
  flex: none;
  object-fit: contain;
  filter: grayscale(1) contrast(1.15);   /* force pure black/white */
}
.wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 1em;
  letter-spacing: -0.01em;
  line-height: 1;
  /* Fill the letters with the star's grainy refraction pattern. The solid gray
     base under the image + `screen` blend keeps letters metallic-gray with bright
     grain highlights instead of black holes; grayscale forces black/white. */
  background-image: url('/logo.jpg'), linear-gradient(#6f6f6f, #6f6f6f);
  background-size: 150% auto, cover;
  background-position: center 40%, center;
  background-repeat: no-repeat;
  background-blend-mode: screen;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: grayscale(1) contrast(1.25) brightness(1.1);
}

* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  position: relative;    /* anchors the page-bottom + side starfields */
  min-height: 100vh;
  overflow-x: hidden;    /* cut-off decor stars never add horizontal scroll */
  background: #000;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.site-head {
  max-width: var(--content);
  margin: 0 auto;
  padding: 32px 20px 12px;
}
.site-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 12px 20px 16px;
}

/* ── Search ── */
.controls {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 20px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: #000;
  border: 1px solid #fff;
  padding: 9px 12px;
  outline: none;
}
.search::placeholder { color: #fff; opacity: 0.4; }
.search:focus { box-shadow: inset 0 0 0 1px #fff; }
.tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  height: 52px;
  background: #000;
  border: 1px solid #fff;
  cursor: pointer;
}
.tab-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.5;
}
.tab:hover .tab-icon { opacity: 0.85; }
.tab.active {
  background: #242424;
  border-color: #fff;
  box-shadow: inset 0 0 0 1px #fff;
}
.tab.active .tab-icon { opacity: 1; }
.tab-label {
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
}
.tab.active .tab-label { color: #fff; }

/* ── Board ── */
.board {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 20px 60px;
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #000;
  border: 1px solid #fff;
  padding: 10px 14px;
  margin-bottom: -1px;   /* collapse borders into a single grid */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;      /* safety net: never let badges/pills bleed past the row edge */
  max-width: 100%;
}
.row:hover {
  transform: scale(1.015);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.rank {
  width: 44px;
  flex: none;
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.face {
  position: relative;
  z-index: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Every row gets the same diagonal ribbon shape behind rank + avatar - dark
   and neutral by default, colored gold/silver/bronze only for the top 3. */
.rank-ribbon {
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 118px;
  clip-path: polygon(0 0, 100% 0, 68% 100%, 0 100%);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #1c1c1c, #050505);
}
.row.top-1 .rank-ribbon { background: linear-gradient(135deg, #ffe066, #c9950f); }
.row.top-2 .rank-ribbon { background: linear-gradient(135deg, #eaeaea, #9a9a9a); }
.row.top-3 .rank-ribbon { background: linear-gradient(135deg, #e8935a, #a0551f); }

/* Shine bar - a thin bright line followed by a wider, softer band, like
   light through a window. Animated with transform (GPU-accelerated, smooth,
   no jank) instead of background-position, and clipped cleanly by the
   ribbon's own overflow/clip-path above - crisp edges, no bleed. */
.rank-shine {
  position: absolute;
  top: -30px;
  bottom: -30px;
  left: -70px;
  width: 60px;
  pointer-events: none;
  animation: rank-shine-move 5s linear infinite;
}

.row.top-1 .rank-shine {
  background: linear-gradient(115deg, transparent 44%, rgba(255, 244, 196, 0.95) 48%, rgba(255, 244, 196, 0.95) 52%, transparent 56%);
}
.row.top-2 .rank-shine {
  background: linear-gradient(115deg, transparent 44%, rgba(245, 245, 245, 0.95) 48%, rgba(245, 245, 245, 0.95) 52%, transparent 56%);
}
.row.top-3 .rank-shine {
  background: linear-gradient(115deg, transparent 44%, rgba(255, 211, 168, 0.95) 48%, rgba(255, 211, 168, 0.95) 52%, transparent 56%);
}

@keyframes rank-shine-move {
  0%   { transform: translateX(0); }
  100% { transform: translateX(230px); }
}
.face {
  width: 38px; height: 38px;
  image-rendering: pixelated;
  background: #000;
  flex: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.face.placeholder { display: inline-block; }

.who { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; position: relative; z-index: 1; }
.name-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; row-gap: 4px; }
.name { font-weight: 700; font-size: 14px; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.name:hover { text-decoration: underline; }
.staff-star {
  font-size: 12px;
  line-height: 1;
  color: #fff;
  cursor: default;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}
.sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; opacity: 0.6; }

.badges {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
  position: relative;
  z-index: 1;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  justify-content: flex-end;
  align-items: center;
}

/* ── Tier pill: sharp, outlined, monochrome ── */
.pill {
  display: inline-flex;
  border: 1px solid #fff;
  border-radius: 5px;
  overflow: hidden;
}
.pill-key {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-right: 1px solid #fff;
}
.pill-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
}
.pill-tier {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  color: #000;
}
/* Retired tiers show the same as normal ones - distinguished only by the
   "R" prefix already baked into the tier label text (e.g. RLT2). */

/* Empty slot for a gamemode the player hasn't been tested in yet - a fully
   blank box, sized to match a filled pill so both rows line up evenly. */
.pill.pill-empty { opacity: 0.3; }

/* Fixed pill size in the leaderboard rows only (not the profile modal), so
   filled and empty slots line up into a clean, even two-row grid regardless
   of tier label length (e.g. "HT3" vs "RLT2"). */
.badges .pill { width: 66px; height: 21px; box-sizing: border-box; flex-shrink: 0; }
.badges .pill-key { flex: none; }
.badges .pill-tier { flex: 1; min-width: 0; padding: 2px 5px; }
.badges .pill-empty { display: inline-block; }

.msg { opacity: 0.6; padding: 32px 0; font-size: 13px; }

/* ── Gamemode tier columns — span the same width as the leaderboard ── */
.board.wide { max-width: var(--content); }
.tier-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.tier-col {
  border: 1px solid #fff;
  min-width: 0;
  align-self: start;
}
.tier-col-head {
  border-bottom: 1px solid #fff;
  padding: 9px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
/* Only the top 3 tiers get gold/silver/bronze headers, echoing the top-3
   rank styling used on the overall leaderboard. Tier 4/5 stay plain. */
.tier-col-1 .tier-col-head { background: #6b5710; color: #ffd700; border-bottom-color: #ffd700; }
.tier-col-2 .tier-col-head { background: #4a4f57; color: #c0c0c0; border-bottom-color: #c0c0c0; }
.tier-col-3 .tier-col-head { background: #5c3821; color: #cd7f32; border-bottom-color: #cd7f32; }
.tcol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.tcol-row:last-child { border-bottom: none; }
.tcol-row .face { width: 26px; height: 26px; }
.tcol-row .name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcol-row .staff-star { font-size: 11px; }
.tcol-tier { margin-left: auto; font-size: 10px; font-weight: 700; opacity: 0.65; flex: none; }
.tcol-tier.retired { opacity: 0.4; }
.tcol-tier-ht { display: inline-block; transform: rotate(-90deg); }
.tcol-tier-lt { display: inline-block; transform: rotate(90deg); }
@media (max-width: 720px) {
  .tier-columns { grid-auto-flow: column; grid-auto-columns: 150px; grid-template-columns: none; }
}

/* ── Player profile modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlay-fade-in 0.18s ease forwards;
}
.modal-overlay.closing { animation: overlay-fade-out 0.16s ease forwards; }
.modal {
  position: relative;
  width: 440px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  background: #000;
  border: 1px solid #fff;
  padding: 20px 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modal-pop-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.modal-overlay.closing .modal { animation: modal-pop-out 0.16s ease forwards; }

@keyframes overlay-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-pop-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes modal-pop-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.94); }
}
.modal-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}
.modal-close:hover { opacity: 1; }
.modal.top-1 { border-color: #ffd700; }
.modal.top-2 { border-color: #c0c0c0; }
.modal.top-3 { border-color: #cd7f32; }
.modal-head {
  width: 84px;
  height: 74px;
  flex: none;
  image-rendering: pixelated;
  margin-bottom: 10px;   /* centered by the column's align-items: center */
}
.modal-info { width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.modal-name-line { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; justify-content: center; }
.modal-name { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.modal-name-line .staff-star { font-size: 15px; }
.modal-meta { font-size: 11px; opacity: 0.6; margin-bottom: 10px; }
.modal-tiers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-content: flex-start; overflow-y: auto; max-height: 220px; width: 100%; }

/* ── Instant tooltip ── */
.tip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  background: #000;
  border: 1px solid #fff;
  padding: 5px 9px;
  max-width: 240px;
  font-family: ui-monospace, monospace;
}
.tip-title { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.tip-sub { font-size: 10px; opacity: 0.65; margin-top: 2px; }

/* ── Constellation rank chip ── */
.rank-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid #fff;
  cursor: default;
  white-space: nowrap;
}

/* Bottom copyright line - deliberately sits down inside the star band, so the heavy
   black shadow reads as a dark halo punched through the halftone stars behind it. */
.site-footer {
  position: absolute;   /* pinned to the page bottom so it always lands on the stars,
                           instead of floating above them when the board is short */
  left: 0;
  right: 0;
  bottom: 46px;
  z-index: 1;
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 3px #000, 0 2px 10px #000, 0 0 18px #000,
               0 0 26px #000, 0 0 40px #000;
}

/* ── Decorative halftone starfield ──
   Anchored to the bottom of the *page* (not the viewport), so the stars sit under
   the footer and scroll with the document instead of trailing the screen edge.
   Absolute + a 340px band means they never add page height of their own. */
.starfield {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 340px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

/* Side rails - only fill whatever vertical space exists between the header and the
   bottom band, so short pages collapse them to zero height and render nothing. */
.starfield-sides {
  position: absolute;
  left: 0;
  right: 0;
  top: 420px;
  bottom: 340px;
  pointer-events: none;
  z-index: -1;
}
.star-deco {
  position: absolute;
  /* black star on white -> invert to white star; screen drops the black bg */
  filter: invert(1) grayscale(1);
  mix-blend-mode: screen;
}
/* in-view stars */
.star-deco.s1 { width: 130px; left: 8%;  bottom: 44px;  opacity: 0.9;  transform: rotate(-12deg); }
.star-deco.s2 { width: 60px;  left: 22%; bottom: 170px; opacity: 0.45; transform: rotate(18deg); }
.star-deco.s3 { width: 200px; left: 44%; bottom: 26px;  opacity: 1;    transform: rotate(6deg); }
.star-deco.s4 { width: 80px;  left: 66%; bottom: 140px; opacity: 0.6;  transform: rotate(-24deg); }
.star-deco.s5 { width: 110px; right: 12%; bottom: 60px; opacity: 0.8;  transform: rotate(14deg); }
.star-deco.s6 { width: 46px;  left: 36%; bottom: 220px; opacity: 0.35; transform: rotate(-8deg); }
.star-deco.s7 { width: 70px;  left: 54%; bottom: 180px; opacity: 0.5;  transform: rotate(28deg); }
/* cut-off stars — deliberately spilling past the edges, clipped by overflow */
.star-deco.s8  { width: 240px; left: -80px;  bottom: -70px; opacity: 0.85; transform: rotate(-18deg); }
.star-deco.s9  { width: 300px; right: -120px; bottom: -90px; opacity: 0.9; transform: rotate(10deg); }
.star-deco.s10 { width: 120px; left: -40px;  bottom: 150px; opacity: 0.5;  transform: rotate(22deg); }
.star-deco.s11 { width: 160px; right: -60px; bottom: 170px; opacity: 0.55; transform: rotate(-14deg); }
.star-deco.s12 { width: 90px;  left: 80%;   bottom: -30px; opacity: 0.7;  transform: rotate(16deg); }
/* Side-rail stars are positioned by app.js (layoutSideStars), which only emits as many
   as the rail height can hold without them overlapping or clipping each other. */
.star-side { position: absolute; filter: invert(1) grayscale(1); mix-blend-mode: screen; }

@media (max-width: 560px) {
  .starfield { height: 240px; }
  .starfield-sides { display: none; }   /* no side room on phones */
  .star-deco.s1 { width: 84px; }
  .star-deco.s3 { width: 120px; }
  .star-deco.s5 { width: 70px; }
  .star-deco.s8 { width: 150px; }
  .star-deco.s9 { width: 180px; }
}

@media (min-width: 701px) {
  .who {
    width: 230px;
    flex: 0 0 230px;
  }
}

/* ── Mobile layout ──
   Tabs become a horizontal swipe-scroll strip instead of trying to fit/wrap
   every gamemode on screen at once. Leaderboard rows stack: rank+avatar+name
   on top, badges drop to their own full-width line below instead of
   colliding with a long rank-badge chip like "CONSTELLATION". */
@media (max-width: 700px) {
  .hero {
    flex-wrap: wrap;
    padding: 20px 16px 8px;
  }
  .support { align-items: flex-start; text-align: left; }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 10px 16px 14px;
  }
  .tabs.is-balanced .tab { flex-basis: auto; }
  .tab {
    flex: none;
    width: 56px;
    height: 44px;
    scroll-snap-align: start;
  }

  .controls { padding: 0 16px 12px; }
  .board { padding: 0 16px 60px; }

  .row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 6px;
    padding: 10px 12px;
  }
  .rank-ribbon { width: 88px; }
  .row .rank {
    font-size: 20px; width: 34px;
    grid-column: 1; grid-row: 1 / 3; align-self: center;
  }
  .row .face {
    width: 32px; height: 32px;
    grid-column: 2; grid-row: 1 / 3; align-self: center;
  }

  .who {
    grid-column: 3; grid-row: 1;
    min-width: 0;
  }
  .name-line { flex-wrap: wrap; row-gap: 4px; }

  .badges {
    grid-column: 3 / -1; grid-row: 2;   /* starts under the name automatically */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
  }
  .badge-row { display: contents; }
  .badges .pill { width: 56px; height: 18px; }
  .badges .pill-key { padding: 2px 3px; font-size: 8px; }
  .badges .pill-tier { padding: 2px 5px; font-size: 9px; }

  .downloads-toggle {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 11px;
  }
  .downloads-panel { width: 100%; max-width: 100%; }
  .titles-panel { width: 100%; max-width: 100%; }
}

/* Narrow phones (e.g. iPhone SE, small Android) - shrink pills further so
   3 per line always fits without wrapping oddly or squeezing the gap to zero. */
@media (max-width: 380px) {
  .board { padding: 0 12px 60px; }
  .row { padding: 10px 8px; column-gap: 8px; row-gap: 5px; }
  .rank-ribbon { width: 74px; }
  .row .rank { font-size: 17px; width: 26px; }
  .row .face { width: 28px; height: 28px; }
  .badges { gap: 3px; }
  .badges .pill { width: 48px; height: 17px; }
  .badges .pill-key { padding: 2px 2px; font-size: 7px; }
  .badges .pill-tier { padding: 2px 4px; font-size: 8px; }
}

/* ── TierTagger downloads panel ── */
.downloads-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #000;
  border: 1px solid #fff;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  animation: downloads-pulse 2.6s ease-in-out infinite;
}
.downloads-toggle:hover {
  background: #fff;
  color: #000;
  animation: none;
}
@keyframes downloads-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.downloads-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.downloads-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.downloads-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #000;
  border-left: 1px solid #fff;
  padding: 28px 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow-y: auto;
}
.downloads-panel.open { transform: translateX(0); }

.downloads-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}
.downloads-close:hover { opacity: 1; }

.downloads-panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.downloads-desc {
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.7;
  margin: 0 0 22px;
}
.downloads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.downloads-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #fff;
  padding: 12px 14px;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease, color 0.15s ease;
}
.downloads-item:hover { background: #fff; color: #000; }
.downloads-item-main { display: flex; flex-direction: column; gap: 2px; }
.downloads-item-title { font-weight: 700; font-size: 13px; letter-spacing: 0.5px; }
.downloads-item-sub { font-size: 11px; opacity: 0.65; }
.downloads-item-icon { font-size: 18px; }
.downloads-note {
  margin-top: 20px;
  font-size: 10px;
  opacity: 0.5;
  line-height: 1.5;
}

/* ── Titles info button + panel - same slide-in pattern as the downloads
   panel, but docked inline next to search rather than floating, since the
   "i" button belongs with the other top controls, not the corner. ── */
.titles-info-toggle {
  flex: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border: 1px solid #fff;
  color: #fff;
  font: inherit;
  font-weight: 900;
  font-style: italic;
  font-size: 14px;
  cursor: pointer;
}
.titles-info-toggle:hover { background: #fff; color: #000; }

.titles-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.titles-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.titles-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #000;
  border-left: 1px solid #fff;
  padding: 28px 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow-y: auto;
}
.titles-panel.open { transform: translateX(0); }

.titles-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}
.titles-close:hover { opacity: 1; }

.titles-panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.titles-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.titles-subtab {
  flex: 1;
  background: #000;
  border: 1px solid #fff;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px;
  cursor: pointer;
  opacity: 0.6;
}
.titles-subtab.active { opacity: 1; background: #fff; color: #000; }
.titles-subtab:not(.active):hover { opacity: 1; }
.titles-desc {
  font-size: 11px;
  line-height: 1.6;
  opacity: 0.6;
  margin: 0 0 22px;
}
.titles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.titles-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #fff;
  border-left: 4px solid var(--title-color, #fff);
  padding: 10px 14px;
}
.titles-item-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--title-color, #fff);
}
.titles-item-req {
  font-size: 11px;
  opacity: 0.65;
  white-space: nowrap;
}
