/* The entrance is intentionally isolated from the board, lobby and admin UI. */
@font-face {
  font-family: "Yibu Orbitron";
  src: url("/assets/fonts/orbitron-variable.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

#authView {
  --landing-white: #fff6e8;
  --landing-muted: #d4c8b5;
  --landing-gold: #edc58c;
  --landing-line: rgba(246, 224, 188, .26);
  --landing-tech: "Yibu Orbitron", "Bahnschrift", sans-serif;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: clamp(36px, 7vw, 140px);
  row-gap: clamp(14px, 3vh, 30px);
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: clamp(14px, 3vh, 32px) clamp(24px, 5.5vw, 120px) clamp(12px, 2.4vh, 25px);
  margin: 0;
  color: var(--landing-white);
  background: #29241e;
  color-scheme: dark;
}

#authView .landing-scene {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

#authView .landing-scene picture,
#authView .landing-scene img {
  display: block;
  width: 100%;
  height: 100%;
}

#authView .landing-scene picture {
  transform: translate3d(var(--scene-x, 0px), var(--scene-y, 0px), 0) scale(1.035);
}

#authView .landing-scene img {
  object-fit: cover;
  object-position: 50% 48%;
}

#authView .landing-atmosphere {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 21, 23, .52), rgba(27, 24, 22, .08) 58%, rgba(18, 21, 23, .2)),
    linear-gradient(0deg, rgba(15, 18, 20, .85), transparent 30%, transparent 70%, rgba(22, 22, 22, .38));
}

#authView .landing-dust { position: absolute; inset: 0; }
#authView .landing-dust i {
  position: absolute;
  left: 17%;
  top: 62%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffdb9f;
  box-shadow: 0 0 10px #f7cb8b;
  opacity: 0;
  animation: landing-drift 12s linear infinite;
}
#authView .landing-dust i:nth-child(2) { left: 33%; top: 80%; animation-delay: -4s; animation-duration: 16s; }
#authView .landing-dust i:nth-child(3) { left: 45%; top: 49%; animation-delay: -8s; }
#authView .landing-dust i:nth-child(4) { left: 63%; top: 70%; animation-delay: -2s; animation-duration: 19s; }
#authView .landing-dust i:nth-child(5) { left: 76%; top: 90%; animation-delay: -11s; }
#authView .landing-dust i:nth-child(6) { left: 90%; top: 65%; animation-delay: -5s; animation-duration: 17s; }
#authView .landing-dust i:nth-child(7) { left: 9%; top: 89%; animation-delay: -9s; animation-duration: 18s; }
#authView .landing-dust i:nth-child(8) { left: 54%; top: 95%; animation-delay: -6s; }

#authView .landing-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--landing-line);
}

#authView .landing-brand { display: flex; gap: 15px; align-items: center; }
#authView .landing-insignia {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 229, 184, .68);
  border-radius: 11px 2px;
  box-shadow: inset 0 0 16px rgba(255, 212, 142, .1);
  font-size: 27px;
  font-family: var(--serif);
}
#authView .landing-brand strong { display: block; font-size: 19px; font-weight: 600; letter-spacing: .2em; }
#authView .landing-brand small { display: block; margin-top: 7px; font: 8px var(--landing-tech); letter-spacing: .15em; }
#authView .landing-navigation { display: flex; align-items: center; margin-left: auto; font-size: 12px; }
#authView .landing-navigation a { display: inline-flex; align-items: center; gap: 18px; min-height: 44px; white-space: nowrap; }
#authView .landing-manual-english { color: var(--landing-gold); font: 9px var(--landing-tech); letter-spacing: .08em; }

#authView .auth-intro { align-self: center; padding: 10px 0 32px; min-width: 0; }
#authView .landing-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  color: var(--landing-gold);
  font: 10px var(--landing-tech);
  letter-spacing: .22em;
}
#authView .landing-eyebrow > span { width: 28px; height: 1px; background: var(--landing-gold); }
#authView h1 {
  margin: 0;
  font-family: "Bahnschrift", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 600;
  font-style: normal;
  text-shadow: 0 4px 36px rgba(12, 13, 14, .4);
  letter-spacing: .04em;
  line-height: 1.2;
}
#authView .landing-welcome {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(30px, 3.2vw, 52px);
  font-weight: 300;
  letter-spacing: .22em;
  animation: landing-arrive 900ms 80ms both;
}
#authView .landing-commander {
  display: block;
  white-space: nowrap;
  font-size: clamp(66px, 6.9vw, 112px);
  letter-spacing: .01em;
  animation: landing-arrive 1100ms 160ms both;
}
#authView .landing-title-dot { color: var(--landing-gold); }
#authView .landing-english {
  margin: 26px 0 0;
  color: #f3ddbd;
  font: 500 clamp(12px, 1.05vw, 16px)/1.9 var(--landing-tech);
  letter-spacing: .24em;
  animation: landing-arrive 1100ms 260ms both;
}
#authView .landing-english strong { font-weight: 500; }

#authView .auth-card {
  --ink: #fff6e8;
  --ink-soft: #ded1bf;
  --ink-faint: #c7baa9;
  --line: rgba(242, 220, 183, .23);
  --red: #ffd2a5;
  position: relative;
  width: 100%;
  max-width: 540px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(237, 197, 140, .45) transparent;
  justify-self: end;
  align-self: center;
  padding: 32px 34px 23px;
  border: 1px solid rgba(255, 233, 196, .37);
  border-top-color: rgba(255, 241, 216, .67);
  border-radius: 22px;
  background: rgba(32, 32, 31, .9);
  box-shadow: 0 24px 70px rgba(9, 13, 15, .3),
    inset 0 1px 0 rgba(255, 247, 226, .25),
    inset 1px 0 0 rgba(255, 226, 178, .13),
    inset 0 -1px 0 rgba(255, 235, 195, .13);
  animation: landing-glass-arrive 900ms 180ms both;
}
#authView .auth-card::before {
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(255, 248, 226, .8), transparent 30%, rgba(255, 225, 178, .13) 65%, rgba(255, 246, 220, .45));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #authView .auth-card {
    background:
      radial-gradient(ellipse at var(--glass-x, 5%) var(--glass-y, 0%), rgba(255, 228, 184, .08), transparent 60%),
      linear-gradient(135deg, rgba(78, 69, 55, .28), rgba(24, 30, 33, .42));
    -webkit-backdrop-filter: blur(10px) saturate(.9);
    backdrop-filter: blur(10px) saturate(.9);
  }
}
#authView .landing-glass-light {
  position: absolute;
  pointer-events: none;
  top: -1px;
  left: 12%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff3d6, transparent);
  box-shadow: 0 -1px 16px rgba(255, 220, 167, .22);
  animation: landing-glint 9s ease-in-out infinite alternate;
}
#authView .landing-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#authView .landing-card-heading p { margin: 0 0 10px; color: var(--landing-gold); font: 9px var(--landing-tech); letter-spacing: .14em; }
#authView .landing-card-heading h2 { margin: 0; font-size: 23px; font-weight: 500; letter-spacing: .12em; }
#authView .landing-access-mark { display: flex; gap: 4px; transform: skew(-22deg); padding: 5px; }
#authView .landing-access-mark i { width: 4px; height: 24px; background: var(--landing-gold); opacity: .75; }
#authView .landing-access-mark i:nth-child(2) { opacity: .4; }
#authView .landing-access-mark i:nth-child(3) { opacity: .15; }
#authView .auth-tabs { gap: 30px; margin: 24px 0; }
#authView .auth-tab { min-height: 44px; padding: 10px 3px 13px; color: #d1c5b5; font-size: 14px; letter-spacing: .15em; }
#authView .auth-tab.active { color: #ffe5b8; }
#authView .auth-tab.active::after { background: var(--landing-gold); box-shadow: 0 0 12px rgba(255, 214, 145, .4); }
#authView .auth-form { gap: 18px; }
#authView .auth-form label { gap: 9px; }
#authView .auth-form label > span { color: #eee0cb; font-size: 12px; font-weight: 400; }
#authView .auth-form label small { margin-left: 9px; color: #cebdA5; font: 8px var(--landing-tech); letter-spacing: .1em; }
#authView .auth-form input {
  min-height: 49px;
  border-radius: 7px;
  padding: 11px 14px;
  background: rgba(14, 20, 24, .38);
  border: 1px solid rgba(255, 235, 200, .23);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .09);
  color: #fff8eb;
  font-size: 16px;
}
#authView .auth-form input::placeholder { color: #c7bfb3; font-size: 13px; }
#authView .auth-form input:focus {
  background: rgba(22, 28, 32, .65);
  border-color: var(--landing-gold);
  box-shadow: 0 0 0 3px rgba(237, 197, 140, .18);
}
#authView .auth-form input:autofill { -webkit-text-fill-color: #fff8eb; box-shadow: inset 0 0 0 100px #3d3c36; }
#authView .button-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  margin-top: 6px;
  padding: 12px 19px;
  border: 1px solid #f2d1a2;
  border-radius: 7px;
  color: #302a22;
  background: linear-gradient(110deg, #e5bc84, #f4dbb3 54%, #d8b583);
  box-shadow: 0 6px 24px rgba(229, 188, 132, .1), inset 0 1px 0 #fff0d4;
  font-size: 14px;
  letter-spacing: .14em;
  font-weight: 700;
  transition: box-shadow 180ms, background 180ms;
}
#authView .button-primary:hover { transform: none; background: #ffe2b6; box-shadow: 0 8px 28px rgba(237, 197, 140, .24); }
#authView .button-primary:active { background: #d7ae76; }
#authView .button-primary > span:last-child { font-size: 22px; font-weight: 400; }
#authView .button-secondary { background: rgba(244, 219, 174, .12); border: 1px solid var(--landing-line); color: #ffe6bf; }
#authView .form-hint { margin: 0; color: #e0d3c1; font-size: 11px; line-height: 1.8; }
#authView .form-message { margin: 10px 0 0; color: #ffd2ad; min-height: 0; font-size: 12px; }
#authView .form-message:empty { display: none; }
#authView .landing-card-bottom { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--landing-line); color: #ccbfaa; font-size: 10px; letter-spacing: .05em; }
#authView .landing-card-bottom > span:last-child { margin-left: auto; font: 7px var(--landing-tech); letter-spacing: .1em; }

#authView.auth-register-active { grid-template-columns: minmax(0, 1fr) minmax(450px, 540px); }
#authView .auth-register-form { gap: 14px 16px; }
#authView .auth-register-form .button-primary { justify-content: center; }
#authView .auth-register-form input { font-size: 14px; }

#authView .landing-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--landing-line);
  font-size: 11px;
  color: #ddcdb5;
}
#authView .landing-world-label { display: flex; gap: 15px; align-items: center; letter-spacing: .16em; }
#authView .landing-world-label > span { color: var(--landing-gold); font-size: 18px; }
#authView a:hover { color: #ffdeb0; }
#authView :is(a, button, input):focus-visible { outline: 2px solid #ffdda3; outline-offset: 5px; }

@keyframes landing-arrive {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes landing-glass-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes landing-drift {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  20%, 70% { opacity: .55; }
  100% { transform: translate3d(38px, -150px, 0); opacity: 0; }
}
@keyframes landing-glint {
  from { transform: translateX(0); opacity: .5; }
  to { transform: translateX(80%); opacity: 1; }
}

#authView[data-motion="paused"] *,
#authView.hidden * { animation-play-state: paused !important; }
#authView[data-motion="paused"] .landing-scene picture { transform: scale(1.035); }
#authView[data-motion="paused"] :is(.landing-welcome, .landing-commander, .landing-english, .auth-card) {
  animation: none;
  opacity: 1;
  transform: none;
}

@media (min-width: 1800px) {
  #authView { grid-template-columns: minmax(0, 1fr) 470px; padding-left: 8vw; padding-right: 8vw; }
}
@media (max-width: 1050px) {
  #authView { column-gap: 32px; padding-left: 32px; padding-right: 32px; }
  #authView .auth-card { padding: 28px 26px 22px; }
  #authView .landing-commander { font-size: 66px; }
}
/* Short desktop windows need less decoration, not clipped account fields. */
@media (max-height: 900px) and (min-width: 821px) {
  #authView { row-gap: 18px; padding-top: 20px; padding-bottom: 16px; }
  #authView .landing-header { padding-bottom: 14px; }
  #authView .landing-footer { padding-top: 12px; }
  #authView .auth-card { padding: 24px 28px 20px; }
  #authView .auth-tabs { margin: 16px 0; }
  #authView .auth-form { gap: 13px; }
  #authView .auth-form label { gap: 6px; }
  #authView .auth-form input { min-height: 44px; padding-block: 9px; }
  #authView .landing-card-bottom { margin-top: 16px; padding-top: 12px; }
}
@media (max-height: 650px) and (min-width: 821px) {
  #authView { row-gap: 14px; padding-block: 12px; }
  #authView .landing-header { padding-bottom: 10px; }
  #authView .landing-footer { padding-top: 4px; }
  #authView .auth-intro { padding: 0; }
  #authView .landing-eyebrow { margin-bottom: 14px; }
  #authView .landing-welcome { font-size: 30px; margin-bottom: 6px; }
  #authView .landing-commander { font-size: 60px; }
  #authView .landing-english { margin-top: 16px; }
  #authView .auth-card { padding-block: 18px; }
  #authView .landing-card-heading p { margin-bottom: 5px; }
  #authView .landing-card-heading h2 { font-size: 20px; }
  #authView .auth-tabs { margin: 10px 0; }
  #authView .auth-form { gap: 10px; }
  #authView .landing-card-bottom { display: none; }
}
@media (max-width: 820px) {
  #authView, #authView.auth-register-active {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 18px;
    padding: 16px 24px;
  }
  #authView .landing-header { padding-bottom: 12px; gap: 14px; }
  #authView .landing-navigation a { gap: 10px; font-size: 11px; }
  #authView .landing-manual-english { font-size: 8px; letter-spacing: .04em; }
  #authView .landing-brand strong { font-size: 16px; }
  #authView .landing-brand small { font-size: 7px; }
  #authView .landing-insignia { width: 38px; height: 38px; font-size: 24px; }
  #authView .auth-intro { padding: 0; text-align: center; }
  #authView .landing-eyebrow { justify-content: center; margin-bottom: 10px; font-size: 8px; }
  #authView .landing-welcome { margin-bottom: 4px; font-size: 24px; }
  #authView .landing-commander { font-size: 54px; }
  #authView .landing-english { margin-top: 10px; font-size: 9px; line-height: 1.7; }
  #authView .landing-english br { display: none; }
  #authView .landing-english strong { margin-left: 5px; }
  #authView .auth-card { width: min(100%, 440px); justify-self: center; }
  #authView.auth-register-active .auth-card { width: min(100%, 540px); }
  #authView .auth-tabs { margin: 16px 0; }
  #authView .auth-form { gap: 14px; }
  #authView .auth-form label { gap: 6px; }
  #authView .auth-form input { min-height: 44px; padding-block: 9px; }
  #authView .landing-card-bottom { margin-top: 16px; padding-top: 12px; }
  #authView.auth-register-active .landing-eyebrow,
  #authView.auth-register-active .landing-english,
  #authView.auth-register-active .landing-card-heading,
  #authView.auth-register-active .landing-card-bottom { display: none; }
  #authView.auth-register-active h1 { display: flex; justify-content: center; align-items: baseline; gap: 10px; }
  #authView.auth-register-active .landing-welcome { font-size: 18px; margin: 0; }
  #authView.auth-register-active .landing-commander { font-size: 24px; }
  #authView.auth-register-active .auth-tabs { margin-top: 0; }
  #authView .landing-scene img { object-position: 65% center; }
  #authView .landing-atmosphere { background: linear-gradient(180deg, rgba(17, 21, 24, .35), rgba(29, 27, 23, .25) 35%, rgba(16, 21, 24, .85)); }
  #authView .landing-footer { padding-top: 4px; }
  #authView .landing-world-label { display: none; }
}
@media (max-width: 540px) {
  #authView, #authView.auth-register-active { padding-left: 18px; padding-right: 18px; gap: 16px; }
  #authView .auth-card { padding: 22px 23px 18px; border-radius: 18px; }
  #authView .auth-register-form { grid-template-columns: minmax(0, 1fr); }
  #authView .auth-form input { font-size: 16px; }
}
@media (max-width: 360px) {
  #authView .landing-brand { gap: 9px; }
  #authView .landing-brand small { letter-spacing: 0; }
  #authView .landing-brand strong { font-size: 14px; }
  #authView .landing-brand small { font-size: 6px; }
  #authView .landing-navigation a { gap: 8px; }
  #authView .landing-commander { font-size: 48px; }
  #authView .auth-card { padding-inline: 19px; }
  #authView .landing-card-bottom > span:last-child { font-size: 6px; }
}
@media (max-width: 820px) and (max-height: 740px) {
  #authView, #authView.auth-register-active { gap: 12px; padding-block: 12px; }
  #authView .landing-eyebrow { display: none; }
  #authView .landing-welcome { font-size: 21px; }
  #authView .landing-commander { font-size: 44px; }
  #authView .landing-english { margin-top: 6px; font-size: 8px; }
  #authView .auth-card { padding-block: 18px; }
  #authView .landing-card-heading p { margin-bottom: 5px; }
  #authView .landing-card-heading h2 { font-size: 20px; }
  #authView .auth-tabs { margin: 12px 0; }
  #authView .auth-form { gap: 12px; }
  #authView .landing-card-bottom { display: none; }
}
@media (max-height: 480px) {
  #authView .landing-english { display: none; }
}
@media (max-width: 820px) and (max-height: 600px) {
  #authView, #authView.auth-register-active { grid-template-rows: auto minmax(0, 1fr) auto; }
  #authView .auth-intro { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #authView *, #authView *::before, #authView *::after { animation: none !important; transition: none !important; }
  #authView .landing-scene picture { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  #authView .auth-card { background: #292d2e; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #authView .auth-card::before { display: none; }
  #authView .landing-atmosphere { background: rgba(10, 16, 20, .65); }
}
