/* ================================================================
   BYR — Header v9.0
   WPCode: CSS Snippet | Site Wide Header | Priority: 9
   ================================================================
   Chrome border animation, 25% smaller logo, 33% larger slogan,
   redesigned search bar, 2× faster collapse transitions.
   §15 overrides mode-toggle.css to make #byr-mode-toggle inline.
   ================================================================ */

/* ============================================================
   §1  (REMOVED — Astra header override now in
        01-core-tokens-base.css §18, relocated 2026-04)
   ============================================================ */


/* ============================================================
   §2  CHROME BORDER ANIMATION
   ============================================================ */

@property --hdr-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes hdr-chrome-spin {
  to { --hdr-angle: 360deg; }
}

@keyframes hdr-surface-breathe {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}


/* ============================================================
   §2b  HEADER BASE
   ============================================================ */

.byr-header {
  position: fixed;
  top: 25px;
  left: var(--space-md, 16px);
  right: var(--space-md, 16px);
  width: auto;
  z-index: var(--z-header, 1000);
  padding: var(--space-sm, 8px) var(--space-lg, 24px);
  border-radius: 35px;

  background:
    linear-gradient(
      160deg,
      rgba(34, 211, 238, 0.07)  0%,
      rgba(8,  12,  24,  0.78) 25%,
      rgba(6,  10,  20,  0.72) 65%,
      rgba(16, 185, 129, 0.05) 100%
    );
  background-size: 200% 200%;
  animation: hdr-surface-breathe 14s ease-in-out infinite;

  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);

  border: 1.5px solid transparent;
  background-clip: padding-box;

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.50),
    0 0 60px rgba(34, 211, 238, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  transition:
    top           0.375s cubic-bezier(0.4, 0, 0.2, 1),
    padding       0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.425s 0.04s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow    0.450s 0.025s cubic-bezier(0.4, 0, 0.2, 1),
    background    0.500s 0.05s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Rotating chrome border via ::before ── */
.byr-header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 35px;
  padding: 1.5px;

  background:
    conic-gradient(from var(--hdr-angle),
      rgba(255, 255, 255, 0.80),
      rgba(255, 255, 255, 0.12),
      rgba(34,  211, 238, 0.55),
      rgba(255, 255, 255, 0.12),
      rgba(16,  185, 129, 0.45),
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.80)
    );

  animation: hdr-chrome-spin 8s linear infinite;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  opacity: 0.65;
  pointer-events: none;
  z-index: -1;

  transition:
    opacity       0.425s 0.04s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.425s 0.04s cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-header:hover::before {
  opacity: 0.88;
}


/* ── Admin bar offset ── */
.admin-bar .byr-header {
  top: 57px; /* 25 + 32 */
}


/* ============================================================
   §2c  SCROLLED STATE
   ============================================================ */

.byr-header.scrolled {
  top: 12px;
  padding: 4px var(--space-lg, 24px);
  border-radius: 26px;

  background:
    linear-gradient(
      160deg,
      rgba(34, 211, 238, 0.09)  0%,
      rgba(6,  10,  20,  0.88) 20%,
      rgba(5,   8,  18,  0.92) 100%
    );
  background-size: 200% 200%;

  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.60),
    0 0 30px rgba(34, 211, 238, 0.07),
    inset 0 1px 0 rgba(34, 211, 238, 0.08);
}

.byr-header.scrolled::before {
  border-radius: 26px;
  opacity: 0.45;
}

.admin-bar .byr-header.scrolled {
  top: 44px; /* 12 + 32 */
}


/* ============================================================
   §3  LIGHT MODE HEADER
   ============================================================ */

.mode-light .byr-header {
  background:
    linear-gradient(
      160deg,
      rgba(0,  180, 220, 0.28)  0%,
      rgba(4,  45,  80,  0.55) 40%,
      rgba(8,  100, 60,  0.18) 80%,
      rgba(0,  160, 200, 0.22) 100%
    );
  background-size: 200% 200%;
  animation: hdr-surface-breathe 14s ease-in-out infinite;

  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 0 50px rgba(34, 211, 238, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.mode-light .byr-header::before {
  background:
    conic-gradient(from var(--hdr-angle),
      rgba(255, 255, 255, 0.70),
      rgba(255, 255, 255, 0.10),
      rgba(34,  211, 238, 0.45),
      rgba(255, 255, 255, 0.10),
      rgba(16,  185, 129, 0.35),
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.70)
    );
  opacity: 0.72;
}

.mode-light .byr-header.scrolled {
  background:
    linear-gradient(
      160deg,
      rgba(0,  180, 220, 0.32) 0%,
      rgba(2,  38,  70,  0.72) 40%,
      rgba(4,  80,  50,  0.22) 80%,
      rgba(0,  160, 200, 0.28) 100%
    );
  background-size: 200% 200%;

  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.20),
    0 0 30px rgba(34, 211, 238, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}


/* ============================================================
   §4  HEADER LAYOUT
   ============================================================ */

.byr-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md, 16px);
  max-width: 1600px;
  margin: 0 auto;
}

.byr-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md, 16px);
  flex-shrink: 0;
}

.byr-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 8px);
  padding-right: 0;
}


/* ============================================================
   §4b  SITE SLOGAN — "Bare Your Rare"  (33% larger than v8)
   ============================================================ */

.byr-header-slogan {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);   /* was ~0.9–1.2rem implied */
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.01em;
  white-space: nowrap;

  background: linear-gradient(135deg,
    #FFFFFF         0%,
    #FFFFFF        20%,
    rgba(34,211,238,0.95) 50%,
    #FFFFFF        80%,
    #FFFFFF       100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hdr-surface-breathe 10s ease-in-out infinite;

  transition: font-size 0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-header.scrolled .byr-header-slogan {
  font-size: clamp(1.0rem, 1.4vw, 1.3rem);
}

@media (max-width: 1023px) {
  .byr-header-slogan {
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .byr-header-slogan {
    display: none; /* too cramped on very small screens */
  }
}


/* ============================================================
   §5  3D COIN LOGO  — 25% smaller across all breakpoints
   ============================================================
   v8: 100px default → v9: 75px
   v8: 58px scrolled → v9: 43px
   ============================================================ */

.byr-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  perspective: 1000px;
  text-decoration: none;
}

.byr-coin-3d {
  position: relative;
  width: 75px;    /* was 100px */
  height: 75px;   /* was 100px */
  transform-style: preserve-3d;
  transition:
    transform      0.6s  cubic-bezier(0.4, 0, 0.2, 1),
    width          0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1),
    height         0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1);
  animation: coinEntrance 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes coinEntrance {
  0%   { transform: rotateY(0deg) scale(0.5); opacity: 0; }
  40%  { opacity: 1; }
  70%  { transform: rotateY(720deg) scale(1.1); }
  100% { transform: rotateY(720deg) scale(1); }
}

.byr-logo:hover .byr-coin-3d {
  transform: rotateY(900deg) scale(1.05);
}

.byr-header.scrolled .byr-coin-3d {
  width: 43px;   /* was 58px */
  height: 43px;  /* was 58px */
}

.byr-coin-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.30),
    0 0 0 2px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-logo:hover .byr-coin-face {
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.40),
    0 0 30px var(--color-accent-primary, #22D3EE),
    0 0 0 2px rgba(34, 211, 238, 0.30);
}

.byr-coin-front { transform: rotateY(0deg); }
.byr-coin-back  { transform: rotateY(180deg) scaleX(-1); }

.byr-coin-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ============================================================
   §6  SEARCH BAR — Between slogan and nav; premium glass style
   ============================================================ */

@property --search-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes search-chrome-spin {
  to { --search-angle: 360deg; }
}

.byr-search {
  display: flex;
  align-items: center;
  position: relative;
  width: 220px;

  background:
    rgba(4, 10, 24, 0.55) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.35) 0%,
      rgba(255, 255, 255, 0.12) 45%,
      rgba(16, 185, 129, 0.28) 100%
    ) border-box;
  border: 1.5px solid transparent;
  border-radius: 999px;
  overflow: visible;

  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);

  box-shadow:
    0 2px 14px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(34, 211, 238, 0.04) inset;

  transition:
    width        0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1),
    opacity      0.350s       cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow   0.25s        cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chrome glow ring on focus */
.byr-search:focus-within {
  background:
    rgba(4, 12, 28, 0.68) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.70) 0%,
      rgba(255, 255, 255, 0.40) 45%,
      rgba(16, 185, 129, 0.55) 100%
    ) border-box;
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.18),
    0 4px 20px rgba(0, 0, 0, 0.40),
    0 0 32px rgba(34, 211, 238, 0.10) inset;
  width: 280px;
}

/* Subtle animated chrome shimmer on hover */
.byr-search:hover:not(:focus-within) {
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.25),
    0 4px 18px rgba(0, 0, 0, 0.38),
    0 0 20px rgba(34, 211, 238, 0.06) inset;
}

.byr-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px 0 14px;
  flex-shrink: 0;
  color: rgba(34, 211, 238, 0.45);
  pointer-events: none;
  transition: color 0.20s cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-search:focus-within .byr-search-icon {
  color: rgba(34, 211, 238, 0.85);
}

.byr-search-input {
  flex: 1;
  padding: 9px 4px 9px 0;
  background: transparent;
  border: none;
  color: rgba(240, 245, 255, 0.92);
  font-size: var(--text-sm);
  font-family: inherit;
  letter-spacing: 0.01em;
}

.byr-search-input::placeholder {
  color: rgba(34, 211, 238, 0.35);
  letter-spacing: 0.03em;
}

.byr-search-input:focus {
  outline: none;
}

.byr-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 4px 4px 0;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background:
    rgba(34, 211, 238, 0.12) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.50) 0%,
      rgba(16, 185, 129, 0.35) 100%
    ) border-box;
  border: 1px solid transparent;
  border-radius: 50%;
  color: rgba(34, 211, 238, 0.60);
  cursor: pointer;
  transition:
    background   0.20s cubic-bezier(0.4, 0, 0.2, 1),
    color        0.20s cubic-bezier(0.4, 0, 0.2, 1),
    transform    0.15s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow   0.20s cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-search-btn:hover,
.byr-search:focus-within .byr-search-btn {
  background:
    rgba(34, 211, 238, 0.22) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.80) 0%,
      rgba(16, 185, 129, 0.60) 100%
    ) border-box;
  color: #FFFFFF;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.28);
}

.byr-search-btn:active {
  transform: scale(0.96);
}

/* Scrolled: search collapses — cascades last */
.byr-header.scrolled .byr-search {
  width: 220px;
}

.byr-header.scrolled .byr-search:focus-within {
  width: 205px;
}

/* Light mode search */
.mode-light .byr-search {
  background:
    rgba(0, 30, 70, 0.45) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.40) 0%,
      rgba(255, 255, 255, 0.22) 45%,
      rgba(16, 185, 129, 0.32) 100%
    ) border-box;
  box-shadow:
    0 2px 14px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mode-light .byr-search:focus-within {
  background:
    rgba(0, 40, 90, 0.60) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.75) 0%,
      rgba(255, 255, 255, 0.38) 45%,
      rgba(16, 185, 129, 0.58) 100%
    ) border-box;
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.20),
    0 4px 20px rgba(0, 0, 0, 0.22);
}

.mode-light .byr-search-input {
  color: #FFFFFF;
}

.mode-light .byr-search-input::placeholder {
  color: rgba(255, 0, 255, 0.45);
}

.mode-light .byr-search-icon {
  color: rgba(34, 211, 238, 0.60);
}

@media (max-width: 1023px) {
  .byr-search { display: none; }
}


/* ============================================================
   §7  NAVIGATION
   ============================================================ */

.byr-nav {
  display: none;
}

@media (min-width: 1024px) {
  .byr-nav {
    display: block;
  }
}

.byr-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}


/* ============================================================
   §8  MENU ITEMS — Chrome Micro-Border + Glow Hover
   ============================================================ */

@property --nav-chrome-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes nav-chrome-spin {
  to { --nav-chrome-angle: 360deg; }
}

.byr-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs, 4px);
  padding: var(--space-sm, 8px) var(--space-md, 18px);
  border-radius: var(--radius-lg, 12px);

  font-weight: 550;
  font-size: 0.925rem;
  color: var(--color-text-primary, #F5F5F8);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.04);
  border: none;

  position: relative;
  isolation: isolate;
  overflow: hidden;

  transition:
    transform   150ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  250ms cubic-bezier(0.4, 0, 0.2, 1),
    background  200ms cubic-bezier(0.4, 0, 0.2, 1),
    color       150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chrome micro-ring */
.byr-menu-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;

  background:
    conic-gradient(from var(--nav-chrome-angle),
      rgba(255, 255, 255, 0.50),
      rgba(255, 255, 255, 0.06),
      rgba(34,  211, 238, 0.30),
      rgba(255, 255, 255, 0.06),
      rgba(16,  185, 129, 0.22),
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.50)
    );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  opacity: 0.40;
  pointer-events: none;
  z-index: 0;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-menu-item:hover::after,
.byr-menu-item:focus::after {
  animation: nav-chrome-spin 4s linear infinite;
  opacity: 0.82;
}

.byr-menu-item:hover,
.byr-menu-item:focus {
  color: #FFFFFF;
  background: rgba(34, 211, 238, 0.07);
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 0 18px rgba(34, 211, 238, 0.10);
}

.byr-menu-item:active {
  transform: translateY(0);
}

.byr-menu-item:focus-visible {
  outline: 2px solid var(--color-focus-ring, #FFD54F);
  outline-offset: 2px;
}

.byr-header.scrolled .byr-menu-item {
  padding: 4px 14px;
  font-size: var(--text-sm);
}

.mode-light .byr-menu-item {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.20);
}

.mode-light .byr-menu-item:hover,
.mode-light .byr-menu-item:focus {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.15),
    0 0 18px rgba(255, 255, 255, 0.10);
}

.mode-light .byr-menu-item::after {
  background:
    conic-gradient(from var(--nav-chrome-angle),
      rgba(255, 255, 255, 0.65),
      rgba(255, 255, 255, 0.10),
      rgba(34,  211, 238, 0.35),
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.65)
    );
}


/* ============================================================
   §9  DROPDOWN MENU
   ============================================================ */

.byr-dropdown {
  position: relative;
}

.byr-dropdown-arrow {
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
}

.byr-dropdown.active .byr-dropdown-arrow {
  transform: rotate(180deg);
}

.byr-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: var(--space-2xs);

  background: rgba(8, 14, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.50),
    0 0 0 1px rgba(0, 0, 0, 0.12);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);

  transition:
    opacity     200ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility  200ms,
    transform   200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-dropdown.active .byr-dropdown-menu,
.byr-dropdown:focus-within .byr-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.byr-dropdown-item {
  display: block;
  padding: var(--space-2xs) var(--space-sm);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 8px;
  font-size: var(--text-sm);
  transition:
    background  150ms cubic-bezier(0.4, 0, 0.2, 1),
    color       150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-dropdown-item:hover,
.byr-dropdown-item:focus {
  background: rgba(34, 211, 238, 0.12);
  color: #FFFFFF;
}

.byr-dropdown-item:focus-visible {
  outline: 2px solid var(--color-focus-ring, #FFD54F);
  outline-offset: -2px;
}

.mode-light .byr-dropdown-menu {
  background: rgba(2, 30, 65, 0.92);
  border-color: rgba(34, 211, 238, 0.20);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.mode-light .byr-dropdown-item {
  color: rgba(255, 255, 255, 0.92);
}

.mode-light .byr-dropdown-item:hover,
.mode-light .byr-dropdown-item:focus {
  background: rgba(34, 211, 238, 0.18);
  color: #FFFFFF;
}


/* ============================================================
   §10  MODE TOGGLE — Icon-Only Circle
   ============================================================ */

.byr-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;

  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.18);
  color: var(--color-text-primary, #F5F5F8);

  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  transition:
    background   200ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow   250ms cubic-bezier(0.4, 0, 0.2, 1),
    transform    150ms cubic-bezier(0.4, 0, 0.2, 1),
    width        0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1),
    height       0.400s 0.02s cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-mode-toggle:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
  transform: scale(1.08);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.30),
    0 0 20px rgba(255, 213, 79, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.byr-mode-toggle:focus-visible {
  outline: 2px solid var(--color-focus-ring, #FFD54F);
  outline-offset: 2px;
}

.byr-mode-toggle:active { transform: scale(0.96); }

.toggle-icon {
  position: absolute;
  flex-shrink: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #FFD54F;
}

.icon-moon {
  opacity: 0;
  transform: rotate(180deg) scale(0.4);
  color: #67E8F9;
}

.mode-light .icon-sun {
  opacity: 0;
  transform: rotate(-180deg) scale(0.4);
}

.mode-light .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.mode-light .byr-mode-toggle {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.mode-light .byr-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(147, 197, 253, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.byr-header.scrolled .byr-mode-toggle {
  width: 34px;
  height: 34px;
}

.byr-header.scrolled .toggle-icon {
  width: 16px;
  height: 16px;
}

@media (max-width: 1023px) {
  .byr-mode-toggle { display: none; }
}


/* ============================================================
   §11  HAMBURGER (Mobile)
   ============================================================ */

.byr-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: var(--space-2xs);
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
  .byr-hamburger { display: none; }
}

.byr-hamburger:hover {
  background: rgba(34, 211, 238, 0.10);
  border-color: rgba(34, 211, 238, 0.30);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.byr-hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary, #F5F5F8);
  border-radius: 2px;
  transition:
    transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity   150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-hamburger.active .byr-hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.byr-hamburger.active .byr-hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.byr-hamburger.active .byr-hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mode-light .byr-hamburger {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}
.mode-light .byr-hamburger-line { background: #FFFFFF; }


/* ============================================================
   §12  MOBILE MENU
   ============================================================ */

.byr-mobile-menu {
  position: fixed;
  top: 140px;
  left: var(--space-md, 16px);
  right: var(--space-md, 16px);
  z-index: calc(var(--z-header, 1000) - 1);
  border-radius: 24px;

  background: rgba(6, 10, 20, 0.90);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(34, 211, 238, 0.12);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(34, 211, 238, 0.04);

  max-height: calc(100dvh - 165px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 40px;

  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform   300ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity     300ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility  300ms;
}

.byr-mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.admin-bar .byr-mobile-menu {
  top: 172px;
  max-height: calc(100dvh - 200px);
}

.mode-light .byr-mobile-menu {
  background: rgba(0, 35, 75, 0.88);
  border-color: rgba(34, 211, 238, 0.18);
}

.byr-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: var(--space-sm);
}

.byr-mobile-menu-list li {
  border-bottom: 1px solid rgba(34, 211, 238, 0.06);
}

.byr-mobile-menu-list li:last-child { border-bottom: none; }

.byr-mobile-divider {
  height: 1px;
  background: rgba(34, 211, 238, 0.10);
  margin: var(--space-2xs) 0;
  border: none !important;
}

.byr-mobile-menu-list a {
  display: block;
  padding: var(--space-sm);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: var(--text-lg);
  border-radius: 8px;
  transition:
    color       150ms cubic-bezier(0.4, 0, 0.2, 1),
    background  150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.byr-mobile-menu-list a:hover,
.byr-mobile-menu-list a:focus {
  color: var(--color-accent-primary, #22D3EE);
  background: rgba(34, 211, 238, 0.07);
}


/* ============================================================
   §13  RESPONSIVE
   ============================================================ */

@media (max-width: 1023px) {
  .byr-header {
    left: 8px;
    right: 8px;
    padding: var(--space-2xs) var(--space-sm);
  }
  .byr-mobile-menu {
    left: 8px;
    right: 8px;
  }
  .byr-coin-3d { width: 49px; height: 49px; }   /* was 65px */
  .byr-header.scrolled .byr-coin-3d { width: 37px; height: 37px; }  /* was 50px */
}

@media (max-width: 600px) {
  .byr-coin-3d { width: 41px; height: 41px; }   /* was 55px */
  .byr-header.scrolled .byr-coin-3d { width: 30px; height: 30px; }  /* was 40px */
}


/* ============================================================
   §14  FIXED-POSITION TOGGLE OVERRIDE
   ============================================================ */

#byr-mode-toggle {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  z-index: auto !important;
}


/* ============================================================
   §15  FORCED COLORS (Windows High Contrast)
   ============================================================ */

@media (forced-colors: active) {
  .byr-header,
  .byr-mobile-menu,
  .byr-mode-toggle,
  .byr-menu-item,
  .byr-search {
    forced-color-adjust: auto;
    background: Canvas !important;
    color: CanvasText !important;
    border: 1px solid CanvasText !important;
    box-shadow: none !important;
    animation: none !important;
  }
  .byr-header::before,
  .byr-menu-item::after { content: none !important; }
  .byr-menu-item:focus-visible,
  .byr-mode-toggle:focus-visible {
    outline: 2px solid Highlight !important;
    outline-offset: 3px !important;
  }
}


/* ============================================================
   §16  REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .byr-header,
  .byr-header::before,
  .byr-menu-item::after,
  .byr-coin-3d { animation: none !important; }

  .byr-header,
  .byr-menu-item,
  .byr-mode-toggle,
  .byr-hamburger,
  .byr-search {
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }
}