.sehm-wrapper {
  position: relative;
  z-index: 999998;
}

.sehm-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--sehm-button-bg, rgba(15,23,42,0.92));
  color: var(--sehm-icon-color, #fff);
  border-radius: 16px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.sehm-toggle:hover,
.sehm-toggle:focus-visible,
.sehm-close:hover,
.sehm-close:focus-visible,
.sehm-link:hover,
.sehm-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.sehm-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}

.sehm-wrapper.is-open .sehm-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sehm-wrapper.is-open .sehm-toggle span:nth-child(2) {
  opacity: 0;
}
.sehm-wrapper.is-open .sehm-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sehm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 999998;
}

.sehm-wrapper.is-open .sehm-overlay {
  opacity: 1;
}

.sehm-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(var(--sehm-menu-width, 360px), calc(100vw - 20px));
  height: 100dvh;
  background: linear-gradient(180deg, var(--sehm-menu-bg, #0f172a) 0%, var(--sehm-panel-bg, #111827) 100%);
  color: var(--sehm-text-color, #cbd5e1);
  transform: translateX(110%);
  transition: transform .28s ease;
  box-shadow: -14px 0 40px rgba(0,0,0,0.28);
  z-index: 999999;
  overflow: hidden;
}

.sehm-wrapper.is-open .sehm-panel {
  transform: translateX(0);
}

.sehm-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.sehm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.sehm-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sehm-accent-color, #3b82f6);
  margin-bottom: 6px;
}

.sehm-title {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.1;
  font-weight: 700;
  color: var(--sehm-link-color, #fff);
}

.sehm-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--sehm-link-color, #fff);
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sehm-nav {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
}

.sehm-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: var(--sehm-link-color, #fff);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: clamp(16px, 2.5vw, 18px);
  font-weight: 600;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.sehm-link:hover,
.sehm-link:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.14);
}

.sehm-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--sehm-accent-color, #3b82f6);
}

body.sehm-lock-scroll {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 480px) {
  .sehm-toggle {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .sehm-panel {
    width: 100vw;
  }

  .sehm-panel-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sehm-toggle,
  .sehm-toggle span,
  .sehm-overlay,
  .sehm-panel,
  .sehm-link {
    transition: none !important;
  }

  html:focus-within {
    scroll-behavior: auto;
  }
}
