body:has(#main > .mako-login:not(.mako-login-reauth)) {
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 46%, #ede8fa 0, #f7f6fa 58%, #f8f8fa 100%);
  color: #242131;
  color-scheme: light;
}
body:has(#main > .mako-login:not(.mako-login-reauth)) > :is(.mako-header, .header) { display: none; }
body #main:has(> .mako-login:not(.mako-login-reauth)) {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  min-height: 100svh;
  margin: 0;
  padding: 32px 24px;
}
.mako-login {
  width: min(100%, 448px);
  margin: 0;
  padding: 32px 36px 24px;
  border: 1px solid #e8e5ef;
  border-radius: 28px;
  background: #fff;
  color: #242131;
  color-scheme: light;
  text-align: center;
  box-shadow: 0 24px 80px -28px #30234324, 0 3px 12px #30234304;
  animation: mako-login-arrive 280ms ease-out both;
}
.mako-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #242131;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.mako-login-brand img { display: block; width: 28px; height: 22px; }
.mako-login-hero { margin-top: 24px; }
.mako-login h1 {
  color: #242131;
  font-size: clamp(28px, 4vw, 32px);
  font-weight: 750;
  letter-spacing: -1px;
  line-height: 1.18;
}
.mako-login-hero > p { margin: 10px auto 0; color: #726b80; font-size: 14px; line-height: 1.55; max-width: 330px; }
.mako-login-hero > p strong { display: block; color: #5946d6; font-weight: 650; overflow-wrap: anywhere; }
.mako-login-orbit { position: relative; display: grid; place-items: center; width: 112px; height: 104px; margin: 0 auto 18px; }
.mako-login-orbit::before { content: ""; position: absolute; inset: 10px 8px 0; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #e9e2fa, #f8f5fc 65%, #fff 80%); }
.mako-login-mascot { position: relative; }
.mako-login-mascot .companion-mascot { display: block; width: 94px; height: 108px; object-fit: contain; }
.mako-login-symbol { display: block; color: #5946d6; font-size: 68px; font-weight: 750; }
.mako-login-orbit.working .mako-login-mascot { animation: mako-login-pulse 1.5s ease-in-out infinite; }
.mako-login-form { margin-top: 28px; text-align: left; }
.mako-login-form label { display: block; margin: 0 0 8px; color: #494352; font-size: 13px; font-weight: 650; line-height: 1.4; }
.mako-email-field { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 15px; border: 1px solid #e2dee9; border-radius: 13px; background: #faf9fc; transition: border-color 160ms, box-shadow 160ms; }
.mako-email-field:focus-within { border-color: #8671de; box-shadow: 0 0 0 3px #5946d612; }
.mako-email-field svg { width: 19px; height: 19px; color: #91869f; }
body .mako-login .mako-email-field input { width: 100%; min-width: 0; height: 52px; min-height: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; color: #242131; caret-color: #5946d6; font-size: 16px; box-shadow: none; }
.mako-email-field input:focus-visible { outline: none; }
.mako-email-field input::placeholder { color: #918a9b; opacity: 1; }
body .mako-login .mako-email-field input:-webkit-autofill { -webkit-text-fill-color: #242131; -webkit-box-shadow: 0 0 0 1000px #faf9fc inset; }
.mako-email-field + label { margin-top: 18px; }
body .mako-login .mako-login-form > input { height: 54px; padding: 12px 15px; border: 1px solid #e2dee9; border-radius: 13px; background: #faf9fc; color: #242131; font-size: 16px; }
.mako-login-form > input + label { margin-top: 18px; }
.mako-login-form > input:focus-visible { outline: none; border-color: #8671de; box-shadow: 0 0 0 3px #5946d612; }
.mako-password-field { padding-right: 5px; }
.mako-password-field button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border-radius: 9px; }
body .mako-login button.mako-login-primary { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; margin-top: 16px; padding: 13px 18px; border: 1px solid #5946d6; border-radius: 13px; background: #5946d6; color: #fff; font-size: 15px; font-weight: 750; box-shadow: 0 4px 10px #5946d614; transition: background 160ms, transform 160ms; }
.mako-login-primary svg { width: 18px; height: 18px; }
body .mako-login button.mako-login-primary:active { transform: scale(.985); }
.mako-login-error { margin: 12px 0 0; color: #a03b55; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.mako-login-status { margin: 14px 0 0; color: #726b80; font-size: 13px; line-height: 1.5; text-align: center; }
.mako-login-error:empty, .mako-login-status:empty { display: none; }
.mako-login-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 20px; color: #726b80; font-size: 12px; }
.mako-login-foot button, .mako-code-actions button { min-height: 44px; padding: 8px 0; border-radius: 6px; color: #655c73; font-size: 12px; font-weight: 600; }
.mako-login-foot .mako-login-method { color: #5946d6; }
.mako-login :is(button, input):focus-visible { outline: 3px solid #8671de; outline-offset: 3px; }
.mako-login .mako-email-field input:focus-visible { outline: none; }
.mako-code-form { margin-top: 28px; }
.mako-code-group { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.mako-code-group legend { width: 100%; margin-bottom: 10px; color: #655c73; font-size: 13px; text-align: center; }
body .mako-login .mako-code-group input { width: 100%; min-width: 0; height: 58px; padding: 0; border: 1px solid #e2dee9; border-radius: 12px; background: #faf9fc; color: #5946d6; caret-color: #5946d6; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; transition: border-color 160ms, box-shadow 160ms; }
.mako-login .mako-code-group input:focus { outline: none; border-color: #8671de; box-shadow: 0 0 0 3px #5946d612; }
.mako-code-group input[readonly] { opacity: .65; }
.mako-code-group.code-error { animation: mako-code-shake 250ms ease-out; }
.mako-code-form .error { text-align: center; }
.mako-code-hint { margin-top: 8px; color: #726b80; font-size: 12px; text-align: center; }
.mako-code-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }
.mako-code-actions button:disabled { opacity: 1; color: #918a9b; cursor: default; }
.mako-login-success { display: grid; place-items: center; width: 48px; height: 48px; margin: 24px auto 0; border-radius: 50%; background: #f0ebfc; color: #5946d6; }
.mako-login-success svg { width: 23px; height: 23px; stroke-width: 2; }
.mako-login-reauth { width: 100%; border: 0; border-radius: 20px; padding: 24px; box-shadow: none; }
.mako-login-reauth .mako-login-hero { margin-top: 0; }
.mako-login-reauth h1 { font-size: 26px; }
@keyframes mako-login-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mako-login-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
@keyframes mako-code-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (hover: hover) {
  body .mako-login button.mako-login-primary:hover { background: #4e3bc5; border-color: #4e3bc5; filter: none; transform: none; box-shadow: 0 4px 10px #5946d620; }
  .mako-login-foot button:hover, .mako-code-actions button:not(:disabled):hover { color: #4931b6; }
}
@media (max-width: 480px) {
  body #main:has(> .mako-login:not(.mako-login-reauth)) { padding: 24px 16px; }
  .mako-login { padding: 28px 24px 20px; border-radius: 24px; }
  .mako-login-foot { flex-direction: column; gap: 0; margin-top: 14px; }
  .mako-code-group { gap: 6px; }
  body .mako-login .mako-code-group input { height: 52px; font-size: 23px; border-radius: 10px; }
}
@media (max-width: 350px) {
  .mako-login { padding: 24px 18px 18px; }
  .mako-login-brand { font-size: 25px; }
  .mako-login h1 { font-size: 27px; }
  .mako-login-hero > p { font-size: 13px; }
  .mako-code-group { gap: 5px; }
  body .mako-login .mako-code-group input { height: 46px; font-size: 21px; }
}
@media (max-height: 700px) and (min-width: 481px) {
  body #main:has(> .mako-login:not(.mako-login-reauth)) { padding-top: 20px; padding-bottom: 20px; }
  .mako-login-hero { margin-top: 16px; }
  .mako-login-orbit { height: 82px; margin-bottom: 12px; }
  .mako-login-mascot .companion-mascot { width: 78px; height: 86px; }
}
@media (prefers-reduced-motion: reduce) { .mako-login, .mako-login *, .mako-login *::before { animation: none !important; transition: none !important; } }
