:root {
  --efm-beta-h: 29px;
  --efm-accent-h: 3px;
  --efm-nav-h: 56px;
  --site-header-h: calc(var(--efm-beta-h) + var(--efm-accent-h) + var(--efm-nav-h));
  --efm-border: rgba(255, 255, 255, 0.1);
  --efm-card: rgba(17, 17, 22, 0.92);
  --efm-text: rgba(255, 255, 255, 0.94);
  --efm-muted: rgba(255, 255, 255, 0.48);
}

/* Beat Next.js globals (--site-header-h: 4.25rem) and Tailwind nav/beta padding */
html:root {
  --site-header-h: calc(var(--efm-beta-h) + var(--efm-accent-h) + var(--efm-nav-h));
}

#efm-site-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9998;
  background: #0a0a0d;
  display: flex;
  flex-direction: column;
  height: var(--site-header-h);
  min-height: var(--site-header-h);
  max-height: var(--site-header-h);
  overflow: visible;
}

.efm-beta-banner,
#efm-site-header-fixed > [role="status"]:first-child {
  flex: 0 0 var(--efm-beta-h) !important;
  height: var(--efm-beta-h) !important;
  min-height: var(--efm-beta-h) !important;
  max-height: var(--efm-beta-h) !important;
  width: 100%;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  background: linear-gradient(90deg, rgba(69, 26, 3, 0.9), #000, rgba(69, 26, 3, 0.9));
  padding: 0 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px !important;
  color: rgba(254, 243, 199, 0.9);
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.efm-beta-banner strong {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(252, 211, 77, 0.95);
}
.efm-beta-banner .dot {
  color: rgba(255, 255, 255, 0.35);
  margin: 0 8px;
}
.efm-beta-banner .sub {
  color: rgba(255, 255, 255, 0.6);
}
.efm-beta-banner .efm-beta-code {
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fcd34d;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .efm-beta-banner .dot { display: none; }
  .efm-beta-banner .sub { font-size: 10px; }
}

.site-header-accent {
  flex: 0 0 var(--efm-accent-h);
  height: var(--efm-accent-h);
  min-height: var(--efm-accent-h);
  width: 100%;
  background: linear-gradient(90deg, #ea580c, #f59e0b 45%, #fbbf24);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

#efm-site-header-fixed .site-header-nav {
  flex: 0 0 var(--efm-nav-h) !important;
  height: var(--efm-nav-h) !important;
  min-height: var(--efm-nav-h) !important;
  max-height: var(--efm-nav-h) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px !important;
  background: #0a0a0d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
#efm-site-header-fixed .site-header-nav::-webkit-scrollbar { display: none; }
#efm-site-header-fixed .site-header-nav img {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
}
@media (min-width: 640px) {
  #efm-site-header-fixed .site-header-nav { gap: 12px; padding: 0 24px; }
}
@media (min-width: 768px) {
  #efm-site-header-fixed .site-header-nav { padding: 0 32px; }
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #0a0a0d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
@media (min-width: 640px) {
  .site-header-nav { gap: 12px; padding: 0 24px; }
}
@media (min-width: 768px) {
  .site-header-nav { padding: 0 32px; }
}

.efm-header-logo {
  display: inline-flex;
  flex-shrink: 0;
  margin-right: 4px;
}
.efm-header-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.efm-header-cats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.efm-header-cats::-webkit-scrollbar { display: none; }

.efm-header-spacer {
  flex: 1;
  min-width: 16px;
}

.efm-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.efm-header-right::-webkit-scrollbar { display: none; }

.efm-nav-btn,
.efm-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111116;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.efm-nav-btn:hover,
.efm-nav-link:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.efm-nav-btn.is-active,
.efm-nav-link.is-active {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.efm-nav-link-discord {
  gap: 6px;
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.15);
  color: #eceeff !important;
}
.efm-nav-link-discord svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.efm-nav-link-discord:hover {
  border-color: rgba(88, 101, 242, 0.65);
  background: rgba(88, 101, 242, 0.28);
  color: #fff !important;
}

.efm-nav-btn svg,
.efm-nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}
.efm-nav-btn .chev {
  opacity: 0.6;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.efm-nav-btn.is-open .chev {
  transform: rotate(180deg);
  opacity: 0.9;
}

.efm-nav-btn {
  position: relative;
}
.efm-nav-btn .efm-nav-dot {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  opacity: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.85);
  transition:
    transform 0.36s cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity 0.28s ease;
}
.efm-nav-btn.is-open .efm-nav-dot {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}
.efm-nav-btn.is-open {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.06);
}

.efm-cat-wrap {
  position: relative;
  flex-shrink: 0;
}

#efm-mega-host {
  position: relative;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.efm-mega-panel {
  position: fixed;
  z-index: 9999;
  width: min(720px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  background: linear-gradient(180deg, rgba(24, 22, 18, 0.98), rgba(12, 11, 10, 0.98));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 40px rgba(234, 88, 12, 0.06);
  padding: 14px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -10px, 0) scale(0.985);
  transform-origin: top left;
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.45s;
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.efm-mega-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}
.efm-mega-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s;
}

.efm-mega-inner {
  transition:
    opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.efm-mega-inner.is-leaving,
.efm-mega-inner.is-entering {
  opacity: 0;
  transform: translate3d(0, 6px, 0);
}
.efm-mega-inner:not(.is-leaving):not(.is-entering) {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.efm-mega-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.efm-mega-grid.has-more {
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.85fr);
  gap: 16px;
}

.efm-mega-featured {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.efm-mega-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.efm-mega-feature:hover {
  background: rgba(251, 191, 36, 0.06);
}
.efm-mega-feature.is-active {
  background: rgba(251, 191, 36, 0.1);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.14);
}

.efm-mega-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  background: rgba(251, 191, 36, 0.05);
  color: #fcd34d;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.efm-mega-feature:hover .efm-mega-icon {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
  transform: scale(1.04);
}
.efm-mega-icon svg {
  width: 20px;
  height: 20px;
}

.efm-mega-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.efm-mega-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.efm-mega-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.efm-mega-desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.52);
}

.efm-mega-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.efm-mega-badge svg {
  width: 10px;
  height: 10px;
}
.efm-mega-badge--new {
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.38);
  color: #fcd34d;
}
.efm-mega-badge--pro {
  background: rgba(234, 88, 12, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fdba74;
}

.efm-mega-more {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 14px;
  min-width: 0;
}
.efm-mega-more-label {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.efm-mega-more-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.efm-mega-more-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.efm-mega-more-link:hover {
  background: rgba(251, 191, 36, 0.06);
  color: #fff;
}
.efm-mega-more-link.is-active {
  background: rgba(251, 191, 36, 0.1);
  color: #fff;
}
.efm-mega-more-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.72;
}
.efm-mega-more-icon svg {
  width: 16px;
  height: 16px;
}

.efm-mega-footer {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  text-decoration: none;
  transition: color 0.16s ease;
}
.efm-mega-footer:hover {
  color: #fcd34d;
}

@media (prefers-reduced-motion: reduce) {
  .efm-mega-panel,
  .efm-mega-feature,
  .efm-mega-more-link,
  .efm-mega-footer,
  .efm-mega-inner,
  .efm-nav-btn .efm-nav-dot,
  .efm-nav-btn .chev {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .efm-mega-grid.has-more {
    grid-template-columns: 1fr;
  }
  .efm-mega-more {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 0;
    padding-top: 12px;
  }
  .efm-mega-desc {
    display: none;
  }
}

/* legacy compact dropdown — unused */
.efm-dropdown {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141418;
  padding: 4px 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.efm-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.efm-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.efm-dropdown a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.efm-nav-pro {
  margin-left: 6px;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 4px;
  vertical-align: middle;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

.efm-glass {
  border-radius: 10px;
  border: 1px solid var(--efm-border);
  background: var(--efm-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.efm-mod-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fde68a;
  text-decoration: none;
  border-color: rgba(245, 158, 11, 0.3);
}
.efm-mod-link:hover {
  color: #fef3c7;
}

.efm-dash-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111116;
}
.efm-dash-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.efm-dash-icon:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}
.efm-dash-icon.is-active {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.efm-user-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2px 2px 2px 3px;
  max-width: min(260px, 44vw);
  min-height: 40px;
  height: auto;
  box-sizing: border-box;
  flex-shrink: 1;
  min-width: 0;
}

.efm-user-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
  padding: 5px 6px 5px 5px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.efm-user-identity:hover {
  background: rgba(255, 255, 255, 0.04);
}

.efm-user-card img,
.efm-user-avatar {
  width: 32px;
  height: 32px;
  margin-top: 0;
  border-radius: 999px;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.efm-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.35), rgba(234, 88, 12, 0.22));
  font-size: 12px;
  font-weight: 800;
  color: #fef3c7;
}

.efm-user-meta {
  min-width: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .efm-user-meta {
    display: flex;
  }
}

.efm-user-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  letter-spacing: -0.02em;
}

.efm-user-submeta {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-height: 0;
}

.efm-user-card .efm-credits-pill {
  padding: 2px 8px 2px 6px;
  font-size: 10px;
  line-height: 1.2;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.32);
}

.efm-user-card .efm-credits-pill svg {
  width: 10px;
  height: 10px;
}

.efm-user-card .efm-credits-label {
  font-size: 9px;
  opacity: 0.88;
}

@media (max-width: 767px) {
  .efm-user-meta {
    display: none !important;
  }
}

.efm-user-plan {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.38);
  background: none;
  border: none;
  line-height: 1;
}

.efm-user-plan::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.efm-user-submeta .efm-credits-pill:first-child:last-child + .efm-user-plan::before,
.efm-user-submeta .efm-user-plan:first-child::before {
  display: none;
}

.efm-user-plan--creator,
.efm-user-plan--pro,
.efm-user-plan--studio,
.efm-user-plan--admin,
.efm-user-plan--moderator {
  color: rgba(252, 211, 77, 0.82);
  background: none;
  border: none;
}

.efm-credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: #fcd34d !important;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.efm-credits-pill svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.9;
}

.efm-credits-num {
  font-variant-numeric: tabular-nums;
}

.efm-credits-label {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.82;
}

.efm-credits-pill--mobile {
  display: inline-flex;
  margin-left: 2px;
  align-self: center;
}

@media (min-width: 768px) {
  .efm-credits-pill--mobile {
    display: none !important;
  }
}

/* Hide duplicate credits pills if scripts ever double-inject */
#efm-site-header-fixed a.efm-credits-pill ~ a.efm-credits-pill {
  display: none !important;
}

.efm-credits-pill:hover {
  background: rgba(251, 191, 36, 0.24);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fff7cc !important;
}

.efm-user-credits {
  margin: 3px 0 0;
  line-height: 1;
}

.efm-header-credits-mobile {
  display: inline-flex;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .efm-header-credits-mobile {
    display: none;
  }
}

.efm-user-divider {
  width: 1px;
  align-self: stretch;
  flex-shrink: 0;
  margin: 6px 2px;
  background: rgba(255, 255, 255, 0.08);
}

.efm-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-right: 2px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.efm-logout:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
}

.efm-logout svg {
  width: 15px;
  height: 15px;
}

.efm-discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: #5865f2;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s;
}
.efm-discord-btn:hover { background: #4752c4; }
.efm-discord-btn:disabled { opacity: 0.6; cursor: wait; }
.efm-discord-btn svg { width: 18px; height: 18px; }

.efm-header-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fbbf24;
  border-radius: 999px;
  animation: efm-spin 0.7s linear infinite;
}
@keyframes efm-spin {
  to { transform: rotate(360deg); }
}

.site-header-spacer {
  height: var(--site-header-h);
  min-height: var(--site-header-h);
  flex-shrink: 0;
  pointer-events: none;
}

html { scroll-padding-top: var(--site-header-h); }

/* Subtle top progress on internal navigation */
#efm-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 10050;
  background: linear-gradient(90deg, #ea580c, #fbbf24);
  transform-origin: left center;
  transform: scaleX(0.15);
  animation: efm-nav-progress 0.65s ease-out forwards;
  pointer-events: none;
  opacity: 0.85;
}
#efm-nav-progress.is-done {
  opacity: 0;
  transition: opacity 0.22s ease;
}
@keyframes efm-nav-progress {
  to { transform: scaleX(0.92); }
}
.efm-header-logo img {
  display: block;
  height: 32px;
  width: auto;
  min-width: 120px;
}

.efm-auth-error-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 10060;
  max-width: min(92vw, 520px);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(69, 10, 10, 0.94);
  color: #fecaca;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.efm-auth-error-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
