.sgrp-media-edit-modal-sidebar {
    /* position: absolute;
    left: 68px;
    top: 0; */
    width: 300px;
    height: 100%;
    background: var(--color-soft-white);
    border-right: 1px solid var(--color-gray-100);
    z-index: 3;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0px 8px rgba(0, 0, 0, 0.08);
}

.sgrp-media-edit-modal-sidebar-title {
    font-family: var(--font-base);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-soft-black);
    padding: 28px 20px 13px;
    margin: 0;
}

.sgrp-media-edit-modal-sidebar-body {
    flex: 1;
    padding: 0;
    padding-top: 13px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    box-sizing: border-box;
    align-items: center;
}

.sgrp-media-edit-modal-sidebar-body-inner {
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    box-sizing: border-box;
}

.sgrp-media-edit-modal-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sgrp-media-edit-modal-sidebar-dynamic {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 基本ボックススタイル */
.sgrp-media-edit-modal-sidebar-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sgrp-media-edit-modal-sidebar-form-label {
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-soft-black);
    margin: 0;
}


/* アイコンオプションスタイル */
.sgrp-media-edit-modal-sidebar-icon-options {
    display: flex;
    gap: 8px;
}

.sgrp-media-edit-modal-sidebar-icon-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    border: 1px solid var(--color-gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-soft-white);
}

.sgrp-media-edit-modal-sidebar-icon-option:hover {
    background: var(--color-gray-50);
}

.sgrp-media-edit-modal-sidebar-icon-option.is-selected {
    border: 1px solid transparent;
    background: linear-gradient(#f9f3f5, #f9f3f5) padding-box, var(--color-grad-pink-purple) border-box;
    background-clip: padding-box, border-box;
}

.sgrp-media-edit-modal-sidebar-icon-option.is-selected:hover {
    background: linear-gradient(#f8f0f4, #f8f0f4) padding-box, var(--color-grad-pink-purple) border-box;
}

.sgrp-media-edit-modal-sidebar-icon-option span {
    font-family: var(--font-base);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-soft-black);
    text-align: center;
    line-height: 1.4;
}

.sgrp-media-edit-modal-sidebar-icon-option svg * {
    transition: fill 0.2s ease;
}

.sgrp-media-edit-modal-sidebar-icon-option.is-selected svg * {
    fill: var(--color-pink-purple-mid) !important;
}


/* セレクトボックススタイル */
.sgrp-media-edit-modal-sidebar-select-wrapper {
    position: relative;
    width: 100%;
}

.sgrp-media-edit-modal-sidebar-select-display {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--color-gray-200);
    border-radius: 4px;
    background: var(--color-soft-white);
    cursor: pointer;
}

.sgrp-media-edit-modal-sidebar-select-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    overflow: hidden;
}

.sgrp-media-edit-modal-sidebar-select-arrow {
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--color-gray-400);
    transition: transform 0.2s ease;
}

.sgrp-media-edit-modal-sidebar-select-wrapper:focus-within .sgrp-media-edit-modal-sidebar-select-display {
    border-color: var(--color-gray-600);
}

.sgrp-media-edit-modal-sidebar-select-wrapper.open .sgrp-media-edit-modal-sidebar-select-arrow {
    transform: rotate(180deg);
}

.sgrp-media-edit-modal-sidebar-select-wrapper[data-type="text"] .sgrp-media-edit-modal-sidebar-select-icon,
.sgrp-media-edit-modal-sidebar-dropdown-item[data-type="text"] .sgrp-media-edit-modal-sidebar-select-icon {
    display: none;
}

.sgrp-media-edit-modal-sidebar-select-display:focus {
    outline: none;
}

.sgrp-media-edit-modal-sidebar-select-display * {
    pointer-events: none;
}

.sgrp-media-edit-modal-sidebar-select-display span {
    flex: 1;
    font-family: var(--font-base);
    font-size: 12px;
    color: var(--color-soft-black);
}

/* ドロップダウンメニュー */
.sgrp-media-edit-modal-sidebar-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-soft-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.sgrp-media-edit-modal-sidebar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: var(--font-base);
    font-size: 12px;
    color: var(--color-soft-black);
    line-height: 1.5;
    height: 30px;
}

.sgrp-media-edit-modal-sidebar-dropdown-item:hover {
    background-color: var(--color-gray-100);
}

.sgrp-media-edit-modal-sidebar-dropdown-item.is-selected {
    background-color: var(--color-gray-100);
}


/* textarea スタイル */
.sgrp-media-edit-modal-sidebar-textarea-wrapper {
    display: flex;
    flex-direction: column;
    height: 123px;
    position: relative;
    border: 1px solid var(--color-gray-200);
    border-radius: 4px;
    background: var(--color-soft-white);
    gap: 10px;
    padding: 5px 8px;
}

.sgrp-media-edit-modal-sidebar-textarea-wrapper:focus-within {
    border-color: var(--color-gray-600);
}

.sgrp-media-edit-modal-sidebar-textarea {
    width: 100%;
    display: flex;
    flex: 1;
    border: none;
    border-radius: inherit;
    background: transparent;
    font-family: var(--font-base);
    font-size: 12px;
    line-height: 1.8;
    font-weight: 400;
    color: var(--color-soft-black);
    resize: none;
    outline: none;
    padding: 0;
}

.sgrp-media-edit-modal-sidebar-textarea::placeholder {
    color: var(--color-gray-400);
    font-weight: 400;
}

.sgrp-media-edit-modal-sidebar-textarea-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sgrp-media-edit-modal-sidebar-history-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    width: 20px;
    height: 20px;
}

.sgrp-media-edit-modal-sidebar-history-btn:hover {
    background: var(--color-gray-100);
}

.sgrp-media-edit-modal-sidebar-history-btn.active {
    background: var(--color-gray-100);
}

.sgrp-media-edit-modal-sidebar-checkbox-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sgrp-media-edit-modal-sidebar-checkbox {
    width: 11px;
    height: 11px;
    appearance: none;
    border: 1px solid var(--color-gray-600);
    border-radius: 2px;
    background: var(--color-soft-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
    margin: 0;
    margin-bottom: 1px;
}

.sgrp-media-edit-modal-sidebar-checkbox::after {
    content: '';
    width: 6px;
    height: 3px;
    margin-bottom: 2px;
    border-left: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transform: rotate(-45deg);
    transition: border-color 0.2s ease;
    border-radius: 2px;
}

.sgrp-media-edit-modal-sidebar-checkbox:checked {
    background: var(--color-pink-purple-mid);
    border-color: var(--color-pink-purple-mid);
}

.sgrp-media-edit-modal-sidebar-checkbox:checked::after {
    border-color: var(--color-soft-white);
}

.sgrp-media-edit-modal-sidebar-checkbox:focus-visible {
    outline: 2px solid rgba(102, 110, 255, 0.35);
    outline-offset: 2px;
}

.sgrp-media-edit-modal-sidebar-checkbox-option span {
    font-family: var(--font-base);
    font-size: 11px;
    color: var(--color-gray-600);
    line-height: 1.5;
    font-weight: 500;
}



.sgrp-media-edit-modal-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    width: fit-content;
}

.sgrp-media-edit-modal-preview-card.is-open .sgrp-media-edit-modal-preview-meta {
    background: var(--color-gray-100);
    border-radius: 6px;
}

.sgrp-media-edit-modal-preview-thumbnail {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--color-soft-white);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.sgrp-media-edit-modal-preview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sgrp-media-edit-modal-preview-meta {
    display: flex;
    align-items: center;
    font-family: var(--font-base);
    font-size: 11px;
    color: var(--color-soft-black);
    gap: 6px;
    padding: 4px 4px 4px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.sgrp-media-edit-modal-preview-meta:hover {
    background: var(--color-gray-100);
}

.sgrp-media-edit-modal-preview-options {
    position: absolute;
    top: 50px;
    left: 252px;
    background: var(--color-soft-white);
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    display: none;
    flex-direction: column;
    z-index: 50;
    max-height: 420px;
    max-width: 434px;
    overflow-y: auto;
}

.sgrp-media-edit-modal-preview-options.is-expression-options {
    top: 50px;
}

.sgrp-media-edit-modal-preview-options.is-orientation-options {
    top: 220px;
}

.sgrp-media-edit-modal-preview-options.is-open {
    display: flex;
}

.sgrp-media-edit-modal-preview-options-grid {
    display: grid;
    row-gap: 12px;
    column-gap: 10px;
    grid-template-columns: repeat(var(--preview-option-columns, 4), minmax(0, 1fr));
}

.sgrp-media-edit-modal-preview-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    gap: 4px;
    cursor: pointer;
}

.sgrp-media-edit-modal-preview-option:hover .sgrp-media-edit-modal-preview-option-thumbnail img {
    transform: scale(1.1);
}

.sgrp-media-edit-modal-preview-option.is-active .sgrp-media-edit-modal-preview-option-thumbnail {
    background: linear-gradient(var(--color-soft-white), var(--color-soft-white)) padding-box, var(--color-grad-pink-purple) border-box;
	border: 2px solid transparent;
    background-clip: padding-box, border-box;
}

.sgrp-media-edit-modal-preview-option.is-active .sgrp-media-edit-modal-preview-option-label {
    color: var(--color-pink-purple-mid);
}

.sgrp-media-edit-modal-preview-option-thumbnail {
    width: 95px;
    height: 95px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(transparent, transparent) padding-box, transparent border-box;
	border: 2px solid transparent;
    background-clip: padding-box, border-box;
}

.sgrp-media-edit-modal-preview-option-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sgrp-media-edit-modal-preview-option-label {
    font-family: var(--font-base);
    font-size: 11px;
    color: var(--color-soft-black);
    line-height: 1.1;
    font-weight: 500;
}

.sgrp-media-edit-modal-preview-primary {
    font-weight: 500;
}

.sgrp-media-edit-modal-preview-secondary {
    font-size: 11px;
    color: var(--color-gray-500);
}

.sgrp-media-edit-modal-preview-arrow {
    flex-shrink: 0;
    transform: rotate(-90deg);
}


/* レファレンスモデルスタイル */
.sgrp-media-edit-modal-reference-models {
    display: flex;
    gap: 6px;
    overflow-y: auto;
}

.sgrp-media-edit-modal-reference-model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.sgrp-media-edit-modal-reference-model-card:hover .sgrp-media-edit-modal-reference-model-thumb img {
	transform: scale(1.1);
}

.sgrp-media-edit-modal-reference-model-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    background: linear-gradient(transparent, transparent) padding-box, transparent border-box;
    background-clip: padding-box, border-box;
    transition: background 0.2s ease;
}

.sgrp-media-edit-modal-reference-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.2s ease;
}

.sgrp-media-edit-modal-reference-model-name {
    font-family: var(--font-base);
    font-size: 10px;
    font-weight: 500;
    color: var(--color-gray-500);
    text-align: center;
    transition: color 0.2s ease;
}

.sgrp-media-edit-modal-reference-model-card.is-selected .sgrp-media-edit-modal-reference-model-thumb {
    background: linear-gradient(var(--color-soft-white), var(--color-soft-white)) padding-box,
        var(--color-grad-pink-purple) border-box;
}

.sgrp-media-edit-modal-reference-model-card.is-selected .sgrp-media-edit-modal-reference-model-name {
    color: var(--color-pink-purple-mid);
}


/* レファレンスアップロードスタイル */
.sgrp-media-edit-modal-reference-upload {
    width: 100%;
    height: 83px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding: 0 16px;
}

.sgrp-media-edit-modal-reference-upload::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    border: 1px dashed var(--color-gray-200);
    transition: border-color 0.2s ease;
}

.sgrp-media-edit-modal-reference-upload.is-dragover::before {
    border-color: var(--color-pink-purple-mid);
}

.sgrp-media-edit-modal-reference-upload-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.sgrp-media-edit-modal-reference-upload-thumb svg {
    width: 18px;
    height: 18px;
}

.sgrp-media-edit-modal-reference-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sgrp-media-edit-modal-reference-upload-text {
    font-family: var(--font-base);
    font-size: 12px;
    color: var(--color-soft-black);
    line-height: 1.6;
    text-align: left;
    position: relative;
    z-index: 1;
    flex: 1;
    margin-left: 16px;
}

.sgrp-media-edit-modal-reference-upload-text .sgrp-media-edit-modal-reference-upload-accent {
    color: transparent;
    background: var(--color-grad-pink-purple);
    background-clip: text;
    -webkit-background-clip: text;
    font-weight: 500;
}


/* レファレンスマイアセットスタイル */
.sgrp-media-edit-modal-sidebar-myasset {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sgrp-media-edit-modal-sidebar-myasset-thumb {
    max-width: 120px;
    height: 67px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
    flex-shrink: 0;
}

.sgrp-media-edit-modal-sidebar-myasset-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sgrp-media-edit-modal-sidebar-myasset-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 25px;
    border: 1px solid var(--color-gray-200);
    background: var(--color-soft-white);
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-soft-black);
    cursor: pointer;
    transition: background 0.2s ease;
}

.sgrp-media-edit-modal-sidebar-myasset-button:hover {
    background: var(--color-gray-50);
}

.sgrp-media-edit-modal-sidebar-myasset-button svg {
    width: 16px;
    height: 16px;
}


/* 生成モデルスタイル */
.sgrp-media-edit-modal-generate-count-list {
    display: flex;
    flex-direction: column;
}




/* ボタンスタイル */
.sgrp-media-edit-modal-sidebar-button-area {
    padding: 13px 20px 28px 20px;
}

.sgrp-media-edit-modal-sidebar-generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 25px;
    background: var(--color-grad-pink-purple);
    color: var(--color-soft-white);
    font-family: var(--font-base);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sgrp-media-edit-modal-sidebar-generate-btn:hover {
    background: var(--color-grad-pink-purple-hover);
}