.ai-analysis-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

    .ai-analysis-source {
        color: #888;
        font-size: 13px;
    }

    .ai-topic-panel {
        padding: 10px;
        margin-bottom: 12px;
        background: rgba(255, 250, 240, 0.72);
        border: 1px solid rgba(184, 135, 47, 0.28);
        border-radius: 6px;
    }

    .ai-action-text {
        margin: 0;
        color: var(--muted-color);
        font-size: 13px;
        line-height: 1.4;
    }

    .ai-section-grid {
        display: grid;
        grid-template-columns: repeat(11, minmax(0, 1fr));
        gap: 5px;
        margin-top: 9px;
    }

    .ai-section-btn {
        min-width: 0;
        min-height: 32px;
        padding: 5px 3px;
        border: 1px solid rgba(184, 135, 47, 0.56);
        border-radius: 8px;
        background: linear-gradient(180deg, #fffdf8, #f7ead5);
        color: var(--primary-dark);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        appearance: none;
        box-shadow: 0 1px 2px rgba(95, 27, 22, 0.12);
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
        transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
    }

    .ai-section-label {
        display: block;
        width: 100%;
        text-align: center;
    }

    .ai-login-btn strong {
        display: block;
        font-size: 15px;
        margin-bottom: 4px;
    }

    .ai-login-btn small {
        display: block;
        color: var(--muted-color);
        font-size: 12px;
        line-height: 1.35;
    }

    .ai-section-btn:hover,
    .ai-section-btn.active {
        border-color: var(--primary-color);
        box-shadow: 0 2px 6px rgba(95, 27, 22, 0.2);
    }

    .ai-section-btn:hover:not(:disabled) {
        background: linear-gradient(180deg, #fffaf0, #f0d9b5);
        transform: translateY(-1px);
    }

    .ai-section-btn:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: inset 0 1px 3px rgba(95, 27, 22, 0.2);
    }

    .ai-section-btn.active {
        background: linear-gradient(180deg, #b43a2a, var(--primary-color));
        color: #fffaf0;
    }

    .ai-section-btn.is-cached:not(.active) {
        border-color: rgba(46, 125, 50, 0.38);
        background: rgba(232, 245, 233, 0.76);
        color: #2e6d32;
    }

    .ai-section-state {
        position: absolute;
        top: 50%;
        right: 5px;
        min-width: 0;
        color: currentColor;
        font-size: 11px;
        transform: translateY(-50%);
    }

    .ai-section-state:empty {
        display: none;
    }

    .ai-section-btn:disabled {
        cursor: not-allowed;
        opacity: 0.55;
    }

    .ai-login-btn {
        width: 100%;
        min-height: 58px;
        padding: 12px;
        border: 1px solid rgba(95, 27, 22, 0.42);
        border-radius: 4px;
        background: rgba(255, 253, 248, 0.96);
        color: var(--primary-dark);
        cursor: pointer;
        text-align: left;
    }

    .ai-status {
        min-height: 20px;
        margin: 0 0 8px;
        color: var(--muted-color);
        font-size: 13px;
    }

    .ai-empty-state {
        min-height: 160px;
        display: grid;
        place-items: center;
        border: 1px dashed rgba(184, 135, 47, 0.34);
        border-radius: 6px;
        color: var(--muted-color);
        text-align: center;
        padding: 24px;
        background: rgba(255, 253, 248, 0.72);
    }

    .ai-generating-state {
        min-height: 220px;
        padding: 24px;
        border: 1px solid rgba(184, 135, 47, 0.34);
        border-radius: 6px;
        background:
            linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(250, 241, 224, 0.92));
    }

    .ai-generating-head {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .ai-spinner {
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
        border: 3px solid rgba(184, 135, 47, 0.24);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: aiSpin 0.9s linear infinite;
    }

    .ai-generating-title {
        margin: 0;
        color: var(--primary-dark);
        font-weight: 700;
        line-height: 1.4;
    }

    .ai-generating-subtitle {
        margin: 2px 0 0;
        color: var(--muted-color);
        font-size: 13px;
    }

    .ai-progress-track {
        height: 8px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(184, 135, 47, 0.18);
        margin: 14px 0 16px;
    }

    .ai-progress-bar {
        width: 44%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
        animation: aiProgress 1.6s ease-in-out infinite;
    }

    .ai-stage-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }

    .ai-stage-item {
        padding: 10px;
        border: 1px solid rgba(184, 135, 47, 0.22);
        border-radius: 6px;
        background: rgba(255, 253, 248, 0.74);
        color: var(--muted-color);
        font-size: 12px;
        line-height: 1.35;
        transition: border-color 0.2s, color 0.2s, background 0.2s;
    }

    .ai-stage-item.active {
        border-color: rgba(95, 27, 22, 0.38);
        background: rgba(184, 135, 47, 0.14);
        color: var(--primary-dark);
        font-weight: 700;
    }

    @keyframes aiSpin {
        to {
            transform: rotate(360deg);
        }
    }

    @keyframes aiProgress {
        0% {
            transform: translateX(-90%);
        }
        50% {
            transform: translateX(90%);
        }
        100% {
            transform: translateX(230%);
        }
    }
