/* Aura MU: the sign-in window, the reset page and the account page. Site tokens from style.css. */
dialog.auth { padding: 0; max-width: 980px; width: calc(100% - 32px); max-height: min(720px, 94svh); border-radius: 22px;
  background: #110f0c; border: 1px solid #d1ad6f2e; overflow: hidden;
  box-shadow: 0 0 0 1px #0008, 0 40px 120px #000c, 0 0 80px #d1ad6f14; }
dialog.auth[open] { animation: auth-in .45s cubic-bezier(.2,.8,.2,1); }
dialog.auth::backdrop { background: radial-gradient(ellipse at center, #1a140bcc, #050403f2); backdrop-filter: blur(10px); }
@keyframes auth-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.auth-shell { display: grid; grid-template-columns: 1fr 1.08fr; grid-template-rows: minmax(0, 1fr); height: min(700px, 94svh); }

/* the art side */
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 34px; isolation: isolate; }
.auth-art > img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; filter: none; object-fit: cover; object-position: 70% 40%; z-index: -3;
  animation: auth-drift 24s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes auth-drift { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.18) translate(-2%, 1.5%); } }
.auth-art::before { content: ''; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #0b0a08b0 0%, #0b0a0820 35%, #0b0a08e6 78%, #0b0a08 100%), linear-gradient(90deg, transparent 60%, #110f0c 100%); }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, #ffffff04 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.auth-art-glow { position: absolute; width: 380px; height: 380px; left: -90px; bottom: -120px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, #d1ad6f40, transparent 65%); filter: blur(10px); animation: auth-pulse 6s ease-in-out infinite; }
@keyframes auth-pulse { 50% { opacity: .55; transform: scale(1.12); } }
.auth-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.auth-embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #f0d49a;
  box-shadow: 0 0 8px 2px #d1ad6f99; opacity: 0; animation: auth-ember 7s linear infinite; }
.auth-embers i:nth-child(1) { left: 12%; animation-delay: 0s; }
.auth-embers i:nth-child(2) { left: 28%; animation-delay: 1.6s; animation-duration: 9s; }
.auth-embers i:nth-child(3) { left: 46%; animation-delay: 3.1s; }
.auth-embers i:nth-child(4) { left: 63%; animation-delay: .8s; animation-duration: 8s; }
.auth-embers i:nth-child(5) { left: 78%; animation-delay: 4.2s; }
.auth-embers i:nth-child(6) { left: 90%; animation-delay: 2.4s; animation-duration: 10s; }
@keyframes auth-ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(30px, -620px); opacity: 0; } }

.auth-art-top { display: flex; align-items: center; gap: 10px; letter-spacing: .22em; font-size: 20px; }
.auth-art-top small { font-size: 9px; letter-spacing: .3em; color: var(--muted); align-self: flex-end; padding-bottom: 4px; }
.auth-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--gold);
  background: linear-gradient(140deg, #d1ad6f2b, #d1ad6f08); border: 1px solid #d1ad6f40; }
.auth-mark svg { width: 20px; height: 20px; }
.auth-art-copy h3 { font-size: clamp(30px, 3.4vw, 42px); margin: 16px 0 22px; letter-spacing: -.03em; }
.auth-art-copy h3 em { font-family: Cinzel, serif; }
.auth-art-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.auth-art-copy li { display: flex; align-items: center; gap: 11px; font-size: 13px; color: #d9d0c1; }
.auth-art-copy li svg { width: 17px; height: 17px; color: var(--gold); padding: 6px; box-sizing: content-box; border-radius: 8px;
  background: #0b0a0899; border: 1px solid #d1ad6f30; }

/* the form side */
.auth-main { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 22px 46px 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d1ad6f40 transparent;
  background: radial-gradient(ellipse at 100% 0%, #d1ad6f10, transparent 55%), #110f0c; }
.auth-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; font-size: 22px; line-height: 1;
  background: #ffffff08; border: 1px solid #ffffff18; color: var(--muted); transition: all .2s; z-index: 2; }
.auth-close:hover { color: var(--gold); border-color: #d1ad6f60; transform: rotate(90deg); }

.auth-tabs { position: relative; flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 0 52px 14px 0;
  background: #0b0a08; border: 1px solid #ffffff12; border-radius: 12px; }
.auth-tabs[hidden] { display: none; }
.auth-tabs button { position: relative; z-index: 1; min-height: 40px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; transition: color .25s; }
.auth-tabs button[aria-selected=true] { color: #15120d; }
.auth-tab-ink { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px;
  background: linear-gradient(110deg, #e8cf9f, #c29e60); box-shadow: 0 4px 18px #d1ad6f33, inset 0 1px 0 #fff6;
  transition: transform .35s cubic-bezier(.3,1.3,.5,1); }
.auth-tabs[data-active=register] .auth-tab-ink { transform: translateX(100%); }

.auth-stage { margin: auto 0; }
.auth-form { padding: 0; border: 0; background: none; border-radius: 0; }
.auth-enter { animation: auth-view .4s cubic-bezier(.2,.8,.2,1); }
@keyframes auth-view { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.auth-form h2 { font-size: 28px; margin: 4px 50px 6px 0; letter-spacing: -.035em; }
.auth-sub { font-size: 13.5px; margin: 0 0 12px; line-height: 1.6; }
.auth-sub b { color: var(--gold); font-weight: 600; }

.auth-field { display: block; margin-top: 10px; }
.auth-label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #a89f90; margin-bottom: 7px; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: #7d7466; pointer-events: none; transition: color .2s; }
.auth-input input { margin: 0; min-height: 45px; padding: 12px 46px 12px 44px; font-size: 15px; border-radius: 11px;
  background: #0a0907; border: 1px solid #ffffff1a; transition: border-color .2s, box-shadow .2s, background .2s; }
.auth-input input:hover { border-color: #ffffff30; }
.auth-input input:focus { outline: none; border-color: #d1ad6f99; background: #0d0b08; box-shadow: 0 0 0 4px #d1ad6f1a, 0 0 24px #d1ad6f14; }
.auth-input:focus-within > svg { color: var(--gold); }
.auth-field.bad input { border-color: #e0706aaa; box-shadow: 0 0 0 4px #e0706a18; }
.auth-field.bad .auth-input > svg { color: #e0706a; }
.auth-eye { position: absolute; right: 6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: none; color: #7d7466; }
.auth-eye svg { width: 18px; height: 18px; }
.auth-eye:hover, .auth-eye.on { color: var(--gold); }
.auth-eye.on::after { content: ''; position: absolute; width: 20px; height: 1.6px; background: currentColor; transform: rotate(-40deg); border-radius: 2px; opacity: 0; }

.auth-caps { margin: 7px 0 0; font-size: 11.5px; color: #e9c27a; }
.auth-caps::before { content: '⇪ '; }

.auth-strength { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 5px; align-items: center; margin-top: 9px; }
.auth-strength i { height: 4px; border-radius: 4px; background: #ffffff12; transition: background .3s; }
.auth-strength span { font-size: 11px; color: var(--muted); min-width: 44px; text-align: right; }
.auth-strength[data-score="1"] i:nth-child(-n+1) { background: #e0706a; }
.auth-strength[data-score="2"] i:nth-child(-n+2) { background: #e3a65c; }
.auth-strength[data-score="3"] i:nth-child(-n+3) { background: #d1ad6f; }
.auth-strength[data-score="4"] i { background: linear-gradient(90deg, #d1ad6f, #f0dcae); box-shadow: 0 0 8px #d1ad6f66; }

.auth-rules { list-style: none; display: flex; gap: 16px; margin: 8px 0 0; padding: 0; font-size: 11.5px; color: #8c8476; }
.auth-rules li::before { content: '○'; margin-right: 5px; }
.auth-rules li.ok { color: #cbb27e; }
.auth-rules li.ok::before { content: '●'; color: var(--gold); }

.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 4px; }
.auth-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #cfc6b7; cursor: pointer; margin-top: 14px; user-select: none; }
.auth-row .auth-check { margin: 0; }
.auth-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auth-check > span { width: 18px; height: 18px; border-radius: 5px; border: 1px solid #ffffff35; background: #0a0907; display: grid; place-items: center; transition: all .2s; flex-shrink: 0; }
.auth-check input:checked + span { background: linear-gradient(135deg, #e8cf9f, #c29e60); border-color: #e3c695; }
.auth-check input:checked + span::after { content: ''; width: 9px; height: 5px; border: 2px solid #15120d; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.auth-check input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.auth-link { background: none; padding: 0; color: var(--gold); font-size: 13px; font-weight: 500; }
.auth-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.auth-submit { width: 100%; margin-top: 18px; min-height: 52px; font-size: 14px; letter-spacing: .02em; }
.auth-submit .auth-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #15120d40; border-top-color: #15120d; animation: auth-spin .7s linear infinite; }
.auth-submit.busy .auth-spin { display: block; }
.auth-submit.busy span { opacity: .7; }
.auth-submit:disabled { opacity: 1; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-switch { text-align: center; font-size: 13px; margin: 14px 0 0; }

.auth-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 6px; padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5;
  color: #f2c4bf; background: #e0706a14; border: 1px solid #e0706a40; }
.auth-alert::before { content: '!'; display: grid; place-items: center; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: #e0706a; color: #1a0d0c; font-weight: 800; font-size: 12px; margin-top: 1px; }
.auth-alert[hidden] { display: none; }
.shake { animation: auth-shake .42s; }
@keyframes auth-shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

.auth-badge { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; color: var(--gold); margin-bottom: 18px;
  background: linear-gradient(140deg, #d1ad6f26, #d1ad6f06); border: 1px solid #d1ad6f45; box-shadow: 0 10px 30px #d1ad6f14; }
.auth-badge svg { width: 26px; height: 26px; }
.auth-badge.ok { animation: auth-pop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes auth-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.auth-done { padding-top: 34px; }

/* the header once signed in */
.account-link.signed { width: auto; display: flex; gap: 9px; align-items: center; padding: 4px 12px 4px 4px; border-radius: 30px;
  border: 1px solid #d1ad6f35; background: #d1ad6f0c; font-size: 12px; transition: border-color .2s; }
.account-link.signed:hover { border-color: #d1ad6f80; }
.auth-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-family: Cinzel, serif; font-weight: 700; color: #15120d;
  background: linear-gradient(135deg, #e8cf9f, #c29e60); }
.auth-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the account page */
.auth-page { max-width: 1100px; }
.acct-locked { text-align: center; padding: 70px 30px; border: 1px solid var(--border); border-radius: 22px;
  background: radial-gradient(ellipse at top, #d1ad6f12, transparent 60%), var(--surface); }
.acct-locked .auth-badge { margin: 0 auto 22px; }
.acct-locked h1 { font-size: clamp(36px, 4vw, 52px); }
.acct-locked p { max-width: 420px; margin: 14px auto 26px; }
.acct-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.acct-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; padding: 30px 34px; border-radius: 22px;
  border: 1px solid #d1ad6f26; background: linear-gradient(120deg, #d1ad6f16, #13120f 55%), var(--surface); }
.acct-id { display: flex; align-items: center; gap: 22px; }
.acct-id .avatar { width: 82px; height: 82px; font-size: 36px; border-radius: 20px; }
.acct-id h1 { font-size: clamp(32px, 4vw, 48px); margin: 4px 0; }
.acct-id p { margin: 0; font-size: 13px; }
.acct-out { gap: 10px; }

.acct-wallet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 40px; }
.acct-wallet div { padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.acct-wallet small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.acct-wallet b { display: block; font-size: 28px; font-weight: 500; margin-top: 6px; color: var(--text); }
.acct-wallet b.acct-state { font-size: 20px; color: var(--gold); padding-top: 6px; }
.acct-title { font-size: 30px; margin-bottom: 18px; }
.acct-chars { display: grid; gap: 10px; }
.acct-char { display: grid; grid-template-columns: auto 1fr auto auto; gap: 18px; align-items: center; padding: 16px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s, background .2s; }
.acct-char:hover { border-color: #d1ad6f66; transform: translateX(4px); background: #17150f; }
.acct-char b { font-weight: 600; font-size: 16px; }
.acct-char small { display: block; color: var(--muted); font-size: 12px; }
.acct-char-stats { display: flex; gap: 28px; font-size: 18px; }
.acct-char-stats small { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.acct-char-stats em { font-size: 13px; }
.acct-go { color: var(--gold); }
.acct-security { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 40px; padding: 26px 30px;
  border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.acct-security h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.acct-security h3 svg { color: var(--gold); width: 22px; }
.acct-security p { margin: 8px 0 0; font-size: 13px; max-width: 560px; }

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .auth-art { min-height: 170px; padding: 24px; }
  .auth-art-copy ul, .auth-art-copy .eyebrow { display: none; }
  .auth-art-copy h3 { font-size: 28px; margin: 10px 0 0; }
  .auth-art::before { background: linear-gradient(180deg, #0b0a08a0, #110f0c); }
  .auth-main { padding: 24px 22px 28px; }
  .acct-wallet { grid-template-columns: 1fr 1fr; }
  .acct-char { grid-template-columns: auto 1fr; }
  .acct-char-stats { grid-column: 1 / -1; }
  .acct-go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-art > img, .auth-art-glow, .auth-embers i { animation: none; }
}

/* The game's own cursors (Data/Interface/Cursor.ozt and CursorGet.ozt from the client). */
html, body { cursor: url('/assets/cursor/cursor.png') 2 2, auto; }
a, button, summary, label, select, [role=button], [role=tab], [tabindex="0"], input[type=checkbox], input[type=range], .auth-check {
  cursor: url('/assets/cursor/cursor-hand.png') 6 2, pointer; }
input:not([type=checkbox]):not([type=range]), textarea { cursor: text; }
button:disabled { cursor: url('/assets/cursor/cursor.png') 2 2, not-allowed; }

/* The real logo next to the name, and the game's heading font (Cinzel) for the menu only. */
.brand .brand-logo { width: 58px; height: auto; max-height: 46px; object-fit: contain; filter: drop-shadow(0 0 10px #3b82f633); }
.nav, .nav .nav-menu > summary, .nav > a { font-family: Cinzel, serif; font-weight: 700; letter-spacing: .06em; font-size: 13px; }
.mega b { font-family: Cinzel, serif; letter-spacing: .03em; }

/* The account menu under the name (signed in). */
.header-actions { position: relative; }
.auth-caret { width: 14px; height: 14px; opacity: .7; transition: transform .2s; }
.account-link[aria-expanded=true] .auth-caret { transform: rotate(180deg); }
.acct-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 250px; padding: 8px; border-radius: 16px;
  background: #15130fF5; border: 1px solid #d1ad6f40; box-shadow: 0 24px 60px #000c; backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .18s, transform .18s; }
.acct-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.acct-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid #ffffff12; margin-bottom: 6px; }
.acct-menu-head b { display: block; font-size: 15px; }
.acct-menu-head small { color: var(--muted); font-size: 11.5px; }
.acct-menu-head span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.acct-menu-head em { color: #f0d9a8; font-weight: 700; font-size: 14px; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 13.5px;
  color: #ddd5c7; background: none; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: #d1ad6f14; color: #fff; }
.acct-menu i { width: 18px; text-align: center; font-style: normal; color: var(--gold); }
.acct-menu-sep { height: 1px; margin: 6px 4px; background: #ffffff12; }
.acct-menu-coins { display: flex !important; gap: 14px; margin-top: 6px; } .acct-menu-coins > span { display: inline; margin: 0; }
