.sse-page {
    background: #fff;
    padding: 32px 16px 56px;
}

/* セルフ修正ページではテーマのメインビジュアルを表示しない */
body.sse-body .p-mainVisual,
body.sse-body #main_visual {
    display: none;
}

.sse-confirm h2 {
    color: #d32f2f;
}

.sse-confirm form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.sse-confirm .sse-primary {
    background: #d32f2f;
}

.sse-confirm .sse-secondary {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
}

.sse-container {
    max-width: 920px;
    margin: 0 auto;
}

.sse-container h1 {
    font-size: 28px;
    margin: 0 0 24px;
}

.sse-panel,
.sse-section {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
    margin: 0 0 18px;
}

.sse-section h2 {
    font-size: 20px;
    margin: 0 0 16px;
}

.sse-auth-note {
    margin: 16px 0 20px;
    padding: 14px 16px;
    border: 1px solid #e0e0e2;
    border-radius: 8px;
    background: #fafafa;
    font-size: 13px;
    color: #444;
}

.sse-auth-note h3 {
    font-size: 14px;
    margin: 0 0 8px;
}

.sse-auth-note p {
    margin: 0 0 8px;
}

.sse-auth-note ul {
    margin: 0;
    padding-left: 18px;
}

.sse-auth-note li {
    margin: 0 0 6px;
}

.sse-sticky-title {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid #e6d28a;
    border-radius: 8px;
    background: #fdf6dd;
    color: #6b5510;
    font-weight: 700;
}

.sse-field {
    margin: 0 0 18px;
}

.sse-label {
    display: block;
    margin: 0 0 6px;
    font-weight: 700;
}

.sse-field input[type="text"],
.sse-field input[type="url"],
.sse-field input[type="number"],
.sse-field input[type="date"],
.sse-field textarea,
.sse-field select {
    width: 100%;
    max-width: 100%;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    font-size: 16px;
}

.sse-field textarea {
    min-height: 92px;
}

.sse-help {
    margin: 6px 0 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.6;
}

.sse-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.sse-checks label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}

.sse-money-preview {
    min-height: 26px;
    margin-top: 6px;
    color: #0f5f9f;
    font-size: 22px;
    font-weight: 800;
}

.sse-warning,
.sse-date-warning {
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
}

.sse-image-control {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: 12px;
    align-items: start;
}

.sse-image-control img,
.sse-empty-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #f6f7f7;
}

.sse-empty-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #646970;
}

.sse-primary,
.sse-secondary,
.sse-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

.sse-primary,
.sse-edit-button {
    background: #1565c0;
    color: #fff !important;
}

.sse-secondary {
    background: #fff;
    border-color: #c3c4c7;
    color: #1d2327;
}

.sse-submit-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    padding: 14px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 34%);
}

.sse-preview {
    margin-top: 14px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fbfbfc;
    overflow: hidden;
}

.sse-preview table {
    width: 100%;
    border-collapse: collapse;
}

.sse-preview th,
.sse-preview td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.sse-preview th {
    width: 30%;
    background: #f0f4f8;
}

.sse-alert,
.sse-notice,
.sse-success {
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 700;
}

.sse-alert {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.sse-notice {
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.sse-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #047857;
}

.sse-fixed-entry {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 999;
}

@media (max-width: 640px) {
    .sse-container h1 {
        font-size: 23px;
    }

    .sse-section {
        padding: 16px;
    }

    .sse-image-control {
        grid-template-columns: 1fr;
    }

    .sse-submit-bar {
        justify-content: stretch;
    }

    .sse-submit-bar .sse-primary {
        width: 100%;
    }

    .sse-fixed-entry {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .sse-fixed-entry .sse-edit-button {
        width: 100%;
    }
}

.sse-image-control {
    display: block;
}

.sse-image-preview-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.sse-image-preview-item {
    min-width: 0;
}

.sse-image-preview-label {
    display: block;
    margin-bottom: 4px;
    color: #50575e;
    font-size: 12px;
    font-weight: 700;
}

.sse-image-preview-item img,
.sse-empty-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #f6f7f7;
}

.sse-new-image-preview[hidden] {
    display: none;
}

.sse-image-control select,
.sse-image-control input[type="file"] {
    margin-top: 8px;
}
.sse-retention-note {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
}
.sse-confirm-note {
    margin: 8px 0 12px;
    padding: 10px 12px;
    border-left: 4px solid #bfdbfe;
    background: #f8fafc;
    color: #50575e;
    font-size: 13px;
    line-height: 1.6;
}

.sse-draft-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 700;
}

.sse-draft-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sse-draft-banner .sse-secondary {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
}

.sse-autosave-footnote {
    margin: 0 0 10px;
    color: #646970;
    font-size: 12px;
    line-height: 1.6;
    text-align: right;
}

@media (max-width: 640px) {
    .sse-draft-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .sse-autosave-footnote {
        text-align: left;
    }
}
.sse-ratio-warning {
    min-height: 20px;
    margin: 6px 0 0;
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
}