/* ═══════════════════════════════════════════════════════════
   Instagramストーリーズ用 余白付き画像クロップ — styles
   prefix: sc-
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.sc-container {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    max-width: 840px;
    margin: 0 auto;
    padding: 0 16px 40px;
    color: #1f2937;
}

/* ── Feature Banner ── */
.sc-feature-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 100%);
    border: 1.5px solid #e879a0;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.sc-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sc-feature-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.sc-feature-item strong {
    font-size: 13px;
    font-weight: 700;
    color: #9d174d;
    display: block;
    margin-bottom: 2px;
}

.sc-feature-item p {
    font-size: 12px;
    color: #be185d;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .sc-feature-banner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Dropzone ── */
.sc-dropzone {
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    padding: 52px 30px;
    text-align: center;
    background: linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 100%);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    position: relative;
    margin-bottom: 24px;
}

.sc-dropzone:hover,
.sc-dropzone.active {
    border-color: #e1306c;
    transform: scale(1.005);
}

.sc-dropzone-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
    line-height: 1;
}

.sc-dropzone-text {
    font-size: 15px;
    color: #4b5563;
    margin: 0 0 12px;
    line-height: 1.6;
}

.sc-dropzone-hint {
    font-size: 12.5px;
    color: #9ca3af;
    margin: 10px 0 0;
}

.sc-dropzone-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sc-dropzone-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sc-dropzone-info {
    text-align: left;
}

.sc-dropzone-filename {
    font-weight: 700;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.sc-dropzone-fileinfo {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* ── Upload Button ── */
.sc-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #833ab4, #e1306c);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(225, 48, 108, 0.35);
    transition: opacity 0.15s;
}

.sc-btn-upload:hover {
    opacity: 0.88;
}

.sc-btn-change {
    background: transparent;
    border: 1.5px solid #d1d5db;
    color: #6b7280;
    padding: 6px 14px;
    font-size: 12.5px;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}

.sc-btn-change:hover {
    border-color: #9ca3af;
    color: #374151;
}

/* ── Settings Card ── */
.sc-settings-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 24px;
}

.sc-settings-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #fdf2f8;
}

/* ── Ratio Tabs ── */
.sc-ratio-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.sc-ratio-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    color: #6b7280;
    text-align: center;
}

.sc-ratio-tab:hover {
    border-color: #e1306c;
    color: #e1306c;
    background: #fdf2f8;
}

.sc-ratio-tab.active {
    border-color: #e1306c;
    background: #fdf2f8;
    color: #e1306c;
}

.sc-ratio-size {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: inherit;
    opacity: 0.75;
    margin-top: 2px;
}

/* ── Section Labels ── */
.sc-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 10px;
}

/* ── Background Mode Buttons ── */
.sc-bg-modes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sc-bg-mode-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    color: #6b7280;
}

.sc-bg-mode-btn:hover {
    border-color: #e1306c;
    color: #e1306c;
    background: #fdf2f8;
}

.sc-bg-mode-btn.active {
    border-color: #e1306c;
    background: #fdf2f8;
    color: #be185d;
}

/* ── BG Option Panels (accordion) ── */
.sc-bg-option {
    background: #fafafa;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1.5px solid #f3f4f6;
}

.sc-bg-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sc-bg-option-row:last-child {
    margin-bottom: 0;
}

.sc-bg-option-row label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    min-width: 90px;
}

/* ── Sliders ── */
.sc-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.sc-slider-wrap input[type="range"] {
    flex: 1;
    accent-color: #e1306c;
    height: 5px;
}

.sc-slider-value {
    font-size: 13px;
    font-weight: 700;
    color: #e1306c;
    min-width: 44px;
    text-align: right;
    white-space: nowrap;
}

/* ── Color Inputs ── */
.sc-color-input {
    width: 40px;
    height: 34px;
    border: 2px solid #d1d5db;
    border-radius: 7px;
    cursor: pointer;
    padding: 2px;
    background: none;
    flex-shrink: 0;
}

.sc-color-hex {
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #6b7280;
}

/* ── Scale Slider ── */
.sc-scale-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1.5px solid #f3f4f6;
    margin-top: 4px;
}

.sc-scale-row label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}

/* ── Preview Area ── */
.sc-preview-card {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 24px 24px 16px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sc-preview-canvas-wrap {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    transition: box-shadow 0.15s;
}

.sc-preview-canvas-wrap:active {
    cursor: grabbing;
}

.sc-preview-canvas-wrap.dragging {
    box-shadow: 0 28px 80px rgba(225, 48, 108, 0.4);
}

.sc-preview-canvas {
    display: block;
    max-height: 460px;
    width: auto;
}

.sc-drag-hint {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
}

.sc-preview-placeholder {
    width: 180px;
    aspect-ratio: 9 / 16;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    gap: 12px;
}

.sc-preview-placeholder-icon {
    font-size: 36px;
    opacity: 0.5;
}

/* ── Download Card ── */
.sc-download-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 24px;
}

.sc-btn-download {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #833ab4 0%, #e1306c 50%, #f77737 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.4);
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.sc-btn-download:hover {
    opacity: 0.9;
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.5);
}

.sc-btn-download:active {
    transform: scale(0.98);
}

.sc-btn-download:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sc-download-info {
    text-align: center;
    font-size: 12.5px;
    color: #9ca3af;
    margin-top: 10px;
}

/* ── Auto color badge ── */
.sc-auto-color-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: #4b5563;
}

.sc-auto-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}