:root {
    --bg: #070811;
    --panel: rgba(11, 14, 25, .88);
    --panel-soft: rgba(20, 24, 40, .76);
    --text: #f7f5ee;
    --muted: #9297a7;
    --gold: #e9b96e;
    --gold-light: #ffe0a3;
    --cyan: #65e6f4;
    --green: #75f0a5;
    --line: rgba(255, 255, 255, .11);
    --display: 'Montserrat', Arial, sans-serif;
    --sans: 'Inter', Arial, sans-serif;
    --container: 1200px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: var(--sans); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -5;
    background: url('../images/hero-map.png') 64% center / cover no-repeat;
    filter: saturate(.78) brightness(.67);
    transform: scale(1.025);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -4;
    background:
        linear-gradient(90deg, rgba(7, 8, 17, .98) 0%, rgba(7, 8, 17, .82) 45%, rgba(7, 8, 17, .67) 100%),
        linear-gradient(0deg, rgba(7, 8, 17, .95), transparent 55%, rgba(7, 8, 17, .42));
}

body.login-page::before {
    background: url('../images/login-background.jpg') center center / cover no-repeat;
    filter: saturate(.76) brightness(.58) contrast(1.04);
    transform: none;
}

body.login-page::after {
    background:
        linear-gradient(90deg, rgba(7, 8, 17, .92) 0%, rgba(7, 8, 17, .72) 42%, rgba(7, 8, 17, .54) 100%),
        linear-gradient(180deg, rgba(7, 8, 17, .62) 0%, rgba(7, 8, 17, .10) 25%, rgba(7, 8, 17, .88) 100%),
        radial-gradient(circle at 50% 24%, rgba(101, 230, 244, .12), transparent 28%);
}

body.profile-page::before {
    background: url('../images/hero-map.png') 68% center / cover no-repeat;
    filter: saturate(.78) brightness(.60);
}

.site-header {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    height: 88px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 8, 17, .68);
    backdrop-filter: blur(18px);
}

.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: flex; align-items: center; margin-left: 10px; }
.brand-logo { width: 190px; height: 74px; object-fit: contain; object-position: left center; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .55)); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: #b9bbc5; font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; transition: .25s ease; }
.main-nav a:hover,
.main-nav a.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

        .social-links { display:flex; align-items:center; gap:10px; }
        .social-link { width:28px; height:48px; display:grid; place-items:center; color:#c8cad2; background:transparent; border:0; transition:color .22s ease, transform .22s ease, filter .22s ease; }
        .social-link svg { width:18px; height:18px; }
        .social-link:hover { color:var(--gold-light); transform:translateY(-2px); filter:drop-shadow(0 0 10px rgba(233,185,110,.24)); }
        .mobile-auth-link { display:none; }

.btn {
    min-height: 48px;
    padding: 0 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    color: #080b13;
    background: linear-gradient(110deg, var(--gold-light), var(--gold));
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
    transition: transform .25s ease, filter .25s ease, border-color .25s ease;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost { color: #fff; border-color: var(--line); background: rgba(255, 255, 255, .035); }
.btn-ghost-active { border-color: rgba(233, 185, 110, .36); color: var(--gold-light); background: rgba(233, 185, 110, .08); }
.btn svg { width: 16px; height: 16px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); color: #fff; background: rgba(255, 255, 255, .04); }

.register-shell { min-height: 100vh; position: relative; display: grid; align-items: center; padding: 132px 0 70px; overflow: hidden; isolation: isolate; }
.character-art {
    position: absolute;
    z-index: -1;
    left: -12%;
    bottom: -12%;
    width: min(63vw, 930px);
    opacity: .25;
    filter: saturate(.8) drop-shadow(20px 20px 45px rgba(0, 0, 0, .5));
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%), linear-gradient(0deg, #000 55%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, #000 55%, transparent 100%), linear-gradient(0deg, #000 55%, transparent 100%);
    mask-composite: intersect;
    pointer-events: none;
}

.register-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 510px); gap: 90px; align-items: center; }
.register-grid-login { grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); }
.intro { max-width: 590px; padding-left: 8px; }
.intro-login { max-width: 650px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--gold-light); font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.intro h1,
.profile-copy h1 { max-width: 560px; margin: 0; font: 800 clamp(48px, 5vw, 74px)/.98 var(--display); letter-spacing: -.055em; text-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.intro h1 span,
.profile-copy h1 span { display: block; color: transparent; background: linear-gradient(105deg, #fff 6%, var(--gold-light) 48%, var(--cyan) 95%); background-clip: text; -webkit-background-clip: text; }
.intro-copy,
.profile-copy p { max-width: 520px; margin: 25px 0 34px; color: #b7bac5; font-size: 15px; line-height: 1.75; }
.realm-list { display: flex; flex-wrap: wrap; gap: 12px; }
.realm-item,
.summary-card {
    min-width: 145px;
    padding: 15px 17px;
    border: 1px solid var(--line);
    background: rgba(10, 13, 23, .48);
    backdrop-filter: blur(8px);
}
.realm-item small,
.summary-card small { display: block; margin-bottom: 5px; color: #737887; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
.realm-item strong,
.summary-card strong { font: 600 11px var(--display); letter-spacing: .03em; }

.form-card {
    position: relative;
    padding: 36px;
    border: 1px solid rgba(233, 185, 110, .24);
    background: linear-gradient(145deg, rgba(17, 20, 34, .94), rgba(8, 10, 19, .93));
    box-shadow: 0 32px 90px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.form-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 95% 5%, rgba(101, 230, 244, .1), transparent 28%), radial-gradient(circle at 5% 95%, rgba(233, 185, 110, .08), transparent 28%);
}
.form-card > * { position: relative; z-index: 1; }
.form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.step { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.form-head h2 { margin: 7px 0 0; font: 800 27px/1.08 var(--display); letter-spacing: -.035em; }
.form-rune { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(101, 230, 244, .23); border-radius: 50%; color: var(--cyan); font: 600 20px var(--display); box-shadow: 0 0 35px rgba(101, 230, 244, .08); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; color: #a4a7b3; font-size: 8px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.input-wrap { position: relative; }
.field input { width: 100%; height: 50px; padding: 0 45px 0 15px; border: 1px solid var(--line); outline: 0; color: #fff; background: rgba(255, 255, 255, .035); font-size: 12px; transition: border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.field input::placeholder { color: #555b69; }
.field input:focus { border-color: rgba(101, 230, 244, .45); background: rgba(101, 230, 244, .045); box-shadow: 0 0 0 3px rgba(101, 230, 244, .045); }
.field-icon,
.password-toggle { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; display: grid; place-items: center; transform: translateY(-50%); color: #6f7482; background: none; border: 0; padding: 0; }
.field-icon svg,
.password-toggle svg { width: 16px; height: 16px; }
.strength { margin-top: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength span { height: 2px; background: rgba(255, 255, 255, .09); transition: .25s ease; }
.strength[data-level="1"] span:nth-child(-n+1) { background: #ef6f70; }
.strength[data-level="2"] span:nth-child(-n+2) { background: var(--gold); }
.strength[data-level="3"] span:nth-child(-n+3) { background: #b7df7b; }
.strength[data-level="4"] span { background: var(--green); }
.strength-note { margin-top: 6px; color: #626775; font-size: 8px; }
.terms { margin: 20px 0; display: flex; align-items: flex-start; gap: 10px; color: #777c8a; font-size: 10px; line-height: 1.55; }
.terms input { appearance: none; flex: 0 0 auto; width: 16px; height: 16px; margin: 0; display: grid; place-items: center; border: 1px solid rgba(233, 185, 110, .35); background: rgba(233, 185, 110, .04); }
.terms input:checked::after { content: '✓'; color: var(--gold-light); font-size: 11px; }
.terms a { color: #c8c5bc; text-decoration: underline; text-underline-offset: 3px; }
.submit-btn { width: 100%; min-height: 54px; border: 0; }
.form-foot { margin: 17px 0 0; text-align: center; color: #656a78; font-size: 10px; }
.form-foot a,
.auth-meta a { color: var(--cyan); }
.notice { display: none; margin: 0 0 18px; padding: 12px 14px; color: #a9f5c5; border: 1px solid rgba(117, 240, 165, .22); background: rgba(117, 240, 165, .06); font-size: 10px; line-height: 1.5; }
.notice.show,
.notice.error,
.notice.success { display: block; }
.notice.error { border-color: rgba(255, 110, 110, .35); background: rgba(255, 80, 80, .08); color: #ffc4c4; }
.notice.success { border-color: rgba(117, 240, 165, .35); background: rgba(117, 240, 165, .08); color: #bdf7cf; }
.auth-single { grid-template-columns: 1fr; }
.auth-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 14px; font-size: 12px; color: var(--muted); }
.account-card { display: grid; gap: 14px; }
.account-row,
.security-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.account-row:last-child,
.security-item:last-child { border-bottom: 0; }
.account-row span,
.security-item span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.account-row strong,
.security-item strong { font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.inline-form { margin: 18px 0 0; }
.inline-form .btn { width: 100%; }

.profile-shell { padding-bottom: 90px; }
.profile-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.profile-hero { grid-column: 1 / -1; }
.profile-top { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.profile-avatar {
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(233, 185, 110, .25);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(101, 230, 244, .26), rgba(7, 8, 17, .82) 60%), rgba(255, 255, 255, .03);
    color: var(--gold-light);
    font: 800 34px/1 var(--display);
    letter-spacing: .08em;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.profile-copy { flex: 1; min-width: 0; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-badge {
    min-height: 34px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .035);
    color: #d9dce5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.profile-badge.is-active { border-color: rgba(117, 240, 165, .26); color: #c7f8d7; background: rgba(117, 240, 165, .08); }
.profile-badge.is-muted { border-color: rgba(233, 185, 110, .22); color: #edd6b2; background: rgba(233, 185, 110, .08); }
.profile-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.profile-panel { min-height: 100%; }
.security-list { display: grid; gap: 0; }

@media (max-width: 980px) {
    .main-nav { gap: 17px; }
    .main-nav a { font-size: 9px; }
    .nav-actions { gap: 7px; }
    .social-links { gap: 6px; }
    .social-link { width: 25px; }
    .auth-action { padding-inline: 15px; }
    .register-grid { grid-template-columns: 1fr minmax(390px, 470px); gap: 40px; }
    .character-art { left: -28%; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
    .container { width: min(calc(100% - 30px), var(--container)); }
    .site-header { height: 76px; }
    .brand { margin-left: 4px; }
    .brand-logo { width: 160px; height: 66px; }
    .main-nav {
        position: absolute;
        top: 76px;
        left: 15px;
        right: 15px;
        padding: 22px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        border: 1px solid var(--line);
        background: rgba(8, 10, 19, .98);
    }
    .main-nav.open { display: flex; }
    .main-nav .mobile-auth-link { display: block; }
    .nav-actions .btn { display: none; }
    .social-links { gap: 4px; }
    .social-link { width: 24px; height: 44px; }
    .menu-toggle { display: grid; place-items: center; }
    .register-shell { padding: 112px 0 55px; }
    .register-grid,
    .register-grid-login,
    .profile-grid { grid-template-columns: 1fr; gap: 38px; }
    .intro { padding: 0 3px; }
    .intro h1,
    .profile-copy h1 { max-width: 460px; font-size: clamp(38px, 11vw, 58px); }
    .intro-copy,
    .profile-copy p { margin: 20px 0 25px; font-size: 13px; }
    .character-art { width: 800px; left: -360px; bottom: 20%; opacity: .12; }
    .form-card { padding: 28px; }
    .profile-top { align-items: flex-start; flex-direction: column; gap: 18px; }
    .profile-avatar { width: 96px; height: 96px; flex-basis: 96px; font-size: 28px; }
    .profile-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .register-shell { padding-top: 104px; }
    .intro h1,
    .profile-copy h1 { font-size: clamp(34px, 10.8vw, 47px); }
    .realm-list { display: grid; grid-template-columns: 1fr 1fr; }
    .realm-item { min-width: 0; padding: 13px; }
    .form-card { padding: 24px 18px; clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px); }
    .field-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .form-head h2 { font-size: 23px; }
    .profile-badges { gap: 8px; }
    .profile-badge { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .001ms !important; }
}

body.register-page::before {
    background: url('../images/register-background.jpg') center center / cover no-repeat;
    filter: saturate(.78) brightness(.56) contrast(1.04);
    transform: none;
}
body.register-page::after {
    background:
        linear-gradient(90deg, rgba(7,8,17,.96) 0%, rgba(7,8,17,.78) 43%, rgba(7,8,17,.58) 100%),
        linear-gradient(180deg, rgba(7,8,17,.54) 0%, rgba(7,8,17,.08) 34%, rgba(7,8,17,.9) 100%),
        radial-gradient(circle at 44% 28%, rgba(101,230,244,.1), transparent 31%);
}

.registration-disclaimer {
    margin: -4px 0 18px;
    color: #626775;
    font-size: 9px;
    line-height: 1.65;
}

.verification-code-input {
    text-align: center;
    letter-spacing: .32em;
    font: 700 20px var(--display) !important;
    padding-left: 45px !important;
}
.verify-page .field-grid { row-gap: 20px; }
.verify-page .submit-btn { margin-top: 22px; }
.resend-form { margin-top: 13px; text-align: center; }
.verification-link {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--cyan);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
}
.verification-link:hover { color: #fff; }

.language-picker { position: relative; }
.language-picker summary {
    min-width: 74px;
    height: 48px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
    color: #fff;
    list-style: none;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker[open] summary { border-color: rgba(101,230,244,.36); background: rgba(101,230,244,.06); }
.language-flag { width:24px; height:18px; display:block; object-fit:cover; flex:0 0 auto; border:1px solid rgba(255,255,255,.12); box-shadow:0 2px 8px rgba(0,0,0,.28); }
.language-code { white-space: nowrap; }
.language-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 10px);
    right: 0;
    width: 245px;
    padding: 9px;
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(8,10,19,.98);
    box-shadow: 0 24px 70px rgba(0,0,0,.5);
    backdrop-filter: blur(18px);
}
.language-option-form { margin: 0; }
.language-option {
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 9px;
    border: 0;
    background: transparent;
    color: #c6c9d2;
    text-align: left;
}
.language-option:hover,
.language-option.active { background: rgba(255,255,255,.055); color: #fff; }
.language-option.active { box-shadow: inset 2px 0 0 var(--gold); }
.language-name { font-size: 10px; font-weight: 700; }
.language-region { color: #626775; font-size: 7px; font-weight: 800; letter-spacing: .12em; }

.legal-footer {
    border-top: 1px solid rgba(255,255,255,.07);
    background: #06070d;
}
.legal-footer-inner {
    min-height: 118px;
    padding-top: 25px;
    padding-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.legal-footer p {
    max-width: 790px;
    margin: 0;
    color: #575c69;
    font-size: 9px;
    line-height: 1.75;
}
.legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 17px; }
.legal-footer a { color: #7f8491; font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.legal-footer a:hover { color: var(--gold-light); }

.legal-shell { min-height: 100vh; padding: 150px 0 76px; }
.legal-grid { display: grid; grid-template-columns: minmax(260px,.48fr) minmax(0,1fr); gap: 58px; align-items: start; }
.legal-heading { position: sticky; top: 126px; }
.legal-heading h1 { margin: 0; font: 800 clamp(38px,4vw,58px)/1.02 var(--display); letter-spacing: -.05em; }
.legal-heading > p:last-child { margin: 22px 0 0; color: #a1a5b2; font-size: 13px; line-height: 1.75; }
.legal-document { padding: 40px; }
.legal-section { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.legal-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.legal-section h2 { margin: 7px 0 12px; font: 700 20px/1.25 var(--display); letter-spacing: -.025em; }
.legal-section p { margin: 0; color: #9fa4b0; font-size: 12px; line-height: 1.85; }

@media (max-width: 1120px) {
    .site-header .main-nav { gap: 15px; }
    .site-header .nav-actions { gap: 7px; }
    .site-header .nav-actions .btn { padding-inline: 15px; }
}
@media (max-width: 980px) {
    .language-picker summary { width: 48px; min-width: 48px; padding: 0; }
    .language-code { display: none; }
    .legal-grid { grid-template-columns: 1fr; gap: 28px; }
    .legal-heading { position: static; }
}
@media (max-width: 780px) {
    .language-picker { margin-left: auto; }
    .language-picker summary { height: 44px; }
    .language-menu { right: -52px; width: min(245px, calc(100vw - 30px)); }
    .legal-footer-inner { flex-direction: column; align-items: flex-start; }
    .legal-footer nav { justify-content: flex-start; }
    .legal-shell { padding-top: 112px; }
    .legal-document { padding: 28px; }
}

html:lang(th) body,
html:lang(th) input,
html:lang(th) button { font-family:'Noto Sans Thai',var(--sans); }
html:lang(th) h1,
html:lang(th) h2,
html:lang(th) h3,
html:lang(th) .btn,
html:lang(th) .main-nav a,
html:lang(th) .profile-avatar { font-family:'Noto Sans Thai',var(--display); letter-spacing:0; }
html:lang(zh) body,
html:lang(zh) input,
html:lang(zh) button { font-family:'Noto Sans TC',var(--sans); }
html:lang(zh) h1,
html:lang(zh) h2,
html:lang(zh) h3,
html:lang(zh) .btn,
html:lang(zh) .main-nav a,
html:lang(zh) .profile-avatar { font-family:'Noto Sans TC',var(--display); letter-spacing:.01em; }

.recovery-code-input {
    letter-spacing: .22em;
    font-size: 18px !important;
}
.password-policy-note {
    margin: 14px 0 18px;
    color: #6f7482;
    font-size: 9px;
    line-height: 1.65;
}


.profile-meta-note {
    margin: 16px 0 0;
    color: #747987;
    font-size: 10px;
    line-height: 1.7;
}
.profile-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.profile-actions .btn { width: 100%; }
.profile-actions .inline-form { margin: 0; }
@media (max-width: 560px) {
    .profile-actions { grid-template-columns: 1fr; }
}

/* v0.8.3 profile avatar refresh */
body.profile-page::before {
    background: url('../images/profile-background.jpg') 68% center / cover no-repeat;
    filter: saturate(.84) brightness(.5) contrast(1.04);
    transform: none;
}

body.profile-page::after {
    background:
        linear-gradient(90deg, rgba(7, 8, 17, .9) 0%, rgba(7, 8, 17, .72) 40%, rgba(7, 8, 17, .58) 100%),
        linear-gradient(180deg, rgba(7, 8, 17, .64) 0%, rgba(7, 8, 17, .14) 26%, rgba(7, 8, 17, .9) 100%),
        radial-gradient(circle at 82% 20%, rgba(131, 88, 180, .18), transparent 28%);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.profile-side-card {
    display: grid;
    gap: 26px;
}

.avatar-card {
    display: grid;
    gap: 20px;
}

.avatar-preview-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.avatar-preview {
    position: relative;
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(233, 185, 110, .24);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(101, 230, 244, .22), rgba(7, 8, 17, .82) 60%), rgba(255, 255, 255, .03);
    color: var(--gold-light);
    font: 800 42px/1 var(--display);
    letter-spacing: .08em;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-preview.has-image span {
    display: none;
}

.avatar-tip {
    position: relative;
}

.avatar-tip-trigger {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(101, 230, 244, .22);
    background: rgba(101, 230, 244, .06);
    color: var(--cyan);
    font: 700 14px var(--display);
}

.avatar-tip-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    padding: 14px 16px;
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    background: rgba(8, 10, 19, .96);
    color: #d7dbe6;
    font-size: 11px;
    line-height: 1.55;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .2s ease;
    z-index: 3;
}

.avatar-tip:hover .avatar-tip-panel,
.avatar-tip:focus-within .avatar-tip-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.avatar-tip-panel strong {
    color: #fff;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.avatar-form {
    display: grid;
    gap: 14px;
}

.avatar-upload-label {
    position: relative;
    min-height: 52px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .035);
    color: #eff2fa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
}

.avatar-upload-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.avatar-file-name {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.avatar-submit {
    width: 100%;
}

.profile-actions.solo {
    margin-top: 4px;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.profile-actions.solo .inline-form,
.no-margin {
    margin: 0;
}

@media (max-width: 780px) {
    .avatar-preview-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .avatar-preview {
        width: 120px;
        height: 120px;
        font-size: 34px;
    }

    .avatar-tip-panel {
        width: min(260px, calc(100vw - 70px));
        left: 0;
        right: auto;
    }
}


/* v0.8.4 account character template */
.character-panel {
    grid-column: 1 / -1;
    padding: 34px;
    overflow: hidden;
}

.character-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.character-panel-head h2 {
    margin: 7px 0 0;
    font: 800 27px/1.08 var(--display);
    letter-spacing: -.035em;
}

.character-sync-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(101, 230, 244, .14);
    background: rgba(101, 230, 244, .04);
    color: #8e96aa;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.character-sync-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7080;
    box-shadow: 0 0 0 4px rgba(107, 112, 128, .08);
}

.character-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.character-tab {
    min-width: 0;
    min-height: 66px;
    padding: 10px 13px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 10px;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .025);
    color: #c7cbd6;
    text-align: left;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.character-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(233, 185, 110, .22);
}

.character-tab.is-active {
    border-color: rgba(233, 185, 110, .34);
    background: linear-gradient(120deg, rgba(233, 185, 110, .08), rgba(101, 230, 244, .035));
    color: #fff;
    box-shadow: inset 2px 0 0 var(--gold);
}

.character-tab-emblem {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(101, 230, 244, .16);
    background: rgba(101, 230, 244, .04);
    color: var(--cyan);
    font: 700 10px var(--display);
    letter-spacing: .08em;
}

.character-tab-copy {
    min-width: 0;
}

.character-tab-copy strong,
.character-tab-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.character-tab-copy strong {
    font: 700 11px var(--display);
    letter-spacing: .01em;
}

.character-tab-copy small {
    margin-top: 5px;
    color: #747b8b;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.character-tab-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #626876;
    box-shadow: 0 0 0 4px rgba(98, 104, 118, .08);
}

.character-tab-status.is-online {
    background: var(--green);
    box-shadow: 0 0 10px rgba(117, 240, 165, .5);
}

.character-sheet {
    display: none;
}

.character-sheet.is-active {
    display: block;
}

.character-identity {
    padding: 18px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(120deg, rgba(255, 255, 255, .035), rgba(101, 230, 244, .018));
}

.character-portrait-placeholder {
    width: 118px;
    height: 142px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px solid rgba(233, 185, 110, .18);
    background:
        radial-gradient(circle at 50% 35%, rgba(101, 230, 244, .1), transparent 34%),
        linear-gradient(155deg, rgba(233, 185, 110, .045), rgba(7, 8, 17, .62));
    color: #6d7484;
}

.character-portrait-rune {
    color: rgba(101, 230, 244, .54);
    font: 600 38px/1 var(--display);
}

.character-portrait-placeholder small {
    max-width: 90px;
    text-align: center;
    font-size: 7px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.character-identity-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 22px;
}

.character-name-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.character-name-line small,
.character-core-meta small,
.character-stat span,
.equipment-slot small {
    display: block;
    color: #767d8d;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.character-name-line h3 {
    margin: 5px 0 0;
    font: 800 28px/1.05 var(--display);
    letter-spacing: -.035em;
}

.character-presence {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    color: #878d9b;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.character-presence i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #676d7b;
}

.character-presence.is-online i {
    background: var(--green);
    box-shadow: 0 0 10px rgba(117, 240, 165, .45);
}

.character-core-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.character-core-meta > div {
    min-height: 56px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(7, 8, 17, .34);
}

.character-core-meta strong {
    display: block;
    margin-top: 7px;
    font: 700 12px var(--display);
}

.character-body-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 16px;
    margin-top: 16px;
}

.character-stats-block,
.character-equipment-block {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(7, 8, 17, .36);
}

.character-subhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.character-subhead > span {
    font: 700 11px var(--display);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.character-subhead > small {
    color: #656c7b;
    font-size: 8px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.character-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.character-stat {
    min-height: 62px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, .065);
    background: rgba(255, 255, 255, .018);
}

.character-stat strong {
    display: block;
    margin-top: 8px;
    color: #f0efe9;
    font: 800 16px var(--display);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.equipment-slot {
    min-width: 0;
    min-height: 66px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(255, 255, 255, .065);
    background: rgba(255, 255, 255, .018);
}

.equipment-rune {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(233, 185, 110, .14);
    color: rgba(233, 185, 110, .64);
    background: rgba(233, 185, 110, .025);
    font-size: 16px;
}

.equipment-slot strong {
    display: block;
    margin-top: 6px;
    color: #777d8a;
    font: 600 10px var(--display);
}

@media (max-width: 900px) {
    .character-tabs {
        grid-template-columns: 1fr;
    }

    .character-body-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .character-panel {
        padding: 26px 22px;
    }

    .character-panel-head,
    .character-name-line {
        flex-direction: column;
        align-items: flex-start;
    }

    .character-identity {
        grid-template-columns: 1fr;
    }

    .character-portrait-placeholder {
        width: 104px;
        height: 124px;
    }

    .character-core-meta,
    .equipment-grid {
        grid-template-columns: 1fr;
    }
}


/* Public preview / launch gate ------------------------------------------------ */
body.launch-page::before {
    background: url('../images/profile-background.jpg') 67% center / cover no-repeat;
    filter: saturate(.72) brightness(.48) contrast(1.08);
}
body.launch-page::after {
    background:
        linear-gradient(90deg, rgba(7,8,17,.94) 0%, rgba(7,8,17,.78) 45%, rgba(7,8,17,.62) 100%),
        linear-gradient(180deg, rgba(7,8,17,.58) 0%, rgba(7,8,17,.10) 28%, rgba(7,8,17,.92) 100%),
        radial-gradient(circle at 72% 34%, rgba(101,230,244,.12), transparent 30%),
        radial-gradient(circle at 28% 72%, rgba(233,185,110,.09), transparent 28%);
}
.launch-shell { min-height: 100svh; }
.launch-grid { gap: 76px; }
.launch-intro .intro-copy { max-width: 590px; }
.launch-card { overflow: hidden; }
.launch-card::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    right: -72px;
    bottom: -90px;
    border: 1px solid rgba(101,230,244,.08);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(101,230,244,.018), 0 0 0 58px rgba(233,185,110,.012);
    pointer-events: none;
}
.launch-rune { color: var(--gold-light); border-color: rgba(233,185,110,.28); box-shadow: 0 0 35px rgba(233,185,110,.08); }
.launch-hourglass-mark {
    width: 98px;
    height: 98px;
    margin: 4px 0 22px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(101,230,244,.20);
    background: linear-gradient(145deg, rgba(101,230,244,.08), rgba(233,185,110,.04));
    color: var(--cyan);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 18px 50px rgba(0,0,0,.24);
}
.launch-hourglass-mark svg { width: 54px; height: 54px; overflow: visible; }
.launch-hourglass-turn {
    transform-origin: 32px 32px;
    animation: launchHourglassTurn 5.2s cubic-bezier(.65,.05,.36,1) infinite;
}
.launch-hourglass-sand-top,
.launch-hourglass-sand-bottom,
.launch-hourglass-stream,
.launch-hourglass-drop {
    animation: launchHourglassPulse 1.4s ease-in-out infinite;
}
.launch-panel-copy { margin: 0; color: #aeb2bf; font-size: 13px; line-height: 1.8; }
.launch-feature-line {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin: 16px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.launch-feature-line small {
    color: #7c8291;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.launch-feature-line strong { color: #f7f5ee; font-size: 13px; font-weight: 700; }
.launch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.launch-actions .btn { min-width: 0; text-align: center; }
@keyframes launchHourglassTurn {
    0%, 22% { transform: rotate(0deg); }
    34%, 56% { transform: rotate(180deg); }
    68%, 100% { transform: rotate(360deg); }
}
@keyframes launchHourglassPulse {
    0%, 100% { opacity: .92; }
    50% { opacity: .54; }
}
@media (max-width: 780px) {
    .launch-grid { gap: 34px; }
    .launch-actions { grid-template-columns: 1fr; }
    .launch-hourglass-mark { width: 82px; height: 82px; margin-bottom: 18px; }
    .launch-hourglass-mark svg { width: 46px; height: 46px; }
    .launch-feature-line { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
}

.main-nav a[href$="/beta-tester"]{white-space:nowrap}
@media(min-width:1121px){.site-header .main-nav{gap:18px}}
