:root {
  --bg: #000;
  --panel-text: #e7e9ea;
  --muted: #71767b;
  --line: #2f3336;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --card-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --auth-stage-height: 560px;
  --auth-frame-height: 470px;
  --auth-stage-gutter: 14px;
  --mobile-auth-nav-height: 78px;
  --glow-color-1: rgba(152, 251, 152, 0.4);
  --glow-color-2: rgba(152, 251, 152, 0.3);
  --glow-color-3: rgba(255, 105, 180, 0.4);
  --glow-color-4: rgba(255, 105, 180, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--panel-text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.starry-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: var(--initial-opacity, 0.45);
  animation: twinkle var(--twinkle-duration, 3s) ease-in-out infinite;
}

.star::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: inherit;
  filter: blur(1px);
}

.meteor {
  position: fixed;
  top: -120px;
  width: 2px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 216, 156, 0.08));
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.85));
  animation: meteorFall var(--meteor-duration, 1800ms) ease-in forwards;
  z-index: 1;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: var(--initial-opacity, 0.45);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@keyframes meteorFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(45deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--meteor-distance-x, -900px), var(--meteor-distance-y, 900px), 0) rotate(45deg);
    opacity: 0;
  }
}

body::-webkit-scrollbar {
  display: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.screen {
  min-height: 100dvh;
}

.splash-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: clamp(56px, 8vw, 92px);
  height: clamp(56px, 8vw, 92px);
}

.login-screen {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-layout {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1fr 460px;
  grid-template-rows: auto auto;
  gap: 32px;
  align-items: stretch;
}

.login-logo-side {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.login-logo {
  width: clamp(140px, 22vw, 290px);
  height: clamp(140px, 22vw, 290px);
  object-fit: contain;
}

.policy-shell {
  width: 100%;
  height: 800px;
  max-height: calc(100dvh - 40px);
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: visible;
}

.policy-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background:
    radial-gradient(circle at 22% 26%, rgba(29, 155, 240, 0.18), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(255, 196, 87, 0.14), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 42%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.policy-shell.is-reader-open {
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(16, 18, 23, 0.94), rgba(4, 5, 8, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  overflow: hidden;
}

.policy-shell.is-reader-open::before {
  opacity: 1;
}

.policy-brand,
.policy-reader {
  position: absolute;
  inset: 0;
}

.policy-brand {
  display: grid;
  place-items: center;
  z-index: 1;
}

.policy-brand-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 155, 240, 0.26), rgba(29, 155, 240, 0) 68%);
  filter: blur(10px);
}

.policy-brand-logo {
  position: relative;
  z-index: 1;
  width: clamp(180px, 24vw, 320px);
  height: clamp(180px, 24vw, 320px);
}

.policy-reader {
  display: flex;
  flex-direction: column;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(12, 14, 18, 0.98), rgba(8, 9, 12, 0.98));
}

.policy-brand[hidden],
.policy-reader[hidden] {
  display: none !important;
}

.policy-reader-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.policy-reader-heading h2 {
  margin: 0;
  font-size: 1.9rem;
  color: #fff;
  letter-spacing: -0.03em;
}

.policy-reader-meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.56);
}

.policy-reader-close {
  min-width: 82px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.policy-reader-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.policy-reader-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 24px 30px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.policy-reader-body::-webkit-scrollbar {
  width: 10px;
}

.policy-reader-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.policy-document h3 {
  margin: 0 0 14px;
  font-size: 1.18rem;
  color: #fff;
}

.policy-document h4 {
  margin: 24px 0 10px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.94);
}

.policy-document p,
.policy-document ul,
.policy-document ol {
  margin: 0 0 14px;
}

.policy-document ul,
.policy-document ol {
  padding-left: 22px;
}

.policy-document li {
  margin-bottom: 8px;
}

.policy-document strong {
  color: #fff;
}

.policy-document a {
  color: #7fc0ff;
}

.policy-document .doc-trigger-inline {
  font-weight: 600;
}

.login-form-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  min-height: 760px;
  padding: 48px 40px;
  transition: min-height 0.28s ease;
}

.login-form-side h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  background: linear-gradient(135deg, #fff 30%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.desktop-bottom-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: -6px;
}

/* Animated gradient glow behind form */
.form-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(152, 251, 152, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 105, 180, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(29, 155, 240, 0.1) 0%, transparent 60%);
  filter: blur(40px);
  animation: glowPulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { 
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.login-form-side h1 {
  margin: 0 0 8px;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.24s ease, transform 0.24s ease, margin 0.24s ease;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-list-shell,
.auth-form-stage {
  width: 100%;
}

.auth-list-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
}

.auth-form-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.auth-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
  margin-top: 18px;
  padding: 0 var(--auth-stage-gutter);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.auth-list.visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding: 16px 28px 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  cursor: pointer;
  transition:
    opacity 0.6s ease,
    transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    border-color 0.25s ease;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--panel-text);
  position: relative;
  overflow: hidden;
  transform-origin: left center;
}

.auth-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transition: left 0.5s ease;
}

.auth-item:hover::before {
  left: 100%;
}

.auth-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.auth-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.google-icon { background: #fff; }
.apple-icon { background: #000; }
.github-icon { background: #333; }
.x-icon { background: #000; }

.auth-text {
  flex: 1;
  text-align: left;
}

.auth-arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.auth-item:hover .auth-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.auth-list.is-switching {
  pointer-events: none;
}

.auth-list.is-switching .auth-item {
  opacity: 0;
  transform: translateX(128%) scaleX(0.88);
}

.auth-list.is-switching .auth-item:nth-child(1) {
  transition-delay: 0ms;
}

.auth-list.is-switching .auth-item:nth-child(2) {
  transition-delay: 30ms;
}

.auth-list.is-switching .auth-item:nth-child(3) {
  transition-delay: 60ms;
}

.auth-list.is-switching .auth-item:nth-child(4) {
  transition-delay: 150ms;
}

.auth-list.is-switching .auth-item.is-selected {
  transform: translateX(138%) scaleX(0.82);
}

.mobile-auth-nav {
  display: none;
}

.mobile-auth-tab {
  font-family: inherit;
}

/* Terms */
.terms {
  margin: 18px 0 0;
  padding-top: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
  transition: opacity 0.24s ease, transform 0.24s ease, margin 0.24s ease;
}

.terms a {
  color: var(--accent);
}

.terms a:hover {
  text-decoration: underline;
}

.login-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 0;
}

.login-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    color 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    transform 0.24s ease;
}

.login-socials a:hover {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transform: translateY(-2px);
}

.butterfly-glow-flutter {
  animation: butterflyGlowFlutter 2s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes butterflyGlowFlutter {
  0%,
  100% {
    transform: scaleX(1);
    filter:
      drop-shadow(0 0 4px var(--glow-color-1))
      drop-shadow(0 0 8px var(--glow-color-2))
      drop-shadow(0 0 24px var(--glow-color-3));
  }
  50% {
    transform: scaleX(1.1);
    filter:
      drop-shadow(0 0 6px var(--glow-color-1))
      drop-shadow(0 0 12px var(--glow-color-2))
      drop-shadow(0 0 36px var(--glow-color-3))
      drop-shadow(0 0 48px var(--glow-color-4));
  }
}

/* Auth forms */
.auth-form-shell {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: var(--auth-stage-height);
  padding: 0 var(--auth-stage-gutter);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.auth-form-shell.active {
  display: flex;
}

.auth-form-shell.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-form-side.layout-list .terms {
  margin-top: 14px;
}

.login-form-side.layout-form .auth-list-shell,
.login-form-side.layout-form .subtitle,
.login-form-side.layout-form .terms {
  display: none;
}

.login-form-side.layout-form .auth-form-shell {
  min-height: auto;
  padding-top: 0;
}

.login-form-side.layout-form .auth-form-frame {
  min-height: 430px;
}

.auth-form-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: var(--auth-frame-height);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  overflow: hidden;
  transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.auth-form-shell[data-provider="google"] .auth-form-frame {
  color: #f7f8fb;
}

.auth-form-shell[data-provider="apple"] .auth-form-frame {
  color: #f7f8fb;
}

.auth-form-shell[data-provider="x"] .auth-form-frame {
  color: #fff;
}

.auth-form-shell[data-provider="github"] .auth-form-frame {
  color: #f7f8fb;
}

.auth-form {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  padding: 28px;
}

.auth-form.active {
  display: flex;
}

.auth-form-footer {
  display: flex;
  justify-content: center;
  padding: 0 28px 18px;
}

.auth-form-apple,
.auth-form-x {
  gap: 0;
  text-align: center;
}

.provider-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.provider-brand .auth-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.panel-heading {
  margin-bottom: 20px;
}

.compact-heading {
  margin-bottom: 18px;
}

.auth-form-apple .compact-heading p,
.auth-form-x .compact-heading p {
  margin-top: 6px;
  font-size: 13px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.panel-heading p {
  margin: 8px 0 0;
  color: inherit;
  opacity: 0.74;
  font-size: 14px;
  line-height: 1.45;
}

.centered-heading {
  text-align: center;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
}

.field-group input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-group input:focus {
  outline: none;
}

.light-field input {
  color: #f7f8fb;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.light-field input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.dark-field input {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.dark-field input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.github-field input {
  color: #f7f8fb;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 14px;
}

.github-field input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-link,
.text-action,
.mini-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.panel-link,
.text-action {
  color: rgba(255, 255, 255, 0.88);
}

.dark-link {
  color: rgba(255, 255, 255, 0.88);
}

.x-link {
  color: rgba(255, 255, 255, 0.88);
}

.mini-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.panel-note,
.panel-meta,
.provider-footnote {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.panel-note {
  color: rgba(255, 255, 255, 0.62);
}

.provider-footnote {
  color: rgba(255, 255, 255, 0.62);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.split-actions {
  justify-content: space-between;
  margin-top: 28px;
}

.submit-btn,
.secondary-btn,
.social-pick,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.submit-btn {
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(29, 155, 240, 0.3);
}

.google-submit {
  width: auto;
  min-width: 96px;
  background: #0b57d0;
  color: #fff;
}

.google-submit:hover {
  background: #0842a0;
}

.x-submit {
  background: rgba(255, 255, 255, 0.9);
  color: #0f1419;
}

.x-submit:hover {
  background: #d7dbdc;
  box-shadow: none;
}

.github-submit {
  border-radius: 8px;
  background: #1f883d;
  min-height: 40px;
}

.github-submit:hover {
  background: #1a7f37;
}

.secondary-btn {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
}

.secondary-btn:hover {
  transform: translateY(-1px);
}

.github-passkey {
  margin-top: 10px;
  border-radius: 8px;
  color: #f7f8fb;
  border-color: rgba(255, 255, 255, 0.16);
  min-height: 40px;
}

.github-passkey:hover {
  background: rgba(255, 255, 255, 0.08);
}

.social-pick {
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 600;
}

.light-pick {
  background: #fff;
  color: #0f1419;
}

.light-pick:hover {
  background: rgba(255, 255, 255, 0.9);
}

.apple-pick {
  margin-top: -2px;
}

.icon-btn {
  min-width: 52px;
  min-height: 52px;
  border: none;
  border-radius: 16px;
  font-size: 20px;
  color: #fff;
  background: #0071e3;
}

.icon-btn:hover {
  background: #0059b2;
  transform: translateX(2px);
}

.apple-mark,
.github-mark,
.x-mark {
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}

.apple-mark {
  color: #f7f8fb;
}

.github-mark {
  color: #f7f8fb;
}

.x-mark {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.apple-entry {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.compact-entry {
  margin-bottom: 8px;
}

.apple-entry input {
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f7f8fb;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
}

.apple-entry input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.compact-field {
  margin-bottom: 18px;
}

.apple-submit {
  margin-top: 10px;
  background: #1d1d1f;
}

.apple-submit:hover {
  background: #2c2c2e;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto;
  padding: 8px 4px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--panel-text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
  background: transparent;
  transform: translateY(-1px);
}

.auth-form-back-btn {
  color: var(--muted);
}

.auth-form-back-btn:hover {
  color: var(--panel-text);
}

.panel-meta {
  color: inherit;
  opacity: 0.78;
  text-align: center;
}

.centered-link {
  justify-content: center;
}

.panel-meta a {
  color: #1d9bf0;
}

.auth-form-github .panel-heading {
  margin-bottom: 16px;
}

.auth-form-github .field-group {
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.auth-form-github .panel-meta {
  font-size: 12px;
}

@media (max-width: 900px) {
  html,
  body {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: center;
  }

  .policy-shell {
    height: min(520px, calc(100dvh - 32px));
    max-height: none;
    border-radius: 24px;
  }

  .policy-reader-top,
  .policy-reader-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .policy-reader-heading h2 {
    font-size: 1.5rem;
  }

  .login-logo {
    width: clamp(100px, 28vw, 180px);
    height: clamp(100px, 28vw, 180px);
  }

  .login-form-side {
    width: 100%;
    max-width: 400px;
    min-height: auto;
    padding: 24px 20px calc(var(--mobile-auth-nav-height) + 88px);
  }

  .login-form-side h1 {
    font-size: 2rem;
  }

  .auth-stage {
    min-height: auto;
    overflow: visible;
  }

  .auth-form-frame {
    min-height: auto;
    border-radius: 24px;
  }

  .auth-form {
    min-height: auto;
    padding: 24px 20px;
  }

  .panel-heading h2 {
    font-size: 1.7rem;
  }

  .split-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .google-submit {
    width: 100%;
  }

  .auth-list {
    display: none !important;
  }

  .auth-form-shell {
    display: flex;
    min-height: auto;
    padding: 0;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .auth-form-shell.active,
  .auth-form-shell.visible {
    display: flex;
    opacity: 1;
    transform: none;
  }

  .auth-form-back-btn {
    display: none;
  }

  .login-form-side.layout-form h1,
  .login-form-side.layout-form .subtitle,
  .login-form-side.layout-form .terms {
    display: block;
  }

  .login-form-side.layout-form .auth-form-shell {
    padding-top: 0;
  }

  .login-form-side.layout-form .auth-form-frame {
    min-height: auto;
  }

  .mobile-auth-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(8, 10, 16, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
  }

  .mobile-auth-tab {
    min-height: 54px;
    padding: 10px 6px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
  }

  .mobile-auth-tab.is-active {
    background: linear-gradient(180deg, rgba(29, 155, 240, 0.32), rgba(29, 155, 240, 0.18));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(125, 196, 255, 0.18);
  }

  .login-socials {
    margin-top: 24px;
  }
}
