/* NAV-TOPBAR-20261110 — horizontal header, dark navy + thin gold accent */

html:has(.site-header) {
  --panel-w: 960px;
}

html:has(.site-header) .shell {
  display: block;
  min-height: 0;
}

html:has(.site-header) .main-wrap {
  width: 100%;
}

.site-header {
  --tb-bg: rgba(14, 18, 26, 0.94);
  --tb-gold: #d4b07a;
  --tb-gold-hi: #ead8b0;
  --tb-text: #e8eef5;
  --tb-muted: #9aa6b2;
  --tb-line: rgba(255, 255, 255, 0.08);
  --tb-panel: rgba(16, 21, 30, 0.97);
  --tb-hover: rgba(255, 255, 255, 0.06);
  --tb-hover-gold: rgba(212, 176, 122, 0.14);
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--tb-text);
  background: var(--tb-bg);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid var(--tb-line);
  font-family: "Heebo", "Titillium Web", system-ui, sans-serif;
}

.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 176, 122, 0.25) 12%,
    var(--tb-gold) 50%,
    rgba(212, 176, 122, 0.25) 88%,
    transparent 100%
  );
  pointer-events: none;
}

.site-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px 16px;
  min-height: 58px;
  max-width: none;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  color: var(--tb-gold-hi);
  font-family: "Heebo", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0;
  line-height: 1.15;
  text-decoration: none;
  text-transform: none;
}

.site-header .brand:hover {
  color: #fff4d8;
}

.site-header .brand-leaf {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  image-rendering: auto;
  object-fit: cover;
  flex-shrink: 0;
}

.site-header .brand-name {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35em;
  white-space: nowrap;
  line-height: 1.15;
}

.site-header .brand-line {
  display: inline;
  white-space: nowrap;
}

/* Compact community pill, sits beside the logo — white rounded button, blurple mark + text */
.header-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #fff;
  color: #4752C4;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  animation: none;
}

.header-discord:hover,
.header-discord:focus-visible {
  background: #fff;
  color: #3c45a5;
  outline: 2px solid #d4b07a;
  outline-offset: 2px;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.header-discord svg {
  width: 16px;
  height: 12px;
  display: block;
  flex: none;
}

.header-discord span {
  display: inline;
  white-space: nowrap;
}


/* —— Desktop group nav —— */
.top-nav {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.top-nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.top-nav-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 9px;
  height: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tb-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  box-shadow: none;
  text-shadow: none;
}

.top-nav-btn::after {
  content: "";
  position: absolute;
  inset-inline: 10px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--tb-gold);
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.top-nav-btn:hover,
.top-nav-item.is-open .top-nav-btn {
  color: var(--tb-text);
  background: var(--tb-hover);
}

.top-nav-btn:hover::after,
.top-nav-item.is-open .top-nav-btn::after,
.top-nav-btn.is-current::after {
  opacity: 1;
  transform: scaleX(1);
}

.top-nav-btn.is-current {
  color: var(--tb-gold-hi);
  text-shadow: 0 0 18px rgba(212, 176, 122, 0.25);
}

.top-nav-btn:focus-visible {
  outline: 2px solid var(--tb-gold);
  outline-offset: -4px;
  color: var(--tb-text);
}

.top-nav-btn .nav-group-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.top-nav-caret {
  width: 0;
  height: 0;
  border-inline-start: 4px solid transparent;
  border-inline-end: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.top-nav-item.is-open .top-nav-caret {
  transform: rotate(180deg);
}

/* Dropdown: dark glass, light bevel, not a wood window */
.top-nav-dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 90;
  min-width: 240px;
  padding: 8px;
  margin: 0;
  border: 1px solid rgba(212, 176, 122, 0.22);
  border-radius: 10px;
  background: var(--tb-panel);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-nav-dropdown[hidden] {
  display: none;
}

.top-nav-item[data-group="classes"] .top-nav-dropdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 6px;
  min-width: 440px;
}

.top-nav-item[data-group="classes"] .top-nav-dropdown[hidden] {
  display: none;
}

.top-nav-item[data-group="classes"] .top-nav-dropdown > .nav-item:first-of-type {
  grid-column: 1 / -1;
}

.site-header .top-nav-dropdown .nav-item,
.nav-drawer .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--tb-text, #e8eef5);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: none;
  box-shadow: none;
  overflow: visible;
  isolation: auto;
}

.site-header .top-nav-dropdown .nav-item::before,
.nav-drawer .nav-item::before {
  content: none;
  display: none;
}

.site-header .top-nav-dropdown .nav-item img,
.nav-drawer .nav-item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  image-rendering: pixelated;
  filter: none;
}

.site-header .top-nav-dropdown .nav-item:hover,
.nav-drawer .nav-item:hover {
  background: var(--tb-hover-gold, rgba(212, 176, 122, 0.14));
  color: #fff8e8;
}

.site-header .top-nav-dropdown .nav-item:focus-visible,
.nav-drawer .nav-item:focus-visible {
  outline: 2px solid #d4b07a;
  outline-offset: 0;
}

.site-header .top-nav-dropdown .nav-item.active,
.nav-drawer .nav-item.active {
  background: rgba(212, 176, 122, 0.12);
  color: #ead8b0;
  box-shadow: none;
  text-shadow: none;
  border: 0;
  border-inline-start: 3px solid #d4b07a;
  padding-inline-start: 7px;
  border-radius: 0 7px 7px 0;
}

html[dir="rtl"] .site-header .top-nav-dropdown .nav-item.active,
html[dir="rtl"] .nav-drawer .nav-item.active {
  border-radius: 7px 0 0 7px;
}

/* —— Header tools —— */
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.site-header .search-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 190px;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--tb-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-header .search-box:focus-within {
  border-color: rgba(212, 176, 122, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 176, 122, 0.15);
}

.site-header .search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--tb-text);
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
}

.site-header .search-box input::placeholder {
  color: var(--tb-muted);
}

.site-header .search-box kbd {
  margin-inline-start: auto;
  font-family: "Titillium Web", system-ui, sans-serif;
  font-size: 0.75rem;
  padding: 0.08rem 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--tb-muted);
  flex-shrink: 0;
}

.site-header .my-char-stub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--tb-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
}

.site-header .my-char-stub:hover {
  border-color: rgba(212, 176, 122, 0.4);
  color: var(--tb-gold-hi);
}

.site-header .avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .badge-new {
  padding: 0.04rem 0.3rem;
  font-size: 0.75rem;
}

.site-header .discord-btn {
  justify-content: center;
  width: auto;
  padding: 7px 11px;
  font-size: 0.8125rem;
  border-radius: 8px;
  margin: 0;
}

.header-icon-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--tb-muted);
  cursor: pointer;
}

.header-icon-btn:hover,
.header-icon-btn:focus-visible {
  color: var(--tb-text);
  border-color: rgba(212, 176, 122, 0.45);
  outline: none;
}

.header-menu-btn {
  display: none;
}

.header-search-btn {
  display: none;
}

/* —— Mobile drawer —— */
.nav-drawer {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1199px) {
  .site-header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .site-header .brand-name {
    flex-direction: column;
    align-items: start;
    gap: 0;
  }

  .site-header .brand {
    font-size: 0.8125rem;
    gap: 6px;
  }

  .header-menu-btn,
  .header-search-btn {
    display: inline-flex;
  }

  .header-discord {
    width: 32px;
    height: 32px;
    padding: 0;
    gap: 0;
    border-radius: 9px;
  }

  .header-discord span {
    display: none;
  }

  .header-discord svg {
    width: 18px;
    height: 14px;
  }

  .header-menu-btn {
    width: 34px;
    min-width: 34px;
    flex-shrink: 0;
  }

  .header-tools {
    flex-shrink: 0;
    gap: 6px;
  }

  .top-nav,
  .site-header .search-box,
  .site-header .my-char-label,
  .site-header .discord-btn span,
  .site-header .search-box kbd,
  .site-header .side-foot-btn,
  .site-header .site-search-results {
    display: none;
  }

  .site-header.is-search-open .search-box {
    display: flex;
    position: absolute;
    inset-inline: 12px;
    top: calc(100% + 8px);
    width: auto;
    z-index: 91;
    background: #141a24;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  }

  .site-header .discord-btn {
    display: inline-flex;
    padding: 7px;
    width: 34px;
    height: 34px;
  }

  .site-header .my-char-stub {
    padding: 4px;
  }

  .nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 58px 0 0 0;
    z-index: 75;
    width: 100%;
    height: auto;
    background: #10151c;
    color: #e8eef5;
    padding: 12px 16px 24px;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s;
    box-shadow: inset 0 1px 0 rgba(212, 176, 122, 0.2);
  }

  .nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 58px 0 0 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 70;
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .nav-drawer .side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .nav-drawer .nav-group {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0;
    box-shadow: none;
  }

  .nav-drawer .nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #e8eef5;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: start;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
  }

  .nav-drawer .nav-group-toggle::before {
    content: none;
  }

  .nav-drawer .nav-group-toggle:hover,
  .nav-drawer .nav-group.is-open .nav-group-toggle {
    background: rgba(212, 176, 122, 0.08);
    color: #ead8b0;
  }

  .nav-drawer .nav-group-toggle:focus-visible {
    outline: 2px solid #d4b07a;
    outline-offset: -2px;
  }

  .nav-drawer .nav-group-icon {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
    filter: none;
  }

  .nav-drawer .nav-group-label {
    flex: 1;
  }

  .nav-drawer .nav-group-caret {
    width: 0;
    height: 0;
    border: 0;
    border-inline-start: 5px solid transparent;
    border-inline-end: 5px solid transparent;
    border-top: 5px solid currentColor;
    background: none;
    box-shadow: none;
    opacity: 0.6;
    transition: transform 0.15s ease;
  }

  .nav-drawer .nav-group-caret::after {
    content: none;
  }

  .nav-drawer .nav-group.is-open .nav-group-caret {
    transform: rotate(180deg);
  }

  .nav-drawer .nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0 8px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-drawer .nav-group-items[hidden] {
    display: none;
  }

  .nav-drawer-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-drawer .my-char-stub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e8eef5;
    text-decoration: none;
  }

  .nav-drawer .side-foot-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa6b2;
    font-family: inherit;
    font-size: 0.88rem;
    text-align: start;
  }

  .nav-drawer .side-foot-btn:hover:not(:disabled) {
    color: #e8eef5;
    background: rgba(255, 255, 255, 0.04);
  }
}

/* Mid desktop: two-line brand + compact tools, so the community pill and 5 groups still fit */
@media (min-width: 1200px) and (max-width: 1439px) {
  .site-header .brand-name {
    flex-direction: column;
    align-items: start;
    gap: 0;
  }

  .site-header .brand {
    font-size: 0.8125rem;
  }

  .site-header .search-box {
    width: 140px;
  }

  .site-header .search-box kbd,
  .site-header .my-char-label {
    display: none;
  }

  .site-header .my-char-stub {
    padding: 4px;
  }

  .top-nav-btn {
    padding: 0 5px;
    font-size: 0.8rem;
    gap: 4px;
  }

  .site-header-inner {
    gap: 8px;
    padding: 0 12px;
  }

  .header-tools {
    gap: 6px;
  }

  .header-discord {
    padding: 0 10px;
    gap: 6px;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer,
  .top-nav-caret,
  .top-nav-btn::after,
  .nav-drawer .nav-group-caret {
    transition: none;
  }
}

/* Market pages: keep their light body, just make room for the sticky bar */
body.with-site-header {
  margin: 0;
}

body.with-site-header .site-header {
  /* already sticky */
}

/* Standalone essentials so /market/ works without styles.css */
.site-header *,
.site-header *::before,
.site-header *::after,
.nav-drawer *,
.nav-drawer *::before,
.nav-drawer *::after {
  box-sizing: border-box;
}

.site-header .hamburger {
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: block;
}

.site-header .hamburger::before,
.site-header .hamburger::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.site-header .hamburger::before { top: -5px; }
.site-header .hamburger::after { top: 5px; }

.site-header .badge-new {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #7ee787 0%, #3fb950 50%, #2ea043 100%);
  color: #0d1117;
  font-family: "Titillium Web", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.nav-drawer .badge-new {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #7ee787 0%, #3fb950 50%, #2ea043 100%);
  color: #0d1117;
  font-size: 0.75rem;
  font-weight: 700;
}

.site-header .discord-btn,
.nav-drawer .discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5865F2;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.site-header .discord-btn:hover,
.site-header .discord-btn:focus-visible {
  background: #4752C4;
  color: #fff;
}

.site-header .discord-btn svg {
  flex: none;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  background: #d4b07a;
  color: #0d1117;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  z-index: 200;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}


body:has(#sidebar.open) .header-menu-btn .hamburger {
  background: transparent;
}
body:has(#sidebar.open) .header-menu-btn .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}
body:has(#sidebar.open) .header-menu-btn .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* —— Site-wide header search —— */
.header-search {
  position: relative;
  flex-shrink: 0;
}

.site-search-results {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 210;
  width: min(400px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 8px 0;
  border: 1px solid rgba(212, 176, 122, 0.28);
  border-radius: 10px;
  background: #141a24;
  background: color-mix(in srgb, #141a24 92%, transparent);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px rgba(0, 0, 0, 0.45);
  color: #e8eef5;
}

.site-search-results[hidden] {
  display: none;
}

.site-search-group {
  padding: 8px 14px 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d4b07a;
  text-transform: none;
}

.site-search-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  color: #e8eef5;
  text-decoration: none;
  border-inline-start: 2px solid transparent;
}

.site-search-hit:hover,
.site-search-hit.is-active {
  background: rgba(212, 176, 122, 0.1);
  border-inline-start-color: #d4b07a;
  color: #fff;
}

.site-search-hit img,
.site-search-ph {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
  image-rendering: pixelated;
}

.site-search-ph {
  display: inline-block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.site-search-hit-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.site-search-hit-title {
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.25;
  unicode-bidi: isolate;
}

.site-search-hit-snip {
  font-size: 0.8125rem;
  color: #9aa6b5;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  unicode-bidi: isolate;
}

.site-search-empty {
  padding: 16px 14px;
  font-size: 0.82rem;
  color: #9aa6b5;
  text-align: center;
}

.site-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 230;
  flex-direction: column;
  background: #0d1117;
}

.site-search-overlay.is-open,
.site-search-overlay:not([hidden]) {
  display: flex;
}

.site-search-overlay[hidden] {
  display: none !important;
}

.site-search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #141a24;
  border-bottom: 1px solid rgba(212, 176, 122, 0.28);
}

.site-search-overlay-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(212, 176, 122, 0.4);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: #e8eef5;
}

.site-search-overlay-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #e8eef5;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.site-search-overlay-field input::placeholder {
  color: #9aa6b5;
}

.site-search-overlay-close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: transparent;
  color: #e8eef5;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.site-search-overlay-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 24px;
}

.site-search-overlay-results .site-search-hit {
  padding: 10px 16px;
}

.site-search-overlay-results .site-search-hit-snip {
  white-space: normal;
}

body.site-search-lock {
  overflow: hidden;
}

tr.row.is-search-target {
  outline: 2px solid rgba(212, 176, 122, 0.7);
  outline-offset: -2px;
}

details.q-card,
.i-card,
.boss-card,
[id^="mon-"],
[id^="q-"],
[id^="item-"] {
  scroll-margin-top: 72px;
}

@media (min-width: 1440px) and (max-width: 1599px) {
  .site-header-inner {
    padding: 0 16px;
    gap: 8px 10px;
  }

  .top-nav-btn {
    padding: 0 6px;
    gap: 5px;
  }

  .site-header .search-box {
    width: 168px;
  }

  .site-header .search-box kbd {
    display: none;
  }

  .header-tools {
    gap: 6px;
  }

  .header-discord {
    padding: 0 11px;
    gap: 6px;
    font-size: 0.78rem;
  }
}

@media (min-width: 1600px) {
  .site-header .search-box {
    width: 220px;
  }
}

/* Narrow phones: keep logo, two-line name, Discord, search, and hamburger on one bar */
@media (max-width: 480px) {
  .site-header-inner {
    padding: 0 10px;
    gap: 6px;
  }

  .site-header .badge-new {
    display: none;
  }

  .site-header .brand {
    font-size: 0.8125rem;
    gap: 6px;
  }

  .header-icon-btn,
  .header-menu-btn,
  .header-search-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .header-discord {
    width: 32px;
    height: 32px;
  }
}
