#account-dialog{
  --auth-ink:#fff7eb;width:min(510px,calc(100vw - 26px));padding:clamp(18px,5vw,34px);
  border:1px solid #e2b47d62;border-radius:24px;color:var(--auth-ink);isolation:isolate;overflow:auto;
  background:linear-gradient(145deg,#30241cee,#1c1514f5 55%,#321b1df2);
  box-shadow:0 30px 95px #000b,inset 0 1px 0 #fbe2ba40
}
#account-dialog[open]{animation:auth-enter .34s cubic-bezier(.2,.8,.2,1) both}
#account-dialog::backdrop{background:#100a09e6;backdrop-filter:blur(9px)}
#account-dialog::before,#account-dialog::after{
  content:'';position:absolute;pointer-events:none;z-index:-1;width:145px;height:165px;
  opacity:.46;filter:blur(31px);animation:auth-orbit 7s ease-in-out infinite alternate
}
#account-dialog::before{top:-70px;left:-48px;background:#cb3746;border-radius:40% 60% 73% 27%}
#account-dialog::after{right:-68px;bottom:-77px;background:#b77f43;border-radius:67% 33% 27% 73%;animation-delay:-4s}
#account-dialog .dialog-head{position:relative;justify-content:center;text-align:center;padding:0 28px}
#account-dialog .dialog-head form{position:absolute;right:-8px;top:-7px}
.auth-brand{display:grid;justify-items:center;gap:10px}
.auth-brand img{width:49px;height:49px;padding:7px;border-radius:14px;background:#201817;border:1px solid #e2b47d65}
#account-intro{text-align:center;color:#dccbb5;font-size:.87rem;margin:8px 0 22px}
#account-dialog .account-form label{color:#e8d6bf}
#account-dialog .account-form input{background:#140f0ed9;border-color:#dbb48756}
#account-dialog .account-primary{background:linear-gradient(110deg,#af1725,#841c28);border-color:#db8d7677}
.account-links,.profile-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}
.account-links{justify-content:space-between}
.account-links button{color:#edc796;background:none;border-color:transparent;padding:.36rem .15rem;font-size:.88rem}
.profile-tabs button{font-size:.83rem}
.profile-tabs button[aria-pressed=true]{color:#edc796;background:#3c251d;border-color:#edc79688}
#account-profile ul{padding-left:20px}
#account-profile li{padding-block:5px}
#profile-contact,#account-message{color:#dccbb5;overflow-wrap:anywhere}
#sign-out{margin-top:16px}
.account-button.signed-in::before{
  content:'';display:block;width:21px;height:21px;
  background:radial-gradient(circle at 50% 32%,#e8c68b 0 23%,transparent 26%),radial-gradient(ellipse at 50% 93%,#e8c68b 0 40%,transparent 44%)
}
@keyframes auth-enter{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@keyframes auth-orbit{from{transform:translate(0,0) rotate(-8deg)}to{transform:translate(17px,13px) rotate(21deg)}}
@media(prefers-reduced-motion:reduce){#account-dialog[open],#account-dialog::before,#account-dialog::after{animation:none}}

#account-dialog:has(#account-profile:not([hidden])){
  width:min(520px,calc(100vw - 24px));padding:clamp(18px,5vw,32px);
  background:#201915;border-color:#e5bb8038;max-height:calc(100dvh - 24px)
}
#account-dialog:has(#account-profile:not([hidden]))::before,
#account-dialog:has(#account-profile:not([hidden]))::after,
#account-dialog:has(#account-profile:not([hidden])) .auth-brand img{display:none}
#account-dialog:has(#account-profile:not([hidden])) .dialog-head{justify-content:space-between;text-align:left;padding:0}
#account-dialog:has(#account-profile:not([hidden])) .dialog-head form{position:static}
#account-dialog:has(#account-profile:not([hidden])) .dialog-head button{border:0;border-radius:50%;background:#ffffff0c}
#account-profile{display:grid;gap:14px;margin-top:18px}
.profile-card{background:#2b221c;border:1px solid #e5bb802b;border-radius:16px;padding:clamp(15px,4vw,21px)}
.profile-card h3{font-size:.88rem;line-height:1.3;margin:0 0 9px;color:#e7c594;font-weight:650}
#account-profile p{margin:0}
#account-profile .profile-value{font-size:1.18rem;color:#fff5e8;font-weight:760;line-height:1.35;overflow-wrap:anywhere}
#profile-method,#access-hint{color:#cfbca6;font-size:.9rem}
#account-profile #profile-method{margin-bottom:3px}
#account-profile #access-hint{margin-top:4px}
#show-plans{display:block;width:100%;margin-top:14px;min-height:47px;background:#bf2534;color:#fff;border:1px solid #f6777773;font-weight:750;border-radius:12px}
#account-profile .profile-tabs{display:grid;gap:0;margin:0;padding:0 14px;background:#2b221c;border:1px solid #e5bb802b;border-radius:14px}
#account-profile .profile-tabs button{text-align:left;border:0;border-radius:0;background:none;min-height:43px;padding:.55rem .2rem;font-size:.91rem;color:#f4e5d4}
#account-profile .profile-tabs button+button{border-top:1px solid #e5bb8021}
#account-profile .profile-tabs button[aria-pressed=true]{color:#ffd092}
#account-profile #sign-out{margin:0;min-height:46px;border-radius:12px;color:#ffac98;background:#ffffff05;font-weight:680}

.top .account-button.signed-in{
  position:relative;display:grid;place-items:center;width:43px;height:43px;padding:0;
  border:1px solid transparent;border-radius:12px;
  background:linear-gradient(150deg,#281e14,#100d0b) padding-box,linear-gradient(135deg,#8c531c,#f7df9c 36%,#b98541 63%,#ffe6a9) border-box;
  box-shadow:0 2px 9px #0009,inset 0 0 8px #bc82342b;
}
.top .account-button.signed-in::before{
  width:23px;height:24px;
  background:linear-gradient(105deg,#ad753a 5%,#ffe5a0 43%,#c0954e 65%,#f5d591);
  mask:radial-gradient(circle 5px at 50% 25%,#000 88%,transparent) center/100% 100% no-repeat,
    radial-gradient(ellipse 9px 11px at 50% 103%,#000 96%,transparent) center/100% 100% no-repeat;
}
.top .account-button.signed-in:hover{
  box-shadow:0 2px 13px #edb9574d,inset 0 0 10px #e1b16635;
}
.top .account-button.signed-in.is-vip::after{
  content:'VIP';position:absolute;bottom:-6px;right:-5px;padding:1px 4px;
  border-radius:5px;border:1px solid #f8df9d;
  color:#251604;background:linear-gradient(135deg,#fff0bd,#d3a34d);
  font-size:9px;line-height:1.15;font-weight:850;letter-spacing:.05em;
  box-shadow:0 2px 4px #0009;
}



/* Signed-in profile shares the sign-in dialog's warm, moving light. */
#account-dialog:has(#account-profile:not([hidden])){
  width:min(520px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  padding:clamp(16px,5vw,30px);
  background:linear-gradient(145deg,#35221cf5,#1d1615f5 51%,#32191ef6);
  border-color:#e9bd7c65;
  box-shadow:0 24px 85px #000b,inset 0 1px 0 #f8d79d46;
}
#account-dialog:has(#account-profile:not([hidden]))::before,
#account-dialog:has(#account-profile:not([hidden]))::after{
  display:block;width:210px;height:200px;opacity:.72;filter:blur(46px);
}
#account-dialog:has(#account-profile:not([hidden]))::before{top:-86px;left:-54px;background:#ca293b}
#account-dialog:has(#account-profile:not([hidden]))::after{right:-77px;bottom:-93px;background:#bd7936}
#account-dialog:has(#account-profile:not([hidden])) .auth-brand{display:flex;align-items:center;gap:11px}
#account-dialog:has(#account-profile:not([hidden])) .auth-brand img{
  display:block;width:41px;height:41px;padding:6px;border-radius:13px;
  box-shadow:0 0 22px #c52b4943;
}
#account-dialog:has(#account-profile:not([hidden])) .dialog-head button{
  display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid #ffdab52b;
}
#account-profile .profile-card,#account-profile .profile-tabs{
  background:linear-gradient(135deg,#3d2a2596,#211917ad);
  border-color:#e5bb8044;
  box-shadow:inset 0 1px 0 #fff0cf10,0 8px 24px #160a0d2f;
}
#account-profile .profile-card::before{
  content:'';display:block;width:26px;height:2px;margin:0 0 9px;border-radius:2px;
  background:linear-gradient(90deg,#ff6269,#e7b672);
}
#account-profile #show-plans{
  background:linear-gradient(108deg,#be2035,#8f1829);
  box-shadow:0 7px 22px #ba1d3c55,inset 0 1px 0 #ffd0b835;
}
#account-profile .profile-tabs button{
  display:flex;align-items:center;justify-content:space-between;
  padding-inline:.32rem;transition:color .18s ease,background .18s ease;
}
#account-profile .profile-tabs button::after{content:'›';color:#edc082;font-size:1.2rem}
#account-profile .profile-tabs button:hover,
#account-profile .profile-tabs button[aria-pressed=true]{background:#d8935730;color:#ffe4b8}
#account-profile #sign-out{background:#6f233521;border-color:#eea5803a}
#account-profile #sign-out:hover{background:#a42c4737}
#account-dialog[open] #account-profile>*{animation:profile-rise .36s ease-out both}
#account-dialog[open] #account-profile>*:nth-child(2){animation-delay:.045s}
#account-dialog[open] #account-profile>*:nth-child(3){animation-delay:.09s}
#account-dialog[open] #account-profile>#sign-out{animation-delay:.135s}
@keyframes profile-rise{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){
  #account-dialog[open] #account-profile>*{animation:none}
  #account-profile .profile-tabs button{transition:none}
}

/* Keep both moving gradients within the dialog's scrollable bounds. */
#account-dialog{
  background:linear-gradient(145deg,#35221cf5,#1d1615f5 51%,#32191ef6);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
}
#account-dialog[open]::before,
#account-dialog[open]::after{
  display:block;
  inset:0;
  width:auto;height:auto;
  border-radius:inherit;
  filter:none;transform:none;opacity:1;
  will-change:auto;
  background-color:transparent;
  background-repeat:no-repeat;
  background-size:340px 340px;
}
#account-dialog[open]::before{
  background-image:radial-gradient(circle closest-side,#d53048a8 0%,#b4284159 42%,transparent 100%);
  background-position:-135px -128px;
  animation:profile-ruby-position 6.4s ease-in-out infinite alternate;
}
#account-dialog[open]::after{
  background-image:radial-gradient(circle closest-side,#d497596b 0%,#9e5e343b 43%,transparent 100%);
  background-position:calc(100% + 113px) calc(100% + 116px);
  animation:profile-gold-position 7.2s ease-in-out -2.4s infinite alternate;
}
@keyframes profile-ruby-position{
  0%{background-position:-135px -128px}
  54%{background-position:-10px -70px}
  100%{background-position:-67px 22px}
}
@keyframes profile-gold-position{
  0%{background-position:calc(100% + 113px) calc(100% + 116px)}
  50%{background-position:calc(100% + 7px) calc(100% + 52px)}
  100%{background-position:calc(100% + 46px) calc(100% - 18px)}
}
@keyframes profile-rise{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){
  #account-dialog[open]::before,
  #account-dialog[open]::after{animation:none}
}


#account-dialog::-webkit-scrollbar{display:none}

.film-vip-tag{position:absolute;top:9px;right:9px;z-index:2;border-radius:5px;padding:2px 6px;color:#211306;background:linear-gradient(130deg,#fff3b9,#d2a14a);font-size:.73rem;letter-spacing:.04em}

.top .account-button.signed-in.is-vip::after{
  content:'';width:32px;height:32px;right:-9px;top:-9px;bottom:auto;padding:0;border:0;
  border-radius:0;background:transparent url('vip-user.png') center/contain no-repeat;
  box-shadow:none;filter:drop-shadow(0 2px 3px #000a);pointer-events:none;
}
#account-dialog.is-vip .auth-brand::after{
  content:'';display:block;flex:0 0 39px;width:39px;height:39px;
  background:url('vip-user.png') center/contain no-repeat;
}

