/* =====================================================
   register_step.css — Step-form registration
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ── Page wrapper ───────────────────────────────── */
.stepform-wrap {
    background: #f0f2f5;
    min-height: 60vh;
    padding: 5.33vw 2.67vw 10vw;
}

/* ── White rounded container (mirrors .l-container) ── */
.sf-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(19, 58, 113, 0.2);
    overflow: hidden;
    /* mobile: full-bleed with small side margin */
    margin: 0 auto;
    position: relative;
}

@media screen and (min-width: 768px) {
    .stepform-wrap {
        padding: 40px 0 70px;
    }
    .sf-container {
        max-width: 1200px;
        min-width: 1120px;
        width: 100%;
        margin: 0 auto;
    }
}

/* ── Title box (logo + 新規会員登録, old-design style) ── */
.sf-title-box {
    background: #fff;
    border-bottom: 2px solid #eaecf2;
    text-align: center;
    padding: 32px 24px 26px;
    position: relative;
}
.sf-title-box__logo {
    display: inline-block;
    margin-bottom: 12px;
}
.sf-title-box__logo img {
    height: 56px;
    display: block;
    margin: 0 auto;
}
.sf-title-box__heading {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0;
    letter-spacing: 0.04em;
}
.sf-title-box__cta {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #213787;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #213787;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.sf-title-box__cta:hover {
    background: #213787;
    color: #fff;
}

/* ── Two-column layout ──────────────────────────── */
.sf-layout {
    display: flex;
    align-items: flex-start;
    padding: 28px 32px 40px;
    gap: 28px;
}

/* ── Sidebar ────────────────────────────────────── */
.sf-side {
    width: 348px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}
.sf-side__hero {
    background: linear-gradient(135deg, #1565c0 0%, #213787 100%);
    color: #fff;
    text-align: center;
    padding: 26px 18px 22px;
}
.sf-side__hero-sub {
    font-size: 1rem;
    margin: 0 0 6px;
    opacity: 0.9;
}
.sf-side__hero-main {
    font-size: 1.42857142857rem;
    font-weight: 700;
    line-height: 1.55;
    margin: 0;
}
.sf-side__benefits {
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
    border: 1px solid #eaecf2;
    border-top: none;
    padding: 4px 0;
}
.sf-side__benefit {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f2f5;
}
.sf-side__benefit:last-child {
    border-bottom: none;
}
.sf-side__num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #213787;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.sf-side__btitle {
    font-size: 1rem;
    font-weight: 700;
    color: #213787;
    margin: 0 0 4px;
}
.sf-side__bdesc {
    font-size: 1rem;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

/* ── Main panel ─────────────────────────────────── */
.sf-main {
    flex: 1;
    width: 100%;
}

/* ── Step card ──────────────────────────────────── */
.sf-step {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}
.sf-step__head {
    padding: 16px 28px 14px;
    border-bottom: 1px solid #f0f2f5;
}
.sf-prog-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.sf-prog-row img {
    width: 80px;
    max-width: 100%;
    height: auto;
}
.sf-prog-label {
    font-size: 15px;
    font-weight: 700;
    color: #213787;
    letter-spacing: 0.04em;
}
.sf-prog-time {
    font-size: 12px;
    color: #999;
}
.sf-prog-bar {
    height: 5px;
    background: #e8edf5;
    border-radius: 3px;
    overflow: hidden;
}
.sf-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, #1565c0, #213787);
    border-radius: 3px;
    transition: width 0.4s;
}

.sf-step__body {
    padding: 26px 28px 30px;
}

/* ── Question ───────────────────────────────────── */
.sf-qtitle {
    font-size: 1.42857142857rem;
    font-weight: 700;
    color: #213787;
    margin: 0 0 8px;
}
.sf-qdesc {
    font-size: 1rem;
    color: #333;
    margin: 0 0 24px;
}

/* ── Fields ─────────────────────────────────────── */
.sf-field {
    margin-bottom: 22px;
}
.sf-field:last-child {
    margin-bottom: 0;
}
.sf-field-row {
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}
.sf-field-row .sf-field {
    flex: 1;
    margin-bottom: 0;
}

/* ── Labels ─────────────────────────────────────── */
.sf-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #213787;
    margin-bottom: 10px;
}
.sf-label--req::before {
    content: '必須';
    background: #eb0240;
    color: #fff;
    font-size: 0.7857142857rem;
    font-weight: 700;
    padding: 0.1em 1.1em 0.2em;
    margin: 0.2em 0;
    border-radius: 3px;
    flex-shrink: 0;
}
.sf-label--opt::before {
    content: '任意';
    background: #eaf1f7;
    color: #213787;
    font-size: 0.7857142857rem;
    font-weight: 700;
    padding: 0.1em 1.1em 0.2em;
    margin: 0.2em 0;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Button options (radio / checkbox style) ────── */
.sf-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.sf-opt {
    flex: 1;
    min-width: 220px;
    max-width: 220px;
    padding: 18px 16px;
    border: 1.5px solid #d0d8e4;
    border-radius: 6px;
    background: #fff;
    color: #444;
    font-size: 1.0714285714rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    line-height: 1.4;
}
.sf-opt:hover {
    border-color: #9aa5b4;
    background: #f5f7fa;
}
.sf-opt.is-on {
    border-color: #213787;
    background: #e8f0fe;
    color: #213787;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(33, 55, 135, 0.15);
}

/* ── Inputs / Selects / Textarea ─────────────────── */
.sf-input,
.sf-select,
.sf-textarea {
    width: 100%;
    padding: 18px 16px;
    border: 1.5px solid #d0d8e4;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.sf-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}
.sf-input:focus,
.sf-select:focus,
.sf-textarea:focus {
    border-color: #213787;
    box-shadow: 0 0 0 3px rgba(33, 55, 135, 0.1);
    outline: none;
}
.sf-input.is-error,
.sf-select.is-error {
    border-color: #e53935;
}
.sf-select--half {
    max-width: 230px;
}
.sf-textarea {
    resize: vertical;
    min-height: 85px;
}

/* ── Date of birth row ───────────────────────────── */
.sf-dob {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sf-sel-y {
    width: 110px;
}
.sf-sel-m {
    width: 76px;
}
.sf-sel-d {
    width: 76px;
}
.sf-dob-u {
    font-size: 14px;
    color: #555;
}

/* ── Error messages ──────────────────────────────── */
.sf-err {
    display: none;
    color: #e53935;
    font-size: 12px;
    margin-top: 6px;
}
.-error.is-backend {
    display: block;
    color: #e53935;
    font-size: 12px;
    margin-top: 6px;
}
.sf-note {
    font-size: 12px;
    color: #888;
    margin: 5px 0 0;
}

/* ── Show-more / Close toggle buttons ───────────── */
.sf-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: #e8f0fe;
    border: 1.5px solid #213787;
    border-radius: 6px;
    color: #213787;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    margin-top: 10px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sf-more-btn:hover {
    background: #213787;
    color: #fff;
}
.sf-close-btn {
    display: none;
    margin-top: 10px;
    background: #f0f4ff;
}
.sf-more-chevron {
    font-size: 11px;
}

/* ── Primary items: exactly 2 per row ───────────── */
.sf-opts--2col .sf-opt {
    flex: 0 0 calc(50% - 4.5px);
    min-width: 0;
    max-width: none;
}

/* ── Secondary items: 3 per row ──────────────────── */
.sf-opts--more {
    display: none;
    margin-top: 8px;
}
.sf-opt--sm {
    flex: 0 0 calc(33.33% - 6px);
    min-width: 0;
    max-width: none;
    padding: 14px 10px;
    font-size: 0.9rem;
    word-break: keep-all;
    overflow-wrap: break-word;
    line-break: strict;
}

/* ── Step 8 Final ────────────────────────────────── */
.sf-step-final {
    text-align: center;
    padding: 32px 40px 40px;
}
.sf-final-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
}
.sf-final-icon svg {
    width: 100%;
    height: 100%;
}
.sf-final-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}
.sf-final-desc {
    font-size: 13px;
    color: #777;
    margin: 0 0 32px;
}

/* Hide real checkboxes — custom SVG handles visual */
.sf-svc-cb-real {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Service checkbox cards */
.sf-svc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.sf-svc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1.5px solid #d6dde8;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    background: #fff;
    transition: border-color 0.18s, background 0.18s;
    user-select: none;
}
.sf-svc-item.is-on {
    border-color: #213787;
    background: #e8f2ff;
    color: #1a3a6b;
}

/* Custom SVG checkbox icon */
.sf-svc-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.sf-svc-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}
.sf-check-svg {
    display: none;
}
.sf-uncheck-svg {
    display: block;
}

/* Agree row */
.sf-agree-row {
    text-align: left;
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.sf-agree-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.sf-agree-label a {
    color: #e67e22;
    text-decoration: underline;
}

/* Submit button — always orange, full opacity; grey only when truly disabled */
.sf-submit-wrap {
    text-align: center;
}
.sf-submit-btn {
    display: inline-block;
    padding: 17px 60px;
    background: linear-gradient(135deg, #f5850a, #f06000);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(240, 96, 0, 0.4);
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.05em;
    min-width: 280px;
}
.sf-submit-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(240, 96, 0, 0.45);
}
.sf-submit-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Navigation row ──────────────────────────────── */
.sf-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding: 0 2px;
}
.sf-nav-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #555;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.15s;
}
.sf-nav-back:hover {
    color: #213787;
}
.sf-nav-next {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #213787, #213787);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 13px 30px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.32);
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.04em;
}
.sf-nav-next:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Footer ──────────────────────────────────────── */
.sf-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #aaa;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 840px) {
    .stepform-wrap {
        padding: 4vw 2.67vw 10vw;
    }
    .sf-container {
        border-radius: 8px;
    }
    .sf-layout {
        flex-direction: column;
        padding: 16px 16px 28px;
        gap: 16px;
    }
    .sf-side {
        width: 100%;
        position: static;
    }
    .sf-side__hero {
        border-radius: 8px 8px 0 0;
    }
    .sf-step__body {
        padding: 18px 16px 24px;
    }
    .sf-step__head {
        padding: 14px 16px 12px;
    }
    .sf-field-row {
        flex-direction: column;
        gap: 16px;
    }
    .sf-qtitle {
        font-size: 17px;
    }
    .sf-opt {
        min-width: 100%;
        flex: 1 1 calc(50% - 5px);
    }
    .sf-title-box {
        padding: 20px 16px 18px;
    }
    .sf-title-box__logo img {
        height: 42px;
    }
    .sf-title-box__heading {
        font-size: 18px;
    }
    .sf-title-box__cta {
        position: static;
        transform: none;
        display: inline-block;
        margin-top: 10px;
    }
}
@media (max-width: 480px) {
    .sf-opt {
        flex: 1 1 100%;
    }
    .sf-nav-next {
        padding: 12px 22px;
        font-size: 14px;
    }
    .sf-step-final {
        padding: 24px 16px 32px;
    }
    .sf-final-title {
        font-size: 18px;
    }
    .sf-submit-btn {
        width: 100%;
        min-width: unset;
        padding: 15px 24px;
        font-size: 15px;
    }
    .sf-svc-list,
    .sf-agree-row {
        max-width: 100%;
    }
    .sf-sel-y {
        width: 95px;
    }
    .sf-sel-m,
    .sf-sel-d {
        width: 68px;
    }
    /* Prevent iOS Safari from auto-zooming inputs/selects/textareas with font
       sizes below 16px — auto-zoom delays viewport reset after blur, causing
       scrollTo(0) to land mid-page on the next step. */
    .sf-input,
    .sf-select,
    .sf-textarea {
        font-size: 16px;
    }
}
