.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(44, 40, 32, .7);
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
    overflow-y: auto
}

.modal-overlay.open {
    display: flex
}

.modal {
    background: #fff;
    width: 100%;
    max-width: 560px;
    border-top: 3px solid #ba9f74;
    position: relative;
    flex-shrink: 0;
    margin: auto
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px 18px;
    border-bottom: 1px solid #ededed
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px
}

.modal-title {
    font-family: "Yu Mincho", "游明朝", YuMincho, serif;
    font-size: 18px;
    font-weight: 400;
    color: #2c2820
}

.modal-badge {
    font-size: 10px;
    letter-spacing: .1em;
    color: #ba9f74;
    border: 1px solid #ba9f74;
    padding: 3px 12px
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9c9288;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center
}

.modal-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none
}

.step-bar {
    display: flex;
    gap: 3px;
    padding: 14px 28px 0
}

.step-seg {
    flex: 1;
    height: 2px;
    background: #ededed
}

.step-seg.done {
    background: #ba9f74
}

.step-seg.active {
    background: #d4b878
}

.modal-body {
    padding: 22px 28px 8px;
    max-height: 500px;
    overflow-y: auto
}

.f-section {
    font-size: 10px;
    letter-spacing: .14em;
    color: #ba9f74;
    border-bottom: 1px solid #ededed;
    padding-bottom: 8px;
    margin-bottom: 14px;
    margin-top: 22px
}

.f-section:first-child {
    margin-top: 0
}

.f-row {
    margin-bottom: 12px
}

.f-row.v2 {
    display: flex;
    flex-direction: column;
}

.f-row.v2 input, .f-row.v2 select, .f-row.v2 textarea {
    flex: 1;
    width: auto;
}

.f-row label {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #6b6258;
    margin-bottom: 5px
}

.f-row label .opt {
    font-size: 10px;
    color: #9c9288;
    margin-left: 4px
}

.f-row label .req {
    font-size: 10px;
    color: #a32d2d;
    margin-left: 4px
}

.f-row input,
.f-row select,
.f-row textarea {
    width: 100%;
    font-size: 13px;
    padding: 9px 12px;
    border: 1px solid #e4dcc9;
    background: #f8f6f1;
    color: #2c2820;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s;
}

.f-row input:focus,
.f-row select:focus,
.f-row textarea:focus {
    border-color: #ba9f74
}

.f-row textarea {
    resize: vertical;
    min-height: 72px
}

.f-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239C9288' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-color: #f8f6f1;
    padding-right: 32px
}

.f-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.check-group {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #6b6258;
    cursor: pointer;
    line-height: 1.5
}

.check-item input[type=checkbox] {
    width: auto;
    margin-top: 2px;
    accent-color: #ba9f74;
    cursor: pointer;
    flex-shrink: 0
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8f6f1;
    border: 1px solid #e4dcc9;
    margin-bottom: 20px
}

.file-preview svg {
    width: 24px;
    height: 24px;
    stroke: #ba9f74;
    fill: none;
    flex-shrink: 0
}

.file-name {
    font-size: 13px;
    font-weight: bold;
    color: #2c2820
}

.file-meta {
    font-size: 11px;
    color: #9c9288
}

.privacy-note {
    font-size: 11px;
    color: #9c9288;
    line-height: 1.7;
    padding: 6px 28px 4px
}

.modal-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 28px 24px;
    border-top: 1px solid #ededed
}

.btn-cancel {
    background: none;
    border: 1px solid #e4dcc9;
    font-size: 12px;
    color: #6b6258;
    padding: 11px 20px;
    cursor: pointer;
    font-family: inherit
}

.btn-submit {
    flex: 1;
    background: #2c2820;
    color: #f0ede6;
    border: none;
    font-size: 13px;
    letter-spacing: .06em;
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    transition: background .2s
}

.btn-submit:hover {
    background: #4a4238
}

.btn-submit svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none
}

.sw-modal {
    max-width: 540px
}

/* インジケーター */
.sw-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px 0
}

.sw-dots {
    display: flex;
    gap: 6px
}

.sw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ededed;
    transition: background .2s, transform .2s;
    cursor: default
}

.sw-dot.active {
    background: #ba9f74;
    transform: scale(1.25)
}

.sw-dot.done {
    background: #d4b878
}

.sw-progress {
    flex: 1;
    height: 2px;
    background: #ededed;
    border-radius: 2px;
    overflow: hidden
}

.sw-progress-bar {
    height: 100%;
    background: #ba9f74;
    border-radius: 2px;
    transition: width .3s ease
}

.sw-counter {
    font-size: 11px;
    color: #9c9288;
    white-space: nowrap;
    font-family: "Libre Caslon Text", serif
}

.sw-cur {
    color: #2c2820;
    font-weight: bold
}

/* ビューポート＆トラック */
.sw-viewport {
    overflow: hidden;
    position: relative
}

.sw-track {
    display: flex;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    will-change: transform
}

.sw-slide {
    min-width: 100%;
    box-sizing: border-box;
    /* flex-shrink: 0 */
}

/* スライド内コンテンツ */
.sw-slide-head {
    padding: 20px 28px 14px;
    border-bottom: 1px solid #ededed
}

.sw-step-label {
    font-family: "Libre Caslon Text", serif;
    font-size: 10px;
    letter-spacing: .2em;
    color: #ba9f74;
    margin-bottom: 4px
}

.sw-step-title {
    font-family: "Yu Mincho", "游明朝", YuMincho, serif;
    font-size: 20px;
    color: #2c2820;
    font-weight: 400;
    margin-bottom: 4px
}

.sw-step-sub {
    font-size: 12px;
    color: #9c9288
}

.sw-slide-body {
    padding: 18px 28px 20px;
    max-height: 340px;
    overflow-y: auto
}

/* フッター */
.sw-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px 24px;
    border-top: 1px solid #ededed
}

.sw-btn-back {
    background: none;
    border: 1px solid #e4dcc9;
    font-size: 12px;
    color: #9c9288;
    padding: 10px 18px;
    cursor: pointer;
    font-family: inherit;
    transition: color .15s
}

.sw-btn-back:disabled {
    opacity: .3;
    cursor: default
}

.sw-btn-back:not(:disabled):hover {
    color: #2c2820
}

.sw-btn-next {
    flex: 1;
    background: #2c2820;
    color: #f0ede6;
    border: none;
    font-size: 13px;
    letter-spacing: .04em;
    padding: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s
}

.sw-btn-next:hover {
    background: #4a4238
}

.sw-btn-submit {
    flex: 1;
    background: #ba9f74;
    color: #fff;
    border: none;
    font-size: 13px;
    letter-spacing: .04em;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    transition: background .2s
}

.sw-btn-submit svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none
}

.sw-btn-submit:hover {
    background: #9c845c
}