#xjcTool {
    color: #2d2a26;
}

#xjcTool .xjc-lead {
    margin: 10px 0 18px;
    color: #2d2a26;
    line-height: 1.6;
}

#xjcTool .xjc-config-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

#xjcTool .xjc-config-item {
    background: #fffcf6;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
}

#xjcTool .xjc-config-item-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

#xjcTool .xjc-config-label {
    display: block;
    font-size: 12px;
    color: #2d2a26;
    margin-bottom: 6px;
}

#xjcTool .xjc-select,
#xjcTool .xjc-input,
#xjcTool .xjc-textarea,
#xjcTool .xjc-code-output {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#xjcTool .xjc-select,
#xjcTool .xjc-input {
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    padding: 7px 9px;
    background: #fffdf8;
    color: #2d2a26;
}

#xjcTool .xjc-select:focus,
#xjcTool .xjc-input:focus,
#xjcTool .xjc-textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.24);
}

#xjcTool .xjc-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2d2a26;
    margin: 0;
}

#xjcTool .xjc-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

#xjcTool .xjc-btn,
#xjcTool .xjc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #ddd7cb;
    background: #fffdf8;
    color: #2d2a26;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#xjcTool .xjc-btn:hover,
#xjcTool .xjc-action-btn:hover {
    background: #f7f0e2;
    border-color: #d4af37;
}

#xjcTool .xjc-btn:focus-visible,
#xjcTool .xjc-action-btn:focus-visible {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.24);
}

#xjcTool .xjc-btn-primary {
    background: #e0bd4d;
    color: #2d2a26;
    border-color: #d4af37;
    font-weight: 600;
}

#xjcTool .xjc-btn-primary:hover {
    background: #d4af37;
    border-color: #c8a124;
}

#xjcTool .xjc-input-wrap {
    margin-bottom: 12px;
}

#xjcTool .xjc-input-label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #2d2a26;
}

#xjcTool .xjc-textarea,
#xjcTool .xjc-code-output {
    min-height: 220px;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 12px;
    font: 13px/1.6 "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #2d2a26;
    background: #fffdf8;
}

#xjcTool .xjc-code-output {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

#xjcTool .xjc-output-textarea {
    min-height: 200px;
}

#xjcTool .xjc-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7e6;
    border: 1px dashed #d4af37;
    color: #2d2a26;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

#xjcTool .xjc-waiting i {
    animation: xjc-spin 1s linear infinite;
}

@keyframes xjc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#xjcTool .xjc-hidden {
    display: none !important;
}

#xjcTool .xjc-result-area {
    border: 1px solid #ddd7cb;
    border-radius: 12px;
    padding: 12px;
    background: #fffcf6;
}

#xjcTool .xjc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

#xjcTool .xjc-summary-card {
    background: #fffdf8;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 10px;
}

#xjcTool .xjc-summary-label {
    font-size: 12px;
    color: #2d2a26;
    margin-bottom: 6px;
}

#xjcTool .xjc-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
}

#xjcTool .xjc-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

#xjcTool .xjc-tab {
    border: 1px solid #ddd7cb;
    border-radius: 999px;
    background: #fffdf8;
    color: #2d2a26;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#xjcTool .xjc-tab:hover {
    background: #f7f0e2;
    border-color: #d4af37;
}

#xjcTool .xjc-tab:focus-visible {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.24);
}

#xjcTool .xjc-tab.active {
    background: #fdf2cc;
    border-color: #d4af37;
    color: #2d2a26;
    font-weight: 600;
}

#xjcTool .xjc-panel {
    display: none;
    background: #fffdf8;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

#xjcTool .xjc-panel.active {
    display: block;
}

#xjcTool .xjc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

#xjcTool .xjc-panel-title {
    margin: 0;
    font-size: 15px;
    color: #2d2a26;
}

#xjcTool .xjc-error-list {
    margin: 0;
    padding: 0 0 0 18px;
    color: #2d2a26;
    line-height: 1.6;
}

#xjcTool .xjc-preview-wrap,
#xjcTool .xjc-fallback-wrap {
    background: #fffdf8;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

#xjcTool .xjc-fallback-note {
    margin: 0 0 8px;
    font-size: 13px;
    color: #2d2a26;
    background: #f7f0e2;
    border: 1px dashed #d4af37;
    border-radius: 8px;
    padding: 8px 10px;
}

#xjcTool .xjc-type-text {
    margin: 0 0 8px;
    font-size: 13px;
    color: #2d2a26;
}

#xjcTool .xjc-table-wrap {
    overflow-x: auto;
}

#xjcTool .xjc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#xjcTool .xjc-table th,
#xjcTool .xjc-table td {
    border: 1px solid #ddd7cb;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
}

#xjcTool .xjc-table thead th {
    background: #f6efdd;
    color: #2d2a26;
    white-space: nowrap;
}

#xjcTool .xjc-disclaimer {
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #2d2a26;
    background: #f9f3e5;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
}

@media (max-width: 1200px) {
    #xjcTool .xjc-config-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 900px) {
    #xjcTool .xjc-config-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    #xjcTool .xjc-summary-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    #xjcTool .xjc-select,
    #xjcTool .xjc-input,
    #xjcTool .xjc-textarea {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    #xjcTool .xjc-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    #xjcTool,
    #xjcTool .xjc-result-area,
    #xjcTool .xjc-preview-wrap,
    #xjcTool .xjc-fallback-wrap {
        max-width: 100%;
        overflow-x: hidden;
    }

    #xjcTool .xjc-config-grid,
    #xjcTool .xjc-summary-grid {
        grid-template-columns: 1fr;
    }
}
