.app {
  transition: filter 0.35s ease, transform 0.35s ease;
}

body.is-gen-open {
  overflow: hidden;
}

body.is-gen-open .app {
  filter: blur(14px) brightness(0.38) saturate(0.7);
  transform: scale(0.97);
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s ease, transform 0.35s ease;
}

.gen-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.gen-overlay[hidden] {
  display: none !important;
}

.gen-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 50% 100%, rgba(255, 252, 0, 0.12), transparent 55%),
    rgba(0, 0, 0, 0.78);
}

.gen-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 96dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px calc(22px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(500px 220px at 50% -10%, rgba(255, 252, 0, 0.16), transparent 58%),
    linear-gradient(180deg, #1a1a1a 0%, #0c0c0c 100%);
  border: 1px solid rgba(255, 252, 0, 0.2);
  border-bottom: none;
  box-shadow:
    0 -20px 80px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(255, 252, 0, 0.08);
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.gen-overlay.is-open .gen-sheet {
  transform: translateY(0);
}

.gen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.gen-top__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gen-top__brand img {
  border-radius: 8px;
  flex-shrink: 0;
}

.gen-top__brand strong {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gen-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gen-live span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: genLive 1.2s ease-in-out infinite;
}

@keyframes genLive {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

.gen-top__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-switch--sheet {
  margin: 0;
  gap: 4px;
}

.lang-switch--sheet .lang-btn {
  width: 34px;
  height: 34px;
  font-size: 1.05rem;
  border-radius: 10px;
}

.gen-close {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.gen-steps {
  margin: 0 0 6px;
}

.gen-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 16px;
  border-radius: 16px;
  background: rgba(255, 252, 0, 0.07);
  border: 1px solid rgba(255, 252, 0, 0.2);
}

.gen-identity[hidden] {
  display: none !important;
}

.gen-identity__avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.gen-identity__avatar img,
.gen-identity__avatar span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
}

.gen-identity__avatar span {
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #111;
  font-weight: 800;
}

.gen-identity__avatar img.is-hidden,
.gen-identity__avatar span[hidden] {
  display: none !important;
}

.gen-identity__meta {
  flex: 1;
  min-width: 0;
}

.gen-identity__meta strong {
  display: block;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gen-identity__meta span {
  color: var(--yellow);
  font-size: 0.78rem;
}

.gen-identity__badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reveal-burst {
  position: relative;
  height: 0;
  pointer-events: none;
}

.reveal-burst span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  animation: burstOut 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal-burst span:nth-child(1) { --x: -70px; --y: -30px; animation-delay: 0.05s; }
.reveal-burst span:nth-child(2) { --x: 80px; --y: -20px; background: #ff2d95; animation-delay: 0.08s; }
.reveal-burst span:nth-child(3) { --x: -40px; --y: 50px; background: #c084fc; animation-delay: 0.12s; }
.reveal-burst span:nth-child(4) { --x: 55px; --y: 40px; animation-delay: 0.16s; }
.reveal-burst span:nth-child(5) { --x: 0px; --y: -55px; background: #fff; animation-delay: 0.1s; }
.reveal-burst span:nth-child(6) { --x: -90px; --y: 10px; animation-delay: 0.18s; }
.reveal-burst span:nth-child(7) { --x: 95px; --y: 8px; background: #ff2d95; animation-delay: 0.14s; }
.reveal-burst span:nth-child(8) { --x: 20px; --y: 60px; animation-delay: 0.2s; }
.reveal-burst span:nth-child(9) { --x: -20px; --y: -48px; background: #c084fc; animation-delay: 0.06s; }
.reveal-burst span:nth-child(10) { --x: 48px; --y: -48px; animation-delay: 0.22s; }

@keyframes burstOut {
  from {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.3);
  }
  40% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), var(--y)) scale(1.1);
  }
}

.reveal-kicker {
  margin: 8px 0 14px;
  text-align: center;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reveal-avatar {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
}

.reveal-avatar__glow {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 0, 0.55), transparent 70%);
  filter: blur(16px);
  animation: glow 2.2s ease-in-out infinite;
}

.reveal-avatar__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #ffe566, #fffc00, #ff9f0a, #fffc00, #ffe566);
  animation: spin 8s linear infinite;
}

.reveal-avatar__ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #111;
}

.reveal-avatar__img,
.reveal-avatar__fallback {
  position: relative;
  z-index: 1;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  object-fit: cover;
}

.reveal-avatar__fallback {
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #111;
  font-size: 3rem;
  font-weight: 800;
}

.reveal-avatar__img.is-hidden,
.reveal-avatar__fallback[hidden] {
  display: none !important;
}

.reveal-plus {
  position: absolute;
  right: 8px;
  bottom: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #111;
  font-weight: 900;
  font-size: 1.4rem;
  box-shadow: 0 6px 18px rgba(255, 252, 0, 0.4);
  border: 3px solid #111;
}

.reveal-name {
  margin: 0;
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.reveal-user {
  margin: 4px 0 8px;
  text-align: center;
  color: var(--yellow);
  font-size: 1.05rem;
  font-weight: 700;
}

.reveal-meta {
  margin: 0 0 18px;
  text-align: center;
  color: var(--faint);
  font-size: 0.85rem;
}

.reveal-q {
  margin: 0 0 4px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.reveal-sub {
  margin: 0 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.act-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.act-head__avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.act-head__avatar img,
.act-head__avatar span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
}

.act-head__avatar span {
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #111;
  font-weight: 800;
  font-size: 1.3rem;
}

.act-head__avatar img.is-hidden,
.act-head__avatar span[hidden] {
  display: none !important;
}

.act-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.act-user {
  margin: 2px 0 0;
  color: var(--yellow);
  font-size: 0.88rem;
  font-weight: 700;
}

.act-meter {
  margin-bottom: 10px;
}

.act-meter__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 252, 0, 0.16);
}

.act-meter__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8b800, var(--yellow), #fff6a0);
  box-shadow: 0 0 16px rgba(255, 252, 0, 0.55);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.act-meter__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.act-meter__row strong {
  color: var(--yellow);
  font-size: 1.05rem;
}

.act-queue {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--faint);
}

.act-queue b {
  color: var(--yellow);
}

.act-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.act-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: var(--faint);
  opacity: 0.35;
}

.act-item.is-visible {
  opacity: 1;
}

.act-item.is-active {
  color: var(--white);
}

.act-item.is-done {
  color: var(--muted);
}

.act-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.act-item.is-active .act-icon {
  background: var(--yellow-soft);
}

.act-item.is-done .act-icon {
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
}

.act-lock {
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 252, 0, 0.12), rgba(255, 47, 149, 0.08));
  border: 1px solid rgba(255, 252, 0, 0.28);
  animation: lockIn 0.45s cubic-bezier(0.22, 1, 0.36, 1), lockShake 0.45s 0.2s ease;
}

.act-lock[hidden] {
  display: none !important;
}

@keyframes lockIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lockShake {
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.act-lock__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 252, 0, 0.16);
  color: var(--yellow);
}

.act-lock h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.act-lock p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

#land-steps-fill {
  width: 20%;
}

@media (min-width: 640px) {
  .gen-overlay {
    align-items: center;
    padding: 24px 16px;
  }

  .gen-sheet {
    max-height: 90vh;
    border-radius: 28px;
    border-bottom: 1px solid rgba(255, 252, 0, 0.2);
    transform: translateY(24px) scale(0.96);
    opacity: 0;
  }

  .gen-overlay.is-open .gen-sheet {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-gen-open .app,
  .gen-sheet,
  .reveal-avatar__ring,
  .reveal-burst span,
  .act-lock {
    animation: none !important;
    transition: none !important;
    filter: none;
    transform: none;
  }
}
