/* 삐약이 감성 편집 툴 전용 스타일 -> 공용 스타일로 변경 */


/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.tab-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 222, 89, 0.1);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--accent-yellow);
    color: var(--text-dark);
    border-color: var(--accent-yellow);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Sections */
.tool-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tool-section.active-section {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards & Workspaces */
.card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    border: 3px dashed var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
}

.card h2 {
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.upload-area {
    margin-bottom: 30px;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: rgba(167, 227, 138, 0.05);
    border: 2px dashed var(--accent-green);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: rgba(167, 227, 138, 0.15);
    transform: scale(1.02);
}

.upload-label .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-label span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* Workspace details */
.workspace {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.image-container {
    max-height: 500px;
    margin-bottom: 30px;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
}

.image-container img {
    max-width: 100%;
}

.file-info-box {
    background: rgba(255, 222, 89, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 600;
}

.convert-options {
    margin-bottom: 30px;
}

.convert-options label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.format-select {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1rem;
    outline: none;
}

/* Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-green);
    color: white;
    box-shadow: 0 4px 15px rgba(167, 227, 138, 0.4);
}

.btn-primary:hover {
    background: #8ccf6f;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    background: #dcdcdc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Result List (Cart) Styles */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    pointer-events: none; /* 클릭 통과 */
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toast-notification.show {
    opacity: 1;
}

.result-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    min-width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ratio Buttons Active State */
.ratio-group .btn.active {
    background: var(--accent-yellow);
    color: var(--text-dark);
    border-color: var(--accent-yellow);
}

.tool-controls .btn {
    padding: 8px 15px;
    font-size: 0.95rem;
}

/* Merge Tab Styles */
.merge-grid-cell {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0; /* Empty cell color */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.merge-grid-image {
    position: absolute;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none; /* Prevent default browser drag */
    transition: transform 0.1s ease-out;
}

.merge-grid-image.contain {
    object-fit: contain;
    width: 100%;
    height: 100%;
    position: static;
    cursor: default; /* No drag when contain */
    transform: none !important;
}

.merge-grid-image:active {
    cursor: grabbing;
}

/* Global Cart Styles */
.global-cart-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: all 0.2s;
}

.global-cart-item:hover {
    background: #fff;
    border-color: var(--accent-green);
    box-shadow: 0 4px 10px rgba(167, 227, 138, 0.2);
    transform: translateY(-2px);
}

.global-cart-item:active {
    cursor: grabbing;
}

.cart-item-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.cart-item-ext {
    font-size: 0.75rem;
    color: #999;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 6px;
    transition: background 0.2s;
}

.cart-btn.use-btn:hover { background: rgba(167, 227, 138, 0.3); }
.cart-btn.del-btn:hover { background: rgba(255, 71, 87, 0.1); color: #ff4757; }

/* Source Files Sidebar Styles */
.source-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
}

.source-item:hover {
    background: #fff;
    border-color: #a8e063;
}

.source-item.selected {
    background: rgba(167, 227, 138, 0.15);
    border-color: #a8e063;
}

.source-item:active {
    cursor: grabbing;
}

.source-item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.source-item-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.source-item-info {
    flex: 1;
    min-width: 0;
}

.source-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.source-item-ext {
    font-size: 0.7rem;
    color: #999;
    background: #eee;
    padding: 2px 5px;
    border-radius: 4px;
    display: inline-block;
}

/* Desktop sticky sidebars */
.source-files-sidebar, .global-cart-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
}

/* Update main layout max-height for flex wrap safely */
.main-layout {
    min-height: 80vh;
}

/* Responsive Layout */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
        gap: 30px;
    }
    .source-files-sidebar, .global-cart-sidebar {
        width: 100%;
        max-height: none;
        position: static;
        min-height: auto;
    }
    .mobile-toggle-btn {
        display: inline-block !important;
    }
    #source-sidebar-body {
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
        overflow: hidden;
    }
    #source-sidebar-body.collapsed {
        max-height: 0 !important;
        opacity: 0;
        margin: 0;
        padding: 0;
        border: none;
    }
    .content-area {
        width: 100%;
        min-width: 0;
    }
    .merge-layout {
        flex-direction: column;
    }
    .merge-settings, .merge-preview-area {
        width: 100%;
        flex: none;
    }
    .tabs {
        flex-wrap: wrap;
    }
    .tab-btn {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 600px) {
    .header-section h1 {
        font-size: 1.8rem;
    }
    .card {
        padding: 20px;
    }
    .upload-label {
        padding: 30px 10px;
    }
    .format-select {
        font-size: 0.9rem;
    }
}

/* =======================================
   콜라주 모드 전환 토글 (세그먼트 컨트롤)
   ======================================= */
.merge-mode-toggle {
    display: flex;
    background: #e9ecef;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.merge-mode-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.25s ease;
}

.merge-mode-btn.active {
    background: white;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.merge-mode-btn:hover:not(.active) {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.5);
}

/* =======================================
   분할(Split) 미리보기 스타일
   ======================================= */
.split-preview-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.split-preview-container img {
    display: block;
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
}

/* 분할선 오버레이 (그리드) */
.split-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    pointer-events: none;
}

/* 분할된 각 칸 */
.split-grid-cell {
    border: 1.5px dashed rgba(255, 80, 80, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

/* 분할 번호 라벨 */
.split-cell-label {
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 분할 정보 뱃지 */
.split-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 80, 80, 0.1);
    color: #e04040;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
}

/* =======================================
   AI 보육일지 에디터 스타일
   ======================================= */

/* --- API Key 영역 --- */
.diary-api-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px dashed var(--border-color);
    text-align: center;
}

.diary-api-section .api-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.diary-api-section .api-status.connected {
    background: rgba(167, 227, 138, 0.2);
    color: #56ab2f;
}

.diary-api-section .api-status.disconnected {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.diary-api-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.diary-api-buttons .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
}

/* --- 데모/튜토리얼 배너 --- */
.diary-demo-banner {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border: 2px solid #ffe082;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.diary-demo-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.2);
}

.diary-demo-banner .demo-placeholder {
    background: #fff;
    border-radius: 12px;
    padding: 40px 20px;
    margin-bottom: 12px;
    color: #999;
    font-size: 1rem;
    border: 1px dashed #ddd;
}

/* --- 2단 레이아웃 (채팅 + 문서) --- */
.diary-editor-layout {
    display: flex;
    gap: 20px;
    align-items: stretch;
    min-height: 500px;
}

/* --- 채팅 영역 --- */
.diary-chat-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    border: 2px solid #eee;
    overflow: hidden;
}

.diary-chat-header {
    background: linear-gradient(135deg, #a8e063, #56ab2f);
    color: white;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diary-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 400px;
    background: #fafafa;
}

/* 채팅 말풍선 */
.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
    animation: bubbleIn 0.3s ease;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
    background: var(--accent-green);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    background: white;
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.chat-bubble.ai .ai-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
    font-weight: 600;
}

/* 타이핑 인디케이터 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* --- 마법의 버튼 영역 --- */
.diary-magic-buttons {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.magic-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid #e0e0e0;
    background: white;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.magic-btn:hover {
    border-color: var(--accent-green);
    background: rgba(167, 227, 138, 0.1);
    color: #333;
    transform: translateY(-1px);
}

.magic-btn.active {
    border-color: var(--accent-green);
    background: rgba(167, 227, 138, 0.2);
    color: #2d7a0e;
}

.magic-btn .magic-icon {
    font-size: 1rem;
}

/* --- 입력 영역 --- */
.diary-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    align-items: flex-end;
}

.diary-chat-input textarea {
    flex: 1;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s;
    line-height: 1.4;
}

.diary-chat-input textarea:focus {
    border-color: var(--accent-green);
}

.diary-chat-input .send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--accent-green);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diary-chat-input .send-btn:hover {
    background: #56ab2f;
    transform: scale(1.05);
}

.diary-chat-input .send-btn:disabled {
    background: #ddd !important;
    cursor: not-allowed;
}

.diary-chat-input .voice-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #eee;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diary-chat-input .voice-btn:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.diary-chat-input .voice-btn.recording {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
    animation: voicePulse 1s infinite;
}

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); }
}

/* --- 문서 영역 --- */
.diary-doc-section {
    flex: 1.2;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    border: 2px solid #eee;
    overflow: hidden;
}

.diary-doc-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 일지 카테고리 탭 */
.diary-category-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    background: #f8f9fa;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.diary-category-tabs::-webkit-scrollbar {
    display: none;
}

.diary-cat-btn {
    flex: 0 0 auto;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.diary-cat-btn:hover {
    color: #555;
    background: rgba(102, 126, 234, 0.05);
}

.diary-cat-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

/* 일지 textarea */
.diary-doc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 10px;
}

.diary-doc-body textarea {
    flex: 1;
    width: 100%;
    min-height: 250px;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.diary-doc-body textarea:focus {
    border-color: #667eea;
}

/* 자동저장 안내 */
.diary-autosave-note {
    font-size: 0.75rem;
    color: #bbb;
    text-align: right;
    padding: 0 4px;
    font-style: italic;
}

/* 장바구니 담기 액션 */
.diary-doc-actions {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

/* --- 활동 추천 모달 --- */
.diary-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.diary-modal-overlay.show {
    display: flex;
}

.diary-modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.diary-modal h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.diary-modal .modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.diary-modal .modal-close:hover {
    color: #333;
}

/* 활동 카테고리 */
.activity-category {
    margin-bottom: 16px;
}

.activity-category h4 {
    font-size: 0.95rem;
    color: #667eea;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.activity-category .activity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.activity-chip {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid #e0e0e0;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-chip:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.activity-chip.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* --- 튜토리얼 모달 --- */
.tutorial-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
}

.tutorial-step .step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-green);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.tutorial-step .step-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
}

/* --- 반응형 --- */
@media (max-width: 992px) {
    .diary-editor-layout {
        flex-direction: column;
    }

    .diary-chat-section,
    .diary-doc-section {
        min-width: 0;
        width: 100%;
    }

    .diary-chat-messages {
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    .diary-magic-buttons {
        gap: 4px;
    }

    .magic-btn {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    .diary-cat-btn {
        font-size: 0.78rem;
        padding: 8px 6px;
    }

    .diary-api-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

