button.menu-toggle {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  min-height: 34px;
}
.menu-toggle-compact, .menu-top-leading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-toggle-compact > .nx-icon { width: 25px; height: 25px; }
.side-menu {
  --menu-wave-bottom: calc(2% - 12px);
  position: fixed;
  inset: 0 auto 0 max(0px, calc((100vw - 480px) / 2));
  margin: 0;
  width: min(73.6vw, 353px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 0;
  color: #f6f6f7;
  border: 0;
  border-right: 1px solid #ffffff0a;
  border-radius: 0 21px 21px 0;
  background: radial-gradient(ellipse at 45% 8%, #131315 0, #0b0b0d 55%, #0a0a0b 100%);
  box-shadow: 10px 0 35px #0005;
}
.side-menu[open] { animation: drawer-enter .23s cubic-bezier(.2,.7,.3,1) both; }
.side-menu::backdrop {
  --menu-flame-start: calc(max(0px, (100vw - 480px) / 2) + min(73.6vw, 353px) - 21px);
  background-color: #0009;
  --menu-flame: none;
  background-image: var(--menu-flame), linear-gradient(90deg, transparent, #edf2ff24 18px, #edf2ff08 37px, transparent);
  background-position: var(--menu-flame-start) center;
  background-repeat: no-repeat;
  background-size: clamp(82px, 24vw, 138px) 100%, 58px 100%;
  backdrop-filter: blur(3px);
}
.side-menu[open].effects-ready::backdrop { --menu-flame: url("/assets/menu-flame.svg"); }
.side-menu::before, .menu-wave-sparks {
  content: "";
  position: absolute;
  pointer-events: none;
  bottom: calc(var(--menu-wave-bottom) - 12px);
  left: 0;
  width: 100%;
  aspect-ratio: 1000 / 563;
  mask-image: linear-gradient(transparent, #000 20%, #000 86%, transparent);
  mix-blend-mode: screen;
  opacity: .85;
}
.side-menu::before { background: url("/assets/menu-wave.webp") center / 100% 100% no-repeat; }
@keyframes drawer-enter { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.menu-content {
  position: relative;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 6.1vw, 27px) max(30px, env(safe-area-inset-bottom));
}
.menu-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: clamp(17px, 5.9vw, 27px); }
.menu-header .brand { font-size: clamp(15px, 4.7vw, 23px); letter-spacing: .12em; gap: 8px; }
.menu-header .brand .nx-icon { width: clamp(26px, 8vw, 38px); height: clamp(26px, 8vw, 38px); }
.menu-close {
  position: relative;
  display: block;
  width: clamp(31px, 8.5vw, 39px);
  height: clamp(31px, 8.5vw, 39px);
  border: 1px solid #343438;
  border-radius: 9px;
  background: linear-gradient(145deg, #141416, #0b0b0d);
  color: white;
}
.menu-close::before, .menu-close::after {
  content: "";
  position: absolute;
  left: 25%;
  top: calc(50% - 1px);
  width: 50%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
.menu-close::after { transform: rotate(-45deg); }
.menu-balance {
  padding: clamp(8px, 3.05vw, 14px);
  border: 1px solid #252527;
  border-radius: 16px;
  background: radial-gradient(ellipse at 80% 55%,#17171988,#10101155);
}
.menu-balance-label { display: flex; align-items: center; gap: 6px; color: #bababc; font-size: clamp(10px, 3.2vw, 15px); }
.menu-sparkle {
  flex: 0 0 19px;
  height: 16px;
  background: url("/assets/menu-stars.webp") center / contain no-repeat;
}
.menu-eye { border: 0; background: transparent; color: inherit; padding: 1px 2px; }
.menu-eye[aria-pressed="true"] { opacity: .55; }
.menu-amount { display: block; font-size: clamp(22px, 6.8vw, 33px); line-height: 1; margin: 9px 0 12px; letter-spacing: -.02em; }
.menu-wallet {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  padding: 4px 6px;
  border: 1px solid #38383b;
  border-radius: 10px;
  background: #0c0c0e88;
  font-size: clamp(9px, 3.18vw, 14px);
  line-height: 1.15;
}
.menu-wallet > span:nth-child(2) { flex: 1; }
.menu-wallet .nx-icon { width: 19px; height: 19px; }
.menu-wallet-connect { min-height: 37px; padding-block: 6px; padding-inline: 10px 12px; }
.menu-label { color: #b1b1b4; font-size: clamp(11px, 3.2vw, 15px); margin: 18px 0 9px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: clamp(10px, 4.6vw, 22px);
  padding: 7px clamp(12px, 4.15vw, 20px);
  margin-inline: -7px;
  margin-bottom: 2px;
  border-radius: 14px;
  min-height: clamp(33px, 9.8vw, 45px);
  font-size: clamp(12px, 3.8vw, 18px);
  line-height: 1.1;
}
.menu-item[aria-current="page"] { background: linear-gradient(125deg, #252527, #1c1c1e); }
.menu-item:hover, .menu-close:hover, .menu-wallet:hover { background-color: #242426; }
.menu-item .nx-icon, .menu-home-icon { width: clamp(17px, 5.2vw, 24px); height: clamp(17px, 5.2vw, 24px); }
.menu-home-icon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 2px; flex: none; }
.menu-home-icon i { border: 1.4px solid currentColor; border-radius: 2px; }
.menu-system-label { padding-top: 16px; border-top: 1px solid #4a4a4c; margin-top: 15px; }
.menu-arrow { margin-left: auto; width: 7px; height: 7px; border-top: 2px solid #a6a6a9; border-right: 2px solid #a6a6a9; transform: rotate(45deg); }
@media (max-height: 680px) {
  .menu-content { padding-top: 13px; }
  .menu-header { margin-bottom: 13px; }
  .menu-label { margin-top: 12px; }
  .menu-system-label { padding-top: 11px; }
  .side-menu { --menu-wave-bottom: -9px; }
  .side-menu::before, .menu-wave-sparks { opacity: .58; }
}
@media (prefers-reduced-motion: reduce) {
  .side-menu[open] { animation: none; }
}

.app .top { gap: 8px; }
.app .top .header-mark { width: clamp(22px, 7vw, 32px); height: clamp(22px, 7vw, 32px); }
.app .top .wallet { padding-block: 8px; font-size: 13px; }
.app .top .wallet .nx-icon { width: 18px; height: 18px; }
.app .top .back { font-size: 15px; }
.app .top .menu-top-leading { min-width: 0; flex: none; gap: clamp(5px, 2vw, 10px); }
.header-mark {
  display: block;
  width: clamp(20px, 6.3vw, 29px);
  height: clamp(20px, 6.3vw, 29px);
  object-fit: contain;
  flex: none;
}
.app .top .header-brand {
  gap: clamp(5px, 1.7vw, 8px);
  font-size: clamp(15px, 4.85vw, 23px);
}
button.header-menu-button {
  display: grid;
  place-items: center;
  width: clamp(32px, 9.5vw, 45px);
  min-height: clamp(30px, 8.6vw, 39px);
  flex: none;
  border: 1px solid #44464a;
  border-radius: 30px;
  background: linear-gradient(145deg, #171819, #0a0a0b);
}
.header-menu-button:hover { border-color: #92959b; }
.header-menu-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
  border: 1.5px solid #e8e9ec;
  border-radius: 3px;
}
.header-menu-icon::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 4px;
  border-left: 1.5px solid #e8e9ec;
}
@media (max-width: 375px) {
  .app .top { padding-inline: 12px; }
  .app .top .wallet { padding-inline: 7px; font-size: 11px; }
}

.menu-header .brand:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-header:focus { outline: none; }

.side-menu[open] { animation: drawer-enter .4s cubic-bezier(.22,1,.36,1) both; }
.side-menu[open].is-closing { animation: drawer-exit .4s cubic-bezier(.22,1,.36,1) both; }
@keyframes drawer-exit {
  from { transform: translateX(0); }
  to { transform: translateX(-104%); }
}
.side-menu[open]::backdrop { animation: drawer-backdrop .5s ease-out both; }
.side-menu[open].is-closing::backdrop { animation: drawer-backdrop-out .35s ease both; }
@keyframes drawer-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drawer-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
.side-menu[open] :is(.menu-header, .menu-balance, nav) {
  animation: drawer-content .4s cubic-bezier(.22,1,.36,1) .06s backwards;
}
@keyframes drawer-content {
  from { opacity: .42; translate: -8px 0; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-wave-sparks { display: none; }
  .side-menu::backdrop {
    background-image: linear-gradient(90deg, transparent, #edf2ff24 18px, #edf2ff08 37px, transparent);
    background-size: 58px 100%;
  }
  .side-menu[open], .side-menu[open]::backdrop,
  .side-menu[open] :is(.menu-header, .menu-balance, nav) { animation: none; }
}

.menu-node-row { position:relative; }
.menu-node-row > .menu-item { padding-right:44px; }
.menu-node-toggle {
  position:absolute;
  inset:0 0 0 auto;
  width:38px;
  border:0;
  border-radius:10px;
  background:none;
  color:#c7c8cb;
  cursor:pointer;
}
.menu-node-toggle::after {
  content:"";
  display:block;
  width:8px;
  height:8px;
  margin:auto;
  border:solid currentColor;
  border-width:0 1.5px 1.5px 0;
  transform:translateY(-2px) rotate(45deg);
  transition:transform .2s ease;
}
.menu-node-toggle[aria-expanded="true"]::after { transform:translateY(2px) rotate(225deg); }
.menu-node-toggle:hover { background:#ffffff12; }
.menu-node-submenu { margin-left:clamp(22px, 7vw, 34px); }
.menu-node-submenu .menu-item { min-height:34px; font-size:clamp(12px, 3.3vw, 16px); }
@media (prefers-reduced-motion: reduce) {
  .menu-node-toggle::after { transition:none; }
}

.app .top .wallet-profile {
  display: flex;
  min-width: 0;
  max-width: 44%;
  align-items: center;
  gap: 6px;
}
.app .top .wallet-profile [data-wallet-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app .top .wallet [hidden] { display: none; }
.header-profile-avatar {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 22%;
  object-fit: cover;
}
