﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    background: #f5f7fb;
    color: #222;
}

.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
}

.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e8e8e8;
}

.form-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
}

.step-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9edf3;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 12.5%;
    background: #2563eb;
    transition: width 0.25s ease;
}

.step-list {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.step-item {
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    border-radius: 10px;
    background: #f1f4f9;
    color: #666;
}

    .step-item.active {
        background: #dbeafe;
        color: #1d4ed8;
        font-weight: 700;
    }

    .step-item.done {
        background: #dcfce7;
        color: #15803d;
        font-weight: 700;
    }

.step-form {
    padding: 24px;
}

.step-panel {
    display: none;
}

    .step-panel.active {
        display: block;
    }

.intro-panel {
    max-width: 760px;
    margin: 0 auto;
}

.intro-header {
    margin-bottom: 28px;
    text-align: center;
}

    .intro-header h2 {
        margin: 0 0 8px;
        font-size: 24px;
        font-weight: 800;
    }

    .intro-header p {
        margin: 0;
        font-size: 18px;
        font-weight: 700;
    }

.intro-card {
    padding: 28px;
    border: 1px solid #d8dee8;
    border-radius: 14px;
    background: #fafafa;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

    .intro-card h3 {
        margin: 0 0 20px;
        text-align: center;
        font-size: 18px;
    }

.terms-box {
    height: 45vh;
    padding: 18px;
    border: 2px solid #2563eb;
    border-radius: 8px;
    background: #fff;
    overflow-y: auto;
    line-height: 1.9;
}

    .terms-box h4 {
        margin: 28px 0 12px;
        font-size: 16px;
    }

        .terms-box h4:first-child {
            margin-top: 0;
        }

.terms-date {
    margin-top: 24px;
    font-size: 13px;
    color: #475569;
}

.privacy-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
}

.agreement-check {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 15px;
    font-weight: 700;
}

    .agreement-check input {
        width: 18px;
        height: 18px;
    }

.sample-image {
    display: block;
    width: auto;
    max-width: min(220px, 60%);
    max-height: 72px;
    margin: 20px auto 0;
    object-fit: contain;
}

.panel-title {
    margin: 0 0 20px;
    font-size: 20px;
}

.panel-note {
    margin: -8px 0 20px;
    font-size: 13px;
    color: #666;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .field.full {
        grid-column: 1 / -1;
    }

    .field label {
        font-size: 14px;
        font-weight: 700;
    }

.tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    border: 1px solid #93c5fd;
}

.tooltip-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 10;
    width: min(320px, calc(100vw - 48px));
    min-width: 240px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.75;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
    white-space: normal;
    letter-spacing: 0.01em;
}

    .tooltip-content::before {
        content: "";
        position: absolute;
        top: -6px;
        left: 20px;
        width: 12px;
        height: 12px;
        background: rgba(15, 23, 42, 0.96);
        transform: rotate(45deg);
    }

.tooltip-wrap:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.field-note {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #92400e;
}

.req {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #fff;
    background: #ef4444;
    padding: 2px 6px;
    border-radius: 999px;
    vertical-align: middle;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#birthday {
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

    input:focus,
    select:focus,
    textarea:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }

.postal-search-wrap {
    display: flex;
    align-items: stretch;
}

    .postal-search-wrap input {
        flex: 1 1 auto;
        min-width: 0;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.postal-search-btn {
    flex: 0 0 auto;
    min-width: 110px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #2563eb;
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

    .postal-search-btn:hover {
        opacity: 0.9;
    }

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    background: #fff;
}

    .radio-box input {
        width: 16px;
        height: 16px;
    }

    .radio-box span {
        min-width: 60px;
    }

.corp-section {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #f8fbff;
}

    .corp-section.hidden {
        display: none;
    }

.corp-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.alias-list-section {
    gap: 16px;
    padding: 20px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.alias-list-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5edf7;
}

.alias-list-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.alias-list-note {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.alias-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.alias-add-btn {
    align-self: flex-start;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

    .alias-add-btn:hover {
        background: #dbeafe;
        border-color: #60a5fa;
    }

    .alias-add-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

.alias-card {
    display: block;
    padding: 16px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.alias-card-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.alias-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.alias-card-fields label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
}

.auth-actions {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.auth-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1;
}

.auth-code-input {
    width: min(100%, 320px);
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #0f172a;
}

    .auth-code-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
    }

.btn {
    min-width: 120px;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

    .btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

.btn-prev {
    background: #e5e7eb;
    color: #222;
}

.btn-next,
.btn-submit {
    background: #2563eb;
    color: #fff;
}

.error-text {
    margin-top: 16px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
}

.confirm-box {
    display: grid;
    gap: 12px;
}

.bank-transfer-summary {
    padding: 18px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.bank-transfer-summary-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
}

.bank-transfer-summary-caption {
    margin: -4px 0 14px;
    font-size: 12px;
    color: #64748b;
}

.bank-transfer-summary-breakdown {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dbe3ef;
}

.bank-transfer-summary-items {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.bank-transfer-summary-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    align-items: start;
}

.bank-transfer-summary-row-strong {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.08);
}

.bank-transfer-summary-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.bank-transfer-summary-value {
    font-size: 14px;
    color: #0f172a;
    word-break: break-word;
}

.bank-transfer-summary-notes {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #bfd2ee;
    display: grid;
    gap: 6px;
}

.bank-transfer-summary-notes p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: #475569;
}

.confirm-group {
    margin-top: 12px;
}

.confirm-group-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.confirm-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.confirm-image-card {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

    .confirm-image-card img {
        display: block;
        width: 100%;
        height: 160px;
        object-fit: contain;
        border-radius: 8px;
        background: #fff;
        border: 1px solid #dbe3ef;
    }

.confirm-image-name {
    margin-top: 8px;
    font-size: 12px;
    color: #475569;
    word-break: break-all;
}

.confirm-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.confirm-label {
    font-weight: 700;
    color: #374151;
}

.confirm-value {
    color: #111827;
    word-break: break-word;
}

.proof-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.proof-image-label {
    height: 60px;
    color: #2563eb;
    font-weight: 700;
}

[id^="xViewImageArea"] {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

    [id^="xViewImageArea"].is-dragover {
        border-color: #2563eb;
        background: #eff6ff;
    }

    [id^="xViewImageArea"] p {
        margin: 0;
        color: #334155;
        line-height: 1.8;
    }

    [id^="xViewImageArea"] label {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 12px;
        min-width: 180px;
        /*min-height: 44px;*/
        padding: 10px 18px;
        border-radius: 10px;
        background: #2563eb;
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

        [id^="xViewImageArea"] label.has-image {
            background: transparent;
            color: #2563eb;
            min-width: 0;
            padding: 0;
        }

[id^="xViewImageInput"] {
    display: none;
}

img[id^="xViewImage"] {
    max-width: 100%;
    max-height: 280px;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid #dbe3ef;
    background: #fff;
    object-fit: contain;
}

.proof-html-sample {
    position: relative;
    display: none;
    width: 240px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fff;
}

    .proof-html-sample .sample-label {
        position: absolute;
        top: 16px;
        left: 50%;
        z-index: 3;
        transform: translateX(-50%);
        padding: 6px 18px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 700;
        color: #fff;
    }

        .proof-html-sample .sample-label.ok {
            background: #58d196;
        }

    .proof-html-sample .camera-frame {
        position: relative;
        width: 100%;
        aspect-ratio: 1.58 / 1;
        background: #bfbfbf;
        border-radius: 20px;
        border: 1px solid #b8cbe3;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        overflow: hidden;
    }

    .proof-html-sample .face-circle {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 54%;
        aspect-ratio: 1 / 1;
        background: #eaeaea;
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

    .proof-html-sample .guide-line {
        position: absolute;
        width: 70%;
        height: 4px;
        left: 15%;
        background: #58d196;
        border-radius: 999px;
        z-index: 2;
    }

        .proof-html-sample .guide-line.top {
            top: 15%;
        }

        .proof-html-sample .guide-line.bottom {
            top: 85%;
        }

    .proof-html-sample .person {
        position: absolute;
        top: 20%;
        left: 50%;
        width: 48%;
        height: 82%;
        transform: translateX(-50%);
        z-index: 1;
    }

    .proof-html-sample .head {
        width: 38%;
        aspect-ratio: 1 / 1;
        background: #555;
        border-radius: 50%;
        margin: 0 auto;
    }

    .proof-html-sample .body {
        width: 68%;
        height: 58%;
        background: #555;
        border-radius: 60px 60px 20px 20px;
        margin: 10px auto 0;
        position: relative;
    }

    .proof-html-sample .id-card {
        width: 100%;
        aspect-ratio: 1.58 / 1;
        border-radius: 12px;
        background: linear-gradient(135deg, #dfeaf8 0%, #f8fbff 100%);
        border: 1px solid #b8cbe3;
        box-shadow: 0 10px 20px rgba(35, 74, 122, 0.12);
        position: relative;
        padding: 14px;
    }

        .proof-html-sample .id-card.front {
            transform: none;
        }

        .proof-html-sample .id-card.angle {
            transform: perspective(500px) rotateX(65deg);
            transform-origin: center bottom;
            position: relative;
        }

            .proof-html-sample .id-card.angle::after {
                content: "";
                position: absolute;
                bottom: -10px;
                left: 2%;
                width: 96%;
                height: 10px;
                background: linear-gradient(to bottom, #b5c7de, #8fa9c6);
                border-radius: 0 0 10px 10px;
            }

    .proof-html-sample .chip {
        width: 18%;
        aspect-ratio: 1.2 / 1;
        border-radius: 4px;
        background: linear-gradient(135deg, #d8b66a, #f3dd9c);
        margin-bottom: 10px;
    }

    .proof-html-sample .photo {
        width: 26%;
        aspect-ratio: 3 / 4;
        background: linear-gradient(180deg, #d7e1ef, #bfcddd);
        border-radius: 6px;
        position: absolute;
        right: 14px;
        top: 42px;
    }

    .proof-html-sample .line {
        height: 8px;
        border-radius: 999px;
        background: #bfd0e4;
        margin-bottom: 8px;
    }

        .proof-html-sample .line.w1 {
            width: 45%;
        }

        .proof-html-sample .line.w2 {
            width: 58%;
        }

        .proof-html-sample .line.w3 {
            width: 40%;
        }

        .proof-html-sample .line.w4 {
            width: 62%;
        }

.upload-file-name {
    margin: 0;
    font-size: 12px;
    color: #475569;
    word-break: break-all;
}

.hidden {
    display: none;
}

#moveNotice:focus-within .any-hide {
    display: none;
}

@media (max-width: 768px) {
    .field label {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }

    .tooltip-wrap {
        margin-left: 0;
    }

    .tooltip-content {
        width: min(250px, calc(100vw - 32px));
        min-width: 0;
    }

    .container {
        margin: 20px auto;
        padding: 12px;

        max-width: 700px;
        width: 100vw;
    }

    .form-card {
        width: 100%;
    }

    .step-panel {
        width: 100%;
    }

    .form-header,
    .step-form {
        padding: 16px;
        width: 100%;
    }

    .field {
        width: 100%;
    }

    .grid {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .proof-image-grid {
        grid-template-columns: 1fr;
    }

    .alias-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .alias-list-grid {
        grid-template-columns: 1fr;
    }

    .alias-card-fields {
        grid-template-columns: 1fr;
    }

    .intro-card {
        padding: 20px 16px;
    }

    .terms-box {
        height: 320px;
        padding: 14px;
    }

    .sample-image {
        max-width: min(180px, 70%);
        max-height: 60px;
        margin-top: 16px;
    }

    .step-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .confirm-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .bank-transfer-summary-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .actions {
        flex-direction: column-reverse;
    }

    .auth-actions {
        align-items: stretch;
    }

    .auth-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .auth-code-input {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .postal-search-btn {
        min-width: 96px;
        width: auto;
    }
}
