.auth-pending .top,
.signed-out .top {
  display:none;
}

.signed-out main {
  position:relative;
  isolation:isolate;
  display:grid;
  align-content:center;
  max-width:none;
  min-height:100svh;
  padding:clamp(20px,4svh,48px) clamp(24px,4vw,56px);
  overflow:clip;
  background:linear-gradient(118deg,#e8effb,#f7f9ff 53%,#e1eaff);
}

.signed-out #alert,
.auth-frame {
  width:min(100%,1188px);
}

#login::before, #auth-landscape {position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#login::before {
  content:"";z-index:-2;
  background:linear-gradient(var(--auth-wash,transparent),var(--auth-wash,transparent)),var(--auth-photo,none) center var(--auth-focus,50%)/cover no-repeat;
}
#login[data-scene=meadow] {--auth-photo:url("/auth-art/wallpaper/v3/meadow-1600.webp")}
#login[data-scene=pond] {--auth-photo:url("/auth-art/wallpaper/v3/pond-1600.webp")}
#login[data-scene=roost] {--auth-photo:url("/auth-art/wallpaper/v3/roost-1600.webp")}
#login[data-season=spring] {--auth-season-light:radial-gradient(ellipse at 3% 87%,#a6e2b72a,transparent 31%)}
#login[data-season=summer] {--auth-wash:#ffd88314;--auth-season-light:radial-gradient(ellipse at 92% 0%,#ffdda63d,transparent 42%)}
#login[data-season=autumn] {--auth-wash:#d0844b29;--auth-season-light:radial-gradient(ellipse at 8% 28%,#ffb16c42,transparent 43%)}
#login[data-season=winter] {--auth-wash:#c1dcff26;--auth-season-light:linear-gradient(22deg,#e3effc38,transparent 41%)}
#login[data-phase=dusk][data-scene=roost] {--auth-dusk:#d691762e}
#auth-landscape {z-index:-1;overflow:hidden}
#auth-wallpaper {
  position:absolute;inset:0;z-index:1;width:100%;height:100%;pointer-events:none;
  object-fit:cover;object-position:center var(--auth-focus,50%);opacity:0;transition:opacity .32s ease;
}
#login[data-wallpaper=video] #auth-wallpaper {opacity:1}
#login[data-wallpaper=video] #auth-landscape::after {
  content:"";position:absolute;inset:0;z-index:1;
  background:var(--auth-season-light,none),linear-gradient(var(--auth-dusk,transparent),transparent),var(--auth-wash,transparent);
  opacity:.63;
}
#login[data-season=winter] #auth-landscape::before {
  content:"";position:absolute;inset:0;z-index:2;opacity:.34;
  background:
    radial-gradient(circle at 21px 38px,#eff7ffb7 0 1px,transparent 2.8px) 0 0/173px 193px,
    radial-gradient(circle at 129px 109px,#e6f0ffb0 0 1.5px,transparent 4px) 0 0/271px 223px;
  animation:auth-snow-drift 27s linear infinite;
}
@keyframes auth-snow-drift {to {background-position:173px 193px,271px 223px}}
@media(prefers-reduced-motion:reduce){
  #login[data-season=winter] #auth-landscape::before {animation:none}
}
.auth-video-ripple {
  position:absolute;z-index:2;width:clamp(65px,13vw,175px);aspect-ratio:3.2;
  border:1px solid #d7f5ffb8;box-shadow:0 0 10px #caeafa4d,inset 0 0 9px #d9f9ff4f;
  border-radius:50%;translate:-50% -50%;pointer-events:none;
}
[data-theme=dark] #login::before,[data-theme=dark] #auth-landscape {filter:brightness(.76)}

.auth-methods {display:flex;gap:6px;width:max-content;max-width:100%;padding:3px;margin:16px 0 -8px;background:var(--auth-field);border:1px solid var(--auth-border);border-radius:8px}
.auth-methods button {min-height:44px;padding:0 14px;border-radius:5px;color:var(--auth-muted)}
.auth-methods button[aria-pressed=true] {background:var(--auth-paper);color:var(--auth-ink);font-weight:650;box-shadow:0 1px 3px #101b3920}
.sms-line {display:flex;align-items:center;gap:8px}
.sms-line input {flex:1;min-width:0}
.sms-line button,.sms-prefix {flex:none;white-space:nowrap}
.sms-prefix {color:var(--auth-muted);padding-inline-end:3px;font-variant-numeric:tabular-nums}

.signed-out #alert {
  margin:0 auto 12px;
}

.auth-frame {
  position:relative;
  isolation:isolate;
  margin-inline:auto;
}

@media(min-width:761px) {
  .auth-frame {width:min(100%,clamp(840px,69vw,1120px))}
}

.auth-frame::before {
  content:"";
  position:absolute;
  inset:-6px;
  z-index:-1;
  pointer-events:none;
  border-radius:22px;
  background:#89ade9 url("/offeru-felt-edge.webp") repeat;
  background-blend-mode:luminosity;
  background-size:210px 210px;
  box-shadow:0 8px 20px rgba(26,49,92,.17);
  filter:blur(.6px);
}

[data-theme=dark] .auth-frame::before {
  filter:brightness(.48) saturate(.8) blur(.6px);
  box-shadow:0 8px 20px #0a1227;
}

.auth-shell {
  --auth-ink:#14203a;
  --auth-muted:#4a5c7c;
  --auth-border:#b8c8e1;
  --auth-paper:#fff;
  --auth-field:#f8faff;
  --auth-mount:#dce8fb;
  --auth-spine:#233e87;
  --auth-primary:#2a4cc5;
  --auth-primary-hover:#223ba5;
  --auth-primary-ink:#fff;

  /* Six columns per side within the centered desktop frame. */
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-inline:auto;
  overflow:hidden;
  border:1px solid var(--auth-border);
  border-radius:16px;
  color:var(--auth-ink);
  background:var(--auth-paper);
  font:400 16px/1.62 var(--offeru-font);
}

.signed-out .auth-shell {
  box-shadow:0 3px 7px rgba(25,46,83,.045),0 20px 48px -22px rgba(25,46,83,.26);
}

[data-theme=dark] .auth-shell {
  --auth-ink:#ecf0fa;
  --auth-muted:#b6c2d8;
  --auth-border:#526078;
  --auth-paper:#1b2331;
  --auth-field:#222e41;
  --auth-mount:#344a6f;
  --auth-spine:#172c57;
  --auth-primary:#c1d0ff;
  --auth-primary-hover:#d8e1ff;
  --auth-primary-ink:#1b2745;
}

.auth-identity {
  position:relative;
  display:grid;
  place-items:center;
  margin:0;
  padding:clamp(29px,min(5vw,8svh),73px) clamp(27px,4.2vw,62px);
  border-inline-end:1px solid var(--auth-border);
  background:var(--auth-mount);
}

.auth-identity::before {
  position:absolute;
  inset-block:0;
  inset-inline-start:0;
  width:34%;
  background:var(--auth-spine);
  content:"";
}

.flight-card {position:relative;width:min(100%,438px);border-radius:10px;border:1px solid #566f9a;overflow:hidden;background:#1c3158;color:#fff}
.flight-art {position:relative;isolation:isolate;background:#afc7f1}
.flight-art canvas {display:block;width:100%;height:auto;aspect-ratio:540/424}
.flight-art canvas[data-game=playing] {touch-action:none;cursor:pointer}
.flight-art canvas:focus-visible {outline:2px solid white;outline-offset:-5px}
.flight-particles {position:absolute;inset:0;overflow:hidden;pointer-events:none;--particle:#ffe2df;--particle-radius:62% 15%}
.flight-particles i {position:absolute;top:10%;left:22%;width:7px;height:5px;background:var(--particle);border-radius:var(--particle-radius);animation:flight-drift 13s linear infinite both}
.flight-particles i:nth-child(2) {top:4%;left:49%;animation-delay:-5s}
.flight-particles i:nth-child(3) {top:14%;left:82%;animation-delay:-9s}
#login[data-season=summer] .flight-particles {--particle:#f8f9fb;--particle-radius:60%}
#login[data-season=autumn] .flight-particles {--particle:#ffdfad}
#login[data-season=winter] .flight-particles {--particle:#fff;--particle-radius:50%}
@keyframes flight-drift {from{translate:-13px -16px;opacity:0} 17%,80%{opacity:.85} to{translate:35px 94px;opacity:0}}
.flight-score {position:absolute;inset:12px 12px auto auto;padding:5px 9px;border-radius:4px;background:#142950;color:#fff;font-size:13px;font-variant-numeric:tabular-nums}
.flight-bonus {position:absolute;top:48px;left:50%;translate:-50%;max-width:calc(100% - 24px);width:max-content;padding:8px 13px;border-radius:20px;background:#fff0c6;color:#633b1e;box-shadow:0 4px 16px #1e305c33;font-size:13px;font-weight:700;pointer-events:none}
.flight-bonus::before {content:'✦';margin-right:6px;color:#955117}
@media(prefers-reduced-motion:no-preference){
  .flight-bonus:not([hidden]) {animation:flight-celebrate .38s ease-out both}
  @keyframes flight-celebrate {from{opacity:0;transform:translateY(8px) scale(.9)} to{opacity:1;transform:none}}
}
.flight-panel {position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px}
.flight-panel h2 {margin:0;font-size:19px;font-weight:650}
.flight-panel p {margin:2px 0;color:#d4e1fc;font-size:13px}
.flight-panel #flight-status {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.flight-actions {display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.flight-actions button {min-height:44px;white-space:nowrap;border-radius:6px;padding:0 12px;font-size:14px}
.flight-control {background:#f6f9ff;color:#172c51;border:1px solid #f6f9ff;font-weight:650}
#login[data-phase=dawn] .auth-identity {--auth-mount:#e7eafa;--auth-spine:#3f568e}
#login[data-phase=dusk] .auth-identity {--auth-mount:#d5dff6;--auth-spine:#554e85}
#login[data-phase=night] .auth-identity {--auth-mount:#263e6c;--auth-spine:#152d55}
.auth-identity {transition:background-color .5s ease-out}
.auth-identity::before {transition:background-color .5s ease-out}

.auth-panel {
  display:grid;
  place-items:center;
  padding:clamp(34px,4.25vw,53px) clamp(32px,4.5vw,68px);
}

.auth-content {
  width:min(100%,388px);
}

.auth-brand {
  gap:10px;
  min-height:44px;
  margin-bottom:20px;
}

.auth-brand .brand-type {
  width:114px;
}

.auth-panel h1 {
  font-size:clamp(32px,3.15vw,46px);
  font-weight:625;
  line-height:1.2;
  letter-spacing:.015em;
  text-wrap:balance;
}

@font-face {
  font-family:"Offeru Play";
  src:url("/vendor/offeru-fonts/zcool-kuaile-login.woff2") format("woff2");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
.auth-panel h1.auth-quip {
  display:grid;
  justify-items:start;
  gap:3px;
  color:var(--ink);
  font-family:"Offeru Play","Microsoft YaHei","Noto Sans SC",sans-serif;
  font-size:clamp(25px,2.65vw,34px);
  font-weight:400;
  line-height:1.13;
  letter-spacing:-.02em;
}
.auth-quip span:nth-child(2) {font-size:.88em}
.auth-quip strong {
  display:inline-block;
  margin-inline-end:.18em;
  color:var(--accent);
  font-weight:400;
  transform:rotate(-5deg);
  text-decoration:underline wavy;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.auth-panel .quiet {
  color:var(--auth-muted);
}

#auth-hint:not(:empty) {
  margin-top:8px;
}

#auth-form {
  margin-top:25px;
}

.auth-panel label {
  display:block;
  margin-top:16px;
  font-size:14px;
  font-weight:600;
}

.auth-panel input:not([type=checkbox]) {
  display:block;
  width:100%;
  min-height:49px;
  margin-top:8px;
  padding:10px 13px;
  border:1px solid var(--auth-border);
  border-radius:8px;
  background:var(--auth-field);
  color:var(--auth-ink);
  font-size:16px;
}

.auth-panel input:hover:enabled {
  border-color:var(--auth-muted);
}

.password-line {
  position:relative;
  display:flex;
}

.password-line input {
  padding-right:66px!important;
}

.password-line button {
  position:absolute;
  inset-inline-end:3px;
  top:9px;
  min-width:53px;
  min-height:47px;
  border-radius:6px;
  font-size:13px;
  font-weight:500;
}

#password-hint {
  margin-top:7px;
  font-size:13px;
}

.auth-options,
.auth-switch {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

.auth-options {
  justify-content:space-between;
  margin-top:9px;
}

.auth-options label {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  margin:0;
  font-weight:400;
}

.auth-options input {
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--auth-primary);
}

.auth-panel .textbtn {
  color:var(--auth-ink);
  font-size:14px;
  text-decoration:underline;
  text-underline-offset:4px;
}

#auth-msg:not(:empty) {
  margin-top:10px;
}

.auth-human {
  margin-top:12px;
  --altcha-color-base:var(--auth-field);
  --altcha-color-base-content:var(--auth-ink);
  --altcha-color-neutral:var(--auth-border);
  --altcha-color-primary:var(--auth-primary);
}

.auth-human altcha-widget {
  display:block;
}

.human-status {
  font-size:14px;
}

#admin-nav {
  padding:5px;
  font-size:14px;
}

.auth-panel #auth-submit {
  width:100%;
  min-height:51px;
  margin-top:11px;
  border:1px solid transparent;
  border-radius:8px;
  background:var(--auth-primary);
  color:var(--auth-primary-ink);
  font-size:16px;
  font-weight:700;
}

.auth-panel #auth-submit:hover:enabled {
  background:var(--auth-primary-hover);
}

.auth-switch {
  margin-top:17px;
  padding-top:6px;
  border-top:1px solid var(--auth-border);
}

@media(min-width:761px) and (max-height:780px) {
  .auth-panel {
    padding-block:36px;
  }
}

@media(max-width:760px) {
  .signed-out main {
    padding:132px 16px 16px;
  }
  #login::before, #auth-landscape {height:132px}
  #login {--auth-focus:64%}
  #login[data-scene=meadow] {--auth-photo:url("/auth-art/wallpaper/v3/meadow-720.webp")}
  #login[data-scene=pond] {--auth-photo:url("/auth-art/wallpaper/v3/pond-720.webp")}
  #login[data-scene=roost] {--auth-photo:url("/auth-art/wallpaper/v3/roost-720.webp")}

  .auth-frame {
    max-width:480px;
  }

  .auth-frame::before {
    inset:-4px;
    border-radius:20px;
  }

  .auth-shell {
    grid-template-columns:minmax(0,1fr);
  }

  .auth-identity {
    padding:17px 20px;
    border:0;
    border-bottom:1px solid var(--auth-border);
  }

  .auth-panel {
    grid-row:1;
    padding:24px 24px 27px;
  }
  .auth-identity {border-bottom:0;border-top:1px solid var(--auth-border);padding:16px}
  .flight-card {width:100%}
  .flight-panel {padding:10px 12px}

  .auth-brand {
    margin-bottom:14px;
  }

  #auth-form {
    margin-top:18px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .flight-particles {display:none}
}
