#account-gate,#game-loading{
 background:linear-gradient(180deg,#070c1790,#050a14ad),url('/assets/portal/ruinas.webp') center/cover no-repeat!important;
 color:#f4eadb!important;font-family:Inter,system-ui,sans-serif!important
}
#account-gate{padding:24px 16px!important}
#account-gate:before,#game-loading:before{display:none}
#account-gate [hidden]{display:none!important}
.portal-auth{width:min(460px,100%);margin:auto;text-align:center}
.portal-auth-back{display:inline-flex;margin-bottom:10px;color:#d8e9ff;text-decoration:none;font-weight:650;font-size:.92rem}
.portal-auth-back:hover{text-decoration:underline;color:#ffc55c}
#account-gate .account-card{
 width:100%!important;padding:26px clamp(17px,5vw,34px)!important;
 border:1px solid #8ab7e6a0!important;border-radius:15px!important;
 background:linear-gradient(145deg,#101c2ff7,#0a1221f2)!important;
 box-shadow:0 18px 65px #0009,inset 0 1px #cadffd30,0 0 24px #f397251d!important
}
#account-gate .account-card>img{
 width:min(100%,310px)!important;height:auto!important;max-height:160px;
 margin:-7px auto 1px!important;filter:drop-shadow(0 0 17px #ee963b88)
}
#account-gate .account-card h1{
 font:750 clamp(1.4rem,5vw,1.75rem)/1.2 Inter,system-ui,sans-serif!important;
 color:#f9e7cb!important;text-shadow:none!important;margin:9px 0 6px!important
}
#account-gate .account-card>.portal-auth-copy{
 font:400 .94rem/1.5 Inter,system-ui,sans-serif!important;letter-spacing:0!important;
 color:#cad7e7!important;margin:0 0 22px!important
}
#account-gate .account-card form{text-align:left}
#account-gate .account-card label{color:#e1e9f3!important;font:650 .85rem Inter,system-ui,sans-serif!important}
#account-gate .account-card input{
 min-height:43px;border:1px solid #61758f!important;background:#0a1220!important;color:#f6eff0!important;
 font:400 1rem Inter,system-ui,sans-serif!important
}
#account-gate .account-card input:focus{
 border-color:#ffc45c!important;box-shadow:0 0 0 2px #f8ae3e45!important
}
#account-gate .account-card form>button,#game-loading #loading-retry{
 font:750 1.04rem Inter,system-ui,sans-serif!important;color:#291800!important;
 background:linear-gradient(#ffd069,#ff9e19)!important;border:1px solid #ffe2a0!important;
 box-shadow:0 0 18px #ff932b70,inset 0 1px #fff4bd!important;border-radius:8px!important;
 min-height:46px;margin-top:4px
}
#account-gate .gate-links button{
 font:600 .79rem Inter,system-ui,sans-serif!important;background:#18283b!important;
 color:#e0ebfa!important;border:1px solid #516987!important
}
#account-gate .gate-links button.active{
 background:#3d2f1d!important;color:#ffe7ac!important;border-color:#b68541!important
}
#account-gate #gate-message:not(:empty){background:#152236!important;color:#f6dcaa!important;border-color:#82663b!important}
#account-gate :focus-visible{outline:2px solid #ffce70;outline-offset:3px}
/* The account screen shares the portal artwork and gold accents. */
#account-gate,#game-loading {
  background:
    radial-gradient(ellipse at 28% 50%,#d88b271c,transparent 46%),
    linear-gradient(180deg,#070c1730,#050a14bd),
    url('/assets/portal/ruinas.webp') center/cover no-repeat!important;
}
#account-gate { overflow:auto; }
.portal-auth {
  width:min(1240px,100%); padding:clamp(8px,2vw,24px);
  display:grid; grid-template-columns:minmax(0,1.55fr) minmax(330px,1fr);
  align-items:center; gap:clamp(14px,4vw,64px);
}
.portal-auth-brand { min-width:0; }
.portal-auth-brand img {
  display:block; width:100%; height:auto; max-height:54svh;
  object-fit:contain; filter:drop-shadow(0 0 30px #f5a14387);
}
.portal-auth-back { margin:10px 0 0; text-shadow:0 2px 4px #000; }
#account-gate .account-card {
  border-color:#a1885d!important;
  background:radial-gradient(ellipse at top,#27334988,transparent 72%),linear-gradient(150deg,#111d30f7,#090f1bf7)!important;
}
#account-gate .account-card h1 {
  font:700 clamp(1.6rem,3vw,2.15rem)/1.15 Georgia,serif!important;
}
#game-loading { gap:12px!important; }
#game-loading>img {
  width:min(710px,88vw)!important; max-height:51svh!important;
  filter:drop-shadow(0 0 32px #ed9b4e87);
}
#game-loading #loading-message {
  font:600 clamp(1rem,2.7vw,1.25rem) Georgia,serif!important;
  color:#fff0d6!important; text-shadow:0 2px 5px #000;
}
#game-loading .loading-track {
  width:min(470px,78vw)!important; border-color:#ad8b54!important;
  background:#0c111b!important; box-shadow:0 0 20px #ffad292f;
}
#game-loading #loading-fill {
  background:linear-gradient(#ffe8a8,#ffcc68 48%,#dc8217)!important;
  box-shadow:0 0 10px #ffbe56aa;
}
#game-loading #loading-percent { color:#ffda8d!important; }
#game-loading .loading-caption { display:none; }
@media(max-width:760px) {
  .portal-auth { width:min(460px,100%); grid-template-columns:minmax(0,1fr); gap:12px; }
  .portal-auth-brand img { margin:auto; max-height:min(238px,30svh); }
  .portal-auth-back { margin-top:4px; }
  #account-gate .account-card { padding-block:18px!important; }
}
/* Login illustration keeps Mari visible beside the account form. */
body #account-gate {
  background:
    linear-gradient(90deg,#070d1910 20%,#0a12213b 54%,#080e1bb5),
    url('/assets/portal/login-mari.webp') 28% center/cover no-repeat,
    #0a111d!important;
}
.portal-auth {
  grid-template-columns:minmax(0,1.2fr) minmax(340px,1fr);
  column-gap:clamp(12px,4vw,60px);
  row-gap:8px;
}
.portal-auth-brand,#account-gate .account-card { grid-column:2; }
.portal-auth-brand img { max-height:min(245px,26svh); }
#account-gate .account-card {
  background:linear-gradient(150deg,#162239f2,#0a1220f5)!important;
}
@media(max-width:760px) {
  body #account-gate {
    background:
      linear-gradient(180deg,#070f1c2b,#070f1cd9 65%),
      url('/assets/portal/login-mari.webp') 24% top/auto 71svh no-repeat,
      #0a111d!important;
  }
  .portal-auth { grid-template-columns:minmax(0,1fr); }
  .portal-auth-brand,#account-gate .account-card { grid-column:1; }
  .portal-auth-brand img { max-height:min(175px,24svh); }
}
