﻿/**
 * 涓诲浘璁捐宸ヤ綔鍙?- 鍦嗘鼎鐜颁唬椋庢牸
 * Soft & Rounded Modern Design
 */

/* =========================================================
 * Layer 01 / Tokens & Reset
 * ========================================================= */

/* === 鍩虹鍙橀噺 === */
:root {
    /* 棰滆壊绯荤粺 - 鏇存煍鍜?*/
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-canvas: linear-gradient(135deg, #e0e7ef 0%, #d1dbe8 100%);

    --border-primary: rgba(0, 0, 0, 0.06);
    --border-secondary: rgba(0, 0, 0, 0.08);
    --border-focus: #6366f1;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* 涓婚鑹?- 涓撲笟钃?*/
    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-light: #eff6ff;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);

    /* 璇箟鑹?*/
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* 闃村奖绯荤粺 - 绮剧粏鍒嗙骇 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.05);
    --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.1), 0 12px 24px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 4px 24px rgba(37, 99, 235, 0.35);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.04);

    /* 鍦嗚绯荤粺 */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 9999px;

    /* 闂磋窛绯荤粺 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* 杩囨浮鍔ㄧ敾 - 鏃堕暱绯荤粺 */
    --duration-instant: 0.1s;
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
    --duration-slow: 0.35s;
    --duration-slower: 0.5s;
    --duration-slowest: 0.7s;

    /* 缂撳姩鍑芥暟绯荤粺 */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
    --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-emphasis: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* 缁勫悎杩囨浮鍙橀噺 */
    --transition-instant: var(--duration-instant) var(--ease-standard);
    --transition-fast: var(--duration-fast) var(--ease-standard);
    --transition-normal: var(--duration-normal) var(--ease-standard);
    --transition-slow: var(--duration-slow) var(--ease-standard);
    --transition-slower: var(--duration-slower) var(--ease-standard);
    --transition-bounce: var(--duration-slower) var(--ease-bounce);
    --transition-enter: var(--duration-normal) var(--ease-decelerate);
    --transition-exit: var(--duration-fast) var(--ease-accelerate);
    --transition-emphasis: var(--duration-normal) var(--ease-emphasis);

    /* 灏哄 */
    --nav-height: 64px;
    --sidebar-width: 380px;
}

/* === 閲嶇疆涓庡熀纭€ === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-canvas);
    height: 100vh;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

img {
    max-width: 100%;
    display: block;
}

/* === 椤堕儴瀵艰埅鏍?=== */
.top-nav {
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
}

.brand-icon {
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-normal);
    text-decoration: none;
}

.nav-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-btn.icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-md);
}

.nav-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.nav-btn:hover svg {
    opacity: 1;
}

/* =========================================================
 * Layer 02 / Layout
 * ========================================================= */

/* === 涓诲竷灞€ === */
.app-layout {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

/* === 渚ц竟鏍?=== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition-slow), transform var(--transition-slow);
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
}

.sidebar.collapsed {
    width: 0;
    border-right: none;
}

.sidebar-inner {
    width: var(--sidebar-width);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section {
    padding: 20px 24px;
}

.sidebar-section:first-child {
    padding-top: 16px;
}

/* ---------------------------------------------------------
 * Module / Upload Workspace
 * --------------------------------------------------------- */

/* === 涓婁紶鍗＄墖 - 鍦嗘鼎璁捐 === */
.upload-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-inset);
}

.upload-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === 涓婁紶妲戒綅 - 1:1姝ｆ柟褰€佸渾娑?=== */
.upload-slot {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--border-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    overflow: hidden;
    background: var(--bg-primary);
}

.upload-slot:hover {
    border-color: var(--accent-secondary);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-slot.primary {
    border-color: var(--accent-primary);
    border-style: dashed;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.upload-slot.primary:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.slot-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-tertiary);
    transition: var(--transition-normal);
    padding: 20px;
    text-align: center;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    opacity: 0.8;
    transition: var(--transition-normal);
}

.upload-slot:hover .placeholder-icon {
    opacity: 1;
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: scale(1.05);
}

.upload-slot:hover .slot-placeholder {
    color: var(--accent-primary);
}

.placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.placeholder-hint {
    font-size: 12px;
    color: var(--text-tertiary);
}

.slot-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: var(--transition-normal);
    border-radius: calc(var(--radius-lg) - 2px);
}

.upload-slot.has-file .slot-preview {
    opacity: 1;
}

.upload-slot.has-file .slot-placeholder {
    display: none;
}

.upload-slot.has-file {
    border-style: solid;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.upload-slot.has-file:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 鎷栨嫿鐘舵€?*/
.upload-slot.dragging {
    border-color: var(--accent-primary);
    border-style: solid;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-lg);
}

.upload-slot.dragging .placeholder-icon {
    transform: scale(1.1);
    background: var(--accent-light);
    color: var(--accent-primary);
}

.upload-slot.dragging .slot-placeholder {
    color: var(--accent-primary);
}

/* === 瑙掓爣鏍峰紡 - 宸︿笂瑙?=== */
.slot-label {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.label-dot.product {
    background: var(--accent-primary);
}

.label-dot.reference {
    background: var(--success);
}

/* === AI鍒嗘瀽鎸夐挳 === */
.ai-analyze-btn {
    position: relative;
    width: 100%;
    margin-top: 16px;
    padding: 14px 20px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    color: var(--text-inverse);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-normal);
    overflow: hidden;
}

.ai-analyze-btn:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.ai-analyze-btn:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* === 鎻愮ず璇嶅尯 === */
.prompt-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prompt-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.prompt-select:hover {
    border-color: var(--border-secondary);
}

.prompt-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.prompt-input {
    width: 100%;
    min-height: 140px;
    padding: 16px 18px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    transition: var(--transition-normal);
}

.prompt-input::placeholder {
    color: var(--text-tertiary);
}

.prompt-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-light);
}

/* === 鐢熸垚鎸夐挳鍖?=== */
.sidebar-footer {
    margin-top: auto;
    padding: 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
}

.generate-btn {
    width: 100%;
    padding: 18px 24px;
    background: var(--text-primary);
    border-radius: var(--radius-lg);
    color: var(--text-inverse);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.generate-btn:active {
    transform: translateY(0);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* === 鐢诲竷鍖哄煙 === */
.canvas-main {
    flex: 1;
    background: linear-gradient(135deg, #0a0f1a 0%, #111827 50%, #0d1321 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === AI绉戞妧椋庢牸绌虹姸鎬?=== */
.canvas-empty {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* 缃戞牸鑳屾櫙 */
.ai-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
}

/* 鎵弿绾挎晥鏋?*/
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    animation: scan-move 4s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes scan-move {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* AI鏍稿績鍖哄煙 */
.ai-core {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 40px;
}

/* 鍏竟褰㈢幆 */
.hex-ring {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-ring svg {
    width: 100%;
    height: 100%;
}

.hex-outer {
    color: rgba(59, 130, 246, 0.2);
    animation: hex-rotate 30s linear infinite;
}

.hex-middle {
    color: rgba(99, 102, 241, 0.3);
    animation: hex-rotate 25s linear infinite reverse;
}

.hex-inner {
    color: rgba(59, 130, 246, 0.5);
    animation: hex-rotate 20s linear infinite;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

@keyframes hex-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 鏁版嵁鐜?*/
.data-ring {
    position: absolute;
    inset: -20px;
    color: rgba(59, 130, 246, 0.4);
    animation: data-spin 15s linear infinite;
}

.data-ring svg {
    width: 100%;
    height: 100%;
}

@keyframes data-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* 鑳介噺鑴夊啿 */
.energy-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.6);
    transform: translate(-50%, -50%);
    animation: pulse-expand 2s ease-out infinite;
}

.energy-pulse.delay-1 {
    animation-delay: 0.6s;
}

.energy-pulse.delay-2 {
    animation-delay: 1.2s;
}

@keyframes pulse-expand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.8;
        border-color: rgba(59, 130, 246, 0.8);
    }
    100% {
        width: 180px;
        height: 180px;
        opacity: 0;
        border-color: rgba(59, 130, 246, 0);
    }
}

/* AI鏍稿績鍥炬爣 */
.ai-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    color: #60a5fa;
    box-shadow:
        0 0 30px rgba(59, 130, 246, 0.3),
        inset 0 0 20px rgba(59, 130, 246, 0.1);
    animation: icon-glow 3s ease-in-out infinite;
}

.ai-icon svg {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

@keyframes icon-glow {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(59, 130, 246, 0.3),
            inset 0 0 20px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow:
            0 0 50px rgba(59, 130, 246, 0.5),
            inset 0 0 30px rgba(59, 130, 246, 0.2);
    }
}

/* 鏁版嵁鑺傜偣 */
.data-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    animation: node-pulse 2s ease-in-out infinite;
}

.node-1 { top: 20%; left: 15%; animation-delay: 0s; }
.node-2 { top: 15%; right: 20%; animation-delay: 0.3s; }
.node-3 { top: 50%; right: 8%; animation-delay: 0.6s; }
.node-4 { bottom: 20%; right: 18%; animation-delay: 0.9s; }
.node-5 { bottom: 18%; left: 18%; animation-delay: 1.2s; }
.node-6 { top: 50%; left: 8%; animation-delay: 1.5s; }

@keyframes node-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* 杩炴帴绾?*/
.connection-lines {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.conn-line {
    stroke: rgba(59, 130, 246, 0.2);
    stroke-width: 1;
    stroke-dasharray: 5 5;
    animation: line-flow 3s linear infinite;
}

.line-1 { animation-delay: 0s; }
.line-2 { animation-delay: 0.5s; }
.line-3 { animation-delay: 1s; }
.line-4 { animation-delay: 1.5s; }
.line-5 { animation-delay: 2s; }
.line-6 { animation-delay: 2.5s; }

@keyframes line-flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -20; }
}

/* 鏍囬鍖哄煙 */
.ai-title-area {
    text-align: center;
    position: relative;
    z-index: 2;
}

.ai-title {
    font-size: 28px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.title-bracket {
    color: #3b82f6;
    font-weight: 300;
}

.ai-subtitle {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.8);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: status-blink 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* 纭繚鍐呭鍦ㄥ厜娴佷箣涓?*/
.canvas-empty,
.result-container,
.loading-overlay {
    position: relative;
    z-index: 1;
}
/* 注意: .canvas-toolbar 使用 position: absolute 居中定位，不在此处设置 */

/* 娉ㄦ剰: 鍥涘鏍肩粨鏋滄牱寮忓湪涓嬫柟 "鏀硅繘鐨勫洓瀹牸缁撴灉" 閮ㄥ垎瀹氫箟 */

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 760px;
    width: 100%;
    aspect-ratio: 1;
}

.result-item {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.result-item.selected {
    box-shadow: 0 0 0 3px var(--accent-primary), var(--shadow-xl);
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 鍥剧墖鍖呰鍣?*/
.item-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.item-overlay {
    display: none;
}

/* 搴忓彿瑙掓爣 - 绉戞妧椋?*/
.item-index {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md), 0 0 15px rgba(37, 99, 235, 0.1);
    z-index: 2;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* hover鎿嶄綔鎸夐挳 */
.item-actions {
    position: absolute;
    bottom: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-normal);
    z-index: 2;
}

.result-item:hover .item-actions {
    opacity: 1;
    transform: translateY(0);
}

.result-item .action-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.result-item .action-btn:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* ---------------------------------------------------------
 * Module / Refine Workspace
 * --------------------------------------------------------- */

/* === 寰皟妯″紡瑕嗙洊灞傦紙鍏ㄦ柊璁捐锛?=== */
.refine-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.refine-overlay.active {
    opacity: 1;
    visibility: visible;
}

.refine-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 680px;
    width: 100%;
    padding: 32px;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.refine-overlay.active .refine-container {
    transform: scale(1) translateY(0);
}

/* 鍏抽棴鎸夐挳 */
.refine-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.refine-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

/* 涓诲浘灞曠ず */
.refine-main-image {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.refine-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 缂╃暐鍥鹃€夋嫨鍖?*/
.refine-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.refine-thumb-item {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
}

.refine-thumb-item:hover {
    opacity: 0.9;
    transform: translateY(-4px);
}

.refine-thumb-item.active {
    border-color: var(--accent-primary);
    opacity: 1;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.refine-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.refine-thumb-item .thumb-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

/* 寰皟杈撳叆鍗＄墖 */
.refine-input-card {
    width: 100%;
    max-width: 560px;
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.input-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.input-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.input-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.input-wrapper input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.refine-send-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1d4ed8 100%);
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.refine-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.refine-send-btn:active {
    transform: translateY(0);
}

.input-tips {
    display: flex;
    gap: 16px;
}

.tip-item {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
    .refine-container {
        padding: 16px;
        gap: 16px;
    }

    .refine-main-image {
        max-width: 320px;
        border-radius: 16px;
    }

    .refine-thumb-item {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .refine-input-card {
        padding: 16px;
        border-radius: 16px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .refine-send-btn {
        justify-content: center;
    }
}

/* === 寰皟妯″紡瀹屾暣鐢诲竷缂栬緫鍣?=== */

/* 缂栬緫鍣ㄤ笁鏍忓竷灞€ */
.refine-editor-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 宸︿晶宸ュ叿鏍?*/
.refine-sidebar {
    width: 64px;
    min-width: 64px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    padding: 16px 8px;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-tool-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-tool-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.sidebar-tool-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 8px 4px;
}

/* 绗斿埛澶у皬闈㈡澘 */
.brush-size-panel {
    margin-top: auto;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brush-size-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brush-size-panel input[type="range"] {
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    writing-mode: vertical-lr;
    direction: rtl;
    transform: rotate(180deg);
    height: 80px;
    width: 4px;
}

.brush-size-panel input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brush-size-panel input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
}

.brush-size-value {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 24px;
    text-align: center;
}

/* 涓荤敾甯冨尯鍩?*/
.refine-canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #1a1a2e;
    overflow: hidden;
}

/* 椤堕儴HUD淇℃伅鏍?*/
.refine-hud {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.refine-hud > * {
    pointer-events: auto;
}

.hud-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 12px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: rgba(255, 255, 255, 0.8);
}

.hud-sep {
    color: rgba(255, 255, 255, 0.3);
}

.hud-actions {
    display: flex;
    gap: 8px;
}

.hud-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hud-hint {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* 鐢诲竷瀹瑰櫒 */
.refine-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: crosshair;
}

.refine-canvas-container canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* 鍏抽棴鎸夐挳锛堢敾甯冨尯鍩熷唴锛?- 鐧借壊涓婚 */
.refine-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 60;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.refine-close-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
    transform: scale(1.1);
}

/* 鍙充晶闈㈡澘 */
.refine-right-panel {
    width: 320px;
    min-width: 320px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

/* 缂╃暐鍥鹃€夋嫨鍖?- 鐧借壊涓婚 */
.refine-thumbnails-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.refine-thumbnails-section .section-title,
.refine-input-section .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.refine-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.refine-thumb-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.refine-thumb-item:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.refine-thumb-item.active {
    border-color: var(--accent-primary);
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.refine-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.refine-thumb-item .thumb-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

/* 寰皟杈撳叆鍖?- 鐧借壊涓婚 */
.refine-input-section {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-top: 1px solid #e2e8f0;
}

.refine-textarea {
    min-height: 90px;
    max-height: 120px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
    resize: none;
    transition: all 0.2s ease;
}

.refine-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.refine-textarea::placeholder {
    color: #94a3b8;
}

.refine-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-top: 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refine-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.refine-send-btn:active {
    transform: translateY(0);
}

/* 蹇嵎寤鸿 - 鐧借壊涓婚 */
.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.suggestion-chip {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

/* === 鍖哄煙鍒楄〃鏍峰紡 - 鐧借壊涓婚 === */
.refine-regions-section {
    flex: 1;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    overflow-y: auto;
    min-height: 0;
}

.refine-regions-section .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.refine-regions-section .section-title svg {
    color: var(--accent-primary);
}

.regions-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: auto;
}

.regions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.region-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    transition: all 0.2s ease;
}

.region-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.region-item.active {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.region-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.region-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
}

.region-coords {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Monaco', 'Consolas', monospace;
}

.region-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 5px;
    color: #64748b;
}

.region-delete {
    margin-left: auto;
    padding: 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.region-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.region-input {
    width: 100%;
    padding: 8px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #1e293b;
    resize: none;
    min-height: 50px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.region-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.region-input::placeholder {
    color: #94a3b8;
}

.regions-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 12px;
    color: #64748b;
}

.regions-tip svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* === 鍖哄煙缂栬緫寮规 - 鐢诲竷浣嶇疆娴姩 === */
.region-edit-popup {
    position: absolute;
    z-index: 100;
    min-width: 280px;
    max-width: 320px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08);
    animation: popup-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center top;
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: translateX(-50%) rotate(45deg);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--accent-gradient);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.popup-close {
    padding: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.popup-content {
    padding: 12px 16px 16px;
}

.popup-textarea {
    width: 100%;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #1e293b;
    resize: none;
    min-height: 80px;
    line-height: 1.5;
    transition: all 0.2s ease;
    font-family: inherit;
}

.popup-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.popup-textarea::placeholder {
    color: #94a3b8;
}

.popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.popup-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-btn.primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.popup-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.popup-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.popup-btn.secondary:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

/* === 寰皟鐢诲竷瀹瑰櫒浼樺寲 === */
.refine-canvas-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    overflow: hidden;
}

/* 鐢诲竷缃戞牸鑳屾櫙 */
.refine-canvas-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* === 寰皟缂栬緫鍣ㄦ暣浣撳竷灞€浼樺寲 - 鐧借壊涓婚 === */
.refine-editor-layout {
    display: flex;
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

/* 宸︿晶宸ュ叿鏍忎紭鍖?- 鐧借壊涓婚 */
.refine-sidebar {
    width: 68px;
    min-width: 68px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 16px 10px;
    gap: 6px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-tool-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-tool-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.sidebar-tool-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-tool-btn.danger:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.sidebar-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 4px;
}

/* 绗斿埛澶у皬闈㈡澘浼樺寲 - 鐧借壊涓婚 */
.brush-size-panel {
    margin-top: auto;
    padding: 12px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brush-size-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brush-size-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
}

/* 绗斿埛婊戝潡鏍峰紡 - 鐧借壊涓婚 */
.brush-size-panel input[type="range"] {
    width: 4px;
    height: 80px;
    appearance: none;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
    writing-mode: vertical-lr;
    direction: rtl;
    transform: rotate(180deg);
}

.brush-size-panel input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.brush-size-panel input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
}

/* 鍙充晶闈㈡澘浼樺寲 - 鐧借壊涓婚 */
.refine-right-panel {
    width: 340px;
    min-width: 340px;
    background: white;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.03);
}

/* HUD 淇℃伅鏍忎紭鍖?- 閫忔槑涓婚 */
.refine-hud {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 50;
    transition: all 0.2s ease;
}

.refine-hud:hover {
    background: rgba(0, 0, 0, 0.6);
}

.refine-hud.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-20px);
}

.hud-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.refine-hud:hover .hud-close {
    opacity: 1;
}

.hud-close:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
}

.hud-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Monaco', 'Consolas', monospace;
}

.hud-sep {
    color: rgba(255, 255, 255, 0.3);
}

.hud-actions {
    display: flex;
    gap: 8px;
}

.hud-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hud-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* 鍝嶅簲寮忚皟鏁?- 缂栬緫鍣ㄥ竷灞€ */
@media (max-width: 1024px) {
    .refine-right-panel {
        width: 280px;
        min-width: 280px;
    }

    .refine-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .refine-editor-layout {
        flex-direction: column;
    }

    .refine-sidebar {
        width: 100%;
        min-width: auto;
        height: 64px;
        flex-direction: row;
        padding: 8px 16px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-tools {
        flex-direction: row;
    }

    .brush-size-panel {
        margin-top: 0;
        margin-left: auto;
        flex-direction: row;
        padding: 8px 12px;
    }

    .brush-size-panel input[type="range"] {
        writing-mode: horizontal-tb;
        direction: ltr;
        transform: none;
        width: 60px;
        height: 4px;
    }

    .refine-right-panel {
        width: 100%;
        min-width: auto;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .refine-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }

    .hud-hint {
        display: none;
    }
}

/* 鏃х殑缁樺浘宸ュ叿鏍忔牱寮忥紙淇濈暀鍏煎鎬э級 */
.refine-tools-bar {
    position: absolute;
    bottom: -64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.refine-tools-bar .tools-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.refine-tools-bar .tool-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.refine-tools-bar .tool-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.refine-tools-bar .tool-btn.active {
    background: var(--accent-primary);
    color: white;
}

.refine-tools-bar .tool-divider {
    width: 1px;
    height: 24px;
    background: var(--border-primary);
    margin: 0 4px;
}

/* 绗斿埛澶у皬鎺у埗 */
.brush-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    cursor: default;
}

.brush-size-control .size-label {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.brush-size-control input[type="range"] {
    width: 80px;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--border-primary);
    border-radius: 2px;
    outline: none;
}

.brush-size-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.brush-size-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.brush-size-control .size-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 24px;
    text-align: center;
}

/* 鍝嶅簲寮忚皟鏁?- 缁樺浘宸ュ叿鏍?*/
@media (max-width: 768px) {
    .refine-tools-bar {
        bottom: -70px;
        padding: 8px 12px;
        gap: 8px;
    }

    .refine-tools-bar .tool-btn {
        width: 36px;
        height: 36px;
    }

    .brush-size-control input[type="range"] {
        width: 60px;
    }
}

/* 鏃х殑搴曢儴寰皟闈㈡澘宸茬Щ闄わ紝浣跨敤鏂扮殑 .refine-overlay 鍏ㄥ睆瑕嗙洊灞?*/

/* === 寮圭獥閫氱敤閬僵 === */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
 * Layer 03 / Components
 * ========================================================= */

/* === AI鍒嗘瀽寮圭獥 V2 - 涓撲笟绠€娲侀锛堝渾娑︿紭鍖栫増锛?=== */
.analysis-dialog-v2 {
    width: 920px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    background: linear-gradient(180deg, rgba(255,255,255,0.992), rgba(248,250,252,0.975));
    border-radius: 30px;
    box-shadow: 0 44px 110px rgba(15, 23, 42, 0.18), 0 16px 38px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255,255,255,0.95);
    overflow: hidden;
    animation: dialog-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 澶撮儴 */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 32px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.045);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.90));
}

.header-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
}

.header-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(248,250,252,0.98);
    color: #334155;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.close-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 10px 18px rgba(15, 23, 42, 0.08);
}

.dialog-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.dialog-close:hover {
    background: rgba(248,250,252,0.98);
    color: #334155;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.dialog-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

#refineSimpleModal .dialog-close:focus-visible,
#detailPageModal .dialog-close:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 10px 18px rgba(15, 23, 42, 0.08);
}

/* 鍐呭鍖?*/
.analysis-content {
    padding: 28px 32px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 杈撳叆琛ㄥ崟 */
.analysis-form .form-intro {
    margin-bottom: 20px;
}

.analysis-form .form-intro p {
    font-size: 15px;
    color: rgba(100, 116, 139, 0.92);
    margin: 0;
}

.form-input-group {
    display: flex;
    gap: 14px;
}

.form-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fafafa;
}

.form-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.form-input-group input::placeholder {
    color: #9ca3af;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 650;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

/* 鍔犺浇鐘舵€?*/
.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.loading-spinner-v2 {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #111827;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin: 20px 0 8px;
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.loading-hint {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* 鍒嗘瀽缁撴灉 V2 */
.analysis-result-v2 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 琛屽竷灞€ */
.result-row {
    display: grid;
    gap: 18px;
}

.result-row.two-col {
    grid-template-columns: 1fr 1fr;
}

.result-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* 缁撴灉鍧?- 澧炲己鍦嗘鼎鍜岃繃娓℃晥鏋?*/
.result-block {
    background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(248,250,252,0.78));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.25s ease;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.result-block:hover {
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.result-block.compact {
    padding: 18px;
}

.result-block.compact h4 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.result-block.compact p {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* 杞寲寤鸿鐗规畩鏍峰紡 */
.result-block.conversion-block {
    grid-column: span 1;
}

.conversion-content {
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
    max-height: 200px;
    overflow-y: auto;
}

.conversion-content br {
    display: block;
    margin: 8px 0;
}

.block-header {
    margin-bottom: 14px;
}

.block-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.block-tag.tag-blue {
    background: rgba(37, 99, 235, 0.07);
    color: rgba(37, 99, 235, 0.88);
    border-color: rgba(37, 99, 235, 0.08);
}

.block-tag.tag-gray {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    border-color: rgba(15, 23, 42, 0.05);
}

.block-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.75;
    margin: 0;
}

/* 缁撴灉鍖哄煙 - 鍦嗘鼎杩囨浮 */
.result-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.86));
    border: 1px solid rgba(37, 99, 235, 0.07);
    border-radius: 22px;
    padding: 22px;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.04), inset 0 1px 0 rgba(255,255,255,0.9);
}

.result-section:hover {
    border-color: rgba(37, 99, 235, 0.14);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.06);
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-hint {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: auto;
}

/* 娲炲療缃戞牸 - 鍦嗘鼎 */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.insight-block {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.88));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.insight-block:hover {
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.05);
}

.insight-block .insight-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.insight-block p {
    font-size: 13px;
    color: #374151;
    line-height: 1.65;
    margin: 0;
}

/* 鎻愮ず璇嶅尯鍩?- 鍦嗘鼎 */
.prompts-section {
    background: #fff;
    border: 1px solid #eef0f2;
}

.prompts-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prompts-list-v2 button,
.prompt-chip {
    width: 100%;
    padding: 16px 18px;
    background: rgba(15,23,42,0.04);
    border: 1px solid rgba(15,23,42,0.05);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.65;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.025);
}

.prompts-list-v2 button:hover,
.prompt-chip:hover {
    background: rgba(37,99,235,0.09);
    border-color: rgba(37,99,235,0.12);
    color: var(--accent-primary);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
}

/* 搴曢儴鎿嶄綔 */
.result-footer {
    display: flex;
    justify-content: center;
    padding-top: 12px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 650;
    color: var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.btn-secondary:hover {
    background: rgba(241,245,249,0.98);
    border-color: rgba(37, 99, 235, 0.16);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
    .analysis-dialog-v2 {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .result-row.two-col,
    .result-row.three-col,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .form-input-group {
        flex-direction: column;
    }
}

/* === 鍥剧墖鏀惧ぇ寮圭獥 === */
.modal-backdrop.lightbox {
    background: rgba(0, 0, 0, 0.92);
    z-index: 250; /* 楂樹簬鍘嗗彶寮圭獥锛?00锛夛紝纭繚浠庡巻鍙茶褰曠偣鍑诲浘鐗囨椂lightbox鏄剧ず鍦ㄦ渶涓婂眰 */
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition-normal);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#lightboxImage {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* Lightbox 鎿嶄綔鎸夐挳 */
.lightbox-actions {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    z-index: 10;
}

.lightbox-action-btn,
.analysis-action-btn,
.individual-action-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.lightbox-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 650;
    color: var(--text-inverse);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
    border: 1px solid transparent;
}

.lightbox-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

.lightbox-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.16), 0 20px 34px rgba(37, 99, 235, 0.22);
}

.lightbox-action-btn.secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
    border-color: rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.lightbox-action-btn.secondary:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.14));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.25);
}

/* ---------------------------------------------------------
 * Module / History Center
 * --------------------------------------------------------- */

/* === 鍘嗗彶璁板綍寮圭獥 === */
.history-dialog {
    width: 860px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 40px);
    background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(248,250,252,0.97));
    border-radius: 30px;
    box-shadow: 0 36px 90px rgba(15, 23, 42, 0.18), 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255,255,255,0.92);
    overflow: hidden;
    animation: dialog-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-premium-dialog {
    position: relative;
}

.history-premium-dialog::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 92px;
    background: linear-gradient(180deg, rgba(219,234,254,0.34), rgba(255,255,255,0));
    pointer-events: none;
}

.history-dialog-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 30px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.90));
}

.history-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.history-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(219,234,254,0.88));
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.history-title-wrap h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-title-wrap p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: #64748b;
    max-width: 520px;
}

.dialog-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.history-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.history-summary-card {
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.86));
    border: 1px solid rgba(37, 99, 235, 0.07);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.04), inset 0 1px 0 rgba(255,255,255,0.9);
}

.history-summary-label {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.07);
    color: rgba(37, 99, 235, 0.88);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.history-summary-card p {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.history-item {
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(248,250,252,0.78));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.history-item:hover {
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.history-item-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.history-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-time {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.history-item-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-item-prompt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.history-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.history-inline-tag.async {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.history-inline-tag.partial {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.history-inline-tag.analysis {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
}

.history-item-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.history-item-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.history-item-images img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.empty-hint {
    text-align: center;
    padding: 56px 28px;
    color: var(--text-tertiary);
    font-size: 15px;
}

/* === 鍔犺浇閬僵 - 绉戞妧鎰熷寮?=== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 300;
}

.loading-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-flow 15s linear infinite;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    inset: 12px;
    border-width: 2px;
    border-color: rgba(59, 130, 246, 0.1);
    border-top-color: #3b82f6;
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    inset: 22px;
    border-width: 2px;
    border-color: rgba(96, 165, 250, 0.1);
    border-top-color: #60a5fa;
    animation-duration: 0.6s;
}

/* 涓績鑴夊啿 */
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: loading-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent-primary);
}

@keyframes loading-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
}

.loading-content p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 鍔犺浇鎻愮ず鍔ㄦ€佺偣 */
.loading-content p::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* === 鍝嶅簲寮忚璁?=== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 340px;
    }

    .result-grid {
        max-width: 580px;
        gap: 16px;
    }

    .canvas-toolbar {
        padding: 10px 16px;
        gap: 16px;
    }

    .toolbar-btn span {
        display: none;
    }

    .toolbar-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
        --sidebar-width: 100vw;
    }

    .top-nav {
        padding: 0 16px;
    }

    .brand-text {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-height);
        bottom: 0;
        z-index: 80;
        transform: translateX(0);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar-inner {
        width: 100vw;
    }

    .canvas-main {
        width: 100%;
    }

    .canvas-toolbar {
        top: 12px;
        padding: 8px 12px;
        gap: 12px;
    }

    .toolbar-title {
        font-size: 13px;
    }

    .toolbar-icon {
        display: none;
    }

    .result-container {
        padding: 70px 16px 24px;
    }

    .result-grid {
        gap: 12px;
    }

    .analysis-dialog,
    .history-dialog {
        width: calc(100vw - 32px);
        margin: 16px;
    }
}

/* === 婊氬姩鏉＄編鍖?=== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* === Toast 閫氱煡绯荤粺 === */
.toast-notification {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    z-index: 400;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.toast-notification.toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification.toast-hiding {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.toast-message {
    max-width: 320px;
    line-height: 1.5;
}

/* Toast 绫诲瀷鍙樹綋 */
.toast-success .toast-icon {
    background: var(--success-light);
    color: var(--success);
}

.toast-error .toast-icon {
    background: #fef2f2;
    color: var(--danger);
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: var(--warning);
}

.toast-info .toast-icon {
    background: var(--accent-light);
    color: var(--accent-primary);
}

/* === 楂樹寒楠岃瘉鍔ㄧ敾 === */
.highlight-required {
    animation: highlight-shake 0.5s ease;
}

@keyframes highlight-shake {
    0%, 100% {
        transform: translateX(0);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    }
}

.upload-slot.highlight-required {
    border-color: var(--danger) !important;
    animation: upload-highlight 0.5s ease;
}

@keyframes upload-highlight {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.02);
    }
    50% {
        transform: scale(0.98);
    }
    75% {
        transform: scale(1.01);
    }
}

.prompt-input.highlight-required {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* === 鐢熸垚鎸夐挳鍔犺浇鐘舵€?=== */
.generate-btn.loading {
    pointer-events: none;
    position: relative;
}

.generate-btn.loading .btn-content {
    opacity: 0;
}

.generate-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === 渚ц竟鏍忓垏鎹㈡寜閽姸鎬?=== */
.nav-btn.sidebar-collapsed svg {
    transform: scaleX(-1);
}

.nav-btn.sidebar-collapsed {
    background: var(--accent-light);
    color: var(--accent-primary);
}

/* === 鑱婂ぉ娑堟伅鏍峰紡锛堝井璋冮潰鏉匡級 === */
.chat-message {
    max-width: 85%;
    margin-bottom: 14px;
    animation: message-in 0.3s ease;
}

.chat-message.ai {
    margin-right: auto;
}

.chat-message.user {
    margin-left: auto;
}

.chat-message p {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
}

.chat-message.ai p {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-sm);
}

.chat-message.user p {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    border-bottom-right-radius: var(--radius-sm);
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 鍥剧墖鍔犺浇鍗犱綅 === */
.result-item img {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    transition: opacity 0.3s ease;
}

.result-item img[src=""] {
    opacity: 0;
}

/* === 寰氦浜掑寮?=== */
/* 鎸夐挳鐐瑰嚮娉㈢汗鏁堟灉 */
.generate-btn::before,
.ai-analyze-btn::before,
.analyze-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.generate-btn:active::before,
.ai-analyze-btn:active::before,
.analyze-submit:active::before {
    opacity: 1;
}

/* 杈撳叆妗嗚仛鐒﹀姩鐢?*/
.prompt-input,
.drawer-input input,
.form-field input {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.prompt-input:focus,
.drawer-input input:focus,
.form-field input:focus {
    transform: translateY(-1px);
}

/* 渚ц竟鏍忔敹璧疯繃娓′紭鍖?*/
.sidebar {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    box-shadow: none;
}

/* 鐢诲竷鍖哄煙灞曞紑鍔ㄧ敾 */
.canvas-main {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 缁撴灉缃戞牸鍏ュ満鍔ㄧ敾 */
.result-item {
    animation: result-item-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.2s; }
.result-item:nth-child(3) { animation-delay: 0.3s; }
.result-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes result-item-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
        filter: blur(10px);
    }
    60% {
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* 缁撴灉椤瑰姞杞藉畬鎴愬悗鐨勮剦鍐叉晥鏋?*/
.result-item.loaded::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--accent-primary);
    animation: item-loaded-pulse 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes item-loaded-pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}


/* 鎮仠鏁堟灉澧炲己 */
.upload-slot:hover .placeholder-icon svg {
    animation: icon-wiggle 0.5s ease;
}

@keyframes icon-wiggle {
    0%, 100% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

/* ============================================
   AI 璁捐鍒嗘瀽闈㈡澘 - 绠€娲佸姛鑳藉鍚?   ============================================ */

.ai-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    z-index: 89;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ai-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ---------------------------------------------------------
 * Module / Analysis Center
 * --------------------------------------------------------- */

.analysis-center-shell {
    position: fixed;
    inset: clamp(10px, 1.4vw, 18px);
    transform: translateY(18px) scale(0.995);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

.analysis-center-shell.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.analysis-center-frame,
.analysis-center-frame-v4 {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.985), rgba(246,247,249,0.975));
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.86);
}

.analysis-center-topbar,
.analysis-topbar-v4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr) auto;
    gap: 24px;
    align-items: center;
    padding: 24px 32px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.76));
}

.analysis-center-topbar-stack {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.analysis-center-inline-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.analysis-inline-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.88);
    color: rgba(15, 23, 42, 0.82);
}

.analysis-inline-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(100, 116, 139, 0.84);
}

.analysis-center-brand {
    display: block;
}

.analysis-center-brand-copy {
    display: grid;
    gap: 8px;
}

.analysis-center-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.66);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.analysis-center-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #0f172a;
    font-weight: 800;
}

.analysis-center-subtitle {
    margin: 0;
    max-width: 540px;
    color: rgba(51, 65, 85, 0.82);
    font-size: 13px;
    line-height: 1.75;
}

.analysis-center-session-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-content: flex-start;
    padding-top: 6px;
}

.analysis-center-command-strip {
    display: grid;
    gap: 10px;
}

.analysis-command-card,
.analysis-command-board-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(30,41,59,0.92));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.analysis-command-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(191, 219, 254, 0.72);
}

.analysis-command-card strong,
.analysis-command-board-item strong {
    font-size: 14px;
    line-height: 1.55;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.analysis-session-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(250, 250, 250, 0.94);
    color: rgba(51, 65, 85, 0.74);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.analysis-session-pill.is-ready {
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(219, 234, 254, 0.72);
    color: #1d4ed8;
}

.analysis-center-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(51, 65, 85, 0.78);
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.analysis-center-close:hover {
    transform: translateY(-1px);
    color: #dc2626;
    background: rgba(254, 242, 242, 0.92);
}

.analysis-center-body,
.analysis-body-v4 {
    min-height: 0;
    display: block;
    overflow: auto;
    background: linear-gradient(180deg, rgba(252,253,255,0.9), rgba(247,249,252,0.96));
}

.analysis-center-main,
.analysis-main-v4 {
    min-width: 0;
    min-height: 0;
    width: min(1520px, calc(100vw - clamp(28px, 4vw, 96px)));
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: clamp(18px, 2.2vw, 28px);
    padding: clamp(18px, 2.2vw, 28px) 0 clamp(24px, 3vw, 36px);
}

.analysis-entry-v4,
.analysis-entry-hero-v4,
.analysis-entry-context-grid {
    display: grid;
    gap: 18px;
}

.analysis-entry-hero-v4 {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    align-items: stretch;
}

.analysis-entry-actions-v4 {
    display: grid;
    gap: 14px;
}

.analysis-entry-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-items-inline,
.analysis-business-grid-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-business-card-v4 .ai-analysis-tip-card {
    margin-top: 14px;
}

.analysis-center-context-card,
.analysis-center-note,
.analysis-side-card,
.ai-analysis-card,
.ai-prompts-card,
.ai-workspace-summary-card,
.ai-loading {
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.975), rgba(248,249,251,0.9));
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.035), inset 0 1px 0 rgba(255,255,255,0.88);
}

.analysis-center-card-head,
.analysis-side-card-head {
    display: grid;
    gap: 6px;
}

.analysis-center-card-kicker,
.analysis-side-card-kicker,
.action-kicker,
.analysis-entry-kicker {
    display: inline-flex;
    width: fit-content;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: rgba(30, 41, 59, 0.54);
}

.analysis-center-card-title,
.analysis-side-card h4 {
    margin: 0;
    font-size: 17px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.analysis-center-card-meta {
    color: rgba(100, 116, 139, 0.84);
    font-size: 12px;
    line-height: 1.6;
}

.analysis-status-card {
    padding: 20px;
}

.analysis-center-context-grid {
    margin-top: 16px;
}

.status-items {
    display: grid;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.item-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    flex-shrink: 0;
}

.item-dot.empty {
    background: #cbd5e1;
}

.item-dot.filled {
    background: #10b981;
}

.item-label {
    font-size: 13px;
    color: rgba(51, 65, 85, 0.82);
    width: 56px;
}

.item-value {
    font-size: 13px;
    color: #0f172a;
    font-weight: 600;
}

.analysis-center-status-note,
.status-subtitle {
    margin: 14px 0 0;
    font-size: 12px;
    color: rgba(100, 116, 139, 0.92);
    line-height: 1.7;
}

.analysis-center-business-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,247,250,0.94));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.analysis-business-grid {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.analysis-business-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-business-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-business-value {
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.ai-task-grid {
    display: grid;
    gap: 12px;
}

.analysis-action-btn {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244,246,250,0.88));
    cursor: pointer;
    text-align: left;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.analysis-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.09);
}

.analysis-action-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    box-shadow: none;
}

.analysis-action-btn.primary:not(:disabled) {
    color: #eff6ff;
    border-color: transparent;
    background: linear-gradient(145deg, #0f172a 0%, #1e40af 52%, #3b82f6 100%);
    box-shadow: 0 22px 40px rgba(37, 99, 235, 0.22);
}

.analysis-action-btn.primary:not(:disabled) .action-title,
.analysis-action-btn.primary:not(:disabled) .action-desc,
.analysis-action-btn.primary:not(:disabled) .action-kicker {
    color: inherit;
}

.analysis-action-btn.secondary.enabled {
    border-color: rgba(245, 158, 11, 0.18);
    background: linear-gradient(180deg, rgba(255,251,235,0.92), rgba(255,255,255,0.92));
}

.analysis-action-btn .action-content {
    display: grid;
    gap: 7px;
}

.analysis-action-btn .action-title {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.analysis-action-btn .action-desc {
    font-size: 12px;
    line-height: 1.75;
    color: rgba(71, 85, 105, 0.88);
}

.analysis-action-btn .action-hint {
    font-size: 11px;
    line-height: 1.65;
    color: rgba(100, 116, 139, 0.92);
}

.analysis-center-note {
    padding: 16px 18px;
    color: rgba(51, 65, 85, 0.88);
    font-size: 12px;
    line-height: 1.85;
}

.analysis-mode-nav,
.analysis-mode-nav-v4 {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    width: fit-content;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.04);
}

.analysis-mode-tab {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.9);
    font-size: 12px;
    color: rgba(51, 65, 85, 0.82);
    font-weight: 700;
}

.analysis-mode-tab.is-active {
    background: rgba(15, 23, 42, 0.92);
    color: #eff6ff;
}

.ai-workspace-summary {
    padding: 0;
}

.analysis-center-summary-card,
.ai-workspace-summary-card {
    padding: 18px 20px;
}

.analysis-command-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.analysis-center-summary-head,
.ai-workspace-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ai-workspace-summary-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.ai-workspace-summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 11px;
    font-weight: 700;
}

.ai-workspace-summary-meta {
    margin: 0 0 8px;
    color: rgba(100, 116, 139, 0.84);
    font-size: 12px;
}

.ai-workspace-summary-text {
    margin: 0;
    color: rgba(51, 65, 85, 0.9);
    font-size: 13px;
    line-height: 1.8;
}

.analysis-center-stage,
.ai-workspace-body,
.analysis-stage-v4 {
    min-height: 0;
    display: grid;
    gap: 20px;
    padding: 0;
    overflow: visible;
}

.ai-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-decision-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.analysis-decision-item {
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-decision-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(100, 116, 139, 0.82);
}

.analysis-decision-value {
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.analysis-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.analysis-score-card {
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-score-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(100, 116, 139, 0.82);
}

.analysis-score-value {
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.analysis-center-stage::-webkit-scrollbar,
.ai-workspace-body::-webkit-scrollbar {
    width: 8px;
}

.analysis-center-stage::-webkit-scrollbar-thumb,
.ai-workspace-body::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 999px;
}

.analysis-center-followup,
.analysis-followup-v4 {
    display: grid;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.985), rgba(246,247,249,0.95));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.analysis-history-workspace-v4 {
    display: grid;
    gap: 18px;
    padding: 24px 26px;
    border-radius: 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(246,247,249,0.95));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.analysis-history-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: clamp(14px, 1.8vw, 18px);
}

.analysis-history-list,
.analysis-history-preview {
    min-height: 420px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.88);
}

.history-item-archive {
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,247,250,0.94));
}

.analysis-history-list {
    padding: 14px;
    display: grid;
    gap: 12px;
    align-content: start;
    max-height: 70vh;
    overflow: auto;
}

.analysis-history-preview {
    padding: 18px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,247,250,0.96));
}

.analysis-history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    color: rgba(100, 116, 139, 0.88);
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

.analysis-history-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.history-restore-btn.secondary {
    background: rgba(255,255,255,0.94);
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.analysis-history-preview-shell {
    display: grid;
    gap: 18px;
}

.analysis-history-readonly-card {
    border-color: rgba(59, 130, 246, 0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.995), rgba(244,247,252,0.96));
}

.analysis-history-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.analysis-history-preview-head {
    display: grid;
    gap: 6px;
}

.analysis-history-preview-head h4 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.analysis-history-preview-head p {
    margin: 0;
    color: rgba(100, 116, 139, 0.84);
    font-size: 13px;
}

.analysis-history-preview-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.analysis-history-preview-images img {
    width: 100%;
    aspect-ratio: 1.1 / 1;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    display: block;
}

.analysis-center-followup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-center-followup-hint {
    font-size: 12px;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-followup-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.88);
    font-size: 12px;
    color: rgba(51, 65, 85, 0.84);
}

.analysis-center-followup-bar,
.analysis-followup-bar-v4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 12px;
}

.analysis-center-followup-input {
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
}

.analysis-center-followup-send {
    align-self: stretch;
    min-width: 120px;
    padding: 0 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, #0f172a 0%, #1e40af 52%, #3b82f6 100%);
    color: #eff6ff;
    font-size: 13px;
    font-weight: 700;
}

.analysis-center-entry {
    display: grid;
    gap: 18px;
}

.analysis-entry-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at top left, rgba(59,130,246,0.15), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.9));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.analysis-entry-title {
    margin: 10px 0 0;
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #020617;
}

.analysis-entry-desc {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.85;
    color: rgba(51, 65, 85, 0.88);
    max-width: 760px;
}

.analysis-entry-metrics {
    display: grid;
    gap: 12px;
    align-content: end;
}

.analysis-entry-metric {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.analysis-entry-metric-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-entry-metric strong {
    font-size: 15px;
    color: #0f172a;
}

.analysis-entry-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.analysis-entry-card {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,246,250,0.92));
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.analysis-entry-card-accent {
    background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(30,64,175,0.95));
    color: #eff6ff;
}

.analysis-entry-card-accent h4,
.analysis-entry-card-accent p {
    color: inherit;
}

.analysis-entry-card-index {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15,23,42,0.06);
    color: #0f172a;
}

.analysis-entry-card-accent .analysis-entry-card-index {
    background: rgba(255,255,255,0.12);
    color: #eff6ff;
}

.analysis-entry-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0f172a;
}

.analysis-entry-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(51, 65, 85, 0.9);
}

.ai-message {
    padding: 16px 20px;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message-bubble {
    display: grid;
    gap: 16px;
}

.ai-followup-result {
    padding-left: 0;
    padding-right: 0;
}

.ai-followup-bubble {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.analysis-followup-hero-card {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(30,64,175,0.94));
    color: #eff6ff;
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.18);
}

.analysis-followup-hero-card h4,
.analysis-followup-hero-card .ai-collapsible-content,
.analysis-followup-hero-card .ai-collapsible-toggle {
    color: inherit;
}

.analysis-followup-decision {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    font-size: 13px;
    line-height: 1.7;
}

.ai-report-shell {
    display: grid;
    gap: 18px;
    padding-bottom: 4px;
}

.analysis-workbench-grid,
.ai-report-grid,
.ai-report-grid-wide {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.34fr) minmax(260px, 0.9fr);
    align-items: start;
}

.analysis-generated-layout {
    display: grid;
    gap: 18px;
}

.analysis-upload-strategy-grid,
.analysis-upload-ops-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.analysis-generated-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(400px, 0.9fr);
    gap: 20px;
    align-items: stretch;
}

.analysis-generated-hero-main,
.analysis-generated-hero-side,
.analysis-generated-board,
.analysis-generated-review-column,
.analysis-generated-action-column,
.ai-report-section {
    display: grid;
    gap: 16px;
}

.analysis-generated-hero-head {
    display: grid;
    gap: 8px;
}

.analysis-generated-hero-title {
    font-size: 34px;
    line-height: 1.03;
    letter-spacing: -0.06em;
    max-width: 14ch;
}

.analysis-generated-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.analysis-generated-metric {
    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,246,250,0.9));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 10px 20px rgba(15, 23, 42, 0.04);
    position: relative;
}

.analysis-generated-metric::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(15,23,42,0.14), transparent);
}

.analysis-generated-metric-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(100, 116, 139, 0.88);
}

.analysis-generated-metric strong {
    font-size: 18px;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.analysis-generated-board {
    grid-template-columns: minmax(0, 1.46fr) minmax(360px, 0.74fr);
    align-items: start;
}

.analysis-generated-action-column {
    align-content: start;
}

.analysis-lead-column,
.ai-report-lead,
.analysis-side-column,
.ai-report-actions {
    position: sticky;
    top: 0;
    align-self: start;
}

.ai-report-section-head {
    display: grid;
    gap: 8px;
}

.ai-report-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 0 0 8px;
    border-radius: 0;
    background: transparent;
    color: rgba(15, 23, 42, 0.58);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.22em;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.ai-report-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.22;
    letter-spacing: -0.03em;
    color: #020617;
}

.analysis-lead-panel {
    border-radius: 24px;
    background: linear-gradient(145deg, #0f172a, #111827 62%, #1e3a8a);
    color: #e2e8f0;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24);
}

.analysis-lead-panel .ai-collapsible-content,
.analysis-lead-panel .ai-collapsible-toggle {
    color: inherit;
}

.analysis-lead-panel .ai-collapsible-toggle {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}

.analysis-lead-note,
.ai-next-step-tip {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255,255,255,0.72);
    color: rgba(51, 65, 85, 0.9);
    font-size: 12px;
    line-height: 1.8;
}

.analysis-lead-note-hero {
    position: relative;
    padding-left: 54px;
}

.analysis-lead-note-hero::before {
    content: 'NOTE';
    position: absolute;
    left: 18px;
    top: 16px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(15, 23, 42, 0.58);
}

.analysis-choice-banner {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(250,204,21,0.1));
    border: 1px solid rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.analysis-choice-banner-large {
    padding: 30px 30px 26px;
    border-radius: 28px;
    gap: 12px;
    box-shadow: 0 24px 44px rgba(245, 158, 11, 0.16);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.38), transparent 34%),
        linear-gradient(160deg, rgba(255,250,240,0.99), rgba(255,244,214,0.95));
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.analysis-choice-banner-large::after {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
}

.analysis-choice-banner-large strong {
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -0.05em;
}

.analysis-choice-banner-large p {
    margin: 0;
    font-size: 13px;
    line-height: 1.85;
    color: rgba(146, 64, 14, 0.86);
    max-width: 46ch;
}

.analysis-choice-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.ai-analysis-card {
    overflow: hidden;
}

.analysis-card-emphasis,
.analysis-card-spotlight {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.analysis-card-spotlight {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(244,246,249,0.95));
}

.analysis-card-spotlight h4 {
    font-size: 15px;
    padding: 18px 20px;
}

.analysis-card-spotlight .ai-collapsible-block,
.analysis-card-spotlight p {
    padding-left: 20px;
    padding-right: 20px;
}

.analysis-card-body {
    padding: 16px 18px 18px;
}

.analysis-insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.analysis-insight-item {
    padding: 14px 15px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-insight-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(100, 116, 139, 0.84);
}

.analysis-insight-value {
    font-size: 13px;
    line-height: 1.6;
    color: #0f172a;
}

.analysis-mini-list {
    display: grid;
    gap: 10px;
}

.analysis-mini-list-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-mini-list-index {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15,23,42,0.08);
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
}

.analysis-mini-list-text {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(51, 65, 85, 0.92);
}

.analysis-segment-grid {
    display: grid;
    gap: 12px;
}

.analysis-segment-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,249,252,0.92));
}

.analysis-segment-head {
    margin-bottom: 10px;
    color: #0f172a;
}

.analysis-priority-list {
    display: grid;
    gap: 12px;
    padding: 16px 18px 18px;
}

.analysis-priority-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-priority-badge {
    min-width: 36px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(145deg, #0f172a, #1e3a8a);
    color: #eff6ff;
    font-size: 11px;
    font-weight: 800;
}

.analysis-priority-copy strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #0f172a;
}

.analysis-priority-copy p {
    margin: 0 0 6px;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
}

.analysis-priority-meta,
.analysis-list-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(100, 116, 139, 0.84);
}

.analysis-two-column-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 18px 18px;
}

.inline-prompts-card {
    margin-top: 8px;
}

.analysis-report-v4 {
    display: grid;
    gap: 28px;
}

.analysis-hero-v4,
.analysis-section-v4 {
    display: grid;
    gap: 18px;
}

.analysis-hero-v4 {
    padding: 30px 32px;
    border-radius: 30px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.995), rgba(245,248,252,0.96));
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.07);
}

.analysis-hero-generated-v4 {
    gap: 22px;
    padding-top: 32px;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 22%),
        radial-gradient(circle at left top, rgba(59, 130, 246, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.997), rgba(245,248,252,0.975));
}

.analysis-report-upload-v4 .analysis-hero-v4 {
    gap: 22px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 22%),
        radial-gradient(circle at left top, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.997), rgba(245,248,252,0.975));
}

.analysis-report-upload-v4 .analysis-decision-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-report-upload-v4 .analysis-decision-item,
.analysis-report-upload-v4 .analysis-score-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.analysis-hero-copy {
    display: grid;
    gap: 14px;
}

.analysis-report-generated-v4 .analysis-hero-copy {
    gap: 16px;
}

.analysis-report-generated-v4 .analysis-decision-bar,
.analysis-report-generated-v4 .analysis-score-grid {
    gap: 12px;
}

.analysis-report-generated-v4 .analysis-decision-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-report-generated-v4 .analysis-decision-item,
.analysis-report-generated-v4 .analysis-score-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.analysis-report-generated-v4 .analysis-score-value {
    font-size: 24px;
}

.analysis-section-heading {
    display: grid;
    gap: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.analysis-section-heading h4 {
    margin: 0;
    font-size: 26px;
    line-height: 1.16;
    letter-spacing: -0.045em;
    color: #0f172a;
}

.analysis-panel-grid-v4 {
    display: grid;
    gap: 18px;
}

.analysis-panel-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.analysis-report-generated-v4 .analysis-section-v4,
.analysis-report-upload-v4 .analysis-section-v4 {
    gap: 20px;
}

.analysis-candidate-board-v4 {
    padding: 24px 24px 28px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(242,246,251,0.97));
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.07);
}

.analysis-candidate-board-v4 .analysis-section-heading {
    padding-bottom: 14px;
}

.analysis-lane-grid-v4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.analysis-lane-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 30px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(243,247,252,0.97));
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
}

.analysis-lane-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

.analysis-lane-card-primary {
    border-color: rgba(245, 158, 11, 0.18);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.08);
}

.analysis-lane-card-secondary {
    border-color: rgba(37, 99, 235, 0.12);
}

.analysis-lane-card-hold {
    border-color: rgba(148, 163, 184, 0.16);
}

.analysis-lane-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 2px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.analysis-lane-head h5 {
    margin: 0;
    font-size: 20px;
    line-height: 1.16;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.analysis-lane-kicker,
.analysis-lane-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.analysis-lane-kicker {
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.82);
}

.analysis-lane-count {
    margin-left: auto;
    background: rgba(148, 163, 184, 0.10);
    color: rgba(51, 65, 85, 0.82);
}

.analysis-candidate-grid-v4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.candidate-review-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.08), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.998), rgba(246,248,252,0.97));
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.06);
}

.candidate-review-card.is-best-choice {
    border-color: rgba(245, 158, 11, 0.28);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(255,252,245,0.998), rgba(250,246,236,0.97));
    box-shadow: 0 28px 52px rgba(245, 158, 11, 0.18);
}

.candidate-best-ribbon {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #3b2600;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.18em;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.26);
}

.candidate-review-shell {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.35fr);
    align-items: stretch;
    min-height: 100%;
}

.candidate-review-media {
    position: relative;
    padding: 18px;
    border-right: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(240,244,251,0.72), rgba(255,255,255,0.18));
}

.candidate-review-media.is-best-choice {
    background: linear-gradient(180deg, rgba(255,244,214,0.68), rgba(255,255,255,0.12));
}

.candidate-best-glow {
    position: absolute;
    inset: 18px;
    border-radius: 22px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.36), 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.candidate-review-body {
    display: grid;
    gap: 16px;
    padding: 20px 22px 22px;
    align-content: start;
}

.candidate-review-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.candidate-review-head h4 {
    margin: 6px 0 0;
    font-size: 21px;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.candidate-score-stack {
    display: grid;
    gap: 10px;
    justify-items: end;
    align-content: start;
}

.candidate-score-stack.is-best-choice {
    padding: 10px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,251,235,0.96), rgba(255,244,214,0.92));
    border: 1px solid rgba(245, 158, 11, 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.candidate-review-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.candidate-review-insights,
.candidate-review-notes {
    display: grid;
    gap: 12px;
}

.candidate-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.candidate-status-chip.is-strong {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.candidate-status-chip.is-mid {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.candidate-status-chip.is-risk {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.candidate-status-chip-muted {
    background: rgba(148, 163, 184, 0.12);
    color: rgba(51, 65, 85, 0.82);
}

.candidate-review-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.candidate-review-actions .individual-action-btn {
    min-width: 132px;
}

.candidate-review-block {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

.analysis-command-board-v4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-analysis-card.generated-analysis {
    border-left: none;
}

.ai-analysis-card h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,245,249,0.82));
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.ai-analysis-card h4::before {
    content: '';
    width: 18px;
    height: 1px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
}

.ai-analysis-card p {
    margin: 0;
    padding: 16px 18px;
    font-size: 13px;
    color: rgba(51, 65, 85, 0.92);
    line-height: 1.8;
}

.ai-summary {
    margin: 0 !important;
    padding: 22px 22px 20px;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(30,64,175,0.92));
    color: #eff6ff !important;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 28px 54px rgba(15, 23, 42, 0.24);
    font-size: 15px !important;
    font-weight: 650;
    line-height: 1.9;
}

.ai-report-main,
.ai-report-actions {
    display: grid;
    gap: 16px;
}

.individual-analysis-grid {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.individual-analysis-grid-rich {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
}

.individual-item {
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.88));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.individual-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.08);
}

.individual-item-rich {
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.10), transparent 20%),
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(245,247,251,0.94));
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
    position: relative;
}

.individual-item-rich::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.individual-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(15,23,42,0.94), rgba(30,64,175,0.82));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 34px rgba(15, 23, 42, 0.10);
    margin-bottom: 0;
}

.individual-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.individual-preview-overlay {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #eff6ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background 0.18s ease;
}

.individual-preview:hover .individual-preview-overlay {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.88);
}

.individual-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.78);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.individual-item .item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.individual-item-title-wrap {
    display: grid;
    gap: 4px;
}

.individual-item-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(59, 130, 246, 0.78);
}

.individual-item-insights {
    display: grid;
    gap: 10px;
}

.analysis-review-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.995), rgba(244,247,252,0.94));
    border-color: rgba(15, 23, 42, 0.08);
}

.analysis-review-card h4 {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.9));
}

.individual-item-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.individual-action-btn {
    padding: 9px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.individual-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.12);
}

.individual-action-btn.secondary {
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.16);
}

.individual-item-score-stack {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.individual-item .item-score {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    padding: 4px 9px;
    border-radius: 999px;
}

.individual-item .item-score.is-strong,
.individual-item .item-verdict.is-strong {
    color: #166534;
    background: rgba(22, 101, 52, 0.08);
}

.individual-item .item-score.is-mid,
.individual-item .item-verdict.is-mid {
    color: #92400e;
    background: rgba(146, 64, 14, 0.08);
}

.individual-item .item-score.is-risk,
.individual-item .item-verdict.is-risk {
    color: #991b1b;
    background: rgba(153, 27, 27, 0.08);
}

.individual-item .item-score.is-neutral,
.individual-item .item-verdict.is-neutral {
    color: rgba(15, 23, 42, 0.64);
    background: rgba(15, 23, 42, 0.05);
}

.individual-item .item-verdict {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.individual-rank-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.individual-rank-badge,
.individual-best-flag {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.individual-rank-badge.is-top {
    background: rgba(146, 64, 14, 0.08);
    color: #92400e;
}

.individual-rank-badge.is-secondary {
    background: rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.76);
}

.individual-rank-badge.is-hold {
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.56);
}

.individual-best-flag {
    background: rgba(146, 64, 14, 0.08);
    color: #92400e;
}

.individual-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.review-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.72);
}

.review-meta-pill.review-meta-pill-outline {
    background: transparent;
    border: 1px solid currentColor;
}

.review-meta-pill.is-strong {
    color: #166534;
    background: rgba(22, 101, 52, 0.08);
}

.review-meta-pill.is-mid {
    color: #92400e;
    background: rgba(146, 64, 14, 0.08);
}

.review-meta-pill.is-risk {
    color: #991b1b;
    background: rgba(153, 27, 27, 0.08);
}

.review-meta-pill.is-neutral {
    color: rgba(15, 23, 42, 0.64);
    background: rgba(15, 23, 42, 0.05);
}

.individual-item.is-best-choice {
    border-color: rgba(146, 64, 14, 0.18);
    box-shadow: 0 18px 32px rgba(146, 64, 14, 0.08);
}

.individual-item .item-pros,
.individual-item .item-cons {
    margin-bottom: 8px;
    padding: 12px 12px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.75;
}

.individual-item .item-pros {
    color: #047857;
    background: rgba(16, 185, 129, 0.08);
}

.individual-item .item-cons {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.07);
}

.individual-item .label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.best-choice {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(250,204,21,0.08));
    border-top: 1px solid rgba(245, 158, 11, 0.14);
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-action-list {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.ai-action-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ai-action-list-index {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.ai-action-list-text {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(51, 65, 85, 0.92);
}

.improvement-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.improvement-suggestions-rich {
    gap: 12px;
    padding: 18px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.suggestion-item-rich {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,247,250,0.94));
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.analysis-suggestion-card h4,
.analysis-review-card h4 {
    font-size: 15px;
    padding: 18px 20px;
}

.analysis-suggestion-card,
.analysis-review-card,
.analysis-card-spotlight {
    border-color: rgba(15, 23, 42, 0.08);
}

.analysis-prompts-card-rich h5,
.analysis-suggestion-card h4,
.analysis-review-card h4,
.analysis-card-spotlight h4 {
    letter-spacing: -0.02em;
}

.analysis-prompts-card-rich h5 {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.analysis-prompts-card-rich .ai-prompt-option {
    background: rgba(255,255,255,0.94);
    border-color: rgba(15, 23, 42, 0.08);
}

.suggestion-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.08);
}

.suggestion-item.is-applied {
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(239,246,255,0.92);
}

.suggestion-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.suggestion-copy {
    display: grid;
    gap: 8px;
    flex: 1;
}

.suggestion-target-row {
    display: flex;
    align-items: center;
}

.suggestion-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(51, 65, 85, 0.92);
}

.target-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
}

.analysis-side-card,
.analysis-review-card,
.analysis-suggestion-card,
.analysis-prompts-card-rich {
    padding: 18px;
}

.analysis-side-card-copy {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(51, 65, 85, 0.9);
}

.ai-prompts-card {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.ai-prompts-card h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.ai-prompts-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.75;
    color: rgba(100, 116, 139, 0.92);
}

.ai-prompt-option {
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255,255,255,0.86);
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    margin-bottom: 8px;
    line-height: 1.75;
    font-size: 13px;
}

.ai-prompt-option:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(239,246,255,0.92);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.06);
}

.ai-prompt-option.is-applied {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(239,246,255,0.96);
}

.ai-collapsible-block {
    padding: 16px 18px;
}

.ai-collapsible-content {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(51, 65, 85, 0.92);
}

.ai-collapsible-content.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: var(--collapsed-lines, 4);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-collapsible-toggle {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    transition: transform 0.18s ease, background 0.18s ease;
}

.ai-collapsible-toggle:hover {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.08);
}

.ai-prompt-option:last-child {
    margin-bottom: 0;
}

.ai-loading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    margin: 0;
    color: rgba(51, 65, 85, 0.92);
    font-size: 13px;
}

.ai-loading-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.8;
}

.ai-loading-copy strong {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.ai-loading-copy span {
    font-size: 12px;
    color: rgba(100, 116, 139, 0.92);
}

.ai-loading-dots {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.ai-loading-dots span {
    width: 8px;
    height: 8px;
    background: #1d4ed8;
    border-radius: 999px;
    animation: loadingPulse 1.4s infinite ease-in-out both;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loadingPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.nav-btn.ai-active {
    background: var(--accent-gradient);
    color: #fff;
}

@media (max-width: 1180px) {
    .analysis-center-shell {
        width: min(1280px, 97vw);
        height: min(920px, 93vh);
    }

    .analysis-main-v4 {
        width: min(100%, calc(100vw - 64px));
    }

    .analysis-center-topbar {
        grid-template-columns: 1fr;
    }

    .analysis-center-session-strip {
        justify-content: flex-start;
    }

    .analysis-center-body,
    .analysis-workbench-grid,
    .ai-report-grid,
    .ai-report-grid-wide,
    .analysis-generated-board,
    .analysis-generated-hero,
    .analysis-upload-strategy-grid,
    .analysis-upload-ops-grid {
        grid-template-columns: 1fr;
    }

    .analysis-generated-hero-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analysis-center-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .analysis-lead-column,
    .analysis-side-column,
    .ai-report-lead,
    .ai-report-actions {
        position: static;
    }

    .individual-analysis-grid-rich {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analysis-center-shell {
        inset: 0;
        width: 100vw;
        height: 100vh;
        transform: translate(0, 18px) scale(1);
    }

    .analysis-center-shell.active {
        transform: translate(0, 0) scale(1);
    }

    .analysis-center-frame,
    .analysis-center-frame-v4 {
        border-radius: 0;
    }

    .analysis-center-topbar,
    .analysis-topbar-v4,
    .analysis-center-main,
    .analysis-main-v4 {
        padding: 14px;
    }

    .analysis-center-title {
        font-size: 22px;
    }

    .analysis-entry-hero,
    .analysis-entry-board,
    .analysis-entry-hero-v4,
    .analysis-entry-context-grid,
    .analysis-panel-grid-2,
    .analysis-candidate-grid-v4,
    .analysis-followup-bar-v4,
    .analysis-command-board-v4,
    .analysis-history-layout,
    .analysis-history-preview-images {
        grid-template-columns: 1fr;
    }

    .analysis-entry-title {
        font-size: 28px;
    }

    .candidate-review-actions,
    .analysis-history-card-actions,
    .individual-item-actions {
        flex-direction: column;
    }

    .candidate-review-actions .individual-action-btn,
    .history-restore-btn,
    .history-restore-btn.secondary {
        width: 100%;
        min-width: 0;
    }

    .ai-analysis-card,
    .ai-prompts-card,
    .analysis-center-note,
    .analysis-side-card,
    .ai-summary,
    .analysis-history-list,
    .analysis-history-preview {
        border-radius: 18px;
    }
}

/* === 鐢诲竷宸ュ叿鏍?=== */
.canvas-toolbar {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-primary);
    z-index: 20;
    animation: toolbar-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toolbar-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.toolbar-icon {
    font-size: 18px;
}

.result-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.toolbar-btn:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.toolbar-btn.icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

/* AI 鍒嗘瀽鎸夐挳鐗规畩鏍峰紡 */
.toolbar-btn.ai-analyze {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.toolbar-btn.ai-analyze:hover {
    background: var(--accent-gradient-hover);
    color: var(--text-inverse);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.45);
}

.toolbar-btn.ai-analyze svg {
    opacity: 1;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-secondary);
}

/* === 鐢诲竷涓诲尯鍩熶紭鍖?=== */
.canvas-main {
    flex: 1;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        var(--bg-canvas);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === 鏀硅繘鐨勫洓瀹牸缁撴灉 === */
.result-container {
    width: 100%;
    height: 100%;
    padding: 80px 40px 40px; /* 涓哄伐鍏锋爮鐣欏嚭绌洪棿 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------
 * Module / Results Workspace
 * --------------------------------------------------------- */

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    width: 100%;
}

/* 鏀硅繘鐨勭粨鏋滃崱鐗?*/
.result-item {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 24px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    aspect-ratio: 1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.result-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}

.result-item.selected {
    box-shadow:
        0 0 0 3px var(--accent-primary),
        0 8px 16px rgba(37, 99, 235, 0.15),
        0 24px 48px rgba(37, 99, 235, 0.2);
    transform: translateY(-8px) scale(1.02);
}

/* 鍥剧墖瀹瑰櫒 */
.item-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item:hover .item-image-wrapper img {
    transform: scale(1.05);
}

/* 娓愬彉閬僵 */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.result-item:hover .item-overlay {
    opacity: 1;
}

/* 搴忓彿瑙掓爣 - 鏀硅繘 */
.item-index {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 3;
    transition: all 0.3s ease;
}

.result-item:hover .item-index {
    background: var(--accent-primary);
    color: var(--text-inverse);
    transform: scale(1.1);
}

.result-item.selected .item-index {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

/* 閫変腑鍕鹃€夋爣璁?*/
.item-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    box-shadow: var(--shadow-lg);
    z-index: 3;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item.selected .item-check {
    opacity: 1;
    transform: scale(1);
}

/* 鎿嶄綔鎸夐挳 - 鏀硅繘 */
.item-actions {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4;
}

.result-item:hover .item-actions {
    opacity: 1;
    transform: translateY(0);
}

.result-item .action-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item .action-btn:hover {
    background: var(--text-primary);
    color: var(--text-inverse);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.result-item .action-btn.select-btn:hover {
    background: var(--accent-primary);
}

.result-item .action-btn.download-btn:hover {
    background: var(--success);
}

.result-item .action-btn.zoom-btn:hover {
    background: var(--text-primary);
}

/* === 闅愯棌鏁板瓧瑙掓爣 === */
.item-index {
    display: none !important;
}

/* === 鍘嗗彶璁板綍椤规牱寮忓寮?=== */
.history-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.history-item-badge.generation {
    background: rgba(37, 99, 235, 0.08);
    color: rgba(37, 99, 235, 0.88);
    border-color: rgba(37, 99, 235, 0.08);
}

.history-item-badge.refinement {
    background: rgba(34, 197, 94, 0.10);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.12);
}

.history-restore-btn {
    width: 100%;
    margin-top: 16px;
    padding: 13px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.history-restore-btn:hover {
    background: rgba(241,245,249,0.98);
    border-color: rgba(37, 99, 235, 0.16);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.history-restore-btn:focus-visible,
.prompts-list-v2 button:focus-visible,
.prompt-chip:focus-visible,
.analysis-action-btn:focus-visible,
.lightbox-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* === 宸ュ叿绫?=== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* === 鏂版墜寮曞绯荤粺 - 鐜荤拑鎬佽璁?=== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 姣涚幓鐠冭儗鏅伄缃?*/
.onboarding-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.onboarding-mask > div {
    position: absolute;
    background: rgba(15, 23, 42, 0.60);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mask-top {
    top: 0;
    left: 0;
    right: 0;
    height: 0;
}

.mask-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
}

.mask-left {
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
}

.mask-right {
    right: 0;
    top: 0;
    width: 0;
    height: 100%;
}

/* 鑱氬厜鐏珮浜竟妗?- 鍏夋檿鏁堟灉 */
.onboarding-overlay::before {
    content: '';
    position: absolute;
    top: var(--onboarding-highlight-top, 0);
    left: var(--onboarding-highlight-left, 0);
    width: var(--onboarding-highlight-width, 0);
    height: var(--onboarding-highlight-height, 0);
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.15),
        0 0 30px rgba(99, 102, 241, 0.25),
        inset 0 0 20px rgba(99, 102, 241, 0.08);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: spotlight-glow 2.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes spotlight-glow {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(99, 102, 241, 0.15),
            0 0 30px rgba(99, 102, 241, 0.25),
            inset 0 0 20px rgba(99, 102, 241, 0.08);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(99, 102, 241, 0.12),
            0 0 50px rgba(99, 102, 241, 0.35),
            inset 0 0 30px rgba(99, 102, 241, 0.12);
        transform: scale(1.01);
    }
}

/* 鐜荤拑鎬佸紩瀵煎崱鐗?*/
.onboarding-card {
    position: absolute;
    width: 380px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow:
        0 25px 60px -12px rgba(0, 0, 0, 0.2),
        0 12px 28px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    z-index: 10;
    animation: card-float-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-float-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 鍗＄墖澶撮儴 - 姝ラ鎸囩ず鍣?*/
.onboarding-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* 鍦嗙偣杩涘害鎸囩ず鍣?*/
.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-secondary);
    transition: all 0.3s ease;
}

.step-dot.active {
    width: 28px;
    border-radius: 4px;
    background: var(--accent-gradient);
}

.step-dot.completed {
    background: var(--success);
}

/* 闅愯棌鏃х殑姝ラ鏁板瓧锛堝悜鍚庡吋瀹癸級 */
.step-current,
.step-separator,
.step-total {
    display: none;
}

.skip-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-secondary);
    border-radius: 20px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skip-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

/* 鍗＄墖鍐呭鍖?*/
.onboarding-card .card-content {
    padding: 32px 28px 24px;
    text-align: center;
}

/* 鍥炬爣瀹瑰櫒 - 鐜荤拑鎬?*/
.card-icon,
#guideIcon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.card-icon svg,
#guideIcon svg {
    width: 36px;
    height: 36px;
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    fill: none;
}

.card-title,
#guideTitle {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.card-desc,
#guideDesc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 320px;
    margin: 0 auto;
}

/* 鍗＄墖搴曢儴鎸夐挳 */
.onboarding-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px 24px;
    gap: 12px;
}

.prev-btn, .next-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.prev-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.prev-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(-2px);
}

.prev-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.prev-btn:hover svg {
    transform: translateX(-3px);
}

.next-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.next-btn:hover {
    transform: translateY(-2px) translateX(2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.next-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.next-btn:hover svg {
    transform: translateX(3px);
}

.next-btn.finish {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.next-btn.finish:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

/* 楂樹寒鎸囩ず绠ご */
.onboarding-arrow {
    position: absolute;
    width: 44px;
    height: 44px;
    z-index: 5;
    animation: arrow-float 1.2s ease-in-out infinite;
}

.onboarding-arrow svg {
    width: 100%;
    height: 100%;
    fill: var(--accent-primary);
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5));
}

@keyframes arrow-float {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.8;
    }
}

/* 閲嶆柊寮€濮嬪紩瀵兼寜閽?*/
.restart-guide-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.restart-guide-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
    .onboarding-card {
        width: calc(100vw - 32px);
        max-width: 380px;
    }

    .onboarding-card .card-content {
        padding: 24px 20px 20px;
    }

    .card-title,
    #guideTitle {
        font-size: 20px;
    }

    .card-desc,
    #guideDesc {
        font-size: 14px;
    }
}

@media (max-width: 1280px) {
    .analysis-center-main,
    .analysis-main-v4 {
        width: min(100%, calc(100vw - 48px));
    }

    .analysis-entry-hero-v4,
    .analysis-entry-context-grid,
    .analysis-panel-grid-2,
    .analysis-history-layout {
        grid-template-columns: 1fr;
    }

    .analysis-lane-grid-v4,
    .analysis-candidate-grid-v4,
    .candidate-review-shell {
        grid-template-columns: 1fr;
    }

    .candidate-review-media {
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .analysis-lane-head {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .analysis-center-shell {
        inset: 0;
    }

    .analysis-center-frame,
    .analysis-center-frame-v4 {
        border-radius: 0;
    }

    .analysis-center-topbar,
    .analysis-topbar-v4 {
        grid-template-columns: 1fr auto;
        padding: 16px 16px 12px;
        gap: 14px;
    }

    .analysis-center-topbar-stack {
        grid-column: 1 / -1;
        justify-items: start;
        gap: 8px;
    }

    .analysis-center-main,
    .analysis-main-v4 {
        width: min(100%, calc(100vw - 24px));
        padding: 14px 0 18px;
    }

    .analysis-command-board-v4,
    .status-items-inline,
    .analysis-business-grid-inline,
    .analysis-center-followup-bar,
    .analysis-followup-bar-v4,
    .analysis-history-preview-images {
        grid-template-columns: 1fr;
    }

    .analysis-decision-bar,
    .analysis-score-grid,
    .analysis-report-generated-v4 .analysis-decision-bar {
        grid-template-columns: 1fr;
    }

    .candidate-review-head {
        grid-template-columns: 1fr;
        display: grid;
    }
}

/* === 閲嶆柊鐢熸垚閬僵灞?=== */
.regenerate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: calc(var(--sidebar-width) + 40px);
}

.regenerate-overlay.active {
    opacity: 1;
}

.regenerate-overlay.hiding {
    opacity: 0;
}

/* 鑱氬厜鐏晥鏋?- 鐓т寒渚ц竟鏍?*/
.regenerate-spotlight {
    position: fixed;
    left: 0;
    top: var(--nav-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--nav-height));
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

/* 鎻愮ず鍗＄墖 */
.regenerate-hint {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-xl);
    animation: slideInHint 0.4s ease-out;
    max-width: 360px;
}

@keyframes slideInHint {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.regenerate-hint .hint-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.regenerate-hint .hint-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.regenerate-hint .hint-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.regenerate-hint .hint-close-btn {
    padding: 8px 16px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.regenerate-hint .hint-close-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* 鎻愮ず璇嶈緭鍏ユ楂樹寒鑴夊啿鏁堟灉 */
.prompt-input.highlight-pulse {
    animation: promptPulse 1.5s ease-in-out infinite;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-md) !important;
}

@keyframes promptPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-md);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1), 0 0 20px rgba(37, 99, 235, 0.2), var(--shadow-md);
    }
}

/* 楂樹寒蹇呭～椤规晥鏋滐紙澶嶇敤锛?*/
.highlight-required {
    animation: highlightShake 0.5s ease-in-out;
    border-color: var(--warning) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

@keyframes highlightShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* === 寰皟蹇嵎寤鸿 === */
.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-chip {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

.suggestion-chip:active {
    transform: translateY(0);
}

/* ============================================
   鍝嶅簲寮忚璁?- 鍏ㄩ潰浼樺寲
   ============================================ */

/* === 澶у睆骞?(1400px+) === */
@media (min-width: 1400px) {
    .result-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === 涓ぇ灞忓箷 (1200px - 1399px) === */
@media (max-width: 1399px) {
    :root {
        --sidebar-width: 340px;
    }
}

/* === 涓瓑灞忓箷 (1024px - 1199px) === */
@media (max-width: 1199px) {
    :root {
        --sidebar-width: 320px;
    }

    .top-nav {
        padding: 0 16px;
    }

    .nav-brand {
        margin-left: 8px;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 10px;
    }

    /* 缁撴灉缃戞牸 */
    .result-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .analysis-dialog-v2 {
        width: 800px;
    }

    .result-row.three-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-row.three-col .result-block:last-child {
        grid-column: 1 / -1;
    }
}

/* === 骞虫澘/灏忓睆骞?(768px - 1023px) === */
@media (max-width: 1023px) {
    :root {
        --sidebar-width: 300px;
        --nav-height: 56px;
    }

    /* 瀵艰埅鏍忕揣鍑?*/
    .top-nav {
        padding: 0 12px;
    }

    .brand-text {
        font-size: 15px;
    }

    /* 渚ц竟鏍?*/
    .sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-height);
        height: calc(100vh - var(--nav-height));
        z-index: 150;
        transform: translateX(0);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    /* 渚ц竟鏍忔敹璧锋椂鐨勯伄缃?*/
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        top: var(--nav-height);
        background: rgba(0, 0, 0, 0.3);
        z-index: 140;
        opacity: 1;
        transition: opacity 0.35s ease;
        pointer-events: auto;
    }

    body::after {
        content: '';
        position: fixed;
        inset: 0;
        top: var(--nav-height);
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease, z-index 0s 0.35s;
    }

    body.sidebar-open::after {
        z-index: 140;
        transition: opacity 0.35s ease, z-index 0s 0s;
    }

    /* 涓诲唴瀹瑰尯 */
    .canvas-main {
        margin-left: 0;
        width: 100%;
    }

    /* 鐢诲竷宸ュ叿鏍?*/
    .canvas-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: center;
    }

    .toolbar-btn span {
        display: none;
    }

    /* 缁撴灉缃戞牸 */
    .result-container {
        padding: 16px;
    }

    .result-grid {
        gap: 12px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .analysis-dialog-v2 {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
        border-radius: 16px;
    }

    .analysis-header {
        padding: 20px 24px;
    }

    .analysis-content {
        padding: 20px 24px;
    }

    .result-row.two-col,
    .result-row.three-col {
        grid-template-columns: 1fr;
    }

    .insight-grid {
        grid-template-columns: 1fr;
    }

    /* AI 设计分析中心 */
    .analysis-center-shell {
        width: min(1040px, 94vw);
    }

    /* 寰皟闈㈡澘 */
    .refine-container {
        padding: 20px;
        gap: 20px;
    }

    .refine-main-image {
        max-width: 400px;
    }

    /* 寮曞鍗＄墖 */
    .onboarding-card {
        width: calc(100vw - 24px);
        max-width: 360px;
    }
}

/* === 鎵嬫満妯睆/灏忓钩鏉?(640px - 767px) === */
@media (max-width: 767px) {
    :root {
        --sidebar-width: 100%;
        --nav-height: 52px;
    }

    /* 瀵艰埅鏍?*/
    .top-nav {
        padding: 0 10px;
    }

    .nav-brand {
        margin-left: 4px;
    }

    .brand-icon {
        font-size: 20px;
    }

    .brand-text {
        font-size: 14px;
    }

    .nav-btn.icon-btn {
        width: 40px;
        height: 40px;
    }

    /* 渚ц竟鏍忓叏灞忚鐩?*/
    .sidebar {
        width: 100%;
        border-right: none;
    }

    .sidebar-inner {
        padding: 16px;
    }

    .sidebar-section {
        margin-bottom: 16px;
    }

    /* 涓婁紶鍗＄墖 */
    .upload-card {
        padding: 16px;
        border-radius: 16px;
    }

    .upload-stack {
        gap: 12px;
    }

    .upload-slot {
        min-height: 120px;
        border-radius: 12px;
    }

    /* 鎻愮ず璇嶅崱鐗?*/
    .prompt-card {
        padding: 14px;
        border-radius: 14px;
    }

    .prompt-input {
        min-height: 100px;
        font-size: 14px;
    }

    /* 鐢熸垚鎸夐挳 */
    .generate-btn {
        padding: 14px 24px;
        border-radius: 14px;
    }

    /* 绌虹姸鎬佸搷搴斿紡 */
    .canvas-empty {
        padding: 32px 20px;
        min-height: 320px;
    }

    .empty-visual {
        width: 140px;
        height: 140px;
        margin-bottom: 32px;
    }

    .glow-ring.delay {
        inset: -18px;
    }

    .orbit-ring {
        inset: 18px;
    }

    .orbit-dot {
        width: 8px;
        height: 8px;
        top: -4px;
    }

    .center-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .center-icon svg {
        width: 28px;
        height: 28px;
    }

    .empty-title {
        font-size: 20px;
    }

    .empty-desc {
        font-size: 13px;
    }

    /* 缁撴灉缃戞牸 - 鍗曞垪 */
    .result-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .result-item {
        border-radius: 12px;
    }

    /* 鐢诲竷宸ュ叿鏍?*/
    .canvas-toolbar {
        padding: 10px 12px;
    }

    .toolbar-title span {
        font-size: 13px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .analysis-dialog-v2 {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .analysis-header {
        padding: 16px 20px;
    }

    .header-info h2 {
        font-size: 18px;
    }

    .analysis-content {
        padding: 16px 20px;
        max-height: calc(100vh - 120px);
    }

    .result-block {
        padding: 14px;
        border-radius: 12px;
    }

    .prompts-list-v2 .prompt-tag {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* AI 设计分析中心 - 全屏 */
    .analysis-center-shell {
        width: 100%;
        max-width: none;
    }

    .analysis-center-topbar {
        padding: 14px 16px;
    }

    .analysis-center-entry {
        padding: 0;
    }

    .analysis-status-card {
        padding: 14px;
        border-radius: 16px;
    }

    .analysis-action-btn {
        padding: 14px;
        border-radius: 16px;
    }

    /* 寰皟闈㈡澘 - 鍏ㄥ睆 */
    .refine-overlay {
        padding: 0;
    }

    .refine-container {
        padding: 16px;
        gap: 16px;
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }

    .refine-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .refine-main-image {
        max-width: 100%;
        max-height: 40vh;
    }

    .refine-thumbnails {
        gap: 8px;
    }

    .refine-thumb-item {
        width: 52px;
        height: 52px;
    }

    .refine-input-card {
        padding: 14px;
        border-radius: 14px;
    }

    .input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .refine-send-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* 鍘嗗彶寮圭獥 */
    .history-dialog {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }

    /* Lightbox */
    .lightbox-actions {
        padding: 12px 16px;
        gap: 12px;
    }

    .lightbox-action-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* 寮曞閬僵灞備紭鍖?*/
    .onboarding-card {
        width: calc(100vw - 16px);
        max-width: none;
        border-radius: 20px;
        margin: 8px;
    }

    .onboarding-card .card-header {
        padding: 16px 18px 12px;
    }

    .onboarding-card .card-content {
        padding: 20px 18px 16px;
    }

    .card-icon {
        width: 56px;
        height: 56px;
    }

    .card-title,
    #guideTitle {
        font-size: 18px;
    }

    .card-desc,
    #guideDesc {
        font-size: 13px;
        line-height: 1.6;
    }

    .onboarding-card .card-footer {
        padding: 14px 18px 18px;
    }

    .prev-btn,
    .next-btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    /* 鍔犺浇閬僵 */
    .loading-content p {
        font-size: 14px;
    }
}

/* === 鎵嬫満绔栧睆 (480px 浠ヤ笅) === */
@media (max-width: 479px) {
    :root {
        --nav-height: 48px;
    }

    /* 瀵艰埅鏍忔瀬绠€ */
    .top-nav {
        padding: 0 8px;
        gap: 4px;
    }

    .nav-left {
        gap: 4px;
    }

    .nav-right {
        gap: 4px;
    }

    .nav-btn.icon-btn {
        width: 36px;
        height: 36px;
    }

    .brand-text {
        font-size: 13px;
    }

    /* 渚ц竟鏍?*/
    .sidebar-inner {
        padding: 12px;
    }

    .upload-slot {
        min-height: 100px;
    }

    .placeholder-text {
        font-size: 13px;
    }

    .placeholder-hint {
        font-size: 11px;
    }

    /* 鐢诲竷鍖哄煙鏋佺畝鍝嶅簲寮?*/
    .canvas-empty {
        min-height: 280px;
        padding: 24px 16px;
    }

    .empty-visual {
        width: 110px;
        height: 110px;
        margin-bottom: 24px;
    }

    .glow-ring.delay {
        inset: -14px;
    }

    .orbit-ring {
        inset: 14px;
    }

    .orbit-dot {
        width: 6px;
        height: 6px;
        top: -3px;
    }

    .center-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .center-icon svg {
        width: 24px;
        height: 24px;
    }

    .empty-title {
        font-size: 18px;
    }

    .empty-desc {
        font-size: 12px;
    }

    /* 寮曞鍗＄墖 */
    .onboarding-card {
        border-radius: 16px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
    }

    .card-icon svg {
        width: 24px;
        height: 24px;
    }

    .card-title,
    #guideTitle {
        font-size: 16px;
    }

    .card-desc,
    #guideDesc {
        font-size: 12px;
    }

    .step-indicator {
        gap: 6px;
    }

    .step-current,
    .step-total {
        font-size: 13px;
    }

    /* 宸ュ叿鏍忔寜閽?*/
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* 鍒嗘瀽寮圭獥 */
    .header-info h2 {
        font-size: 16px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .section-title {
        font-size: 13px;
    }

    .block-text {
        font-size: 13px;
    }

    /* AI 设计分析中心 */
    .analysis-center-title {
        font-size: 20px;
    }

    .analysis-center-subtitle {
        font-size: 11px;
    }

    .analysis-action-btn .action-title {
        font-size: 14px;
    }

    .analysis-action-btn .action-desc {
        font-size: 11px;
    }

    /* 寰皟闈㈡澘 */
    .input-title {
        font-size: 14px;
    }

    #refineInput {
        font-size: 14px;
    }

    .tip-item {
        font-size: 11px;
    }
}

/* === 寮曞閬僵灞備綅缃嚜閫傚簲 === */
@media (max-height: 700px) {
    .onboarding-card {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .onboarding-card .card-content {
        padding: 16px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }
}

/* === 妯睆妯″紡浼樺寲 === */
@media (max-height: 500px) and (orientation: landscape) {
    .onboarding-card {
        flex-direction: row;
        max-width: 600px;
        width: auto;
    }

    .onboarding-card .card-content {
        flex: 1;
        padding: 16px;
    }

    .card-icon {
        display: none;
    }

    .refine-container {
        flex-direction: row;
        gap: 16px;
    }

    .refine-main-image {
        max-width: 50%;
        max-height: 80vh;
    }

    .refine-input-card {
        flex: 1;
    }
}

/* === 瑙︽懜璁惧浼樺寲 === */
@media (hover: none) and (pointer: coarse) {
    /* 澧炲ぇ鐐瑰嚮鍖哄煙 */
    .nav-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .action-btn {
        min-width: 40px;
        min-height: 40px;
    }

    .toolbar-btn {
        min-height: 40px;
        padding: 8px 14px;
    }

    /* 绉婚櫎鎮仠鏁堟灉 */
    .result-item:hover {
        transform: none;
    }

    .upload-slot:hover {
        transform: none;
        border-color: var(--border-primary);
    }

    /* 鎸変笅鏁堟灉鏇夸唬鎮仠 */
    .result-item:active {
        transform: scale(0.98);
    }

    .upload-slot:active {
        transform: scale(0.98);
        border-color: var(--accent-primary);
    }
}

/* reduced motion 规则已在后文按作用域统一定义 */

/* === 鎵撳嵃鏍峰紡 === */
@media print {
    .top-nav,
    .sidebar,
    .canvas-toolbar,
    .modal-backdrop,
    .loading-overlay,
    .onboarding-overlay {
        display: none !important;
    }

    .canvas-main {
        margin: 0;
        padding: 0;
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   澧炲己鍔ㄧ敾绯荤粺 - 娴佺晠浜や簰浣撻獙
   ============================================================ */

/* === 鐢熸垚鎸夐挳澧炲己鍔ㄧ敾 === */
.generate-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    will-change: transform, box-shadow;
}

.generate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.generate-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

/* 鐢熸垚鎸夐挳鐐瑰嚮娉㈢汗鏁堟灉 */
.generate-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease-out;
}

.generate-btn:active::after {
    opacity: 1;
    transform: scale(2);
    transition: all 0.1s ease-out;
}

/* 鍔犺浇鐘舵€佸寮?*/
.generate-btn.loading {
    animation: btn-pulse 1.5s ease-in-out infinite;
}

/* 鎸夐挳娑熸吉鏁堟灉 */
.generate-btn {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-expand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 24px rgba(37, 99, 235, 0.3); }
}

/* === 鐢诲竷鍖哄煙鍔ㄧ敾 === */
.canvas-main {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* 鐢诲竷杩涘叆鍔ㄧ敾 */
.canvas-main.generating {
    animation: canvas-pulse 2s ease-in-out infinite;
}

@keyframes canvas-pulse {
    0%, 100% {
        background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 70%),
                    var(--bg-canvas);
    }
    50% {
        background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
                    var(--bg-canvas);
    }
}

/* 绌虹姸鎬佸懠鍚稿姩鐢诲寮?*/
.canvas-empty {
    animation: empty-fade-in 0.6s ease-out;
    transition: all 0.5s ease-out;
}

/* 鐢诲竷绌虹姸鎬佺敓鎴愪腑鍔ㄧ敾 */
.canvas-empty.generating {
    background: radial-gradient(circle at 50% 40%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
}

.canvas-loading-state {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.canvas-loading-state.active {
    display: block;
}

/* 鐢诲竷鍐呭姞杞藉姩鐢?- 鏇挎崲绌虹姸鎬佸唴瀹?*/
.loading-visual {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 32px;
}

.loading-rings {
    position: absolute;
    inset: 0;
}

.loading-rings .ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.loading-rings .ring-1 {
    inset: 0;
    border-color: rgba(37, 99, 235, 0.3);
    border-top-color: var(--accent-primary);
    animation: spin-ring 1.2s linear infinite;
}

.loading-rings .ring-2 {
    inset: 20px;
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    animation: spin-ring 1s linear infinite reverse;
}

.loading-rings .ring-3 {
    inset: 40px;
    border-color: rgba(96, 165, 250, 0.15);
    border-top-color: #60a5fa;
    animation: spin-ring 0.8s linear infinite;
}

@keyframes spin-ring {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 50px rgba(37, 99, 235, 0.6);
    }
}

.loading-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    animation: text-fade 2s ease-in-out infinite;
}

.loading-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

@keyframes text-fade {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* 杩涘害鏉″姩鐢?*/
.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    width: 30%;
    background: var(--accent-gradient);
    border-radius: 2px;
    animation: progress-move 1.5s ease-in-out infinite;
}

@keyframes progress-move {
    0% {
        width: 0%;
        margin-left: 0;
    }
    50% {
        width: 60%;
        margin-left: 20%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

@keyframes empty-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === 缁撴灉缃戞牸澧炲己鍔ㄧ敾 === */
.result-container {
    animation: results-container-in 0.4s ease-out;
}

@keyframes results-container-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 缁撴灉椤规偓鍋滃寮?*/
.result-item {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.result-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
}

.result-item:active {
    transform: translateY(-4px) scale(1.01);
    transition-duration: 0.15s;
}

/* 鍥剧墖鍔犺浇娣″叆 */
.result-item img {
    animation: img-fade-in 0.5s ease-out;
}

@keyframes img-fade-in {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* === 鍔犺浇瑕嗙洊灞傚寮?=== */
/* 娉ㄦ剰锛氬垵濮嬫牱寮忓湪 1695 琛屽畾涔変负 display: none */
/* 姝ゅ浠呭畾涔夎繃娓″姩鐢伙紝涓嶈鐩?display 灞炴€?*/

.loading-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

/* 鍔犺浇瑕嗙洊灞傛贰鍑哄姩鐢?*/
.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

/* 鍔犺浇鍐呭鍔ㄧ敾 */
.loading-content {
    animation: loading-content-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes loading-content-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 鍔犺浇鏂囧瓧鍔ㄧ敾 */
.loading-text {
    animation: text-shimmer 2s ease-in-out infinite;
}

@keyframes text-shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* === 渚ц竟鏍忚繃娓′紭鍖?=== */
.sidebar {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-out,
                box-shadow 0.3s ease-out;
    will-change: transform;
}

.sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* === 工具栏动画 === */
/* 注意：主要的 .canvas-toolbar 样式和动画定义在第4189行 */

/* 宸ュ叿鏍忔寜閽偓鍋?*/
.toolbar-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toolbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toolbar-btn:active {
    transform: translateY(0) scale(0.98);
}

/* === 涓婁紶鍖哄煙鍔ㄧ敾 === */
.upload-slot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-slot:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.upload-slot:active {
    transform: translateY(-2px) scale(0.99);
}

/* 鎷栨嫿鐘舵€?*/
.upload-slot.dragover {
    transform: scale(1.02);
    border-color: var(--accent-primary);
    background: var(--accent-light);
    animation: dragover-pulse 1s ease-in-out infinite;
}

@keyframes dragover-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* === 寰皟闈㈡澘鍔ㄧ敾 === */
.refine-overlay {
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.refine-panel {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-out;
}

.refine-overlay.active .refine-panel {
    animation: panel-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panel-slide-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Toast 閫氱煡澧炲己 === */
.toast-notification {
    animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-notification.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === 楠ㄦ灦灞忓姞杞芥晥鏋?=== */
.skeleton-loading {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === 楂樹寒鎻愮ず鍔ㄧ敾 === */
.highlight-required {
    animation: highlight-shake 0.5s ease-in-out;
}

@keyframes highlight-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* === 缁撴灉椤逛氦閿欏叆鍦哄姩鐢?=== */
.result-item-hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
}

.result-item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 鍩轰簬 CSS 鍙橀噺鐨勪氦閿欏欢杩燂紙澶囩敤锛?*/
.result-item[style*="--item-index"] {
    transition-delay: calc(var(--item-index) * 80ms);
}

/* 工具栏显示动画 */
.canvas-toolbar.toolbar-visible {
    animation: toolbar-fade-in 0.4s ease-out forwards;
}

@keyframes toolbar-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 缁撴灉椤归€変腑鐘舵€佸寮?*/
.result-item.selected {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px var(--accent-primary), 0 12px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 缁撴灉椤瑰浘鐗囩缉鏀捐繃娓?*/
.result-item .item-image-wrapper img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item:hover .item-image-wrapper img {
    transform: scale(1.05);
}

/* 鎿嶄綔鎸夐挳鎮仠鍔ㄧ敾 */
.result-item .item-actions {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.result-item:hover .item-actions {
    transform: translateY(0);
}

.result-item .action-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item .action-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.95);
}

.result-item .action-btn:active {
    transform: scale(0.95);
}

/* === 局部性能优化 === */
.canvas-main,
.sidebar,
.loading-overlay,
.result-item,
.generate-btn,
.refine-overlay {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* ============================================ */
/* === 绉诲姩绔姩鐢荤畝鍖?=== */
/* ============================================ */
@media (max-width: 768px) {
    /* 鍑忓皯绮掑瓙鏁伴噺 - 闅愯棌鍚庝袱涓矑瀛?*/
    .particle.p3,
    .particle.p4 {
        display: none;
    }

    /* 闅愯棌绗笁灞傚厜鐜?*/
    .glow-ring.outer {
        display: none;
    }

    /* 绂佺敤鐢诲竷鍏夋祦鍔ㄧ敾 */
    .canvas-main::after {
        animation: none;
        display: none;
    }

    /* 绂佺敤榧犳爣璺熼殢鏁堟灉 */
    .canvas-main::before {
        display: none;
    }

    /* 绠€鍖栫矑瀛愬姩鐢绘椂闀?*/
    .particle.p1 {
        animation-duration: 5s;
    }

    .particle.p2 {
        animation-duration: 4s;
    }

    /* 鍑忓皯鍔ㄧ敾鏃堕暱 */
    :root {
        --duration-slow: 0.25s;
        --duration-slower: 0.35s;
        --duration-slowest: 0.5s;
    }
}

/* reduced motion 统一降级，避免微调弹窗与上传区动效过强 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .particle,
    .glow-ring,
    .orbit-ring,
    .canvas-main::before,
    .canvas-main::after {
        display: none !important;
    }

    .refine-simple-dialog,
    .detail-page-dialog,
    .detail-stage.is-active,
    .refine-stage.is-active,
    .detail-upload-area.is-just-uploaded,
    .detail-image-info.is-visible,
    .refine-simple-preview.is-switching {
        animation: none !important;
    }

    .refine-simple-btn:hover,
    .detail-btn:hover,
    .refine-simple-thumb:hover,
    .detail-upload-area:hover,
    .detail-suggestion-group .suggestion-chip:hover,
    .refine-simple-suggestions .suggestion-chip:hover {
        transform: none !important;
    }
}

/* ============================================ */
/* === 寮曞鐘舵€佷笅鐢诲竷鍔ㄧ敾澧炲己 === */
/* ============================================ */

/* 纭繚鍔ㄧ敾濮嬬粓杩愯 */
.canvas-empty,
.canvas-empty .glow-ring,
.canvas-empty .orbit-ring,
.canvas-empty .particle,
.canvas-empty .center-icon {
    animation-play-state: running !important;
}

/* 寮曞婵€娲绘椂锛屽寮虹敾甯冨尯鍩熷彲瑙佹€?*/
body.onboarding-active .canvas-empty {
    filter: brightness(1.1) saturate(1.15);
}

/* 寮曞楂樹寒鐢诲竷鏃剁殑鐗规畩鏁堟灉 */
body.onboarding-canvas-highlight .canvas-empty {
    z-index: 1;
    position: relative;
}

body.onboarding-canvas-highlight .canvas-empty .empty-visual {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(37, 99, 235, 0.4));
}

/* ============================================ */
/* === 绠€鍗曞井璋冨脊绐楁牱寮?=== */
/* ============================================ */

.refine-simple-dialog {
    width: min(980px, 94vw);
    max-width: min(980px, 94vw);
    max-height: 92vh;
    background: linear-gradient(180deg, rgba(255,255,255,0.992), rgba(248,250,252,0.975));
    border-radius: 30px;
    box-shadow: 0 44px 110px rgba(15, 23, 42, 0.18), 0 16px 38px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255,255,255,0.95);
    overflow: hidden;
    animation: dialogSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.refine-simple-dialog-premium::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 90px;
    background: linear-gradient(180deg, rgba(219,234,254,0.34), rgba(255,255,255,0));
    pointer-events: none;
}

@keyframes dialogSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes uploadReadyReveal {
    from {
        opacity: 0.88;
        transform: translateY(4px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes previewSwitchFade {
    from {
        opacity: 0.82;
        transform: scale(0.992);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.refine-simple-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.045);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.90));
}

.refine-simple-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.refine-simple-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(219,234,254,0.88));
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.refine-simple-title-wrap h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 750;
    color: var(--text-primary);
    letter-spacing: -0.012em;
}

.refine-simple-subtitle {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(100, 116, 139, 0.92);
    max-width: 520px;
}

.refine-simple-content {
    padding: 24px 28px 28px;
    overflow-y: auto;
    max-height: calc(92vh - 92px);
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(320px, 0.95fr);
    gap: 18px;
}

.refine-simple-section {
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(248,250,252,0.78));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.refine-simple-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.refine-simple-section-head-vertical {
    align-items: flex-start;
}

.refine-simple-inline-head {
    margin-bottom: 16px;
}

.refine-stage {
    display: none;
}

.refine-stage.is-active {
    display: block;
    animation: fadeSlideIn 0.22s ease;
}

.refine-mode-grid {
    margin-top: 6px;
}

.refine-local-card {
    margin-top: 8px;
}

.refine-local-actions {
    margin-top: 16px;
}

.refine-simple-section-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.refine-simple-section-desc {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.75;
    color: #64748b;
}

.refine-simple-section-tip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.07);
    color: rgba(37, 99, 235, 0.88);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.refine-simple-preview-shell {
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248,250,252,0.94), rgba(241,245,249,0.88));
    border: 1px solid rgba(15, 23, 42, 0.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 10px 24px rgba(15, 23, 42, 0.03);
}

.refine-simple-preview {
    position: relative;
    width: 100%;
    min-height: 360px;
    max-height: 460px;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(239,246,255,0.92), rgba(248,250,252,0.98) 48%, rgba(241,245,249,0.98));
    display: flex;
    align-items: center;
    justify-content: center;
}

.refine-simple-preview img {
    width: 100%;
    height: 100%;
    max-height: 430px;
    object-fit: contain;
}

.refine-simple-preview.is-switching img {
    animation: previewSwitchFade 0.18s ease;
}

.refine-simple-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.refine-simple-thumbs::-webkit-scrollbar {
    height: 4px;
}

.refine-simple-thumbs::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 2px;
}

.refine-simple-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.refine-simple-thumb:hover {
    border-color: rgba(37, 99, 235, 0.16);
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.07);
}

.refine-simple-thumb:active {
    transform: translateY(0) scale(0.99);
}

.refine-simple-thumb:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09), 0 12px 20px rgba(37, 99, 235, 0.07);
}

.refine-simple-thumb.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11), 0 14px 26px rgba(37, 99, 235, 0.10);
}

.refine-simple-thumb.active .thumb-num {
    background: rgba(37, 99, 235, 0.92);
}

.refine-simple-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.refine-simple-thumb .thumb-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(15, 23, 42, 0.68);
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.18);
}

.refine-simple-input-shell {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(248,250,252,0.70));
    border: 1px solid rgba(15, 23, 42, 0.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.refine-simple-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px 18px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    background: rgba(248,250,252,0.96);
    color: var(--text-primary);
    transition: all 0.22s ease;
}

.refine-simple-textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(255,255,255,0.99);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.07), 0 10px 20px rgba(37, 99, 235, 0.05);
}

.refine-simple-textarea::placeholder {
    color: #94a3b8;
}

.refine-simple-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.refine-simple-suggestions .suggestion-chip {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.025);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.refine-simple-suggestions .suggestion-chip:hover {
    background: rgba(37, 99, 235, 0.09);
    color: var(--accent-primary);
    border-color: rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.05);
}

.refine-simple-suggestions .suggestion-chip:active {
    transform: translateY(0) scale(0.99);
}

.refine-simple-suggestions .suggestion-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.refine-simple-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.refine-simple-actions {
    display: flex;
    gap: 12px;
    position: relative;
}

.refine-simple-actions::before {
    content: '';
    position: absolute;
    inset: -10px 0 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.28), rgba(148, 163, 184, 0));
}

.refine-simple-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 16px 18px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.refine-simple-btn .btn-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.72;
    line-height: 1.7;
}

.refine-simple-btn.primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

.refine-simple-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.26);
}

.refine-simple-btn.primary:focus-visible,
.refine-simple-btn.secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.refine-simple-btn.secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,245,249,0.94));
    color: var(--text-primary);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.refine-simple-btn.secondary:hover {
    background: rgba(241,245,249,0.98);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.refine-simple-btn:active {
    transform: translateY(0) scale(0.99);
}

#refineSimpleSend,
#enterWorkspaceDirect {
    border-radius: 16px;
}

#refineSimpleModal.has-prompt #refineSimpleSend,
#refineSimpleModal:not(.has-prompt) #enterWorkspaceDirect {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #3b82f6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

#refineSimpleModal.has-prompt #refineSimpleSend:hover,
#refineSimpleModal:not(.has-prompt) #enterWorkspaceDirect:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

#refineSimpleModal.has-prompt #enterWorkspaceDirect,
#refineSimpleModal:not(.has-prompt) #refineSimpleSend {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
    color: var(--text-primary);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

#refineSimpleModal.has-prompt #enterWorkspaceDirect:hover,
#refineSimpleModal:not(.has-prompt) #refineSimpleSend:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

#refineSimpleSend:focus-visible,
#detailPageSend:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10), 0 20px 34px rgba(37, 99, 235, 0.22);
}

#enterWorkspaceDirect:focus-visible,
#detailEnterEditor:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 10px 22px rgba(15, 23, 42, 0.055);
}

/* 鍝嶅簲寮?*/
@media (max-width: 860px) {
    .refine-simple-content {
        grid-template-columns: 1fr;
    }

    .refine-simple-preview {
        min-height: 260px;
        max-height: 340px;
    }
}

@media (max-width: 560px) {
    .refine-simple-dialog {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .refine-simple-header {
        padding: 18px 18px 16px;
    }

    .refine-simple-content {
        padding: 18px;
        gap: 14px;
    }

    .refine-simple-section {
        padding: 16px;
        border-radius: 18px;
    }

    .refine-simple-action-grid {
        grid-template-columns: 1fr;
    }

    .refine-simple-btn .btn-hint {
        display: none;
    }
}

/* ============================================
   详情页制作弹窗样式
   ============================================ */

.detail-page-dialog {
    width: min(1120px, 94vw);
    max-width: min(1120px, 94vw);
    max-height: 92vh;
    background: linear-gradient(180deg, rgba(255,255,255,0.992), rgba(248,250,252,0.975));
    border-radius: 30px;
    box-shadow: 0 44px 110px rgba(15, 23, 42, 0.18), 0 16px 38px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255,255,255,0.95);
    overflow: hidden;
    animation: dialogSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.detail-page-dialog::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 96px;
    background: linear-gradient(180deg, rgba(219,234,254,0.38), rgba(255,255,255,0));
    pointer-events: none;
}

.detail-page-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 30px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.045);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.90));
}

.detail-page-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.detail-page-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(219,234,254,0.88));
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.detail-page-title-wrap h2 {
    font-size: 24px;
    font-weight: 750;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.012em;
}

.detail-page-subtitle {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(100, 116, 139, 0.92);
    max-width: 560px;
}

.detail-page-content {
    padding: 24px 28px 28px;
    overflow-y: auto;
    max-height: calc(92vh - 96px);
    display: grid;
    grid-template-columns: minmax(380px, 1.05fr) minmax(360px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.detail-page-media-column,
.detail-page-control-column {
    min-width: 0;
}

.detail-page-control-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-page-section {
    padding: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(248,250,252,0.78));
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-section-head-vertical {
    align-items: flex-start;
    margin-bottom: 0;
}

.detail-section-head-tight {
    align-items: flex-start;
    margin-bottom: 16px;
}

.detail-section-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-section-tip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.07);
    color: rgba(37, 99, 235, 0.88);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.detail-step-subtitle {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.75;
    color: #64748b;
}

.detail-step-badge {
    margin-left: auto;
}

.detail-stage {
    display: none;
}

.detail-stage.is-active {
    display: block;
    animation: fadeSlideIn 0.22s ease;
}

.detail-stage-card {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    background: rgba(255,255,255,0.86);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.detail-stage-card-muted {
    background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(241,245,249,0.92));
}

.detail-stage-card-highlight {
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(248,250,252,0.92));
}

.detail-stage-eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.detail-stage-card h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-stage-card p:last-child {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.detail-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-mode-card {
    padding: 20px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255,255,255,0.9);
    text-align: left;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.detail-mode-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.08);
}

.detail-mode-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08), 0 14px 26px rgba(37, 99, 235, 0.08);
}

.detail-mode-card-primary {
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(255,255,255,0.92));
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.06);
}

.detail-mode-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-mode-desc {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.detail-input-shell {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(248,250,252,0.70));
    border: 1px solid rgba(15, 23, 42, 0.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.detail-text-btn {
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 12px;
    background: rgba(255,255,255,0.82);
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
}

.detail-text-btn:hover {
    background: rgba(239,246,255,0.92);
    border-color: rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

/* 上传区域 */
.detail-upload-area {
    position: relative;
    width: 100%;
    min-height: 440px;
    max-height: 560px;
    border: 1.5px dashed rgba(37, 99, 235, 0.18);
    border-radius: 26px;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(239,246,255,0.92), rgba(248,250,252,0.98) 48%, rgba(241,245,249,0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.88), 0 8px 22px rgba(15, 23, 42, 0.035);
}

.detail-upload-area:hover {
    border-color: rgba(59, 130, 246, 0.56);
    background: linear-gradient(180deg, rgba(239,246,255,0.92), rgba(248,250,252,0.96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 12px 26px rgba(37, 99, 235, 0.06);
}

.detail-upload-area.dragging {
    border-color: var(--accent-primary);
    background: linear-gradient(180deg, rgba(219,234,254,0.94), rgba(239,246,255,0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 0 0 4px rgba(37, 99, 235, 0.08), 0 14px 30px rgba(37, 99, 235, 0.10);
    transform: translateY(-1px);
}

.detail-upload-area.has-file {
    border-style: solid;
    border-color: rgba(37, 99, 235, 0.18);
    min-height: 440px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(248,250,252,0.96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.94), 0 16px 34px rgba(15, 23, 42, 0.06);
}

.detail-upload-area.has-file .upload-placeholder {
    display: none;
}

.detail-upload-area .upload-preview {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: none;
    border-radius: 18px;
    background: rgba(255,255,255,0.88);
    box-shadow: var(--shadow-md);
}

.detail-upload-area.has-file .upload-preview {
    display: block;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.detail-upload-area .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 36px 32px;
    text-align: center;
}

.detail-upload-area .placeholder-icon {
    width: 78px;
    height: 78px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(239,246,255,0.92));
    color: var(--accent-primary);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.10), inset 0 1px 0 rgba(255,255,255,0.96);
}

.detail-upload-area .placeholder-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-upload-area .placeholder-hint {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 340px;
}

/* 图片信息 */
.detail-image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(239,246,255,0.78), rgba(255,255,255,0.92));
    border: 1px solid rgba(37, 99, 235, 0.10);
    border-radius: 14px;
    font-size: 13px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.04);
}

.detail-image-info .info-label {
    color: var(--text-tertiary);
}

.detail-image-info .info-value {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.detail-image-info.is-visible {
    animation: fadeSlideIn 0.22s ease;
}

.detail-upload-area.is-just-uploaded {
    animation: uploadReadyReveal 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 输入区 */
.detail-input-area {
    margin-top: 0;
}

.detail-textarea {
    width: 100%;
    min-height: 124px;
    padding: 18px 18px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    background: rgba(248,250,252,0.96);
    color: var(--text-primary);
    transition: all 0.22s ease;
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.detail-textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(255,255,255,0.99);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.07), 0 10px 20px rgba(37, 99, 235, 0.05);
}

.detail-textarea::placeholder {
    color: #94a3b8;
}

.detail-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.detail-suggestion-group .suggestion-chip {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.025);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.detail-suggestion-group .suggestion-chip:hover {
    background: rgba(37, 99, 235, 0.09);
    color: var(--accent-primary);
    border-color: rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.05);
}

.detail-suggestion-group .suggestion-chip:active {
    transform: translateY(0) scale(0.99);
}

.detail-suggestion-group .suggestion-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* 操作按钮 */
.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 0;
    position: relative;
}

.detail-actions::before {
    content: '';
    position: absolute;
    inset: -10px 0 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.28), rgba(148, 163, 184, 0));
}

.detail-actions-single {
    margin-top: 16px;
}

.detail-actions-stack {
    flex-direction: column;
    margin-top: 16px;
}

.detail-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 16px 18px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.detail-btn.primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

.detail-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

.detail-btn.primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.detail-btn.secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,245,249,0.94));
    color: var(--text-primary);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.detail-btn.secondary:hover:not(:disabled) {
    background: rgba(241,245,249,0.98);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.detail-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.detail-btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    box-shadow: none;
}

.detail-btn.secondary:disabled {
    background: linear-gradient(180deg, rgba(248,250,252,0.96), rgba(241,245,249,0.92));
    color: rgba(100, 116, 139, 0.86);
    border-color: rgba(148, 163, 184, 0.18);
}

.detail-btn:disabled .btn-hint {
    opacity: 0.58;
}

#detailPageSend,
#detailEnterEditor {
    border-radius: 14px;
}

#detailPageModal.has-prompt #detailPageSend {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #3b82f6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

#detailPageModal.has-prompt #detailPageSend:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

#detailPageModal.has-prompt #detailEnterEditor,
#detailPageModal:not(.has-prompt) #detailPageSend {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,245,249,0.95));
    color: var(--text-primary);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

#detailPageModal.has-prompt #detailEnterEditor:hover:not(:disabled),
#detailPageModal:not(.has-prompt) #detailPageSend:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

#detailPageModal:not(.has-prompt) #detailEnterEditor {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #3b82f6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

#detailPageModal:not(.has-prompt) #detailEnterEditor:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.26);
}

.detail-btn .btn-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.74;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

/* 响应式适配 */
@media (max-width: 900px) {
    .detail-page-content {
        grid-template-columns: 1fr;
    }

    .detail-upload-area,
    .detail-upload-area.has-file {
        min-height: 280px;
        max-height: 360px;
    }
}

@media (max-width: 600px) {
    .detail-page-dialog {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .detail-page-header {
        padding: 18px 18px 16px;
    }

    .detail-page-dialog::before {
        height: 72px;
    }

    .detail-page-heading {
        gap: 12px;
    }

    .detail-page-icon-badge {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .detail-page-title-wrap h2 {
        font-size: 20px;
    }

    .detail-page-subtitle {
        font-size: 12px;
    }

    .detail-page-content {
        max-height: calc(100vh - 88px);
        padding: 18px;
        gap: 14px;
    }

    .detail-page-section {
        padding: 16px;
        border-radius: 18px;
    }

    .detail-mode-grid {
        grid-template-columns: 1fr;
    }

    .detail-upload-area,
    .detail-upload-area.has-file {
        min-height: 220px;
        max-height: 300px;
    }

    .detail-actions,
    .detail-actions-stack {
        flex-direction: column;
    }

    .detail-btn .btn-hint {
        display: none;
    }
}
