* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    background: #f5f5f7;
    color: #222;
    line-height: 1.6;
}

.wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 34px 18px 60px;
}

.top {
    text-align: center;
    padding: 36px 0 24px;
}

.top.sub {
    padding-top: 24px;
}

.brand {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    font-weight: 800;
    color: #7a4e34;
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 12px;
    font-size: 42px;
    letter-spacing: -1.2px;
}

.lead {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 800;
}

.desc {
    margin: 0;
    color: #555;
    font-size: 16px;
}

.card {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.card h2 {
    margin: 0 0 14px;
    font-size: 23px;
    letter-spacing: -0.6px;
}

.login-card {
    text-align: center;
}

.code-form {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 10px;
    margin-top: 16px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d4d4d8;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
}

label {
    display: block;
    font-weight: 800;
    margin: 14px 0 7px;
}

button,
.btn {
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
}

button,
.btn.dark {
    background: #222;
    color: #fff;
}

.btn.primary {
    background: #7a4e34;
    color: #fff;
    width: 100%;
}

.btn.outline {
    background: #fff;
    border: 1px solid #ccc;
    color: #222;
}

button:disabled {
    background: #bbb;
    cursor: not-allowed;
}

button.enabled {
    background: #222;
    color: #fff;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
}

.plan-name {
    font-weight: 800;
    margin-bottom: 4px;
}

.price {
    font-size: 34px;
    font-weight: 1000;
    margin: 8px 0 18px;
    color: #7a4e34;
}

.help,
.partner-text {
    color: #666;
    font-size: 14px;
}

.count {
    font-weight: 800;
    color: #7a4e34;
}

.alert {
    background: #fff0f0;
    border: 1px solid #ffc7c7;
    color: #b42318;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
    font-weight: 800;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chips span {
    background: #f5efe9;
    color: #7a4e34;
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
}

.partner-card {
    text-align: center;
}

.step-card .btn {
    margin-top: 10px;
}

.loading-box {
    display: none;
    background: #fff8e8;
    border: 1px solid #f0d89a;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-bottom: 18px;
    font-weight: 800;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 4px solid #f0d89a;
    border-top: 4px solid #7a4e34;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-card textarea,
#resultText {
    min-height: 420px;
    white-space: pre-wrap;
    margin-bottom: 14px;
}

.bottom-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.bottom-links a {
    color: #333;
    font-weight: 800;
}

.code-box {
    background: #f5efe9;
    border: 1px dashed #c49a7c;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 1000;
    color: #7a4e34;
    margin: 18px 0;
    word-break: break-all;
}

.done-card {
    text-align: center;
}

footer {
    text-align: center;
    color: #777;
    padding: 20px;
}

.admin-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 18px 60px;
}

.admin-top {
    margin-bottom: 22px;
}

.admin-top h1 {
    font-size: 34px;
}

.admin-form {
    display: grid;
    grid-template-columns: 1.5fr 100px 2fr 140px;
    gap: 10px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid #e5e5e5;
    padding: 10px;
    vertical-align: top;
    text-align: left;
}

th {
    background: #f5f5f7;
    white-space: nowrap;
}

.long {
    min-width: 260px;
    max-width: 420px;
    white-space: pre-wrap;
}

.small-btn {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 8px;
}

.small-btn.danger {
    background: #b42318;
}

@media (max-width: 760px) {
    .wrap {
        padding: 24px 14px 50px;
    }

    h1 {
        font-size: 34px;
    }

    .grid2,
    .code-form,
    .admin-form {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
    }
}

.id-check-row {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 10px;
}

.success-text {
    color: #0f7b3f;
    font-weight: 800;
}

.error-text {
    color: #b42318;
    font-weight: 800;
}

@media (max-width: 760px) {
    .id-check-row {
        grid-template-columns: 1fr;
    }
}

.approval-notice {
    margin-top: 18px;
    margin-bottom: 18px;
    padding: 15px 16px;
    background: #f8f3ee;
    border: 1px solid #eadbd0;
    border-radius: 12px;
    color: #5c4a42;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 700;
}

.apply-submit-btn {
    margin-top: 6px;
}

/* JobWriter 스타일: PC에서도 가운데 좁고 여유 있게 정렬 */
.wrap {
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 52px 18px 70px !important;
}

.top {
    max-width: 560px;
    margin: 0 auto;
    text-align: left;
    padding: 34px 0 28px;
}

.top h1,
.top .lead,
.top .desc {
    text-align: left;
}

.top h1 {
    font-size: 34px;
    line-height: 1.25;
}

.lead {
    font-size: 17px;
    line-height: 1.7;
    font-weight: 500;
    color: #555;
}

.desc {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding: 26px 24px;
    border-radius: 18px;
}

.login-card {
    text-align: left;
}

.login-card h2 {
    text-align: left;
}

.code-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
}

.code-form input {
    height: 52px;
}

.code-form button {
    width: 100%;
    height: 60px;
    font-size: 18px;
}

.grid2 {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.grid2 .card {
    width: 100%;
}

.btn.primary,
.btn.dark,
button {
    width: 100%;
}

.price {
    text-align: center;
}

.partner-card {
    text-align: center;
}

footer {
    max-width: 560px;
    margin: 0 auto;
}

/* 너무 위로 붙지 않게 전체 여백 조정 */
body {
    background: #f5f5f7;
}

/* 모바일에서는 자연스럽게 꽉 차게 */
@media (max-width: 760px) {
    .wrap {
        max-width: 100% !important;
        padding: 28px 14px 50px !important;
    }

    .top {
        text-align: center;
        padding-top: 24px;
    }

    .top h1,
    .top .lead,
    .top .desc {
        text-align: center;
    }

    .card {
        max-width: 100%;
    }
}

.gift-btn {
    background: #7a4e34 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(122, 78, 52, 0.22);
}

.gift-btn:hover {
    background: #5f3b27 !important;
}

.payment-info-box {
    margin: 22px 0;
    padding: 20px;
    background: #f8f3ee;
    border: 1px solid #eadbd0;
    border-radius: 16px;
    text-align: left;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #eadbd0;
    font-size: 16px;
}

.payment-row span {
    color: #666;
    font-weight: 700;
}

.payment-row strong {
    color: #7a4e34;
    font-weight: 900;
}

.payment-bank {
    margin-top: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px dashed #c49a7c;
    border-radius: 12px;
    color: #7a4e34;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    word-break: keep-all;
}

.payment-help {
    margin: 12px 0 0;
    color: #5c4a42;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.section-title-small {
    margin: 22px 0 8px;
    font-weight: 900;
    color: #222;
}
