*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0a0614;
  color: #fff;
  font-family: Poppins, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.gate {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.gate-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1848 0%, #1a0f2e 45%, #0d0818 100%);
}

.gate-slide {
  position: absolute;
  inset: 0;
  background-color: #120a22;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: blur(1px);
  transform: scale(1.01);
  opacity: 0;
  transition: opacity 1.1s ease-in-out;
  will-change: opacity;
}

.gate-slide.is-active {
  opacity: 1;
}

.gate-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 4, 18, 0.25) 0%, rgba(8, 4, 18, 0.45) 45%, rgba(8, 4, 18, 0.72) 100%);
  pointer-events: none;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(28, 18, 52, 0.96) 0%, rgba(16, 10, 32, 0.98) 100%);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 2px auto 16px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.sheet-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gate-lang {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gate-lang-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.gate-lang-btn.is-active {
  background: linear-gradient(135deg, #ff5ec4, #8b5cf6);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-heart {
  font-size: 20px;
  line-height: 1;
  color: #d946ef;
  text-shadow:
    0 0 10px rgba(217, 70, 239, 0.9),
    0 0 22px rgba(168, 85, 247, 0.7);
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, #f472b6, #c084fc, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.45));
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #f0abfc;
  background: rgba(88, 28, 135, 0.55);
  border: 1px solid rgba(216, 180, 254, 0.35);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.sheet-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.2px;
}

.sheet-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
}

.slider {
  position: relative;
  height: 56px;
  border-radius: 16px;
  background: rgba(12, 8, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  touch-action: none;
}

.slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 56px;
  background: linear-gradient(90deg, rgba(192, 132, 252, 0.28), rgba(244, 114, 182, 0.12));
  pointer-events: none;
}

.slider-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px 0 64px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.2px;
  pointer-events: none;
  transition: opacity 0.15s;
}

.slider-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #e879f9, #a855f7 55%, #7c3aed);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow:
    0 4px 16px rgba(168, 85, 247, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 2;
  touch-action: none;
}

.slider-knob:active {
  cursor: grabbing;
}

.slider-knob span {
  transform: translateY(-1px);
}

.sheet-warn {
  margin: 18px 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}

.warn-icon {
  color: #fbbf24;
  font-size: 13px;
  line-height: 1;
}

.panel--done[hidden] {
  display: none !important;
}

.pass-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  border-radius: 16px;
  background: rgba(18, 12, 36, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.pass-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(145deg, #f472b6, #a855f7);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.55);
}

.pass-copy {
  flex: 1;
  min-width: 0;
}

.pass-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.pass-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-count {
  flex: 0 0 auto;
  min-width: 36px;
  text-align: right;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pass-line {
  height: 1px;
  margin: 18px 0 14px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.pass-footer {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 480px) {
  .sheet {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 420px;
    transform: translateX(-50%);
    border-radius: 28px 28px 20px 20px;
    bottom: 16px;
  }
}
