#ica-auth[hidden], #ica-auth [hidden] { display: none !important; }
#ica-auth {
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow: auto;
  overscroll-behavior: contain;
  background: #061724;
  color: #fff3ce;
  font: 16px/1.3 Georgia, "Times New Roman", serif;
}
.auth-content {
  box-sizing: border-box;
  width: min(100%, 56.33802817dvh);
  min-height: min(100dvh, 177.5vw);
  margin: auto;
  padding: max(clamp(14px, 10dvh, 98px), env(safe-area-inset-top)) 5% max(24px, env(safe-area-inset-bottom));
  padding-inline: min(7vw, 4dvh);
  container-type: inline-size;
  background: #052f43 url(long-cung199.webp) center top / cover no-repeat;
}
.auth-logo {
  display: block;
  width: min(70%, 310px);
  height: auto;
  margin: 0 auto clamp(12px, 4dvh, 40px);
  filter: drop-shadow(0 5px 12px #001323c4);
}
.auth-form {
  position: relative;
  display: grid;
  gap: clamp(9px, 2.6cqw, 14px);
  padding: clamp(34px, 11.4cqw, 55px) clamp(18px, 7.5cqw, 38px) clamp(53px, 14cqw, 68px);
  border: 0;
  border-radius: 22px;
  background-color: #033d34;
  background-clip: content-box;
  isolation: isolate;
}
.auth-form::before {
  content: "";
  position: absolute;
  inset: -1.5% -1%;
  z-index: -1;
  pointer-events: none;
  border: 1px solid transparent;
  border-image: url(jade-frame200.webp) 25% 23% 25% 23% fill / clamp(85px, 27cqw, 118px) 24% clamp(80px, 26cqw, 115px) 24% stretch;
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  border: 2px solid #d0a856;
  border-radius: 18px;
  background: #064337;
  box-shadow: 0 2px 0 #7d521e, 0 4px 8px #001b16c2;
  margin-bottom: 4px;
}
#ica-auth button {
  box-sizing: border-box;
  border: 1px solid #b08e53;
  border-radius: 12px;
  background: #08473c;
  color: #fff3ce;
  min-height: clamp(44px, 11.4cqw, 55px);
  padding: 6px 9px;
  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
}
#ica-auth button:disabled { opacity: .68; cursor: default; }
#ica-auth :is(button,input):focus-visible { outline: 2px solid #b1ffe2; outline-offset: 2px; }
#ica-auth .auth-tab {
  border: 0;
  border-radius: 15px;
  background: linear-gradient(#0b6151, #064336);
  font-size: clamp(15px, 5.1cqw, 24px);
}
#ica-auth .auth-tab[aria-pressed=true], #ica-auth .auth-submit {
  background: linear-gradient(#1bcc9b, #098262 34%, #004238);
  box-shadow: inset 0 0 0 2px #e9bd68, inset 0 0 10px #9cffd991, 0 3px 5px #00261cbd;
  text-shadow: 0 2px 2px #032d25;
}
#ica-auth .auth-submit {
  min-height: clamp(49px, 15cqw, 67px);
  margin-top: 1px;
  border: 0;
  border-radius: 0;
  background: url(jade-button200.webp) center 48% / 100% 160% no-repeat;
  box-shadow: none;
  font-size: clamp(24px, 7.6cqw, 36px);
}
#ica-auth button:not(:disabled):hover { filter: brightness(1.11); }
.auth-field { position: relative; }
.auth-field label { display: block; margin: 0 0 4px 2px; }
.auth-field .auth-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.auth-field-icon {
  position: absolute;
  inset: 19% auto 19% 8px;
  z-index: 1;
  width: 33px;
  display: grid;
  place-items: center;
  border-right: 1px solid #e7e3af91;
  color: #fff0bb;
  pointer-events: none;
}
.auth-field-icon svg { width: 20px; height: 20px; }
.auth-password { position: relative; }
#ica-auth input:not([type=hidden]) {
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(44px, 11.8cqw, 57px);
  padding: 7px 12px;
  border: 1.5px solid #b1dec6;
  border-radius: 20px;
  background: linear-gradient(#0a765f, #075344 36%, #0c775f);
  box-shadow: inset 0 1px 5px #98ffe18c, 0 3px 6px #001d18a8;
  color: #fff8e1;
  font: 16px/1.25 system-ui, sans-serif;
}
#ica-auth .auth-field-icon ~ input, #ica-auth .auth-field-icon ~ .auth-password input { padding-left: 51px; }
#ica-auth .auth-password input { padding-right: 44px; }
#ica-auth input[aria-invalid=true] { border-color: #ff96a6; }
#ica-auth input::placeholder { color: #fff3ce; opacity: 1; font: bold clamp(16px, 4.8cqw, 21px) Georgia, serif; }
#ica-auth .auth-eye {
  position: absolute;
  right: 1px;
  top: 0;
  bottom: 0;
  width: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
}
.auth-eye[aria-pressed=true] svg { opacity: .68; }
#ica-auth .auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid #e5c46c;
  border-radius: 18px;
  background: linear-gradient(#f3ffda, #add9a0);
  color: #06392e;
  font-family: system-ui, sans-serif;
}
.auth-google span { border-left: 1px solid #457758; padding-left: 9px; }
.auth-google svg, .auth-eye svg { width: 19px; height: 19px; flex: none; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 10px; }
#ica-auth .auth-support { flex-basis: 100%; }
#ica-auth .auth-link {
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  padding: 4px 1px;
  border: 0;
  background: transparent;
  color: #f9e8b7;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: .2em;
}
#ica-auth .auth-support { font-size: clamp(16px, 4.5cqw, 20px); }
#ica-auth .auth-repair, #ica-auth .auth-install { font: 13px/1.2 system-ui, sans-serif; }
.auth-status, .auth-hint { padding: 0; margin: 0; font: 14px/1.4 system-ui, sans-serif; color: #e2f8e9; }
.auth-status:empty { display: none; }
.auth-status[data-kind=error] { color: #ffc0c6; }
.auth-status[data-kind=success] { color: #a7f5db; }
#boot {
  background-color: #050f24;
  background-image: linear-gradient(#050f24a8,#050f24df),url(abyss.webp);
  background-position: center top;
  background-size: cover;
}
#boot h1 img { width: min(48vw, 310px); display: block; margin: auto; }
#boot #message { color: #eef5ff; }
@media (max-width: 740px), (max-aspect-ratio: 4/5) {
  #boot {
    background-image: linear-gradient(180deg,#050f2400 7%,#050f2466 19%,#050f24 65%),url(abyss-mobile.webp);
    background-position: right top;
    background-size: auto, auto clamp(400px, 126vw, 650px);
  }
}
@media (max-width: 350px) {
  .auth-form { padding-inline: 16px; }
  .auth-field-icon { width: 27px; left: 6px; }
  #ica-auth .auth-field-icon ~ input, #ica-auth .auth-field-icon ~ .auth-password input { padding-left: 39px; }
  #ica-auth .auth-google { font-size: 14px; }
}

@media (min-aspect-ratio: 1/1) {
  body { background: #061724 url(long-mon433.webp) center / cover no-repeat; }
  #ica-auth { background: transparent; }
  #boot {
    inset: 0 auto 0 50%;
    width: min(100vw, 56.33802817dvh);
    transform: translateX(-50%);
  }
  #asset-download { max-width: 88%; }
}


/* Owner435: visible side-only light motes, no game canvas changes. */
#ica-background435 { display: none; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
@media (min-aspect-ratio: 1/1) and (min-width: 900px) {
  body { isolation: isolate; }
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: #061724 url(long-mon433.webp) center / cover no-repeat;
    animation: ica-bg-drift435 14s ease-in-out -5s infinite alternate;
  }
  #ica-background435 { display: block; }
}
.ica-bg-side435 { position: absolute; top: 0; bottom: 0; overflow: hidden;
  width: max(0px, calc((100vw - 56.33802817vh) / 2));
  width: max(0px, calc((100vw - 56.33802817dvh) / 2)); color: #ffe6a0; }
.ica-bg-left435 { left: 0; }
.ica-bg-right435 { right: 0; color: #8fffe9; }
.ica-bg-side435::before { content: ""; position: absolute; left: 40%; top: 30%;
  width: min(360px, 75%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, currentColor, transparent 68%);
  animation: ica-bg-aura435 3.8s ease-in-out -1s infinite alternate; }
.ica-bg-right435::before { left: 15%; top: 18%; animation-delay: -2.5s; }
.ica-bg-side435 i { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size);
  border-radius: 50%; background: currentColor; box-shadow: 0 0 8px 2px currentColor;
  animation: ica-bg-mote435 var(--period) linear var(--delay) infinite; }
.ica-bg-paused434 body::before, .ica-bg-paused434 #ica-background435 *::before,
.ica-bg-paused434 #ica-background435 i { animation-play-state: paused; }
@keyframes ica-bg-drift435 {
  from { transform: translate3d(-8px, -5px, 0) scale(1.035); }
  to { transform: translate3d(8px, 5px, 0) scale(1.045); }
}
@keyframes ica-bg-aura435 {
  from { opacity: .07; transform: scale(.8); }
  to { opacity: .23; transform: scale(1.12); }
}
@keyframes ica-bg-mote435 {
  0% { opacity: 0; transform: translate3d(0, 50px, 0) scale(.65); }
  15% { opacity: .75; }
  75% { opacity: .65; }
  100% { opacity: 0; transform: translate3d(24px, -150px, 0) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { content: none; animation: none; }
  #ica-background435 { display: none; }
}
