.join-page {
    min-height: 100vh;
    color-scheme: dark;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 78% 18%, rgba(199, 167, 125, 0.12), transparent 30%),
        linear-gradient(180deg, #060504 0%, #0b0907 100%);
}

.join-main {
    width: min(1320px, calc(100% - 44px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 96px 0 24px;
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(620px, 1.2fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    box-sizing: border-box;
}

.join-hero {
    display: grid;
    gap: 20px;
    align-content: center;
    margin-bottom: 0;
}

.join-hero h1 {
    margin: 0;
    color: var(--gold-soft);
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(56px, 6.6vw, 92px);
    line-height: 0.98;
    font-weight: 500;
}

.join-hero > p:last-child {
    width: min(100%, 430px);
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.8;
}

.join-form-shell {
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(9, 8, 7, 0.88);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.join-form-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.join-form-head span {
    color: var(--gold);
    font-size: 14px;
    font-weight: 800;
}

.join-form-head strong {
    color: var(--gold-soft);
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 500;
}

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

.field-row {
    display: grid;
    gap: 16px;
}

.field-row.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.join-form label,
.area-field {
    min-width: 0;
}

.join-form label {
    display: grid;
    gap: 7px;
}

.join-form label span,
.area-field legend {
    color: var(--gold-soft);
    font-size: 14px;
    font-weight: 700;
}

.area-field {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 8px;
}

.join-form input,
.join-form select,
.join-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(199, 167, 125, 0.26);
    background: rgba(234, 215, 189, 0.08);
    color: var(--text);
    padding: 0 16px;
    outline: 0;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.join-form textarea {
    min-height: 72px;
    padding: 12px 16px;
    resize: vertical;
}

.join-form select {
    appearance: none;
    color-scheme: dark;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gold) 50%),
        linear-gradient(135deg, var(--gold) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 20px,
        calc(100% - 14px) 20px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.join-form select option {
    background: #17130f;
    color: #f4eadb;
}

.join-form select option:checked,
.join-form select option:hover {
    background: #c7a77d;
    color: #17110a;
}

.join-form select:disabled {
    cursor: not-allowed;
    border-color: rgba(199, 167, 125, 0.16);
    background-color: rgba(234, 215, 189, 0.045);
    color: rgba(245, 238, 230, 0.34);
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(199, 167, 125, 0.36) 50%),
        linear-gradient(135deg, rgba(199, 167, 125, 0.36) 50%, transparent 50%);
}

.join-form select.has-value {
    color: var(--text);
}

.join-form input::placeholder,
.join-form textarea::placeholder {
    color: rgba(245, 238, 230, 0.42);
}

.join-form input:focus,
.join-form select:focus,
.join-form textarea:focus {
    border-color: var(--gold);
    background: rgba(234, 215, 189, 0.12);
    box-shadow: 0 0 0 3px rgba(199, 167, 125, 0.12);
}

.join-form label.has-error input,
.join-form label.has-error select {
    border-color: #c76f5d;
}

.join-form small {
    min-height: 14px;
    color: #d89484;
    font-size: 12px;
    line-height: 1.15;
}

.message-field {
    display: grid;
}

.join-submit,
.join-modal__ok {
    justify-self: center;
    min-width: 240px;
    min-height: 48px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #18110a;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.join-submit:hover,
.join-modal__ok:hover {
    background: var(--gold-soft);
    transform: translateY(-2px);
}

.join-submit:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.join-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.join-modal[hidden] {
    display: none;
}

.join-modal__panel {
    position: relative;
    width: min(560px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    background: #0d0b09;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.join-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--white-line);
    background: transparent;
    color: var(--gold-soft);
    font-size: 24px;
    cursor: pointer;
}

.join-modal h2 {
    margin: 0 0 10px;
    color: var(--gold-soft);
    font-family: Georgia, "Songti SC", serif;
    font-size: 42px;
    font-weight: 500;
}

.join-modal p {
    margin: 0 0 22px;
    color: var(--muted);
}

.join-modal dl {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px 16px;
    margin: 0 0 28px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
}

.join-modal dt {
    color: var(--gold);
    font-weight: 700;
}

.join-modal dd {
    margin: 0;
    color: var(--text);
}

.join-toast {
    position: fixed;
    top: 88px;
    left: 50%;
    z-index: 180;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(199, 171, 132, 0.32);
    background: rgba(14, 12, 10, 0.96);
    color: var(--gold-soft);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.join-toast::before {
    content: "";
    width: 17px;
    height: 17px;
    border: 2px solid var(--gold-soft);
    border-radius: 50%;
    background:
        linear-gradient(45deg, transparent 46%, var(--gold-soft) 48%, var(--gold-soft) 58%, transparent 60%) 4px 8px / 5px 2px no-repeat,
        linear-gradient(135deg, transparent 42%, var(--gold-soft) 44%, var(--gold-soft) 54%, transparent 56%) 8px 6px / 7px 2px no-repeat;
}

.join-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.join-toast[hidden] {
    display: none;
}

@media (min-width: 961px) {
    .join-page {
        overflow: hidden;
    }

    .join-main {
        height: 100vh;
    }
}

@media (max-width: 960px) and (pointer: coarse) {
    .join-main {
        grid-template-columns: 1fr;
        padding-top: 98px;
    }
}

@media (max-width: 820px) and (pointer: coarse) {
    .field-row.two,
    .field-row.three {
        grid-template-columns: 1fr;
    }

    .join-form-head {
        display: grid;
    }
}

@media (max-width: 520px) and (pointer: coarse) {
    .join-main {
        width: min(100% - 32px, 1280px);
        padding-top: 98px;
    }

    .join-submit,
    .join-modal__ok {
        width: 100%;
        min-width: 0;
    }

    .join-toast {
        top: 72px;
        width: calc(100% - 40px);
        max-width: 260px;
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .join-main {
        width: min(100% - 28px, 1280px);
        min-height: auto;
        padding: 84px 0 18px;
        gap: 14px;
        align-items: start;
    }

    .join-hero {
        gap: 8px;
        padding-top: 8px;
    }

    .join-hero .section-kicker {
        margin: 0;
        font-size: 11px;
    }

    .join-hero h1 {
        font-size: 34px;
        line-height: 1.05;
        white-space: nowrap;
    }

    .join-hero > p:last-child {
        margin: 0;
        width: auto;
        color: var(--gold-soft);
        font-size: 19px;
        line-height: 1.25;
        font-weight: 800;
        text-align: right;
    }

    .join-form-shell {
        padding: 18px;
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
    }

    .join-form-head {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .join-form-head span {
        font-size: 12px;
    }

    .join-form-head strong {
        font-size: 24px;
        line-height: 1.15;
    }

    .join-form label span,
    .area-field legend {
        font-size: 15px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .join-page {
        overflow-x: auto;
    }

    .join-main {
        gap: 64px;
    }

    .join-hero h1 {
        font-size: 92px;
    }

    .join-form-shell {
        padding: 34px;
    }

    .join-form-head strong {
        font-size: 34px;
    }
}
