html:has(.login-body),
body.login-body {
  min-width: 0;
}

.login-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 18%, rgba(91, 61, 246, 0.14), transparent 34%),
    radial-gradient(circle at 78% 0%, rgba(255, 200, 61, 0.16), transparent 28%),
    radial-gradient(circle at 92% 78%, rgba(20, 200, 184, 0.1), transparent 30%),
    linear-gradient(135deg, #fbfaff 0%, #f3f0ff 46%, #f7f8fd 100%);
}

.login-body::before,
.login-body::after {
  display: none;
}

.entry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 3vw, 42px);
}

.entry-brand .brand-logo {
  width: clamp(112px, 12vw, 148px);
  height: auto;
}

.entry-live-link {
  min-height: 44px;
  padding: 0 22px;
  border: 1.5px solid rgba(91, 61, 246, 0.28);
  border-radius: 999px;
  color: var(--brand-purple-deep);
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
}

.entry-live-link:hover {
  background: var(--brand-lavender);
}

.entry-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: clamp(18px, 2.5vw, 40px);
  align-items: center;
  padding: 8px clamp(18px, 3vw, 48px) 36px;
}

.entry-hero {
  position: relative;
  min-width: 0;
  padding-top: 8px;
}

.entry-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin-bottom: clamp(18px, 2vw, 28px);
}

.entry-title {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 950;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.entry-title-accent {
  position: relative;
  display: inline-block;
  margin-left: 0.12em;
  color: var(--brand-purple);
  white-space: nowrap;
}

.entry-brush {
  position: absolute;
  left: 4%;
  right: -4%;
  bottom: -0.12em;
  width: 104%;
  height: 0.28em;
  color: var(--brand-yellow);
}

.entry-points {
  margin: 16px 0 8px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 800;
  color: var(--text-primary);
}

.entry-subtitle {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-secondary);
}

.entry-stage {
  position: relative;
  min-height: clamp(280px, 34vw, 430px);
  margin-top: 8px;
}

.device {
  position: absolute;
  filter: drop-shadow(0 24px 40px rgba(57, 39, 133, 0.18));
}

.device-bezel {
  overflow: hidden;
  background: #1f1b3a;
  border: 3px solid #2d2750;
}

.device-bezel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.device-monitor {
  left: 12%;
  top: 0;
  width: min(72%, 560px);
  z-index: 1;
}

.device-monitor .device-bezel {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.device-monitor .device-stand {
  width: 18%;
  height: 18px;
  margin: 0 auto;
  background: linear-gradient(180deg, #c9c6de, #9c98b8);
  border-radius: 0 0 8px 8px;
}

.device-laptop {
  left: 0;
  bottom: 4%;
  width: min(46%, 340px);
  z-index: 2;
}

.device-laptop .device-bezel {
  aspect-ratio: 16 / 10;
  border-radius: 12px 12px 4px 4px;
}

.device-laptop .device-base {
  height: 10px;
  margin: 0 -4%;
  background: linear-gradient(180deg, #d5d2e8, #a8a4c2);
  border-radius: 0 0 10px 10px;
}

.device-phone {
  left: 38%;
  bottom: 0;
  width: min(18%, 132px);
  z-index: 3;
}

.device-phone .device-bezel {
  aspect-ratio: 9 / 17;
  border-radius: 18px;
  border-width: 4px;
}

.device-phone .device-bezel img {
  object-fit: cover;
  object-position: top center;
}

.entry-note {
  position: absolute;
  z-index: 4;
  margin: 0;
  font-family: "Segoe Print", "Comic Sans MS", "PingFang SC", cursive;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 700;
  line-height: 1.45;
  color: rgba(91, 61, 246, 0.55);
  transform: rotate(-8deg);
  pointer-events: none;
}

.entry-note-left {
  left: 0;
  top: 42%;
}

.entry-note-right {
  right: 2%;
  bottom: 2%;
  text-align: right;
  transform: rotate(6deg);
}

.entry-spark {
  position: absolute;
  z-index: 4;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--brand-purple);
  opacity: 0.7;
  transform: rotate(28deg);
  pointer-events: none;
}

.entry-spark-one {
  top: 8%;
  right: 8%;
  width: 12px;
  height: 28px;
  background: linear-gradient(180deg, var(--brand-purple), #a08cff);
}

.entry-spark-two {
  top: 14%;
  right: 3%;
  width: 10px;
  height: 18px;
  background: var(--brand-yellow);
  transform: rotate(-18deg);
}

.login-card {
  width: min(100%, 420px);
  justify-self: end;
  padding: clamp(24px, 2.4vw, 36px) clamp(22px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(57, 39, 133, 0.12);
}

.login-title {
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 900;
  color: var(--text-primary);
}

.login-agreement {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.login-qr-frame {
  width: min(100%, 240px);
  height: 240px;
  flex: 0 0 240px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.login-qr-image {
  width: 100%;
  max-width: 208px;
  height: 208px;
  object-fit: contain;
}

.login-qr-placeholder {
  margin: 0;
  padding: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
  border: 1.5px dashed rgba(91, 61, 246, 0.28);
  border-radius: 14px;
  min-height: 184px;
  width: 100%;
  display: grid;
  place-items: center;
}

.login-qr-meta {
  width: min(100%, 240px);
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  align-content: center;
  gap: 2px;
}

.login-qr-state {
  margin: 0;
  text-align: center;
  color: var(--brand-teal-deep);
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
}

.login-countdown {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.login-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  cursor: pointer;
}

.login-check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--brand-purple);
  cursor: pointer;
}

.login-check a {
  color: var(--brand-purple-deep);
  font-weight: 800;
  text-decoration: none;
}

.login-check a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-error {
  margin: 0;
  padding: 12px 14px;
  color: var(--danger);
  background: #fdeef1;
  border: 1px solid rgba(195, 61, 80, 0.26);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1024px) {
  .entry-main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .login-card {
    justify-self: center;
    width: min(100%, 480px);
  }

  .entry-stage {
    min-height: 320px;
  }

  .device-monitor {
    width: min(78%, 520px);
    left: 10%;
  }

  .device-laptop {
    width: min(48%, 300px);
  }

  .device-phone {
    width: min(20%, 120px);
    left: 42%;
  }
}

@media (max-width: 640px) {
  .entry-title {
    font-size: 28px;
  }

  .entry-note,
  .entry-spark {
    display: none;
  }

  .entry-stage {
    min-height: 240px;
  }

  .device-monitor {
    width: 86%;
    left: 7%;
  }

  .device-laptop {
    width: 52%;
  }

  .device-phone {
    width: 22%;
  }

  .login-card {
    padding: 22px 18px;
  }
}
