/* D-HR · Bottom sheet and pop-ups */
/* ---------- bottom sheet ---------- */
.sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(14, 9, 23, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}
.sheet {
  width: 100%;
  max-width: 620px;
  max-height: 92dvh;
  overflow: auto;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(22px + var(--safe-b));
  animation: up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  overscroll-behavior: contain;
}
.sheet .grab {
  width: 44px;
  height: 5px;
  border-radius: 5px;
  background: var(--line);
  margin: 4px auto 12px;
}
.sheet .sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.sheet .sh h3 {
  font-size: 20px;
  color: var(--ink);
}
.sheet .x {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: var(--chip);
  font-size: 20px;
  line-height: 1;
}
.sheet form {
  display: grid;
  gap: 12px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.emrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.em {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card2);
  font-size: 20px;
}
.em.on {
  border-color: var(--mint);
  background: var(--mintbg);
}
@keyframes up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabh) + var(--safe-b) + 18px);
  transform: translateX(-50%);
  z-index: 60;
  background: #1e1130;
  color: #fff;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow2);
  max-width: calc(100% - 32px);
  text-align: center;
  animation: up2 0.25s ease;
}
@keyframes up2 {
  from {
    transform: translate(-50%, 16px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
.spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--chip);
  border-top-color: var(--mint);
  animation: rot 0.8s linear infinite;
  display: inline-block;
}
@keyframes rot {
  to {
    transform: rotate(360deg);
  }
}
.loading {
  display: grid;
  place-items: center;
  padding: 60px 0;
}
@media (min-width: 700px) {
  .hero {
    border-radius: 0 0 34px 34px;
  }
}
.row .tx b b,
.row .tx b span {
  display: inline;
}
