/* 
 * Editable Figure - 样式表
 * 简洁现代的设计风格，米白色背景色调
 */

/* CSS 变量 */
:root {
    --bg-primary: #eee9df;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e7e1d6;
    --text-primary: #1d1c1a;
    --text-secondary: #6f6b65;
    --text-tertiary: #9a948c;
    --border-color: #e4e1dc;
    --border-light: #ece9e4;
    --accent-color: #2c2a27;
    --brand-ef-color: #8b5e3c;
    --accent-hover: #1f1d1b;
    --accent-light: #ebe7e1;
    --danger-color: #DC2626;
    --danger-hover: #B91C1C;
    --success-color: #059669;
    --shadow-sm: 0 1px 2px rgba(23, 20, 16, 0.05);
    --shadow-md: 0 8px 18px rgba(20, 18, 15, 0.08);
    --shadow-lg: 0 16px 36px rgba(16, 14, 12, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Hide uncompiled Vue templates until mount (prevents {{ }} / modal FOUC) */
[v-cloak] {
    display: none !important;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    padding-top: 62px;
}

/* 顶部导航栏 */
.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 30px;
    gap: 28px;
    height: 62px;
    background: var(--bg-primary);
    border-bottom: 1px solid #ddd5c8;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 19px;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-color);
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.navbar-nav {
    display: flex;
    gap: 6px;
}

.nav-link {
    position: relative;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--text-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.28s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
    z-index: 210;
    pointer-events: auto;
}

.navbar-toggle:hover {
    background: var(--bg-tertiary);
}

.navbar-toggle svg {
    width: 22px;
    height: 22px;
}

.brand-name {
    white-space: nowrap;
}

/* 语言切换器 */
.lang-switcher {
    position: relative;
    margin-left: auto;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.lang-btn .globe-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.lang-btn .chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-btn .chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    min-width: 130px;
    z-index: 1000;
    overflow: hidden;
    padding: 4px;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.auth-control {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.sign-in-btn {
    border: 1px solid #111111;
    background: #111111;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
}

.sign-in-btn:hover {
    background: #2b2a27;
    border-color: #2b2a27;
}

.user-menu-wrap {
    position: relative;
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #cabfaa;
    background: #f4efe5;
    color: #2a2721;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

.avatar-btn:hover {
    border-color: #a89677;
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 288px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d7cebf;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
}

.user-menu-email {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding: 4px 2px;
    word-break: break-all;
}

.user-menu-credits {
    font-size: 12px;
    color: #4a443b;
    background: #f8f3ea;
    border: 1px solid #e7ddcc;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    line-height: 1.45;
    word-break: break-word;
}

.user-menu-credits strong {
    color: #2a2620;
}

.user-menu-credits-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 12px;
    font-weight: 600;
    color: #2a2620;
}

/* Detail buckets present (paid): keep divider + spacing under the total. */
.user-menu-credits-body:has(.user-menu-credit-bucket) .user-menu-credits-total {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e7ddcc;
}

/* Zero-balance / no buckets: drop the card chrome so it doesn't read as an underline + empty gap. */
.user-menu-credits:not(:has(.user-menu-credit-bucket)) {
    background: transparent;
    border: none;
    padding: 2px 2px 4px;
    margin-bottom: 6px;
}

.user-menu-credits-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
}

.user-menu-credits-line:last-of-type {
    margin-bottom: 0;
}

.credit-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #b7aa97;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: credit-spin .7s linear infinite;
}

@keyframes credit-spin {
    to { transform: rotate(360deg); }
}

.user-menu-credit-bucket + .user-menu-credit-bucket {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2d6c4;
}

.user-menu-credits-expiry {
    margin-top: 2px;
    font-size: 11px;
    color: #6b6358;
}

.user-menu-credits-expiry.is-muted {
    color: #8a8175;
}

.user-menu-trial {
    width: 100%;
    border: 1px solid #cab58f;
    border-radius: 10px;
    background: #f6ead4;
    color: #3f331f;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 8px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-trial:hover {
    background: #f1dfbd;
    border-color: #bda170;
}

.user-menu-pricing,
.user-menu-manage-sub {
    width: 100%;
    display: block;
    box-sizing: border-box;
    border: 1px solid #d5c9b6;
    border-radius: 10px;
    background: #fffaf1;
    color: #3f331f;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    padding: 8px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: var(--transition);
}

.user-menu-pricing:hover,
.user-menu-manage-sub:hover {
    background: #fff3df;
    border-color: #cab58f;
}

.user-menu-manage-sub:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.user-menu-logout {
    width: 100%;
    border: 1px solid #1f1d1b;
    border-radius: 10px;
    background: #1f1d1b;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 8px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-logout:hover {
    background: #2e2b28;
    border-color: #2e2b28;
}

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 19, 14, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    padding: 20px;
}

.auth-modal {
    width: min(440px, 100%);
    background: var(--bg-secondary);
    border: 1px solid #ddd3c4;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.auth-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.auth-modal-title {
    font-size: 24px;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.auth-modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.google-login-btn {
    width: 100%;
    border: 1px solid #d6ccbb;
    background: #fffaf1;
    color: #1f1d1a;
    border-radius: 12px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.google-login-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.google-login-btn:hover:not(:disabled) {
    border-color: #bcae96;
    background: #fff3df;
}

.google-login-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: calc(var(--radius-md) - 2px);
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--text-primary);
    font-weight: 500;
}

.lang-option .check-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
}

/* 主容器 */
.main-container {
    display: grid;
    grid-template-columns: minmax(320px, 4fr) minmax(0, 6fr);
    align-items: stretch;
    height: auto;
    min-height: 0;
    width: min(96vw, 1680px);
    min-width: 0;
    overflow: visible;
    gap: 14px;
    padding: 14px;
    background: var(--bg-primary);
    margin: 0 auto;
}

.main-container > .intro-panel,
.main-container > .canvas-container {
    min-width: 0;
}

/* 行高：默认自适应；桌面端由 JS 写入变量，避免右侧消息撑高 */
.main-container {
    grid-template-rows: var(--hero-row-height, minmax(clamp(520px, 62vh, 720px), max-content));
}

@media (min-width: 901px) {
    .main-container > .canvas-container {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }
}

.intro-panel {
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    overflow: visible;
    padding: 22px 12px 14px 12px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

@media (min-width: 901px) {
    .intro-panel {
        justify-content: center;
        padding-block: 28px;
    }
}

.intro-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(40px, 3.4vw, 52px);
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.intro-title-sub {
    display: block;
    margin-top: 10px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: clamp(15px, 1.2vw, 17px);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: #746b60;
    white-space: nowrap;
}

.intro-desc {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: clamp(12px, 0.92vw, 14px);
    line-height: 1.55;
    color: #665f56;
    max-width: 100%;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.intro-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 2px 0 22px;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: clamp(15px, 1.12vw, 17px);
    line-height: 1.5;
    font-weight: 400;
    color: #625b52;
    max-width: 100%;
}

.intro-summary span {
    display: block;
}

.intro-summary-more {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 115, 85, 0.18);
}

.intro-ecosystem {
    width: 100%;
    margin: 0 0 20px;
}

.intro-ecosystem-title {
    margin: 0 0 10px;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8b7b69;
}

.intro-ecosystem-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.intro-ecosystem-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    box-sizing: border-box;
    border: 1px solid rgba(139, 115, 85, 0.17);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: #51483e;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 11.5px;
    font-weight: 550;
    line-height: 1;
    white-space: nowrap;
}

.intro-ecosystem-item > img,
.intro-tool-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.intro-ecosystem-item > img {
    display: block;
    object-fit: contain;
}

.intro-ecosystem-icon-drawio {
    width: 16px !important;
    height: 16px !important;
    flex-basis: 16px !important;
}

.intro-ecosystem-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px dashed rgba(139, 115, 85, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    color: #8b7b69;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    user-select: none;
}

.intro-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 5px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.intro-tool-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.intro-tool-icon-ppt {
    background: #d35230;
    color: #fff;
}

.intro-tool-icon-ai {
    background: #2b1b12;
    color: #ff9a00;
    border: 1px solid #ff9a00;
}

.intro-desc-line {
    display: block;
    margin: 0;
    white-space: normal;
    padding-left: 12px;
    text-indent: -12px;
    color: #71695f;
}

/* Homepage GPT Image 2.5 promo beside primary CTA (toggle via SHOW_GPT25_NAV_PROMO in app.js) */
.intro-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    align-self: flex-start;
}

.intro-try-free-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 16px 32px;
    border-radius: 999px;
    border: 1px solid #1f1d1b;
    background: #1f1d1b;
    color: #fffaf3;
    text-decoration: none;
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(45, 36, 25, 0.14);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.intro-try-free-btn:hover {
    transform: translateY(-1px);
    background: #2f2c28;
    box-shadow: 0 10px 22px rgba(45, 36, 25, 0.18);
}

.intro-gpt25-promo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 12px 18px;
    box-sizing: border-box;
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.92);
    color: var(--text-primary, #1d1c1a);
    text-decoration: none;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(29, 28, 26, 0.05);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.intro-gpt25-promo:hover {
    background: #fff;
    border-color: rgba(139, 94, 60, 0.34);
    color: var(--brand-ef-color, #8b5e3c);
    box-shadow: 0 6px 16px rgba(29, 28, 26, 0.08);
    transform: translateY(-1px);
}

.intro-gpt25-promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--success-color, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
    animation: intro-gpt25-pulse 1.8s ease-in-out infinite;
}

.intro-gpt25-promo-arrow {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-ef-color, #8b5e3c);
    opacity: 0.8;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.intro-gpt25-promo:hover .intro-gpt25-promo-arrow {
    opacity: 1;
    transform: translateX(2px);
}

@keyframes intro-gpt25-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16); }
    50% { box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.08); }
}

/* Legacy studio gateway styles kept if referenced elsewhere */
.intro-studio-gateway {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    min-height: clamp(280px, 38vh, 420px);
    margin-bottom: 4px;
    padding: 18px 18px 16px;
    box-sizing: border-box;
    border: 1px solid #d7ccb8;
    border-radius: 16px;
    background:
        linear-gradient(165deg, rgba(255, 252, 247, 0.96) 0%, rgba(245, 236, 222, 0.92) 55%, rgba(238, 228, 212, 0.9) 100%);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(45, 36, 25, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.intro-studio-gateway:hover {
    transform: translateY(-2px);
    border-color: #c2ad8b;
    box-shadow: 0 14px 28px rgba(45, 36, 25, 0.12);
}

.intro-studio-gateway-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.intro-studio-gateway-eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7460;
}

.intro-studio-gateway-title-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
}

.intro-studio-gateway-title {
    display: block;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 650;
    letter-spacing: 0.04em;
    line-height: 1.25;
    color: #8a7460;
}

.intro-studio-gateway-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #8a7460;
    transition: transform 0.22s ease, color 0.22s ease;
}

.intro-studio-gateway-arrow svg {
    width: 18px;
    height: 18px;
    display: block;
}

.intro-studio-gateway:hover .intro-studio-gateway-arrow {
    transform: translate(2px, -2px);
    color: #6a5739;
}

.intro-studio-gateway-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
}

.intro-studio-type {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 118px;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid rgba(45, 36, 24, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

.intro-studio-type-icon {
    width: 28px;
    height: 28px;
    color: #7a5a3c;
}

.intro-studio-type-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.intro-studio-type-name {
    font-size: 14px;
    font-weight: 700;
    color: #2b241c;
}

.intro-studio-type-desc {
    font-size: 12px;
    line-height: 1.45;
    color: #74685c;
}

.intro-studio-gateway-sources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.intro-studio-sources-label {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a7b6a;
}

.intro-studio-source-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.intro-studio-source-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #ddd2c1;
    background: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 600;
    color: #433a31;
}

.intro-studio-source-chip img {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

/* Legacy intro source styles kept for ai-image-editor and similar pages */
.intro-sources {
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.intro-studio-cta {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 13px 44px 12px 14px;
    border: 1px solid #d7ccb8;
    border-radius: 10px;
    background: linear-gradient(135deg, #fffdf9 0%, #f8efe2 100%);
    color: #2b231b;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(45, 36, 25, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.intro-studio-cta:hover {
    transform: translateY(-1px);
    border-color: #b69a70;
    box-shadow: 0 10px 22px rgba(45, 36, 25, 0.14);
}

.intro-studio-cta-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.intro-studio-cta-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #6f6352;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.intro-studio-cta-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #6a5739;
}

.intro-sources-title {
    color: #2a2722;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 12px;
}

.source-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 60px;
    padding: 10px 10px;
    border: 1px solid #d6cec0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    color: #1f1d1a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
}

.source-item > span:last-child {
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
}

.source-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    border: 1px solid rgba(42, 38, 32, 0.12);
}

.source-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

.source-icon img {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
}

.banana-icon {
    background: transparent;
    border-color: transparent;
}

.gpt-icon {
    background: transparent;
    border-color: transparent;
}

.globe-source-icon {
    background: #eef4ff;
    color: #365d8d;
}

.globe-source-icon svg {
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.canvas-mode-switcher {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ded6c9;
}

.canvas-mode-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    min-height: 118px;
    padding: 10px;
    border: 1px solid #d9d1c4;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.45);
    color: #5b554d;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-sizing: border-box;
}

a.canvas-mode-item {
    color: inherit;
}

.canvas-mode-item:hover {
    border-color: #bfb39f;
    background: rgba(255, 255, 255, 0.7);
}

.canvas-mode-item.active {
    border-color: #bfb39f;
    background: rgba(255, 255, 255, 0.82);
    color: #1f1d1a;
    font-weight: 600;
    cursor: default;
}

.canvas-mode-name {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(12px, 1.15vw, 14px);
    line-height: 1.3;
    font-weight: 700;
    color: #2a2620;
    margin-bottom: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.canvas-mode-desc {
    font-size: clamp(11px, 1vw, 12px);
    line-height: 1.4;
    color: #676056;
    font-weight: 400;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 仅在移动端单列堆叠；桌面侧栏内始终保持三列同行 */
@media (max-width: 900px) {
    .canvas-mode-switcher {
        grid-template-columns: 1fr;
    }

    .canvas-mode-item {
        min-height: auto;
    }

    .canvas-mode-name {
        font-size: 15px;
    }

    .canvas-mode-desc {
        font-size: 13px;
    }
}

/* 左侧工具栏 */
.toolbar {
    width: 252px;
    height: auto;
    background: #e8e2d8;
    border: 1px solid #ddd4c6;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    position: absolute;
    left: 14px;
    top: 14px;
    bottom: 14px;
    z-index: 20;
}

.toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toolbar-hints {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toolbar-hints p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: nowrap;
}

.toolbar-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}

.vector-steps-panel {
    width: 252px;
    background: linear-gradient(180deg, rgba(238, 232, 222, 0.95) 0%, rgba(233, 225, 212, 0.92) 100%);
    border: 1px solid #d6cdbf;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    position: absolute;
    left: 14px;
    top: 14px;
    bottom: 14px;
    z-index: 20;
}

.home-figure-type-panel {
    gap: 12px;
    top: 8px;
}

.home-figure-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
}

.home-figure-type-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(45, 36, 24, 0.1);
    background: rgba(255, 255, 255, 0.55);
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

a.home-figure-type-option:hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(139, 94, 60, 0.28);
    box-shadow: 0 4px 12px rgba(45, 36, 24, 0.06);
}

.home-figure-type-option.is-active {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(139, 94, 60, 0.34);
    box-shadow: inset 0 0 0 1px rgba(139, 94, 60, 0.12);
}

.home-figure-type-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: #7a5a3c;
}

.home-figure-type-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.home-figure-type-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.home-figure-type-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #2b241c;
}

.home-figure-type-desc {
    font-size: 12px;
    line-height: 1.45;
    color: #74685c;
}

.home-figure-type-soon {
    margin: auto 0 0;
    padding-top: 8px;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #9a8d7c;
    text-align: left;
}

.vector-steps-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.vector-steps-title {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 20px;
    line-height: 1.2;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: #2a251f;
}

.vector-steps-title span {
    display: block;
}

.vector-steps-subtitle {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #7d7365;
}

.vector-steps-list {
    margin: 0;
    padding: 8px 0 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    justify-content: flex-start;
    gap: 14px;
}

.vector-step-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.vector-step-index {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f6efe4;
    border: 1px solid #cdbfa9;
    color: #5b4b36;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.vector-step-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #4f473c;
}

.tool-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.tool-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tool-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tool-btn.active {
    background: var(--accent-light);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 开关选项 */
.toggle-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-top: 0;
}

.toggle-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-hint {
    width: 100%;
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: -4px;
}

/* 开关按钮样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    box-shadow: inset 0 0 0 1.5px #bfb8ae;
    transition: var(--transition);
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
    box-shadow: none;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* 属性面板 */
/* 属性行布局 */
.property-row {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    min-width: 0;
}

.property-row .property-group {
    margin-bottom: 0;
}

/* 字体和大小布局 */
.font-group {
    flex: 2;
    min-width: 0;
}

.size-group {
    flex: 1;
    min-width: 74px;
}

/* 紧凑行：颜色、样式、对齐 */
.compact-row {
    gap: 4px;
}

.compact-row .property-group {
    flex: 1;
    min-width: 0;
}

.color-group {
    flex: 0 0 34px !important;
}

.style-group {
    flex: 0 0 62px !important;
}

.align-group {
    flex: 0 0 92px !important;
}

.property-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.property-group label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.prop-select {
    padding: 8px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.prop-select:hover {
    border-color: var(--text-tertiary);
}

.prop-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.input-with-unit {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.prop-input {
    flex: 1;
    padding: 8px 6px;
    border: none;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-width: 0;
}

.prop-input:focus {
    outline: none;
}

.input-with-unit:focus-within {
    border-color: var(--accent-color);
}

.unit {
    padding: 8px 6px;
    background: var(--bg-tertiary);
    font-size: 12px;
    color: var(--text-tertiary);
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.color-picker-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-picker {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-secondary);
}

/* 颜色选择器 */
.color-picker-wrapper {
    position: relative;
}

.color-swatch-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.color-swatch-btn:hover {
    border-color: var(--text-tertiary);
}

.color-picker-popup {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 6px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 180px;
}

.color-picker-section {
    margin-bottom: 10px;
}

.color-picker-section:last-child {
    margin-bottom: 0;
}

.color-picker-section label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.color-picker-large {
    width: 100%;
    height: 32px;
    padding: 2px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-secondary);
}

.color-picker-large::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-large::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: monospace;
    color: var(--text-primary);
    text-transform: uppercase;
}

.color-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.style-buttons,
.align-buttons {
    display: flex;
    gap: 2px;
}

.style-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-btn svg {
    width: 12px;
    height: 12px;
}

.style-btn.italic {
    font-style: italic;
}

.style-btn:hover {
    border-color: var(--text-tertiary);
}

.style-btn.active {
    background: var(--accent-light);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.preset-colors {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.preset-color-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--swatch);
    cursor: pointer;
    transition: var(--transition);
}

.preset-color-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.preset-color-btn.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

.apply-btn {
    padding: 10px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.apply-btn:hover {
    background: var(--accent-hover);
}

.delete-btn {
    padding: 10px;
    border: 1px solid var(--danger-color);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--danger-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.delete-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* 导出按钮 */
.export-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-row .toolbar-title {
    margin: 0;
    flex-shrink: 0;
    min-width: 28px;
}

.export-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex: 1;
}

.export-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.export-btn svg {
    width: 16px;
    height: 16px;
}

.export-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 画布容器 */
.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #efe9df 0%, #e7e1d7 100%);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    border: 2px solid #cfc4b2;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(45, 36, 24, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
    padding-left: 0;
    min-height: clamp(520px, 62vh, 720px);
    height: auto;
    align-self: stretch;
}

.home-canvas-stage-tabs-wrap {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
    padding: 16px 14px 4px;
    z-index: 25;
    box-sizing: border-box;
}

.home-canvas-stage-tabs-spacer {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 4px;
    box-sizing: border-box;
}

.home-canvas-stage-tabs-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.home-canvas-stage-tabs {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(108px, 1fr);
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 4px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(45, 36, 24, 0.1);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(45, 36, 24, 0.05);
}

.home-canvas-studio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
    color: #8a7460;
    text-decoration: none;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 650;
    letter-spacing: 0.01em;
    white-space: normal;
    line-height: 1.3;
    max-width: 100%;
    transition: color 0.15s ease;
}

.home-canvas-studio-link:hover {
    color: #5c4a38;
}

.home-canvas-studio-link-arrow {
    display: inline-flex;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.home-canvas-studio-link-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

.home-canvas-studio-link:hover .home-canvas-studio-link-arrow {
    transform: translate(1px, -1px);
}

.home-canvas-stage-tab {
    appearance: none;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 8px 20px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #6f6b65;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
}

a.home-canvas-stage-tab:hover {
    color: #1d1c1a;
}

.home-canvas-stage-tab.is-active {
    background: rgba(139, 94, 60, 0.18);
    color: #1d1c1a;
    box-shadow: inset 0 0 0 1px rgba(139, 94, 60, 0.28);
    cursor: default;
}

.home-canvas-stage-body {
    flex: 1 1 auto;
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    padding-left: 280px;
    box-sizing: border-box;
}

.canvas-container:has(.chat-flow-wrapper) {
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
}

.home-canvas-stage-body > .vector-canvas-wrapper.chat-flow-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    max-height: none;
    height: auto;
    width: auto;
    align-self: stretch;
    margin: 8px 14px 14px 10px;
}

.fullscreen-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid #cabca8;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: #3d372f;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
}

.fullscreen-toggle-btn:hover {
    background: #ffffff;
}

body.fullscreen-mode {
    overflow: hidden;
}

body.fullscreen-mode .main-container {
    width: 100vw !important;
    max-width: none !important;
    height: calc(100vh - 62px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    display: flex !important;
    background-color: #f1ece3 !important;
    background-image:
        linear-gradient(45deg, #e2dbcf 25%, transparent 25%, transparent 75%, #e2dbcf 75%),
        linear-gradient(45deg, #e2dbcf 25%, transparent 25%, transparent 75%, #e2dbcf 75%) !important;
    background-size: 24px 24px !important;
    background-position: 0 0, 12px 12px !important;
}

body.fullscreen-mode .intro-panel {
    display: none !important;
}

body.fullscreen-mode .canvas-container {
    flex: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 0 !important;
}

body.fullscreen-mode .home-canvas-stage-tabs-wrap {
    display: none !important;
}

body.fullscreen-mode .home-canvas-stage-body {
    padding-left: 300px !important;
}

body.fullscreen-mode .toolbar {
    top: 16px;
    bottom: 16px;
    left: 16px;
    background: rgba(233, 226, 214, 0.95);
    z-index: 40;
}

body.fullscreen-mode .canvas-wrapper {
    background: transparent !important;
}

/* 上传区域 */
.upload-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
}

.upload-area.is-uploading .upload-content {
    cursor: wait;
    border-color: #9c9387;
    background: rgba(255, 255, 255, 0.72);
}

.upload-area:hover .upload-content {
    border-color: #9c9387;
}

.upload-area.drag-over .upload-content {
    border-color: var(--accent-color);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--text-tertiary);
}

.upload-area:hover .upload-icon,
.upload-area.drag-over .upload-icon {
    color: var(--accent-color);
}

.upload-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(156, 147, 135, 0.25);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.upload-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
    text-align: left;
}

.upload-feature-list li {
    position: relative;
    padding-left: 16px;
}

.upload-feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8a8175;
    transform: translateY(-50%);
}

.upload-methods {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.upload-methods .method {
    font-size: 13px;
    color: var(--text-tertiary);
}

.upload-methods .divider {
    color: var(--border-color);
}

/* 画布包装器 */
.canvas-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1ece3;
    background-image:
        linear-gradient(45deg, #dedad3 25%, transparent 25%, transparent 75%, #dedad3 75%),
        linear-gradient(45deg, #dedad3 25%, transparent 25%, transparent 75%, #dedad3 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.vector-canvas-wrapper {
    width: 100%;
    height: 100%;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vector-upload-area {
    width: 100%;
    height: 100%;
}

.vector-preview-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vector-preview-header {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.vector-preview-stage {
    flex: 1;
    border: 1px solid #d7cebf;
    border-radius: 12px;
    background: #f5f1e9;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vector-loading {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #6e665c;
    font-weight: 600;
    padding: 0 24px;
    text-align: left;
}

.vector-loading-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vector-loading-title {
    font-size: 14px;
    line-height: 1.4;
    color: #4a443c;
}

.vector-loading-meta {
    font-size: 12px;
    color: #8c8377;
    font-weight: 500;
}

.vector-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 0 4px;
    color: #6e665c;
    font-size: 12px;
}

.vector-status-pill {
    background: #f0ebe1;
    border: 1px solid #d7cebf;
    border-radius: 999px;
    padding: 3px 10px;
    line-height: 1.4;
    white-space: nowrap;
}

.vector-status-id {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: #8c8377;
}

.vector-svg-preview {
    width: 100%;
    height: 100%;
    padding: 20px;
}

.vector-svg-preview svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vector-pending-preview {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.vector-pending-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border: 1px solid #d7cebf;
    border-radius: 10px;
    background: #fff;
}

.vector-pending-tip {
    margin: 0;
    font-size: 13px;
    color: #7a7267;
    text-align: center;
}

.vector-empty-tip {
    color: #8c8377;
    font-size: 14px;
}

/* ===== Chat Flow UI ===== */
.vector-canvas-wrapper.chat-flow-wrapper {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow: hidden;
    background: #fffcf8;
    border: 1px solid rgba(45, 36, 24, 0.08);
    border-radius: 18px;
    box-shadow:
        0 8px 22px rgba(45, 36, 24, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.chat-flow-wrapper {
    flex-direction: column;
    padding: 0 !important;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #fffcf8;
    border-radius: 18px;
}

.chat-flow-wrapper.chat-drag-over {
    outline: 2px dashed var(--accent-color, #8b7355);
    outline-offset: -8px;
    background: #fff8ef !important;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Idle demo: keep welcome near top; center Try-this demo in the remaining space */
.chat-messages:has(> .chat-demo-row) {
    justify-content: flex-start;
    padding-top: 14px;
    padding-bottom: 12px;
    gap: 10px;
}

.chat-messages:has(> .chat-demo-row) > .chat-demo-row {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    margin-top: 0;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.chat-messages:has(> .chat-demo-row) > .chat-demo-row .chat-avatar-slot {
    display: none;
}

.chat-messages:has(> .chat-demo-row) > .chat-demo-row .chat-demo-shell {
    flex: 0 1 auto;
    width: min(76%, 400px);
    max-width: min(76%, 400px);
    margin-inline: auto;
}

.chat-messages:has(> .chat-demo-row) .chat-demo-label {
    text-align: left;
}

.chat-messages::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.chat-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-msg-user {
    justify-content: flex-end;
}

.chat-msg-assistant {
    justify-content: flex-start;
    align-self: flex-start;
}

.chat-avatar-slot {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    align-self: flex-start;
}

.chat-bubble-shell {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(75%, calc(100% - 46px));
}

.chat-msg-user .chat-bubble-shell {
    max-width: min(75%, calc(100% - 46px));
}

.chat-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-avatar-bot {
    background: #f7f3ea;
    border: 1px solid #c9ae72;
    border-radius: 50%;
    box-sizing: border-box;
    overflow: hidden;
}

.chat-avatar-bot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.chat-avatar-ef {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--brand-ef-color, #8b5e3c);
    user-select: none;
}

.chat-avatar-user {
    background: #8b6f52;
    color: #fffaf3;
    font-size: 13px;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.12);
}

.chat-bubble {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.chat-msg-assistant .chat-bubble-shell:has(.chat-bubble-welcome) {
    flex: 0 1 auto;
    min-width: min-content;
    width: auto;
    max-width: calc(100% - 50px);
    overflow: visible;
}

.chat-bubble-welcome {
    display: inline-block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.chat-bubble-assistant {
    background: #f5f1e9;
    border: 1px solid #e5ded3;
    border-radius: 16px 16px 16px 4px;
    color: #3d3730;
}

.chat-bubble-user {
    background: #f7f1e7;
    color: #3d3730;
    border: 1px solid #e2d7c6;
    border-radius: 16px 16px 4px 16px;
    padding: 6px;
    box-shadow: 0 1px 2px rgba(61, 55, 48, 0.04);
}

.chat-bubble-text {
    margin: 0;
}

.chat-welcome-text {
    margin: 0;
    min-height: 1.4em;
    white-space: normal;
    display: inline;
    overflow-wrap: anywhere;
}

.chat-demo-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: -4px;
}

.chat-avatar-placeholder {
    visibility: hidden;
}

.chat-demo-shell {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(76%, 400px);
}

.chat-demo-label {
    margin: 0 0 9px;
    font-size: 15px;
    font-weight: 600;
    color: #4a433c;
    letter-spacing: 0.01em;
}

.chat-demo-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #e5ded3;
    border-radius: 14px;
    background: #faf8f5;
    box-shadow: 0 4px 16px rgba(61, 55, 48, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-demo-card:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(61, 55, 48, 0.12);
}

.chat-demo-card:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.chat-demo-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
}

.chat-demo-ripple {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #5c5348;
    background: rgba(255, 255, 255, 0.92);
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(92, 83, 72, 0.35);
    animation: chat-demo-ripple-core 2s ease-out infinite;
}

.chat-demo-ripple::before,
.chat-demo-ripple::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(92, 83, 72, 0.4);
    animation: chat-demo-ripple-pulse 2s ease-out infinite;
}

.chat-demo-ripple::after {
    animation-delay: 1s;
}

@keyframes chat-demo-ripple-pulse {
    0% {
        transform: scale(0.7);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.65);
        opacity: 0;
    }
}

@keyframes chat-demo-ripple-core {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(92, 83, 72, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(92, 83, 72, 0);
    }
}

.chat-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: #6e665c;
    animation: chat-cursor-blink 0.9s step-end infinite;
}

@keyframes chat-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.chat-bubble-image {
    display: block;
    max-width: 320px;
    max-height: 280px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

/* Processing spinner in chat */
.chat-processing {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-processing-spinner {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 3px solid #d7cebf;
    border-top-color: var(--accent-color, #8b7355);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.chat-processing-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.chat-processing-title {
    font-size: 14px;
    color: #4a443c;
    font-weight: 500;
}

.chat-processing-meta {
    font-size: 12px;
    color: #8c8377;
}

/* Result bubble */
.chat-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-result-svg {
    width: auto;
    max-width: min(460px, 100%);
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid #e5ded3;
    border-radius: 10px;
    padding: 10px;
}

.chat-result-svg svg {
    width: auto;
    max-width: 100%;
    max-height: 240px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.chat-result-svg-image {
    width: auto;
    max-width: 100%;
    max-height: 240px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.chat-result-meta {
    font-size: 12px;
    color: #8c8377;
}

.chat-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #d7cebf;
    border-radius: 8px;
    background: #fff;
    color: #4a443c;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.chat-action-btn:hover {
    background: #f5f1e9;
    border-color: #bfb5a3;
}

.chat-action-btn-primary {
    background: #1d1c1a;
    border-color: #1d1c1a;
    color: #fff;
}

.chat-action-btn-primary:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.chat-action-btn svg {
    flex-shrink: 0;
}

.chat-notice {
    flex-shrink: 0;
    margin: 0 16px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #d8cebe;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #5b554d;
    font-size: 12px;
    line-height: 1.35;
}

.chat-notice-icon {
    flex-shrink: 0;
}

.chat-notice-text {
    flex: 1;
    min-width: 0;
}

.chat-notice-close {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #e8e0d2;
    color: #72685a;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.chat-notice-close:hover {
    background: #ddd2c2;
    color: #4a433a;
}

/* Chat input bar */
.chat-input-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 14px;
    border-top: 1px solid #ebe4d8;
    background: #fffefb !important;
    border-radius: 0 0 18px 18px;
}

.chat-input-zone {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px dashed #cfc4b5;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.chat-input-zone:hover:not(.is-disabled) {
    border-color: #b8aa96;
    background: #ffffff;
}

.chat-input-zone.is-disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.chat-input-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.chat-upload-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e665c;
}

.chat-input-hint {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #8c8377;
}

.chat-pending-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.chat-pending-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5ded3;
    flex-shrink: 0;
}

.chat-pending-label {
    flex: 1;
    font-size: 13px;
    color: #6e665c;
    min-width: 0;
}

.chat-pending-remove {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f0ebe1;
    color: #6e665c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-pending-remove:hover:not(:disabled) {
    background: #e5ded3;
    color: #3d3730;
}

.chat-pending-remove:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color, #2c2a27);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}

.chat-send-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.chat-send-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ===== End Chat Flow UI ===== */

/* 画布内部容器 */
.canvas-inner {
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow: visible;
}

canvas {
    display: block;
}

/* 覆盖层（文本框 + 选择框） */
.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: visible;
}

.text-box {
    position: absolute;
    pointer-events: auto;
    cursor: move;
    min-width: 20px;
    min-height: 20px;
    padding: 4px;
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.text-box:hover {
    border-color: var(--accent-color);
}

.text-box.selected {
    border-color: var(--accent-color);
    border-style: solid;
    z-index: 10;
}

.text-box.editing {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.8);
}

/* 快捷文本属性工具栏 */
.text-quick-toolbar {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 4px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    z-index: 100;
}

.quick-font-select {
    font-size: 12px;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    max-width: 80px;
    cursor: pointer;
}

.quick-size-control {
    display: flex;
    align-items: center;
    gap: 2px;
}

.quick-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transition: all 0.15s;
}

.quick-btn:hover {
    background: #f0f0f0;
    border-color: #aaa;
}

.quick-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.quick-btn.italic {
    font-style: italic;
}

.quick-btn svg {
    width: 14px;
    height: 14px;
}

.quick-divider {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 0 2px;
}

.text-content {
    white-space: pre-wrap;
    word-break: break-word;
    user-select: none;
}

.text-input {
    width: 100%;
    height: 100%;
    min-width: 100px;
    min-height: 30px;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-family: inherit;
}

.resize-handles .resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    z-index: 10;
}

/* 四角控制点 */
.resize-handle.nw { top: -5px; left: -5px; cursor: nwse-resize; }
.resize-handle.ne { top: -5px; right: -5px; cursor: nesw-resize; }
.resize-handle.sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.resize-handle.se { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* 四边中点控制点 */
.resize-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.w { top: 50%; left: -5px; transform: translateY(-50%); cursor: ew-resize; }
.resize-handle.e { top: 50%; right: -5px; transform: translateY(-50%); cursor: ew-resize; }

/* 旋转控制连接线 */
.rotate-line {
    position: absolute;
    bottom: -30px;
    left: 50%;
    width: 2px;
    height: 25px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

/* 旋转控制点 */
.rotate-handle {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    transition: var(--transition);
}

.rotate-handle:hover {
    background: var(--accent-light);
    transform: translateX(-50%) scale(1.1);
}

.rotate-handle:active {
    cursor: grabbing;
}

.rotate-handle svg {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
}

/* 旋转辅助线 */
.rotation-guide {
    position: absolute;
    pointer-events: none;
    z-index: 100;
}

.rotation-guide.horizontal {
    top: 50%;
    left: -100px;
    right: -100px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--success-color) 20%, 
        var(--success-color) 80%, 
        transparent 100%
    );
    transform: translateY(-50%);
}

.rotation-guide.vertical {
    left: 50%;
    top: -100px;
    bottom: -100px;
    width: 2px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        var(--success-color) 20%, 
        var(--success-color) 80%, 
        transparent 100%
    );
    transform: translateX(-50%);
}

/* 选择框 */
.selection-box {
    position: absolute;
    border: 1px dashed var(--accent-color);
    background: rgba(217, 119, 6, 0.1);
    pointer-events: none;
}

.selection-box.pending {
    pointer-events: auto;
}

.selection-info {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    background: var(--text-primary);
    color: white;
    font-size: 11px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* 选择框控制点容器 */
.selection-resize-handles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* 选择框的8个控制点 */
.selection-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: auto;
    z-index: 10;
}

/* 四角控制点 */
.selection-handle.nw { top: -5px; left: -5px; cursor: nwse-resize; }
.selection-handle.ne { top: -5px; right: -5px; cursor: nesw-resize; }
.selection-handle.sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.selection-handle.se { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* 四边中点控制点 */
.selection-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.selection-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.selection-handle.w { top: 50%; left: -5px; transform: translateY(-50%); cursor: ew-resize; }
.selection-handle.e { top: 50%; right: -5px; transform: translateY(-50%); cursor: ew-resize; }

/* 选择框待确认时可拖拽 */
.selection-box.pending {
    cursor: move;
}

/* 选择框确认按钮 */
.selection-confirm-btn {
    position: absolute;
    top: -36px;
    right: -36px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    z-index: 10;
}

.selection-confirm-btn:hover {
    background: #047857;
    transform: scale(1.1);
}

.selection-confirm-btn svg {
    width: 16px;
    height: 16px;
}

.selection-confirm-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* 选择框取消按钮 */
.selection-cancel-btn {
    position: absolute;
    top: -2px;
    right: -36px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    z-index: 10;
}

.selection-cancel-btn:hover {
    background: var(--danger-hover);
    transform: scale(1.1);
}

.selection-cancel-btn svg {
    width: 16px;
    height: 16px;
}

/* OCR 徽章 */
.ocr-badge {
    position: absolute;
    top: -36px;
    right: 0px;
    padding: 2px 6px;
    background: #6366f1;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    pointer-events: none;
    box-shadow: var(--shadow-sm);
}

/* OCR 加载动画 */
.ocr-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 缩放控制 */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* 底部画布缩略图栏 */
.canvas-pages-panel {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: calc(100% - 220px);
    overflow-x: auto;
    z-index: 30;
}

.canvas-page-item {
    position: relative;
    width: 72px;
    height: 42px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    background: #fff;
}

.canvas-page-item.active {
    border-color: var(--accent-color);
}

.canvas-page-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.canvas-page-delete {
    position: absolute;
    right: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-page-add {
    width: 42px;
    height: 42px;
    border: 1px dashed var(--accent-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--accent-color);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.canvas-page-add:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.zoom-btn.fit {
    width: auto;
    padding: 0 12px;
    font-size: 12px;
}

.zoom-btn:hover {
    background: var(--border-color);
}

.zoom-level {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 48px;
    text-align: center;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}

.modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.color-preview span {
    font-size: 13px;
    color: var(--text-secondary);
}

.color-box {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.modal-btn.cancel {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.modal-btn.cancel:hover {
    background: var(--bg-tertiary);
}

.modal-btn.confirm {
    border: none;
    background: var(--accent-color);
    color: white;
}

.modal-btn.confirm:hover {
    background: var(--accent-hover);
}

/* Toast 提示 */
.toast {
    position: absolute;
    top: 12px;
    right: 12px;
    transform: none;
    padding: 10px 16px;
    background: var(--text-primary);
    color: white;
    font-size: 13px;
    line-height: 1.4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    white-space: nowrap;
    animation: toastFadeIn 0.25s ease;
}

.toast.has-close {
    padding-right: 36px;
}

.toast-close {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(29, 28, 26, 0.06);
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: #f5efe6;
    color: var(--text-primary);
    border: 1.5px solid #e8d48a;
    box-shadow: 0 10px 28px rgba(29, 28, 26, 0.12);
    white-space: normal;
    max-width: min(90vw, 420px);
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Docs / Blog 首页 */
.hub-page {
    width: min(1200px, 100% - 48px);
    margin: 0 auto 56px;
}

.hub-hero {
    text-align: center;
    padding: 72px 24px 48px;
}

.hub-hero-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.15;
}

.hub-hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.hub-placeholder {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 28px 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.hub-placeholder p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    transform: scaleX(1);
}

/* 落地页区域 */
.landing-section {
    background: var(--bg-primary);
    padding: 84px 24px 70px;
    border-top: 1px solid var(--border-light);
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
}

.landing-hero {
    text-align: center;
    margin-bottom: 56px;
}

.studio-intro-block {
    display: block;
    margin: 0 auto 28px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 28px 24px;
    border: 1px solid #ddd5c7;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffefc 0%, #f8f3ea 100%);
    box-shadow: 0 10px 26px rgba(22, 18, 13, 0.08);
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.studio-intro-block:hover {
    transform: translateY(-2px);
    border-color: #c9b89a;
    box-shadow: 0 14px 30px rgba(22, 18, 13, 0.12);
}

.studio-intro-block:hover .studio-intro-arrow {
    transform: translate(2px, -2px);
    color: #2f261c;
}

.studio-intro-title {
    margin: 0 0 10px;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(30px, 3.2vw, 42px);
    line-height: 1.2;
    color: #261f18;
}

.studio-intro-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.72em;
    height: 0.72em;
    margin-left: 8px;
    vertical-align: 0.02em;
    color: #4f4030;
    transition: transform 0.2s ease, color 0.2s ease;
}

.studio-intro-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

.studio-intro-text {
    margin: 0 auto;
    max-width: 860px;
    font-size: 16px;
    line-height: 1.7;
    color: #4c4338;
}

.studio-intro-tags {
    margin-top: 14px;
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.studio-intro-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d7c8af;
    background: #fffaf2;
    font-size: 12px;
    font-weight: 600;
    color: #604f39;
}

.section-heading {
    max-width: 820px;
    margin: 0 auto 30px;
    text-align: center;
}

.section-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #8b7049;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: 600;
    line-height: 1.17;
    letter-spacing: 0.005em;
}

.section-heading > p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.studio-workflow {
    margin: 56px auto 52px;
    padding: 44px 36px 36px;
    border: 1px solid #dfd7ca;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(229, 212, 180, 0.24), transparent 42%),
        linear-gradient(180deg, #fffefa 0%, #f7f2e9 100%);
    box-shadow: 0 14px 42px rgba(27, 23, 18, 0.065);
}

.workflow-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.workflow-grid::before {
    content: '';
    position: absolute;
    top: 38px;
    left: 16%;
    right: 16%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cdbd9f 12%, #cdbd9f 88%, transparent);
}

.workflow-step {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    min-height: 250px;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(205, 194, 176, 0.85);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 7px 20px rgba(26, 22, 17, 0.045);
    color: inherit;
    text-align: left;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.workflow-step:hover {
    transform: translateY(-3px);
    border-color: #bca989;
    box-shadow: 0 14px 28px rgba(26, 22, 17, 0.09);
}

.workflow-index {
    position: absolute;
    top: 17px;
    right: 18px;
    color: #b6aa98;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
}

.workflow-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid #d9ccb5;
    border-radius: 14px;
    background: #fbf5ea;
    color: #68583f;
    box-shadow: 0 4px 12px rgba(112, 90, 57, 0.08);
}

.workflow-icon svg {
    width: 23px;
    height: 23px;
}

.workflow-step h3 {
    margin: 0 0 9px;
    color: #2b251e;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 21px;
    font-weight: 600;
}

.workflow-step p {
    margin: 0 0 18px;
    color: #6f675e;
    font-size: 13px;
    line-height: 1.65;
}

.workflow-link {
    margin-top: auto;
    color: #725a36;
    font-size: 12px;
    font-weight: 700;
}

.workflow-link span {
    display: inline-block;
    transition: transform .2s ease;
}

.workflow-step:hover .workflow-link span {
    transform: translateX(3px);
}

.landing-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 48px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.capabilities-heading {
    margin-top: 58px;
    margin-bottom: 24px;
}

.capabilities-heading .landing-title {
    margin-bottom: 14px;
}

.landing-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 26px;
    line-height: 1.7;
}

.svg-editor-demo-section {
    max-width: 1200px;
    margin: 0 auto 52px;
    padding: 26px;
    background: #ffffff;
    border: 1px solid #ddd7ce;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(20, 18, 15, 0.08);
    text-align: left;
}

.svg-editor-demo-header {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.svg-editor-demo-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    margin: 0 0 6px;
}

.svg-editor-demo-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.svg-editor-demo-download-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid #cfc7ba;
    border-radius: 8px;
    background: #f8f6f1;
    color: #2c2a27;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: var(--transition);
}

.svg-editor-demo-download-link:hover {
    background: #ece5d8;
    border-color: #bfb09a;
}

.svg-editor-demo-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.svg-editor-demo-before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.svg-editor-demo-ba-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.svg-editor-demo-ba-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 4.6em;
    padding: 4px 8px 2px;
    text-align: center;
}

.svg-editor-demo-ba-kicker {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2a241c;
}

.svg-editor-demo-ba-desc {
    max-width: 34em;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: #8a8073;
    text-wrap: balance;
}

.svg-editor-demo-ba-item img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #faf8f4;
    border: 1px solid #e7e1d7;
    border-radius: 8px;
}

.svg-editor-demo-examples {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    justify-content: center;
    align-items: center;
}

.svg-editor-demo-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-height: 168px;
    padding: 12px;
    border: 1px solid #ded8cf;
    border-radius: 8px;
    background: #faf8f4;
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.svg-editor-demo-card:hover,
.svg-editor-demo-card.is-active {
    border-color: #9c8870;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(20, 18, 15, 0.08);
}

.svg-editor-demo-card-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3c3934;
}

.svg-editor-demo-image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-width: 0;
}

.svg-editor-demo-thumb {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.svg-editor-demo-thumb span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.svg-editor-demo-thumb img {
    display: block;
    width: 100%;
    height: 112px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e7e1d7;
    border-radius: 6px;
}

.svg-editor-demo-editor-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 480px;
    overflow: hidden;
    border: 1px solid #d7d1c8;
    border-radius: 10px;
    background: #f5f3ee;
}

.svg-editor-demo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 7px 8px 7px 14px;
    border-bottom: 1px solid #d7d1c8;
    background: #ebe6dc;
}

.svg-editor-demo-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.svg-editor-demo-current {
    min-width: 0;
    overflow: hidden;
    color: #35322e;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.svg-editor-demo-edit-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #8f5d00;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s ease;
}

.svg-editor-demo-edit-cta:hover {
    color: #6f4700;
    text-decoration: underline;
}

.svg-editor-demo-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #bfb7aa;
    border-radius: 8px;
    background: #ffffff;
    color: #2c2a27;
    cursor: pointer;
    transition: var(--transition);
}

.svg-editor-demo-fullscreen-btn:hover {
    background: #f5f0e7;
    border-color: #9d8f79;
}

.svg-editor-demo-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

.svg-editor-demo-icon-collapse {
    display: none;
}

.svg-editor-demo-frame-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #f4f4f2;
}

.svg-editor-demo-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 436px;
    border: 0;
    background: #f4f4f2;
}

.svg-editor-demo-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(245, 243, 238, 0.82);
    color: #4d4943;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

.svg-editor-demo-section.is-loading .svg-editor-demo-loading {
    display: flex;
}

body.svg-editor-demo-is-fullscreen {
    overflow: hidden;
}

.svg-editor-demo-section.is-fullscreen {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    max-width: none;
    margin: 0;
    padding: 12px;
    border-width: 1px 0 0;
    border-radius: 0;
    background: #eee9df;
}

.svg-editor-demo-section.is-fullscreen .svg-editor-demo-header,
.svg-editor-demo-section.is-fullscreen .svg-editor-demo-examples,
.svg-editor-demo-section.is-fullscreen .svg-editor-demo-before-after {
    display: none;
}

.svg-editor-demo-section.is-fullscreen .svg-editor-demo-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.svg-editor-demo-section.is-fullscreen .svg-editor-demo-editor-panel {
    height: 100%;
    min-height: 0;
    border-radius: 8px;
}

.svg-editor-demo-section.is-fullscreen .svg-editor-demo-frame {
    min-height: 0;
}

.svg-editor-demo-section.is-fullscreen .svg-editor-demo-icon-expand {
    display: none;
}

.svg-editor-demo-section.is-fullscreen .svg-editor-demo-icon-collapse {
    display: block;
}

.vector-conversion-examples {
    max-width: 1200px;
    margin: 0 auto 52px;
    background: linear-gradient(180deg, #faf8f5 0%, var(--bg-secondary) 100%);
    border: 1px solid #e3ddd4;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(27, 23, 18, 0.06);
    padding: 36px 36px 28px;
    text-align: center;
}

.vector-conversion-examples-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.vector-conversion-examples-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 auto 28px;
    max-width: 520px;
    line-height: 1.6;
}

.vector-conversion-examples-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.vector-conversion-examples-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 12px;
}

.vector-conversion-examples-slot {
    display: flex;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.vector-conversion-examples-image-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vector-conversion-examples-header .vector-conversion-examples-image-area {
    justify-content: flex-end;
    padding-bottom: 4px;
}

.vector-conversion-examples-btn-spacer {
    flex-shrink: 0;
    width: 62px;
}

.vector-conversion-examples-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 7px 18px;
    width: fit-content;
}

.vector-conversion-examples-label-before {
    color: #6b6560;
    background: #f0ece6;
    border: 1px solid #e3ddd5;
}

.vector-conversion-examples-label-after {
    background: linear-gradient(135deg, #f3ead8 0%, #e8dcc4 100%);
    color: #6b5a3e;
    border: 1px solid #d9c9a8;
    box-shadow: 0 2px 10px rgba(180, 155, 110, 0.15);
}

.vector-conversion-examples-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
    padding: 12px 0;
    border-bottom: 1px solid rgba(31, 29, 26, 0.06);
}

.vector-conversion-examples-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vector-conversion-examples-image {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e8e4df;
    border-radius: 14px;
    display: block;
    box-shadow: 0 2px 8px rgba(20, 17, 14, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.vector-conversion-examples-row:hover .vector-conversion-examples-image {
    border-color: #d8d2c9;
    box-shadow: 0 4px 14px rgba(20, 17, 14, 0.07);
}

.vector-conversion-examples-download-btn {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 62px;
    padding: 10px 6px;
    border: 1px solid #d4cfc6;
    background: #ffffff;
    color: #2c2a27;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 2px 6px rgba(20, 17, 14, 0.05);
}

.vector-conversion-examples-download-btn svg {
    width: 16px;
    height: 16px;
    color: #4b4640;
}

.vector-conversion-examples-download-btn:hover {
    background: #e8dcc4;
    color: #5c4f3e;
    border-color: #d9c9a8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(180, 155, 110, 0.2);
}

.vector-conversion-examples-download-btn:hover svg {
    color: #5c4f3e;
}

.vector-conversion-examples-hints {
    margin-top: 26px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(31, 29, 26, 0.06);
}

.vector-conversion-examples-hints p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    text-align: left;
    padding-left: 1.1em;
    position: relative;
}

.vector-conversion-examples-hints p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8f887f;
}

.vector-conversion-examples-hints p + p {
    margin-top: 10px;
}

.landing-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    padding: 7px 16px;
    background: #f0ece6;
    color: #5a554e;
    font-size: 12px;
    font-weight: 500;
    border-radius: 24px;
    border: 1px solid #e3ddd5;
}

/* 功能卡片 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 34px;
}

a.feature-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid #e9e6e1;
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 6px 18px rgba(27, 23, 18, 0.04);
}

.feature-card::after {
    content: '↗';
    position: absolute;
    top: 22px;
    right: 22px;
    color: #a99c8a;
    font-size: 15px;
    transition: transform .2s ease, color .2s ease;
}

.feature-card:hover {
    border-color: #dcd6cd;
    box-shadow: 0 10px 24px rgba(22, 19, 15, 0.08);
    transform: translateY(-2px);
}

.feature-card:hover::after {
    transform: translate(2px, -2px);
    color: #68583f;
}

.feature-card.coming-soon {
    opacity: 0.75;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #f3f0eb;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: #4b4640;
}

.feature-kicker {
    display: block;
    margin-bottom: 7px;
    color: #8b7049;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.feature-card h3 {
    font-size: 20px;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.basic-editor-entry {
    margin: -8px 0 34px;
    text-align: center;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.basic-editor-entry a {
    color: #6f5634;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .15s ease;
}

.basic-editor-entry a:hover {
    color: #4f3c24;
}

.coming-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: #8f887f;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

/* 支持的工具 */
.supported-tools {
    text-align: center;
    padding: 38px 36px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid #e8e4df;
    box-shadow: 0 8px 20px rgba(20, 17, 14, 0.04);
}

.supported-tools h2 {
    font-size: 40px;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.supported-tools-copy {
    max-width: 680px;
    margin: 0 auto 26px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.tools-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tools-list span {
    padding: 8px 18px;
    background: #f1eeea;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid #e7e2db;
}

.landing-cta {
    margin-top: 26px;
    background: #262422;
    border-radius: 18px;
    padding: 48px 24px 42px;
    text-align: center;
    color: #f5f3ef;
}

.landing-cta-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #cbbd9f;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.landing-cta h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #fffefb;
}

.landing-cta p {
    max-width: 760px;
    margin: 0 auto 24px;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(248, 245, 241, 0.78);
}

.landing-cta-btn {
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: #f7f4ef;
    color: #1f1d1a;
    border-radius: 999px;
    padding: 10px 26px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
}

.landing-cta-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

/* 页脚 */
.site-footer {
    background: #e9e3d8;
    padding: 56px 24px 30px;
    border-top: 1px solid var(--border-light);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 360px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-color);
    object-fit: cover;
    border-radius: 8px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-badge {
    margin-top: 20px;
}

.footer-badge a {
    display: inline-block;
    line-height: 0;
    border-radius: 8px;
    background: #ebe3d0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-badge a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 94, 60, 0.14);
}

.footer-badge img {
    display: block;
    width: 260px;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(180, 148, 100, 0.22);
    box-shadow: 0 1px 4px rgba(139, 94, 60, 0.1);
    /* 将官方灰色徽章暖化为淡金色，贴合页脚米色基调 */
    filter: sepia(0.3) saturate(1.08) hue-rotate(8deg) brightness(1.08) contrast(0.97);
    transition: filter 0.2s ease;
}

.footer-badge a:hover img {
    filter: sepia(0.36) saturate(1.12) hue-rotate(8deg) brightness(1.1) contrast(0.97);
}

.footer-legal {
    width: 100%;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}
.footer-legal a {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.footer-column a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 1320px) {
    .main-container {
        grid-template-columns: minmax(280px, 3.8fr) minmax(0, 6.2fr);
    }

    .main-container {
        grid-template-rows: var(--hero-row-height, minmax(clamp(480px, 58vh, 660px), max-content));
    }

    .canvas-container {
        padding-left: 0;
        min-height: clamp(480px, 58vh, 660px);
    }

    .home-canvas-stage-body {
        padding-left: 244px;
    }

    .home-canvas-stage-tabs-wrap {
        grid-template-columns: 244px minmax(0, 1fr);
    }

    .vector-steps-panel {
        width: 232px;
    }

    .vector-steps-title {
        font-size: 18px;
    }
}

@media (max-width: 900px) {
    #app {
        padding-top: 70px;
    }

    .navbar {
        flex-wrap: wrap;
        align-items: center;
        padding: 10px 14px;
        gap: 8px 10px;
        height: auto;
        min-height: 62px;
    }

    .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .navbar-toggle {
        display: inline-flex;
        order: 4;
    }

    .lang-switcher {
        order: 2;
        margin-left: auto;
    }

    .auth-control {
        order: 3;
        margin-left: 0;
    }

    .navbar-nav {
        display: none;
        order: 10;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 4px 0 8px;
        border-top: 1px solid var(--border-color);
    }

    .navbar.mobile-nav-open .navbar-nav {
        display: flex;
    }

    .navbar-nav .nav-link {
        padding: 10px 12px;
    }

    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 10px;
        gap: 12px;
    }

    .intro-panel {
        padding: 16px 10px 0;
    }

    .intro-title {
        font-size: clamp(32px, 8vw, 44px);
    }

    .intro-title-sub {
        font-size: 14px;
        white-space: normal;
    }

    .intro-desc {
        font-size: 14px;
        max-width: 100%;
    }

    .intro-summary {
        font-size: 15px;
        margin-bottom: 22px;
    }

    .intro-sources,
    .intro-studio-gateway,
    .canvas-mode-switcher {
        max-width: 100%;
    }

    .intro-studio-gateway {
        min-height: 0;
        gap: 14px;
        padding: 16px;
    }

    .intro-studio-gateway-types {
        grid-template-columns: 1fr;
    }

    .intro-studio-type {
        min-height: 0;
    }

    .source-list {
        grid-template-columns: 1fr;
    }

    .main-container > .canvas-container {
        height: auto;
        min-height: 420px;
    }

    .canvas-container {
        min-height: 420px;
        height: auto;
        padding-left: 0;
        flex-direction: column;
        align-items: stretch;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .home-canvas-stage-tabs-wrap {
        display: flex;
        flex-direction: column;
        gap: 10px;
        grid-template-columns: none;
        padding: 14px 12px 4px;
    }

    .home-canvas-stage-tabs-spacer {
        display: flex;
        width: 100%;
        padding-left: 2px;
    }

    .home-canvas-stage-tabs-main {
        width: 100%;
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .home-canvas-studio-link {
        position: static;
        transform: none;
    }

    .home-canvas-stage-tab {
        padding: 8px 14px;
        font-size: 12px;
    }

    .home-figure-type-list {
        gap: 8px;
    }

    .home-figure-type-option {
        padding: 12px 10px;
    }

    .home-canvas-stage-body {
        padding-left: 0;
        flex-direction: column;
        overflow: visible;
    }

    .vector-steps-panel {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        flex-shrink: 0;
    }

    .home-canvas-stage-body > .vector-canvas-wrapper,
    .home-canvas-stage-body > .canvas-wrapper,
    .home-canvas-stage-body > .upload-area,
    .canvas-container > .vector-canvas-wrapper,
    .canvas-container > .canvas-wrapper,
    .canvas-container > .upload-area {
        flex: 1;
        width: 100%;
        min-width: 0;
    }

    .vector-canvas-wrapper {
        flex: 1;
        min-height: 300px;
        width: 100%;
        padding: 12px;
        align-items: stretch;
    }

    .vector-canvas-wrapper.chat-flow-wrapper {
        min-height: 360px;
        height: auto;
        padding: 0 !important;
        margin: 10px 12px 12px;
        border-radius: 16px;
    }

    .chat-flow-wrapper {
        padding: 0 !important;
        min-height: 360px;
        border-radius: 16px;
    }

    .chat-messages {
        padding: 16px 12px 8px;
    }

    .chat-bubble-shell {
        max-width: min(85%, calc(100% - 50px));
    }

    .chat-msg-assistant .chat-bubble-shell:has(.chat-bubble-welcome) {
        max-width: calc(100% - 50px);
    }

    .chat-bubble-image {
        max-width: 240px;
        max-height: 200px;
    }

    .chat-result-svg {
        max-width: min(320px, 100%);
        max-height: 200px;
    }

    .chat-result-svg svg,
    .chat-result-svg-image {
        max-height: 180px;
    }

    .canvas-wrapper {
        min-height: 280px;
    }

    .vector-upload-area,
    .upload-area {
        min-height: 280px;
    }

    .upload-content {
        width: 100%;
        max-width: 100%;
        padding: 28px 18px;
        box-sizing: border-box;
    }

    .upload-title {
        font-size: 18px;
        text-align: center;
    }

    .upload-desc,
    .upload-feature-list {
        text-align: center;
        align-items: center;
    }

    .upload-feature-list li {
        text-align: left;
    }

    .toolbar {
        width: min(88vw, 280px);
    }

    body.fullscreen-mode .canvas-container {
        padding-left: 0 !important;
    }

    .landing-section {
        padding: 56px 16px 48px;
    }

    .svg-editor-demo-section {
        padding: 20px;
    }

    .svg-editor-demo-layout {
        grid-template-columns: 1fr;
    }

    .svg-editor-demo-examples {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .svg-editor-demo-card {
        min-height: 148px;
    }

    .svg-editor-demo-thumb img {
        height: 88px;
    }

    .svg-editor-demo-editor-panel {
        min-height: 560px;
    }

    .svg-editor-demo-frame {
        min-height: 516px;
    }

    .svg-editor-demo-section.is-fullscreen {
        top: 70px;
    }

    .landing-title {
        font-size: clamp(28px, 7vw, 36px);
    }

    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .intro-panel {
        padding: 14px 8px 0 8px;
    }

    .intro-sources-title {
        font-size: 14px;
    }

    .source-item {
        min-height: 52px;
        font-size: 12px;
    }

    .sign-in-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .user-menu-panel {
        width: min(94vw, 320px);
    }

    .auth-modal {
        padding: 20px;
        margin: 16px;
        width: calc(100% - 32px);
        max-width: 400px;
    }

    .auth-modal-title {
        font-size: 20px;
    }

    .landing-subtitle {
        font-size: 15px;
    }

    .studio-workflow {
        margin: 42px auto;
        padding: 34px 22px 24px;
    }

    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .workflow-grid::before {
        top: 38px;
        bottom: 38px;
        left: 44px;
        right: auto;
        width: 1px;
        height: auto;
        background: linear-gradient(180deg, transparent, #cdbd9f 10%, #cdbd9f 90%, transparent);
    }

    .workflow-step {
        min-height: 0;
        padding: 20px 20px 20px 82px;
    }

    .workflow-icon {
        position: absolute;
        top: 20px;
        left: 18px;
    }

    .workflow-index {
        top: 18px;
    }

    .section-heading h2 {
        font-size: clamp(28px, 7vw, 36px);
    }

    .svg-editor-demo-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .svg-editor-demo-title {
        font-size: 28px;
    }

    .svg-editor-demo-download-link {
        width: 100%;
    }

    .svg-editor-demo-examples {
        grid-template-columns: 1fr;
    }

    .svg-editor-demo-card {
        min-height: 0;
    }

    .svg-editor-demo-thumb img {
        height: 116px;
    }

    .supported-tools h2 {
        font-size: 30px;
    }

    .landing-cta h2 {
        font-size: 30px;
    }

    .footer-links {
        gap: 40px;
    }

    .vector-conversion-examples {
        padding: 24px 16px 20px;
        margin-bottom: 34px;
    }

    .vector-conversion-examples-title {
        font-size: 28px;
    }

    .vector-conversion-examples-subtitle {
        font-size: 14px;
        margin-bottom: 22px;
    }

    .vector-conversion-examples-header {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .vector-conversion-examples-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px 0;
    }

    .vector-conversion-examples-image {
        height: 200px;
    }

    .vector-conversion-examples-btn-spacer {
        width: 56px;
    }

    .vector-conversion-examples-download-btn {
        width: 56px;
        padding: 8px 5px;
        font-size: 8px;
    }
}

@media (max-width: 600px) {
    .studio-workflow {
        padding: 30px 14px 16px;
        border-radius: 16px;
    }

    .workflow-step {
        padding: 72px 18px 20px;
    }

    .workflow-icon {
        top: 18px;
        left: 18px;
    }

    .workflow-grid::before {
        display: none;
    }

    .supported-tools {
        padding: 32px 18px;
    }

    .svg-editor-demo-section {
        padding: 16px 12px;
        margin-bottom: 34px;
    }

    .svg-editor-demo-title {
        font-size: 26px;
    }

    .svg-editor-demo-subtitle {
        font-size: 13px;
    }

    .svg-editor-demo-image-pair {
        gap: 6px;
    }

    .svg-editor-demo-thumb img {
        height: 96px;
    }

    .svg-editor-demo-editor-panel {
        min-height: 520px;
    }

    .svg-editor-demo-toolbar {
        min-height: 42px;
        padding-left: 10px;
    }

    .svg-editor-demo-toolbar-left {
        gap: 8px;
    }

    .svg-editor-demo-edit-cta {
        font-size: 13px;
    }

    .svg-editor-demo-frame {
        min-height: 478px;
    }

    .svg-editor-demo-section.is-fullscreen {
        padding: 8px;
    }

    .vector-conversion-examples-header {
        display: none;
    }

    .vector-conversion-examples-row {
        gap: 10px;
    }

    .vector-conversion-examples-slot-before .vector-conversion-examples-image-area::before {
        content: 'Before';
        display: block;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #6b6560;
        margin-bottom: 6px;
        text-align: center;
    }

    .vector-conversion-examples-slot-after .vector-conversion-examples-image-area::before {
        content: 'After';
        display: block;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #6b5a3e;
        margin-bottom: 6px;
        text-align: center;
    }

    .vector-conversion-examples-slot {
        flex-direction: column;
    }

    .vector-conversion-examples-btn-spacer {
        display: none;
    }

    .vector-conversion-examples-slot-after .vector-conversion-examples-download-btn {
        flex-direction: row;
        width: 100%;
        padding: 9px 14px;
        gap: 8px;
        font-size: 10px;
    }

    .intro-panel {
        display: none;
    }

    .main-container {
        padding: 8px;
    }

    .canvas-container {
        min-height: 360px;
        border-radius: 12px;
    }

    .toolbar {
        position: fixed;
        left: 0;
        top: 62px;
        bottom: 0;
        width: min(88vw, 280px);
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-radius: 0 16px 16px 0;
    }

    .toolbar.open {
        transform: translateX(0);
    }

    .brand-name {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .landing-cta {
        padding: 36px 16px 32px;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }

    .footer-legal {
        font-size: 12px;
        line-height: 1.6;
    }

    .legal-page {
        margin: 32px auto 48px;
        padding: 0 16px;
    }

    .legal-page h1 {
        font-size: 26px;
    }

    .legal-page h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 10px;
    }

    .upload-content {
        padding: 22px 14px;
    }

    .upload-title {
        font-size: 16px;
    }
}

/* ===== Docs keyword landing pages ===== */
.docs-landing-page {
    width: min(1200px, 100% - 48px);
    margin: 0 auto 56px;
}

.docs-landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: start;
    padding: 48px 0 40px;
}

.docs-landing-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.docs-landing-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.docs-landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.docs-landing-badge-accent {
    background: linear-gradient(135deg, #f3ead8 0%, #e8dcc4 100%);
    border-color: #d9c9a8;
    color: #6b5a3e;
}

.docs-landing-h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(32px, 4.2vw, 46px);
    font-weight: 700;
    line-height: 1.12;
    color: var(--text-primary);
    margin: 0;
}

.docs-landing-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    max-width: 520px;
}

.docs-landing-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--text-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(31, 29, 26, 0.15);
}

.docs-landing-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(31, 29, 26, 0.2);
    color: #fff;
}

.docs-landing-demo-panel {
    height: 460px;
    max-height: 460px;
    min-height: 460px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.landing-demo-host,
.landing-demo-mounted {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.landing-demo-widget {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
}

.landing-demo-widget.chat-flow-wrapper,
.landing-demo-widget.vector-canvas-wrapper.chat-flow-wrapper {
    height: 100%;
    min-height: 0;
}

.landing-demo-widget .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #c9bfb0 transparent;
}

.landing-demo-widget .chat-messages::-webkit-scrollbar {
    width: 6px;
    display: block;
}

.landing-demo-widget .chat-messages::-webkit-scrollbar-thumb {
    background: #c9bfb0;
    border-radius: 999px;
}

.landing-demo-widget .chat-notice,
.landing-demo-widget .chat-input-bar {
    flex-shrink: 0;
}

.landing-demo-widget .chat-bubble-image {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
}

.landing-demo-widget .chat-result-svg {
    max-height: 180px;
}

.landing-demo-widget .chat-bubble-shell {
    max-width: min(92%, calc(100% - 46px));
}

.landing-demo-widget .chat-msg-assistant .chat-bubble-shell:has(.chat-bubble-welcome) {
    max-width: calc(100% - 50px);
    overflow: visible;
}

.landing-demo-widget .chat-bubble-welcome {
    max-width: 100%;
}

.landing-demo-widget .chat-demo-shell {
    max-width: min(68%, 340px);
}

.landing-demo-widget .chat-demo-card {
    padding: 8px;
}

.landing-demo-widget .chat-demo-label {
    margin: 0 0 7px;
    font-size: 14px;
}

.landing-demo-widget .chat-demo-ripple {
    top: 14px;
    left: 14px;
}

.docs-landing-body {
    padding: 8px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* White panel sections (Miss Formula–style) */
.docs-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 8px 32px rgba(31, 29, 26, 0.06);
}

.docs-panel-featured {
    padding: 44px 48px;
}

.docs-panel-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 18px;
    line-height: 1.25;
}

.docs-panel-heading-center {
    text-align: center;
    margin-bottom: 32px;
}

.docs-panel p,
.docs-panel li {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

.docs-panel p:last-child {
    margin-bottom: 0;
}

.docs-panel a,
.docs-step-body a,
.docs-faq-body a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-panel a:hover,
.docs-step-body a:hover,
.docs-faq-body a:hover {
    color: var(--accent-hover);
}

.docs-panel-lead {
    margin-bottom: 12px !important;
}

.docs-panel-list {
    margin: 0;
    padding-left: 1.25rem;
}

.docs-panel-list li {
    margin-bottom: 8px;
}

.docs-panel-list li:last-child {
    margin-bottom: 0;
}

.docs-panel-footnote {
    margin-top: 28px !important;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 14px !important;
}

/* Feature grid (figure 3 style) */
.docs-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 36px;
}

.docs-feature-item {
    text-align: left;
    background: #f7f4ef;
    border: 1px solid #ece6dc;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 2px 10px rgba(31, 29, 26, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-feature-item:hover {
    border-color: #d9c9a8;
    box-shadow: 0 4px 14px rgba(31, 29, 26, 0.06);
}

.docs-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    font-size: 22px;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid #ece6dc;
    border-radius: 14px;
}

.docs-feature-item h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.35;
}

.docs-feature-item p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* Numbered steps (figure 4 style) */
.docs-steps-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 760px;
    margin: 0 auto;
}

.docs-step-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #f7f4ef;
    border: 1px solid #ece6dc;
    border-radius: 14px;
    padding: 20px 22px;
}

.docs-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1f1d1a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.docs-step-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.35;
}

.docs-step-body p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ — single column list */
.docs-faq-section {
    margin-bottom: 8px;
}

.docs-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 880px;
    margin: 0 auto;
}

.docs-faq-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f7f4ef;
    border: 1px solid #ece6dc;
    border-radius: 14px;
    padding: 20px 22px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-faq-row:hover {
    border-color: #d9c9a8;
    box-shadow: 0 4px 14px rgba(31, 29, 26, 0.06);
}

.docs-faq-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1f1d1a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.docs-faq-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.35;
}

.docs-faq-body p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

.docs-landing-cta-banner {
    margin: 0;
}

.docs-landing-cta-card {
    background: #1f1d1a;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(31, 29, 26, 0.18);
}

.docs-landing-cta-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(26px, 3.5vw, 34px);
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.2;
}

.docs-landing-cta-card p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    max-width: 640px;
    margin: 0 auto 28px;
}

.docs-landing-cta-card a:not(.docs-landing-cta-light) {
    color: #e8dcc4;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-landing-cta-card a:not(.docs-landing-cta-light):hover {
    color: #fff;
}

.docs-landing-cta-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 999px;
    background: #fff;
    color: #1f1d1a;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.docs-landing-cta-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: #1f1d1a;
}

.hub-articles {
    width: 100%;
    margin: 0 auto 48px;
}

.hub-articles .docs-hub-grid {
    margin-top: 0;
}

.docs-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.docs-hub-card {
    display: block;
    padding: 22px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-hub-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.docs-hub-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.docs-hub-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.blog-hub-date {
    margin: 0 0 10px !important;
    font-size: 12px !important;
    letter-spacing: 0.02em;
    color: #9a938a !important;
}

/* Editorial blog article — continuous prose, no card panels */
.blog-article-page {
    width: min(720px, calc(100% - 48px));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.blog-article-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(29, 28, 26, 0.1);
}

.blog-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
    letter-spacing: 0.01em;
    color: #8a837a;
}

.blog-article-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(34px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text-primary, #1d1c1a);
    margin: 0 0 20px;
}

.blog-article-lead {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: clamp(17px, 2.2vw, 19px);
    line-height: 1.65;
    color: #5c574f;
}

.blog-article-body {
    font-family: Inter, system-ui, sans-serif;
}

.blog-article-body h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--text-primary, #1d1c1a);
    margin: 48px 0 16px;
}

.blog-article-body h2:first-child {
    margin-top: 0;
}

.blog-article-body p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.75;
    color: #3f3b36;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 22px;
    padding-left: 1.35em;
}

.blog-article-body li {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.7;
    color: #3f3b36;
}

.blog-article-body li:last-child {
    margin-bottom: 0;
}

.blog-article-body a {
    color: var(--text-primary, #1d1c1a);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.blog-article-body a:hover {
    color: var(--accent-hover, #6f4a2f);
}

.blog-article-body strong {
    color: var(--text-primary, #1d1c1a);
    font-weight: 600;
}

.blog-article-note {
    margin-top: 28px !important;
    padding-top: 22px;
    border-top: 1px solid rgba(29, 28, 26, 0.1);
    font-size: 15px !important;
    color: #6f6b65 !important;
}

.blog-article-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(29, 28, 26, 0.1);
}

.blog-article-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 999px;
    background: #1d1c1a;
    color: #fffaf3 !important;
    font-family: Inter, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 4px 14px rgba(31, 29, 26, 0.14);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.blog-article-cta:hover {
    transform: translateY(-1px);
    background: #2c2a27;
    color: #fffaf3 !important;
    box-shadow: 0 6px 18px rgba(31, 29, 26, 0.2);
}

.blog-article-back {
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    color: #6f6b65;
    text-decoration: none;
}

.blog-article-back:hover {
    color: var(--text-primary, #1d1c1a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 640px) {
    .blog-article-page {
        width: min(100%, calc(100% - 32px));
        padding: 36px 0 64px;
    }

    .blog-article-header {
        margin-bottom: 28px;
        padding-bottom: 24px;
    }

    .blog-article-body h2 {
        margin-top: 36px;
    }

    .blog-article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

@media (max-width: 960px) {
    .docs-landing-hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 32px;
    }

    .docs-landing-demo-panel,
    .landing-demo-host,
    .landing-demo-mounted,
    .landing-demo-widget {
        height: 400px;
        max-height: 400px;
        min-height: 400px;
    }

    .docs-feature-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .docs-panel,
    .docs-panel-featured {
        padding: 28px 24px;
    }

    .docs-landing-cta-card {
        padding: 36px 24px;
    }
}

@media (max-width: 600px) {
    .docs-landing-page {
        width: min(100% - 24px, 1200px);
    }

    .docs-landing-hero {
        padding-top: 24px;
    }

    .docs-landing-cta-light {
        width: 100%;
    }
}
