/* Shared pointed buttons. Page-specific shop/header treatments retain priority. */
.button {
    background-image: url('../images/homepage-gold/button-pointed-gold-v2.webp');
    background-position: center;
    background-size: 100% 100%;
    color: #291b0a;
    text-shadow: 0 1px #ffe6a56b;
}
.button::after { pointer-events: none; }
.button:focus-visible { outline: 2px solid #f2d394; outline-offset: 4px; }
.button:is(:disabled, [aria-disabled="true"]) { opacity: .5; cursor: not-allowed; filter: saturate(.35); }
.top-buttons .button.secondary { background-image: url('../images/homepage-gold/button-pointed-gold-v2.webp'); }
.top-buttons .button div { background: none; color: #291b0a; -webkit-text-fill-color: currentColor; }

/* Authentication: black forged steel, fine gold inlay, no changes to form logic. */
.modal.auth-modal {
    z-index: 20000;
    /* jQuery handles the overlay fade; a CSS opacity transition fights it. */
    transition: none;
    background: radial-gradient(ellipse at 50% 42%, #94713912, transparent 65%), #030404c9;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    color-scheme: dark;
}
.modal.auth-modal .auth-modal-content {
    box-sizing: border-box;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    padding: 48px 38px 30px;
    border: 1px solid #a1854e;
    border-radius: 3px;
    background: linear-gradient(125deg, #0b0d0de8, #101210f2 55%, #090b0bf5),
        url('../images/item-mall-forge/forged-steel-v1.webp') center / 512px;
    box-shadow: 0 30px 90px #000b, inset 0 1px #ffe8a947, inset 0 -1px #8e704529;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    scrollbar-width: thin;
    scrollbar-color: #967d4d #0c0e0d;
    scrollbar-gutter: stable;
}
.modal.auth-modal .auth-modal-content::before {
    inset: 7px;
    border: 1px solid #b39a612e;
    border-radius: 0;
    background: none;
}
.modal.auth-modal .auth-modal-content::after {
    inset: 11px auto auto 50%;
    width: 25px;
    height: 25px;
    transform: translateX(-50%);
    background: url('../images/homepage-gold/frame-jewel-v2.webp') center / contain no-repeat;
    mix-blend-mode: screen;
}
.modal.auth-modal .auth-modal-content::-webkit-scrollbar { width: 6px; }
.modal.auth-modal .auth-modal-content::-webkit-scrollbar-track { background: #0c0e0d; }
.modal.auth-modal .auth-modal-content::-webkit-scrollbar-thumb { background: #967d4d; border-radius: 3px; }
.modal.auth-modal :is(.border-bottom-left, .border-bottom-right) { display: none; }
.modal.auth-modal .modal-title { margin: 0 0 27px; padding: 0 10px 22px; }
.modal.auth-modal .modal-title::after {
    content: '';
    display: block;
    position: absolute;
    inset: auto 8% 0;
    width: auto;
    height: 1px;
    transform: none;
    background: linear-gradient(90deg, transparent, #9d8049 25%, #e0c488 50%, #9d8049 75%, transparent);
    box-shadow: none;
}
.modal.auth-modal .modal-title span {
    color: #edd8a7;
    background: none;
    -webkit-text-fill-color: currentColor;
    font: 500 29px/1.25 Georgia, 'Times New Roman', serif;
    letter-spacing: .08em;
    text-shadow: 0 2px 3px #000;
    overflow-wrap: anywhere;
}
.modal.auth-modal .registration-form { gap: 17px; }
.modal.auth-modal .form-group { width: 100%; min-width: 0; gap: 8px; }
.modal.auth-modal .registration-text {
    color: #ccb888;
    font: 600 11px/1.4 'Open Sans', Arial, sans-serif;
    letter-spacing: .1em;
}
.modal.auth-modal .input-container {
    border: 1px solid #665b42;
    border-radius: 2px;
    background: #080b0a;
    box-shadow: inset 0 2px 5px #0008;
    transition: border-color .16s, box-shadow .16s;
}
.modal.auth-modal .input-container:focus-within {
    border-color: #dab976;
    box-shadow: 0 0 0 2px #c6a35a29, inset 0 2px 5px #0008;
    transform: none;
}
.modal.auth-modal .form-input {
    border-radius: 2px;
    height: 46px;
    color: #f0eade;
    caret-color: #e4c380;
    font: 400 14px/1.4 'Open Sans', Arial, sans-serif;
}
.modal.auth-modal .form-input::placeholder { color: #a39f92; opacity: 1; }
.modal.auth-modal .form-input-with-icon { padding-left: 45px; }
.modal.auth-modal .form-input:-webkit-autofill {
    -webkit-text-fill-color: #f0eade;
    -webkit-box-shadow: inset 0 0 0 100px #13150f;
    caret-color: #e4c380;
}
.modal.auth-modal .input-container .icon-container {
    width: 17px;
    height: 19px;
    left: 15px;
    background: #c8ac70;
    mask: var(--auth-field-icon) center / contain no-repeat;
    -webkit-mask: var(--auth-field-icon) center / contain no-repeat;
    pointer-events: none;
}
.modal.auth-modal .icon-user { --auth-field-icon: url('../images/icon-user.png.webp'); }
.modal.auth-modal .icon-password { --auth-field-icon: url('../images/icon-password.png.webp'); }
.modal.auth-modal .icon-email { --auth-field-icon: url('../images/icon-email.png.webp'); }
.modal.auth-modal .modal-info-submit { margin-top: 6px; gap: 19px; }
.modal.auth-modal .modal-info-submit .button {
    box-sizing: border-box;
    width: min(100%, 280px);
    height: 62px;
    min-height: 62px;
    padding: 12px 34px;
    background: url('../images/homepage-gold/button-pointed-gold-v2.webp') center / 100% 100% no-repeat;
    border: 0;
    border-radius: 0;
    color: #291b0a;
    font: 600 15px/1.2 Georgia, 'Times New Roman', serif;
    letter-spacing: .065em;
    text-shadow: 0 1px #ffe6a580;
    filter: drop-shadow(0 5px 8px #0005);
    transition: filter .16s;
}
.modal.auth-modal .modal-info-submit .button::after { content: none; }
.modal.auth-modal .modal-info-submit .button:hover:not(:disabled) { filter: brightness(1.1) drop-shadow(0 5px 8px #0005); }
.modal.auth-modal .auth-links { gap: 22px; margin-top: 0; flex-wrap: wrap; }
.modal.auth-modal :is(.auth-links a, .modal-link) { color: #dbc18a; font-size: 11px; line-height: 1.6; }
.modal.auth-modal :is(.auth-links a, .modal-link):hover { color: #fff0c3; opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.modal.auth-modal :is(a, button):focus-visible { outline: 2px solid #efd394; outline-offset: 4px; }
.modal.auth-modal .checkbox-wrapper { width: 100%; }
.modal.auth-modal .custom-checkbox + label { color: #c6c0b1; font: 400 12px/1.6 'Open Sans', Arial, sans-serif; flex-wrap: wrap; }
.modal.auth-modal .custom-checkbox + label::before { border: 1px solid #ac8d50; background: #080b0a; border-radius: 2px; width: 17px; height: 17px; }
.modal.auth-modal .custom-checkbox:checked + label::before { content: '\2713'; background: #d7b36a; color: #201909; display: grid; place-items: center; font: 700 13px/1 Arial, sans-serif; }
.modal.auth-modal .custom-checkbox:focus-visible + label::before { outline: 2px solid #f2d394; outline-offset: 3px; }
.modal.auth-modal .notification { font: 400 13px/1.6 'Open Sans', Arial, sans-serif; overflow-wrap: anywhere; }
.modal.auth-modal .notification:empty { display: none; }
.modal.auth-modal .close {
    box-sizing: border-box;
    top: 7px;
    right: 7px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 2px;
    color: #c6b27e;
    filter: none;
    box-shadow: none;
}
.modal.auth-modal .close::before, .modal.auth-modal .close::after {
    content: '';
    position: absolute;
    top: 21px;
    left: 14px;
    width: 16px;
    height: 1px;
    background: currentColor;
    transform: rotate(45deg);
    pointer-events: none;
}
.modal.auth-modal .close::after { transform: rotate(-45deg); }
.modal.auth-modal .close:hover { color: #fff0bf; background: #c0a05a12; filter: none; }
@media (max-width: 600px) {
    .modal.auth-modal .auth-modal-content { width: calc(100vw - 20px); padding: 47px 23px 24px; max-height: calc(100dvh - 20px); }
    .modal.auth-modal .modal-title { margin-bottom: 22px; padding-bottom: 18px; }
    .modal.auth-modal .modal-title span { font-size: 24px; }
    .modal.auth-modal .registration-form { gap: 14px; }
    .modal.auth-modal .form-input { font-size: 16px; }
    .modal.auth-modal .auth-links { gap: 12px; }
    .modal.auth-modal .modal-info-submit .button { width: min(100%, 260px); height: 58px; min-height: 58px; font-size: 14px; }
}
@media (max-width: 380px) {
    .modal.auth-modal .auth-modal-content { padding-left: 17px; padding-right: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    .modal.auth-modal, .modal.auth-modal * { transition: none !important; animation: none !important; }
}
