.diagram-tool {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: calc(100vh - 100px);
    min-height: 560px;
}

.diagram-tool-header p {
    color: #6b7280;
    font-size: 14px;
    margin-top: 6px;
}

.diagram-privacy {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1e40af;
}

.diagram-tips {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
}

.diagram-tips ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.diagram-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.diagram-canvas-wrap {
    flex: 1;
    min-height: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

#mindmap-root {
    width: 100%;
    height: 100%;
    min-height: 480px;
}

.diagram-embed-frame {
    width: 100%;
    height: 100%;
    min-height: 520px;
    border: none;
    display: block;
}

#spreadsheet-root {
    width: 100%;
    height: 100%;
    min-height: 520px;
}

.diagram-error {
    display: none;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 13px;
}

.diagram-error.is-visible {
    display: block;
}

@media (max-width: 900px) {
    .diagram-tool {
        height: auto;
    }

    .diagram-canvas-wrap,
    #mindmap-root,
    #spreadsheet-root {
        min-height: 420px;
    }
}
