:root {
    color: #656565;
    font-family: Arial, "Malgun Gothic", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
    background: #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    height: 109px;
    background: #ffffff;
}

.header-content,
.join-content,
.footer-content {
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
}

.header-content {
    position: relative;
    height: 104px;
}

.top-links {
    position: absolute;
    top: 8px;
    right: 0;
    display: flex;
}

.top-links a {
    padding: 0 14px;
    border-right: 1px solid #dfdfdf;
    color: #45464a;
    font-size: 11px;
    line-height: 12px;
}

.top-links a:last-child {
    padding-right: 0;
    border-right: 0;
}

.top-links .active {
    color: #eb6101;
    font-weight: 700;
}

.logo {
    position: absolute;
    top: 33px;
    left: 0;
}

.logo img {
    display: block;
}

.header-bar {
    height: 5px;
    background: #f8b800;
}

.header-bar span {
    display: block;
    width: min(285px, 30%);
    height: 5px;
    margin-left: max(calc((100% - 960px) / 2), 20px);
    background: #eb6101;
}

.join-content {
    flex: 1;
    padding: 42px 0 70px;
}

.join-content > h1,
.verification-section h2 {
    margin: 0 0 18px;
    color: #3f3a37;
    font-size: 19px;
    font-weight: 700;
}

.join-content > h1::before,
.verification-section h2::before {
    content: "●";
    margin-right: 8px;
    color: #eb6101;
}

.terms-section {
    padding: 24px;
    border: 1px solid #dedbd8;
    background: #fcfcfc;
}

.terms-section h2 {
    margin: 0 0 14px;
    color: #55504c;
    font-size: 15px;
}

.terms-box {
    height: 410px;
    overflow-y: auto;
    border: 1px solid #dddddd;
    background: #ffffff;
    padding: 20px;
    color: #5f5b58;
    font-size: 13px;
    line-height: 1.75;
}

.terms-box h3 {
    margin: 0 0 12px;
    color: #333333;
    font-size: 15px;
}

.terms-box h4 {
    margin: 16px 0 4px;
    color: #45403d;
    font-size: 13px;
}

.terms-box p {
    margin: 0 0 10px;
}

.terms-box .terms-note {
    margin-top: 24px;
    color: #9a948e;
}

.agreement {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
    color: #45403d;
    font-size: 13px;
}

.agreement legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.agreement input {
    vertical-align: -2px;
    accent-color: #eb6101;
}

.verification-section {
    margin-top: 43px;
    text-align: center;
}

.verification-section h2 {
    text-align: left;
}

.verification-section > p {
    margin: 0 0 20px;
    color: #77716d;
    font-size: 14px;
}

.phone-button {
    width: 200px;
    height: 50px;
    border: 0;
    background: #003a5d;
    color: #ffffff;
    font-size: 18px;
}

.test-verification-form {
    margin-top: 10px;
}

.test-verification-button {
    border: 0;
    background: transparent;
    color: #77716d;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.test-mode-note {
    color: #b64b17 !important;
}

.next-row {
    margin-top: 34px;
    text-align: right;
}

.next-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 40px;
    border: 1px solid #d7d8d8;
    background: #eaebec;
    color: #003a5d;
    font-size: 16px;
    font-weight: 700;
}

.phone-button:disabled,
.next-button.disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.migration-note {
    margin-top: 18px !important;
    color: #9a948e !important;
    font-size: 12px !important;
}

.join-form {
    border-top: 2px solid #7d7975;
}

.form-intro {
    margin: 0;
    padding: 20px 24px;
    border: 1px solid #dedbd8;
    border-top: 0;
    background: #fcfcfc;
    color: #77716d;
    font-size: 13px;
}

.form-error {
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid #e7b8b4;
    background: #fff6f5;
    color: #a53b34;
    font-size: 13px;
}

.join-form table {
    width: 100%;
    margin-top: 22px;
    border-collapse: collapse;
    border-top: 1px solid #bbb7b3;
    font-size: 13px;
}

.join-form caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.join-form th,
.join-form td {
    padding: 13px 16px;
    border-bottom: 1px solid #e0dedc;
    text-align: left;
}

.join-form th {
    width: 190px;
    background: #f8f7f6;
    color: #4c4743;
    font-weight: 700;
}

.join-form strong {
    color: #e05245;
}

.join-form input[type="text"],
.join-form input[type="password"],
.join-form input[type="email"] {
    width: min(330px, 100%);
    height: 34px;
    padding: 0 9px;
    border: 1px solid #cfcac6;
    border-radius: 0;
    color: #3f3a37;
}

.join-form .readonly-field {
    background: #f2f1f0;
    color: #706b67;
}

.join-form .short-field {
    width: 130px;
}

.field-note {
    margin-left: 6px;
    color: #918b87;
    font-size: 12px;
}

.radio-options {
    display: flex;
    gap: 20px;
}

.radio-options input {
    margin-right: 4px;
    accent-color: #eb6101;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.form-actions a,
.form-actions button {
    width: 112px;
    height: 42px;
    border: 1px solid #c8c6c4;
    background: #ffffff;
    color: #4b4743;
    font-size: 15px;
    line-height: 40px;
    text-align: center;
}

.form-actions button {
    border-color: #003a5d;
    background: #003a5d;
    color: #ffffff;
    line-height: normal;
    cursor: pointer;
}

.site-footer {
    min-height: 120px;
    border-top: 1px solid #e1e0df;
    background: #f9f9f9;
}

.footer-content {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 20px 0;
    font-size: 11px;
    line-height: 1.8;
}

.footer-content img {
    flex: 0 0 auto;
}

.footer-content nav {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 700;
}

.footer-content nav a {
    margin-right: 16px;
}

.footer-content p {
    margin: 0;
}

.footer-content span {
    padding: 0 6px;
    color: #cacaca;
}

@media (max-width: 620px) {
    .main-header {
        height: 137px;
    }

    .logo {
        top: 55px;
    }

    .terms-section {
        padding: 15px;
    }

    .agreement {
        align-items: flex-end;
        flex-direction: column;
        gap: 8px;
    }

    .footer-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .join-form th,
    .join-form td {
        display: block;
        width: 100%;
    }

    .join-form th {
        padding-bottom: 7px;
        border-bottom: 0;
    }

    .join-form td {
        padding-top: 7px;
    }

    .radio-options {
        flex-wrap: wrap;
        gap: 10px 16px;
    }
}
